OpenLexocad
28.0
|
#include <Factory.h>
Public Member Functions | |
void | AddProducer (const char *sClassName, AbstractProducer *pcProducer) |
Adds a new producer instance. More... | |
bool | CanProduce (const char *sClassName) const |
returns true if there is a producer for this class registered More... | |
std::list< std::string > | CanProduce () const |
returns a list of all registered producer More... | |
Protected Member Functions | |
void * | Produce (const char *sClassName) const |
produce a class with the given name More... | |
Factory2 (void) | |
construction More... | |
virtual | ~Factory2 () |
destruction More... | |
Protected Attributes | |
std::map< const std::string, AbstractProducer * > | _mpcProducers |
Base class of all factories This class has the purpose to produce at runtime instances of classes not known at compile time. It holds a map of so called producers which are able to produce an instance of a special class. Producer can be registered at runtime through e.g. application modules
|
inlineprotected |
construction
|
protectedvirtual |
destruction
void Base::Factory2::AddProducer | ( | const char * | sClassName, |
AbstractProducer * | pcProducer | ||
) |
Adds a new producer instance.
std::list<std::string> Base::Factory2::CanProduce | ( | ) | const |
returns a list of all registered producer
bool Base::Factory2::CanProduce | ( | const char * | sClassName | ) | const |
returns true if there is a producer for this class registered
|
protected |
produce a class with the given name
|
protected |