|
HDK
|
#include <UN_GraphTopology.h>
Public Member Functions | |
| void | clear () |
| Clear all the relationships between graph elements. More... | |
| void | merge (const UN_GraphTopology &other, const UN_IDRemapInfo &id_remap_info) |
| Merges in the graph element relationships from another topology. More... | |
| UN_NodeID | nodeParent (UN_NodeID child_node) const |
| UN_NodeID | nonRootNodeParent (UN_NodeID child_node) const |
| UN_SubnetID | nodeSubnet (UN_NodeID owner_node) const |
| UN_NodeID | subnetNode (UN_SubnetID subnet) const |
| Returns an owner node of the given subnet. More... | |
| UN_NodeID | wireParent (UN_WireID wire) const |
| Returns a parent node of the given wire. More... | |
| UN_NodeID | wireParent (UN_PortID src_port, UN_PortID dst_port) const |
| Returns a parent node of the wire that connects the given ports. More... | |
| UN_PortID | wireSrcPort (UN_WireID wire) const |
| UN_PortID | wireDstPort (UN_WireID wire) const |
| const UN_ParmIDList & | nodeParms (UN_NodeID node) const |
| Returns parameters of a given node. More... | |
| UN_NodeID | parmNode (UN_ParmID parm) const |
| Returns an owner node of the given parameter. More... | |
| const UN_PortIDList & | nodeInputPorts (UN_NodeID node) const |
| Returns input ports of the given node. More... | |
| const UN_PortIDList & | nodeOutputPorts (UN_NodeID node) const |
| Returns output ports of a given node. More... | |
| UN_NodeID | portNode (UN_PortID port) const |
| Returns an owner node of the given port. More... | |
| UN_PortKind | portKind (UN_PortID port) const |
| Returns the port kind (input or output) of the given port. More... | |
| const UN_WireIDList & | portSrcWires (UN_PortID port) const |
| const UN_WireIDList & | portDstWires (UN_PortID port) const |
| UN_NodeID | stickyNoteParent (UN_StickyNoteID child_sticky_note) const |
| Returns a parent node of the given child sticky note. More... | |
| void | addSubnet (UN_SubnetID new_subnet, UN_NodeID owner_node) |
| void | deleteSubnet (UN_SubnetID subnet) |
| Removes the subnet from the topology data structures. More... | |
| void | addNode (UN_NodeID new_node, UN_NodeID parent_node) |
| void | deleteNode (UN_NodeID node) |
| Removes the node from the topology data structures. More... | |
| void | moveNode (UN_NodeID node, UN_NodeID new_parent) |
| Moves a node from one parent to another. More... | |
| void | moveAllChildNodes (UN_NodeID old_parent, UN_NodeID new_parent) |
| Moves all children of the given parent node to another one. More... | |
| void | reorderChildren (UN_SubnetID subnet, const UT_Array< UN_NodeID > &child_order) |
| void | reorderInputPorts (UN_NodeID node, const UN_PortIDList &port_order) |
| void | reorderOutputPorts (UN_NodeID node, const UN_PortIDList &port_order) |
| void | reorderParms (UN_NodeID node, const UN_ParmIDList &parm_order) |
| void | addParm (UN_ParmID new_parm, UN_NodeID node) |
| void | deleteParm (UN_ParmID parm) |
| Removes the parameter from the topology data structures. More... | |
| void | addInputPort (UN_PortID new_input_port, UN_NodeID node, const UT_Optional< exint > &index=std::nullopt) |
| void | addOutputPort (UN_PortID new_output_port, UN_NodeID node, const UT_Optional< exint > &index=std::nullopt) |
| UN_WireIDList | deletePort (UN_PortID port) |
| void | addWire (UN_WireID new_wire, UN_PortID src_port, UN_PortID dst_port) |
| void | deleteWire (UN_WireID wire) |
| Removes the wire from the topology data structures. More... | |
| void | updateSubnetWires (UN_SubnetID old_subnet) |
| void | addStickyNote (UN_StickyNoteID new_sticky_note, UN_NodeID parent_node) |
| void | deleteStickyNote (UN_StickyNoteID sticky_note) |
| Removes the sticky note from the topology data structures. More... | |
| const UN_NodeIDList & | nodeChildNodes (UN_NodeID parent_node) const |
| Returns child nodes of a given parent subnet node. More... | |
| const UN_NodeIDList & | subnetChildNodes (UN_SubnetID parent_subnet) const |
| Returns child nodes of a given parent subnet node. More... | |
| const UN_WireIDList & | nodeChildWires (UN_NodeID parent_node) const |
| Returns child wires of a given parent subnet node. More... | |
| const UN_WireIDList & | subnetChildWires (UN_SubnetID parent_subnet) const |
| Returns child wires of a given parent subnet node. More... | |
| const UN_StickyNoteIDList & | nodeChildStickyNotes (UN_NodeID parent_node) const |
| Returns child sticky notes of a given parent subnet node. More... | |
| const UN_StickyNoteIDList & | subnetChildStickyNotes (UN_SubnetID parent_subnet) const |
| Returns child sticky notes of a given parent subnet node. More... | |
Container for the information about connections between various graph elements:
Definition at line 26 of file UN_GraphTopology.h.
| void UN_GraphTopology::addInputPort | ( | UN_PortID | new_input_port, |
| UN_NodeID | node, | ||
| const UT_Optional< exint > & | index = std::nullopt |
||
| ) |
Adds a new input port to the topology, and links it as an input of the given node.
| index | If given, this is the index position at which to insert the new port. Negative numbers are wrapped around, and counted backwards (ie, -1 corresponds to the current last port). If not given, the new port is appended to the node. |
| void UN_GraphTopology::addNode | ( | UN_NodeID | new_node, |
| UN_NodeID | parent_node | ||
| ) |
Adds a new node to the topology, and links it as a child of the given parent node, which already exists in the topology along with a subnet object associated with it.
| void UN_GraphTopology::addOutputPort | ( | UN_PortID | new_output_port, |
| UN_NodeID | node, | ||
| const UT_Optional< exint > & | index = std::nullopt |
||
| ) |
Adds a new output port to the topology, and links it as an output of the given node.
| index | If given, this is the index position at which to insert the new port. Negative numbers are wrapped around, and counted backwards (ie, -1 corresponds to the current last port). If not given, the new port is appended to the node. |
| void UN_GraphTopology::addParm | ( | UN_ParmID | new_parm, |
| UN_NodeID | node | ||
| ) |
Adds a new parameter to the topology, and links (adds) it as a parameter of the given node.
| void UN_GraphTopology::addStickyNote | ( | UN_StickyNoteID | new_sticky_note, |
| UN_NodeID | parent_node | ||
| ) |
Adds a new sticky note to the topology, and links it as a child of the given parent node, which already exists in the topology along with a subnet object associated with it.
| void UN_GraphTopology::addSubnet | ( | UN_SubnetID | new_subnet, |
| UN_NodeID | owner_node | ||
| ) |
Adds a new subnet to the topology, and links it with the given node, making that node a subnet (a parent) that can contain children.
| void UN_GraphTopology::addWire | ( | UN_WireID | new_wire, |
| UN_PortID | src_port, | ||
| UN_PortID | dst_port | ||
| ) |
Adds a new wire to the topology, and links it with the two ports. Ie, creates a connection between the two given ports, from the source port to the destination port.
| void UN_GraphTopology::clear | ( | ) |
Clear all the relationships between graph elements.
| void UN_GraphTopology::deleteNode | ( | UN_NodeID | node | ) |
Removes the node from the topology data structures.
| void UN_GraphTopology::deleteParm | ( | UN_ParmID | parm | ) |
Removes the parameter from the topology data structures.
| UN_WireIDList UN_GraphTopology::deletePort | ( | UN_PortID | port | ) |
Removes the port from the topology data structures. Returns the list of wires that also got removed (deleted), because they were connected to the port being deleted.
| void UN_GraphTopology::deleteStickyNote | ( | UN_StickyNoteID | sticky_note | ) |
Removes the sticky note from the topology data structures.
| void UN_GraphTopology::deleteSubnet | ( | UN_SubnetID | subnet | ) |
Removes the subnet from the topology data structures.
| void UN_GraphTopology::deleteWire | ( | UN_WireID | wire | ) |
Removes the wire from the topology data structures.
| void UN_GraphTopology::merge | ( | const UN_GraphTopology & | other, |
| const UN_IDRemapInfo & | id_remap_info | ||
| ) |
Merges in the graph element relationships from another topology.
| void UN_GraphTopology::moveAllChildNodes | ( | UN_NodeID | old_parent, |
| UN_NodeID | new_parent | ||
| ) |
Moves all children of the given parent node to another one.
| void UN_GraphTopology::moveNode | ( | UN_NodeID | node, |
| UN_NodeID | new_parent | ||
| ) |
Moves a node from one parent to another.
|
inline |
Returns child nodes of a given parent subnet node.
Definition at line 58 of file UN_GraphTopology.h.
|
inline |
Returns child sticky notes of a given parent subnet node.
Definition at line 84 of file UN_GraphTopology.h.
|
inline |
Returns child wires of a given parent subnet node.
Definition at line 71 of file UN_GraphTopology.h.
|
inline |
Returns input ports of the given node.
Definition at line 145 of file UN_GraphTopology.h.
|
inline |
Returns output ports of a given node.
Definition at line 153 of file UN_GraphTopology.h.
|
inline |
Returns a parent node of the given child node. This may include an implicitly created graph's root node, which is isn't really a real user-created node. Use nonRootNodeParent() to get a parent that was explicitly created.
Definition at line 41 of file UN_GraphTopology.h.
|
inline |
Returns parameters of a given node.
Definition at line 132 of file UN_GraphTopology.h.
|
inline |
Returns a subnet object of the given (owner parent) node. The subnet contains information about the given node's children, etc.
Definition at line 101 of file UN_GraphTopology.h.
|
inline |
Returns an explicitly created parent node of the given child node. Ie, for top-level graph nodes whose parent is the implicitly created graph's root, this method will return an invalid node ID. Use nodeParent() to include the root node too.
Definition at line 48 of file UN_GraphTopology.h.
|
inline |
Returns an owner node of the given parameter.
Definition at line 139 of file UN_GraphTopology.h.
|
inline |
Returns destination wires connected to the given port. Ie, connection wires to which this port provides (sends) data.
Definition at line 192 of file UN_GraphTopology.h.
|
inline |
Returns the port kind (input or output) of the given port.
Definition at line 166 of file UN_GraphTopology.h.
|
inline |
Returns an owner node of the given port.
Definition at line 162 of file UN_GraphTopology.h.
|
inline |
Returns source wires connected to the given port. Ie, connection wires from which this port takes (receives) data.
Definition at line 183 of file UN_GraphTopology.h.
| void UN_GraphTopology::reorderChildren | ( | UN_SubnetID | subnet, |
| const UT_Array< UN_NodeID > & | child_order | ||
| ) |
Sets the new order for the children of the given parent subnet. The new order must contain exactly the same child node IDs as the current child list of the subnet, just in a different order.
| void UN_GraphTopology::reorderInputPorts | ( | UN_NodeID | node, |
| const UN_PortIDList & | port_order | ||
| ) |
Sets the new order for input ports on the given node. The new order must contain exactly the same port IDs as the current input port list for the node, just in a different order.
| void UN_GraphTopology::reorderOutputPorts | ( | UN_NodeID | node, |
| const UN_PortIDList & | port_order | ||
| ) |
Sets the new order for output ports on the given node. The new order must contain exactly the same port IDs as the current output port list for the node, just in a different order.
| void UN_GraphTopology::reorderParms | ( | UN_NodeID | node, |
| const UN_ParmIDList & | parm_order | ||
| ) |
Sets the new order for parameters on the given node. The new order must contain exactly the same parm IDs as the current parm list for the node, just in a different order.
|
inline |
Returns a parent node of the given child sticky note.
Definition at line 199 of file UN_GraphTopology.h.
|
inline |
Returns child nodes of a given parent subnet node.
Definition at line 62 of file UN_GraphTopology.h.
|
inline |
Returns child sticky notes of a given parent subnet node.
Definition at line 91 of file UN_GraphTopology.h.
|
inline |
Returns child wires of a given parent subnet node.
Definition at line 75 of file UN_GraphTopology.h.
|
inline |
Returns an owner node of the given subnet.
Definition at line 105 of file UN_GraphTopology.h.
| void UN_GraphTopology::updateSubnetWires | ( | UN_SubnetID | old_subnet | ) |
Updates the internal dictionaries after nodes have been moved to a new subnet.
|
inline |
Returns a destination port of the given wire. Ie, a port to which this wire provides (sends) data.
Definition at line 126 of file UN_GraphTopology.h.
|
inline |
Returns a parent node of the given wire.
Definition at line 110 of file UN_GraphTopology.h.
| UN_NodeID UN_GraphTopology::wireParent | ( | UN_PortID | src_port, |
| UN_PortID | dst_port | ||
| ) | const |
Returns a parent node of the wire that connects the given ports.
|
inline |
Returns a source port of the given wire. Ie, a port from which this wire takes (receives) data.
Definition at line 121 of file UN_GraphTopology.h.