summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2010-03-26 20:49:46 +0000
committerAndrew Stitcher <astitcher@apache.org>2010-03-26 20:49:46 +0000
commit1f20a66d046064871407441aee8d21412fd389d9 (patch)
tree1731966342ca13f6db6c1c335012e3913d57fb7d /cpp
parentbb0b6efcf0e8cbe8ff05e3995468814cd2d1c9d7 (diff)
downloadqpid-python-1f20a66d046064871407441aee8d21412fd389d9.tar.gz
Move ManagementAgent class statics to be file static to avoid exposing their types in the header file
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@928054 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/include/qpid/agent/ManagementAgent.h6
-rw-r--r--cpp/src/qpid/agent/ManagementAgentImpl.cpp11
2 files changed, 7 insertions, 10 deletions
diff --git a/cpp/include/qpid/agent/ManagementAgent.h b/cpp/include/qpid/agent/ManagementAgent.h
index 41b6423624..b6ec82862c 100644
--- a/cpp/include/qpid/agent/ManagementAgent.h
+++ b/cpp/include/qpid/agent/ManagementAgent.h
@@ -24,7 +24,6 @@
#include "qpid/management/ManagementObject.h"
#include "qpid/management/ManagementEvent.h"
#include "qpid/management/Manageable.h"
-#include "qpid/sys/Mutex.h"
#include "qpid/client/ConnectionSettings.h"
namespace qpid {
@@ -45,11 +44,6 @@ class ManagementAgent
QMF_AGENT_EXTERN Singleton(bool disableManagement = false);
QMF_AGENT_EXTERN ~Singleton();
QMF_AGENT_EXTERN static ManagementAgent* getInstance();
- private:
- static sys::Mutex lock;
- static bool disabled;
- static int refCount;
- static ManagementAgent* agent;
};
typedef enum {
diff --git a/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/cpp/src/qpid/agent/ManagementAgentImpl.cpp
index 71899561a9..77372f839a 100644
--- a/cpp/src/qpid/agent/ManagementAgentImpl.cpp
+++ b/cpp/src/qpid/agent/ManagementAgentImpl.cpp
@@ -22,6 +22,7 @@
#include "qpid/management/ManagementObject.h"
#include "qpid/log/Statement.h"
#include "qpid/agent/ManagementAgentImpl.h"
+#include "qpid/sys/Mutex.h"
#include <list>
#include <string.h>
#include <stdlib.h>
@@ -42,10 +43,12 @@ using std::string;
using std::cout;
using std::endl;
-Mutex ManagementAgent::Singleton::lock;
-bool ManagementAgent::Singleton::disabled = false;
-ManagementAgent* ManagementAgent::Singleton::agent = 0;
-int ManagementAgent::Singleton::refCount = 0;
+namespace {
+ Mutex lock;
+ bool disabled = false;
+ ManagementAgent* agent = 0;
+ int refCount = 0;
+}
ManagementAgent::Singleton::Singleton(bool disableManagement)
{