A NodeSystem owns and manages a complete hierarchy of nodes and ports. NodeSystem is a copy-on-write reference, therefore each non-const method may create a copy of the original node system at first. However the copy is done by sharing the internal data, so it is a lightweight operation.
Traversal of a node system starts with GetRoot(). For modifications, you have to call BeginModification() to obtain write access to the hierarchy through a MutableRoot. As long as you make modifications, you have to ensure that no other thread uses the reference to the node system, or synchronize the threads in an appropriate way. As last step of a sequence of modifications you have to call MutableRoot::EndModification().
The implementation class of this interface is a final class, so you can't override it. However some behavior is delegated to NodeSystemClass and NodeSystemDerivationHandler to allow for customization of certain aspects.
- See also
- $ref usernodes_nodesystem
-
NodesLib
|
| const MAXON_METHOD NodeSystemClass & | GetNodeSystemClass () const |
| |
| const MAXON_METHOD NodeSystemDerivationHandler & | GetDerivationHandler () const |
| |
| const MAXON_METHOD NodeSystem & | GetBase () const |
| |
| const MAXON_METHOD Block< const NodeSystem > & | GetBases () const |
| |
| MAXON_METHOD Result< Array< IdAndVersion > > | GetAllBaseAssets () const |
| |
| MAXON_METHOD Result< Bool > | GetAllBases (const ValueReceiver< const NodeSystem & > &receiver) const |
| |
| const MAXON_METHOD NodeTemplate & | GetTemplate () const |
| |
| const MAXON_METHOD TemplateArguments & | GetArguments () const |
| |
| MAXON_METHOD AssetRepositoryRef | GetTemplateLookupRepository () const |
| |
| MAXON_FUNCTION Node | GetRoot () const |
| |
| | MAXON_ADD_TO_COPY_ON_WRITE_REFERENCE_CLASS (Result< MutableRoot > BeginModification(Bool keepCurrent);Result< MutableRoot > BeginInstantiationModification(const NodeTemplate &templ);Result< MutableRoot > BeginSubstitutionModification(const AssetRepositoryRef &lookup, const NodeTemplate &original, const TemplateArguments &args);Result< MutableRoot > BeginSubstitutionModification(const NodeSystem &original);) |
| |
| MAXON_METHOD Bool | IsFinalized () const |
| |
| MAXON_METHOD Result< MutableRoot > | CreateInstance () const |
| |
| MAXON_METHOD Result< NodeSystem > | CreateCopyOfSelection (const NodePath &basePath, const Block< const InternedId > &selection) const |
| |
| MAXON_METHOD TimeStamp | GetModificationStamp () const |
| |
| MAXON_METHOD Result< Bool > | GetModificationsSince (TimeStamp stamp, const ValueReceiver< const GNode &, GraphModelRef::MODIFIED > &receiver) const |
| |
| MAXON_METHOD GraphModelRef::MODIFIED | GetModificationsSince (TimeStamp stamp) const |
| |
| MAXON_METHOD Int | GetTopologicalOrder (const NodePath &port) const |
| |
| MAXON_METHOD Result< Bool > | GetTopLevelPorts (Bool reverseOrder, const ValueReceiver< const Port & > &receiver) const |
| |
| MAXON_METHOD Result< Bool > | SetValue (const GNodeHandle &node, const InternedId &attr, ForwardingDataPtr &&value, ChangeList *list, Bool checkAndInvalidate=true) |
| |
| MAXON_METHOD Result< NodeSystemData > | GetNodeSystemData () const |
| |
| enum maxon::nodes::NodeSystemInterface::GML_OPTIONS | MAXON_ENUM_FLAGS_CLASS (GML_OPTIONS) |
| |
| MAXON_METHOD Result< void > | WriteGml (UrlOrOutputStream &&output, GML_OPTIONS opts) const |
| |
| MAXON_METHOD Int | PrivateGetChildEntryCount (const GNodeHandle &node) const |
| |
| MAXON_METHOD GNodeHandle | PrivateGetRoot () const |
| |
| enum maxon::nodes::NodeSystemInterface::FINALIZE_FLAGS | MAXON_ENUM_FLAGS_CLASS (FINALIZE_FLAGS) |
| |
| MAXON_METHOD Bool | HasBase (const IdAndVersion &baseId) const |
| |
| MAXON_METHOD Int | GetTopologicalOrder (const PathBlock &port) const |
| |
|
| | MAXON_INTERFACE (NodeSystemInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.node.interface.nodesystem") |
| |
| MAXON_METHOD Result< void > | SetDerivationHandler (const NodeSystemDerivationHandler &handler) |
| |
| MAXON_METHOD Result< void > | SetTemplate (const AssetRepositoryRef &lookup, const NodeTemplate &templ, const TemplateArguments &args, Bool setValues) |
| |
| MAXON_METHOD Result< Bool > | GetInnerNodes (const GNodeHandle &node, NODE_KIND mask, Bool includeNode, const ValueReceiver< const MutableGNode & > &receiver) |
| |
| MAXON_METHOD Result< GNodeHandle > | GetParent (const GNodeHandle &node) const |
| |
| MAXON_METHOD Result< GNodeHandle > | GetAncestor (const GNodeHandle &node, NODE_KIND kind) const |
| |
| MAXON_METHOD Result< GNodeHandle > | GetPortList (const GNodeHandle &node, PORT_DIR dir) const |
| |
| MAXON_METHOD Result< GNodeHandle > | FindChild (const GNodeHandle &node, const InternedId &name, NODE_KIND kind) const |
| |
| MAXON_METHOD Result< GNodeHandle > | FindInnerNode (const GNodeHandle &node, const PathBlock &innerPath) const |
| |
| const MAXON_METHOD NodeSystem & | GetBase (const GNodeHandle &node) const |
| |
| const MAXON_METHOD Block< const NodeSystem > & | GetBases (const GNodeHandle &node) const |
| |
| MAXON_METHOD Result< Bool > | GetAllBases (const GNodeHandle &node, const ValueReceiver< const NodeSystem & > &receiver) const |
| |
| MAXON_METHOD Result< void > | AddBase (const NodeSystem &other) |
| |
| const MAXON_METHOD NodeTemplate & | GetTemplate (const GNodeHandle &node) const |
| |
| MAXON_METHOD Result< Bool > | GetAllTemplates (const GNodeHandle &node, const ValueReceiver< const NodeTemplate & > &receiver) const |
| |
| const MAXON_METHOD NodeSystemDerivationHandler & | GetDerivationHandler (const GNodeHandle &node) const |
| |
| MAXON_METHOD Result< GNodeHandle > | FindHandle (const PathBlock &path) const |
| |
| MAXON_METHOD GNodeHandle | FindHandle (const NodePath &path) const |
| |
| MAXON_METHOD Bool | PrivateValidate (const GNodeHandle &handle) const |
| |
| MAXON_METHOD GNODE_FLAGS | GetFlags (const GNodeHandle &port) const |
| |
| MAXON_METHOD Result< void > | InitIterator (const GNodeHandle &node, GNodeIteratorBase &iterator) const |
| |
| MAXON_METHOD Result< void > | MoveToNext (GNodeIteratorBase &iterator) const |
| |
| MAXON_METHOD Result< void > | Validate (ChangeList *change) |
| |
| MAXON_METHOD Result< void > | ValidateTopology () |
| |
| MAXON_METHOD Result< void > | ValidatePorts (ChangeList *change) |
| |
| MAXON_METHOD Result< void > | BeginModificationImpl () |
| |
| MAXON_METHOD Result< void > | EndModificationImpl (ChangeList *change, FINALIZE_FLAGS finalize) |
| |
| MAXON_METHOD Result< void > | Compact () |
| |
| MAXON_METHOD Result< ChangeList > | Apply (const ChangeList &toApply, Bool inverse, ChangeList *list) |
| |
| MAXON_METHOD Result< void > | Update (const Block< const Tuple< AssetReference, AssetBase >> &updates, const AssetRepositoryRef &lookup, ChangeList *list) |
| |
| MAXON_METHOD Result< GNodeHandle > | AddChild (const Id &child, const NodeSystem &base, ChangeList *list) |
| |
| MAXON_METHOD Result< ChangeList > | ReplaceBase (const NodeSystem &base, ChangeList *list) |
| |
| MAXON_METHOD Result< ChangeList > | ReplaceChildren (const Block< const Tuple< InternedId, NodeSystem >> &newChildren, ChangeList *list) |
| |
| MAXON_METHOD Result< GNodeHandle > | MoveToGroup (MutableRoot &groupRoot, const Id &groupId, const Block< const InternedId > &selection, ChangeList *list) |
| |
| MAXON_METHOD Result< NodeSystem > | MoveToNodeSystem (const GNodeHandle &node, ChangeList *list) |
| |
| MAXON_METHOD Result< HashMap< InternedId, InternedId > > | Ungroup (const GNodeHandle &node, ChangeList *list) |
| |
| MAXON_METHOD Result< HomogenousTupleType< 3, HashMap< InternedId, InternedId > > > | Merge (const NodeSystem &other, ChangeList *list) |
| |
| MAXON_METHOD Result< GNodeHandle > | AddChild (const GNodeHandle &node, const Id &port, GNODE_FLAGS flags, ChangeList *list) |
| |
| MAXON_METHOD Result< void > | InheritChild (const GNodeHandle &parent, const InternedId &childId, ChangeList *list) |
| |
| MAXON_METHOD Result< void > | Remove (const GNodeHandle &child, ChangeList *list) |
| |
| MAXON_METHOD Result< void > | Connect (const GNodeHandle &source, const GNodeHandle &target, Wires modes, ChangeList *list) |
| |
| MAXON_METHOD Result< Bool > | GetConnections (const GNodeHandle &source, PORT_DIR dir, const ValueReceiver< const MutableConnection & > &conns, Wires mask, GET_CONNECTIONS_MODE mode) |
| |
| MAXON_METHOD Result< Wires > | GetWires (const GNodeHandle &source, const GNodeHandle &target) const |
| |
| MAXON_METHOD Result< Bool > | GetConnectionValues (const GNodeHandle &source, const GNodeHandle &target, const ValueReceiver< CONNECTION_POSITION, InternedId, const ConstDataPtr & > &receiver) const |
| |
| MAXON_METHOD Result< ConstDataPtr > | GetConnectionValue (const GNodeHandle &source, const GNodeHandle &target, CONNECTION_POSITION position, const InternedId &attr, const DataType &expectedType) const |
| |
| MAXON_METHOD Result< Bool > | SetConnectionValue (const GNodeHandle &source, const GNodeHandle &target, CONNECTION_POSITION position, const InternedId &attr, ForwardingDataPtr &&value, ChangeList *list) |
| |
| MAXON_METHOD Result< void > | GetValues (const GNodeHandle &port, GraphAttribute::FLAGS mask, GraphAttributeMap &attribs, Bool includeInherited, Bool includeRemoved) const |
| |
| MAXON_METHOD Result< ConstDataPtr > | GetValue (const GNodeHandle &port, const InternedId &attr, const DataType &expectedType) const |
| |
| MAXON_METHOD Result< ConstDataPtr > | GetValue (const GNodeHandle &port, const InternedId &attr, const DataType &expectedType, Int *nesting, Bool negativeRootNesting) const |
| |
| MAXON_METHOD Result< Bool > | GetBaseValues (const GNodeHandle &port, const InternedId &attr, const DataType &expectedType, const ValueReceiver< const ConstDataPtr &, Int > &values) const |
| |
| MAXON_METHOD Result< void > | TouchValue (const GNodeHandle &port, const InternedId &attr, ChangeList *list) |
| |
| MAXON_METHOD Result< void > | ChangeValue (const GNodeHandle &port, const InternedId &attr, const SubDataOperation &op, const SubDataPathBlock &path, ForwardingDataPtr &&subvalue, ChangeList *change) |
| |
| MAXON_METHOD Result< Bool > | InheritValue (const GNodeHandle &port, const InternedId &attr, ChangeList *list) |
| |
| MAXON_METHOD Result< Bool > | RemoveValue (const GNodeHandle &port, const InternedId &attr, ChangeList *list) |
| |
| MAXON_METHOD Result< Bool > | GetAttributeModificationsSince (const GNodeHandle &node, TimeStamp stamp, const ValueReceiver< InternedId, ConstDataPtr > &receiver) const |
| |
| MAXON_METHOD TimeStamp | GetAttributeStamp (const GNodeHandle &node, const InternedId &attr) const |
| |
| MAXON_METHOD TimeStamp | GetConnectionStamp (const GNodeHandle &node, PORT_DIR direction) const |
| |