28 lines
693 B
C++
28 lines
693 B
C++
#pragma once
|
|
|
|
#include <Singleton.h>
|
|
#include <MemoryPoolFactory.h>
|
|
using namespace util;
|
|
|
|
class TempServerSession;
|
|
class AgentServerSession;
|
|
class MasterServerSession;
|
|
class ServerSession;
|
|
|
|
class ServerSessionFactory : public Singleton<ServerSessionFactory>
|
|
{
|
|
public:
|
|
ServerSessionFactory(void);
|
|
~ServerSessionFactory(void);
|
|
|
|
VOID Init( int nSize );
|
|
|
|
ServerSession * AllocServerSession( eUPDATE_SERVER_TYPE eServerType );
|
|
BOOL FreeServerSession( ServerSession * pServerSession );
|
|
|
|
private:
|
|
CMemoryPoolFactory<TempServerSession> * m_pTempServerPool;
|
|
CMemoryPoolFactory<AgentServerSession> * m_pAgentServerPool;
|
|
CMemoryPoolFactory<MasterServerSession> * m_pMasterServerPool;
|
|
};
|