CSCommon: MAgentObject.h 소스 파일

MAIET

MAgentObject.h

00001 #pragma once
00002 
00003 #include "MObject.h"
00004 #include <windows.h>
00005 
00006 
00007 class MAgentObject : public MObject {
00008 protected:
00009     char            m_szIP[64];
00010     unsigned int    m_nTCPPort;
00011     unsigned int    m_nUDPPort;
00012 
00013 public:
00014     MAgentObject() {}
00015     MAgentObject(const MUID& uid) : MObject(uid) { 
00016         ZeroMemory(m_szIP, sizeof(char)*64);    
00017         m_nTCPPort=0;
00018         m_nUDPPort=0;
00019     }
00020     virtual ~MAgentObject() {};
00021 
00022     void SetAddr(char* szIP, unsigned short nTCPPort, unsigned short nUDPPort)  { 
00023         strcpy(m_szIP, szIP); m_nTCPPort = nTCPPort; m_nUDPPort = nUDPPort;
00024     }
00025     char* GetIP()                   { return m_szIP; }
00026     unsigned short GetTCPPort()     { return m_nTCPPort; }
00027     unsigned short GetUDPPort()     { return m_nUDPPort; }
00028 
00029     int GetStageCount()         { return 0; }
00030     int GetAssignCount()        { return 0; }
00031 };
00032 
00033 
00034 class MAgentObjectMap : public map<MUID, MAgentObject*>{};


MAIET entertainment