VariadicPort< T, OUTPUT, AS_INPUT > Class Template Reference

#include <variadic_port.h>

Detailed Description

template<typename T, Bool OUTPUT, Bool AS_INPUT>
class maxon::corenodes::VariadicPort< T, OUTPUT, AS_INPUT >

VariadicPort manages ports with a dynamic number of instances. The usage is documented at MicroNodeInterface::AddVariadicPort.

Classes

class  Access
 
class  Ports
 

Public Types

using PortId = typename std::conditional< OUTPUT, MicroNodePtr<>, InPortId >::type
 

Public Member Functions

Result< void > Init (MicroNodeGroupInterface *node, const Block< const Member > &members, MicroNode::FLAGS flags=MicroNode::FLAGS::NONE)
 
Result< void > Init (MicroNodeGroupInterface *node, const CString &prefix, Int count, Int base, MicroNode::FLAGS flags=MicroNode::FLAGS::NONE, const DataType &type=GetPortType< T >())
 
template<typename SUFFIXES >
Result< void > Init (MicroNodeGroupInterface *node, const CString &prefix, const SUFFIXES &suffixes, MicroNode::FLAGS flags=MicroNode::FLAGS::NONE, const DataType &type=GetPortType< T >())
 
Result< void > SetType (Int index, const DataType &type)
 
template<typename MNI >
Result< void > ConnectMicroNode (MicroNodePtr< MNI > node, Access MNI::*a, WIRETYPE wtype=DEFAULT_WIRE)
 
BaseArray< PortId > & GetPorts ()
 
Int GetCount () const
 

Static Public Member Functions

static Result< VariadicPortCreate (MicroNodeGroupInterface *node, const CString &prefix, Int count, Int base, MicroNode::FLAGS flags=MicroNode::FLAGS::NONE)
 
static Result< VariadicPortCreate (MicroNodeGroupInterface *node, const CString &prefix, const Data &arg, const DataType &type=GetPortType< T >(), MicroNode::FLAGS flags=MicroNode::FLAGS::NONE)
 
static Result< VariadicPortCreate (MicroNodeGroupInterface *node, const Block< const Member > &members, MicroNode::FLAGS flags=MicroNode::FLAGS::NONE)
 

Static Public Attributes

static constexpr WIRETYPE DEFAULT_WIRE
 
static constexpr MicroNode::TYPE PORT_TYPE
 

Static Private Member Functions

static void Assign (InPortId &p, MicroNodePtr<> ptr, MicroNodeGroupInterface *node, const Id &name)
 
static void Assign (MicroNodePtr<> &p, MicroNodePtr<> ptr, MicroNodeGroupInterface *node, const Id &name)
 

Private Attributes

MicroNodeGroupRef _group
 
BaseArray< PortId_ports
 
Bool _template
 
CString _prefix
 

Member Typedef Documentation

◆ PortId

using PortId = typename std::conditional<OUTPUT, MicroNodePtr<>, InPortId>::type

Member Function Documentation

◆ Create() [1/3]

static Result<VariadicPort> Create ( MicroNodeGroupInterface node,
const CString prefix,
Int  count,
Int  base,
MicroNode::FLAGS  flags = MicroNode::FLAGS::NONE 
)
static

◆ Create() [2/3]

static Result<VariadicPort> Create ( MicroNodeGroupInterface node,
const CString prefix,
const Data arg,
const DataType type = GetPortType<T>(),
MicroNode::FLAGS  flags = MicroNode::FLAGS::NONE 
)
static

◆ Create() [3/3]

static Result<VariadicPort> Create ( MicroNodeGroupInterface node,
const Block< const Member > &  members,
MicroNode::FLAGS  flags = MicroNode::FLAGS::NONE 
)
static

◆ Init() [1/3]

Result<void> Init ( MicroNodeGroupInterface node,
const Block< const Member > &  members,
MicroNode::FLAGS  flags = MicroNode::FLAGS::NONE 
)

◆ Init() [2/3]

Result<void> Init ( MicroNodeGroupInterface node,
const CString prefix,
Int  count,
Int  base,
MicroNode::FLAGS  flags = MicroNode::FLAGS::NONE,
const DataType type = GetPortType<T>() 
)

◆ Init() [3/3]

Result<void> Init ( MicroNodeGroupInterface node,
const CString prefix,
const SUFFIXES &  suffixes,
MicroNode::FLAGS  flags = MicroNode::FLAGS::NONE,
const DataType type = GetPortType<T>() 
)

◆ SetType()

Result<void> SetType ( Int  index,
const DataType type 
)

◆ ConnectMicroNode()

Result<void> ConnectMicroNode ( MicroNodePtr< MNI >  node,
Access MNI::*  a,
WIRETYPE  wtype = DEFAULT_WIRE 
)

◆ GetPorts()

BaseArray<PortId>& GetPorts ( )

◆ GetCount()

Int GetCount ( ) const

◆ Assign() [1/2]

static void Assign ( InPortId p,
MicroNodePtr<>  ptr,
MicroNodeGroupInterface node,
const Id name 
)
staticprivate

◆ Assign() [2/2]

static void Assign ( MicroNodePtr<> &  p,
MicroNodePtr<>  ptr,
MicroNodeGroupInterface node,
const Id name 
)
staticprivate

Member Data Documentation

◆ DEFAULT_WIRE

constexpr WIRETYPE DEFAULT_WIRE
staticconstexpr

◆ PORT_TYPE

constexpr MicroNode::TYPE PORT_TYPE
staticconstexpr

◆ _group

MicroNodeGroupRef _group
private

◆ _ports

BaseArray<PortId> _ports
private

◆ _template

Bool _template
private

◆ _prefix

CString _prefix
private