RTI Connext Modern C++ API
Version 5.2.0
|
The definition of the dds::core::safe_enum TypeConsistencyEnforcementKind. More...
#include <PolicyKind.hpp>
Public Types | |
enum | type { DISALLOW_TYPE_COERCION, ALLOW_TYPE_COERCION } |
The underlying enum type. More... | |
The definition of the dds::core::safe_enum TypeConsistencyEnforcementKind.
The underlying enum
type.
DISALLOW_TYPE_COERCION |
The DataWriter and the DataReader must support the same data type in order for them to communicate. This is the degree of type consistency enforcement required by the OMG DDS Specification prior to the OMG Extensible and Dynamic Topic Types for DDS Specification. |
ALLOW_TYPE_COERCION |
The DataWriter and the DataReader need not support the same data type in order for them to communicate as long as the DataReader's type is assignable from the DataWriter's type. For example, the following two extensible types will be assignable to each other since MyDerivedType contains all the members of MyBaseType (member_1) plus some additional elements (member_2). struct MyBaseType {
long member_1;
};
struct MyDerivedType: MyBaseType {
long member_2;
};
Even if MyDerivedType was not explicitly inheriting from MyBaseType the types would still be assignable. For example: struct MyBaseType {
long member_1;
};
struct MyDerivedType {
long member_1;
long member_2;
};
For additional information on type assignability refer to the OMG Extensible and Dynamic Topic Types for DDS Specification. [default] |