CoreNodeInterface Class Reference

#include <corenodes.h>

Inheritance diagram for CoreNodeInterface:

Detailed Description

CoreNodeInterface represents a micro node group or core node group in a finalized state. You have to set those groups into finalized state by calling MicroNodeGroupRef::Finalize() or CoreNodeGroupRef::Finalize() after you have finished the setup of those groups. These methods return the group as a CoreNode. A CoreNode can't be modified, therefore it uses a const reference class.

Public Types

enum  GML_OPTIONS {
  NONE,
  DEEP,
  PORTS,
  NANO_EMBEDDED,
  NANO,
  BLOCK,
  HIDDEN_PORTS,
  VERBOSE
}
 

Public Member Functions

MAXON_METHOD Result< void > Invoke (const Block< const Tuple< ConstDataPtr, PORT_FLAGS >> &args) const
 
enum maxon::corenodes::CoreNodeInterface::GML_OPTIONS MAXON_ENUM_FLAGS_CLASS (GML_OPTIONS)
 
MAXON_METHOD Result< void > WriteGml (UrlOrOutputStream &&output, GML_OPTIONS options) const
 
- Public Member Functions inherited from CoreNodeBaseInterface
const MAXON_METHOD IdGetId () const
 
MAXON_METHOD void SetId (const Id &name)
 
MAXON_METHOD CoreNodeFactory GetFactory () const
 
const MAXON_METHOD DataDictionary & GetArguments () const
 
MAXON_METHOD void InitFactory (const CoreNodeFactory &factory, const DataDictionary &args)
 
MAXON_METHOD Bool IsCoreNodeGroup () const
 
MAXON_METHOD Int GetChildCount () const
 
const MAXON_METHOD Interface::Instance * GetChild (Int index) const
 
MAXON_FUNCTION Interface::Instance * GetChild (Int index)
 
const MAXON_METHOD Interface::Instance * FindChild (const Id &name) const
 
MAXON_METHOD Int GetPortCount (PORT_DIR direction) const
 
MAXON_METHOD Int FindPortIndex (const PortId &port) const
 
MAXON_METHOD Result< IntFindValidPortIndex (const PortId &port) const
 
const MAXON_METHOD PortInfoGetPortInfo (const PortId &port) const
 
MAXON_METHOD Result< const PortInfo & > GetValidPortInfo (const PortId &port) const
 
MAXON_METHOD Result< IntAddPort (PORT_DIR direction, const Id &name, const DataType &type)
 
MAXON_METHOD Result< void > AddPassThrough (const InPortId &input, const OutPortId &output, WIRETYPE wires)
 
MAXON_METHOD Result< DataGetValue (const InternedId &attr) const
 
template<typename ATTR >
MAXON_FUNCTION Result< Opt< typename ATTR::ValueType > > GetValue () const
 
MAXON_METHOD Result< void > SetValue (const InternedId &attr, ForwardingDataPtr &&value)
 
template<typename ATTR >
MAXON_FUNCTION Result< void > SetValue (const typename ATTR::ValueType &value)
 
template<typename ATTR >
MAXON_FUNCTION Result< void > SetValue (typename ATTR::ValueType &&value)
 
 MAXON_ATTRIBUTE_CLASS (Bool, Pure, "net.maxon.corenode.pure")
 
 MAXON_ATTRIBUTE_CLASS (maxon::corenodes::Optimizer, Optimizer, "net.maxon.corenode.optimizer")
 
 MAXON_ATTRIBUTE_CLASS (Id, NodeId, "net.maxon.corenode.nodeid")
 
 MAXON_ATTRIBUTE_CLASS (Data, Value, "net.maxon.corenode.value")
 
 MAXON_ATTRIBUTE_CLASS (DataType, Type, "net.maxon.corenode.type")
 
 MAXON_ATTRIBUTE_CLASS (Id, TypeId, "datatype")
 
 MAXON_ATTRIBUTE_CLASS (DataType, InType, "in")
 
 MAXON_ATTRIBUTE_CLASS (DataType, OutType, "out")
 
 MAXON_ATTRIBUTE_CLASS (DataType, SourceType, "net.maxon.corenode.sourcetype")
 
 MAXON_ATTRIBUTE_CLASS (BaseArray< Member >, Members, "net.maxon.corenode.members")
 
 MAXON_ATTRIBUTE_CLASS (Int, Count, "net.maxon.corenode.count")
 
 MAXON_ATTRIBUTE_CLASS (CONVERSION_FLAGS, ConversionFlags, "net.maxon.corenode.conversionflags")
 
 MAXON_ATTRIBUTE_CLASS (String, Message, "net.maxon.corenode.message")
 
 MAXON_ATTRIBUTE_CLASS (Id, VariableId, "net.maxon.corenode.variableid")
 
 MAXON_ATTRIBUTE_CLASS (Array< Id >, Filters, "net.maxon.corenode.filters")
 
MAXON_FUNCTION String ToString (const FormatStatement *fmt=nullptr) const
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL_DERIVED (CoreNodeInterface, MAXON_REFERENCE_CONST, "net.maxon.corenode.interface.corenode")
 

Member Enumeration Documentation

◆ GML_OPTIONS

enum GML_OPTIONS
strong

This enum contains options for the GML output written by WriteGml.

Enumerator
NONE 

No flags.

DEEP 

Write groups deeply, so the complete graph is written up to the micro node level.

PORTS 

Include ports.

NANO_EMBEDDED 

Write nano nodes embedded in their micro nodes.

NANO 

Write the nano graph instead of the core node graph.

BLOCK 

Write the compiled block graph instead of the core node graph.

HIDDEN_PORTS 

Include hidden ports.

VERBOSE 

Verbose output with a lot of information.

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL_DERIVED()

MAXON_INTERFACE_NONVIRTUAL_DERIVED ( CoreNodeInterface  ,
MAXON_REFERENCE_CONST  ,
"net.maxon.corenode.interface.corenode"   
)
private

◆ Invoke()

MAXON_METHOD Result<void> Invoke ( const Block< const Tuple< ConstDataPtr, PORT_FLAGS >> &  args) const

Invokes the core node directly (as opposed to the invocation from within a compiled core node graph). This is only supported for a limited set of core nodes. The main purpose is to assist the nodes compiler in constant propagation at compile-time.

Parameters
[in]argsThe arguments: At first the values for input ports, afterwards storage locations where output ports write their results.

◆ MAXON_ENUM_FLAGS_CLASS()

◆ WriteGml()

MAXON_METHOD Result<void> WriteGml ( UrlOrOutputStream &&  output,
GML_OPTIONS  options 
) const

Writes this core node to a GML file (graph modelling language). This can be used to visualize the core node with a graph viewer application such as yEd.

Parameters
[in]outputThe location to write to.
[in]optionsOptions for the GML output.