julian C / VarStore

VarItems.h

Committer:
julmbed
Date:
2014-08-25
Revision:
9:d081aa4e4418
Parent:
8:934ec53fe2c0

File content as of revision 9:d081aa4e4418:

#ifndef VARITEMS_H
#define VARITEMS_H
#define NULL 0
#define ERR -1

// #define VARITEMS_DEBUG 1

#define VAR_NAME_LEN 20

enum VarTypes {T_int,T_float};


class VarItem
{
public:
    VarItem();
    virtual ~VarItem();

    void SetVar(VarTypes VT,void* VarPtr);
    int SetVal(char *Val);
//   void  SetVarType(VarTypes VarType);
    void SetVarArraySize(int Size);
    void SetVarName(char *Name);
    char *Dump();
    char *GetVarName();

protected:
private:

    char VarName[VAR_NAME_LEN];

    int   *ValInt;
    float *ValFloat;
    VarTypes VarType;
    unsigned int ArraySize;

};

#endif // VARITEMS_H