![]() |
Murl Engine API
Version 2018.3
|
Template class controlling multiple replications created by XML <Instance> node. More...
#include <murl_logic_graph_instance_objects.h>
Template class controlling multiple replications created by XML <Instance> node.
A InstanceObjectType class must derive from the Logic::GraphReplication base class. See class Logic::GraphPositionInstance or Logic::GraphSoundInstance for example.
Public Member Functions | |
GraphInstanceObjects () | |
The default constructor. | |
Bool | SetNodeObserver (INodeObserverPtr nodeObserver) |
Set the node observer. More... | |
virtual | ~GraphInstanceObjects () |
The destructor. | |
virtual Bool | Init (const Graph::IRoot *root, const String &pathName, const String &instanceName, const String &replicationName, const String &postfixName=String()) |
Initialize the object. More... | |
virtual Bool | Init (Graph::INamespace *namespaceNode, const String &instanceNodeIdPath) |
Initialize the object. More... | |
virtual Bool | Init (Logic::NamespaceNode namespaceNode, const String &instanceNodeIdPath) |
Initialize the object. More... | |
virtual Bool | DeInit () |
Deinitialize the object. More... | |
virtual Bool | IsInitialized () const |
Check if the object is initialized successful. More... | |
virtual Graph::IInstance * | GetInstanceNode () const |
Get the interface of the graph instance node. More... | |
virtual InstanceObjectType * | Obtain () |
Obtain a single InstanceObjectType object. More... | |
virtual void | ObtainAll () |
Obtain all InstanceObjectType object. | |
virtual Bool | Release (InstanceObjectType *object) |
Release a single InstanceObjectType object. More... | |
virtual void | ReleaseAll () |
Release all InstanceObjectType object. | |
void | SetObtained (UInt32 index, Bool isObtained) |
Set the obtained status of an InstanceObjectType object. More... | |
UInt32 | GetMaxObtained () const |
Get the highest obtained instance index. More... | |
UInt32 | GetNumberOfObtained () const |
Get the number of obtained instances. More... | |
UInt32 | GetNumberOfRemaining () const |
Get the number of non-obtained instances. More... | |
UInt32 | GetNumberOfInstances () const |
Get the number of instances. More... | |
const InstanceObjectType * | GetInstance (UInt32 index) const |
Get the const InstanceObjectType object by index. More... | |
const InstanceObjectType * | GetObtainedInstance (UInt32 index) const |
Get the const InstanceObjectType object by index if obtained. More... | |
InstanceObjectType * | GetInstance (UInt32 index) |
Get the InstanceObjectType object by index. More... | |
InstanceObjectType * | GetObtainedInstance (UInt32 index) |
Get the InstanceObjectType object by index if obtained. More... | |
Bool | IsObtained (UInt32 index) const |
Check if a InstanceObjectType object is obtained. More... | |
![]() | |
BaseStepable () | |
The default constructor. More... | |
virtual | ~BaseStepable () |
The destructor. More... | |
operator IStepablePtr () | |
Conversion operator. More... | |
![]() | |
virtual | ~Stepable () |
The destructor. | |
virtual Bool | SetAppStepable (IAppStepablePtr appStepable) |
Implementation of IStepable::SetAppStepable() method. More... | |
virtual void | SetEnabled (Bool isEnabled) |
Implementation of IStepable::SetEnabled() method. More... | |
virtual Bool | IsEnabled () const |
Implementation of IStepable::IsEnabled() method. More... | |
virtual void | Reset () |
Implementation of IStepable::Reset() method. | |
virtual void | ProcessTick (const Logic::IState *state) |
Implementation of IStepable::ProcessTick() method. More... | |
virtual void | FinishTick (const Logic::IState *state) |
Implementation of IStepable::FinishTick() method. More... | |
Protected Member Functions | |
virtual void | OnSetEnabled (Bool isEnabled) |
Overwrite of the BaseStepable::OnSetEnabled() method, calls SetEnabled() to all obtained InstanceObjectType objects. More... | |
virtual void | OnReset () |
Overwrite of the BaseStepable::OnReset() method, calls Reset() to all obtained InstanceObjectType objects. | |
virtual void | OnProcessTick (const Logic::IState *state) |
Overwrite of the BaseStepable::OnProcessTick() method, calls ProcessTick() to all obtained InstanceObjectType objects. More... | |
virtual void | OnFinishTick (const Logic::IState *state) |
Overwrite of the BaseStepable::OnFinishTick() method, calls FinishTick() to all obtained InstanceObjectType objects. More... | |
Additional Inherited Members | |
![]() | |
static IStepablePtr | Create () |
Create a stepable object. More... | |
|
inline |
Set the node observer.
nodeObserver | The node observer. |
|
inlinevirtual |
Initialize the object.
Create and initialize InstanceObjectType classes for each of the Graph::IInstance replications.
root | The graph root node. |
pathName | The full path to the Graph::IInstance excluding the replication name. |
instanceName | The instance name excluding the path. |
replicationName | The prefix of the {replication} name excluding the path. |
postfixName | An optional postfix of the {replication} name excluding the path. |
|
inlinevirtual |
Initialize the object.
Create and initialize InstanceObjectType classes for each of the Graph::IInstance replications.
namespaceNode | The graph namespace node. |
instanceNodeIdPath | The instance name with optional path. |
|
inlinevirtual |
Initialize the object.
Create and initialize InstanceObjectType classes for each of the Graph::IInstance replications.
namespaceNode | The logic namespace node. |
instanceNodeIdPath | The instance name with optional path. |
|
inlinevirtual |
Deinitialize the object.
Deinitialize all InstanceObjectType class instances.
|
inlinevirtual |
Check if the object is initialized successful.
|
inlinevirtual |
Get the interface of the graph instance node.
|
inlinevirtual |
Obtain a single InstanceObjectType object.
|
inlinevirtual |
Release a single InstanceObjectType object.
object | A pointer to the InstanceObjectType. |
|
inline |
Set the obtained status of an InstanceObjectType object.
A valid index is [0 .. GetNumberOfInstances() - 1].
index | The zero-based index of the object. |
isObtained | The obtained state. |
|
inline |
Get the highest obtained instance index.
This is an effective approach for iterating through all obtained instances.
|
inline |
Get the number of obtained instances.
|
inline |
Get the number of non-obtained instances.
|
inline |
Get the number of instances.
|
inline |
Get the const InstanceObjectType object by index.
A valid index is [0 .. GetNumberOfInstances() - 1].
index | The zero-based index of the object. |
|
inline |
Get the const InstanceObjectType object by index if obtained.
A valid index is [0 .. GetNumberOfInstances() - 1].
index | The zero-based index of the object. |
|
inline |
Get the InstanceObjectType object by index.
A valid index is [0 .. GetNumberOfInstances() - 1].
index | The zero-based index of the object. |
|
inline |
Get the InstanceObjectType object by index if obtained.
A valid index is [0 .. GetNumberOfInstances() - 1].
index | The zero-based index of the object. |
|
inline |
Check if a InstanceObjectType object is obtained.
A valid index is [0 .. GetNumberOfInstances() - 1].
index | The zero-based index of the object. |
|
inlineprotectedvirtual |
Overwrite of the BaseStepable::OnSetEnabled() method, calls SetEnabled() to all obtained InstanceObjectType objects.
isEnabled | true if enabled. |
Reimplemented from Murl::Logic::BaseStepable.
|
inlineprotectedvirtual |
Overwrite of the BaseStepable::OnProcessTick() method, calls ProcessTick() to all obtained InstanceObjectType objects.
state | The IState object. |
Reimplemented from Murl::Logic::BaseStepable.
|
inlineprotectedvirtual |
Overwrite of the BaseStepable::OnFinishTick() method, calls FinishTick() to all obtained InstanceObjectType objects.
state | The IState object. |
Reimplemented from Murl::Logic::BaseStepable.