Base::Factory Class Reference

Base class of all factories This class has the purpose to produce at runtime instances of classes not known at compile time. More...

#include <Factory.h>

Public Member Functions

void AddProducer (const char *sClassName, AbstractProducer *pcProducer)
 Adds a new prducer instance. More...
 
std::list< std::string > CanProduce () const
 returns a list of all registered producer More...
 
bool CanProduce (const char *sClassName) const
 returns true if there is a producer for this class registered More...
 

Protected Member Functions

 Factory ()
 construction More...
 
void * Produce (const char *sClassName) const
 produce a class with the given name More...
 
virtual ~Factory ()
 destruction More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Factory()

Base::Factory::Factory ( )
protected

construction

◆ ~Factory()

Factory::~Factory ( )
protectedvirtual

destruction

Member Function Documentation

◆ AddProducer()

◆ CanProduce() [1/2]

std::list< std::string > Factory::CanProduce ( ) const

returns a list of all registered producer

◆ CanProduce() [2/2]

bool Factory::CanProduce ( const char *  sClassName) const

returns true if there is a producer for this class registered

◆ Produce()


The documentation for this class was generated from the following files: