Member Struct Reference

#include <datatypelib.h>

Detailed Description

Member represents a member of struct-like types or function signatures. A member is just a pair of a type and a name.

Classes

struct  FastNameCompare
 

Public Member Functions

 Member ()=default
 
MAXON_IMPLICIT Member (const DataType &t, const InternedId &n=InternedId())
 
MAXON_IMPLICIT Member (DataType &&t, InternedId &&n=InternedId())
 
String ToString (const FormatStatement *fmt=nullptr) const
 
 MAXON_OPERATOR_EQUALITY_HASHCODE (Member, type, name)
 
Bool operator< (const Member &other) const
 
 MAXON_OPERATOR_INEQUALITY (Member)
 

Static Public Member Functions

template<typename T >
static Member Create (const InternedId &n)
 
static Result< void > DescribeIO (const DataSerializeInterface &stream)
 

Public Attributes

DataType type
 
InternedId name
 

Constructor & Destructor Documentation

◆ Member() [1/3]

Member ( )
default

◆ Member() [2/3]

MAXON_IMPLICIT Member ( const DataType t,
const InternedId n = InternedId() 
)

◆ Member() [3/3]

Member Function Documentation

◆ Create()

static Member Create ( const InternedId n)
static

◆ ToString()

String ToString ( const FormatStatement fmt = nullptr) const

◆ MAXON_OPERATOR_EQUALITY_HASHCODE()

MAXON_OPERATOR_EQUALITY_HASHCODE ( Member  ,
type  ,
name   
)

◆ operator<()

Bool operator< ( const Member other) const

◆ MAXON_OPERATOR_INEQUALITY()

MAXON_OPERATOR_INEQUALITY ( Member  )

◆ DescribeIO()

static Result<void> DescribeIO ( const DataSerializeInterface stream)
static

Member Data Documentation

◆ type

DataType type

The type of the member.

◆ name

InternedId name

The name of the member, this may be empty where anonymous members are allowed.