public:
typedef bool (* FUNC)(const char **, A &, T A::value_type:: *);
AOS_PARSER(A & a, T A::value_type:: * fld, FUNC f) : array(a), field(fld), func(f) {}
public:
typedef bool (* FUNC)(const char **, A &, T A::value_type:: *);
AOS_PARSER(A & a, T A::value_type:: * fld, FUNC f) : array(a), field(fld), func(f) {}
- virtual bool Parse(const char ** attr) { return func(attr, array, field); }
+ virtual bool Parse(const char ** attr, const std::string & /*attrName*/) { return func(attr, array, field); }
parsers.insert(std::make_pair(ToLower(name), new AOS_PARSER<A, T>(array, field, func)));
}
parsers.insert(std::make_pair(ToLower(name), new AOS_PARSER<A, T>(array, field, func)));
}
if (ParseTariffTimeStr(attr[1], hb, mb, he, me) == 0)
{
value.hDay = hb;
if (ParseTariffTimeStr(attr[1], hb, mb, he, me) == 0)
{
value.hDay = hb;
template <typename A, typename T>
bool GetSlashedValue(const char ** attr, A & array, T A::value_type:: * field)
{
template <typename A, typename T>
bool GetSlashedValue(const char ** attr, A & array, T A::value_type:: * field)
{
AddAOSParser(propertyParsers, "priceNightB", info.dirPrice, &DIRPRICE_DATA::priceNightB, GetSlashedValue);
AddAOSParser(propertyParsers, "singlePrice", info.dirPrice, &DIRPRICE_DATA::singlePrice, GetSlashedValue);
AddAOSParser(propertyParsers, "noDiscount", info.dirPrice, &DIRPRICE_DATA::noDiscount, GetSlashedValue);
AddAOSParser(propertyParsers, "priceNightB", info.dirPrice, &DIRPRICE_DATA::priceNightB, GetSlashedValue);
AddAOSParser(propertyParsers, "singlePrice", info.dirPrice, &DIRPRICE_DATA::singlePrice, GetSlashedValue);
AddAOSParser(propertyParsers, "noDiscount", info.dirPrice, &DIRPRICE_DATA::noDiscount, GetSlashedValue);
}
//-----------------------------------------------------------------------------
GET_TARIFF::PARSER::~PARSER()
}
//-----------------------------------------------------------------------------
GET_TARIFF::PARSER::~PARSER()
void GET_TARIFF::PARSER::ParseTariffParams(const char * el, const char ** attr)
{
if (!TryParse(propertyParsers, ToLower(el), attr))
void GET_TARIFF::PARSER::ParseTariffParams(const char * el, const char ** attr)
{
if (!TryParse(propertyParsers, ToLower(el), attr))