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().
NodeSystem is a copy-on-write reference class, but you can't call non-const methods or MakeWritable directly. Instead, 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 @MAXON_ANNOTATION{refclass=false}
|
MAXON_METHOD const NodeSystemClass & | GetNodeSystemClass () const |
|
MAXON_METHOD const NodeSystemDerivationHandler & | GetDerivationHandler () const |
|
MAXON_METHOD const NodeSystem & | GetBase () const |
|
MAXON_METHOD const Block< const NodeSystem > & | GetBases () const |
|
MAXON_METHOD Bool | HasBase (const IdAndVersion &baseId) const |
|
MAXON_METHOD Result< Array< IdAndVersion > > | GetAllBaseAssets () const |
|
MAXON_METHOD Result< Bool > | GetAllBases (const ValueReceiver< const NodeSystem & > &receiver) const |
|
MAXON_METHOD const NodeTemplate & | GetTemplate () const |
|
MAXON_METHOD const TemplateArguments & | GetArguments () const |
|
MAXON_METHOD const AssetRepositoryRef & | GetTemplateLookupRepository () |
|
MAXON_FUNCTION Node | GetRoot () const |
|
| MAXON_ADD_TO_COPY_ON_WRITE_REFERENCE_CLASS (Result< MutableRoot > BeginModification(const AssetRepositoryRef &repo, Bool keepCurrent=false);Result< MutableRoot > BeginInstantiationModification(const AssetRepositoryRef &repo, const NodeTemplate &templ);Result< MutableRoot > BeginSubstitutionModification(const AssetRepositoryRef &repo, const NodeTemplate &original, const TemplateArguments &args);Result< MutableRoot > BeginSubstitutionModification(const AssetRepositoryRef &repo, const NodeSystem &original);) |
|
MAXON_METHOD Bool | IsFinalized () const |
|
MAXON_METHOD Result< MutableRoot > | CreateInstance (const AssetRepositoryRef &repo) const |
|
MAXON_METHOD Result< NodeSystem > | CreateCopyOfSelection (const AssetRepositoryRef &repo, 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 | GetTopologicalLayer (const NodePath &port) const |
|
MAXON_METHOD Int | GetTopologicalLayer (const PathBlock &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 Result< HomogenousTupleType< 3, HashMap< InternedId, InternedId > > > | Duplicate (const Block< const NodePath > &selection, Bool withConnections, ChangeList *list=nullptr) |
|
|
| 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 |
|
MAXON_METHOD const NodeSystem & | GetBase (const GNodeHandle &node) const |
|
MAXON_METHOD const 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) |
|
MAXON_METHOD const NodeTemplate & | GetTemplate (const GNodeHandle &node) const |
|
MAXON_METHOD Result< Bool > | GetAllTemplates (const GNodeHandle &node, const ValueReceiver< const NodeTemplate & > &receiver) const |
|
MAXON_METHOD const 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 (const AssetRepositoryRef &lookup) |
|
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 |
|
MAXON_METHOD Result< void > | AddChildren (const Block< Tuple< InternedId, NodeSystem, GNodeHandle >> &children, ChangeList *list) |
|
MAXON_METHOD Result< ChangeList > | ReplaceChild (const InternedId &childId, const NodeSystem &base, const HashMap< NodePath, NodePath > &portMap, ChangeList *list) |
|