HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UN_ConstNode Class Reference

#include <UN_Node.h>

+ Inheritance diagram for UN_ConstNode:

Public Member Functions

 UN_ConstNode ()=default
 Constructs a handle for an invalid node. More...
 
 UN_ConstNode (const UN_GraphData *graph_data, UN_NodeID node_id)
 Constructs a handle referencing the given node in the given graph. More...
 
 UN_ConstNode (const UN_Node &node)
 Constructs a const handle from a mutable node handle. More...
 
UN_ConstGraph graph () const
 Returns the graph within which this node exists. More...
 
bool operator== (const UN_ConstNode &other) const
 Comparison operators. More...
 
bool operator!= (const UN_ConstNode &other) const
 Comparison operators. More...
 
- Public Member Functions inherited from UN_NodeBase< UN_ConstHandle, const UN_GraphData, UN_ConstNode, UN_ConstParm, UN_ConstPort, UN_ConstStickyNote, UN_ConstWire >
UN_NodeID nodeID () const
 Returns the unique ID of the node this handle refers to. More...
 
UN_ConstNode parent () const
 
UN_ConstNode nonRootParent () const
 
const UT_StringHoldername () const
 Returns the node name that differentiates it among its siblings. More...
 
const UT_StringHoldertypeName () const
 Returns the node's type that determines its functional behavour. More...
 
const UT_StringHoldercategoryName () const
 
const UT_StringHoldersignatureName () const
 Returns the signature for the node. More...
 
UT_StringHolder path () const
 Returns the node path. More...
 
const UT_StringHoldercomment () const
 Returns the comment for the node. More...
 
const UT_Vector2Dposition () const
 Returns the node's position in the node editor. More...
 
const UT_Colorcolor () const
 Returns the node's color. More...
 
const UT_StringArraytags () const
 Returns the node's tags. More...
 
const UN_MetadataHoldermetadata () const
 Returns the node's metadata. More...
 
UT_Array< UT_StringHolderparmNames () const
 Returns the names of the node parameters. More...
 
UT_Array< UT_StringHolderparmTypeNames () const
 Returns the type names of the node parameters. More...
 
UN_ConstParm findParm (const UT_StringRef &parm_name) const
 Returns a parameter by the given name, or an invalid parm if not found. More...
 
ParmRange parmRange () const
 Returns a range for iterating over node parameters. More...
 
UT_Array< UN_ConstParmparms () const
 Returns the parameters of this node. More...
 
UT_Array< UT_StringHolderportNames (UN_PortKind port_kind) const
 Returns the names of the node ports of a given kind. More...
 
UT_Array< UT_StringHolderportTypeNames (UN_PortKind port_kind) const
 Returns the type names of the node ports of a given kind. More...
 
UN_ConstPort findPort (UN_PortKind port_kind, const UT_StringRef &port_name) const
 
PortRange portRange (UN_PortKind port_kind) const
 
PortReverseRange portReverseRange (UN_PortKind port_kind) const
 
UT_Array< UN_ConstPortports (UN_PortKind port_kind) const
 Returns this node's ports of the given kind. More...
 
bool isAnyInputPortConnectedToSrc () const
 
UT_Array< UT_StringHolderinputPortNames () const
 Returns the names of the node input ports. More...
 
UT_Array< UT_StringHolderinputPortTypeNames () const
 Returns the type names of the node input ports. More...
 
UN_ConstPort findInputPort (const UT_StringRef &port_name) const
 
PortRange inputPortRange () const
 
PortReverseRange inputPortReverseRange () const
 
UT_Array< UN_ConstPortinputPorts () const
 Returns this node's input ports of the given kind. More...
 
bool isAnyOutputPortConnectedToDst () const
 
UT_Array< UT_StringHolderoutputPortNames () const
 Returns the names of the node output ports. More...
 
UT_Array< UT_StringHolderoutputPortTypeNames () const
 Returns the type names of the node output ports. More...
 
UN_ConstPort findOutputPort (const UT_StringRef &port_name) const
 
PortRange outputPortRange () const
 
PortReverseRange outputPortReverseRange () const
 
UT_Array< UN_ConstPortoutputPorts () const
 Returns this node's output ports of the given kind. More...
 
UT_StringHolder findValidUniqueChildNodeName (const UT_StringRef &child_name) const
 Returns a node name that is not taken by any of this nodes' children. More...
 
bool isSubnet () const
 Returns true if the node can have child nodes inside. More...
 
UT_Array< UT_StringHolderchildNodeNames () const
 Returns the names of the node children nodes. More...
 
UN_ConstNode findChildNode (const UT_StringRef &child_name) const
 
UN_ConstNode findNode (const UT_StringRef &node_path) const
 
ChildNodeRange childNodeRange () const
 Returns a range for iterating over node's immediate children. More...
 
UT_Array< UN_ConstNodechildNodes () const
 Returns the children nodes directly inside this node. More...
 
DescendantNodeRange descendantNodeRange () const
 
ChildWireRange childWireRange () const
 
UT_Array< UN_ConstWirechildWires () const
 
DescendantWireRange descendantWireRange () const
 
