This is necessary for clients of your class to obtain your class by invoking getReader, getFormatter, etc.
A subclass will have to be introduced to the rest of the system before it can interoperate with existing applications because all the existing applications use only getReader, getFormatter, etc. and can usually be extended by adding a std::string to their configuration.
Note that all the std::strings that get passed into Introducer are case-insensitive. "VIL" is the same as "vil" or "viL".
Static Public Member Functions | |
static void | introduce (const std::string &name, SmartPtr< X > instance) |
Introduce new X to the rest of the system. | |
static bool | exists (const std::string &name) |
Is this type known to the factory? | |
static SmartPtr< X > | get (const std::string &name) |
This is meant to be used only by the class X, which normally will be a base-class type. |
static bool code::Factory< X >::exists | ( | const std::string & | name | ) | [inline, static] |
Is this type known to the factory?
static SmartPtr< X > code::Factory< X >::get | ( | const std::string & | name | ) | [inline, static] |
This is meant to be used only by the class X, which normally will be a base-class type.
static void code::Factory< X >::introduce | ( | const std::string & | name, | |
SmartPtr< X > | instance | |||
) | [inline, static] |
Introduce new X to the rest of the system.