SourceCodePortId Struct Reference

#include <micronodes_ports.h>

Detailed Description

SourceCodePortId is used internally to identify the ports created with the MAXON_PORT macros.

Public Member Functions

 SourceCodePortId (Int h=-1, Int i=-1)
 
 operator Bool () const
 
 MAXON_OPERATOR_STRUCT (SourceCodePortId, hash, linearIndex)
 

Public Attributes

Int hash
 
Int linearIndex
 

Constructor & Destructor Documentation

◆ SourceCodePortId()

SourceCodePortId ( Int  h = -1,
Int  i = -1 
)
explicit

Member Function Documentation

◆ operator Bool()

operator Bool ( ) const
explicit

◆ MAXON_OPERATOR_STRUCT()

MAXON_OPERATOR_STRUCT ( SourceCodePortId  ,
hash  ,
linearIndex   
)

Member Data Documentation

◆ hash

Int hash

A hash code based on the port name. Negative for input ports, non-negative for output or state ports.

◆ linearIndex

Int linearIndex

The linear index for indexed ports. E.g. for a port array p[3][4] the port at [1][2] has linear index 1*4+2 = 6.