#include <Factory.h>
Public Member Functions | |
| bool | Register (const IdentifierType &id, ProductCreator creator) |
| Register selected object. | |
| bool | Unregister (const IdentifierType &id) |
| Unregister selected object. | |
| AbstractProduct * | CreateObject (const IdentifierType &id, const Initializator &init) |
| Creates instance of the selected object. | |
Private Types | |
| typedef std::map< IdentifierType, ProductCreator > | IdToProductMap |
| Type of container used to store object id's. | |
Private Attributes | |
| IdToProductMap | associations |
| Container used to store object id's. | |
This version creates instances with function having one parameter to initialize object.
typedef std::map<IdentifierType, ProductCreator> Factory< AbstractProduct, IdentifierType, Initializator, ProductCreator, FactoryErrorPolicy >::IdToProductMap [private] |
Type of container used to store object id's.
| AbstractProduct* Factory< AbstractProduct, IdentifierType, Initializator, ProductCreator, FactoryErrorPolicy >::CreateObject | ( | const IdentifierType & | id, | |
| const Initializator & | init | |||
| ) | [inline] |
Creates instance of the selected object.
| id | Selected object id | |
| init | Initializator of the selected object |
| bool Factory< AbstractProduct, IdentifierType, Initializator, ProductCreator, FactoryErrorPolicy >::Register | ( | const IdentifierType & | id, | |
| ProductCreator | creator | |||
| ) | [inline] |
Register selected object.
| id | Selected object id | |
| creator | Creator that will be used to create instance |
| bool Factory< AbstractProduct, IdentifierType, Initializator, ProductCreator, FactoryErrorPolicy >::Unregister | ( | const IdentifierType & | id | ) | [inline] |
Unregister selected object.
| id | Selected object id |
IdToProductMap Factory< AbstractProduct, IdentifierType, Initializator, ProductCreator, FactoryErrorPolicy >::associations [private] |
Container used to store object id's.
1.4.7