]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/parsers/get_tariff.cpp
Merge remote-tracking branch 'temp/ticket37' into ticket
[stg.git] / stglibs / srvconf.lib / parsers / get_tariff.cpp
index a24f287d7eb4767a3eb464b120917769c4710dd0..75b6b46293b2551aa53d56f2d0e7b68304865eb3 100644 (file)
@@ -97,6 +97,7 @@ else
 return true;
 }
 
+template <typename T>
 bool GetChangePolicy(const char ** attr, T & value, const std::string & attrName)
 {
 if (!CheckValue(attr, attrName))
@@ -156,6 +157,7 @@ GET_TARIFF::PARSER::PARSER(CALLBACK f, void * d, const std::string & e)
     AddParser(propertyParsers, "free", info.tariffConf.free);
     AddParser(propertyParsers, "traffType", info.tariffConf.traffType, GetTraffType);
     AddParser(propertyParsers, "period", info.tariffConf.period, GetPeriod);
+    AddParser(propertyParsers, "changePolicy", info.tariffConf.changePolicy, GetChangePolicy);
     for (size_t i = 0; i < DIR_NUM; ++i)
         AddParser(propertyParsers, "time" + unsigned2str(i), info.dirPrice[i], GetTimeSpan);
     AddAOSParser(propertyParsers, "priceDayA", info.dirPrice, &DIRPRICE_DATA::priceDayA, GetSlashedValue);