#include "murl_logic_i_stage.h"
Inherited by Murl::Logic::Stage.
Public Types | |
enum | StageProcessing { BEFORE_STEP , BEFORE_CHILDREN , AFTER_CHILDREN } |
Definiton of the stage processsing sequence. More... | |
enum | RunState { RUN_STATE_STOP , RUN_STATE_BEGIN_INTRO , RUN_STATE_RUN_INTRO , RUN_STATE_BEGIN_RUN , RUN_STATE_RUN , RUN_STATE_BEGIN_OUTRO , RUN_STATE_RUN_OUTRO } |
Definition of RunStates controlled by the IStageProcessor. More... | |
Public Member Functions | |
virtual IProcessorPtr | GetProcessor ()=0 |
Get the processor interface from a stage object. More... | |
virtual void | SetStageProcessing (StageProcessing processing)=0 |
Set the stage processing sequence. More... | |
virtual StageProcessing | GetStageProcessing () const =0 |
Get the stage processing sequence. More... | |
virtual Bool | SetAppStage (IAppStagePtr appStage)=0 |
Set the stage callback object. More... | |
virtual void | SetStageId (const String &stageId)=0 |
Set the stage identifier. More... | |
virtual const String & | GetStageId () const =0 |
Get the stage identifier. More... | |
virtual void | SetSwitchId (const String &switchId)=0 |
Set the graph switch child identifier. More... | |
virtual const String & | GetSwitchId () const =0 |
Get the graph switch child identifier. More... | |
virtual void | SetRunState (RunState runState)=0 |
Set the current run state. More... | |
virtual Bool | IsRunState (RunState runState) const =0 |
Check the current run state. More... | |
virtual RunState | GetRunState () const =0 |
Get the current run state. More... | |
virtual Bool | StartStageIntro ()=0 |
Start a stage intro. More... | |
virtual Bool | StartStageOutro ()=0 |
Start a stage intro. More... | |
virtual Bool | StopStage ()=0 |
Stop the stage. More... | |
virtual Bool | IsStageStopped () const =0 |
Check if stage is stopped. More... | |
virtual Bool | CreateStageTimeline (const IState *state, const String &timeline, Real introTime, Real outroTime)=0 |
Create and initialize the IStageTimeline object. More... | |
virtual Bool | SetStageTimeline (IStageTimelinePtr stageTimeline)=0 |
Set the IStageTimeline object. More... | |
virtual IStageTimelinePtr | GetStageTimeline () const =0 |
Get the IStageTimeline object. More... | |
virtual Bool | InitStage (const IState *state, IStageProcessor *stageProcessor)=0 |
Initialize the stage. More... | |
virtual Bool | DeInitStage (const IState *state, IStageProcessor *stageProcessor)=0 |
Deinitialize the stage. More... | |
virtual void | ProcessStageTick (const IState *state, IStageProcessor *stageProcessor)=0 |
Execute a logic tick. More... | |
virtual void | ProcessStageFrame (const IState *state, IStageProcessor *stageProcessor)=0 |
Execute a frame tick. More... | |
virtual void | FinishStageTick (const IState *state, IStageProcessor *stageProcessor)=0 |
Finish a logic tick. More... | |
virtual void | FinishStageFrame (const IState *state, IStageProcessor *stageProcessor)=0 |
Finish a frame tick. More... | |
virtual void | ProcessStageTickSelf (const IState *state, IStageProcessor *stageProcessor)=0 |
Execute a IAppStage logic tick. More... | |
virtual void | ProcessStageFrameSelf (const IState *state, IStageProcessor *stageProcessor)=0 |
Execute a IAppStage frame tick. More... | |
virtual void | FinishStageTickSelf (const IState *state, IStageProcessor *stageProcessor)=0 |
Finish a IAppStage logic tick. More... | |
virtual void | FinishStageFrameSelf (const IState *state, IStageProcessor *stageProcessor)=0 |
Finish a IAppStage frame tick. More... | |
Detailed Description
The IStage interface.
The IStage is an extended IProcessor containing a run state and an optional IStageTimeline object. An IStage object is controlled by the IStageProcessor.
Additional IProcessor objects can be added to the IStageProcessor object by using myStageProc->GetProcessor(myStageProc)->AddChild(). See also enum StageProcessing.
Member Enumeration Documentation
◆ StageProcessing
Definiton of the stage processsing sequence.
The sequence of calling the IAppStage callbacks and the IAppProcessor callbacks can be controlled.
Enumerator | |
---|---|
BEFORE_STEP | Default, process stage before processor.
|
BEFORE_CHILDREN | Process stage in between processor.
|
AFTER_CHILDREN | Process stage after processor.
|
◆ RunState
Definition of RunStates controlled by the IStageProcessor.
Enumerator | |
---|---|
RUN_STATE_STOP | The idle state.
|
RUN_STATE_BEGIN_INTRO | The begin intro state.
|
RUN_STATE_RUN_INTRO | The run intro state.
|
RUN_STATE_BEGIN_RUN | The begin run state.
|
RUN_STATE_RUN | The run state. |
RUN_STATE_BEGIN_OUTRO | The begin outro state.
|
RUN_STATE_RUN_OUTRO | The run outro state.
|
Member Function Documentation
◆ GetProcessor()
|
pure virtual |
Get the processor interface from a stage object.
The IStage conforms to the IProcessor interface.
- Returns
- The processor interface shared pointer.
◆ SetStageProcessing()
|
pure virtual |
Set the stage processing sequence.
- Parameters
-
processing The stage processing sequence.
◆ GetStageProcessing()
|
pure virtual |
Get the stage processing sequence.
- Returns
- The stage processing sequence.
◆ SetAppStage()
|
pure virtual |
Set the stage callback object.
- Parameters
-
appStage The stage callback object.
- Returns
- true if successful.
◆ SetStageId()
|
pure virtual |
Set the stage identifier.
The stage identifier is used by the IStageProcessor to select stages by string identifier.
- Parameters
-
stageId The stage identifier.
◆ GetStageId()
|
pure virtual |
Get the stage identifier.
- Returns
- The stage identifier string.
◆ SetSwitchId()
|
pure virtual |
Set the graph switch child identifier.
See IStageProcessor description.
- Parameters
-
switchId The graph switch child identifier.
◆ GetSwitchId()
|
pure virtual |
Get the graph switch child identifier.
- Returns
- The graph switch child identifier.
◆ SetRunState()
|
pure virtual |
Set the current run state.
- Parameters
-
runState The run state to set.
◆ IsRunState()
Check the current run state.
- Parameters
-
runState The run state to compare.
- Returns
- true if the current run state is equal.
◆ GetRunState()
|
pure virtual |
Get the current run state.
- Returns
- The current run state.
◆ StartStageIntro()
|
pure virtual |
Start a stage intro.
If the current run state is RUN_STATE_STOP, set the RUN_STATE_BEGIN_INTRO.
- Returns
- true if successful, false if the run state check failed.
◆ StartStageOutro()
|
pure virtual |
Start a stage intro.
If the current run state is not RUN_STATE_STOP, set the RUN_STATE_BEGIN_OUTRO.
- Returns
- true if successful, false if the run state check failed.
◆ StopStage()
|
pure virtual |
Stop the stage.
If the current run state is not RUN_STATE_STOP, set the RUN_STATE_STOP.
(!) IAppStage::OnStop() is not executed.
- Returns
- true if successful, false if the run state check failed.
◆ IsStageStopped()
|
pure virtual |
Check if stage is stopped.
- Returns
- true if run state is RUN_STATE_STOP.
◆ CreateStageTimeline()
|
pure virtual |
Create and initialize the IStageTimeline object.
The IStageTimeline object created is deinitialized and destroyed automatically by DeInitStage().
The intro start time is set to zero, the outro start time is set to the intro end time by default. The intro / outro time can be modified at any time by accessing the IStageTimeline object using GetStageTimeline().
- Parameters
-
state The IState object. timeline The full path to the graph <Timeline> instance. introTime The intro end time in seconds, outroTime The outro end time in seconds,
- Returns
- true if successful.
◆ SetStageTimeline()
|
pure virtual |
Set the IStageTimeline object.
The IStageTimeline object is not affected by DeInitStage().
- Parameters
-
stageTimeline An initialized IStageTimeline object.
- Returns
- true if successful.
◆ GetStageTimeline()
|
pure virtual |
Get the IStageTimeline object.
- Returns
- The IStageTimeline object, or null if not available.
◆ InitStage()
|
pure virtual |
Initialize the stage.
This method is typically used by the corresponding IStageProcessor. Execute IAppProcessor::OnInit(), IAppStage::OnInitStage() and initialization of all processor's children.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
- Returns
- true if successful.
◆ DeInitStage()
|
pure virtual |
Deinitialize the stage.
This method is typically used by the corresponding IStageProcessor. Execute deinitialization of all processor's children, AppStage::OnDeInitStage() and IAppProcessor::OnDeInit().
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
- Returns
- true if successful.
◆ ProcessStageTick()
|
pure virtual |
Execute a logic tick.
This method is typically used by the corresponding IStageProcessor.
Evaluate the StageProcessing state to execute the IProcessor logic tick and the ProcessStageTickSelf() method.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
◆ ProcessStageFrame()
|
pure virtual |
Execute a frame tick.
This method is typically used by the corresponding IStageProcessor.
Evaluate the StageProcessing state to execute the IProcessor frame tick and the ProcessStageFrameSelf() method.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
◆ FinishStageTick()
|
pure virtual |
Finish a logic tick.
This method is typically used by the corresponding IStageProcessor.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
◆ FinishStageFrame()
|
pure virtual |
Finish a frame tick.
This method is typically used by the corresponding IStageProcessor.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
◆ ProcessStageTickSelf()
|
pure virtual |
Execute a IAppStage logic tick.
This method is typically used by IStage::ProcessStageTick() method.
Execute the IAppStage::OnProcessStageTick() method first and afterwards the IAppStage::OnProcessTick[RUN_STATE_STATE] method depending on the current RunState.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
◆ ProcessStageFrameSelf()
|
pure virtual |
Execute a IAppStage frame tick.
This method is typically used by IStage::ProcessStageFrame() method.
Execute the IAppStage::OnProcessStageFrame() method.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
◆ FinishStageTickSelf()
|
pure virtual |
Finish a IAppStage logic tick.
This method is typically used by IStage::ProcessStageTick() method.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
◆ FinishStageFrameSelf()
|
pure virtual |
Finish a IAppStage frame tick.
This method is typically used by IStage::ProcessStageFrame() method.
- Parameters
-
state The IState object. stageProcessor The corresponding IStageProcessor object.
The documentation for this interface was generated from the following file:
- murl_logic_i_stage.h