📄 gpassport.h
字号:
//GPassport.h
/*/////////////////////////////////////////////////////////////////
李亦
liease@163.com 4040719
2006-7-19
/*/////////////////////////////////////////////////////////////////
#ifndef _RPG__GPASSPORT_H_
#define _RPG__GPASSPORT_H_
#ifndef _SIMBASE_H_
#include "console/simBase.h"
#endif
#ifndef _RPG__RPGDEFINE_H_
#include "rpg/RPGDefine.h"
#endif
#ifndef _RPG__GOBJECT_H_
#include "GObject.h"
#endif
namespace RPG
{
class GPlayer;
DECLARE_CONSOLETYPE(GPlayer)
/////////////////////////////////////////////////////////////////
/// 通行证管理
class GPassport: public GObject
{
typedef GObject Parent;
protected:
GPlayer* m_arPlayers[RPG_PC_MAX];
//StringTableEntry m_pAccount; m_pNameTag
public:
//构造/析构函数
GPassport();
~GPassport();
public:
GPlayer*& operator[](U32 n);
const GPlayer*& operator[](U32 n) const;
GPlayer*& operator[](S32 n) {return operator[]((U32)n);}
const GPlayer*& operator[](S32 n) const{return operator[]((U32)n);}
static void initPersistFields();
//static void consoleInit();
DECLARE_CONOBJECT(GPassport);
};//class GPassport
/////////////////////////////////////////////////////////
inline GPlayer*& GPassport::operator[](U32 nIndex)
{
AssertWarn(nIndex < RPG_PC_MAX,"超出了可玩人物最大数");
return m_arPlayers[nIndex];
}
inline const GPlayer*& GPassport::operator[](U32 nIndex) const
{
AssertWarn(nIndex < RPG_PC_MAX,"超出了可玩人物最大数");
return (const GPlayer*&) m_arPlayers[nIndex];
}
};//namespace RPG
#endif //_RPG__GPASSPORT_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -