diff options
Diffstat (limited to '')
-rw-r--r-- | include/statelib.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/include/statelib.h b/include/statelib.h index 34ab282..c039934 100644 --- a/include/statelib.h +++ b/include/statelib.h @@ -1,21 +1,21 @@ /******************************************************************************/ -// StateBase class +// dStateBase_c class /******************************************************************************/ -class StateBase { +class dStateBase_c { public: - StateBase(const char *name); + dStateBase_c(const char *name); - virtual ~StateBase(); + virtual ~dStateBase_c(); virtual bool isInvalid(); - virtual bool isEqualNotUsedForSomeReason(StateBase *another); - virtual bool isEqual(StateBase *another); - virtual bool isNotEqual(StateBase *another); + virtual bool isEqualNotUsedForSomeReason(dStateBase_c *another); + virtual bool isEqual(dStateBase_c *another); + virtual bool isNotEqual(dStateBase_c *another); virtual bool isSameStateName(const char *name); virtual const char *getName(); virtual int getID(); - static StateBase mNoState; + static dStateBase_c mNoState; private: const char *mName; @@ -25,21 +25,21 @@ private: }; /******************************************************************************/ -// State<TOwner> : StateBase class +// dState_c<TOwner> : dStateBase_c class /******************************************************************************/ template <class TOwner> -class State : public StateBase { +class dState_c : public dStateBase_c { public: typedef void (TOwner::*funcPtr)(); - State(const char *name, funcPtr begin, funcPtr execute, funcPtr end) : StateBase(name) { + dState_c(const char *name, funcPtr begin, funcPtr execute, funcPtr end) : dStateBase_c(name) { mBegin = begin; mExecute = execute; mEnd = end; } - ~State(); + ~dState_c(); bool isSameStateName(const char *name); virtual void doBegin(TOwner *owner); @@ -52,10 +52,10 @@ public: }; template <class TOwner> -State<TOwner>::~State() { } +dState_c<TOwner>::~dState_c() { } template <class TOwner> -bool State<TOwner>::isSameStateName(const char *name) { +bool dState_c<TOwner>::isSameStateName(const char *name) { const char *p = strrchr(name, ':'); if (p) name = p + 1; @@ -68,64 +68,64 @@ bool State<TOwner>::isSameStateName(const char *name) { } template <class TOwner> -void State<TOwner>::doBegin(TOwner *owner) { +void dState_c<TOwner>::doBegin(TOwner *owner) { (owner->*mBegin)(); } template <class TOwner> -void State<TOwner>::doExecute(TOwner *owner) { +void dState_c<TOwner>::doExecute(TOwner *owner) { (owner->*mExecute)(); } template <class TOwner> -void State<TOwner>::doEnd(TOwner *owner) { +void dState_c<TOwner>::doEnd(TOwner *owner) { (owner->*mEnd)(); } /******************************************************************************/ -// StateMgrBase class +// dStateMgrBase_c class /******************************************************************************/ -class StateMgrBase { +class dStateMgrBase_c { public: - StateMgrBase(void *one, void *two, StateBase *pInitState); + dStateMgrBase_c(void *one, void *two, dStateBase_c *pInitState); - virtual ~StateMgrBase(); + virtual ~dStateMgrBase_c(); virtual void _vf0C(); virtual void execute(); virtual void _vf14(); - virtual void setState(StateBase *pNewState); + virtual void setState(dStateBase_c *pNewState); virtual void setField10ToOne(); - virtual StateBase *getField20(); - virtual StateBase *getField14(); - virtual StateBase *getCurrentState_maybe(); - virtual StateBase *getField18(); + virtual dStateBase_c *getField20(); + virtual dStateBase_c *getField14(); + virtual dStateBase_c *getCurrentState_maybe(); + virtual dStateBase_c *getField18(); virtual bool _vf30() = 0; virtual void _vf34() = 0; virtual void _vf38() = 0; - virtual void _vf3C(StateBase *pState) = 0; + virtual void _vf3C(dStateBase_c *pState) = 0; private: void *m04, *m08; bool m0C, m0D, m0E, m0F, m10; - StateBase *m14, *m18, *m1C; - StateBase *m20; // maybe not a StateBase? + dStateBase_c *m14, *m18, *m1C; + dStateBase_c *m20; // maybe not a dStateBase_c? }; /******************************************************************************/ -// StateMgr<TOwner> : StateMgrBase class +// dStateMgr_c<TOwner> : dStateMgrBase_c class /******************************************************************************/ template <class TOwner> -class StateMgr : public StateMgrBase { +class dStateMgr_c : public dStateMgrBase_c { public: - StateMgr(void *one, void *two, StateBase *pInitState); - ~StateMgr(); + dStateMgr_c(void *one, void *two, dStateBase_c *pInitState); + ~dStateMgr_c(); bool _vf30(); void _vf34(); void _vf38(); - void _vf3C(StateBase *pState); + void _vf3C(dStateBase_c *pState); }; // TODO: add template methods |