Changeset 7769 for code/branches/presentation/src/libraries
- Timestamp:
- Dec 15, 2010, 7:12:32 PM (14 years ago)
- Location:
- code/branches/presentation/src/libraries/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/libraries/network/CMakeLists.txt
r7768 r7769 80 80 LANDiscovery.h 81 81 WANDiscovery.h 82 MasterServerComm.h83 82 PCH_FILE 84 83 NetworkPrecompiledHeaders.h -
code/branches/presentation/src/libraries/network/MasterServerComm.cc
r7768 r7769 28 28 29 29 #include "MasterServerComm.h" 30 #include "util/ScopedSingletonManager.h"31 #include "core/CoreIncludes.h"32 30 33 31 namespace orxonox 34 32 { 35 ManageScopedSingleton(MasterServerComm, ScopeID::Root, true);36 33 37 34 MasterServerComm::MasterServerComm() … … 40 37 */ 41 38 /* register object in orxonox */ 42 RegisterObject(MasterServerComm);43 39 } 44 40 -
code/branches/presentation/src/libraries/network/MasterServerComm.h
r7768 r7769 35 35 #include <cstring> 36 36 #include <enet/enet.h> 37 #include "util/Singleton.h"38 #include "core/OrxonoxClass.h"39 #include "core/CoreIncludes.h"40 #include "NetworkPrereqs.h"41 37 42 // tolua_begin 38 43 39 namespace orxonox 44 40 { 45 class _NetworkExport MasterServerComm 46 // tolua_end 47 : public Singleton<MasterServerComm>, public OrxonoxClass 48 { // tolua_export 49 friend class Singleton<MasterServerComm>; 41 class MasterServerComm 42 { 50 43 public: 51 44 /** constructor */ … … 97 90 int pollForReply( int (*callback)( char*, ENetEvent* ), int delayms ); 98 91 99 /** \return an instance of MasterServerComm100 *101 * Create and return an instance of MasterServerComm.102 */103 static MasterServerComm& getInstance() { return Singleton<MasterServerComm>::getInstance(); } // tolua_export104 105 92 private: 106 93 /** client handle */ … … 115 102 /** peer data holder */ 116 103 ENetPeer *peer; 104 }; 117 105 118 /** Singleton pointer */ 119 static MasterServerComm *singletonPtr_s; 120 }; // tolua_export 121 122 } // tolua_export 106 } 123 107 124 108 #endif /* MASTERSERVERCOMM_H */
Note: See TracChangeset
for help on using the changeset viewer.