New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
StateMgr.h File Reference

Go to the source code of this file.

Classes

class  StateMgr< T, Factory >

Macros

#define STATE_MGR_BASE_BODY(CLASS, METHOD)

Macro Definition Documentation

◆ STATE_MGR_BASE_BODY

#define STATE_MGR_BASE_BODY ( CLASS,
METHOD )
Value:
public: \
CLASS(T& obj, const StateID& state_id) \
: mFactory(obj) \
, mMethod(mFactory, state_id) \
{ \
} \
\
virtual ~CLASS() \
{ \
} \
\
void executeState() \
{ \
mMethod.executeStateMethod(); \
} \
\
void changeState(const StateID& state_id) \
{ \
mMethod.changeStateMethod(state_id); \
} \
\
IState* getState() const \
{ \
return mMethod.getState(); \
} \
\
const StateID* getNewStateID() const \
{ \
return mMethod.getNewStateID(); \
} \
\
const StateID* getStateID() const \
{ \
return mMethod.getStateID(); \
} \
\
const StateID* getOldStateID() const \
{ \
return mMethod.getOldStateID(); \
} \
\
protected: \
Factory<T> mFactory; \
METHOD mMethod;
Definition StateID.h:6