Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VReo > Reo__Matrix_Mult
diff ParamHelper/Param.h @ 0:c4b1849c05ef
init add
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Sun, 02 Feb 2014 17:58:41 -0800 |
| parents | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ParamHelper/Param.h Sun Feb 02 17:58:41 2014 -0800 1.3 @@ -0,0 +1,56 @@ 1.4 +/* 1.5 + * 1.6 + * Author: SeanHalle@yahoo.com 1.7 + * 1.8 + * Created on November 19, 2009, 6:30 PM 1.9 + */ 1.10 + 1.11 +#ifndef _PARAM_H 1.12 +#define _PARAM_H 1.13 + 1.14 +typedef 1.15 +struct 1.16 + { int type; 1.17 + int intValue; 1.18 + char * strValue; 1.19 + float floatValue; 1.20 + } 1.21 +ParamStruc; 1.22 + 1.23 +#define INT_PARAM_TYPE 0 1.24 +#define STRING_PARAM_TYPE 1 1.25 +#define FLOAT_PARAM_TYPE 2 1.26 + 1.27 +#define PARAM_BAG_HASHSIZE 1024 1.28 + 1.29 +typedef struct _ParamBagHashEntry ParamBagHashEntry; 1.30 + 1.31 +struct _ParamBagHashEntry 1.32 + { 1.33 + char *key; 1.34 + ParamStruc *param; 1.35 + struct _ParamBagHashEntry *next; 1.36 + } 1.37 +/*ParamBagHashEntry*/; 1.38 + 1.39 + 1.40 +typedef 1.41 +struct 1.42 + { int bagSz; 1.43 + ParamBagHashEntry* *entries; 1.44 + } 1.45 +ParamBag; 1.46 + 1.47 + 1.48 +ParamBag *makeParamBag(); 1.49 +void readParamFileIntoBag( char *paramFileName, ParamBag * bag ); 1.50 +ParamStruc *getParamFromBag( char *key, ParamBag * bag ); 1.51 +int addParamToBag( char* key, ParamStruc *param, ParamBag *bag ); 1.52 +void freeParamBag( ParamBag *bag ); 1.53 +//char *paramBagToString( ParamBag * bag ); 1.54 +ParamStruc *makeParamStruc(); 1.55 +ParamStruc *makeParamFromStrs( char * type, char *value ); 1.56 +ssize_t getline( char **lineptr, size_t *n, FILE *stream ); 1.57 + 1.58 +#endif /* _PARAM_H */ 1.59 +
