Factory template class. More...
#include <Factory.h>

Classes | |
| class | FactoryEntry |
| FactoryEntry class. More... | |
Public Types | |
| typedef std::map< Identifier, FactoryEntry > | FactoryMap |
| typedef FactoryMap::iterator | FactoryMapIt |
| enum | ReturnCode { FACTORY_OK, FACTORY_ERROR, ALREADY_EXISTS, NOT_FOUND, INVALID_ARG, UNKNOWN_ERROR } |
Public Member Functions | |
| ReturnCode | addFactory (const Identifier &id, Creator creator, Destructor destructor) |
| Add factory. | |
| AbstractClass * | createObject (const Identifier &id) |
| Create factory object. | |
| void | deleteObject (const Identifier &id, AbstractClass *&obj) |
| Delete factory object. | |
| void | deleteObject (AbstractClass *&obj) |
| Delete factory object. | |
| std::vector< Identifier > | getIdentifiers () |
| Get factory ID list. | |
| bool | hasFactory (const Identifier &id) |
| Factory presence check. | |
| ReturnCode | removeFactory (const Identifier &id) |
| Remove factory. | |
Private Attributes | |
| FactoryMap | m_creators |
Factory template class.
Definition at line 104 of file coil/common/Factory.h.
| typedef std::map<Identifier, FactoryEntry> coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::FactoryMap |
Definition at line 106 of file coil/common/Factory.h.
| typedef FactoryMap::iterator coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::FactoryMapIt |
Definition at line 110 of file coil/common/Factory.h.
| enum coil::Factory::ReturnCode |
Definition at line 112 of file coil/common/Factory.h.
| ReturnCode coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::addFactory | ( | const Identifier & | id, |
| Creator | creator, | ||
| Destructor | destructor | ||
| ) | [inline] |
Add factory.
Add a factory.
| id | Factory ID. |
| creator | Functor for creator. |
| destructor | Functor for destructor. |
Definition at line 217 of file coil/common/Factory.h.
| AbstractClass* coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::createObject | ( | const Identifier & | id | ) | [inline] |
Create factory object.
Create a factory object.
| id | Factory ID. |
Definition at line 284 of file coil/common/Factory.h.
| void coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::deleteObject | ( | const Identifier & | id, |
| AbstractClass *& | obj | ||
| ) | [inline] |
Delete factory object.
Delete a factory object.
Definition at line 311 of file coil/common/Factory.h.
| void coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::deleteObject | ( | AbstractClass *& | obj | ) | [inline] |
Delete factory object.
Delete a factory object.
| obj | Factory object. |
Definition at line 336 of file coil/common/Factory.h.
| std::vector<Identifier> coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::getIdentifiers | ( | ) | [inline] |
Get factory ID list.
Return a list of factory ID.
Definition at line 170 of file coil/common/Factory.h.
| bool coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::hasFactory | ( | const Identifier & | id | ) | [inline] |
Factory presence check.
Return a factory having ID or not.
| id | Factory ID. |
Definition at line 145 of file coil/common/Factory.h.
| ReturnCode coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::removeFactory | ( | const Identifier & | id | ) | [inline] |
Remove factory.
Remove a factory.
| id | Factory ID. |
Definition at line 253 of file coil/common/Factory.h.
FactoryMap coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::m_creators [private] |
Definition at line 398 of file coil/common/Factory.h.