MicroNode::Base Class Reference

#include <corenodes_instances.h>

Detailed Description

All MicroNode subclasses have a Base member as their first member. It stores data which is needed by all micro nodes.

The casts from and to MicroNode are handled by MicroNode::ToBase() and Base::ToNode().

Public Member Functions

MicroNodeToMicroNode ()
 
template<typename T >
const T & To () const
 

Public Attributes

MicroNodeInterface_node
 
TYPE _type
 
FLAGS _flags
 
void(* _free )(const MicroNode *)
 
PortsDescriptionCallback _portsDesc
 
ACCESS_INDEX _nextFreeAccessIndex
 

Member Function Documentation

◆ ToMicroNode()

MicroNode& ToMicroNode ( )

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

Returns
This object, casted to MicroNode.

◆ To()

const T& To ( ) const

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

Template Parameters
TA subclass of MicroNode.
Returns
This object, casted to T.

Member Data Documentation

◆ _node

The MicroNodeInterface instance which owns this MicroNode.

◆ _type

TYPE _type

The type of this micro node.

◆ _flags

FLAGS _flags

The flags of this micro node.

◆ _free

void(* _free(const MicroNode *)

The free function is used to free this MicroNode instance.

◆ _portsDesc

This callback is used during the automatic setup of the ports created by MAXON_PORT macros.

◆ _nextFreeAccessIndex

ACCESS_INDEX _nextFreeAccessIndex

Keeps track of the next unused access index during port setup.