type Ref_Access is access all Ref'Class;
type StructMember is new Integer;
type EnumMember is new Integer;
type ValueMember is new Integer;
type UnionMember is new Integer;
type CdrInputStream is new Integer;
type TCKind is new Integer;
function Get_Instance return Ref_Access;
function Create_Alias_Tc
( | This | : not null access Ref; |
S | : in String; | |
Tc | : in TypeCode; | |
Flag | : in Boolean) return TypeCode is abstract; |
self: <<in>> Cannot be NULL
name: <<in>> Name of the alias. Cannot be ull_value.
original_type: <<in>> Aliased type code. Cannot be ull_value.
is_pointer: <<in>> Indicates if the alias is a pointer to the aliased type code.
Raises: DDS.BAD_PARAM_SYSTEM_EXCEPTION_CODE. Illegal parameter value.
Returns: A newly-created DDS_TypeCode object describing an alias.
function Create_Array_Tc
( | This | : not null access Ref; |
Ai | : in Long_Array; | |
Tc | : in TypeCode) return TypeCode is abstract; |
self: <<in>> Cannot be NULL
dimensions: <<in>> Dimensions of the array. Each dimension has to be greater than 0.
element_type: <<in>> DDS_TypeCode describing the array elements. Cannot be ull_value.
Raises: DDS.BAD_PARAM_SYSTEM_EXCEPTION_CODE. Illegal parameter value.
Returns: A newly-created DDS_TypeCode object describing a sequence.
function Create_Enum_Tc
( | This | : not null access Ref; |
S | : in String; | |
Aenummember | : in EnumMember) return TypeCode is abstract; |
self: <<in>> Cannot be NULL
name: <<in>> Name of the enum type. Cannot be ull_value.
members: <<in>> Initial members of the enumeration. All members must have non- ull_value names, and both names and ordinal values must be unique within the type. Note that it is also possible to add members later with DDS_TypeCode.add_member_to_enum. This argument may be ull_value.
Raises: DDS.BAD_PARAM_SYSTEM_EXCEPTION_CODE. Illegal parameter value.
Returns: A newly-created DDS_TypeCode object describing an enumeration.
function Create_Sequence_Tc
( | This | : not null access Ref; |
I | : in Long; | |
Tc | : in TypeCode) return TypeCode is abstract; |
self: <<in>> Cannot be NULL
bound: <<in>> The bound for the sequence (> 0).
element_type: <<in>> DDS_TypeCode object describing the sequence elements.
Raises: DDS.BAD_PARAM_SYSTEM_EXCEPTION_CODE. Illegal parameter value.
Returns: A newly-created DDS_TypeCode object describing a sequence.
function Create_Sparse_Tc
( | This | : not null access Ref; |
S | : in String; | |
Word0 | : in Short; | |
Tc | : in TypeCode) return TypeCode is abstract; |
A sparse value type is similar to other value types but with one major difference: not all members need to be present in every sample.
It is not possible to generate code for sparse value types; they must be created at runtime using these APIs. You will interact with samples of sparse types using the DDSDynamicDataModule APIs.
self: <<in>> Cannot be NULL
name: <<in>> Name of the value type. Cannot be ull_value.
type_modifier: <<in>> One of the value type modifier constants: DDS.VM_NONE, DDS.VM_CUSTOM, DDS.VM_ABSTRACT or DDS.VM_TRUNCATABLE.
concrete_base: <<in>> DDS_TypeCode object describing the concrete valuetype base. It may be ull_value if the valuetype does not have a concrete base.
Raises: DDS.BAD_PARAM_SYSTEM_EXCEPTION_CODE. Illegal parameter value.
Returns: A newly-created DDS_TypeCode object describing a value.
self: <<in>> Cannot be NULL
bound: <<in>> Maximum length of the string. It cannot be negative. \endif \if C_CPP_LANGUAGE_ONLY
ex: <<out>> Parameter for error indications. The values that can take are:
Returns: A newly-created DDS_TypeCode object describing a string.
function Create_Struct_Tc
( | This | : not null access Ref; |
S | : in String; | |
Astructmember | : in StructMember) return TypeCode is abstract; |
self: <<in>> Cannot be NULL
name: <<in>> Name of the struct type. Cannot be ull_value.
members: <<in>> Initial members of the structure. This list may be empty (that is, FooSeq::length() may return zero). If the list is not empty, the elements must describe valid struct members. (For example, the names must be unique within the type.) This argument may be ull_value.
Raises: DDS.BAD_PARAM_SYSTEM_EXCEPTION_CODE. Illegal parameter value.
Returns: A newly-created DDS_TypeCode object describing a struct.
function Create_Tc_From_Stream
( | This | : not null access Ref; |
Inputstream | : in CdrInputStream) return TypeCode is abstract; |
function Create_Union_Tc
( | This | : not null access Ref; |
S | : in String; | |
Tc | : in TypeCode; | |
I | : in Long; | |
Aunionmember | : in UnionMember) return TypeCode is abstract; |
self: <<in>> Cannot be NULL
name: <<in>> Name of the union type. Cannot be ull_value.
discriminator_type: <<in>> Discriminator Type Code. Cannot be ull_value.
default_index: <<in>> Index of the default member, or -1 if there is no default member.
members: <<in>> Initial members of the union. This list may be empty. If the list is not empty, the elements must describe valid struct members. (For example, the names must be unique within the type.) This argument may be ull_value.
Raises: DDS.BAD_PARAM_SYSTEM_EXCEPTION_CODE. Illegal parameter value.
Returns: A newly-created DDS_TypeCode object describing a union.
function Create_Value_Tc
( | This | : not null access Ref; |
S | : in String; | |
Word0 | : in Short; | |
Tc | : in TypeCode; | |
Avaluemember | : in ValueMember) return TypeCode is abstract; |
self: <<in>> Cannot be NULL
name: <<in>> Name of the value type. Cannot be ull_value.
type_modifier: <<in>> One of the value type modifier constants: DDS.VM_NONE, DDS.VM_CUSTOM, DDS.VM_ABSTRACT or DDS.VM_TRUNCATABLE.
concrete_base: <<in>> DDS_TypeCode object describing the concrete valuetype base. It may be ull_value if the valuetype does not have a concrete base.
members: <<in>> Initial members of the value type. This list may be empty. If the list is not empty, the elements must describe valid value type members. (For example, the names must be unique within the type.) This argument may be ull_value.
Raises: DDS.BAD_PARAM_SYSTEM_EXCEPTION_CODE. Illegal parameter value.
Returns: A newly-created DDS_TypeCode object describing a value.
self: <<in>> Cannot be NULL
bound: <<in>> Maximum length of the wide string. It cannot be negative. \endif \if C_CPP_LANGUAGE_ONLY
ex: <<out>> Parameter for error indications. The values that can take are:
Returns: A newly-created DDS_TypeCode object describing a wide string.
See also: DDS_g_tc_long
See also: DDS_g_tc_ulong
See also: DDS_g_tc_short
See also: DDS_g_tc_ushort
See also: DDS_g_tc_float
See also: DDS_g_tc_double
See also: DDS_g_tc_longdouble
See also: DDS_g_tc_octet
See also: DDS_g_tc_boolean
See also: DDS_g_tc_char
See also: DDS_g_tc_wchar
You can access the singleton with the DDS_TypeCodeFactory.get_instance procedure.
If you want to publish and subscribe to data of types that are not known to you at system design time, this class will be your starting point. After creating a data type definition with this class, you will modify that definition using the DDS_TypeCode class and then register it with the DDSDynamicDataModule API.
The procedures of this class fall into several categories:
Getting definitions for primitive types:
Type definitions for primitive types (e.g. integers, floating point values, etc.) are pre-defined; your application only needs to get them, not create them.
Creating definitions for strings, arrays, and sequences:
Type definitions for strings, arrays, and sequences (i.e. variables-size lists) must be created as you need them, because the type definition includes the maximum length of those containers.
Creating definitions for structured types:
Structured types include structures, value types, and unions.
Creating definitions for other types:
The type system also supports enumerations and aliases (i.e.
typedef
s in C and C++).Deleting type definitions:
When you're finished using a type definition, you should delete it. ( Note that you only need to delete a DDS_TypeCode that you created; if you got the object from DDS_TypeCodeFactory.get_primitive_tc, you must not delete it.)
Copying type definitions:
You can also create deep copies of type definitions: