telephonecenter.h

来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 51 行

H
51
字号
//--------------------------------------------------------------------------------//// Filename   : TelephoneCenter.h// Written By : elca////--------------------------------------------------------------------------------#ifndef __TELEPHONE_CENTER_H__#define __TELEPHONE_CENTER_H__// include files#include "Types.h"#include "Exception.h"#include "Slayer.h"#include "Mutex.h"#include <hash_map>//--------------------------------------------------------------------------------// class TelephoneCenter;//// 霸烙 辑滚狼 臂肺国 概聪历 按眉肺, PC狼 迄锅龋甫 荤侩秦辑 PC按眉俊 立辟且 荐 乐档废// 秦霖促. 郴何利栏肺 hash_map 阑 荤侩秦辑, 八祸 加档甫 氢惑矫挪促.////--------------------------------------------------------------------------------class TelephoneCenter {public:	// add creature to hash_map	// execute just once at PC's login	void addSlayer(Slayer* pSlayer) throw(DuplicatedException, Error);	// delete creature from hash_map	// execute just once at PC's logout	void deleteSlayer(PhoneNumber_t PhoneNumber) throw(NoSuchElementException, Error);	// get creature with PC-name	Slayer* getSlayer(PhoneNumber_t PhoneNumber) const throw(NoSuchElementException, Error);private:	hash_map< PhoneNumber_t, const Slayer* > m_PCs;	mutable Mutex m_Mutex;};// global variable declarationextern TelephoneCenter* g_pTelephoneCenter;#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?