00001 #ifndef _CStateVar_H_
00002 #define _CStateVar_H_
00003
00004 #include "xi-util.h"
00005 #include "xi-symbol.h"
00006
00007 namespace xi {
00008
00009 class ParamList;
00010
00011 struct CStateVar {
00012 int isVoid;
00013 XStr *type;
00014 int numPtrs;
00015 XStr *name;
00016 XStr *byRef;
00017 XStr *arrayLength;
00018 int isMsg;
00019
00020 CStateVar(int v, const char *t, int np, const char *n, XStr *r, const char *a, int m) : isVoid(v), numPtrs(np), byRef(r), isMsg(m)
00021 {
00022 if (t != NULL) { type = new XStr(t); }
00023 else {type = NULL;}
00024 if (n != NULL) { name = new XStr(n); }
00025 else { name = NULL; }
00026 if (a != NULL) {arrayLength = new XStr(a); }
00027 else { arrayLength = NULL; }
00028 }
00029
00030 CStateVar(ParamList *pl)
00031 : isVoid(0), type(new XStr(*(pl->param->getType()))), numPtrs(0),
00032 name(new XStr(pl->getGivenName())), byRef(pl->isReference() ? new XStr("&") : NULL),
00033 arrayLength(pl->isArray() ? new XStr(pl->getArrayLen()) : NULL), isMsg(pl->isMessage())
00034 { }
00035 };
00036
00037 }
00038
00039 #endif