MicroNode Class Reference

#include <corenodes_instances.h>

Inheritance diagram for MicroNode:

Detailed Description

MicroNode is the base class of all micro node implementation classes such as BasicMicroNode or BatchMicroNode. To implement a new custom micro node, you usually write a subclass of BasicMicroNode.

There is a 1:1 correspondence between a MicroNodeInterface instance and a MicroNode instance: Each MicroNodeInterface instance holds its own MicroNode instance, see MicroNodeInterface::GetImplementation() and MicroNode::GetNode().

Although MicroNode itself has no data members, it is ensured by its subclasses that the data layout always starts with MicroNode::Base. MicroNode::ToBase() does the corresponding cast.

Classes

class  AllowsChild
 
class  AllowsParent
 
class  Base
 
struct  Child
 
class  Lazy
 
class  PortsAccess
 
struct  Source
 

Public Types

enum class  TYPE {
  INVALID ,
  BASIC ,
  BATCH ,
  SPLIT_MERGE ,
  ITERATION ,
  SEQUENCING ,
  RECURSION_STEP ,
  CURRENT_ITERATION_VALUE ,
  CURRENT_ITERATION_VALUE_WITH_INIT ,
  COPY ,
  SET_TRUE ,
  NOP ,
  SUBTRACTIVE_DOMAIN ,
  JOIN ,
  CONTROL_TRANSFER ,
  MAX_WITHOUT_FLAG ,
  VARIABLE_MASK ,
  MIN_FLAG ,
  VALUE_PORT_MASK ,
  INPUT_PORT_MASK ,
  EXPORTED_PORT ,
  VIRTUAL_INPUT_PORT ,
  OUTPUT_PORT_MASK ,
  VARIABLE ,
  PORT_MASK ,
  FACTOR_MASK ,
  ROOT ,
  WHILE_CONDITION ,
  INDEFINITE_LOOP ,
  BLOCK ,
  TOP_LEVEL_FACTOR_MASK ,
  FRAME_MASK ,
  TOP_LEVEL_FRAME ,
  FRAME ,
  EVENT_MASK ,
  EVENT ,
  FACTOR_HEAD_MASK ,
  BLOCK_HEAD ,
  CONDITIONAL_HEAD ,
  RECURSION_HEAD ,
  DEFINITE_FACTOR_HEAD_MASK ,
  CONTAINER_LOOP_HEAD_MASK ,
  CONTAINER_OUTPUT_HEAD_MASK ,
  DEFINITE_FACTOR_MASK ,
  CONTAINER_OUTPUT_ELEMENT_MASK ,
  INDEXABLE_FACTOR_MASK ,
  DIMENSIONAL_FACTOR_TEST ,
  CONTAINER_LOOP_MASK ,
  DEFINITE_LOOP_HEAD ,
  CONTAINER_LOOP_HEAD ,
  ARRAY_LOOP_HEAD ,
  CONTAINER_LOOP ,
  ARRAY_LOOP ,
  CONTAINER_OUTPUT_HEAD ,
  CONTAINER_OUTPUT_ELEMENT ,
  ARRAY_OUTPUT_ELEMENT ,
  DEFINITE_LOOP ,
  GENERIC_DEFINITE_LOOP ,
  RECURSION ,
  INPUT_ELEMENT_MASK ,
  ARRAY_INPUT_ELEMENT ,
  CONTAINER_INPUT_ELEMENT ,
  INPUT_MASK ,
  OUTPUT_MASK ,
  CONDITIONAL_MASK ,
  IF ,
  CONTAINER_MASK ,
  CONTAINER ,
  ARRAY_CONTAINER ,
  ARRAY ,
  CONTAINER_OUTPUT_MASK ,
  CONTAINER_OUTPUT ,
  CONTAINER_INPUT_GROUP_MASK ,
  CONTAINER_INPUT_GROUP ,
  FACTOR_WITH_FACTOR_VARIABLE ,
  ALL
}
 
