Core: Converted (hopefully) all remaining singletons to use ACE_Singleton class

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-22 20:52:47 +01:00
parent 7b4e1c6387
commit 0948fc5bbe
6 changed files with 28 additions and 57 deletions

View File

@@ -4,6 +4,7 @@
#ifndef SC_SYSTEM_H
#define SC_SYSTEM_H
#include <ace/Singleton.h>
#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available
@@ -51,13 +52,10 @@ struct StringTextData
class SystemMgr
{
public:
SystemMgr();
friend class ACE_Singleton<SystemMgr, ACE_Null_Mutex>;
SystemMgr() {}
~SystemMgr() {}
static SystemMgr& Instance();
public:
//Maps and lists
typedef UNORDERED_MAP<int32, StringTextData> TextDataMap;
typedef UNORDERED_MAP<uint32, std::vector<ScriptPointMove> > PointMoveMap;
@@ -97,6 +95,6 @@ class SystemMgr
PointMoveMap m_mPointMoveMap; //coordinates for waypoints
};
#define sScriptSystemMgr SystemMgr::Instance()
#define sScriptSystemMgr (*ACE_Singleton<SystemMgr, ACE_Null_Mutex>::instance())
#endif