MMaster.h
00001 #ifndef MMASTER_H 00002 #define MMASTER_H 00003 00004 #include "MCommandCommunicator.h" 00005 #include "MServer.h" 00006 #include "MUID.h" 00007 00010 class MMaster : public MServer{ 00011 private: 00012 static MMaster* m_pInstance; 00013 protected: 00014 MUIDRefMap m_GlobalUIDRefMap; 00015 public: 00016 protected: 00018 virtual MUID UseUID(void); 00019 00020 virtual int OnAccept(MCommObject* pCommObj); 00021 virtual void OnRegisterCommand(MCommandManager* pCommandManager); 00022 bool OnCommand(MCommand* pCommand); 00023 00025 void ResponseInfo(MUID& Target); 00026 public: 00027 MMaster(void); 00028 virtual ~MMaster(void); 00029 00031 static MMaster* GetInstance(void); 00032 00033 bool Create(int nPort); 00034 void Destroy(void); 00035 }; 00036 00037 #define MASTER_UID MUID(0, 1) 00038 00039 00040 #endif
MAIET entertainment