template<typename BASE>
class maxon::nodes::MutablePortFunctions< BASE >
This class template contains the functions of MutablePortList which shall also be available on Result<MutablePortList>.
|
Result< void > | Connect (Result< MutablePort > &&target, Wires modes=WIRE_MODE::CONNECT_DEFAULT, Opt< ChangeList & > list={}) const |
|
template<typename T > |
Result< void > | SetDefaultValue (T &&value) const |
|
Result< void > | SetType (const DataType &dataType) const |
|
template<typename T > |
Result< void > | SetType () const |
|
Result< Bool > | SetConnectionValue (const MutablePort &target, CONNECTION_POSITION position, const InternedId &attr, ForwardingDataPtr &&value, Opt< ChangeList & > list={}) const |
|
template<typename ATTR > |
Result< Bool > | SetConnectionValue (const MutablePort &target, CONNECTION_POSITION position, const ATTR &attr, const typename ATTR::ValueType &value, Opt< ChangeList & > list={}) const |
|
template<typename ATTR > |
Result< Bool > | SetConnectionValue (const MutablePort &target, CONNECTION_POSITION position, const ATTR &attr, typename ATTR::ValueType &&value, Opt< ChangeList & > list={}) const |
|
Result< PortListSelector< BASE::MUTABLE > > | GetParent () const |
|
Result< Bool > | GetConnections (PORT_DIR dir, const ValueReceiver< const ConnectionSelector< BASE::MUTABLE > & > &conns, Wires mask=Wires::All(), NodeSystemInterface::GET_CONNECTIONS_MODE mode=NodeSystemInterface::GET_CONNECTIONS_MODE::CONNECTIONS) const |
|
Result< Wires > | GetWires (const PortSelector< BASE::MUTABLE > &target) const |
|
Result< Bool > | GetConnectionValues (const PortSelector< BASE::MUTABLE > &target, const ValueReceiver< CONNECTION_POSITION, InternedId, const ConstDataPtr & > &receiver) const |
|
Result< ConstDataPtr > | GetConnectionValue (const PortSelector< BASE::MUTABLE > &target, CONNECTION_POSITION position, const InternedId &attr, const DataType &expectedType) const |
|
template<typename T > |
Result< Opt< const T & > > | GetConnectionValue (const PortSelector< BASE::MUTABLE > &target, CONNECTION_POSITION position, const InternedId &attr) const |
|
template<typename ATTR > |
Result< Opt< const typename ATTR::ValueType & > > | GetConnectionValue (const PortSelector< BASE::MUTABLE > &target, CONNECTION_POSITION position, const ATTR &attr) const |
|
TimeStamp | GetConnectionStamp (PORT_DIR direction) const |
|
Bool | IsPortOfRoot () const |
|
Bool | IsTopLevelPort () const |
|
Int | GetTopologicalLayer () const |
|
template<typename PATH > |
Result< void > | InitFromPath (typename PortFunctionsSuper< BASE >::NodeSystemCtorParam system, PATH &&path, NODE_KIND check=NODE_KIND::PORT_MASK) |
|
Connects this port to the other port #target using the given wire #modes. Usually you use one of the values WIRE_MODE::MIN, WIRE_MODE::NORMAL, WIRE_MODE::MAX for #modes, then a connection with a value wire of the given priority is created from this port to the #target port. But you can also add dependency and event wires by using an appropriate Wires value for #modes. And for each wire you can specify one of the special wire modes:
Typically, you connect an output port of a root child node to an input port of another root child node. But you can also connect
- an output port of a root child node to an output port of the root node (to forward the output of the child node to the root node)
- an input port of the root node to an input port of a root child node, (to forward the input of the root node to the child node)
- an input port of the root node to an output port of the same root node (to forward the input directly to the output without changing anything).
It is not possible to connect ports which don't belong to the root node or its direct children.
It is not allowed to create a cycle in the graph. However the Connect function itself doesn't check this, it is done later during e.g. MutableRoot::Validate or MutableRoot::EndModification. Therefore it is possible to temporarily introduce a cycle and resolve this immediately afterwards by removing another connection.
- Parameters
-
[in] | target | The target port to connect to. Result<MutablePort> is accepted and the error, if any, is forwarded. |
[in] | modes | The Wires to use for the connection. |
[in] | list | An optional ChangeList to track the changes. |
- Returns
- OK on success.