![]() |
Murl Engine API
Version 2025.1
|
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... | |
| ~GraphInstanceObjects () override | |
| 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... | |
Public Member Functions inherited from Murl::Logic::BaseStepable | |
| BaseStepable () | |
| The default constructor. More... | |
| ~BaseStepable () override | |
| The destructor. More... | |
| operator IStepablePtr () | |
| Conversion operator. More... | |
Public Member Functions inherited from Murl::Logic::Stepable | |
| ~Stepable () override | |
| The destructor. | |
| Bool | SetAppStepable (IAppStepablePtr appStepable) override |
| Implementation of IStepable::SetAppStepable() method. More... | |
| void | SetEnabled (Bool isEnabled) override |
| Implementation of IStepable::SetEnabled() method. More... | |
| Bool | IsEnabled () const override |
| Implementation of IStepable::IsEnabled() method. More... | |
| void | Reset () override |
| Implementation of IStepable::Reset() method. | |
| void | ProcessTick (const Logic::IState *state) override |
| Implementation of IStepable::ProcessTick() method. More... | |
| void | FinishTick (const Logic::IState *state) override |
| Implementation of IStepable::FinishTick() method. More... | |
Protected Member Functions | |
| void | OnSetEnabled (Bool isEnabled) override |
| Overwrite of the BaseStepable::OnSetEnabled() method, calls SetEnabled() to all obtained InstanceObjectType objects. More... | |
| void | OnReset () override |
| Overwrite of the BaseStepable::OnReset() method, calls Reset() to all obtained InstanceObjectType objects. | |
| void | OnProcessTick (const Logic::IState *state) override |
| Overwrite of the BaseStepable::OnProcessTick() method, calls ProcessTick() to all obtained InstanceObjectType objects. More... | |
| void | OnFinishTick (const Logic::IState *state) override |
| Overwrite of the BaseStepable::OnFinishTick() method, calls FinishTick() to all obtained InstanceObjectType objects. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Murl::Logic::Stepable | |
| 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. |
|
inlineoverrideprotectedvirtual |
Overwrite of the BaseStepable::OnSetEnabled() method, calls SetEnabled() to all obtained InstanceObjectType objects.
| isEnabled | true if enabled. |
Reimplemented from Murl::Logic::BaseStepable.
|
inlineoverrideprotectedvirtual |
Overwrite of the BaseStepable::OnProcessTick() method, calls ProcessTick() to all obtained InstanceObjectType objects.
| state | The IState object. |
Reimplemented from Murl::Logic::BaseStepable.
|
inlineoverrideprotectedvirtual |
Overwrite of the BaseStepable::OnFinishTick() method, calls FinishTick() to all obtained InstanceObjectType objects.
| state | The IState object. |
Reimplemented from Murl::Logic::BaseStepable.