enum class  FLAGS : Int64 {
  NONE ,
  STATE ,
  STATE_MODIFIER ,
  LOCAL ,
  PERMANENT ,
  CACHED ,
  CURRENT_ITV ,
  NEXT_ITV ,
  CONTAINER_MEMBER ,
  COMMUTATIVE ,
  STATE_MAPPER ,
  PARAMETER ,
  INPUT_WITHOUT_VALUE ,
  OUTER_DOMAIN ,
  SUSPEND ,
  INDEPENDENT ,
  INCLUDE_IN_PREDECESSORS ,
  FACTOR_REFERENCE ,
  OPTIONAL_INPUT ,
  CURRENT_ITV_GROUP ,
  NEXT_ITV_GROUP ,
  NEW_UNIQUE_NAME ,
  TIME_LOOP ,
  UNDERSCORE_NUMBER_PREFIX ,
  WRAPPER_DONT_WRAP ,
  WRAPPER_HIDDEN ,
  WRAPPER_KEEP_LETTER_CASE ,
  WRAPPER_LAMBDA ,
  WRAPPER_USE_ATTRIBUTE_RESOURCES ,
  WRAPPER_FIXED_VARIADIC ,
  WRAPPER_COPIED_VARIADIC ,
  WRAPPER_INNER_DOMAIN ,
  WRAPPER_OUTER_DOMAIN ,
  WRAPPER_ENCLOSING_DOMAIN ,
  WRAPPER_STREAM ,
  WRAPPER_CONTEXT ,
  NO_LIFETIME_PORT ,
  NO_FACTOR_NODES ,
  WRAPPER_FLAGS ,
  ITV_MASK ,
  ITV_GROUP_MASK ,
  PORT_MODIFIERS ,
  MODIFIERS ,
  PORTINFO_FLAGS ,
  ALL
}
 
enum class  PORTSACCESS_FLAGS {
  NONE ,
  ITERATION ,
  CONTAINER_MASK ,
  CONST_MASK ,
  BATCH ,
  BATCH_ACCESS ,
  CONTAINER ,
  CONST_CONTAINER ,
  DIRECT_ACCESS_TEST
}
 
template<typename PORT >
using Input = typename PORT::PrivateInput
 
template<typename... PORTS>
using Ports = typename PortsAccess< PORTSACCESS_FLAGS::NONE, PORTS... >::Members
 

Public Member Functions

enum maxon::corenodes::MicroNode::TYPE MAXON_ENUM_ORDERED_FLAGS_CLASS (TYPE)
 
enum maxon::corenodes::MicroNode::FLAGS Int64 MAXON_ENUM_FLAGS_CLASS (FLAGS)
 
const BaseToBase () const
 
BaseToBase ()
 
Bool HasSameClass (const MicroNode &other) const
 
const MicroNodeInterfaceGetNode () const
 
MicroNodeInterfaceGetNode ()
 
TYPE GetType () const
 
FLAGS GetFlags () const
 
enum maxon::corenodes::MicroNode::PORTSACCESS_FLAGS MAXON_ENUM_FLAGS_CLASS (PORTSACCESS_FLAGS)
 

Static Public Member Functions

static void InitUserData ()
 
static void GetLlvmAssembly (const LlvmGlobalsReceiver &)
 

Public Attributes

class maxon::corenodes::MicroNode::Base MAXON_ENUM_FLAGS_CLASS
 

Static Public Attributes

static const TYPE INPUT_TYPE_MASK
 
static const TYPE OUTPUT_TYPE_MASK
 
static const FLAGS MICRONODE_FLAGS
 

Member Typedef Documentation

◆ Input

using Input = typename PORT::PrivateInput

◆ Ports

using Ports = typename PortsAccess<PORTSACCESS_FLAGS::NONE, PORTS...>::Members

You have to use {const Ports<...>&} as the parameter type of the Process method of a BasicMicroNode.

