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

Represents an IDL union. More...

Inheritance diagram for Rti.Types.Dynamic.UnionType:
Rti.Types.Dynamic.DynamicType Omg.Types.Dynamic.IUnionType Omg.Types.Dynamic.IDynamicType Omg.Types.Dynamic.IConstructedType Omg.Types.Dynamic.IDynamicType

Public Member Functions

UnionMember GetMember (uint index)
 Returns a member by its position in the type More...
 
UnionMember GetMember (string name)
 Finds a member by its name More...
 
uint FindMemberByName (string name)
 Finds the index for a member name, which can be used as the argument for GetMember(uint). More...
 
uint FindMemberById (int id)
 Finds the member index given a member ID (@id IDL annotation) More...
 
uint FindMemberByLabel (int label)
 Finds the member index given the value of the union discriminator (label) that selects that member. More...
 
uint GetCdrSerializedSampleMaxSize (short representationId=DataRepresentation.Xcdr)
 Gets the maximum serialized size of samples of this type using a certain DataRepresentation. More...
 
uint GetCdrSerializedSampleMinSize (short representationId=DataRepresentation.Xcdr)
 Gets the minimum serialized size of samples of this type using a certain DataRepresentation. More...
 
uint GetCdrSerializedSampleKeyMaxSize (short representationId=DataRepresentation.Xcdr)
 Gets the maximum serialized size of the data type's key using a certain DataRepresentation. More...
 
- Public Member Functions inherited from Rti.Types.Dynamic.DynamicType
override bool Equals (object other)
 Checks if both types definitions are identical. More...
 
override int GetHashCode ()
 A simple hash code function. More...
 
override string ToString ()
 Prints the IDL definition of this type More...
 
bool Equals (DynamicType other)
 Checks if both types definitions are identical. More...
 
void Dispose ()
 Deletes the native resources used by this object. Calling Dispose() for a DynamicType is optional. More...
 
IMember GetMember (uint index)
 Returns the i-th member of the IConstructedType. More...
 
IMember GetMember (string name)
 Returns a member of the IConstructedType by its name. More...
 

Properties

ExtensibilityKind ExtensibilityKind [get]
 The value for the IDL extensibility kind. More...
 
IEnumerable< UnionMemberMembers [get]
 The union members. More...
 
DynamicType Discriminator [get]
 The type of the union discriminator More...
 
uint MemberCount [get]
 The number of union members. More...
 
- Properties inherited from Rti.Types.Dynamic.DynamicType
string Name [get]
 The type name. More...
 
TypeKind Kind [get]
 The type kind. More...
 
- Properties inherited from Omg.Types.Dynamic.IDynamicType
string Name [get]
 The name of the IDynamicType. More...
 
TypeKind Kind [get]
 The kind of IDynamicType. More...
 
- Properties inherited from Omg.Types.Dynamic.IUnionType
IDynamicType Discriminator [get]
 The IUnionType discriminator. More...
 
new IEnumerable< IUnionMemberMembers [get]
 The IUnionType members. More...
 
- Properties inherited from Omg.Types.Dynamic.IConstructedType
ExtensibilityKind ExtensibilityKind [get]
 The ExtensibilityKind of the IConstructedType. More...
 
IEnumerable< IMemberMembers [get]
 The IConstructedType members. More...
 

Detailed Description

Represents an IDL union.

Member Function Documentation

◆ GetMember() [1/2]

UnionMember Rti.Types.Dynamic.UnionType.GetMember ( uint  index)

Returns a member by its position in the type

Exceptions
System.IndexOutOfRangeExceptionWhen index >= MemberCount.
Returns
The member if the index is valid, or null if the index is InvalidMemberIndex

Implements Omg.Types.Dynamic.IConstructedType.

◆ GetMember() [2/2]

UnionMember Rti.Types.Dynamic.UnionType.GetMember ( string  name)

Finds a member by its name

Returns
The member if the name exists, or null if the name doesn't exist

Implements Omg.Types.Dynamic.IConstructedType.

◆ FindMemberByName()

uint Rti.Types.Dynamic.UnionType.FindMemberByName ( string  name)

Finds the index for a member name, which can be used as the argument for GetMember(uint).

Returns
The member index, if the name exists or InvalidMemberIndex if it doesn't.

◆ FindMemberById()

uint Rti.Types.Dynamic.UnionType.FindMemberById ( int  id)

Finds the member index given a member ID (@id IDL annotation)

Returns
The member index, if the ID exists or InvalidMemberIndex if it doesn't.

The full documentation is available in the C API: DDS_TypeCode_find_member_by_id

◆ FindMemberByLabel()

uint Rti.Types.Dynamic.UnionType.FindMemberByLabel ( int  label)

Finds the member index given the value of the union discriminator (label) that selects that member.

Returns
The member index, if the label selects a member, or InvalidMemberIndex if it doesn't.

◆ GetCdrSerializedSampleMaxSize()

uint Rti.Types.Dynamic.UnionType.GetCdrSerializedSampleMaxSize ( short  representationId = DataRepresentation.Xcdr)

Gets the maximum serialized size of samples of this type using a certain DataRepresentation.

The full documentation is available in the C API: DDS_TypeCode_cdr_serialized_sample_max_size

◆ GetCdrSerializedSampleMinSize()

uint Rti.Types.Dynamic.UnionType.GetCdrSerializedSampleMinSize ( short  representationId = DataRepresentation.Xcdr)

Gets the minimum serialized size of samples of this type using a certain DataRepresentation.

The full documentation is available in the C API: DDS_TypeCode_cdr_serialized_sample_min_size

◆ GetCdrSerializedSampleKeyMaxSize()

uint Rti.Types.Dynamic.UnionType.GetCdrSerializedSampleKeyMaxSize ( short  representationId = DataRepresentation.Xcdr)

Gets the maximum serialized size of the data type's key using a certain DataRepresentation.

The full documentation is available in the C API: DDS_TypeCode_cdr_serialized_sample_key_max_size

Property Documentation

◆ ExtensibilityKind

ExtensibilityKind Rti.Types.Dynamic.UnionType.ExtensibilityKind
get

The value for the IDL extensibility kind.

Implements Omg.Types.Dynamic.IConstructedType.

◆ Members

IEnumerable<UnionMember> Rti.Types.Dynamic.UnionType.Members
get

The union members.

Implements Omg.Types.Dynamic.IUnionType.

◆ Discriminator

DynamicType Rti.Types.Dynamic.UnionType.Discriminator
get

The type of the union discriminator

Implements Omg.Types.Dynamic.IUnionType.

◆ MemberCount

uint Rti.Types.Dynamic.UnionType.MemberCount
get

The number of union members.