RTI Connext C# API  6.1.0
StructMember Class Reference

Represents a data member in a StructType. More...

Inheritance diagram for StructMember:
IStructMember IAggregationMember IMember

Public Member Functions

 StructMember (string name, DynamicType type, int id=InvalidMemberId, bool isExternal=false, bool isKey=false, bool isOptional=false)
 Creates a new StructMember. More...
 
override bool Equals (object other)
 Compares for equality More...
 
override int GetHashCode ()
 Calculates a hash code More...
 
bool Equals (StructMember other)
 Compares for equality More...
 
override string ToString ()
 Returns the member type and name More...
 

Static Public Attributes

const int InvalidMemberId
 The default value for a member id. More...
 

Properties

string Name [get]
 The member name. More...
 
DynamicType Type [get]
 The member type. More...
 
bool IsExternal [get]
 Whether this member is annotated as @external. More...
 
int Id [get]
 The member IDL (value of the @id annotation). More...
 
bool IsKey [get]
 Whether this member is annotated as @key. More...
 
bool IsOptional [get]
 Whether this member is annotated as @optional. More...
 
- Properties inherited from IStructMember
bool IsKey [get]
 Whether this member is annotated as a key. More...
 
bool IsOptional [get]
 Whether this member is annotated as optional. More...
 
- Properties inherited from IAggregationMember
IDynamicType Type [get]
 The IDynamicType of the IAggregationMember. More...
 
int Id [get]
 The id of the IAggregationMember. More...
 
bool IsExternal [get]
 Indicates whether or not the IAggregationMember is annotated as external. More...
 
- Properties inherited from IMember
string Name [get]
 The name of the member. More...
 

Detailed Description

Represents a data member in a StructType.

Constructor & Destructor Documentation

◆ StructMember()

StructMember ( string  name,
DynamicType  type,
int  id = InvalidMemberId,
bool  isExternal = false,
bool  isKey = false,
bool  isOptional = false 
)

Creates a new StructMember.

Parameters
nameThe name (required)
typeThe type (required)
idAn explicit member ID (optional, automatically assigned by default)
isExternalWhether to set @external (optional, false by default)
isKeyWhether to set @key (optional, false by default)
isOptionalWhether to set @optional (optional, false by default)

Member Function Documentation

◆ Equals() [1/2]

override bool Equals ( object  other)

Compares for equality

◆ Equals() [2/2]

bool Equals ( StructMember  other)

Compares for equality

◆ GetHashCode()

override int GetHashCode ( )

Calculates a hash code

◆ ToString()

override string ToString ( )

Returns the member type and name

Member Data Documentation

◆ InvalidMemberId

const int InvalidMemberId
static

The default value for a member id.

Property Documentation

◆ Id

int Id
get

The member IDL (value of the @id annotation).

◆ IsExternal

bool IsExternal
get

Whether this member is annotated as @external.

◆ IsKey

bool IsKey
get

Whether this member is annotated as @key.

◆ IsOptional

bool IsOptional
get

Whether this member is annotated as @optional.

◆ Name

string Name
get

The member name.

◆ Type

DynamicType Type
get

The member type.