A template class for safe access of basic graph node properties and for easy use of the GraphObservableNode object in combination with a INodeObserver. More...
#include "murl_logic_graph_node.h"
Public Types | |
using | ValueType = NodeType |
Type definition of the value type. | |
using | ObservableNodeT = GraphObservableNode< NodeType > |
Type definition of the observable node. | |
Public Member Functions | |
GraphNodeT () | |
The default constructor. More... | |
GraphNodeT (Graph::INode *node) | |
The constructor including a graph node. More... | |
template<class NodeType2 > | |
GraphNodeT (const GraphNodeT< NodeType2 > &graphNode) | |
The constructor including a graph node object. More... | |
GraphNodeT (const Graph::IRoot *root, const String &nodeIdPath) | |
The constructor including the graph root node and path. More... | |
GraphNodeT (Graph::INamespace *namespaceNode, const String &nodeIdPath) | |
The constructor including a graph namespace node and path. More... | |
GraphNodeT (const NamespaceNode &namespaceNode, const String &nodeIdPath) | |
The constructor including a graph namespace node and path. More... | |
virtual | ~GraphNodeT () |
The destructor. More... | |
Bool | IsValid () const |
Check if the graph node is valid. More... | |
Bool | RemoveReference () |
Remove the reference from the graph node. More... | |
Bool | CanReference (Graph::INode *node) const |
Check if a graph node can be referenced by this template's node type. More... | |
template<class NodeType2 > | |
Bool | CanReference (const GraphNodeT< NodeType2 > &graphNode) const |
Check if a graph node object can be referenced by this template's node type. More... | |
Bool | CanResolveReference (Graph::INode *node) const |
Check if a graph node can be referenced by this template's node type by resolving a Graph::IReference node. More... | |
template<class NodeType2 > | |
Bool | CanResolveReference (const GraphNodeT< NodeType2 > &graphNode) const |
Check if a graph node object can be referenced by this template's node type by resolving a Logic::ReferenceNode. More... | |
IObservableNodePtr | GetReference (Graph::INode *node) |
Get a reference to a graph node of this template's node type. More... | |
template<class NodeType2 > | |
IObservableNodePtr | GetReference (const GraphNodeT< NodeType2 > &graphNode) |
Get a reference to a graph node object of this template's node type. More... | |
IObservableNodePtr | GetReference (const Graph::IRoot *root, const String &nodeIdPath) |
Get a reference to a graph node by identifier. More... | |
IObservableNodePtr | GetReference (Graph::INamespace *namespaceNode, const String &nodeIdPath) |
Get a reference to a graph node by identifier relative to a namespace. More... | |
IObservableNodePtr | GetReference (const NamespaceNode &namespaceNode, const String &nodeIdPath) |
Get a reference to a graph node by identifier relative to a namespace. More... | |
IObservableNodePtr | ResolveReference (Graph::INode *node) |
Get a reference to a graph node by resolving a Graph::IReference node. More... | |
template<class NodeType2 > | |
IObservableNodePtr | ResolveReference (const GraphNodeT< NodeType2 > &graphNode) |
Get a reference to a graph node by resolving a Logic::ReferenceNode. More... | |
IObservableNodePtr | ResolveReference (const Graph::IRoot *root, const String &nodeIdPath) |
Get a reference to a graph node by resolving a Graph::IReference node by identifier. More... | |
IObservableNodePtr | ResolveReference (Graph::INamespace *namespaceNode, const String &nodeIdPath) |
Get a reference to a graph node by resolving a Graph::IReference node by identifier relative to a namespace. More... | |
IObservableNodePtr | ResolveReference (const NamespaceNode &namespaceNode, const String &nodeIdPath) |
Get a reference to a graph node by resolving a Graph::IReference node by identifier relative to a namespace. More... | |
operator IObservableNodePtr () const | |
Conversion operator. More... | |
NodeType * | operator-> () const |
Dereference operator. More... | |
NodeType * | GetNode () const |
Get the graph node interface. More... | |
Graph::INode * | GetNodeInterface () const |
Get the graph Graph::INode interface. More... | |
const String & | GetId () const |
Get the Graph::INode node identifier. More... | |
Bool | SetActive (Bool isActive) const |
Enable/disable logic traversals. More... | |
Bool | IsActive () const |
Check if logic traversals are enabled. More... | |
Bool | SetVisible (Bool isVisible) const |
Enable/disable output traversals. More... | |
Bool | IsVisible () const |
Check if output traversals are enabled. More... | |
Bool | SetActiveAndVisible (Bool enabled) const |
Enable/disable both logic and output traversals. More... | |
Bool | IsActiveAndVisible () const |
Check if both logic and output traversals are enabled. More... | |
Graph::INode * | GetChild (UInt32 index=0) const |
Get the graph Graph::INode interface of a child by index. More... | |
Graph::INode * | GetChild (const String &identifier) const |
Get the graph Graph::INode interface of a child by identifier. More... | |
UInt32 | GetNumberOfChildren () const |
Return the number of the graph node's children. More... | |
Graph::INode * | GetParent (UInt32 index=0) const |
Get the graph Graph::INode interface of a parent by index. More... | |
Graph::INode * | GetParent (const String &identifier) const |
Get the graph Graph::INode interface of a parent by identifier. More... | |
UInt32 | GetNumberOfParents () const |
Return the number of the graph node's parents. More... | |
Graph::IController * | GetController (UInt32 index=0) const |
Get the Graph::IController interface at a given index. More... | |
template<class ControllerType > | |
ControllerType * | GetController (UInt32 index=0) const |
Get the graph controller interface of a specified type at a given index. More... | |
UInt32 | GetNumberOfControllers () const |
Return the number of the graph node's controllers. More... | |
Graph::ILinkController * | GetLinkController (UInt32 index=0) const |
Get the Graph::ILinkController interface at a given index. More... | |
Graph::ILogicController * | GetLogicController (UInt32 index=0) const |
Get the Graph::ILogicController interface at a given index. More... | |
Graph::INodeLinkController * | GetNodeLinkController (UInt32 index=0) const |
Get the Graph::INodeLinkController interface at a given index. More... | |
Graph::IScriptLogicController * | GetScriptLogicController (UInt32 index=0) const |
Get the Graph::IScriptLogicController interface at a given index. More... | |
Graph::ITimeController * | GetTimeController (UInt32 index=0) const |
Get the Graph::ITimeController interface at a given index. More... | |
Graph::IAnimationTimeController * | GetAnimationTimeController (UInt32 index=0) const |
Get the Graph::IAnimationTimeController interface at a given index. More... | |
Graph::IUniformTimeController * | GetUniformTimeController (UInt32 index=0) const |
Get the Graph::IUniformTimeController interface at a given index. More... | |
Graph::IWaveUniformTimeController * | GetWaveUniformTimeController (UInt32 index=0) const |
Get the Graph::IWaveUniformTimeController interface at a given index. More... | |
Graph::IVariableController * | GetVariableController (UInt32 index=0) const |
Get the Graph::IVariableController interface at a given index. More... | |
Graph::ITimelineVariableController * | GetTimelineVariableController (UInt32 index=0) const |
Get the Graph::ITimelineVariableController interface at a given index. More... | |
Detailed Description
template<class NodeType>
class Murl::Logic::GraphNodeT< NodeType >
A template class for safe access of basic graph node properties and for easy use of the GraphObservableNode object in combination with a INodeObserver.
See GraphNodeTypes for predefined types.
Constructor & Destructor Documentation
◆ GraphNodeT() [1/6]
|
inline |
The default constructor.
Creates a GraphObservableNode object.
◆ GraphNodeT() [2/6]
|
inline |
The constructor including a graph node.
Creates a GraphObservableNode object.
- Parameters
-
node The graph node.
◆ GraphNodeT() [3/6]
|
inline |
The constructor including a graph node object.
Creates a GraphObservableNode object.
- Parameters
-
graphNode The graph node object.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface().
◆ GraphNodeT() [4/6]
|
inline |
The constructor including the graph root node and path.
Creates a GraphObservableNode object.
- Parameters
-
root The graph root node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
References Murl::Graph::IRoot::GetRootNamespace().
◆ GraphNodeT() [5/6]
|
inline |
The constructor including a graph namespace node and path.
Creates a GraphObservableNode object.
- Parameters
-
namespaceNode The graph namespace node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
◆ GraphNodeT() [6/6]
|
inline |
The constructor including a graph namespace node and path.
Creates a GraphObservableNode object.
- Parameters
-
namespaceNode The logic namespace node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
References Murl::Logic::GraphNodeT< NodeType >::GetNode().
◆ ~GraphNodeT()
|
inlinevirtual |
The destructor.
Destroys the GraphObservableNode object.
Member Function Documentation
◆ IsValid()
|
inline |
Check if the graph node is valid.
- Returns
- true if the graph node is valid.
Referenced by Murl::Logic::GraphSoundObject::ContinuePlaying(), Murl::Logic::GraphSoundObject::Init(), Murl::Logic::GraphInstanceObjects< InstanceObjectType >::IsInitialized(), Murl::Logic::GraphSoundObject::IsPlaying(), Murl::Logic::GraphSoundObject::PausePlaying(), Murl::Logic::GraphSoundObject::SetVolume(), Murl::Logic::GraphSoundObject::StartPlaying(), and Murl::Logic::GraphSoundObject::StopPlaying().
◆ RemoveReference()
|
inline |
Remove the reference from the graph node.
- Returns
- true if successful or if the graph node is null.
◆ CanReference() [1/2]
|
inline |
Check if a graph node can be referenced by this template's node type.
- Parameters
-
node The graph node to check.
- Returns
- true if the graph node has a compatible type, otherwise false.
Referenced by Murl::Logic::GraphNodeT< NodeType >::CanReference().
◆ CanReference() [2/2]
|
inline |
Check if a graph node object can be referenced by this template's node type.
- Parameters
-
graphNode The graph node object to check.
- Returns
- true if the graph node object has a compatible type, otherwise false.
References Murl::Logic::GraphNodeT< NodeType >::CanReference(), and Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface().
◆ CanResolveReference() [1/2]
|
inline |
Check if a graph node can be referenced by this template's node type by resolving a Graph::IReference node.
- Parameters
-
node The graph node to check.
- Returns
- true if the graph node has a compatible type, otherwise false.
Referenced by Murl::Logic::GraphNodeT< NodeType >::CanResolveReference().
◆ CanResolveReference() [2/2]
|
inline |
Check if a graph node object can be referenced by this template's node type by resolving a Logic::ReferenceNode.
- Parameters
-
graphNode The graph node object to check.
- Returns
- true if the graph node object has a compatible type, otherwise false.
References Murl::Logic::GraphNodeT< NodeType >::CanResolveReference(), and Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface().
◆ GetReference() [1/5]
|
inline |
Get a reference to a graph node of this template's node type.
- Parameters
-
node The graph node.
- Returns
- The observable node.
Referenced by Murl::Logic::GraphNodeT< NodeType >::GetReference(), Murl::Logic::GraphInstanceObjects< InstanceObjectType >::Init(), Murl::Logic::GraphPositionObject::Init(), Murl::Logic::GraphSoundObject::Init(), Murl::Logic::GraphPositionInstance::Init(), and Murl::Logic::GraphSoundInstance::Init().
◆ GetReference() [2/5]
|
inline |
Get a reference to a graph node object of this template's node type.
- Parameters
-
graphNode The graph node object.
- Returns
- The observable node.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Logic::GraphNodeT< NodeType >::GetReference().
◆ GetReference() [3/5]
|
inline |
Get a reference to a graph node by identifier.
- Parameters
-
root The graph root node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
- Returns
- The observable node.
References Murl::Graph::IRoot::GetRootNamespace().
◆ GetReference() [4/5]
|
inline |
Get a reference to a graph node by identifier relative to a namespace.
- Parameters
-
namespaceNode The graph namespace node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
- Returns
- The observable node.
◆ GetReference() [5/5]
|
inline |
Get a reference to a graph node by identifier relative to a namespace.
- Parameters
-
namespaceNode The logic namespace node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
- Returns
- The observable node.
References Murl::Logic::GraphNodeT< NodeType >::GetNode().
◆ ResolveReference() [1/5]
|
inline |
Get a reference to a graph node by resolving a Graph::IReference node.
- Parameters
-
node The Graph::IReference node to resolve.
- Returns
- The observable node.
Referenced by Murl::Logic::GraphNodeT< NodeType >::ResolveReference().
◆ ResolveReference() [2/5]
|
inline |
Get a reference to a graph node by resolving a Logic::ReferenceNode.
- Parameters
-
graphNode The Logic::ReferenceNode node to resolve.
- Returns
- The observable node.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Logic::GraphNodeT< NodeType >::ResolveReference().
◆ ResolveReference() [3/5]
|
inline |
Get a reference to a graph node by resolving a Graph::IReference node by identifier.
- Parameters
-
root The graph root node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
- Returns
- The observable node.
References Murl::Graph::IRoot::GetRootNamespace().
◆ ResolveReference() [4/5]
|
inline |
Get a reference to a graph node by resolving a Graph::IReference node by identifier relative to a namespace.
- Parameters
-
namespaceNode The graph namespace node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
- Returns
- The observable node.
◆ ResolveReference() [5/5]
|
inline |
Get a reference to a graph node by resolving a Graph::IReference node by identifier relative to a namespace.
- Parameters
-
namespaceNode The logic namespace node. nodeIdPath The node ID to find, with optional path specification when searching in sub-namespaces.
- Returns
- The observable node.
References Murl::Logic::GraphNodeT< NodeType >::GetNode().
◆ operator IObservableNodePtr()
|
inline |
Conversion operator.
- Returns
- The IObservableNode interface shared pointer.
◆ operator->()
|
inline |
Dereference operator.
- Returns
- A pointer to the graph node interface or null.
◆ GetNode()
|
inline |
Get the graph node interface.
- Returns
- A pointer to the graph node interface or null.
Referenced by Murl::Logic::GraphInstanceObjects< InstanceObjectType >::GetInstanceNode(), Murl::Logic::GraphNodeT< NodeType >::GetReference(), Murl::Logic::GraphNodeT< NodeType >::GraphNodeT(), Murl::Logic::GraphPositionInstance::Init(), Murl::Logic::GraphSoundInstance::Init(), Murl::Logic::GraphInstanceObjects< InstanceObjectType >::Init(), and Murl::Logic::GraphNodeT< NodeType >::ResolveReference().
◆ GetNodeInterface()
|
inline |
Get the graph Graph::INode interface.
- Returns
- A pointer to the Graph::INode interface or null.
Referenced by Murl::Logic::GraphNodeT< NodeType >::CanReference(), Murl::Logic::GraphNodeT< NodeType >::CanResolveReference(), Murl::Logic::GraphNodeT< NodeType >::GetChild(), Murl::Logic::GraphNodeT< NodeType >::GetController(), Murl::Logic::GraphNodeT< NodeType >::GetId(), Murl::Logic::GraphNodeT< NodeType >::GetNumberOfChildren(), Murl::Logic::GraphNodeT< NodeType >::GetNumberOfControllers(), Murl::Logic::GraphNodeT< NodeType >::GetNumberOfParents(), Murl::Logic::GraphNodeT< NodeType >::GetParent(), Murl::Logic::GraphNodeT< NodeType >::GetReference(), Murl::Logic::GraphNodeT< NodeType >::GraphNodeT(), Murl::Logic::GraphNodeT< NodeType >::IsActive(), Murl::Logic::GraphNodeT< NodeType >::IsActiveAndVisible(), Murl::Logic::GraphNodeT< NodeType >::IsVisible(), Murl::Logic::GraphNodeT< NodeType >::ResolveReference(), Murl::Logic::GraphNodeT< NodeType >::SetActive(), Murl::Logic::GraphNodeT< NodeType >::SetActiveAndVisible(), and Murl::Logic::GraphNodeT< NodeType >::SetVisible().
◆ GetId()
|
inline |
Get the Graph::INode node identifier.
- Returns
- The Graph::INode node identifier
References Murl::Graph::INode::GetId(), Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Util::StaticEmptyString().
◆ SetActive()
|
inline |
Enable/disable logic traversals.
Calls Graph::ITraversable::SetActive().
- Parameters
-
isActive If true, logic traversals are enabled.
- Returns
- true if successful.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::ITraversable::SetActive().
Referenced by Murl::Logic::GraphInstanceObjects< InstanceObjectType >::OnSetEnabled().
◆ IsActive()
|
inline |
Check if logic traversals are enabled.
Calls Graph::ITraversable::IsActive().
- Returns
- true if enabled.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::ITraversable::IsActive().
◆ SetVisible()
|
inline |
Enable/disable output traversals.
Calls Graph::ITraversable::SetVisible().
- Parameters
-
isVisible If true, output traversals are enabled.
- Returns
- true if successful.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::ITraversable::SetVisible().
◆ IsVisible()
|
inline |
Check if output traversals are enabled.
Calls Graph::ITraversable::IsVisible().
- Returns
- true if enabled.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::ITraversable::IsVisible().
◆ SetActiveAndVisible()
|
inline |
Enable/disable both logic and output traversals.
Calls Graph::ITraversable::SetActiveAndVisible().
- Parameters
-
enabled If true, both logic and output traversals are enabled.
- Returns
- true if successful.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::ITraversable::SetActiveAndVisible().
Referenced by Murl::Logic::GraphPositionInstance::SetObtained(), and Murl::Logic::GraphSoundInstance::SetObtained().
◆ IsActiveAndVisible()
|
inline |
Check if both logic and output traversals are enabled.
Calls Graph::ITraversable::IsActiveAndVisible().
- Returns
- true if both are enabled.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::ITraversable::IsActiveAndVisible().
◆ GetChild() [1/2]
|
inline |
Get the graph Graph::INode interface of a child by index.
- Parameters
-
index The zero-based index of the child.
- Returns
- A pointer to the Graph::INode interface or null.
References Murl::Graph::INode::GetChild(), and Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface().
◆ GetChild() [2/2]
|
inline |
Get the graph Graph::INode interface of a child by identifier.
- Parameters
-
identifier The identifier of the child to search for.
- Returns
- A pointer to the Graph::INode interface or null.
References Murl::Graph::INode::GetChild(), and Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface().
◆ GetNumberOfChildren()
|
inline |
Return the number of the graph node's children.
- Returns
- The number of children.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::INode::GetNumberOfChildren().
◆ GetParent() [1/2]
|
inline |
Get the graph Graph::INode interface of a parent by index.
- Parameters
-
index The zero-based index of the parent.
- Returns
- A pointer to the Graph::INode interface or null.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::INode::GetParent().
◆ GetParent() [2/2]
|
inline |
Get the graph Graph::INode interface of a parent by identifier.
- Parameters
-
identifier The identifier of the parent to search for.
- Returns
- A pointer to the Graph::INode interface or null.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::INode::GetParent().
◆ GetNumberOfParents()
|
inline |
Return the number of the graph node's parents.
- Returns
- The number of parents.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::INode::GetNumberOfParents().
◆ GetController() [1/2]
|
inline |
Get the Graph::IController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::IController interface or null.
References Murl::Graph::INode::GetController(), and Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface().
Referenced by Murl::Logic::GraphNodeT< NodeType >::GetController().
◆ GetController() [2/2]
|
inline |
Get the graph controller interface of a specified type at a given index.
- Parameters
-
index The zero-based index of the controller.
- Template Parameters
-
ControllerType The controller interface class type.
- Returns
- A pointer to the ControllerType interface or null.
References Murl::Logic::GraphNodeT< NodeType >::GetController().
◆ GetNumberOfControllers()
|
inline |
Return the number of the graph node's controllers.
- Returns
- The number of controllers.
References Murl::Logic::GraphNodeT< NodeType >::GetNodeInterface(), and Murl::Graph::INode::GetNumberOfControllers().
◆ GetLinkController()
|
inline |
Get the Graph::ILinkController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::ILinkController interface or null.
◆ GetLogicController()
|
inline |
Get the Graph::ILogicController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::ILogicController interface or null.
◆ GetNodeLinkController()
|
inline |
Get the Graph::INodeLinkController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::INodeLinkController interface or null.
◆ GetScriptLogicController()
|
inline |
Get the Graph::IScriptLogicController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::IScriptLogicController interface or null.
◆ GetTimeController()
|
inline |
Get the Graph::ITimeController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::ITimeController interface or null.
◆ GetAnimationTimeController()
|
inline |
Get the Graph::IAnimationTimeController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::IAnimationTimeController interface or null.
◆ GetUniformTimeController()
|
inline |
Get the Graph::IUniformTimeController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::IUniformTimeController interface or null.
◆ GetWaveUniformTimeController()
|
inline |
Get the Graph::IWaveUniformTimeController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::IWaveUniformTimeController interface or null.
◆ GetVariableController()
|
inline |
Get the Graph::IVariableController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::IVariableController interface or null.
◆ GetTimelineVariableController()
|
inline |
Get the Graph::ITimelineVariableController interface at a given index.
- Parameters
-
index The zero-based index of the controller.
- Returns
- A pointer to the Graph::ITimelineVariableController interface or null.
The documentation for this class was generated from the following file:
- murl_logic_graph_node.h