#include <graph.h>
Base class of GraphNode and Result<GraphNode> which implements most GraphNode functions.
Public Member Functions | |
GraphNodeFunctions ()=default | |
template<typename ARG > | |
GraphNodeFunctions (ARG &&arg) | |
Result< void > | Remove () const |
Result< Bool > | GetChildren (const ValueReceiver< const GraphNode & > &callback, NODE_KIND mask=NODE_KIND::ALL_MASK) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | GetParent () const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | GetAncestor (NODE_KIND mask) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | GetInputs () const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | GetOutputs () const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | GetPortList (PORT_DIR dir) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | FindChild (const InternedId &name) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | FindChild (const Id &name) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | FindChild (NODE_KIND mask) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | FindPort (const InternedId &name) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | FindInnerNode (const PathBlock &relativePath) const |
Result< Bool > | GetInnerNodes (NODE_KIND mask, Bool includeThis, const ValueReceiver< const GraphNode & > &receiver) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | AddPort (const Id &name) const |
Result< typename SFINAEHelper< GraphNode, BASE >::type > | AddPort (const InternedId &name) const |
Result< BaseArray< typename SFINAEHelper< GraphNode, BASE >::type > > | AddPorts (Int index, Int count) const |
Result< void > | RemovePorts (const Block< const InternedId > &ports) const |
Result< Bool > | GetConnections (PORT_DIR dir, const ValueReceiver< const GraphConnection & > &conns, Wires mask=Wires::All(), GraphModelInterface::GET_CONNECTIONS_MODE mode=GraphModelInterface::GET_CONNECTIONS_MODE::CONNECTIONS) const |
Result< Wires > | GetWires (const GraphNode &target) const |
Result< Bool > | GetConnectionValues (const GraphNode &target, const ValueReceiver< CONNECTION_POSITION, InternedId, const ConstDataPtr & > &receiver) const |
Result< ConstDataPtr > | GetConnectionValue (const GraphNode &target, CONNECTION_POSITION position, const InternedId &attr, const DataType &expectedType, Bool reverse=false) const |
template<typename T > | |
Result< Opt< const T & > > | GetConnectionValue (const GraphNode &target, CONNECTION_POSITION position, const InternedId &attr, Bool reverse=false) const |
template<typename ATTR > | |
Result< Opt< const typename ATTR::ValueType & > > | GetConnectionValue (const GraphNode &target, CONNECTION_POSITION position, const ATTR &attr, Bool reverse=false) const |
Result< Bool > | SetConnectionValue (const GraphNode &target, CONNECTION_POSITION position, const InternedId &attr, ForwardingDataPtr &&value) const |
template<typename ATTR > | |
Result< Bool > | SetConnectionValue (const GraphNode &target, CONNECTION_POSITION position, const ATTR &attr, const typename ATTR::ValueType &value) const |
template<typename ATTR > | |
Result< Bool > | SetConnectionValue (const GraphNode &target, CONNECTION_POSITION position, const ATTR &attr, typename ATTR::ValueType &&value) const |
Result< void > | Connect (const GraphNode &target, Wires modes=WIRE_MODE::CONNECT_DEFAULT, Bool reverse=false) const |
Result< void > | Connect (const Result< typename SFINAEHelper< GraphNode, BASE >::type > &target, Wires modes=WIRE_MODE::CONNECT_DEFAULT, Bool reverse=false) const |
Result< void > | RemoveConnections (PORT_DIR dir, Wires mask=Wires::All(WIRE_MODE::FULL_MASK)) const |
Result< Bool > | IsConnectable (const GraphNode &target) const |
Result< void > | GetValues (GraphAttributeInterface::FLAGS mask, GraphAttributeMap &map) const |
Result< Bool > | RemoveValue (const InternedId &attr) const |
Result< Bool > | InheritValue (const InternedId &attr) const |
Result< ConstDataPtr > | GetValue (const InternedId &attr, const DataType &expectedType) const |
Result< ConstDataPtr > | GetStoredValue (const InternedId &attr, const DataType &expectedType) const |
Result< Bool > | GetBaseValues (const InternedId &attr, const DataType &expectedType, const ValueReceiver< const ConstDataPtr &, Int > &valueReceiver) const |
template<typename T > | |
Result< Opt< const T & > > | GetValue (const InternedId &attr) const |
template<typename ATTR > | |
Result< Opt< const typename ATTR::ValueType & > > | GetValue () const |
template<typename ATTR > | |
Result< Opt< const typename ATTR::ValueType & > > | GetValue (const ATTR &attr) const |
template<typename ATTR > | |
Result< Opt< const typename ATTR::ValueType & > > | GetStoredValue () const |
template<typename ATTR > | |
Result< Opt< const typename ATTR::ValueType & > > | GetStoredValue (const ATTR &attr) const |
Result< Bool > | SetValue (const InternedId &attr, ForwardingDataPtr &&value, Bool checkAndInvalidate=true) const |
template<typename ATTR > | |
Result< Bool > | SetValue (const ATTR &attr, const typename ATTR::ValueType &value) const |
template<typename ATTR > | |
Result< Bool > | SetValue (const ATTR &attr, typename ATTR::ValueType &&value) const |
template<typename ATTR > | |
Result< Bool > | SetValue (const typename ATTR::ValueType &value) const |
template<typename ATTR > | |
Result< Bool > | SetValue (typename ATTR::ValueType &&value) const |
Result< void > | TouchValue (const InternedId &attr) const |
Result< void > | ChangeValue (const InternedId &attr, const SubDataOperation &op, const SubDataPathBlock &path, ForwardingDataPtr &&value) |
template<typename T > | |
Result< Bool > | SetPortValue (T &&value) 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< Bool > | SetDefaultValue (T &&value) 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 > | GetAttributeModificationsSince (TimeStamp stamp, const ValueReceiver< InternedId, ConstDataPtr > &receiver) const |
Result< TimeStamp > | GetAttributeStamp (const InternedId &attr) const |
Result< TimeStamp > | GetConnectionStamp (PORT_DIR direction) const |
Result< void > | CopyValuesFrom (const GraphNode &source, Bool includeInner) const |
Result< void > | CopyConnectionsFrom (const GraphNode &source, PORT_DIR direction, Bool includeInner) const |
Result< GraphAttribute::FLAGS > | GetMessageFlags (const InternedId &attr) const |
Result< Bool > | GetMessages (const InternedId &attr, const ValueReceiver< const GraphMessage & > &receiver) const |
|
default |
|
explicit |
Result<void> Remove | ( | ) | const |
Removes this node from the graph. This will also remove all nested nodes as well as connections of this node and its nested ports.
Result<Bool> GetChildren | ( | const ValueReceiver< const GraphNode & > & | callback, |
NODE_KIND | mask = NODE_KIND::ALL_MASK |
||
) | const |
Gets all children of this node. For a true node this will be its child nodes as well as a single input port list and a single output port list. Otherwise, the children are ports.
[in] | callback | This callback will receive all children. |
Result<typename SFINAEHelper<GraphNode, BASE>::type> GetParent | ( | ) | const |
Returns the parent of this node.
Result<typename SFINAEHelper<GraphNode, BASE>::type> GetAncestor | ( | NODE_KIND | mask | ) | const |
Returns the closest ancestor node of this node (possibly this node itself) whose kind matches the given #mask. I.e., the function goes upwards in the hierarchy until it finds a matching node.
[in] | mask | Mask for the kind of node to look for. |
Result<typename SFINAEHelper<GraphNode, BASE>::type> GetInputs | ( | ) | const |
Returns the input port list of this node. All top-level input ports of a node can be found as children of its input port list.
Result<typename SFINAEHelper<GraphNode, BASE>::type> GetOutputs | ( | ) | const |
Returns the output port list of this node. All top-level output ports of a node can be found as children of its output port list.
Result<typename SFINAEHelper<GraphNode, BASE>::type> GetPortList | ( | PORT_DIR | dir | ) | const |
Returns the input or output port list of this node, depending on dir.
[in] | dir | PORT_DIR::INPUT to return the input port list, PORT_DIR::OUTPUT to return the output port list. |
Result<typename SFINAEHelper<GraphNode, BASE>::type> FindChild | ( | const InternedId & | name | ) | const |
Finds a child with the given id. This searches all direct children (whether nodes, port lists or ports) of this node for a child which has the identifier name. The first found child is returned.
[in] | name | The identifier to look for. |
Result<typename SFINAEHelper<GraphNode, BASE>::type> FindChild | ( | const Id & | name | ) | const |
Finds a child with the given id. This searches all direct children (whether nodes, port lists or ports) of this node for a child which has the identifier name. The first found child is returned.
[in] | name | The identifier to look for. |
Result<typename SFINAEHelper<GraphNode, BASE>::type> FindChild | ( | NODE_KIND | mask | ) | const |
Finds the child of this node whose kind matches the given #mask. If no such child can be found, a null node is returned. If there is more than one matching child, an error is returned.
[in] | mask | Kind mask to look for. |
Result<typename SFINAEHelper<GraphNode, BASE>::type> FindPort | ( | const InternedId & | name | ) | const |
Result<typename SFINAEHelper<GraphNode, BASE>::type> FindInnerNode | ( | const PathBlock & | relativePath | ) | const |
Finds the inner child of this node with the given relative path. If no such child can be found, a null node is returned.
[in] | relativePath | The relative path of the child to find, starting at this node. |
Result<Bool> GetInnerNodes | ( | NODE_KIND | mask, |
Bool | includeThis, | ||
const ValueReceiver< const GraphNode & > & | receiver | ||
) | const |
Yields all inner nodes of this node matching #mask in pre-order. The recursive traversal stops at nodes which don't match #mask.
[in] | mask | Mask to filter the tree traversal. Only nodes matching this mask are considered. The node on which GetInnerNodes is called isn't checked for mask. |
[in] | includeThis | If true, the node on which GetInnerNodes is called is yielded to #receiver too. |
[in] | receiver | Inner nodes are reported to this value receiver. |
Result<typename SFINAEHelper<GraphNode, BASE>::type> AddPort | ( | const Id & | name | ) | const |
Adds a port to this node with the given id. This node has to be a port list or a port itself.
[in] | name | The identifier for the new port. |
Result<typename SFINAEHelper<GraphNode, BASE>::type> AddPort | ( | const InternedId & | name | ) | const |
Adds a port to this node with the given id. This node has to be a port list or a port itself.
[in] | name | The identifier for the new port. |
Result<BaseArray<typename SFINAEHelper<GraphNode, BASE>::type> > AddPorts | ( | Int | index, |
Int | count | ||
) | const |
Adds a number of variadic port instances to this variadic port. This is more efficient than a repeated call to AddPort(). It is an error if this GraphNode is no variadic port.
[in] | index | The index within the current list of variadic port instances where the new instances shall be added. |
[in] | count | The number of instances to add. |
Result<void> RemovePorts | ( | const Block< const InternedId > & | ports | ) | const |
Result<Bool> GetConnections | ( | PORT_DIR | dir, |
const ValueReceiver< const GraphConnection & > & | conns, | ||
Wires | mask = Wires::All() , |
||
GraphModelInterface::GET_CONNECTIONS_MODE | mode = GraphModelInterface::GET_CONNECTIONS_MODE::CONNECTIONS |
||
) | const |
Yields all connections of this port for the given direction #dir. Depending on the graph model implementation, this may include implicit wires due to connections between enclosing ports. The latter are marked with WIRE_MODE::IMPLICIT.
[in] | dir | Whether to yield incoming or outgoing connections. |
[in] | conns | The receiver for the found connections. |
[in] | mask | Only yield connections whose wires match this mask. |
[in] | mode | Mode for GetConnections. |
Returns the Wires from this node to #target. Depending on the graph model implementation, this may include implicit wires due to connections between enclosing nodes. The latter are marked with WIRE_MODE::IMPLICIT.
[in] | target | Another graph node. |
Result<Bool> GetConnectionValues | ( | const GraphNode & | target, |
const ValueReceiver< CONNECTION_POSITION, InternedId, const ConstDataPtr & > & | receiver | ||
) | const |
Gets all attribute values of the connection from this port to target.
[in] | target | The other end of the connection. |
[out] | receiver | All attribute values of the connection will be reported to the receiver. |
Result<ConstDataPtr> GetConnectionValue | ( | const GraphNode & | target, |
CONNECTION_POSITION | position, | ||
const InternedId & | attr, | ||
const DataType & | expectedType, | ||
Bool | reverse = false |
||
) | const |
Gets the value of the given attribute for the connection from this port to target. If there is no such connection, the connection has no value for the attribute or the value doesn't have the expected type, a null ConstDataPtr is returned.
[in] | target | The other end of the connection. |
[in] | position | The connection position at which the attribute's value shall be obtained. |
[in] | attr | The attribute whose value shall be obtained. |
[in] | expectedType | The expected type of the attribute value, may be nullptr if no check shall be done. |
[in] | reverse | True if the connection shall be from target to this port (also #position is reversed in this case), false otherwise (the default). |
Result<Opt<const T&> > GetConnectionValue | ( | const GraphNode & | target, |
CONNECTION_POSITION | position, | ||
const InternedId & | attr, | ||
Bool | reverse = false |
||
) | const |
Gets the value of the given attribute for the connection from this port to target. If there is no such connection, the connection has no value for the attribute or the value doesn't have the expected type, an empty Opt is returned.
[in] | target | The other end of the connection. |
[in] | position | The connection position at which the attribute's value shall be obtained. |
[in] | attr | The attribute whose value shall be obtained. |
[in] | reverse | True if the connection shall be from target to this port (also #position is reversed in this case), false otherwise (the default). |
Result<Opt<const typename ATTR::ValueType&> > GetConnectionValue | ( | const GraphNode & | target, |
CONNECTION_POSITION | position, | ||
const ATTR & | attr, | ||
Bool | reverse = false |
||
) | const |
Gets the value of the given attribute #attr for the connection from this port to target. If there is no such connection, the connection has no value for the attribute or the value doesn't have the expected type, an empty Opt is returned.
[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 obtained. |
[in] | reverse | True if the connection shall be from target to this port (also #position is reversed in this case), false otherwise (the default). |
Result<Bool> SetConnectionValue | ( | const GraphNode & | target, |
CONNECTION_POSITION | position, | ||
const InternedId & | attr, | ||
ForwardingDataPtr && | value | ||
) | 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 GraphNode & | target, |
CONNECTION_POSITION | position, | ||
const ATTR & | attr, | ||
const typename ATTR::ValueType & | value | ||
) | 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 GraphNode & | target, |
CONNECTION_POSITION | position, | ||
const ATTR & | attr, | ||
typename ATTR::ValueType && | value | ||
) | 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<void> Connect | ( | const GraphNode & | target, |
Wires | modes = WIRE_MODE::CONNECT_DEFAULT , |
||
Bool | reverse = false |
||
) | 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 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.
[in] | target | The target port to connect to. |
[in] | modes | The type to use for the connection. |
[in] | reverse | If true the direction is reversed (from target to this port). |
Result<void> Connect | ( | const Result< typename SFINAEHelper< GraphNode, BASE >::type > & | target, |
Wires | modes = WIRE_MODE::CONNECT_DEFAULT , |
||
Bool | reverse = false |
||
) | 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 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.
[in] | target | The target port to connect to. |
[in] | modes | The type to use for the connection. |
[in] | reverse | If true the direction is reversed (from target to this port). |
Result<void> RemoveConnections | ( | PORT_DIR | dir, |
Wires | mask = Wires::All(WIRE_MODE::FULL_MASK) |
||
) | const |
Removes all connections of this port in the given direction which match the given mask.
[in] | dir | Connection direction. |
[in] | mask | Mask for the connections to remove. |
Checks if a connection from this port to target can be made.
[in] | target | Target port of the (hypothetical) connection. |
Result<void> GetValues | ( | GraphAttributeInterface::FLAGS | mask, |
GraphAttributeMap & | map | ||
) | const |
Gets all attribute values of this node.
[out] | map | All attribute values of this node will be added to #map. |
Result<Bool> RemoveValue | ( | const InternedId & | attr | ) | const |
Removes an attribute value from this node. Nothing happens if this node doesn't have a value for the given attribute.
[in] | attr | The attribute whose value shall be removed from this node. |
Result<Bool> InheritValue | ( | const InternedId & | attr | ) | const |
Restores the inherited state of the value for #attr. This removes any value which has been set directly in this graph.
[in] | attr | The attribute whose value shall be inherited from the base graph. |
Result<ConstDataPtr> GetValue | ( | const InternedId & | attr, |
const DataType & | expectedType | ||
) | const |
Gets the value of the given attribute for this node. If this node doesn't have a value for the attribute or the value doesn't have the expected type, a null ConstDataPtr is returned.
[in] | attr | The attribute whose value shall be obtained. |
[in] | expectedType | The expected type of the attribute value, may be nullptr if no check shall be done. |
Result<ConstDataPtr> GetStoredValue | ( | const InternedId & | attr, |
const DataType & | expectedType | ||
) | const |
Gets the current value of the given attribute for this node, REGARDLESS of whether it is valid or not. If using lazy updates then this may be out of date. If NOT using lazy updates then this should always match GetValue(). If this node doesn't have a value for the attribute or the value doesn't have the expected type, a null ConstDataPtr is returned.
[in] | attr | The attribute whose value shall be obtained. |
[in] | expectedType | The expected type of the attribute value, may be nullptr if no check shall be done. |
Result<Bool> GetBaseValues | ( | const InternedId & | attr, |
const DataType & | expectedType, | ||
const ValueReceiver< const ConstDataPtr &, Int > & | valueReceiver | ||
) | const |
Gets the values of the given attribute for this node and its inherited parents. If this node doesn't have a value for the attribute or the value doesn't have the expected type, GetBaseValues will keep iterating the inherited nodes and call #valueReceiver each time the attribute is found on an a base.
[in] | attr | The attribute whose value shall be obtained. |
[in] | expectedType | The expected type of the attribute value, may be nullptr if no check shall be done. |
[in] | valueReceiver | A callback which receives the attribute values and their nestings. |
Result<Opt<const T&> > GetValue | ( | const InternedId & | attr | ) | const |
Gets the value of the given attribute for this node. If this node doesn't have a value for the attribute or the value doesn't have type T, an empty Opt is returned.
[in] | attr | The attribute whose value shall be obtained. |
T | The expected type of the attribute value. |
Gets the value of the given attribute #ATTR for this node. If this node doesn't have a value for the attribute of the correct type, an empty Opt is returned.
ATTR | The attribute whose value shall be obtained. |
Gets the current value of the given attribute for this node, REGARDLESS of whether it is valid or not. If using lazy updates then this may be out of date. If NOT using lazy updates then this should always match GetValue(). If this node doesn't have a value for the attribute of the correct type, an empty Opt is returned.
ATTR | The attribute whose value shall be obtained. |
Gets the current value of the given attribute for this node, REGARDLESS of whether it is valid or not. If using lazy updates then this may be out of date. If NOT using lazy updates then this should always match GetValue(). If this node doesn't have a value for the attribute of the correct type, an empty Opt is returned.
[in] | attr | The attribute whose value shall be obtained. |
Result<Bool> SetValue | ( | const InternedId & | attr, |
ForwardingDataPtr && | value, | ||
Bool | checkAndInvalidate = true |
||
) | 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] | value | The value for the attribute. |
[in] | checkAndInvalidate | True by default. Use false to suppress check, invalidation and update of time stamp. False may only be used for attributes which aren't needed during validation. |
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] | value | The value for the attribute. |
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] | value | The value for the attribute. |
Sets the value of #ATTR to value for this node. This will override any previously existing value.
ATTR | The attribute whose value shall be set. |
[in] | value | The value for the attribute. |
Sets the value of #ATTR to value for this node. This will override any previously existing value.
ATTR | The attribute whose value shall be set. |
[in] | value | The value for the attribute. |
Result<void> TouchValue | ( | const InternedId & | attr | ) | const |
Marks the value of #attr as modified without actually modifying it. Use this if the value points to some external data which has changed without knowledge of the graph (for example a Url for a file which has been modified). If there is no value yet for attr, an IllegalStateError is returned.
[in] | attr | The attribute which shall be marked as modified. |
Result<void> ChangeValue | ( | const InternedId & | attr, |
const SubDataOperation & | op, | ||
const SubDataPathBlock & | path, | ||
ForwardingDataPtr && | value | ||
) |
Sets a part of the value of #attr to value for this node.
[in] | attr | The attribute whose value shall be set. |
[in] | op | The SubDataOperation to use. |
[in] | path | The path to the part of the attribute value which shall be changed. |
[in] | value | The new value for the part. |
Sets the value of the attribute DESCRIPTION::DATA::BASE::DEFAULTVALUE 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. |
Returns the value of this port (ignoring upstream overrides). This is the value of the PortValue attribute, which in turn is synthesized from DESCRIPTION::DATA::BASE::DEFAULTVALUE: Port values are derived from right to left along connections.
T | The type to return. |
Returns the effective value of this port. The effective value is set whenever the graph implementation is able to determine a constant value for the port, either because the value has been set directly at the port, or because it is possible to compute the value from connected ports and nodes.
T | The type to return. |
MAXON_ATTRIBUTE_FORCE_INLINE Result<Bool> SetDefaultValue | ( | T && | value | ) | const |
MAXON_ATTRIBUTE_FORCE_INLINE Result<const T&> GetDefaultValue | ( | const T & | def = maxon::DefaultValue<const T&>() | ) | const |
MAXON_ATTRIBUTE_FORCE_INLINE Result<const T&> GetConstantValue | ( | const T & | def = maxon::DefaultValue<const T&>() | ) | const |
Result<Bool> GetAttributeModificationsSince | ( | TimeStamp | stamp, |
const ValueReceiver< InternedId, ConstDataPtr > & | receiver | ||
) | const |
Reports all attribute modifications which have been made for this node since the given stamp to the receiver. Only stored attributes will be reported, so to also check for new values of computed attributes you should use GraphAttributeInterface::IsComputedFrom().
[in] | stamp | A reference time stamp. Only modifications newer than this stamp are reported. |
[in] | receiver | Modifications are reported to this receiver as a pair of the attribute identifier and the current value. |
Result<TimeStamp> GetAttributeStamp | ( | const InternedId & | attr | ) | const |
Returns the modification stamp of the given attribute for this node. This is the value of the graph's time stamp (see GraphModelInterface::GetModificationStamp) at the time when the attribute value has been set last for this node, or a default value if it hasn't been set at all.
[in] | attr | An attribute. |
Returns the modification stamp of incoming/outgoing connections for this port. This is the value of the graph's time stamp (see GraphModelInterface::GetModificationStamp) at the time when connections in the given direction have been modified last for this port.
[in] | direction | The connection direction. |
Copies all directly set attribute values of source to this node. This excludes derived attribute values as well as attribute values which are inherited from a base.
[in] | source | Another GraphNode, may stem from a different graph. |
[in] | includeInner | If true, copies attribute values for all inner nodes, too. |
Result<void> CopyConnectionsFrom | ( | const GraphNode & | source, |
PORT_DIR | direction, | ||
Bool | includeInner | ||
) | const |
Copies all connections of source to the port given by this GraphNode. For each connection of source to a port in the given direction, a corresponding port in this graph is searched (based on the relative path) and, if it exists, a connection to that port is created.
[in] | source | Another GraphNode port, may stem from a different graph. |
[in] | direction | The direction of connections to copy. |
[in] | includeInner | If true, copies connections for all inner nodes, too. |
Result<GraphAttribute::FLAGS> GetMessageFlags | ( | const InternedId & | attr | ) | const |
Returns the message flags of the given attribute at this node. You have to call this method if you want to check if an attribute has a message (an error or a warning) for this node.
[in] | attr | The attribute which shall be asked. |
Result<Bool> GetMessages | ( | const InternedId & | attr, |
const ValueReceiver< const GraphMessage & > & | receiver | ||
) | const |
Yields the error or warning messages (if any) of the given attribute at this node to #receiver.
[in] | attr | The attribute which shall be asked. |
[in] | receiver | All messages are reported to this receiver. |