35 #ifndef plugin_factory_h 36 #define plugin_factory_h 42 #include "BESPlugin.h" 47 using std::unary_function;
64 map<string, BESPlugin<C> *> d_children;
90 struct DeletePlugins:
public unary_function<pair<string, BESPlugin<C> *>, void>
122 for_each(d_children.begin(), d_children.end(), DeletePlugins());
133 d_children.insert(std::make_pair(name, child_class));
154 if (!child_implementation)
throw NoSuchObject(
string(
"No class is bound to ") + name, __FILE__, __LINE__);
158 virtual void dump(ostream &strm)
const 160 strm <<
"BESPluginFactory::dump - (" << (
void *)
this <<
")" << endl;
exception thrown if inernal error encountered
Base object for bes objects.
BESPluginFactory(const string &name, const string &library_name)
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
C * get(const string &name)
void add_mapping(const string &name, const string &library_name)