You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2010/03/26 21:49:47 UTC

svn commit: r928054 - in /qpid/trunk/qpid/cpp: include/qpid/agent/ManagementAgent.h src/qpid/agent/ManagementAgentImpl.cpp

Author: astitcher
Date: Fri Mar 26 20:49:46 2010
New Revision: 928054

URL: http://svn.apache.org/viewvc?rev=928054&view=rev
Log:
Move ManagementAgent class statics to be file static to avoid exposing their types in the header file

Modified:
    qpid/trunk/qpid/cpp/include/qpid/agent/ManagementAgent.h
    qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp

Modified: qpid/trunk/qpid/cpp/include/qpid/agent/ManagementAgent.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/include/qpid/agent/ManagementAgent.h?rev=928054&r1=928053&r2=928054&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/include/qpid/agent/ManagementAgent.h (original)
+++ qpid/trunk/qpid/cpp/include/qpid/agent/ManagementAgent.h Fri Mar 26 20:49:46 2010
@@ -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 {

Modified: qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp?rev=928054&r1=928053&r2=928054&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp Fri Mar 26 20:49:46 2010
@@ -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)
 {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org