Update of /cvsroot/cmap/libs/eval
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28949
Modified Files:
eval.h evalImpl.h parser.cpp
Log Message:
Process address attributes
Index: parser.cpp
===================================================================
RCS file: /cvsroot/cmap/libs/eval/parser.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- parser.cpp 19 Aug 2005 18:42:23 -0000 1.7
+++ parser.cpp 21 Aug 2005 07:15:18 -0000 1.8
@@ -54,6 +54,16 @@
StringLVar *ConfigParser::parseStringLVar(const std::string &varName) {
if (varName == "label")
return new LabelLVar();
+ if (varName == "countryname")
+ return new CountryNameLVar();
+ if (varName == "regionname")
+ return new RegionNameLVar();
+ if (varName == "cityname")
+ return new CityNameLVar();
+ if (varName == "streetname")
+ return new StreetNameLVar();
+ if (varName == "house")
+ return new HouseLVar();
if (varName == "attr") {
if (t.nextToken() != TT_STRING)
throw ParserException("Attr name expected", t.lineno());
Index: evalImpl.h
===================================================================
RCS file: /cvsroot/cmap/libs/eval/evalImpl.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- evalImpl.h 19 Aug 2005 18:42:23 -0000 1.6
+++ evalImpl.h 21 Aug 2005 07:15:18 -0000 1.7
@@ -38,6 +38,56 @@
}
};
+class CountryNameLVar : public StringLVar {
+ virtual std::string getValue(const void *, const ObjectProp &op) {
+ return op.countryName;
+ }
+
+ virtual void setValue(ObjectProp &op, const std::string &value) {
+ op.countryName = value;
+ }
+};
+
+class RegionNameLVar : public StringLVar {
+ virtual std::string getValue(const void *, const ObjectProp &op) {
+ return op.regionName;
+ }
+
+ virtual void setValue(ObjectProp &op, const std::string &value) {
+ op.regionName = value;
+ }
+};
+
+class CityNameLVar : public StringLVar {
+ virtual std::string getValue(const void *, const ObjectProp &op) {
+ return op.cityName;
+ }
+
+ virtual void setValue(ObjectProp &op, const std::string &value) {
+ op.cityName = value;
+ }
+};
+
+class StreetNameLVar : public StringLVar {
+ virtual std::string getValue(const void *, const ObjectProp &op) {
+ return op.streetName;
+ }
+
+ virtual void setValue(ObjectProp &op, const std::string &value) {
+ op.streetName = value;
+ }
+};
+
+class HouseLVar : public StringLVar {
+ virtual std::string getValue(const void *, const ObjectProp &op) {
+ return op.house;
+ }
+
+ virtual void setValue(ObjectProp &op, const std::string &value) {
+ op.house = value;
+ }
+};
+
class StringAttrVar : public StringLVar {
public:
StringAttrVar(const std::string &_attrName) : attrName(_attrName) {
Index: eval.h
===================================================================
RCS file: /cvsroot/cmap/libs/eval/eval.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- eval.h 19 Aug 2005 18:42:23 -0000 1.4
+++ eval.h 21 Aug 2005 07:15:18 -0000 1.5
@@ -44,6 +44,12 @@
std::string label;
+ std::string countryName;
+ std::string regionName;
+ std::string cityName;
+ std::string streetName;
+ std::string house;
+
Kind kind;
//HACK until everything is cleaned out
|