HDK
|
#include <UN_Port.h>
Public Types | |
using | SrcPortIterator = UN_WireArrayPortIterator< true > |
And iterator and a range for iterating over connected source ports. More... | |
using | SrcPortRange = UT_IteratorRange< SrcPortIterator > |
using | DstPortIterator = UN_WireArrayPortIterator< false > |
And iterator and a range for iterating over connected destination ports. More... | |
using | DstPortRange = UT_IteratorRange< DstPortIterator > |
Public Member Functions | |
UN_Port (UN_GraphData *graph_data, UN_PortID port_id) | |
Convenience constructor for the port handle. More... | |
UN_Node | node () const |
Returns the parent of this node. More... | |
UN_PortKind | kind () const |
Returns the kind of a port. Ie, if a port is an input or an output. More... | |
UT_StringHolder | name () const |
Returns the name of the port. More... | |
UT_StringHolder | typeName () const |
Returns name of the type of the port. More... | |
UN_Wire | connectSrcPort (const UN_Port &src_port) const |
void | disconnectSrcPort (const UN_Port &src_port) const |
Disconnects this port from the given source. More... | |
void | disconnectAllSrcPorts () const |
Disconnect this port from all its connected sources. More... | |
void | disconnectAllDstPorts () const |
UT_Array< UN_Wire > | srcWires () const |
UT_Array< UN_Wire > | dstWires () const |
UN_Port | srcPort () const |
SrcPortRange | srcPortRange () const |
Returns a range for iterating over this port's source ports. More... | |
DstPortRange | dstPortRange () const |
Returns a range for iterating over this port's destination ports. More... | |
void | destroy () const |
Deletes this port. More... | |
UN_PortID | portID () const |
Returns the unique ID of the port data this handle refers to. More... | |
UN_Port () | |
Default destructor, constructors and assignment operators. More... | |
~UN_Port () | |
Default destructor, constructors and assignment operators. More... | |
UN_Port (const UN_Port &) | |
Default destructor, constructors and assignment operators. More... | |
UN_Port (UN_Port &&) | |
Default destructor, constructors and assignment operators. More... | |
UN_Port & | operator= (const UN_Port &) |
Default destructor, constructors and assignment operators. More... | |
UN_Port & | operator= (UN_Port &&) |
Default destructor, constructors and assignment operators. More... | |
bool | isValid () const |
Returns true if the parameter exists; false otherwise. More... | |
operator bool () const | |
Returns true if the parameter exists; false otherwise. More... | |
bool | operator== (const UN_Port &other) const |
Comparison operators. More... | |
bool | operator!= (const UN_Port &other) const |
Comparison operators. More... | |
Public Member Functions inherited from UN_Handle | |
UN_Handle (UN_GraphData *graph_data, UN_DataID data_id) | |
Convenience constructor. More... | |
UN_Handle () | |
Default constructor. More... | |
UN_DataID | dataID () const |
~UN_Handle ()=default | |
Default destructor, constructors and assignment operators. More... | |
UN_Handle (const UN_Handle &)=default | |
Default destructor, constructors and assignment operators. More... | |
UN_Handle (UN_Handle &&)=default | |
Default destructor, constructors and assignment operators. More... | |
UN_Handle & | operator= (const UN_Handle &)=default |
Default destructor, constructors and assignment operators. More... | |
UN_Handle & | operator= (UN_Handle &&)=default |
Default destructor, constructors and assignment operators. More... | |
bool | operator== (const UN_Handle &other) const |
Comparison operators. More... | |
bool | operator!= (const UN_Handle &other) const |
Comparison operators. More... | |
Protected Member Functions | |
UN_PortData * | portData () const |
The port data container for all the ports in the graph. More... | |
Protected Member Functions inherited from UN_Handle | |
UN_GraphData * | graphData () const |
A light-weight handle for a port data object.
The actual port data (UN_PortDataStruct) is owned and managed by UN_GraphData, and UN_Port serves as a handle for clients to refer to that port data.
using UN_Port::DstPortIterator = UN_WireArrayPortIterator< false > |
using UN_Port::DstPortRange = UT_IteratorRange< DstPortIterator > |
using UN_Port::SrcPortIterator = UN_WireArrayPortIterator< true > |
using UN_Port::SrcPortRange = UT_IteratorRange< SrcPortIterator > |
UN_Port::UN_Port | ( | UN_GraphData * | graph_data, |
UN_PortID | port_id | ||
) |
Convenience constructor for the port handle.
UN_Port::UN_Port | ( | ) |
Default destructor, constructors and assignment operators.
UN_Port::~UN_Port | ( | ) |
Default destructor, constructors and assignment operators.
UN_Port::UN_Port | ( | const UN_Port & | ) |
Default destructor, constructors and assignment operators.
UN_Port::UN_Port | ( | UN_Port && | ) |
Default destructor, constructors and assignment operators.
Connects this port to a source from which to obtain data or a value. Returns the newly created connection wire (may be invalid, if error).
void UN_Port::destroy | ( | ) | const |
Deletes this port.
void UN_Port::disconnectAllDstPorts | ( | ) | const |
Disconnect this port from all its connected destinations, to which this port provides data.
void UN_Port::disconnectAllSrcPorts | ( | ) | const |
Disconnect this port from all its connected sources.
Disconnects this port from the given source.
DstPortRange UN_Port::dstPortRange | ( | ) | const |
Returns a range for iterating over this port's destination ports.
Returns the wires connecting this port to its destinations. Ie, connection wires to which this port provides (sends) data.
bool UN_Port::isValid | ( | ) | const |
Returns true if the parameter exists; false otherwise.
UN_PortKind UN_Port::kind | ( | ) | const |
Returns the kind of a port. Ie, if a port is an input or an output.
UT_StringHolder UN_Port::name | ( | ) | const |
Returns the name of the port.
UN_Node UN_Port::node | ( | ) | const |
Returns the parent of this node.
|
inlineexplicit |
|
inline |
Default destructor, constructors and assignment operators.
Default destructor, constructors and assignment operators.
|
inline |
|
protected |
The port data container for all the ports in the graph.
|
inline |
UN_Port UN_Port::srcPort | ( | ) | const |
Returns the first source port connected to this port. May return an invalid port if no source port is connected. This is a convenience method for very common graphs, where ports can have at most one source.
SrcPortRange UN_Port::srcPortRange | ( | ) | const |
Returns a range for iterating over this port's source ports.
Returns the wires connecting this port to its sources. Ie, connection wires from which this port takes (receives) data.
UT_StringHolder UN_Port::typeName | ( | ) | const |
Returns name of the type of the port.