A singleton factory for creating, copying, and deleting data type definitions dynamically.
More...
|
TypeCode | create_struct_tc (String name, ExtensibilityKind extensibility_kind, StructMember[] members) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_STRUCT com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_struct_tc (String name, StructMember[] members) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_STRUCT com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_value_tc (String name, ExtensibilityKind extensibility_kind, short type_modifier, TypeCode concrete_base, ValueMember[] members) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_VALUE com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_value_tc (String name, short type_modifier, TypeCode concrete_base, ValueMember[] members) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_VALUE com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_union_tc (String name, ExtensibilityKind extensibility_kind, TypeCode discriminator_type, int default_index, UnionMember[] members) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_UNION com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_union_tc (String name, TypeCode discriminator_type, int default_index, UnionMember[] members) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_UNION com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_enum_tc (String name, ExtensibilityKind extensibility_kind, EnumMember[] members) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_ENUM com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_enum_tc (String name, EnumMember[] members) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_ENUM com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_alias_tc (String name, TypeCode original_type, boolean is_pointer) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_ALIAS (typedef) com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_string_tc (int bound) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_STRING com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_wstring_tc (int bound) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_WSTRING com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_sequence_tc (int bound, TypeCode element_type) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_SEQUENCE com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_array_tc (int[] dimensions, TypeCode element_type) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_ARRAY com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | create_array_tc (int length, TypeCode element_type) throws BAD_PARAM |
| Constructs a com.rti.dds.typecode.TCKind.TK_ARRAY com.rti.dds.typecode.TypeCode for a single-dimensional array. More...
|
|
TypeCode | clone_tc (TypeCode tc) |
| Creates and returns a copy of the input com.rti.dds.typecode.TypeCode. More...
|
|
void | delete_tc (TypeCode tc) |
| Deletes the input com.rti.dds.typecode.TypeCode. More...
|
|
TypeCode | get_primitive_tc (TCKind kind) throws BAD_PARAM |
| Get the com.rti.dds.typecode.TypeCode for a primitive type (integers, floating point values, etc.) identified by the given com.rti.dds.typecode.TCKind. More...
|
|
A singleton factory for creating, copying, and deleting data type definitions dynamically.
You can access the singleton with the com.rti.dds.typecode.TypeCodeFactory.get_instance method.
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 com.rti.dds.typecode.TypeCode class and then register it with the Dynamic Data API.
The methods 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 com.rti.dds.typecode.TypeCode that you created; if you got the object from com.rti.dds.typecode.TypeCodeFactory.get_primitive_tc, you must not delete it.)
Copying type definitions:
You can also create deep copies of type definitions:
Get the com.rti.dds.typecode.TypeCode for a primitive type (integers, floating point values, etc.) identified by the given com.rti.dds.typecode.TCKind.
- See also
- com.rti.dds.typecode.TypeCode.TypeCode.TC_LONG
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_ULONG
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_SHORT
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_USHORT
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_FLOAT
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_DOUBLE
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_LONGDOUBLE
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_OCTET
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_BOOLEAN
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_CHAR
-
com.rti.dds.typecode.TypeCode.TypeCode.TC_WCHAR
References TypeCode.TC_BOOLEAN, TypeCode.TC_CHAR, TypeCode.TC_DOUBLE, TypeCode.TC_FLOAT, TypeCode.TC_LONG, TypeCode.TC_LONGDOUBLE, TypeCode.TC_LONGLONG, TypeCode.TC_NULL, TypeCode.TC_OCTET, TypeCode.TC_SHORT, TypeCode.TC_ULONG, TypeCode.TC_ULONGLONG, TypeCode.TC_USHORT, TypeCode.TC_WCHAR, TCKind.TK_BOOLEAN, TCKind.TK_CHAR, TCKind.TK_DOUBLE, TCKind.TK_FLOAT, TCKind.TK_LONG, TCKind.TK_LONGDOUBLE, TCKind.TK_LONGLONG, TCKind.TK_NULL, TCKind.TK_OCTET, TCKind.TK_SHORT, TCKind.TK_ULONG, TCKind.TK_ULONGLONG, TCKind.TK_USHORT, and TCKind.TK_WCHAR.