#include <nodesystem.h>
This class template contains the functions of a general mutable g-node which shall also be available on Result<NODE>.
Public Member Functions | |
Result< void > | Remove (Opt< ChangeList & > list={}) const |
Result< void > | InheritChild (const InternedId &childId, Opt< ChangeList & > list={}) const |
Result< Bool > | InheritValue (const InternedId &attr, Opt< ChangeList & > list={}) const |
Result< Bool > | RemoveValue (const InternedId &attr, Opt< ChangeList & > list={}) const |
Result< Bool > | SetValue (const InternedId &attr, ForwardingDataPtr &&value, Opt< ChangeList & > list={}) const |
template<typename ATTR > | |
Result< Bool > | SetValue (const ATTR &attr, const typename ATTR::ValueType &value, Opt< ChangeList & > list={}) const |
template<typename ATTR > | |
Result< Bool > | SetValue (const ATTR &attr, typename ATTR::ValueType &&value, Opt< ChangeList & > list={}) const |
template<typename ATTR > | |
Result< Bool > | SetValue (const typename ATTR::ValueType &value, Opt< ChangeList & > list={}) const |
template<typename ATTR > | |
Result< Bool > | SetValue (typename ATTR::ValueType &&value, Opt< ChangeList & > list={}) const |
Result< void > | ChangeValue (const InternedId &attr, const SubDataOperation &op, const SubDataPathBlock &path, ForwardingDataPtr &&value, Opt< ChangeList & > list={}) const |
Public Member Functions inherited from GNodeFunctions< BASE > | |
Bool | IsPort () const |
const PortSelector< BASE::MUTABLE > & | ToPort () const |
Result< void > | GetValues (GraphAttribute::FLAGS mask, GraphAttributeMap &attribs, Bool includeInherited=true, Bool includeRemoved=false) const |
Result< ConstDataPtr > | GetValue (const InternedId &attr, const DataType &expectedType) const |
Result< ConstDataPtr > | GetValue (const InternedId &attr, const DataType &expectedType, Int &nesting, Bool negativeRootNesting=false) const |
template<typename T > | |
Result< Opt< const T & > > | GetValue (const InternedId &attr) const |
template<typename ATTR > | |
Result< Opt< const typename ATTR::ValueType & > > | GetValue (const ATTR &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, Int &nesting) const |
Result< Bool > | GetBaseValues (const InternedId &attr, const DataType &expectedType, const ValueReceiver< const ConstDataPtr &, Int > &receiver) const |
template<typename T > | |
Result< const T & > | GetDefaultValue (const T &def=maxon::NullValue< const T & >()) const |
template<typename T > | |
Result< const T & > | GetConstantValue (const T &def=maxon::NullValue< const T & >()) const |
Result< Bool > | GetAttributeModificationsSince (TimeStamp stamp, const ValueReceiver< InternedId, ConstDataPtr > &receiver) const |
TimeStamp | GetAttributeStamp (const InternedId &attr) const |
Result< NodeSelector< BASE::MUTABLE > > | GetNode () const |
Result< GNodeSelector< BASE::MUTABLE > > | GetParent () const |
Result< GNodeSelector< BASE::MUTABLE > > | FindChild (const InternedId &name, NODE_KIND mask) const |
template<typename NODE > | |
Result< typename NODE::template Selector< BASE::MUTABLE > > | FindInnerNode (const PathBlock &relativePath) const |
Result< Bool > | GetInnerNodes (NODE_KIND mask, Bool includeThis, const ValueReceiver< const GNodeSelector< BASE::MUTABLE > & > &receiver) const |
const NodeSystem & | GetBase () const |
const Block< const NodeSystem > & | GetBases () const |
Result< Bool > | GetAllBases (const ValueReceiver< const NodeSystem & > &receiver) const |
const NodeTemplate & | GetTemplate () const |
Result< Bool > | GetAllTemplates (const ValueReceiver< const NodeTemplate & > &receiver) const |
const NodeSystemDerivationHandler & | GetDerivationHandler () const |
Protected Types | |
using | Super = GNodeFunctions< BASE > |
Protected Types inherited from GNodeFunctions< BASE > | |
using | Super = BASE |
|
protected |
Removes the referenced g-node from this node system. Internally how the removal is done depends on the situation:
Not all g-nodes can be removed:
[in] | list | An optional ChangeList to track the changes. |
Result<void> InheritChild | ( | const InternedId & | childId, |
Opt< ChangeList & > | list = {} |
||
) | const |
Removes any data for the child node #childId of the referenced node from the node system so that the state of the child node is restored to an unmodified instance of its base node. If there is no base, the node ceases to exist in the current node system. This function only has an effect if modifications to the child node have been made at the level of the node system of this reference.
[in] | childId | The identifier of the child of this node which shall be restored to its inherited state. |
[in] | list | An optional ChangeList to track the changes. |
Result<Bool> InheritValue | ( | const InternedId & | attr, |
Opt< ChangeList & > | list = {} |
||
) | const |
Restores the inherited state of the value for #attr. This removes any value which has been set in this node system. It will also annul the effect of a previous invocation of RemoveValue().
[in] | attr | The attribute whose value at this g-node shall be restored to the inherited state. |
[in] | list | An optional ChangeList to track the changes. |
Result<Bool> RemoveValue | ( | const InternedId & | attr, |
Opt< ChangeList & > | list = {} |
||
) | const |
Removes an attribute value from this g-node. The node won't have a value for #attr afterwards, i.e., even if one of its bases has a value for #attr, this node doesn't inherit the value. The removal can be undone by calling InheritValue().
[in] | attr | The attribute whose value shall be removed from this g-node. |
[in] | list | An optional ChangeList to track the changes. |
Result<Bool> SetValue | ( | const InternedId & | attr, |
ForwardingDataPtr && | value, | ||
Opt< ChangeList & > | list = {} |
||
) | const |
Sets the value of #attr to value for this g-node. This will override any value which would otherwise be inherited for the attribute from a base.
[in] | attr | The attribute whose value shall be set. |
[in] | value | The new value for the attribute. |
[in] | list | An optional ChangeList to track the changes. |
Result<Bool> SetValue | ( | const ATTR & | attr, |
const typename ATTR::ValueType & | value, | ||
Opt< ChangeList & > | list = {} |
||
) | const |
Sets the value of #attr to value for this g-node. This will override any value which would otherwise be inherited for the attribute from a base. Example:
[in] | attr | The attribute whose value shall be set. |
[in] | value | The new value for the attribute. |
[in] | list | An optional ChangeList to track the changes. |
Result<Bool> SetValue | ( | const ATTR & | attr, |
typename ATTR::ValueType && | value, | ||
Opt< ChangeList & > | list = {} |
||
) | const |
Sets the value of #attr to value for this g-node. This will override any value which would otherwise be inherited for the attribute from a base. Example:
[in] | attr | The attribute whose value shall be set. |
[in] | value | The new value for the attribute, this will be moved into the g-node. |
[in] | list | An optional ChangeList to track the changes. |
Result<Bool> SetValue | ( | const typename ATTR::ValueType & | value, |
Opt< ChangeList & > | list = {} |
||
) | const |
Sets the value of ATTR to value for this g-node. This will override any value which would otherwise be inherited for the attribute from a base. Example:
ATTR | The attribute whose value shall be set. |
[in] | value | The new value for the attribute. |
[in] | list | An optional ChangeList to track the changes. |
Sets the value of ATTR to value for this g-node. This will override any value which would otherwise be inherited for the attribute from a base. Example:
ATTR | The attribute whose value shall be set. |
[in] | value | The new value for the attribute, this will be moved into the g-node. |
[in] | list | An optional ChangeList to track the changes. |
Result<void> ChangeValue | ( | const InternedId & | attr, |
const SubDataOperation & | op, | ||
const SubDataPathBlock & | path, | ||
ForwardingDataPtr && | value, | ||
Opt< ChangeList & > | list = {} |
||
) | const |
Sets a part of the value of #attr to value for this g-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. |
[in] | list | An optional ChangeList to track the changes. |