#include <nodesystem.h>
This class template contains the functions of MutablePortList which shall also be available on Result<MutablePortList>.
Public Types | |
template<typename SUPER > | |
using | ResultFunctions = MutablePortFunctions< maxon::nodes::details::GNodeResultBase< SUPER > > |
using | Super = PortFunctions< BASE > |
![]() | |
template<typename SUPER > | |
using | ResultFunctions = PortFunctions< maxon::nodes::details::GNodeResultBase< SUPER > > |
using | Super = PortFunctionsSuper< BASE > |
Public Member Functions | |
Result< void > | Connect (Result< MutablePort > &&target, Wires modes=WIRE_MODE::CONNECT_DEFAULT, Opt< ChangeList & > list={}) const |
template<typename T > | |
Result< Bool > | SetPortValue (T &&value) const |
template<typename T > | |
MAXON_ATTRIBUTE_FORCE_INLINE Result< Bool > | 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 |
template<typename T > | |
Result< Opt< const T & > > | GetPortValue () const |
template<typename T > | |
Result< Opt< const T & > > | GetEffectivePortValue () const |
template<typename T > | |
MAXON_ATTRIBUTE_FORCE_INLINE Result< const T & > | GetDefaultValue (const T &def=maxon::DefaultValue< const T & >()) const |
template<typename T > | |
MAXON_ATTRIBUTE_FORCE_INLINE Result< const T & > | GetConstantValue (const T &def=maxon::DefaultValue< const T & >()) 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) |
using ResultFunctions = MutablePortFunctions <maxon::nodes::details::GNodeResultBase<SUPER> > |
using Super = PortFunctions<BASE> |
Result<void> Connect | ( | Result< MutablePort > && | target, |
Wires | modes = WIRE_MODE::CONNECT_DEFAULT , |
||
Opt< ChangeList & > | list = {} |
||
) | const |
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
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.
[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. |
Sets the value of the DESCRIPTION::DATA::BASE::DEFAULTVALUE attribute to value for this port. This will override any values which would otherwise be inherited from a base or downstream port.
[in] | value | New value for the port. |
MAXON_ATTRIBUTE_FORCE_INLINE Result<Bool> SetDefaultValue | ( | T && | value | ) | const |
Sets the given #dataType as the value of the FixedPortType attribute.
[in] | dataType | The data type for this port. |
Result<void> SetType | ( | ) | const |
Sets the type T as the value of the FixedPortType attribute.
T | The data type for this port. |
Result<Bool> SetConnectionValue | ( | const MutablePort & | target, |
CONNECTION_POSITION | position, | ||
const InternedId & | attr, | ||
ForwardingDataPtr && | value, | ||
Opt< ChangeList & > | list = {} |
||
) | const |
Sets the value of #attr to value for the connection from this port to #target. This will override any previously existing value.
[in] | target | The other end of the connection. |
[in] | position | The connection position at which the attribute's value shall be set. |
[in] | attr | The attribute whose value shall be set. |
[in] | value | The value for the attribute. |
Result<Bool> SetConnectionValue | ( | const MutablePort & | target, |
CONNECTION_POSITION | position, | ||
const ATTR & | attr, | ||
const typename ATTR::ValueType & | value, | ||
Opt< ChangeList & > | list = {} |
||
) | const |
Sets the value of #attr to value for this node. This will override any previously existing value.
[in] | attr | The attribute whose value shall be set. |
[in] | target | The other end of the connection. |
[in] | position | The connection position at which the attribute's value shall be set. |
[in] | value | The value for the attribute. |
Result<Bool> SetConnectionValue | ( | const MutablePort & | target, |
CONNECTION_POSITION | position, | ||
const ATTR & | attr, | ||
typename ATTR::ValueType && | value, | ||
Opt< ChangeList & > | list = {} |
||
) | const |
Sets the value of #attr to value for this node. This will override any previously existing value.
[in] | attr | The attribute whose value shall be set. |
[in] | target | The other end of the connection. |
[in] | position | The connection position at which the attribute's value shall be set. |
[in] | value | The value for the attribute. |