DDS_TypeCode Struct Reference
[Type Code Support]

The definition of a particular data type, which you can use to inspect the name, members, and other properties of types generated with rtiddsgen or to modify types you define yourself at runtime. More...

List of all members.

Public Member Functions

DDS_TCKind kind (DDS_ExceptionCode_t &ex) const
 Gets the DDS_TCKind value of a type code.
DDS_Boolean equal (const DDS_TypeCode *tc, DDS_ExceptionCode_t &ex) const
 Compares two DDS_TypeCode objects for equality.
const char * name (DDS_ExceptionCode_t &ex) const
 Retrieves the simple name identifying this DDS_TypeCode object within its enclosing scope.
DDS_UnsignedLong member_count (DDS_ExceptionCode_t &ex) const
 Returns the number of members of the type code.
const char * member_name (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Returns the name of a type code member identified by the given index.
DDS_UnsignedLong find_member_by_name (const char *name, DDS_ExceptionCode_t &ex) const
 Get the index of the member of the given name.
DDS_TypeCodemember_type (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Retrieves the DDS_TypeCode object describing the type of the member identified by the given index.
DDS_UnsignedLong member_label_count (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Returns the number of labels associated to the index-th union member.
DDS_Long member_label (DDS_UnsignedLong member_index, DDS_UnsignedLong label_index, DDS_ExceptionCode_t &ex) const
 Return the label_index-th label associated to the member_index-th member.
DDS_Long member_ordinal (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Returns the ordinal that corresponds to the index-th enum value.
DDS_Boolean is_member_key (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Function that tells if a member is a key or not.
DDS_Boolean is_member_required (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Indicates whether a given member of a type is required to be present in every sample of that type.
DDS_Boolean is_member_pointer (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Function that tells if a member is a pointer or not.
DDS_Boolean is_member_bitfield (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Function that tells if a member is a bitfield or not.
DDS_Short member_bitfield_bits (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Returns the number of bits of a bitfield member.
DDS_Visibility member_visibility (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Returns the constant that indicates the visibility of the index-th member.
DDS_TypeCodediscriminator_type (DDS_ExceptionCode_t &ex) const
 Returns the discriminator type code.
DDS_UnsignedLong length (DDS_ExceptionCode_t &ex) const
 Returns the number of elements in the type described by this type code.
DDS_UnsignedLong array_dimension_count (DDS_ExceptionCode_t &ex) const
 This function returns the number of dimensions of an array type code.
DDS_UnsignedLong array_dimension (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 This function returns the index-th dimension of an array type code.
DDS_UnsignedLong element_count (DDS_ExceptionCode_t &ex) const
 The number of elements in an array.
DDS_TypeCodecontent_type (DDS_ExceptionCode_t &ex) const
 Returns the DDS_TypeCode object representing the type for the members of the object described by this DDS_TypeCode object.
DDS_Boolean is_alias_pointer (DDS_ExceptionCode_t &ex) const
 Function that tells if an alias is a pointer or not.
DDS_Long default_index (DDS_ExceptionCode_t &ex) const
 Returns the index of the default member, or -1 if there is no default member.
DDS_TypeCodeconcrete_base_type (DDS_ExceptionCode_t &ex) const
 Returns the DDS_TypeCode that describes the concrete base type of the value type that this DDS_TypeCode object describes.
DDS_ValueModifier type_modifier (DDS_ExceptionCode_t &ex) const
 Returns a constant indicating the modifier of the value type that this DDS_TypeCode object describes.
DDS_Long member_id (DDS_UnsignedLong index, DDS_ExceptionCode_t &ex) const
 Returns the ID of a sparse type code member identified by the given index.
DDS_UnsignedLong find_member_by_id (DDS_Long id, DDS_ExceptionCode_t &ex) const
 Get the index of the member of the given ID.
DDS_UnsignedLong add_member_to_enum (const char *name, DDS_Long ordinal, DDS_ExceptionCode_t &ex)
 Add a new enumerated constant to this enum DDS_TypeCode.
DDS_UnsignedLong add_member (const char *name, DDS_Long id, const DDS_TypeCode *tc, DDS_Octet member_flags, DDS_ExceptionCode_t &ex)
 Add a new member to this DDS_TypeCode.
DDS_UnsignedLong add_member_ex (const char *name, DDS_Long id, const DDS_TypeCode *tc, DDS_Octet member_flags, DDS_Visibility visibility, DDS_Boolean is_pointer, DDS_Short bits, DDS_ExceptionCode_t &ex)
 Add a new member to this DDS_TypeCode.
void print_IDL (DDS_UnsignedLong indent, DDS_ExceptionCode_t &ex) const
 Prints a DDS_TypeCode in a pseudo-IDL notation.


Detailed Description

The definition of a particular data type, which you can use to inspect the name, members, and other properties of types generated with rtiddsgen or to modify types you define yourself at runtime.

You create DDS_TypeCode objects using the DDS_TypeCodeFactory singleton. Then you can use the methods on this class to inspect and modify the data type definition.

This class is based on a similar class from CORBA.

MT Safety:
SAFE for read-only access, UNSAFE for modification. Modifying a single DDS_TypeCode object concurrently from multiple threads is unsafe. Modifying a DDS_TypeCode from a single thread while concurrently reading the state of that DDS_TypeCode from another thread is also unsafe. However, reading the state of a DDS_TypeCode concurrently from multiple threads, without any modification, is safe.
Examples:

HelloWorld.cxx.


Member Function Documentation

DDS_TCKind DDS_TypeCode::kind ( DDS_ExceptionCode_t ex  )  const

Gets the DDS_TCKind value of a type code.

Parameters:
ex <<out>> Parameter for error indications. The values that it can take are:
Retrieves the kind of this DDS_TypeCode object. The kind of a type code determines which DDS_TypeCode methods may legally be invoked on it.

MT Safety:
SAFE.
Returns:
The type code kind.

DDS_Boolean DDS_TypeCode::equal ( const DDS_TypeCode tc,
DDS_ExceptionCode_t ex 
) const

Compares two DDS_TypeCode objects for equality.

MT Safety:
SAFE.
Parameters:
tc <<in>> Type code that will be compared with this DDS_TypeCode.
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
DDS_BOOLEAN_TRUE if the type codes are equal. Otherwise, DDS_BOOLEAN_FALSE.

const char* DDS_TypeCode::name ( DDS_ExceptionCode_t ex  )  const

Retrieves the simple name identifying this DDS_TypeCode object within its enclosing scope.

Precondition:
self kind is DDS_TK_STRUCT, DDS_TK_UNION, DDS_TK_ENUM, DDS_TK_VALUE, DDS_TK_SPARSE or DDS_TK_ALIAS.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
Name of the type code if no errors.

DDS_UnsignedLong DDS_TypeCode::member_count ( DDS_ExceptionCode_t ex  )  const

Returns the number of members of the type code.

The method member_count can be invoked on structure, union, and enumeration DDS_TypeCode objects.

Precondition:
self kind is DDS_TK_STRUCT, DDS_TK_UNION, DDS_TK_ENUM, DDS_TK_VALUE or DDS_TK_SPARSE.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
The number of members constituting the type described by this DDS_TypeCode object if no errors.

const char* DDS_TypeCode::member_name ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Returns the name of a type code member identified by the given index.

The method member_name can be invoked on structure, union, and enumeration DDS_TypeCode objects.

Precondition:
self kind is DDS_TK_STRUCT, DDS_TK_UNION, DDS_TK_ENUM, DDS_TK_VALUE or DDS_TK_SPARSE.
The index param must be in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
Name of the member if no errors.

DDS_UnsignedLong DDS_TypeCode::find_member_by_name ( const char *  name,
DDS_ExceptionCode_t ex 
) const

Get the index of the member of the given name.

MT Safety:
SAFE.

DDS_TypeCode* DDS_TypeCode::member_type ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Retrieves the DDS_TypeCode object describing the type of the member identified by the given index.

The method member_type can be invoked on structure and union type codes.

Precondition:
self kind is DDS_TK_STRUCT, DDS_TK_UNION, DDS_TK_VALUE or DDS_TK_SPARSE.
The index param must be in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
The DDS_TypeCode object describing the member at the given index if no errors.

DDS_UnsignedLong DDS_TypeCode::member_label_count ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Returns the number of labels associated to the index-th union member.

The method can be invoked on union DDS_TypeCode objects.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_UNION.
The index param must be in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
Number of labels if no errors.

DDS_Long DDS_TypeCode::member_label ( DDS_UnsignedLong  member_index,
DDS_UnsignedLong  label_index,
DDS_ExceptionCode_t ex 
) const

Return the label_index-th label associated to the member_index-th member.

This method has been modified for RTI Data Distribution Service from the CORBA Type code Specification.

Example:
  case 1: Label index 0
  case 2: Label index 1
    short short_member;

The method can be invoked on union DDS_TypeCode objects.

Precondition:
self kind is DDS_TK_UNION.
The member_index param must be in the interval [0,(member count-1)].
The label_index param must be in the interval [0,(member labels count-1)].
MT Safety:
SAFE.
Parameters:
member_index <<in>> Member index.
label_index <<in>> Label index.
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
The evaluated value of the label if no errors.

DDS_Long DDS_TypeCode::member_ordinal ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Returns the ordinal that corresponds to the index-th enum value.

The method can be invoked on enum DDS_TypeCode objects.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_ENUM.
Member index in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
Ordinal that corresponds to the index-th enumerator if no errors.

DDS_Boolean DDS_TypeCode::is_member_key ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Function that tells if a member is a key or not.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_STRUCT, DDS_TK_VALUE or DDS_TK_SPARSE.
The index param must be in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
DDS_BOOLEAN_TRUE if the member is a key. Otherwise, DDS_BOOLEAN_FALSE.

DDS_Boolean DDS_TypeCode::is_member_required ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Indicates whether a given member of a type is required to be present in every sample of that type.

Which fields are required depends on the DDS_TCKind of the type. For example, in a type of kind DDS_TK_SPARSE, key fields are required. In DDS_TK_STRUCT and DDS_TK_VALUE types, all fields are required.

MT Safety:
SAFE.

DDS_Boolean DDS_TypeCode::is_member_pointer ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Function that tells if a member is a pointer or not.

The method is_member_pointer can be invoked on union and structs type objects

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_STRUCT, DDS_TK_UNION or DDS_TK_VALUE.
The index param must be in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Index of the member for which type information is begin requested.
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
DDS_BOOLEAN_TRUE if the member is a pointer. Otherwise, DDS_BOOLEAN_FALSE.

DDS_Boolean DDS_TypeCode::is_member_bitfield ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Function that tells if a member is a bitfield or not.

The method can be invoked on struct type objects.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_STRUCT or DDS_TK_VALUE.
The index param must be in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
DDS_BOOLEAN_TRUE if the member is a bitfield. Otherwise, DDS_BOOLEAN_FALSE.

DDS_Short DDS_TypeCode::member_bitfield_bits ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Returns the number of bits of a bitfield member.

The method can be invoked on struct type objects.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_STRUCT or DDS_TK_VALUE.
The index param must be in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
The number of bits of the bitfield or DDS_TypeCode::NOT_BITFIELD if the member is not a bitfield.

DDS_Visibility DDS_TypeCode::member_visibility ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Returns the constant that indicates the visibility of the index-th member.

Precondition:
self kind is DDS_TK_VALUE. The index param must be in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
One of the following constants: DDS_PRIVATE_MEMBER or DDS_PUBLIC_MEMBER.

DDS_TypeCode* DDS_TypeCode::discriminator_type ( DDS_ExceptionCode_t ex  )  const

Returns the discriminator type code.

The method discriminator_type can be invoked only on union DDS_TypeCode objects.

Precondition:
self kind is DDS_TK_UNION.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
DDS_TypeCode object describing the discriminator of the union type if no errors.

DDS_UnsignedLong DDS_TypeCode::length ( DDS_ExceptionCode_t ex  )  const

Returns the number of elements in the type described by this type code.

Length is:

  • The maximum length of the string for string type codes.
  • The maximum length of the sequence for sequence type codes.
  • The first dimension of the array for array type codes.
Precondition:
self kind is DDS_TK_ARRAY, DDS_TK_SEQUENCE, DDS_TK_STRING or DDS_TK_WSTRING.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
The bound for strings and sequences, or the number of elements for arrays if no errors.

DDS_UnsignedLong DDS_TypeCode::array_dimension_count ( DDS_ExceptionCode_t ex  )  const

This function returns the number of dimensions of an array type code.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_ARRAY.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
Number of dimensions if no errors.

DDS_UnsignedLong DDS_TypeCode::array_dimension ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

This function returns the index-th dimension of an array type code.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_ARRAY.
Dimension index in the interval [0,(dimensions count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Dimension index in the interval [0,(dimensions count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
Requested dimension if no errors.

DDS_UnsignedLong DDS_TypeCode::element_count ( DDS_ExceptionCode_t ex  )  const

The number of elements in an array.

This operation isn't relevant for other kinds of types.

MT Safety:
SAFE.

DDS_TypeCode* DDS_TypeCode::content_type ( DDS_ExceptionCode_t ex  )  const

Returns the DDS_TypeCode object representing the type for the members of the object described by this DDS_TypeCode object.

For sequences and arrays, it returns the element type. For aliases, it returns the original type.

Precondition:
self kind is DDS_TK_ARRAY, DDS_TK_SEQUENCE or DDS_TK_ALIAS.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
A DDS_TypeCode object representing the element type for sequences and arrays, and the original type for aliases.

DDS_Boolean DDS_TypeCode::is_alias_pointer ( DDS_ExceptionCode_t ex  )  const

Function that tells if an alias is a pointer or not.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_ALIAS.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
DDS_BOOLEAN_TRUE if an alias is a pointer to the aliased type. Otherwise, DDS_BOOLEAN_FALSE.

DDS_Long DDS_TypeCode::default_index ( DDS_ExceptionCode_t ex  )  const

Returns the index of the default member, or -1 if there is no default member.

The method default_index can be invoked only on union DDS_TypeCode objects.

Precondition:
self kind is DDS_TK_UNION
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
The index of the default member, or -1 if there is no default member.

DDS_TypeCode* DDS_TypeCode::concrete_base_type ( DDS_ExceptionCode_t ex  )  const

Returns the DDS_TypeCode that describes the concrete base type of the value type that this DDS_TypeCode object describes.

Precondition:
self kind is DDS_TK_VALUE or DDS_TK_SPARSE.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
DDS_TypeCode that describes the concrete base type or NULL if there is no a concrete base type.

DDS_ValueModifier DDS_TypeCode::type_modifier ( DDS_ExceptionCode_t ex  )  const

Returns a constant indicating the modifier of the value type that this DDS_TypeCode object describes.

Precondition:
self kind is DDS_TK_VALUE.
MT Safety:
SAFE.
Parameters:
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
One of the following type modifiers: DDS_VM_NONE, DDS_VM_ABSTRACT, DDS_VM_CUSTOM or DDS_VM_TRUNCATABLE.

DDS_Long DDS_TypeCode::member_id ( DDS_UnsignedLong  index,
DDS_ExceptionCode_t ex 
) const

Returns the ID of a sparse type code member identified by the given index.

The method can be invoked on sparse DDS_TypeCode objects.

This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.

Precondition:
self kind is DDS_TK_SPARSE.
Member index in the interval [0,(member count-1)].
MT Safety:
SAFE.
Parameters:
index <<in>> Member index in the interval [0,(member count-1)].
ex <<out>> Parameter for error indications. The values that can take are:
Returns:
ID of the member if no errors.

DDS_UnsignedLong DDS_TypeCode::find_member_by_id ( DDS_Long  id,
DDS_ExceptionCode_t ex 
) const

Get the index of the member of the given ID.

MT Safety:
SAFE.

DDS_UnsignedLong DDS_TypeCode::add_member_to_enum ( const char *  name,
DDS_Long  ordinal,
DDS_ExceptionCode_t ex 
)

Add a new enumerated constant to this enum DDS_TypeCode.

This method is applicable to DDS_TypeCode objects representing enumerations (DDS_TK_ENUM). To add a field to a structured type, see DDS_TypeCode::add_member_to_enum.

Modifying a DDS_TypeCode -- such as by adding a member -- is important if you are using the Dynamic Data APIs.

MT Safety:
UNSAFE.
Parameters:
name <<in>> The name of the new member. This string must be unique within this type and must not be NULL.
ordinal <<in>> The relative order of the new member in this enum or a custom integer value. The value must be unique within the type.
ex <<out>> If this method fails, this argument will contain information about the failure. Possible values include:
Returns:
The zero-based index of the new member relative to any other members that previously existed.
See also:
DDS_TypeCode::add_member

DDS_TypeCode::add_member_ex

DDS_TypeCodeFactory

DDS_UnsignedLong DDS_TypeCode::add_member ( const char *  name,
DDS_Long  id,
const DDS_TypeCode tc,
DDS_Octet  member_flags,
DDS_ExceptionCode_t ex 
)

Add a new member to this DDS_TypeCode.

This method is applicable to DDS_TypeCode objects representing structures (DDS_TK_STRUCT), value types (DDS_TK_VALUE), sparse value types (DDS_TK_SPARSE), and unions (DDS_TK_UNION). To add a constant to an enumeration, see DDS_TypeCode::add_member_to_enum.

Modifying a DDS_TypeCode -- such as by adding a member -- is important if you are using the Dynamic Data APIs.

Here's a simple code example that adds two fields to a data type, one an integer and another a sequence of integers.

 // Integer: 
  myTypeCode->add_member( 
      "myFieldName", 
      // If the type is sparse, specify an ID. Otherwise, use this sentinel: 
      DDS_TYPECODE_MEMBER_ID_INVALID, 
      DDS_TheTypeCodeFactory->get_primitive_tc(DDS_TK_LONG), 
      // New field is not a key: 
      DDS_TYPECODE_NONKEY_REQUIRED_MEMBER); 
  
  // Sequence of 10 or fewer integers: 
  myTypeCode.add_member( 
      "myFieldName", 
      // If the type is sparse, specify an ID. Otherwise, use this sentinel: 
      DDS_TYPECODE_MEMBER_ID_INVALID, 
      DDS_TheTypeCodeFactory->create_sequence_tc( 
          10, 
          DDS_TheTypeCodeFactory->get_primitive_tc(DDS_TK_LONG)), 
      // New field is not a key: 
      DDS_TYPECODE_NONKEY_REQUIRED_MEMBER); 

MT Safety:
UNSAFE.
Parameters:
name <<in>> The name of the new member.
id <<in>> The ID of the new member. This should only be specified for members of kind DDS_TK_SPARSE and DDS_TK_UNION; otherwise, it should be DDS_TYPECODE_MEMBER_ID_INVALID.
tc <<in>> The type of the new member. You can get or create this DDS_TypeCode with the DDS_TypeCodeFactory.
member_flags <<in>> Indicates whether the member is part of the key and whether it is required.
ex <<out>> If this method fails, this argument will contain information about the failure. Possible values include:
Returns:
The zero-based index of the new member relative to any other members that previously existed.
See also:
DDS_TypeCode::add_member_ex

DDS_TypeCode::add_member_to_enum

DDS_TypeCodeFactory

DDS_TYPECODE_NONKEY_MEMBER

DDS_TYPECODE_KEY_MEMBER

DDS_TYPECODE_NONKEY_REQUIRED_MEMBER

DDS_UnsignedLong DDS_TypeCode::add_member_ex ( const char *  name,
DDS_Long  id,
const DDS_TypeCode tc,
DDS_Octet  member_flags,
DDS_Visibility  visibility,
DDS_Boolean  is_pointer,
DDS_Short  bits,
DDS_ExceptionCode_t ex 
)

Add a new member to this DDS_TypeCode.

Modifying a DDS_TypeCode -- such as by adding a member -- is important if you are using the Dynamic Data APIs.

MT Safety:
UNSAFE.
Parameters:
name <<in>> The name of the new member.
id <<in>> The ID of the new member. This should only be specified for members of kind DDS_TK_SPARSE and DDS_TK_UNION; otherwise, it should be DDS_TYPECODE_MEMBER_ID_INVALID.
tc <<in>> The type of the new member. You can get or create this DDS_TypeCode with the DDS_TypeCodeFactory.
member_flags <<in>> Indicates whether the member is part of the key and whether it is required.
visibility <<in>> Whether the new member is public or private. Non-public members are only relevant for types of kind DDS_TK_VALUE and DDS_TK_SPARSE.
is_pointer <<in>> Whether the data member, in its deserialized form, should be stored by pointer as opposed to by value.
bits <<in>> The number of bits, if this new member is a bit field, or DDS_TypeCode::NOT_BITFIELD.
ex <<out>> If this method fails, this argument will contain information about the failure. Possible values include:
Returns:
The zero-based index of the new member relative to any other members that previously existed.
See also:
DDS_TypeCode::add_member

DDS_TypeCodeFactory

DDS_TYPECODE_NONKEY_MEMBER

DDS_TYPECODE_KEY_MEMBER

DDS_TYPECODE_NONKEY_REQUIRED_MEMBER

void DDS_TypeCode::print_IDL ( DDS_UnsignedLong  indent,
DDS_ExceptionCode_t ex 
) const

Prints a DDS_TypeCode in a pseudo-IDL notation.

MT Safety:
SAFE.
Parameters:
indent <<in>> Indent.
ex <<out>> Parameter for error indications. The values that can take are:


RTI Data Distribution Service C++ API Version 4.5e Copyright © 23 Oct 2011 Real-Time Innovations, Inc