- GET_ADMINS(const ADMIN & admin, const ADMINS & admins)
- : BASE_PARSER(admin, "GetAdmins"), m_admins(admins) {}
+ class FACTORY : public BASE_PARSER::FACTORY
+ {
+ public:
+ explicit FACTORY(const Admins & admins) : m_admins(admins) {}
+ virtual BASE_PARSER * create(const Admin & admin) { return new GET_ADMINS(admin, m_admins); }
+ static void Register(REGISTRY & registry, const Admins & admins)
+ { registry[ToLower(tag)] = new FACTORY(admins); }
+ private:
+ const Admins & m_admins;
+ };
+
+ static const char * tag;
+
+ GET_ADMINS(const Admin & admin, const Admins & admins)
+ : BASE_PARSER(admin, tag), m_admins(admins) {}