MutablePortListFunctions< BASE > Class Template Reference

#include <nodesystem.h>

Inheritance diagram for MutablePortListFunctions< BASE >:

Detailed Description

template<typename BASE>
class maxon::nodes::MutablePortListFunctions< BASE >

This class template contains the functions of MutablePortList which shall also be available on Result<MutablePortList>.

Public Types

template<typename SUPER >
using ResultFunctions = MutablePortListFunctions< maxon::nodes::details::GNodeResultBase< SUPER > >
 
using Super = PortListFunctions< BASE >
 
- Public Types inherited from PortListFunctions< BASE >
using Iterator = GNodeIterator< PortSelector< BASE::MUTABLE > >
 
template<typename SUPER >
using ResultFunctions = PortListFunctions< maxon::nodes::details::GNodeResultBase< SUPER > >
 
using Super = maxon::nodes::details::NodeFunctionsSuper< BASE >
 

Public Member Functions

Result< MutablePortAddPort (const Id &portId, GNODE_FLAGS flags=GNODE_FLAGS::NONE) const
 
Result< MutablePortAddPort (const Id &portId, Opt< ChangeList & > list) const
 
template<typename ATTR >
Result< typename SFINAEHelper< MutablePort, ATTR >::typeAddPort () const
 
Result< MutablePortFindOrAddPort (const Id &portId, Opt< ChangeList & > list={}) const
 
- Public Member Functions inherited from PortListFunctions< BASE >
PORT_DIR GetPortDirection () const
 
Result< NodeSelector< BASE::MUTABLE > > GetNode () const
 
Result< IteratorGetPorts () const
 
Result< PortSelector< BASE::MUTABLE > > GetSinglePort () const
 
Result< PortSelector< BASE::MUTABLE > > FindPort (const InternedId &port) const
 
Result< PortSelector< BASE::MUTABLE > > FindPort (const Id &port) const
 
template<typename PATH >
Result< void > InitFromPath (typename maxon::nodes::details::NodeFunctionsSuper< BASE >::NodeSystemCtorParam system, PATH &&path, NODE_KIND check=NODE_KIND::PORTLIST_MASK|NODE_KIND::PORT_MASK)
 

Member Typedef Documentation

◆ ResultFunctions

◆ Super

using Super = PortListFunctions<BASE>

Member Function Documentation

◆ AddPort() [1/3]

Result<MutablePort> AddPort ( const Id portId,
GNODE_FLAGS  flags = GNODE_FLAGS::NONE 
) const

Adds a new port to this port list or port. The port will have #portId as its identifier.

Parameters
[in]portIdThe identifier for the new port. An error is returned if the identifier is empty, or if there already exists a port for the identifier.
Returns
A reference to the added port.

◆ AddPort() [2/3]

Result<MutablePort> AddPort ( const Id portId,
Opt< ChangeList & >  list 
) const

Adds a new port to this port list or port. The port will have #portId as its identifier.

Parameters
[in]portIdThe identifier for the new port. An error is returned if the identifier is empty, or if there already exists a port for the identifier.
[in]listAn optional ChangeList to track the changes.
Returns
A reference to the added port.

◆ AddPort() [3/3]

Result<typename SFINAEHelper<MutablePort, ATTR>::type> AddPort ( ) const

Adds a new port to this port list or port. The port uses identifier and type from ATTR.

Template Parameters
ATTRAn attribute declared by MAXON_ATTRIBUTE.
Returns
A reference to the added port.

◆ FindOrAddPort()

Result<MutablePort> FindOrAddPort ( const Id portId,
Opt< ChangeList & >  list = {} 
) const

Adds a new port to this port list or port if it doesn't exist already. otherwise returns the existing port. The port will have #portId as its identifier.

Parameters
[in]portIdThe identifier for the port. An error is returned if the identifier is empty.
[in]listAn optional ChangeList to track the changes.
Returns
A reference to the found or added port.