The IProcessor interface. More...
#include "murl_logic_i_processor.h"
Public Member Functions | |
virtual Bool | SetAppProcessor (IAppProcessorPtr appProcessor)=0 |
Set the processor callback object. More... | |
virtual Bool | IsInitialized () const =0 |
Check if the processor is initialized. More... | |
virtual Bool | IsDeInitialized () const =0 |
Check if the processor is deinitialized. More... | |
virtual void | SetEnabled (Bool isEnabled)=0 |
Set the Enable/Disable state of the processor. More... | |
virtual void | SetChildrenEnabled (Bool isEnabled)=0 |
Set the Enable/Disable state for all child processors. More... | |
virtual Bool | IsEnabled () const =0 |
Check if the processor is enabled. More... | |
virtual Bool | AddChild (IProcessorPtr processor)=0 |
Add a child processor. More... | |
virtual Bool | RemoveChild (IProcessorPtr processor)=0 |
Remove a child processor. More... | |
virtual Bool | InitAddChild (const IState *state, IProcessorPtr processor)=0 |
Initialize and add a child processor. More... | |
virtual Bool | RemoveDeInitChild (const IState *state, IProcessorPtr processor)=0 |
Remove and deinitialize a child processor. More... | |
virtual UInt32 | GetNumberOfChildren () const =0 |
Get the number of childen. More... | |
virtual IProcessorPtr | GetChild (UInt32 index) const =0 |
Get a child processor by index. More... | |
virtual Bool | AddStepable (IStepablePtr stepable)=0 |
Add a stepable object to the processor's stepable observer. More... | |
virtual Bool | RemoveStepable (IStepablePtr stepable)=0 |
Remove a stepable object from the processor's stepable observer. More... | |
virtual IStepableObserverPtr | GetStepableObserver () const =0 |
Get the processor's stepable observer object. More... | |
virtual Bool | AddGraphNode (IObservableNodePtr observableNode)=0 |
Add a observable node object to the processor's node observer. More... | |
virtual Bool | RemoveGraphNode (IObservableNodePtr observableNode)=0 |
Remove a observable node object from the processor's node observer. More... | |
virtual Bool | AreGraphNodesValid () const =0 |
Check if all observed nodes are valid. More... | |
virtual INodeObserverPtr | GetNodeObserver () const =0 |
Get the processor's node observer object. More... | |
Public Member Functions inherited from Murl::Logic::IEngineProcessor | |
virtual Bool | Init (const IState *state)=0 |
Initialze the processor. More... | |
virtual Bool | DeInit (const IState *state)=0 |
Deinitialze the processor. More... | |
virtual void | ProcessTick (const IState *state)=0 |
Execute a logic tick. More... | |
virtual void | ProcessFrame (const IState *state)=0 |
Execute a frame tick. More... | |
virtual void | FinishTick (const IState *state)=0 |
Finish a logic tick. More... | |
virtual void | FinishFrame (const IState *state)=0 |
Finish a frame tick. More... | |
virtual void | PackageWillBeLoaded (const IState *state, IPackage *package)=0 |
Report the beginning of package loading. More... | |
virtual void | PackageWasLoaded (const IState *state, IPackage *package)=0 |
Report the succesful loading of a package. More... | |
virtual void | PackageFailedLoading (const IState *state, IPackage *package)=0 |
Report failed loading a package. More... | |
virtual void | PackageWillBeUnloaded (const IState *state, IPackage *package)=0 |
Report the beginning of package unloading. More... | |
virtual void | PackageWasUnloaded (const IState *state, IPackage *package)=0 |
Report the succesful unloading of a package. More... | |
virtual void | PackageFailedUnloading (const IState *state, IPackage *package)=0 |
Report failed unloading a package. More... | |
virtual void | RunStateChanged (const IState *state, IEnums::AppRunState currentState, IEnums::AppRunState previousState)=0 |
Report a change of the application run state. More... | |
Detailed Description
The IProcessor interface.
The IProcessor implements the IEngineProcessor interface including:
- IAppProcessor callbacks.
- Child processing of IProcessor objects.
- A IStepableObserver object.
- A INodeObserver object.
The following is performed on the IEngineProcessor interface:
- Init() Execute IStepableObserver::Reset(), IAppProcessor::OnInit(), INodeObserver::AreValid() and IEngineProcessor::Init() for all children.
- DeInit() Execute IAppProcessor::OnDeInit(), INodeObserver::RemoveAll(), IStepableObserver::RemoveAll() and IEngineProcessor::DeInit() for all children.
- ProcessTick() Execute IStepableObserver::ProcessTick(), IAppProcessor::OnProcessTick(), IEngineProcessor::ProcessTick() for all children and IAppProcessor::OnProcessTickChildren().
- ProcessFrame() Execute IAppProcessor::OnProcessFrame(), IEngineProcessor::ProcessFrame() for all children and IAppProcessor::OnProcessFrameChildren().
- PackageWillBeLoaded() Execute IAppProcessor::OnPackageWillBeLoaded() and IEngineProcessor::PackageWillBeLoaded() for all children.
- PackageWasLoaded() Execute IAppProcessor::OnPackageWasLoaded() and IEngineProcessor::PackageWasLoaded() for all children.
- PackageFailedLoading() Execute IAppProcessor::OnPackageFailedLoading() and IEngineProcessor::PackageFailedLoading() for all children.
- PackageWillBeUnloaded() Execute IAppProcessor::OnPackageWillBeUnloaded() and IEngineProcessor::PackageWillBeUnloaded() for all children.
- PackageWasUnloaded() Execute IAppProcessor::OnPackageWasUnloaded() and IEngineProcessor::PackageWasUnloaded() for all children.
- PackageFailedUnloading() Execute IAppProcessor::OnPackageFailedUnloading() and IEngineProcessor::PackageFailedUnloading() for all children.
- RunStateChanged() Execute IAppProcessor::OnRunStateChanged() and IEngineProcessor::RunStateChanged() for all children.
Member Function Documentation
◆ SetAppProcessor()
|
pure virtual |
Set the processor callback object.
- Parameters
-
appProcessor The processor callback object.
- Returns
- true if successful.
◆ IsInitialized()
|
pure virtual |
Check if the processor is initialized.
IsInitialized() is typically the opposite of IsDeInitialized(), except if initialization fails. In this situation the processor is not initialized and not deinitialized, which means if the initialization fails, the deinitialization sequence is performed to clean-up the unfinished initialization process.
- Returns
- true if the processor is initialized.
◆ IsDeInitialized()
|
pure virtual |
Check if the processor is deinitialized.
IsDeInitialized() is typically the opposite of IsInitialized(), except if initialization fails. In this situation the processor is not initialized and not deinitialized, which means if the initialization fails, the deinitialization sequence is performed to clean-up the unfinished initialization process.
- Returns
- true if the processor is deinitialized.
◆ SetEnabled()
|
pure virtual |
Set the Enable/Disable state of the processor.
A disabled processor skips the IAppProcessor::OnProcessTick(), IAppProcessor::OnProcessFrame(), IStepableObserver::ProcessTick() callback.
SetEnabled performs the following:
- Execute the IStepableObserver::SetEnabled().
- Execute the IAppProcessor::OnSetEnabled() callback method.
- Set the internal enabled state.
The default enabled state is true.- Parameters
-
isEnabled true for enable, false for disable.
◆ SetChildrenEnabled()
|
pure virtual |
Set the Enable/Disable state for all child processors.
Call SetEnabled() for all child processors.
- Parameters
-
isEnabled true for enable, false for disable.
◆ IsEnabled()
|
pure virtual |
Check if the processor is enabled.
- Returns
- true if enabled.
◆ AddChild()
|
pure virtual |
Add a child processor.
Add a given processor as the next child of the current processor.
- Parameters
-
processor The processor object to add.
- Returns
- true if successful.
◆ RemoveChild()
|
pure virtual |
Remove a child processor.
Remove the first instance of a given processor node from this processor's children.
- Parameters
-
processor The processor object to remove.
- Returns
- true if successful.
◆ InitAddChild()
|
pure virtual |
Initialize and add a child processor.
Execute Init() of a given processor and add the given processor as the next child of the current processor. This method is used for adding processors after initialization of the current processor.
- Parameters
-
state The IState object. processor The processor object to initialize and add.
- Returns
- true if successful.
◆ RemoveDeInitChild()
|
pure virtual |
Remove and deinitialize a child processor.
Remove the first instance of a given processor node from this processor's children and execute DeInit() of the given processor. This method is used for removing processors before deinitialization of the current processor.
- Parameters
-
state The IState object. processor The processor object to remove and deinitialize.
- Returns
- true if successful.
◆ GetNumberOfChildren()
|
pure virtual |
Get the number of childen.
- Returns
- The number of children.
◆ GetChild()
|
pure virtual |
Get a child processor by index.
A valid index is [0 .. GetNumberOfChildren() - 1].
- Parameters
-
index The zero-based index of the child processor.
- Returns
- The child processor object or null if the index is out of range.
◆ AddStepable()
|
pure virtual |
Add a stepable object to the processor's stepable observer.
- Parameters
-
stepable The stepable object to add.
- Returns
- true if successful.
◆ RemoveStepable()
|
pure virtual |
Remove a stepable object from the processor's stepable observer.
See IStepableObserver::Remove().
- Parameters
-
stepable The stepable object to remove.
- Returns
- true if successful.
◆ GetStepableObserver()
|
pure virtual |
Get the processor's stepable observer object.
- Returns
- The processor's IStepableObserver object.
◆ AddGraphNode()
|
pure virtual |
Add a observable node object to the processor's node observer.
See INodeObserver::Add().
- Parameters
-
observableNode The observable node object to add.
- Returns
- true if successful.
◆ RemoveGraphNode()
|
pure virtual |
Remove a observable node object from the processor's node observer.
- Parameters
-
observableNode The observable node object to remove.
- Returns
- true if successful.
◆ AreGraphNodesValid()
|
pure virtual |
Check if all observed nodes are valid.
See INodeObserver::AreValid().
- Returns
- true if all observed nodes are valid.
◆ GetNodeObserver()
|
pure virtual |
Get the processor's node observer object.
- Returns
- The processor's INodeObserver object.
The documentation for this interface was generated from the following file:
- murl_logic_i_processor.h