UN_ConstStickyNote findChildStickyNote (const UT_StringRef &child_name) const
 
UT_Array< UN_ConstStickyNotechildStickyNotes () const
 Returns the child sticky notes directly inside this node. More...
 
UN_OptionsPtr asOptions () const
 
const UN_GraphDatagraphData () const
 Returns the owner of the underlying graph data structures. More...
 
const UN_GraphDataconstGraphData () const
 Returns the owner of the underlying graph data structures. More...
 
bool isValid () const
 Returns true if this node is valid within the graph; false otherwise. More...
 
 operator bool () const
 Returns true if this node is valid within the graph; false otherwise. More...
 
- Public Member Functions inherited from UN_ConstHandle
 UN_ConstHandle ()
 Constructs a reference handle for an invalid entity in the graph. More...
 
 UN_ConstHandle (const UN_GraphData *graph_data, UN_DataID data_id)
 Constructs reference handle to the data for a given entity in the graph. More...
 
UN_DataID dataID () const
 
const UN_GraphDatagraphData () const
 Returns the underlying graph data object. More...
 
const UN_GraphDataconstGraphData () const
 Returns the underlying graph data object. More...
 

Additional Inherited Members

- Public Types inherited from UN_NodeBase< UN_ConstHandle, const UN_GraphData, UN_ConstNode, UN_ConstParm, UN_ConstPort, UN_ConstStickyNote, UN_ConstWire >
using ParmIterator = UN_HandleIterator< UN_ConstParm, const UN_GraphData, UN_NodeUtils::ParmIterator >
 An iterator and a range for parameters that belong to this node. More...
 
using ParmRange = UT_IteratorRange< ParmIterator >
 
using PortIterator = UN_HandleIterator< UN_ConstPort, const UN_GraphData, UN_NodeUtils::PortIterator >
 And iterator and a range for ports that belong to this node. More...
 
using PortRange = UT_IteratorRange< PortIterator >
 
using PortReverseIterator = UN_HandleIterator< UN_ConstPort, const UN_GraphData, UN_NodeUtils::PortReverseIterator >
 And iterator and a range for ports that belong to this node. More...
 
using PortReverseRange = UT_IteratorRange< PortReverseIterator >
 
using ChildNodeIterator = UN_HandleIterator< UN_ConstNode, const UN_GraphData, UN_NodeUtils::ChildNodeIterator >
 An iterator and a range for the children of this parent node. More...
 
using ChildNodeRange = UT_IteratorRange< ChildNodeIterator >
 
using DescendantNodeIterator = UN_HandleIterator< UN_ConstNode, const UN_GraphData, UN_NodeUtils::DescendantNodeIterator >
 
using DescendantNodeRange = UT_IteratorRange< DescendantNodeIterator >
 
using ChildWireIterator = UN_HandleIterator< UN_ConstWire, const UN_GraphData, UN_NodeUtils::ChildWireIterator >
 
using ChildWireRange = UT_IteratorRange< ChildWireIterator >
 
using DescendantWireIterator = UN_HandleIterator< UN_ConstWire, const UN_GraphData, UN_NodeUtils::DescendantWireIterator >
 
using DescendantWireRange = UT_IteratorRange< DescendantWireIterator >
 
- Protected Member Functions inherited from UN_NodeBase< UN_ConstHandle, const UN_GraphData, UN_ConstNode, UN_ConstParm, UN_ConstPort, UN_ConstStickyNote, UN_ConstWire >
 UN_NodeBase ()=default
 Constructs a handle for an invalid node. More...
 
 UN_NodeBase (const UN_GraphData *graph_data, UN_NodeID node_id)
 Constructs a handle that references the given node in the given graph. More...
 
- Protected Member Functions inherited from UN_ConstHandle
bool isNumericallyValid () const
 
bool operator== (const UN_ConstHandle &other) const
 
bool operator!= (const UN_ConstHandle &other) const
 

Detailed Description

A handle that references a const node in a graph. It abstracts the APIs that operate on this node's data stored inside graph's data containers. It is a constant handle, so allows only queries of the node's data, and does not allow setting any new values for.

Definition at line 805 of file UN_Node.h.

Constructor & Destructor Documentation

UN_ConstNode::UN_ConstNode ( )
default

Constructs a handle for an invalid node.

UN_ConstNode::UN_ConstNode ( const UN_GraphData graph_data,
UN_NodeID  node_id 
)
inline

Constructs a handle referencing the given node in the given graph.

Definition at line 814 of file UN_Node.h.

UN_ConstNode::UN_ConstNode ( const UN_Node node)
inline

Constructs a const handle from a mutable node handle.

Definition at line 819 of file UN_Node.h.

Member Function Documentation

UN_ConstGraph UN_ConstNode::graph ( ) const

Returns the graph within which this node exists.

bool UN_ConstNode::operator!= ( const UN_ConstNode other) const
inline

Comparison operators.

Definition at line 829 of file UN_Node.h.

bool UN_ConstNode::operator== ( const UN_ConstNode other) const
inline

Comparison operators.

Definition at line 827 of file UN_Node.h.


The documentation for this class was generated from the following file: