gameserverinfomanager.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 57 行
H
57 行
//////////////////////////////////////////////////////////////////////////////// Filename : GameServerInfoManager.h// Written By : reiot@ewestsoft.com// Description ://////////////////////////////////////////////////////////////////////////////#ifndef __GAME_SERVER_INFO_MANAGER_H__#define __GAME_SERVER_INFO_MANAGER_H__#include "Types.h"#include "Exception.h"#include "GameServerInfo.h"#include <hash_map>typedef hash_map<ServerID_t, GameServerInfo*> HashMapGameServerInfo;typedef HashMapGameServerInfo::iterator HashMapGameServerInfoItor;//////////////////////////////////////////////////////////////////////////////// class GameServerInfoManager;// 霸烙 辑滚狼 ID 甫 虐蔼栏肺 窍绰 GameServerInfo狼 hash_map 阑 // 郴何俊 啊瘤绊 乐促.// World 窍唱狼 GameServerInfo甫 啊柳促.//////////////////////////////////////////////////////////////////////////////class GameServerInfoManager {public: GameServerInfoManager () throw (); ~GameServerInfoManager () throw ();public: void init () throw ( Error ); void load () throw ( Error ); void addGameServerInfo ( GameServerInfo * pGameServerInfo, const ServerGroupID_t ServerGroupID ) throw ( DuplicatedException ); void deleteGameServerInfo ( const ServerID_t ServerID, const ServerGroupID_t ServerGroupID ) throw ( NoSuchElementException ); GameServerInfo * getGameServerInfo ( const ServerID_t ServerID, const ServerGroupID_t ServerGroupID ) const throw( NoSuchElementException ); uint getSize ( const ServerGroupID_t ServerGroupID ) const throw () { return m_pGameServerInfos[ServerGroupID].size(); } string toString () const throw (); // get MaxServerGroupID int getMaxServerGroupID() const throw() { return m_MaxServerGroupID; }private: // hash map of GameServerInfo // key : GameServerID_t // value : GameServerInfo * HashMapGameServerInfo* m_pGameServerInfos; int m_MaxServerGroupID;};// global variable declarationextern GameServerInfoManager * g_pGameServerInfoManager;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?