summaryrefslogtreecommitdiff
path: root/orkbasecxx/ObjectFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'orkbasecxx/ObjectFactory.h')
-rw-r--r--orkbasecxx/ObjectFactory.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/orkbasecxx/ObjectFactory.h b/orkbasecxx/ObjectFactory.h
index 4ebaf60..0c5cd31 100644
--- a/orkbasecxx/ObjectFactory.h
+++ b/orkbasecxx/ObjectFactory.h
@@ -22,18 +22,24 @@
/** The ObjectFactory can be used to instanciate Objects based on class name.
All existing Objects must be registered to the ObjectFactory at startup.
*/
+class ObjectFactory;
+
class DLL_IMPORT_EXPORT_ORKBASE ObjectFactory
{
public:
- void Initialize();
+ static void Initialize();
+ static ObjectFactory* GetSingleton();
+
ObjectRef NewInstance(CStdString& className);
void RegisterObject(ObjectRef&);
private:
+ ObjectFactory();
+ static ObjectFactory* m_singleton;
std::map<CStdString, ObjectRef> m_classes;
};
-typedef ACE_Singleton<ObjectFactory, ACE_Thread_Mutex> ObjectFactorySingleton;
+//typedef ACE_Singleton<ObjectFactory, ACE_Thread_Mutex> ObjectFactorySingleton;
#endif