Public Member Functions | |
final void | register_type (DomainParticipant participant, String type_name) |
Associate the TypeCode with the given com.rti.dds.domain.DomainParticipant under the given logical name. | |
final void | unregister_type (DomainParticipant participant, String type_name) |
Remove the definition of this type from the com.rti.dds.domain.DomainParticipant. | |
final String | get_type_name () |
Get the default name of this type. | |
final TypeCode | get_data_type () |
Get the TypeCode wrapped by this com.rti.dds.dynamicdata.DynamicDataTypeSupport. | |
Object | create_data () |
Create a new com.rti.dds.dynamicdata.DynamicData sample initialized with the TypeCode and properties of this com.rti.dds.dynamicdata.DynamicDataTypeSupport. | |
void | destroy_data (Object data) |
Finalize and deallocate the com.rti.dds.dynamicdata.DynamicData sample. | |
void | print_data (DynamicData data) |
Print a string representation of the given sample to the given file. | |
void | copy_data (DynamicData dst, DynamicData src) |
Deeply copy the given data samples. | |
void | delete () |
Delete a com.rti.dds.dynamicdata.DynamicDataTypeSupport object. | |
DynamicDataTypeSupport (TypeCode type, DynamicDataTypeProperty_t props) | |
Construct a new com.rti.dds.dynamicdata.DynamicDataTypeSupport object. | |
Static Public Attributes | |
static final DynamicDataTypeProperty_t | TYPE_PROPERTY_DEFAULT |
Sentinel constant indicating default values for com.rti.dds.dynamicdata.DynamicDataTypeProperty_t. | |
Static Protected Attributes | |
static final RuntimeException | DYNAMICDATA_TYPE_NOT_SUPPORTED = new RETCODE_ERROR("not a top-level type") |
A com.rti.dds.dynamicdata.DynamicDataTypeSupport has three roles:
DynamicDataTypeSupport | ( | TypeCode | type, | |
DynamicDataTypeProperty_t | props | |||
) |
Construct a new com.rti.dds.dynamicdata.DynamicDataTypeSupport object.
This step is usually followed by type registration.
The new object created by this constructor retains a reference to the TypeCode that is passed in. It is not safe to delete the TypeCode until the com.rti.dds.dynamicdata.DynamicDataTypeSupport itself is deleted. You have two options:
type | The TypeCode that describes the members of this type. | |
props | Policies that describe how to manage the memory and other properties of the data samples created by this factory. In most cases, the default values will be appropriate; see DynamicDataTypeSupport.TYPE_PROPERTY_DEFAULT. |
final void register_type | ( | DomainParticipant | participant, | |
String | type_name | |||
) |
Associate the TypeCode with the given com.rti.dds.domain.DomainParticipant under the given logical name.
Once a type has been registered, it can be referenced by name when creating a topic. Statically and dynamically defined types behave the same way in this respect.
final void unregister_type | ( | DomainParticipant | participant, | |
String | type_name | |||
) |
Remove the definition of this type from the com.rti.dds.domain.DomainParticipant.
This operation is optional; all types are automatically unregistered when a com.rti.dds.domain.DomainParticipant is deleted. Most application will not need to manually unregister types.
A type cannot be unregistered while it is still in use; that is, while any com.rti.dds.topic.Topic is still referring to it.
com.rti.dds.dynamicdata.DynamicDataTypeSupport.register_type
final String get_type_name | ( | ) |
Get the default name of this type.
The TypeCode that is wrapped by this com.rti.dds.dynamicdata.DynamicDataTypeSupport includes a name; this operation returns that name.
This operation is useful when registering a type, because in most cases it is not necessary for the physical and logical names of the type to be different.
myTypeSupport.register_type(myParticipant, myTypeSupport.get_type_name());
final TypeCode get_data_type | ( | ) |
Get the TypeCode wrapped by this com.rti.dds.dynamicdata.DynamicDataTypeSupport.
Object create_data | ( | ) |
Create a new com.rti.dds.dynamicdata.DynamicData sample initialized with the TypeCode and properties of this com.rti.dds.dynamicdata.DynamicDataTypeSupport.
DynamicData.DynamicData
void destroy_data | ( | Object | data | ) |
Finalize and deallocate the com.rti.dds.dynamicdata.DynamicData sample.
void print_data | ( | DynamicData | data | ) |
Print a string representation of the given sample to the given file.
This method is equivalent to com.rti.dds.dynamicdata.DynamicData.print.
void copy_data | ( | DynamicData | dst, | |
DynamicData | src | |||
) |
Deeply copy the given data samples.
void delete | ( | ) |
Delete a com.rti.dds.dynamicdata.DynamicDataTypeSupport object.
A com.rti.dds.dynamicdata.DynamicDataTypeSupport cannot be deleted while it is still in use. For each com.rti.dds.domain.DomainParticipant with which the com.rti.dds.dynamicdata.DynamicDataTypeSupport is registered, either the type must be unregistered or the participant must be deleted.
Calling this method is optional. If you do not call it, the garbage collector will perform the deletion when it is able.
final RuntimeException DYNAMICDATA_TYPE_NOT_SUPPORTED = new RETCODE_ERROR("not a top-level type") [static, protected] |
Cached exception to be thrown in the event that we can't create native type support.