- DEL_TARIFF(const ADMIN & admin, const USERS & users, TARIFFS & tariffs)
- : BASE_PARSER(admin, "DelTariff"), m_users(users), m_tariffs(tariffs) {}
+ class FACTORY : public BASE_PARSER::FACTORY
+ {
+ public:
+ FACTORY(Tariffs & tariffs, const Users & users) : m_tariffs(tariffs), m_users(users) {}
+ virtual BASE_PARSER * create(const Admin & admin) { return new DEL_TARIFF(admin, m_users, m_tariffs); }
+ static void Register(REGISTRY & registry, Tariffs & tariffs, const Users & users)
+ { registry[ToLower(tag)] = new FACTORY(tariffs, users); }
+ private:
+ Tariffs & m_tariffs;
+ const Users & m_users;
+ };
+
+ static const char * tag;
+
+ DEL_TARIFF(const Admin & admin, const Users & users, Tariffs & tariffs)
+ : BASE_PARSER(admin, tag), m_users(users), m_tariffs(tariffs) {}