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
This commit is contained in:
Machiavelli
2010-06-25 00:18:01 +02:00
parent a6b9e716a6
commit 0f7657b68c
109 changed files with 349 additions and 1221 deletions
+1 -3
View File
@@ -19,7 +19,7 @@
*/
#include "DatabaseEnv.h"
#include "SingletonImp.h"
#include "AddonMgr.h"
#include "ObjectAccessor.h"
@@ -30,8 +30,6 @@
extern DatabaseType LoginDatabase;
INSTANTIATE_SINGLETON_1(AddonMgr);
AddonMgr::AddonMgr()
{
}
+4 -3
View File
@@ -22,7 +22,7 @@
#define _ADDONMGR_H
#include "Common.h"
#include "Singleton.h"
#include "ace/Singleton.h"
#include <string>
@@ -68,9 +68,10 @@ typedef std::list<SavedAddon> SavedAddonsList;
class AddonMgr
{
friend class ACE_Singleton<AddonMgr, ACE_Null_Mutex>;
AddonMgr();
public:
AddonMgr();
~AddonMgr();
void LoadFromDB();
@@ -83,7 +84,7 @@ class AddonMgr
SavedAddonsList m_knownAddons; // Known addons.
};
#define sAddonMgr Trinity::Singleton<AddonMgr>::Instance()
#define sAddonMgr (*ACE_Singleton<AddonMgr, ACE_Null_Mutex>::instance())
#endif