RTI Connext C# API Version 7.2.0
Rti.Types.Dynamic.UnionMember Class Reference

Represents a union member in a UnionType. More...

Inheritance diagram for Rti.Types.Dynamic.UnionMember:
Omg.Types.Dynamic.IUnionMember Omg.Types.Dynamic.IAggregationMember Omg.Types.Dynamic.IMember

Public Member Functions

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

Static Public Attributes

const int InvalidMemberId = 0x7FFFFFFF
 The default value for a member id. More...
 
const int DefaultLabel = 0x40000001
 A special integer used by Labels to indicate that a union member is selected by the default: label. 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...
 
IEnumerable< int > Labels [get]
 The labels that select this union member. More...
 
- Properties inherited from Omg.Types.Dynamic.IUnionMember
IEnumerable< int > Labels [get]
 The labels that select this IUnionMember. More...
 
- Properties inherited from Omg.Types.Dynamic.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 Omg.Types.Dynamic.IMember
string Name [get]
 The name of the member. More...
 

Detailed Description

Represents a union member in a UnionType.

Constructor & Destructor Documentation

◆ UnionMember()

Rti.Types.Dynamic.UnionMember.UnionMember ( string  name,
DynamicType  type,
IEnumerable< int >  labels,
int  id = InvalidMemberId,
bool  isExternal = false 
)
inline

Creates a new UnionMember.

Parameters
nameThe name (required)
typeThe type (required)
labelsThe labels that select this member (required)
idAn explicit member ID (optional, automatically assigned by default)
isExternalWhether to set @external (optional, false by default)

Member Function Documentation

◆ Equals() [1/2]

override bool Rti.Types.Dynamic.UnionMember.Equals ( object  other)

Compares for equality

◆ GetHashCode()

override int Rti.Types.Dynamic.UnionMember.GetHashCode ( )
inline

Calculates a hash code

◆ Equals() [2/2]

bool Rti.Types.Dynamic.UnionMember.Equals ( UnionMember  other)
inline

Compares for equality

◆ ToString()

override string Rti.Types.Dynamic.UnionMember.ToString ( )

Returns the member type and name

Field Documentation

◆ InvalidMemberId

const int Rti.Types.Dynamic.UnionMember.InvalidMemberId = 0x7FFFFFFF
static

The default value for a member id.

◆ DefaultLabel

const int Rti.Types.Dynamic.UnionMember.DefaultLabel = 0x40000001
static

A special integer used by Labels to indicate that a union member is selected by the default: label.

Property Documentation

◆ Name

string Rti.Types.Dynamic.UnionMember.Name
get

The member name.

Implements Omg.Types.Dynamic.IMember.

◆ Type

DynamicType Rti.Types.Dynamic.UnionMember.Type
get

The member type.

Implements Omg.Types.Dynamic.IAggregationMember.

◆ IsExternal

bool Rti.Types.Dynamic.UnionMember.IsExternal
get

Whether this member is annotated as @external.

Implements Omg.Types.Dynamic.IAggregationMember.

◆ Id

int Rti.Types.Dynamic.UnionMember.Id
get

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

Implements Omg.Types.Dynamic.IAggregationMember.

◆ Labels

IEnumerable<int> Rti.Types.Dynamic.UnionMember.Labels
get

The labels that select this union member.

When the union's discriminator is not of type int, the elements in this collection are cast to int.

The special value DefaultLabel refers to the default: label.

The full documentation is available in the C API: DDS_UnionMember_labels

Implements Omg.Types.Dynamic.IUnionMember.