A GraphNode represents a general node (g-node for short) in the hierarchy of a GraphModelInterface. There are five different kinds of such a node: It may be a true node, an input or output port or an input port list or output port list. A node may have attributes, and if it is a port, it may be connected to other ports. For a general overview, see GraphModelInterface.
Most functions of GraphNode can be used for all node kinds, some functions are specific for certain kinds (such as Connect which is only supported for ports).
GraphNode holds a strong GraphModelRef reference on the graph, see GetGraph(). The node within the graph is referenced symbolically by a NodePath, see GetPath(). Therefore it is guaranteed for the referenced graph that it exists as long as the GraphNode, but not for the referenced node. Namely, a GraphNode can be in one of three states:
- It may be a null value, then it doesn't represent any node. IsNull() returns true in this state.
- It may be a valid node in a graph (IsValid() returns true). GetGraph() returns the graph, GetPath() the path of the node, and all supported functions can be called.
- It represents a node which doesn't exist any longer. IsValid() returns false, but IsPopulated() still returns true. Also GetGraph() and GetPath() return valid values, but you can't call any functions which would require access to the node. Such a state can be used to identify deleted nodes. A transition between the cases 2 and 3 can happen without this GraphNode being directly involved, namely when the graph is modified through another GraphNode and a node with the path of this GraphNode is added or removed.
|
Bool | IsValid () const |
|
Bool | IsPopulated () const |
|
Bool | IsInner () const |
|
const GraphModelRef & | GetGraph () const |
|
const NodePath & | GetPath () const |
|
| operator const NodePath & () const |
|
const InternedId & | GetId () const |
|
NODE_KIND | GetKind () const |
|
| GraphNode ()=default |
|
| ~GraphNode () |
|
| GraphNode (GraphNode &&src) |
|
| MAXON_OPERATOR_MOVE_ASSIGNMENT (GraphNode) |
|
| GraphNode (const GraphNode &src) |
|
| MAXON_OPERATOR_COPY_ASSIGNMENT (GraphNode) |
|
void | Reset () |
|
Bool | operator== (const GraphNode &other) const |
|
Bool | operator!= (const GraphNode &other) const |
|
HashInt | GetHashCode () const |
|
UniqueHash | GetUniqueHashCode () const |
|
String | ToString (const FormatStatement *fs=nullptr) const |
|
const GraphNodeBase & | GetBase () const |
|
GraphNodeBase & | GetBase () |
|
| GraphNodeFunctions ()=default |
|
| 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, Protected< GraphNodeBase > >::type > | GetParent () const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | GetAncestor (NODE_KIND mask) const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | GetInputs () const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | GetOutputs () const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | GetPortList (PORT_DIR dir) const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | FindChild (const InternedId &name) const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | FindChild (const Id &name) const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | FindChild (NODE_KIND mask) const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | FindPort (const InternedId &name) const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | FindInnerNode (const PathBlock &relativePath) const |
|
Result< Bool > | GetInnerNodes (NODE_KIND mask, Bool includeThis, const ValueReceiver< const GraphNode & > &receiver) const |
|
Result< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::type > | AddPort (const Id &name) const |
|
Result< BaseArray< typename SFINAEHelper< GraphNode, Protected< GraphNodeBase > >::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 |
|
Result< Opt< const T & > > | GetConnectionValue (const GraphNode &target, CONNECTION_POSITION position, const InternedId &attr, Bool reverse=false) const |
|
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 |
|
Result< Bool > | SetConnectionValue (const GraphNode &target, CONNECTION_POSITION position, const ATTR &attr, const typename ATTR::ValueType &value) const |
|
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, Protected< GraphNodeBase > >::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< Opt< const T & > > | GetValue (const InternedId &attr) const |
|
Result< Opt< const typename ATTR::ValueType & > > | GetValue () const |
|
Result< Opt< const typename ATTR::ValueType & > > | GetValue (const ATTR &attr) const |
|
Result< ConstDataPtr > | GetStoredValue (const InternedId &attr, const DataType &expectedType) const |
|
Result< Opt< const typename ATTR::ValueType & > > | GetStoredValue () const |
|
Result< Opt< const typename ATTR::ValueType & > > | GetStoredValue (const ATTR &attr) const |
|
Result< Bool > | GetBaseValues (const InternedId &attr, const DataType &expectedType, const ValueReceiver< const ConstDataPtr &, Int > &valueReceiver) const |
|
Result< Bool > | SetValue (const InternedId &attr, ForwardingDataPtr &&value, Bool checkAndInvalidate=true) const |
|
Result< Bool > | SetValue (const ATTR &attr, const typename ATTR::ValueType &value) const |
|
Result< Bool > | SetValue (const ATTR &attr, typename ATTR::ValueType &&value) const |
|
Result< Bool > | SetValue (const typename ATTR::ValueType &value) const |
|
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) |
|
Result< Bool > | SetDefaultValue (T &&value) const |
|
Result< const T & > | GetDefaultValue (const T &def=maxon::NullValue< const T & >()) const |
|
Result< const T & > | GetConstantValue (const T &def=maxon::NullValue< 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 |
|
template<typename... ARGS> |
| __attribute__ ((always_inline)) explicit Protected(ARGS &&... args) |
|