|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/sLib/s_FStateID.hpp>
An implementation of a state ID for a given class.
It adds the ability to call the three state methods on a state owner class.
| T | The class that this state belongs to. |
Definition at line 10 of file s_FStateID.hpp.
Public Types | |
| typedef void(T::* | stateFunc) () |
Public Member Functions | |
| sFStateID_c (const char *name, stateFunc initialize, stateFunc execute, stateFunc finalize) | |
| Constructs a new sFStateID_c instance. | |
| virtual bool | isSameName (const char *otherName) const |
| Returns true if the given name matches this state ID's name. | |
| virtual void | initializeState (T &owner) const |
| Calls the initialize method on the owner. | |
| virtual void | executeState (T &owner) const |
| Calls the execute method on the owner. | |
| virtual void | finalizeState (T &owner) const |
| Calls the finalize method on the owner. | |
Public Member Functions inherited from sStateID_c | |
| sStateID_c (const char *name) | |
| virtual bool | isNull () const |
| Returns whether this is a null state. | |
| virtual bool | isEqual (const sStateIDIf_c &other) const |
| Returns whether both states have the same number. | |
| virtual int | operator== (const sStateIDIf_c &other) const |
| Overloaded equality operator, using isEqual. | |
| virtual int | operator!= (const sStateIDIf_c &other) const |
| Overloaded inequality operator, using isEqual. | |
| virtual const char * | name () const |
| Returns the name of this state ID. | |
| virtual unsigned int | number () const |
| Returns the number of this state ID. | |
Private Attributes | |
| stateFunc | mpInitialize |
| The initialize method for this state ID. | |
| stateFunc | mpExecute |
| The execute method for this state ID. | |
| stateFunc | mpFinalize |
| The finalize method for this state ID. | |
Additional Inherited Members | |
Protected Attributes inherited from sStateID_c | |
| const char * | mpName |
| The name of this state ID. | |
| unsigned int | mNumber |
| The number of this state ID. | |
Static Protected Attributes inherited from sStateID_c | |
| static NumberMemo_c | sm_numberMemo |
| Used to give each state a unique number. | |
| typedef void(T::* sFStateID_c< T >::stateFunc) () |
Definition at line 12 of file s_FStateID.hpp.
|
inline |
Constructs a new sFStateID_c instance.
| name | The name of this state ID. |
| initialize | The initialize method for this state ID. |
| execute | The execute method for this state ID. |
| finalize | The finalize method for this state ID. |
Definition at line 22 of file s_FStateID.hpp.
|
inlinevirtual |
Returns true if the given name matches this state ID's name.
Reimplemented from sStateID_c.
Definition at line 29 of file s_FStateID.hpp.
|
inlinevirtual |
Calls the initialize method on the owner.
| owner | The owner of this state ID. |
Definition at line 44 of file s_FStateID.hpp.
|
inlinevirtual |
Calls the execute method on the owner.
| owner | The owner of this state ID. |
Definition at line 48 of file s_FStateID.hpp.
|
inlinevirtual |
Calls the finalize method on the owner.
| owner | The owner of this state ID. |
Definition at line 52 of file s_FStateID.hpp.
|
private |
The initialize method for this state ID.
Definition at line 55 of file s_FStateID.hpp.
|
private |
The execute method for this state ID.
Definition at line 56 of file s_FStateID.hpp.
|
private |
The finalize method for this state ID.
Definition at line 57 of file s_FStateID.hpp.