26 #ifndef PRE_FACTORY_HH
27 #define PRE_FACTORY_HH
50 template <
class T,
class Arg>
72 static T* make (
string name,
const Arg& arg );
77 virtual T* build (
const Arg& arg ) = 0;
84 template <
class T,
class Arg>
92 template <
class T,
class Arg>
102 std::string msg =
"PreFactory<T,Arg>::make( string name, const Arg& arg ): Not found the name on the factory\n";
108 return (*i).second->build ( arg );
static PreFactoryMap & instance()
static Log * instance()
Returns the instance pointer, creating the object on the first call.
PreFactory(const string &factoryName)
void error(const char *format,...)
'Error' level.
static T * make(string name, const Arg &arg)
map< string, PreFactory< T, Arg > * > PreFactoryMap