diff options
author | Machiavelli <none@none> | 2010-06-25 00:18:01 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2010-06-25 00:18:01 +0200 |
commit | 0f7657b68c8b6444fadb480cdd0f87631391afa5 (patch) | |
tree | a5ffdaecbb1332ffbc655916842a23a622340c98 /src/server/game/Pools/PoolHandler.h | |
parent | a6b9e716a61334e218cff227f66b0c51053e72f3 (diff) |
Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern.
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Pools/PoolHandler.h')
-rw-r--r-- | src/server/game/Pools/PoolHandler.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/game/Pools/PoolHandler.h b/src/server/game/Pools/PoolHandler.h index df62badd9c8..156bc47a2a9 100644 --- a/src/server/game/Pools/PoolHandler.h +++ b/src/server/game/Pools/PoolHandler.h @@ -20,7 +20,7 @@ #define TRINITY_POOLHANDLER_H #include "Define.h" -#include "Singleton.h" +#include "ace/Singleton.h" #include "Creature.h" #include "GameObject.h" @@ -89,10 +89,11 @@ class PoolGroup class PoolHandler { - public: - PoolHandler(); - ~PoolHandler() {}; + friend class ACE_Singleton<PoolHandler, ACE_Null_Mutex>; + PoolHandler(); + ~PoolHandler() {}; + public: void LoadFromDB(); void Initialize(); @@ -134,7 +135,7 @@ class PoolHandler SpawnedPoolData mSpawnedData; }; -#define poolhandler Trinity::Singleton<PoolHandler>::Instance() +#define poolhandler (*ACE_Singleton<PoolHandler, ACE_Null_Mutex>::instance()) // Method that tell if the creature is part of a pool and return the pool id if yes template<> |