julian C / VarStore
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers VarItems.h Source File

VarItems.h

00001 #ifndef VARITEMS_H
00002 #define VARITEMS_H
00003 #define NULL 0
00004 #define ERR -1
00005 
00006 // #define VARITEMS_DEBUG 1
00007 
00008 #define VAR_NAME_LEN 20
00009 
00010 enum VarTypes {T_int,T_float};
00011 
00012 
00013 class VarItem
00014 {
00015 public:
00016     VarItem();
00017     virtual ~VarItem();
00018 
00019     void SetVar(VarTypes VT,void* VarPtr);
00020     int SetVal(char *Val);
00021 //   void  SetVarType(VarTypes VarType);
00022     void SetVarArraySize(int Size);
00023     void SetVarName(char *Name);
00024     char *Dump();
00025     char *GetVarName();
00026 
00027 protected:
00028 private:
00029 
00030     char VarName[VAR_NAME_LEN];
00031 
00032     int   *ValInt;
00033     float *ValFloat;
00034     VarTypes VarType;
00035     unsigned int ArraySize;
00036 
00037 };
00038 
00039 #endif // VARITEMS_H