| 
    NSMBW-Decomp
    
   A decompilation of New Super Mario Bros. Wii 
   | 
 
#include <game/sLib/s_StateMethod.hpp>
A class that handles state execution and transition.
[Presumably, sStateMethod_c actually means "methods for state interaction", or something like that].
Definition at line 7 of file s_StateMethod.hpp.
Public Member Functions | |
| sStateMethod_c (sStateIDChkIf_c &checker, sStateFctIf_c &factory, const sStateIDIf_c &initialState) | |
| Constructs a new sStateMethod_c instance.   | |
| virtual | ~sStateMethod_c () | 
| Destroys the sStateMethod_c instance.   | |
| virtual void | initializeStateMethod () | 
| Initializes the current state.      | |
| virtual void | executeStateMethod () | 
| Executes the current state.      | |
| virtual void | finalizeStateMethod () | 
| Prepares the current state for termination.      | |
| virtual void | changeStateMethod (const sStateIDIf_c &newStateID) | 
| Transitions to a new state ID.      | |
| virtual void | refreshStateMethod () | 
| Marks the current state to be executed again.      | |
| virtual sStateIf_c * | getState () const | 
| Gets the state holder.      | |
| virtual const sStateIDIf_c * | getNewStateID () const | 
| Gets the next state ID.      | |
| virtual const sStateIDIf_c * | getStateID () const | 
| Gets the current state ID.      | |
| virtual const sStateIDIf_c * | getOldStateID () const | 
| Gets the previous state ID.      | |
| virtual int | initializeStateLocalMethod ()=0 | 
| Performs the actual state initialization.   | |
| virtual void | executeStateLocalMethod ()=0 | 
| Performs the actual state execution.   | |
| virtual void | finalizeStateLocalMethod ()=0 | 
| Performs the actual state termination.   | |
| virtual void | changeStateLocalMethod (const sStateIDIf_c &newStateID)=0 | 
| Performs the actual state transition.   | |
Protected Attributes | |
| sStateIDChkIf_c & | mpStateChk | 
| The state checker to use.   | |
| sStateFctIf_c & | mpStateFct | 
| The state factory which produces the state holder.   | |
| bool | mInitFinalizeLock | 
| A lock to ensure initializeStateMethod and finalizeStateMethod are not called recursively.   | |
| bool | mExecutionLock | 
| A lock to ensure executeStateMethod is not called recursively.   | |
| bool | mIsValid | 
| If the state holder contains a valid state ID.   | |
| bool | mStateChanged | 
| If the current state has changed during execution.   | |
| bool | mRefreshStateMethod | 
| True, if after a state transition, the state should be executed again.   | |
| const sStateIDIf_c * | mpNewStateID | 
| The next state ID.   | |
| const sStateIDIf_c * | mpOldStateID | 
| The previous state ID.   | |
| const sStateIDIf_c * | mpStateID | 
| The current state ID.   | |
| sStateIf_c * | mpState | 
| The current state holder.   | |
| sStateMethod_c::sStateMethod_c | ( | sStateIDChkIf_c & | checker, | 
| sStateFctIf_c & | factory, | ||
| const sStateIDIf_c & | initialState ) | 
Constructs a new sStateMethod_c instance.
| checker | The state checker to use. | 
| factory | The state factory to use. | 
| initialState | The initial state ID of this instance. | 
Definition at line 6 of file s_StateMethod.cpp.
      
  | 
  virtual | 
Destroys the sStateMethod_c instance.
Definition at line 20 of file s_StateMethod.cpp.
      
  | 
  virtual | 
Initializes the current state.
Definition at line 22 of file s_StateMethod.cpp.
      
  | 
  virtual | 
Executes the current state.
Definition at line 38 of file s_StateMethod.cpp.
      
  | 
  virtual | 
Prepares the current state for termination.
Definition at line 52 of file s_StateMethod.cpp.
      
  | 
  virtual | 
Transitions to a new state ID.
Definition at line 64 of file s_StateMethod.cpp.
      
  | 
  inlinevirtual | 
Marks the current state to be executed again.
Definition at line 23 of file s_StateMethod.hpp.
      
  | 
  inlinevirtual | 
Gets the state holder.
Definition at line 24 of file s_StateMethod.hpp.
      
  | 
  inlinevirtual | 
Gets the next state ID.
Definition at line 25 of file s_StateMethod.hpp.
      
  | 
  inlinevirtual | 
Gets the current state ID.
Definition at line 26 of file s_StateMethod.hpp.
      
  | 
  inlinevirtual | 
Gets the previous state ID.
Definition at line 27 of file s_StateMethod.hpp.
      
  | 
  pure virtual | 
Performs the actual state initialization.
Implemented in sStateMethodUsr_FI_c.
      
  | 
  pure virtual | 
Performs the actual state execution.
Implemented in sStateMethodUsr_FI_c.
      
  | 
  pure virtual | 
Performs the actual state termination.
Implemented in sStateMethodUsr_FI_c.
      
  | 
  pure virtual | 
Performs the actual state transition.
Implemented in sStateMethodUsr_FI_c.
      
  | 
  protected | 
The state checker to use.
Definition at line 35 of file s_StateMethod.hpp.
      
  | 
  protected | 
The state factory which produces the state holder.
Definition at line 36 of file s_StateMethod.hpp.
      
  | 
  protected | 
A lock to ensure initializeStateMethod and finalizeStateMethod are not called recursively.
Definition at line 38 of file s_StateMethod.hpp.
      
  | 
  protected | 
A lock to ensure executeStateMethod is not called recursively.
Definition at line 39 of file s_StateMethod.hpp.
      
  | 
  protected | 
If the state holder contains a valid state ID.
Definition at line 40 of file s_StateMethod.hpp.
      
  | 
  protected | 
If the current state has changed during execution.
Definition at line 41 of file s_StateMethod.hpp.
      
  | 
  protected | 
True, if after a state transition, the state should be executed again.
Definition at line 42 of file s_StateMethod.hpp.
      
  | 
  protected | 
The next state ID.
Definition at line 44 of file s_StateMethod.hpp.
      
  | 
  protected | 
The previous state ID.
Definition at line 45 of file s_StateMethod.hpp.
      
  | 
  protected | 
The current state ID.
Definition at line 46 of file s_StateMethod.hpp.
      
  | 
  protected | 
The current state holder.
Definition at line 48 of file s_StateMethod.hpp.