XII Release 0.1.0
Loading...
Searching...
No Matches
xiiStateMachineState_Compound Class Reference

A state machine state implementation that combines multiple sub states into one. More...

#include <StateMachineBuiltins.h>

Inheritance diagram for xiiStateMachineState_Compound:
[legend]

Public Member Functions

 xiiStateMachineState_Compound (xiiStringView sName=xiiStringView())
 
virtual void OnEnter (xiiStateMachineInstance &ref_instance, void *pInstanceData, const xiiStateMachineState *pFromState) const override
 
virtual void OnExit (xiiStateMachineInstance &ref_instance, void *pInstanceData, const xiiStateMachineState *pToState) const override
 
virtual void Update (xiiStateMachineInstance &ref_instance, void *pInstanceData, xiiTime deltaTime) const override
 
virtual xiiResult Serialize (xiiStreamWriter &inout_stream) const override
 
virtual xiiResult Deserialize (xiiStreamReader &inout_stream) override
 
virtual bool GetInstanceDataDesc (xiiInstanceDataDesc &out_desc) override
 Returns whether this state needs additional instance data and if so fills the out_desc.
 
- Public Member Functions inherited from xiiStateMachineState
 xiiStateMachineState (xiiStringView sName=xiiStringView())
 
void SetName (xiiStringView sName)
 
xiiStringView GetName () const
 
const xiiHashedStringGetNameHashed () const
 
- Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Public Attributes

xiiSmallArray< xiiStateMachineState *, 2 > m_SubStates
 

Additional Inherited Members

- Static Public Member Functions inherited from xiiNoBase
static const xiiRTTIGetStaticRTTI ()
 

Detailed Description

A state machine state implementation that combines multiple sub states into one.

Can be used to build states in a more modular way. All calls are simply redirected to all sub states, e.g. when entered it calls OnEnter on all its sub states.

Member Function Documentation

◆ Deserialize()

xiiResult xiiStateMachineState_Compound::Deserialize ( xiiStreamReader & inout_stream)
overridevirtual

Reimplemented from xiiStateMachineState.

◆ GetInstanceDataDesc()

bool xiiStateMachineState_Compound::GetInstanceDataDesc ( xiiInstanceDataDesc & out_desc)
overridevirtual

Returns whether this state needs additional instance data and if so fills the out_desc.

See also
xiiStateMachineInstanceDataDesc

Reimplemented from xiiStateMachineState.

◆ OnEnter()

void xiiStateMachineState_Compound::OnEnter ( xiiStateMachineInstance & ref_instance,
void * pInstanceData,
const xiiStateMachineState * pFromState ) const
overridevirtual

Implements xiiStateMachineState.

◆ OnExit()

void xiiStateMachineState_Compound::OnExit ( xiiStateMachineInstance & ref_instance,
void * pInstanceData,
const xiiStateMachineState * pToState ) const
overridevirtual

Reimplemented from xiiStateMachineState.

◆ Serialize()

xiiResult xiiStateMachineState_Compound::Serialize ( xiiStreamWriter & inout_stream) const
overridevirtual

Reimplemented from xiiStateMachineState.

◆ Update()

void xiiStateMachineState_Compound::Update ( xiiStateMachineInstance & ref_instance,
void * pInstanceData,
xiiTime deltaTime ) const
overridevirtual

Reimplemented from xiiStateMachineState.


The documentation for this class was generated from the following files: