diff options
author | Henri Herscher <henri@oreka.org> | 2007-02-05 21:34:01 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2007-02-05 21:34:01 +0000 |
commit | 94e3eb2d0cda7df2d876d1698db2e8e75cd0a0b1 (patch) | |
tree | 35361de8c5dd9d8cf43dbb84674cf503c03b3e4a /orkbasecxx/ObjectFactory.cpp | |
parent | eb3b1d6a3dcf20864d0610758f8bcf426a1af7ec (diff) |
ObjectFactory becomes a home brewed singleton instead of an ACE singleton. ACE singletons have the problem of not being unique across DLL.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@398 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/ObjectFactory.cpp')
-rw-r--r-- | orkbasecxx/ObjectFactory.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/orkbasecxx/ObjectFactory.cpp b/orkbasecxx/ObjectFactory.cpp index 173d581..97536e9 100644 --- a/orkbasecxx/ObjectFactory.cpp +++ b/orkbasecxx/ObjectFactory.cpp @@ -15,12 +15,23 @@ #include "ObjectFactory.h" +ObjectFactory* ObjectFactory::m_singleton = NULL; + +ObjectFactory::ObjectFactory() +{ +} void ObjectFactory::Initialize() { - ; + m_singleton = new ObjectFactory(); } +ObjectFactory* ObjectFactory::GetSingleton() +{ + return m_singleton; +} + + ObjectRef ObjectFactory::NewInstance(CStdString& className) { std::map<CStdString, ObjectRef>::iterator pair; |