std::string description;
creator_base(const std::string& descr): description(descr) { }
creator_base(const char* descr): description(descr) { }
+ virtual ~creator_base() { }
virtual Base* operator()() const = 0;
};
return NULL;
}
- Base* new_instance(const char* name) const
- {
- return new_instance(std::string(name));
- }
-
const std::string& get_name(iterator& it) const { return it->first; }
const std::string& get_descr(iterator& it) const
{ return it->second->description; }
std::string description;
creator_base(const std::string& descr): description(descr) { }
creator_base(const char* descr): description(descr) { }
+ virtual ~creator_base() { }
virtual Base* operator()(Arg1, Arg2) const = 0;
};
return NULL;
}
- Base* new_instance(const char* name, Arg1 arg1, Arg2 arg2) const
- {
- return new_instance(std::string(name), arg1, arg2);
- }
-
const std::string& get_name(iterator& it) const { return it->first; }
const std::string& get_descr(iterator& it) const
{ return it->second->description; }