Template Parameters
PORTSThe ports which shall be accessed within the Process method.

Member Enumeration Documentation

◆ TYPE

enum TYPE
strong

This enum lists the defined micro node types.

Enumerator
INVALID 
BASIC 

Enum value for BasicMicroNode.

BATCH 
SPLIT_MERGE 
ITERATION 
SEQUENCING 
RECURSION_STEP 
CURRENT_ITERATION_VALUE 
CURRENT_ITERATION_VALUE_WITH_INIT 
COPY 
SET_TRUE 
NOP 
SUBTRACTIVE_DOMAIN 
JOIN 
CONTROL_TRANSFER 
MAX_WITHOUT_FLAG 
VARIABLE_MASK 
MIN_FLAG 
VALUE_PORT_MASK 
INPUT_PORT_MASK 
EXPORTED_PORT 
VIRTUAL_INPUT_PORT 
OUTPUT_PORT_MASK 
VARIABLE 
PORT_MASK 
FACTOR_MASK 
ROOT 
WHILE_CONDITION 
INDEFINITE_LOOP 
BLOCK 
TOP_LEVEL_FACTOR_MASK 
FRAME_MASK 
TOP_LEVEL_FRAME 
FRAME 
EVENT_MASK 
EVENT 
FACTOR_HEAD_MASK 
BLOCK_HEAD 
CONDITIONAL_HEAD 
RECURSION_HEAD 
DEFINITE_FACTOR_HEAD_MASK 
CONTAINER_LOOP_HEAD_MASK 
CONTAINER_OUTPUT_HEAD_MASK 
DEFINITE_FACTOR_MASK 
CONTAINER_OUTPUT_ELEMENT_MASK 
INDEXABLE_FACTOR_MASK 
DIMENSIONAL_FACTOR_TEST 
CONTAINER_LOOP_MASK 
DEFINITE_LOOP_HEAD 
CONTAINER_LOOP_HEAD 
ARRAY_LOOP_HEAD 
CONTAINER_LOOP 
ARRAY_LOOP 
CONTAINER_OUTPUT_HEAD 
CONTAINER_OUTPUT_ELEMENT 
ARRAY_OUTPUT_ELEMENT 
DEFINITE_LOOP 
GENERIC_DEFINITE_LOOP 
RECURSION 
INPUT_ELEMENT_MASK 
ARRAY_INPUT_ELEMENT 
CONTAINER_INPUT_ELEMENT 
INPUT_MASK 
OUTPUT_MASK 
CONDITIONAL_MASK 
IF 
CONTAINER_MASK 
CONTAINER 
ARRAY_CONTAINER 
ARRAY 
CONTAINER_OUTPUT_MASK 
CONTAINER_OUTPUT 
CONTAINER_INPUT_GROUP_MASK 
CONTAINER_INPUT_GROUP 
FACTOR_WITH_FACTOR_VARIABLE 
ALL 

◆ FLAGS

enum FLAGS : Int64
strong

This enum lists the flags for micro nodes as returned by GetFlags().

Enumerator
NONE 

No flag set.

STATE 
STATE_MODIFIER 
LOCAL 
PERMANENT 
CACHED 
CURRENT_ITV 
NEXT_ITV 
CONTAINER_MEMBER 
COMMUTATIVE 
STATE_MAPPER 
PARAMETER 

Set for ports added by ParameterBuilder::AddParameter, ports that don't have input/default values given by the graph (like component access ports).

INPUT_WITHOUT_VALUE 
OUTER_DOMAIN 
SUSPEND 
INDEPENDENT 
INCLUDE_IN_PREDECESSORS 
FACTOR_REFERENCE 
OPTIONAL_INPUT 
CURRENT_ITV_GROUP 
NEXT_ITV_GROUP 
NEW_UNIQUE_NAME 
TIME_LOOP 
UNDERSCORE_NUMBER_PREFIX 
WRAPPER_DONT_WRAP 
WRAPPER_HIDDEN 
WRAPPER_KEEP_LETTER_CASE 
WRAPPER_LAMBDA 
WRAPPER_USE_ATTRIBUTE_RESOURCES 
WRAPPER_FIXED_VARIADIC 
WRAPPER_COPIED_VARIADIC 
WRAPPER_INNER_DOMAIN 

