MutableNode Class Reference

#include <nodesystem.h>

Inheritance diagram for MutableNode:

Detailed Description

MutableNode represents a node within a NodeSystem with write access. A node may be either the /root node/ of a node system or a /nested/ node (i.e., a child of another node). A direct child of a root node is called a /root child node/.

A node may be an /instance/ of another node, in which case it inherits the ports and nested nodes from that base node, but it is still possible to remove inherited ports and children, or add additional ones.

See also
$ref usernodes_modifications

Public Types

using Super = MutableNodeFunctions< MutableGNodeBase >
 
- Public Types inherited from MutableNodeFunctions< MutableGNodeBase >
using ResultFunctions = MutableNodeFunctions< maxon::nodes::details::GNodeResultBase< SUPER > >
 
using Super = NodeFunctions< MutableGNodeBase >
 
- Public Types inherited from NodeFunctions< BASE >
using Iterator = GNodeIterator< NodeSelector< BASE::MUTABLE > >
 
template<typename SUPER >
using ResultFunctions = NodeFunctions< maxon::nodes::details::GNodeResultBase< SUPER > >
 
using Super = maxon::nodes::details::NodeFunctionsSuper< BASE >
 

Public Member Functions

const NodeToImmutable () const
 
Result< HashMap< InternedId, InternedId > > Ungroup (Opt< ChangeList & > list={})
 
Result< NodeSystemMoveToNodeSystem (Opt< ChangeList & > list={})
 
- Public Member Functions inherited from NodeFunctions< BASE >
Result< NodeSelector< BASE::MUTABLE > > GetParent () const
 
Result< NodeSelector< BASE::MUTABLE > > FindChild (const InternedId &name) const
 
Result< NodeSelector< BASE::MUTABLE > > FindChild (const Id &name) const
 
template<typename NODE >
Result< typename NODE::template Selector< BASE::MUTABLE > > FindInnerNode (const NODE &baseInner) const
 
Result< PortListSelector< BASE::MUTABLE > > GetPortList (PORT_DIR dir) const
 
Result< PortListSelector< BASE::MUTABLE > > GetInputs () const
 
Result< PortListSelector< BASE::MUTABLE > > GetOutputs () const
 
Result< IteratorGetChildren () const
 
template<typename PATH >
Result< void > InitFromPath (typename maxon::nodes::details::NodeFunctionsSuper< BASE >::NodeSystemCtorParam system, PATH &&path)
 

Static Public Member Functions

static MAXON_ATTRIBUTE_FORCE_INLINE const MutableNodeNullValue ()
 

Member Typedef Documentation

◆ Super

Member Function Documentation

◆ NullValue()

static MAXON_ATTRIBUTE_FORCE_INLINE const MutableNode& NullValue ( )
static

◆ ToImmutable()

const Node& ToImmutable ( ) const

Casts this MutableNode to an immutable Node. If you call this function during an active modification you have to make sure that the returned Node (and all further immutable references which are obtained through this Node) is only stored temporarily and goes out of scope before the next modification is made, see usernodes_modifications.

Returns
This node as a Node.

◆ Ungroup()

Result<HashMap<InternedId, InternedId> > Ungroup ( Opt< ChangeList & >  list = {})

Dissolves this node into its children. This can only be called for a direct child node of the root node which is a group. It moves all children of that node including their inner connections to the root node. External connections (from the group to other nodes) are moved to the inner nodes as well.

Parameters
[in]listAn optional ChangeList to track the changes.
Returns
The mapping from original identifiers within the group to the new identifiers used at root level.
See also
MutableRoot::MoveToGroup

◆ MoveToNodeSystem()

Result<NodeSystem> MoveToNodeSystem ( Opt< ChangeList & >  list = {})