sector.h

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

H
47
字号
//////////////////////////////////////////////////////////////////////////////// Filename    : Sector.h// Written by  : excel96// Description : //////////////////////////////////////////////////////////////////////////////#ifndef __SECTOR_H__#define __SECTOR_H__#include "Types.h"#include "Exception.h"#include <hash_map>const int SECTOR_SIZE = 13;//////////////////////////////////////////////////////////////////////////////// class Sector//////////////////////////////////////////////////////////////////////////////class Object;class Sector{public:	Sector() throw();	~Sector() throw();public:	void addObject(Object* pObject) throw (DuplicatedException, Error);	void deleteObject(ObjectID_t id) throw (NoSuchElementException, Error);	Object* getObject(ObjectID_t id) throw (NoSuchElementException, Error);	Sector* getNearbySector(uint dir) throw (Error);	void setNearbySector(uint dir, Sector* pSector) throw (Error);	const hash_map<ObjectID_t, Object*>& getObjects(void) const { return m_Objects; }	uint getSize(void) const throw() { return m_Objects.size(); }	string toString(void) const throw();protected:	hash_map<ObjectID_t, Object*> m_Objects;	Sector* m_pNearbySectors[9];};#endif

⌨️ 快捷键说明

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