annotate ParamBag.h @ 11:4d981e9848b1

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