#include "parser.h"
+#include "stg/common.h"
#include "stg/resetable.h"
#include <string>
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[tag] = new FACTORY(admins); }
+ { registry[ToLower(tag)] = new FACTORY(admins); }
private:
const ADMINS & m_admins;
};
FACTORY(ADMINS & admins) : m_admins(admins) {}
virtual BASE_PARSER * create(const ADMIN & admin) { return new ADD_ADMIN(admin, m_admins); }
static void Register(REGISTRY & registry, ADMINS & admins)
- { registry[tag] = new FACTORY(admins); }
+ { registry[ToLower(tag)] = new FACTORY(admins); }
private:
ADMINS & m_admins;
};
FACTORY(ADMINS & admins) : m_admins(admins) {}
virtual BASE_PARSER * create(const ADMIN & admin) { return new DEL_ADMIN(admin, m_admins); }
static void Register(REGISTRY & registry, ADMINS & admins)
- { registry[tag] = new FACTORY(admins); }
+ { registry[ToLower(tag)] = new FACTORY(admins); }
private:
ADMINS & m_admins;
};
FACTORY(ADMINS & admins) : m_admins(admins) {}
virtual BASE_PARSER * create(const ADMIN & admin) { return new CHG_ADMIN(admin, m_admins); }
static void Register(REGISTRY & registry, ADMINS & admins)
- { registry[tag] = new FACTORY(admins); }
+ { registry[ToLower(tag)] = new FACTORY(admins); }
private:
ADMINS & m_admins;
};