The Instance node class. More...

#include "murl_graph_instance.h"

Inheritance diagram for Murl::Graph::Instance:

Additional Inherited Members

- Public Types inherited from Murl::IFactoryObject< INode >
using ClassInfoArray = Array< const ClassInfo * >
 Definition of an array of ClassInfo objects.
 
- Public Member Functions inherited from Murl::IFactoryObject< INode >
 ~IFactoryObject () override
 The destructor.
 
virtual const ClassInfo * GetObjectClassInfo () const=0
 Get the object instance's class info, if present. More...
 
virtual void ResetObjectProperties ()=0
 Reset the object instance's properties to their default values.
 
- Static Public Member Functions inherited from Murl::IFactoryObject< INode >
static const PropertyInfoGetPropertyInfo ()
 Get the class' property info struct. More...
 
static const AttributeInfoGetAttributeInfo ()
 Get the class' attribute info struct. More...
 
static void ResetProperties (IFactoryObject< INode > *object)
 Reset an object instance's properties to their default values. More...
 

Detailed Description

The Instance node class.

In addition to the possible node attributes described below, an XML <Instance> element also accepts any user-defined attributes that can be referenced from a given graph resource. For example, the node

<Instance graphResourceId="test:graph1" replications="3" attr1="42"/>

creates 3 instances of the graph named "graph1" found in the "test" package, with a custom attribute named "attr1". Within that referenced resource graph, a node may access the custom attribute(s) and the current replication e.g. in the following way:

<TextGeometry id="textnode{replication}" text="{attr1}"/>

which will yield 3 text geometry nodes with IDs "textnode0", "textnode1" and "textnode2", with their text attributes containing the string "42".

XML Elements

XML Graph Node Tag:

<Instance>

XML Graph Node Attributes:

graphResourceId="" [String]

The resource ID of the graph to instantiate. See Murl::Graph::IInstance::GetGraphResourceTarget().

templateId="" [String]

The ID of a Murl::Graph::ITemplate node used to create an instance. See Murl::Graph::IInstance::GetTemplateNodeTarget().

replications="1" [UInt32]

The number of replications of the graph. See Murl::Graph::IInstance::SetNumberOfReplications().

condition="true" [Bool]

If set to false (or 0), the node does not create an instance at all. This is most likely only useful in combination with evaluating some custom parameter (e.g. condition="{myCond}"), so there is no interface method for this functionality.


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


Copyright © 2011-2024 Spraylight GmbH.