5 #if !defined(MGINCLUDEGUARD_GELFACTORY__)
6 #define MGINCLUDEGUARD_GELFACTORY__
44 typedef std::map<KeyType, MGGelFactoryBase*>
TypeMap;
60 static bool is_valid();
67 MGGel* create_gel(
const KeyType& name)
const;
73 void register_factory(
81 void unregister_factory(
const KeyType& name);
102 template <
typename T>
127 #define GEL_REG_JOIN( s1, s2 ) GEL_REG_JOIN__( s1, s2 )
128 #define GEL_REG_JOIN__( s1, s2 ) s1##s2
130 #define GEL_REG_MAKE_UNIQUE_NAME( prefix ) GEL_REG_JOIN( prefix, __LINE__ )
146 #define AUTO_GEL_REGISTER(classname, gelname) \
147 static MGAutoGelRegister<classname> \
148 GEL_REG_MAKE_UNIQUE_NAME( glreg__ ) (gelname);
150 #endif // defined(MGINCLUDEGUARD_GELFACTORY__)
ファクトリーレジストリーにエントリーする便利クラス.
Definition: GelFactory.h:103
virtual MGGel * create_gel() const =0
Factory Method 用のインターフェイス(MGGelFactoryTのために定義).
Definition: GelFactory.h:13
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
オブジェクトファクトリークラス用テンプレートクラス.
Definition: GelFactory.h:22
void unregister_factory(const KeyType &name)
std::map< KeyType, MGGelFactoryBase * > TypeMap
Definition: GelFactory.h:44
void register_factory(const KeyType &name, MGGelFactoryBase *factory)
MGAutoGelRegister(const MGGelFactoryRegistry::KeyType &name)
T オブジェクトのためのファクトリー
Definition: GelFactory.h:111
オブジェクトファクトリークラス.
Definition: GelFactory.h:40
long KeyType
Definition: GelFactory.h:43
~MGAutoGelRegister()
デストラクター
Definition: GelFactory.h:118
virtual T * create_gel() const
Definition: GelFactory.h:25