Murl::Logic::GraphObservableNode< NodeType > Class Template Reference

A template class to create an IObservableNode object for accessing a Graph node. More...

#include "murl_logic_graph_observable_node.h"

Inheritance diagram for Murl::Logic::GraphObservableNode< NodeType >:

Public Member Functions

 GraphObservableNode ()
 The default constructor.
 
virtual ~GraphObservableNode ()
 The destructor. More...
 
virtual Bool IsValid () const
 Check if the graph node is valid. More...
 
virtual Bool RemoveReference ()
 Remove the reference from the graph node. More...
 
Bool GetReference (Graph::INode *node)
 Get a reference to a graph node. More...
 
Bool GetReference (Graph::INamespace *namespaceNode, const String &nodeIdPath)
 Get a reference to a graph node by identifier relative to a namespace. More...
 
Bool ResolveReference (Graph::INode *node)
 Get a reference to a graph node by resolving a Graph::IReference node. More...
 
Bool 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...
 
NodeType * GetNode () const
 Get the graph node interface. More...
 
Graph::INodeGetNodeInterface () const
 Get the graph Graph::INode interface. More...
 
NodeType * DynamicCastNode (Graph::INode *node) const
 Dynamic cast a graph node to this template's node type. More...
 
NodeType * DynamicCastResolveNode (Graph::INode *node) const
 Dynamic cast a graph node by resolving a Graph::IReference node to this template's node type. More...
 

Protected Member Functions

Bool CreateTypedNode (Graph::INode *node)
 Create a typed graph node pointer and get a reference. More...
 
Graph::INodeFindNode (Graph::INamespace *namespaceNode, const String &nodeIdPath) const
 Find a graph node by identifier relative to a namespace. More...
 
Graph::INodeTrackReference (Graph::INode *node) const
 Track a Graph::IReference node's target. More...
 

Detailed Description

template<class NodeType>
class Murl::Logic::GraphObservableNode< NodeType >

A template class to create an IObservableNode object for accessing a Graph node.

Constructor & Destructor Documentation

◆ ~GraphObservableNode()

template<class NodeType>
virtual Murl::Logic::GraphObservableNode< NodeType >::~GraphObservableNode ( )
inlinevirtual

The destructor.

Removes the reference from the graph node.

Member Function Documentation

◆ IsValid()

template<class NodeType>
virtual Bool Murl::Logic::GraphObservableNode< NodeType >::IsValid ( ) const
inlinevirtual

Check if the graph node is valid.

Returns
true if the graph node is valid.

Implements Murl::Logic::IObservableNode.

◆ RemoveReference()

template<class NodeType>
virtual Bool Murl::Logic::GraphObservableNode< NodeType >::RemoveReference ( )
inlinevirtual

Remove the reference from the graph node.

Returns
true if successful or if the graph node is null.

Implements Murl::Logic::IObservableNode.

Referenced by Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::CreateTypedNode(), and Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::~GraphObservableNode().

◆ GetReference() [1/2]

template<class NodeType>
Bool Murl::Logic::GraphObservableNode< NodeType >::GetReference ( Graph::INode node)
inline

Get a reference to a graph node.

Parameters
nodeThe graph node.
Returns
true if successful.

◆ GetReference() [2/2]

template<class NodeType>
Bool Murl::Logic::GraphObservableNode< NodeType >::GetReference ( Graph::INamespace namespaceNode,
const String nodeIdPath 
)
inline

Get a reference to a graph node by identifier relative to a namespace.

Parameters
namespaceNodeThe graph namespace node.
nodeIdPathThe node ID to find, with optional path specification when searching in sub-namespaces.
Returns
true if successful.

◆ ResolveReference() [1/2]

template<class NodeType>
Bool Murl::Logic::GraphObservableNode< NodeType >::ResolveReference ( Graph::INode node)
inline

Get a reference to a graph node by resolving a Graph::IReference node.

Parameters
nodeThe Graph::IReference node to resolve.
Returns
true if successful.

◆ ResolveReference() [2/2]

template<class NodeType>
Bool Murl::Logic::GraphObservableNode< NodeType >::ResolveReference ( Graph::INamespace namespaceNode,
const String nodeIdPath 
)
inline

Get a reference to a graph node by resolving a Graph::IReference node by identifier relative to a namespace.

Parameters
namespaceNodeThe graph namespace node.
nodeIdPathThe node ID to find, with optional path specification when searching in sub-namespaces.
Returns
true if successful.

◆ GetNode()

template<class NodeType>
NodeType* Murl::Logic::GraphObservableNode< NodeType >::GetNode ( ) const
inline

Get the graph node interface.

Returns
A pointer to the graph node interface or null.

◆ GetNodeInterface()

template<class NodeType>
Graph::INode* Murl::Logic::GraphObservableNode< NodeType >::GetNodeInterface ( ) const
inline

Get the graph Graph::INode interface.

Returns
A pointer to the Graph::INode interface or null.

Referenced by Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::RemoveReference().

◆ DynamicCastNode()

template<class NodeType>
NodeType* Murl::Logic::GraphObservableNode< NodeType >::DynamicCastNode ( Graph::INode node) const
inline

Dynamic cast a graph node to this template's node type.

Parameters
nodeThe graph node to cast.
Returns
A pointer to the graph node interface or null.

Referenced by Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::CreateTypedNode().

◆ DynamicCastResolveNode()

template<class NodeType>
NodeType* Murl::Logic::GraphObservableNode< NodeType >::DynamicCastResolveNode ( Graph::INode node) const
inline

Dynamic cast a graph node by resolving a Graph::IReference node to this template's node type.

Parameters
nodeThe graph node to cast.
Returns
A pointer to the graph node interface or null.

◆ CreateTypedNode()

template<class NodeType>
Bool Murl::Logic::GraphObservableNode< NodeType >::CreateTypedNode ( Graph::INode node)
inlineprotected

Create a typed graph node pointer and get a reference.

Dynamic cast the graph node pointer to the template's graph node type and add a reference to the node if successful.

Parameters
nodeThe graph node.
Returns
true if successful.

Referenced by Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::GetReference(), and Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::ResolveReference().

◆ FindNode()

template<class NodeType>
Graph::INode* Murl::Logic::GraphObservableNode< NodeType >::FindNode ( Graph::INamespace namespaceNode,
const String nodeIdPath 
) const
inlineprotected

Find a graph node by identifier relative to a namespace.

Parameters
namespaceNodeThe graph namespace node.
nodeIdPathThe node ID to find, with optional path specification when searching in sub-namespaces.
Returns
A pointer to the graph node or null if not found.

Referenced by Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::GetReference(), and Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::ResolveReference().

◆ TrackReference()

template<class NodeType>
Graph::INode* Murl::Logic::GraphObservableNode< NodeType >::TrackReference ( Graph::INode node) const
inlineprotected

Track a Graph::IReference node's target.

Parameters
nodeThe graph node to track.
Returns
A pointer to the target node.

Referenced by Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::DynamicCastResolveNode(), and Murl::Logic::GraphObservableNode< Murl::Graph::INamespace >::ResolveReference().


The documentation for this class was generated from the following file:
  • murl_logic_graph_observable_node.h


Copyright © 2011-2018 Spraylight GmbH.