|
AndroMeta
2.0.0
|
00001 /* 00002 * Copyright 2009-2012 AndroMeta LLC. All rights reserved. 00003 * 00004 * AndroMeta LLC retains all intellectual property and proprietary 00005 * rights to this software and related documentation and any modifications 00006 * thereto. Any use, reproduction, disclosure, or distribution of this 00007 * software and related documentation without an express license agreement 00008 * from AndroMeta LLC is strictly prohibited. 00009 * 00010 */ 00011 00019 #ifndef ANDROMETA_M_FACTORY_H 00020 #define ANDROMETA_M_FACTORY_H 00021 00022 #include <AndroMeta/MObjectBase.h> 00023 #include <AndroMeta/MObject.h> 00024 00025 namespace Meta{ 00026 00027 class MBrokerBase; 00028 00043 class MFactory{ 00044 public: 00045 00051 MFactory(const mstr& className); 00052 00056 virtual ~MFactory(); 00057 00067 virtual MObjectBase* create(mnode f); 00068 00076 virtual MObject* create(MBrokerBase* broker); 00077 00086 virtual MObjectBase* recreate(const mvar& v); 00087 00091 static MObjectBase::ClassIdType allocateClassId(); 00092 00102 static MObjectBase* construct(mnode f); 00103 00113 static MObjectBase* restore(const mvar& v); 00114 00115 private: 00116 MFactory& operator=(const MFactory&); 00117 MFactory(const MFactory&); 00118 }; 00119 00120 } // end namespace Meta 00121 00122 #endif // ANDROMETA_M_FACTORY_H 00123 00124 00125
1.7.6.1