[Cmap-cvs] libs/eval eval.h,1.2,1.3 evalImpl.h,1.3,1.4 parser.cpp,1.4,1.5
Status: Beta
Brought to you by:
dyp
From: Denis P. <dy...@us...> - 2005-06-12 08:21:53
|
Update of /cvsroot/cmap/libs/eval In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11874 Modified Files: eval.h evalImpl.h parser.cpp Log Message: Support direction and city Index: parser.cpp =================================================================== RCS file: /cvsroot/cmap/libs/eval/parser.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- parser.cpp 24 Apr 2005 19:59:51 -0000 1.4 +++ parser.cpp 12 Jun 2005 08:21:44 -0000 1.5 @@ -11,6 +11,8 @@ return new ExportVar(); if (varName == "index") return new IndexVar(); + if (varName == "city") + return new CityVar(); return NULL; } @@ -35,8 +37,6 @@ return new LayerMinVar(); if (varName == "layer_max") return new LayerMaxVar(); - if (varName == "city") - return new CityVar(); return NULL; } Index: evalImpl.h =================================================================== RCS file: /cvsroot/cmap/libs/eval/evalImpl.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- evalImpl.h 24 Apr 2005 19:59:51 -0000 1.3 +++ evalImpl.h 12 Jun 2005 08:21:44 -0000 1.4 @@ -252,12 +252,12 @@ } }; -class CityVar : public IntLVar { - virtual int getValue(const void *, const ObjectProp &op, int) { +class CityVar : public BoolLVar { + virtual bool getValue(const void *, const ObjectProp &op, int) { return op.city; } - virtual void setValue(ObjectProp &op, int value) { + virtual void setValue(ObjectProp &op, bool value) { op.city = value; } }; Index: eval.h =================================================================== RCS file: /cvsroot/cmap/libs/eval/eval.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- eval.h 24 Apr 2005 19:59:51 -0000 1.2 +++ eval.h 12 Jun 2005 08:21:44 -0000 1.3 @@ -20,7 +20,8 @@ typedef struct { bool index; bool doExport; - int city; + bool city; + bool direction; int garminType; |