RTI Connext C API
Version 6.1.1
|
A singleton factory for creating, copying, and deleting data type definitions dynamically. More...
A singleton factory for creating, copying, and deleting data type definitions dynamically.
You can access the singleton with the DDS_TypeCodeFactory_get_instance function.
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 Dynamic Data API.
The functions 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: