-class BASE_PROPERTY_PARSER
-{
- public:
- virtual ~BASE_PROPERTY_PARSER() {}
- virtual void Parse(const char ** attr) = 0;
-};
-
-template <typename T>
-class PROPERTY_PARSER : public BASE_PROPERTY_PARSER
-{
- public:
- typedef T (* FUNC)(const char **);
- PROPERTY_PARSER(T & v, FUNC f) : value(v), func(f) {}
- virtual void Parse(const char ** attr) { value = func(attr); }
- private:
- T & value;
- FUNC func;
-};
-
-typedef std::map<std::string, BASE_PROPERTY_PARSER *> PROPERTY_PARSERS;
-