annotate Param.h @ 2:8f6d8a258491

Not sure what changed but works
author Me
date Wed, 28 Jul 2010 13:17:25 -0700
parents 396fda650c30
children e5c04a3a2610
rev   line source
Me@0 1 /*
Me@1 2 *
Me@0 3 * Author: SeanHalle@yahoo.com
Me@0 4 *
Me@0 5 * Created on November 19, 2009, 6:30 PM
Me@0 6 */
Me@0 7
Me@0 8 #ifndef _PARAM_H
Me@0 9 #define _PARAM_H
Me@0 10
Me@0 11 typedef
Me@0 12 struct
Me@0 13 { int type;
Me@0 14 int intValue;
Me@0 15 char * strValue;
Me@0 16 float floatValue;
Me@0 17 }
Me@0 18 ParamStruc;
Me@0 19
Me@0 20 #define INT_PARAM_TYPE 0
Me@0 21 #define STRING_PARAM_TYPE 1
Me@0 22 #define FLOAT_PARAM_TYPE 2
Me@0 23
Me@2 24 #define PARAM_BAG_HASHSIZE 1024
Me@0 25
Me@2 26 typedef struct _ParamBagHashEntry ParamBagHashEntry;
Me@2 27
Me@2 28 struct _ParamBagHashEntry
Me@0 29 {
Me@2 30 char *key;
Me@2 31 ParamStruc *param;
Me@2 32 struct _ParamBagHashEntry *next;
Me@0 33 }
Me@2 34 /*ParamBagHashEntry*/;
Me@2 35
Me@0 36
Me@0 37 typedef
Me@0 38 struct
Me@0 39 { int bagSz;
Me@2 40 ParamBagHashEntry* *entries;
Me@0 41 }
Me@0 42 ParamBag;
Me@0 43
Me@2 44
Me@0 45 ParamBag *makeParamBag();
Me@2 46 void readParamFileIntoBag( char *paramFileName, ParamBag * bag );
Me@0 47 ParamStruc *getParamFromBag( char *key, ParamBag * bag );
Me@0 48 int addParamToBag( char* key, ParamStruc *param, ParamBag *bag );
Me@0 49 void freeParamBag( ParamBag *bag );
Me@2 50 //char *paramBagToString( ParamBag * bag );
Me@0 51 ParamStruc *makeParamStruc();
Me@0 52 ParamStruc *makeParamFromStrs( char * type, char *value );
Me@0 53 ssize_t getline( char **lineptr, size_t *n, FILE *stream );
Me@0 54
Me@0 55 #endif /* _PARAM_H */
Me@0 56