|
MGCL V10
V10
MGCL V10
|
オブジェクトファクトリークラス. [詳解]
公開型 | |
| typedef long | KeyType |
| typedef std::map< KeyType, MGGelFactoryBase * > | TypeMap |
公開メンバ関数 | |
| ~MGGelFactoryRegistry () | |
| MGGel * | create_gel (const KeyType &name) const |
| void | register_factory (const KeyType &name, MGGelFactoryBase *factory) |
| void | unregister_factory (const KeyType &name) |
| void | unregister_factory (MGGelFactoryBase *factory) |
静的公開メンバ関数 | |
| static MGGelFactoryRegistry * | get_instance () |
| static bool | is_valid () |
オブジェクトファクトリークラス.
サンプル
MGObject* MGNullObj(long TID){ MGGelFactoryRegistry* reg = MGGelFactoryRegistry::get_instance(); return static_cast<MGObject*>(reg->create_gel(TID)); }
| typedef long MGGelFactoryRegistry::KeyType |
| typedef std::map<KeyType, MGGelFactoryBase*> MGGelFactoryRegistry::TypeMap |
| MGGelFactoryRegistry::~MGGelFactoryRegistry | ( | ) |
|
static |
|
static |
クラスオブジェクトが有効かどうかを返す。
| n/a |
| void MGGelFactoryRegistry::register_factory | ( | const KeyType & | name, |
| MGGelFactoryBase * | factory | ||
| ) |
| void MGGelFactoryRegistry::unregister_factory | ( | const KeyType & | name | ) |
| void MGGelFactoryRegistry::unregister_factory | ( | MGGelFactoryBase * | factory | ) |