Murl::Logic::IStage Interface Referenceabstract

The IStage interface. More...

#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 StringGetStageId () const =0
 Get the stage identifier. More...
 
virtual void SetSwitchId (const String &switchId)=0
 Set the graph switch child identifier. More...
 
virtual const StringGetSwitchId () 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()

virtual IProcessorPtr Murl::Logic::IStage::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()

virtual void Murl::Logic::IStage::SetStageProcessing ( StageProcessing  processing)
pure virtual

Set the stage processing sequence.

Parameters
processingThe stage processing sequence.

◆ GetStageProcessing()

virtual StageProcessing Murl::Logic::IStage::GetStageProcessing ( ) const
pure virtual

Get the stage processing sequence.

Returns
The stage processing sequence.

◆ SetAppStage()

virtual Bool Murl::Logic::IStage::SetAppStage ( IAppStagePtr  appStage)
pure virtual

Set the stage callback object.

Parameters
appStageThe stage callback object.
Returns
true if successful.

◆ SetStageId()

virtual void Murl::Logic::IStage::SetStageId ( const String stageId)
pure virtual

Set the stage identifier.

The stage identifier is used by the IStageProcessor to select stages by string identifier.

Parameters
stageIdThe stage identifier.

◆ GetStageId()

virtual const String& Murl::Logic::IStage::GetStageId ( ) const
pure virtual

Get the stage identifier.

Returns
The stage identifier string.

◆ SetSwitchId()

virtual void Murl::Logic::IStage::SetSwitchId ( const String switchId)
pure virtual

Set the graph switch child identifier.

See IStageProcessor description.

Parameters
switchIdThe graph switch child identifier.

◆ GetSwitchId()

virtual const String& Murl::Logic::IStage::GetSwitchId ( ) const
pure virtual

Get the graph switch child identifier.

Returns
The graph switch child identifier.

◆ SetRunState()

virtual void Murl::Logic::IStage::SetRunState ( RunState  runState)
pure virtual

Set the current run state.

Parameters
runStateThe run state to set.

◆ IsRunState()

virtual Bool Murl::Logic::IStage::IsRunState ( RunState  runState) const
pure virtual

Check the current run state.

Parameters
runStateThe run state to compare.
Returns
true if the current run state is equal.

◆ GetRunState()

virtual RunState Murl::Logic::IStage::GetRunState ( ) const
pure virtual

Get the current run state.

Returns
The current run state.

◆ StartStageIntro()

virtual Bool Murl::Logic::IStage::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()

virtual Bool Murl::Logic::IStage::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()

virtual Bool Murl::Logic::IStage::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()

virtual Bool Murl::Logic::IStage::IsStageStopped ( ) const
pure virtual

Check if stage is stopped.

Returns
true if run state is RUN_STATE_STOP.

◆ CreateStageTimeline()

virtual Bool Murl::Logic::IStage::CreateStageTimeline ( const IState state,
const String timeline,
Real  introTime,
Real  outroTime 
)
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
stateThe IState object.
timelineThe full path to the graph <Timeline> instance.
introTimeThe intro end time in seconds,
outroTimeThe outro end time in seconds,
Returns
true if successful.

◆ SetStageTimeline()

virtual Bool Murl::Logic::IStage::SetStageTimeline ( IStageTimelinePtr  stageTimeline)
pure virtual

Set the IStageTimeline object.

The IStageTimeline object is not affected by DeInitStage().

Parameters
stageTimelineAn initialized IStageTimeline object.
Returns
true if successful.

◆ GetStageTimeline()

virtual IStageTimelinePtr Murl::Logic::IStage::GetStageTimeline ( ) const
pure virtual

Get the IStageTimeline object.

Returns
The IStageTimeline object, or null if not available.

◆ InitStage()

virtual Bool Murl::Logic::IStage::InitStage ( const IState state,
IStageProcessor stageProcessor 
)
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
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.
Returns
true if successful.

◆ DeInitStage()

virtual Bool Murl::Logic::IStage::DeInitStage ( const IState state,
IStageProcessor stageProcessor 
)
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
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.
Returns
true if successful.

◆ ProcessStageTick()

virtual void Murl::Logic::IStage::ProcessStageTick ( const IState state,
IStageProcessor stageProcessor 
)
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
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

◆ ProcessStageFrame()

virtual void Murl::Logic::IStage::ProcessStageFrame ( const IState state,
IStageProcessor stageProcessor 
)
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
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

◆ FinishStageTick()

virtual void Murl::Logic::IStage::FinishStageTick ( const IState state,
IStageProcessor stageProcessor 
)
pure virtual

Finish a logic tick.

This method is typically used by the corresponding IStageProcessor.

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

◆ FinishStageFrame()

virtual void Murl::Logic::IStage::FinishStageFrame ( const IState state,
IStageProcessor stageProcessor 
)
pure virtual

Finish a frame tick.

This method is typically used by the corresponding IStageProcessor.

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

◆ ProcessStageTickSelf()

virtual void Murl::Logic::IStage::ProcessStageTickSelf ( const IState state,
IStageProcessor stageProcessor 
)
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
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

◆ ProcessStageFrameSelf()

virtual void Murl::Logic::IStage::ProcessStageFrameSelf ( const IState state,
IStageProcessor stageProcessor 
)
pure virtual

Execute a IAppStage frame tick.

This method is typically used by IStage::ProcessStageFrame() method.
Execute the IAppStage::OnProcessStageFrame() method.

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

◆ FinishStageTickSelf()

virtual void Murl::Logic::IStage::FinishStageTickSelf ( const IState state,
IStageProcessor stageProcessor 
)
pure virtual

Finish a IAppStage logic tick.

This method is typically used by IStage::ProcessStageTick() method.

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

◆ FinishStageFrameSelf()

virtual void Murl::Logic::IStage::FinishStageFrameSelf ( const IState state,
IStageProcessor stageProcessor 
)
pure virtual

Finish a IAppStage frame tick.

This method is typically used by IStage::ProcessStageFrame() method.

Parameters
stateThe IState object.
stageProcessorThe corresponding IStageProcessor object.

The documentation for this interface was generated from the following file:
  • murl_logic_i_stage.h


Copyright © 2011-2024 Spraylight GmbH.