CoreNodeGroupInterface Class Reference

#include <corenodes.h>

Inheritance diagram for CoreNodeGroupInterface:

Detailed Description

CoreNodeGroupInterface is a group of core nodes.

Public Member Functions

MAXON_METHOD Result< CoreNodeInstancePtr > AddChild (const Id &name, const CoreNode &node)
 
MAXON_FUNCTION Result< CoreNodeInstancePtr > AddChild (const Id &name, Result< CoreNode > &&node)
 
MAXON_FUNCTION Result< CoreNodeInstancePtr > AddChild (const Id &name, IdOrBuilder &&nodeId, const DataDictionary &args=GetZeroRef< DataDictionary >())
 
MAXON_FUNCTION Result< CoreNodeInstancePtr > AddChild (const Id &name, IdOrBuilder &&nodeId, Result< DataDictionary > &&args)
 
template<typename TYPE >
MAXON_FUNCTION Result< CoreNodeInstancePtr > AddChild (const Id &name, IdOrBuilder &&nodeId, DataDictionary args=DataDictionary())
 
 MAXON_ADD_TO_REFERENCE_CLASS (Result< CoreNode > Finalize() { if(!this->GetPointer()) return IllegalArgumentError(MAXON_SOURCE_LOCATION);Result< CoreNode > result=this->GetPointer() ->PrivateFinalize();if(result==OK) this->ResetReference();return result;})
 
MAXON_METHOD Result< CoreNode > PrivateFinalize ()
 
template<typename NODECLASS >
ResultOk< void > PrivateAutoCreatePorts (const Generic *, const void *)
 
- Public Member Functions inherited from CoreNodeBaseInterface
MAXON_METHOD const IdGetId () const
 
MAXON_METHOD void SetId (const Id &name)
 
MAXON_METHOD CoreNodeFactory GetFactory () const
 
MAXON_METHOD const DataDictionary & GetArguments () const
 
MAXON_METHOD void InitFactory (const CoreNodeFactory &factory, const DataDictionary &args)
 
MAXON_METHOD Bool IsCoreNodeGroup () const
 
MAXON_METHOD Int GetChildCount () const
 
MAXON_METHOD const Interface::Instance * GetChild (Int index) const
 
MAXON_FUNCTION Interface::Instance * GetChild (Int index)
 
MAXON_METHOD const 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
 
MAXON_METHOD const 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 ATTR &attr) const
 
MAXON_METHOD Result< void > SetValue (const InternedId &attr, ForwardingDataPtr &&value)
 
template<typename ATTR >
MAXON_FUNCTION Result< void > SetValue (const ATTR &attr, const typename ATTR::ValueType &value)
 
template<typename ATTR >
MAXON_FUNCTION Result< void > SetValue (const ATTR &attr, typename ATTR::ValueType &&value)
 
MAXON_METHOD UniqueHash GetUniqueHashCode () const
 
 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 (ErrorList, Errors, "net.maxon.corenode.errors")
 
 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
 

Static Public Member Functions

static MAXON_METHOD CoreNodeGroupInterfaceAlloc (MAXON_SOURCE_LOCATION_DECLARATION)
 

Private Types

using Instance = CoreNodeInstanceInterface
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL_DERIVED (CoreNodeGroupInterface, MAXON_REFERENCE_NORMAL, "net.maxon.corenode.interface.corenodegroup")
 

Additional Inherited Members

- Public Types inherited from CoreNodeBaseInterface
using ErrorList = Array< Tuple< PortId, Error > >
 

Member Typedef Documentation

◆ Instance

This defines the covariant return type of GetChild

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL_DERIVED()

MAXON_INTERFACE_NONVIRTUAL_DERIVED ( CoreNodeGroupInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.corenode.interface.corenodegroup"   
)
private

◆ Alloc()

Creates a new, empty core node group.

Returns
A new core node group.

◆ AddChild() [1/5]

MAXON_METHOD Result<CoreNodeInstancePtr> AddChild ( const Id name,
const CoreNode &  node 
)

Adds a core node as an instance to this group using the given name.

The created instance is owned by this group.

Parameters
[in]nameThe name for the child. Names have to be unique within a group. If an empty name is passed a unique name will be chosen.
[in]nodeThe core node to add.
Returns
A pointer to the core node instance. The instance is owned by this group.

◆ AddChild() [2/5]

MAXON_FUNCTION Result<CoreNodeInstancePtr> AddChild ( const Id name,
Result< CoreNode > &&  node 
)

Adds a core node as an instance to this group using the given name.

The created instance is owned by this group.

Parameters
[in]nameThe name for the child. Names have to be unique within a group. If an empty name is passed a unique name will be chosen.
[in]nodeThe core node to add.
Returns
A pointer to the core node instance. The instance is owned by this group.

◆ AddChild() [3/5]

MAXON_FUNCTION Result<CoreNodeInstancePtr> AddChild ( const Id name,
IdOrBuilder &&  nodeId,
const DataDictionary &  args = GetZeroRef< DataDictionary >() 
)

Adds a core node as an instance to this group using the given name. nodeId specifies a CoreNodeFactory in the CoreNodes registry, this factory is used, together with the given factory arguments, to create the core node to add.

The created instance is owned by this group.

Parameters
[in]nameThe name for the child. Names have to be unique within a group. If an empty name is passed a unique name will be chosen.
[in]nodeIdThe identifier of the core node factory to use.
[in]argsThe factory arguments.
Returns
A pointer to the core node instance. The instance is owned by this group.

◆ AddChild() [4/5]

MAXON_FUNCTION Result<CoreNodeInstancePtr> AddChild ( const Id name,
IdOrBuilder &&  nodeId,
Result< DataDictionary > &&  args 
)

◆ AddChild() [5/5]

MAXON_FUNCTION Result<CoreNodeInstancePtr> AddChild ( const Id name,
IdOrBuilder &&  nodeId,
DataDictionary  args = DataDictionary() 
)

Adds a core node as an instance to this group using the given name. nodeId specifies a CoreNodeFactory in the CoreNodes registry. This factory is used, together with the factory arguments, to create the core node to add. The factory arguments are made up of the given args and an additional mapping of CoreNodeBaseInterface::Type to TYPE.

The created instance is owned by this group.

Template Parameters
TYPEThe data type to use for the CoreNodeBaseInterface::Type parameter in the factory arguments.
Parameters
[in]nameThe name for the child. Names have to be unique within a group. If an empty name is passed a unique name will be chosen.
[in]nodeIdThe identifier of the core node factory to use.
[in]argsThe factory arguments.
Returns
A pointer to the core node instance. The instance is owned by this group.

◆ MAXON_ADD_TO_REFERENCE_CLASS()

MAXON_ADD_TO_REFERENCE_CLASS ( Result< CoreNode > Finalize() { if(!this->GetPointer()) return IllegalArgumentError(MAXON_SOURCE_LOCATION);Result< CoreNode > result=this->GetPointer() ->PrivateFinalize();if(result==OK) this->ResetReference();return result;}  )

◆ PrivateFinalize()

MAXON_METHOD Result<CoreNode> PrivateFinalize ( )

◆ PrivateAutoCreatePorts()

ResultOk<void> PrivateAutoCreatePorts ( const Generic *  ,
const void *   
)