/* ÀÛ¼ºÀÚ: ¹®»óÇö Á¦ÀÛÀÏ: 2009-11-10 °£´ÜÇѼ³¸í: ³×Æ®¿÷ ¼¼¼Ç ÆåÅ丮 */ #pragma once #define SEND_AGENTSERVER (1<<0) #define SEND_CLIENT (1<<1) #define SEND_BOTH SEND_AGENTSERVER | SEND_CLIENT #include "AgentNetworkSession.hpp" #include "ClientNetworkSession.hpp" class NetWorkSessionFactory { public: enum NETWORKTYPE {AGENTSVR, CLIENT}; NetWorkSessionFactory() { m_Agent = new AgentNetWorkSession; m_Clinet = new ClientNetWorkSession; } ~NetWorkSessionFactory() { delete m_Agent; delete m_Clinet; } public: INetWorkSession* const GetNetWorkSession(NETWORKTYPE type) { switch(type) { case AGENTSVR: return m_Agent; case CLIENT: return m_Clinet; } return NULL; } private: AgentNetWorkSession* m_Agent; ClientNetWorkSession* m_Clinet; };