The ITemplate graph node interface. More...

#include "murl_graph_i_template.h"

Inheritance diagram for Murl::Graph::ITemplate:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual Bool SetResourceGraphNode (const Resource::IGraphNode *node)=0
 Set the resource graph node from which to create template instances. More...
 
virtual const Resource::IGraphNodeGetResourceGraphNode () const =0
 Get the resource graph node from which to create template instances. More...
 
virtual const IAttributesGetUserParameters () const =0
 Get the set of user-defined template parameters, if any are present. More...
 

Detailed Description

The ITemplate graph node interface.

A template node stores the Resource::IGraphNode object it was created from, in order to be able to create Graph::IInstance nodes later on, which may directly source their sub-graph from the already existing graph by referencing this template. It is often cumbersome to always have to create an extra graph resource object within a package when it is desired to create multiple instances of a sub-graph. Using nodes implementing this interface, instantiation may also occur like this:

<Template id="myTemplate>
<Namespace id="{namespaceId}">
... put your nodes here ...
</Namespace>
</Template>
<Instance templateId="myTemplate" namespaceId="nmSpc1"/>
<Instance templateId="myTemplate" namespaceId="nmSpc2"/>
<Instance templateId="myTemplate" namespaceId="nmSpc3"/>

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::ITemplate::GetNodeInterface ( )
pure virtual

Get the mutable Graph::INode interface.

This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::ITemplate::GetNodeInterface ( ) const
pure virtual

Get the constant Graph::INode interface.

This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Returns
The constant Graph::INode interface, or null if not available

◆ SetResourceGraphNode()

virtual Bool Murl::Graph::ITemplate::SetResourceGraphNode ( const Resource::IGraphNode node)
pure virtual

Set the resource graph node from which to create template instances.

Parameters
nodeThe resource graph node.
Returns
true if successful.

◆ GetResourceGraphNode()

virtual const Resource::IGraphNode* Murl::Graph::ITemplate::GetResourceGraphNode ( ) const
pure virtual

Get the resource graph node from which to create template instances.

Returns
The resource graph node.

◆ GetUserParameters()

virtual const IAttributes* Murl::Graph::ITemplate::GetUserParameters ( ) const
pure virtual

Get the set of user-defined template parameters, if any are present.

Returns
The set of parameters, or null if no user-defined parameters are present.

The documentation for this interface was generated from the following file:
  • murl_graph_i_template.h


Copyright © 2011-2024 Spraylight GmbH.