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

#include <UN_Port.h>

+ Inheritance diagram for UN_ConstPort:

Public Member Functions

 UN_ConstPort ()=default
 Constructs a handle for an invalid port. More...
 
 UN_ConstPort (const UN_GraphData *graph_data, UN_PortID port_id)
 Constructs a handle referencing the given port in the given graph. More...
 
 UN_ConstPort (const UN_Port &port)
 Constructs a const handle from a mutable port handle. More...
 
UN_ConstGraph graph () const
 Returns the graph within which this wire exists. More...
 
UN_ConstNode node () const
 Returns the node to which this port belongs. More...
 
bool operator== (const UN_ConstPort &other) const
 Comparison operators. More...
 
bool operator!= (const UN_ConstPort &other) const
 Comparison operators. More...
 
- Public Member Functions inherited from UN_PortBase< UN_ConstHandle, const UN_GraphData, UN_ConstPort, UN_ConstWire >
UN_PortID portID () const
 Returns the unique ID of the port this handle refers to. More...
 
UN_PortKind kind () const
 Returns the kind of a port. Ie, an input or an output. More...
 
bool isInput () const
 
bool isOutput () const
 
const UT_StringHoldername () const
 Returns the port name that identifies it on the node. More...
 
const UT_StringHoldertypeName () const
 Returns the port's type that determines the connection compatibility. More...
 
const UT_StringHolderlabel () const
 Returns the port's label. More...
 
const UT_StringArraytags () const
 Returns the port's tags. More...
 
UN_DataSize srcWireCount () const
 Returns the number of source ports connected to the given port. More...
 
UN_DataSize dstWireCount () const
 Returns the number of destination ports connected to the given port. More...
 
UN_DataSize wireCount () const
 
bool isConnectedToSrc () const
 Returns true if this port is connected to any source port. More...
 
bool isConnectedToSrc (const UN_ConstPort &src_port) const
 Returns true if this port is connected to the given source port. More...
 
bool isConnectedToDst () const
 Returns true if this port is connected to any destination port. More...
 
bool isConnectedToDst (const UN_ConstPort &dst_port) const
 Returns true if this port is connected to the given destination port. More...
 
bool isConnected () const
 Returns true if this port is connected to any other port. More...
 
bool isConnected (const UN_ConstPort &port) const
 
SrcWireRange srcWireRange () const
 
DstWireRange dstWireRange () const
 
UT_Array< UN_ConstWiresrcWires () const
 
UT_Array< UN_ConstWiredstWires () const
 
SrcPortRange srcPortRange () const
 
DstPortRange dstPortRange () const
 
UN_ConstPort srcPort () const
 
UN_ConstPort dstPort () const
 
UT_Array< UN_ConstPortsrcPorts () const
 
UT_Array< UN_ConstPortdstPorts () 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 port is valid within the graph; false otherwise. More...
 
 operator bool () const
 Returns true if this port 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_PortBase< UN_ConstHandle, const UN_GraphData, UN_ConstPort, UN_ConstWire >
using SrcWireIterator = UN_HandleIterator< UN_ConstWire, const UN_GraphData, UN_PortUtils::WireIterator >
 
using SrcWireRange = UT_IteratorRange< SrcWireIterator >
 
using DstWireIterator = UN_HandleIterator< UN_ConstWire, const UN_GraphData, UN_PortUtils::WireIterator >
 
using DstWireRange = UT_IteratorRange< DstWireIterator >
 
using SrcPortIterator = UN_HandleIterator< UN_ConstPort, const UN_GraphData, UN_PortUtils::PortIterator< true >>
 And iterator and a range for iterating over connected source ports. More...
 
using SrcPortRange = UT_IteratorRange< SrcPortIterator >
 
using DstPortIterator = UN_HandleIterator< UN_ConstPort, const UN_GraphData, UN_PortUtils::PortIterator< false >>
 And iterator and a range for iterating over connected destination ports. More...
 
using DstPortRange = UT_IteratorRange< DstPortIterator >
 
- Protected Member Functions inherited from UN_PortBase< UN_ConstHandle, const UN_GraphData, UN_ConstPort, UN_ConstWire >
 UN_PortBase ()=default
 Constructs a handle for an invalid port. More...
 
 UN_PortBase (const UN_GraphData *graph_data, UN_PortID port_id)
 Constructs a handle that references the given port 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 port in a graph. It abstracts the APIs that operate on this port's data stored inside graph's data containers. It is a constant handle, so allows only queries of the port's data, and does not allow setting any new values for.

Definition at line 439 of file UN_Port.h.

Constructor & Destructor Documentation

UN_ConstPort::UN_ConstPort ( )
default

Constructs a handle for an invalid port.

UN_ConstPort::UN_ConstPort ( const UN_GraphData graph_data,
UN_PortID  port_id 
)
inline

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

Definition at line 447 of file UN_Port.h.

UN_ConstPort::UN_ConstPort ( const UN_Port port)
inline

Constructs a const handle from a mutable port handle.

Definition at line 452 of file UN_Port.h.

Member Function Documentation

UN_ConstGraph UN_ConstPort::graph ( ) const

Returns the graph within which this wire exists.

UN_ConstNode UN_ConstPort::node ( ) const

Returns the node to which this port belongs.

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

Comparison operators.

Definition at line 461 of file UN_Port.h.

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

Comparison operators.

Definition at line 459 of file UN_Port.h.


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