Marker flag for inner-domain ports, used by the core node wrapper.

WRAPPER_OUTER_DOMAIN 

Marker flag for outer-domain ports, used by the core node wrapper.

WRAPPER_ENCLOSING_DOMAIN 

Marker flag for enclosing-domain ports, used by the core node wrapper.

WRAPPER_STREAM 

Marker flag for stream ports, used by the core node wrapper.

WRAPPER_CONTEXT 

Marker flag for context ports, used by the core node wrapper.

NO_LIFETIME_PORT 
NO_FACTOR_NODES 
WRAPPER_FLAGS 
ITV_MASK 
ITV_GROUP_MASK 
PORT_MODIFIERS 
MODIFIERS 
PORTINFO_FLAGS 
ALL 

◆ PORTSACCESS_FLAGS

enum PORTSACCESS_FLAGS
strong
Enumerator
NONE 
ITERATION 
CONTAINER_MASK 
CONST_MASK 
BATCH 
BATCH_ACCESS 
CONTAINER 
CONST_CONTAINER 
DIRECT_ACCESS_TEST 

Member Function Documentation

◆ MAXON_ENUM_ORDERED_FLAGS_CLASS()

enum maxon::corenodes::MicroNode::TYPE MAXON_ENUM_ORDERED_FLAGS_CLASS ( TYPE  )

◆ MAXON_ENUM_FLAGS_CLASS() [1/2]

enum maxon::corenodes::MicroNode::FLAGS Int64 MAXON_ENUM_FLAGS_CLASS ( FLAGS  )

◆ ToBase() [1/2]

const Base& ToBase ( ) const

Casts this MicroNode to its Base object. Each MicroNode has a Base as its first data member.

Returns
This object, casted to Base.

◆ ToBase() [2/2]

Base& ToBase ( )

Casts this MicroNode to its Base object. Each MicroNode has a Base as its first data member.

Returns
This object, casted to Base.

◆ HasSameClass()

Bool HasSameClass ( const MicroNode other) const

Checks if this micro node has the same implementation class as other.

Parameters
[in]otherAnother micro node.
Returns
This object, casted to MicroNode.

◆ GetNode() [1/2]

const MicroNodeInterface* GetNode ( ) const

Returns the MicroNodeInterface instance which owns this MicroNode.

Returns
The owning MicroNodeInterface.

◆ GetNode() [2/2]

MicroNodeInterface* GetNode ( )

Returns the MicroNodeInterface instance which owns this MicroNode.

Returns
The owning MicroNodeInterface.

◆ GetType()

TYPE GetType ( ) const

Returns the type of this micro node.

Returns
Type of this micro node.

◆ GetFlags()

FLAGS GetFlags ( ) const

Returns the flags of this micro node.

Returns
Flags of this micro node.

◆ MAXON_ENUM_FLAGS_CLASS() [2/2]

◆ InitUserData()

static void InitUserData ( )
static

◆ GetLlvmAssembly()

static void GetLlvmAssembly ( const LlvmGlobalsReceiver )
static

Member Data Documentation

◆ MAXON_ENUM_FLAGS_CLASS

class maxon::corenodes::MicroNode::Base MAXON_ENUM_FLAGS_CLASS

◆ INPUT_TYPE_MASK

const TYPE INPUT_TYPE_MASK
static

◆ OUTPUT_TYPE_MASK

const TYPE OUTPUT_TYPE_MASK
static

◆ MICRONODE_FLAGS

const FLAGS MICRONODE_FLAGS
static