NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
sFState_c< T > Class Template Reference

#include <dol/sLib/s_FState.hpp>

Inheritance diagram for sFState_c< T >:
[legend]

Description

template<class T>
class sFState_c< T >

A state holder for a given class.

Template Parameters
TThe class that this state belongs to.

Definition at line 9 of file s_FState.hpp.

Public Types

enum  STATE_ACTION_e {
  INITIALIZE ,
  EXECUTE ,
  FINALIZE
}
 

Public Member Functions

 sFState_c (T &owner)
 
void performAction (STATE_ACTION_e action)
 Performs a state action.
 
virtual void initialize ()
 Initializes the state.
 
virtual void execute ()
 Executes the state.
 
virtual void finalize ()
 Prepares the state for termination.
 
void setID (const sFStateID_c< T > *id)
 
virtual const void initialize ()=0
 Initializes the state.
 
virtual const void execute ()=0
 Executes the state.
 
virtual const void finalize ()=0
 Prepares the state for termination.
 

Private Attributes

T & mpOwner
 The owner of this state.
 
const sFStateID_c< T > * mpID
 The state ID that runs the state methods.
 

Member Enumeration Documentation

◆ STATE_ACTION_e

template<class T >
enum sFState_c::STATE_ACTION_e

Definition at line 13 of file s_FState.hpp.

Constructor & Destructor Documentation

◆ sFState_c()

template<class T >
sFState_c< T >::sFState_c ( T &  owner)
inline

Definition at line 11 of file s_FState.hpp.

Member Function Documentation

◆ performAction()

template<class T >
void sFState_c< T >::performAction ( STATE_ACTION_e  action)
inline

Performs a state action.

[Gets inlined, needed for function order to match].

Parameters
actionThe action to perform.

Definition at line 22 of file s_FState.hpp.

◆ initialize()

template<class T >
virtual void sFState_c< T >::initialize ( )
inlinevirtual

Initializes the state.

Implements sStateIf_c.

Definition at line 32 of file s_FState.hpp.

◆ execute()

template<class T >
virtual void sFState_c< T >::execute ( )
inlinevirtual

Executes the state.

Implements sStateIf_c.

Definition at line 33 of file s_FState.hpp.

◆ finalize()

template<class T >
virtual void sFState_c< T >::finalize ( )
inlinevirtual

Prepares the state for termination.

Implements sStateIf_c.

Definition at line 34 of file s_FState.hpp.

◆ setID()

template<class T >
void sFState_c< T >::setID ( const sFStateID_c< T > *  id)
inline

Definition at line 36 of file s_FState.hpp.

Member Data Documentation

◆ mpOwner

template<class T >
T& sFState_c< T >::mpOwner
private

The owner of this state.

Definition at line 39 of file s_FState.hpp.

◆ mpID

template<class T >
const sFStateID_c<T>* sFState_c< T >::mpID
private

The state ID that runs the state methods.

Definition at line 40 of file s_FState.hpp.