#include <Factory.h>
構成 | |
| class | FactoryEntry |
| FactoryEntry クラス. | |
Public 型 | |
| enum | ReturnCode { FACTORY_OK, FACTORY_ERROR, ALREADY_EXISTS, NOT_FOUND, INVALID_ARG, UNKNOWN_ERROR } |
| typedef std::map< Identifier, FactoryEntry > | FactoryMap |
| typedef FactoryMap::iterator | FactoryMapIt |
Public メソッド | |
| bool | hasFactory (const Identifier &id) |
| ファクトリー有無チェック | |
| std::vector< Identifier > | getIdentifiers () |
| ファクトリーIDリスト取得 | |
| ReturnCode | addFactory (const Identifier &id, Creator creator, Destructor destructor) |
| ファクトリー登録 | |
| ReturnCode | removeFactory (const Identifier &id) |
| ファクトリー削除 | |
| AbstractClass * | createObject (const Identifier &id) |
| ファクトリーオブジェクト生成 | |
| void | deleteObject (const Identifier &id, AbstractClass *&obj) |
| ファクトリーオブジェクト削除 | |
| void | deleteObject (AbstractClass *&obj) |
| ファクトリーオブジェクト削除 | |
Factory テンプレートクラス.
| typedef std::map<Identifier, FactoryEntry> coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::FactoryMap |
| typedef FactoryMap::iterator coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::FactoryMapIt |
| enum coil::Factory::ReturnCode |
| ReturnCode coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::addFactory | ( | const Identifier & | id, | |
| Creator | creator, | |||
| Destructor | destructor | |||
| ) | [inline] |
ファクトリー登録
ファクトリーを登録する。
| id | ファクトリーID | |
| creator | クリエータ用ファンクタ | |
| destructor | デストラクタ用ファンクタ |
| AbstractClass* coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::createObject | ( | const Identifier & | id | ) | [inline] |
ファクトリーオブジェクト生成
ファクトリーオブジェクトを生成する。
| id | ファクトリーID |
| void coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::deleteObject | ( | AbstractClass *& | obj | ) | [inline] |
ファクトリーオブジェクト削除
ファクトリーオブジェクトを削除する。
| obj | ファクトリーオブジェクト |
| void coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::deleteObject | ( | const Identifier & | id, | |
| AbstractClass *& | obj | |||
| ) | [inline] |
ファクトリーオブジェクト削除
ファクトリーオブジェクトを削除する。
| id | ファクトリーID | |
| obj | ファクトリーオブジェクト |
| std::vector<Identifier> coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::getIdentifiers | ( | ) | [inline] |
ファクトリーIDリスト取得
ファクトリーIDリストを返す。
| bool coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::hasFactory | ( | const Identifier & | id | ) | [inline] |
ファクトリー有無チェック
指定IDのファクトリー有無を返す。
| id | ファクトリーID |
| ReturnCode coil::Factory< AbstractClass, Identifier, Compare, Creator, Destructor >::removeFactory | ( | const Identifier & | id | ) | [inline] |
ファクトリー削除
ファクトリーを削除する。
| id | ファクトリーID |
1.6.3