Murl Engine Lua Addon API  Version 1.0 beta
Murl.Logic.IProcessor

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.


Table members

Methods


SetAppProcessor(appProcessor)

Set the processor callback object.

Boolean SetAppProcessor(Murl.SharedPointer.LogicIAppProcessor appProcessor)

Parameters
appProcessorThe processor callback object.
Returns
Boolean true if successful.

IsInitialized()

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.

Boolean IsInitialized()

Returns
Boolean true if the processor is initialized.

IsDeInitialized()

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.

Boolean IsDeInitialized()

Returns
Boolean true if the processor is deinitialized.

SetEnabled(isEnabled)

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.

SetEnabled(Boolean isEnabled)

Parameters
isEnabledtrue for enable, false for disable.

SetChildrenEnabled(isEnabled)

Set the Enable/Disable state for all child processors. Call SetEnabled() for all child processors.

SetChildrenEnabled(Boolean isEnabled)

Parameters
isEnabledtrue for enable, false for disable.

IsEnabled()

Check if the processor is enabled.

Boolean IsEnabled()

Returns
Boolean true if enabled.

AddChild(processor)

Add a child processor. Add a given processor as the next child of the current processor.

Boolean AddChild(Murl.SharedPointer.LogicIProcessor processor)

Parameters
processorThe processor object to add.
Returns
Boolean true if successful.

RemoveChild(processor)

Remove a child processor. Remove the first instance of a given processor node from this processor's children.

Boolean RemoveChild(Murl.SharedPointer.LogicIProcessor processor)

Parameters
processorThe processor object to remove.
Returns
Boolean true if successful.

InitAddChild(state, processor)

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.

Boolean InitAddChild(Murl.Logic.IState state, Murl.SharedPointer.LogicIProcessor processor)

Parameters
stateThe IState object.
processorThe processor object to initialize and add.
Returns
Boolean true if successful.

RemoveDeInitChild(state, processor)

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.

Boolean RemoveDeInitChild(Murl.Logic.IState state, Murl.SharedPointer.LogicIProcessor processor)

Parameters
stateThe IState object.
processorThe processor object to remove and deinitialize.
Returns
Boolean true if successful.

GetNumberOfChildren()

Get the number of childen.

Integer GetNumberOfChildren()

Returns
Integer The number of children.

GetChild(index)

Get a child processor by index. A valid index is [0 .. GetNumberOfChildren() - 1].

Murl.SharedPointer.LogicIProcessor GetChild(Integer index)

Parameters
indexThe zero-based index of the child processor.
Returns
Murl.SharedPointer.LogicIProcessor The child processor object or null if the index is out of range.

AddStepable(stepable)

Add a stepable object to the processor's stepable observer. See IStepableObserver::Add().

Boolean AddStepable(Murl.SharedPointer.LogicIStepable stepable)

Parameters
stepableThe stepable object to add.
Returns
Boolean true if successful.

RemoveStepable(stepable)

Remove a stepable object from the processor's stepable observer. See IStepableObserver::Remove().

Boolean RemoveStepable(Murl.SharedPointer.LogicIStepable stepable)

Parameters
stepableThe stepable object to remove.
Returns
Boolean true if successful.

GetStepableObserver()

Get the processor's stepable observer object.

Murl.SharedPointer.LogicIStepableObserver GetStepableObserver()

Returns
Murl.SharedPointer.LogicIStepableObserver The processor's IStepableObserver object.

AddGraphNode(observableNode)

Add a observable node object to the processor's node observer. See INodeObserver::Add().

Boolean AddGraphNode(Murl.SharedPointer.LogicIObservableNode observableNode)

Parameters
observableNodeThe observable node object to add.
Returns
Boolean true if successful.

RemoveGraphNode(observableNode)

Remove a observable node object from the processor's node observer. See INodeObserver::Remove().

Boolean RemoveGraphNode(Murl.SharedPointer.LogicIObservableNode observableNode)

Parameters
observableNodeThe observable node object to remove.
Returns
Boolean true if successful.

AreGraphNodesValid()

Check if all observed nodes are valid. See INodeObserver::AreValid().

Boolean AreGraphNodesValid()

Returns
Boolean true if all observed nodes are valid.

GetNodeObserver()

Get the processor's node observer object.

Murl.SharedPointer.LogicINodeObserver GetNodeObserver()

Returns
Murl.SharedPointer.LogicINodeObserver The processor's INodeObserver object.