[Orxonox-commit 3074] r7768 - code/branches/presentation/src/libraries/network

smerkli at orxonox.net smerkli at orxonox.net
Wed Dec 15 18:53:03 CET 2010


Author: smerkli
Date: 2010-12-15 18:53:02 +0100 (Wed, 15 Dec 2010)
New Revision: 7768

Modified:
   code/branches/presentation/src/libraries/network/CMakeLists.txt
   code/branches/presentation/src/libraries/network/MasterServerComm.cc
   code/branches/presentation/src/libraries/network/MasterServerComm.h
Log:
fixes

Modified: code/branches/presentation/src/libraries/network/CMakeLists.txt
===================================================================
--- code/branches/presentation/src/libraries/network/CMakeLists.txt	2010-12-15 16:45:16 UTC (rev 7767)
+++ code/branches/presentation/src/libraries/network/CMakeLists.txt	2010-12-15 17:53:02 UTC (rev 7768)
@@ -79,6 +79,7 @@
     Client.h
     LANDiscovery.h
     WANDiscovery.h
+    MasterServerComm.h
   PCH_FILE
     NetworkPrecompiledHeaders.h
   LINK_LIBRARIES

Modified: code/branches/presentation/src/libraries/network/MasterServerComm.cc
===================================================================
--- code/branches/presentation/src/libraries/network/MasterServerComm.cc	2010-12-15 16:45:16 UTC (rev 7767)
+++ code/branches/presentation/src/libraries/network/MasterServerComm.cc	2010-12-15 17:53:02 UTC (rev 7768)
@@ -27,15 +27,19 @@
  */
 
 #include "MasterServerComm.h"
+#include "util/ScopedSingletonManager.h"
+#include "core/CoreIncludes.h"
 
 namespace orxonox
 {
   ManageScopedSingleton(MasterServerComm, ScopeID::Root, true);
- 
+
   MasterServerComm::MasterServerComm()
   { /* nothing anymore, everything's been outsourced to 
      * the initialize method to facilitate debugging
      */
+    /* register object in orxonox */
+    RegisterObject(MasterServerComm);
   } 
 
   int MasterServerComm::initialize()

Modified: code/branches/presentation/src/libraries/network/MasterServerComm.h
===================================================================
--- code/branches/presentation/src/libraries/network/MasterServerComm.h	2010-12-15 16:45:16 UTC (rev 7767)
+++ code/branches/presentation/src/libraries/network/MasterServerComm.h	2010-12-15 17:53:02 UTC (rev 7768)
@@ -34,11 +34,16 @@
 #include <string>
 #include <cstring>
 #include <enet/enet.h>
+#include "util/Singleton.h"
+#include "core/OrxonoxClass.h"
+#include "core/CoreIncludes.h"
+#include "NetworkPrereqs.h"
 
 // tolua_begin
 namespace orxonox
 {
   class _NetworkExport MasterServerComm 
+  // tolua_end
     : public Singleton<MasterServerComm>, public OrxonoxClass
   { // tolua_export
     friend class Singleton<MasterServerComm>;
@@ -91,9 +96,9 @@
        * Poll the master server for new data and act accordingly */
       int pollForReply( int (*callback)( char*, ENetEvent* ), int delayms );
 
-      /** \return an instance of WANDiscovery
+      /** \return an instance of MasterServerComm 
        * 
-       * Create and return an instance of WANDiscovery.
+       * Create and return an instance of  MasterServerComm.
        */
       static MasterServerComm& getInstance() { return Singleton<MasterServerComm>::getInstance(); } // tolua_export
 
@@ -111,7 +116,7 @@
       ENetPeer *peer;
 
       /** Singleton pointer */
-      static MasterServerComm* singletonPtr_s;
+      static MasterServerComm *singletonPtr_s;
   }; // tolua_export
 
 } // tolua_export




More information about the Orxonox-commit mailing list