RTI Connext Modern C++ API
Version 6.0.0
|
Represents the Offset to an arbitrary user-defined FlatData mutable IDL union. More...
#include <Offset.hpp>
Public Types | |
typedef MyFlatUnionConstOffset | ConstOffset |
The equivalent read-only Offset type. | |
Public Member Functions | |
MyFlatUnionOffset () | |
Creates a null Offset. | |
int32_t | _d () const |
Retrieves the union discriminator. | |
int32_t | my_primitive () const |
Retrieves the value for a primitive member. | |
MyFlatMutable::ConstOffset | my_mutable () const |
Retrieves a const Offset to a complex member. | |
MyFlatFinal::ConstOffset | my_final () const |
Retrieves a const Offset to a complex member. | |
bool | my_primitive (int32_t value) |
Sets the value for a primitive member. | |
MyFlatMutable::Offset | my_mutable () |
Retrieves a non-const Offset to a complex member. | |
MyFlatFinal::Offset | my_final () |
Retrieves a non-const Offset to a complex member. | |
Represents the Offset to an arbitrary user-defined FlatData mutable IDL union.
This example type represents the Offset type that rtiddsgen would generate for MyFlatUnion.
It provides accessors for each of its members, plus the discriminator _d(). Accessors can return other Offsets or primitive values.
Given a union, only one member, the one identified by _d(), can exist at a time. The discriminator cannot be modified.
typedef MyFlatUnionConstOffset MyFlatUnionOffset::ConstOffset |
The equivalent read-only Offset type.
|
inline |
Creates a null Offset.
int32_t MyFlatUnionOffset::_d | ( | ) | const |
Retrieves the union discriminator.
In this example:
Any other discriminator value indicates that no member or an unknown member follows.
Note that the discriminator cannot be modified, since that would potentially change the size of this Sample by selecting a different member. The discriminator is selected during the building of a Sample (see MyUnionBuilder).
int32_t MyFlatUnionOffset::my_primitive | ( | ) | const |
Retrieves the value for a primitive member.
MyFlatMutable::ConstOffset MyFlatUnionOffset::my_mutable | ( | ) | const |
Retrieves a const Offset to a complex member.
MyFlatFinal::ConstOffset MyFlatUnionOffset::my_final | ( | ) | const |
Retrieves a const Offset to a complex member.
bool MyFlatUnionOffset::my_primitive | ( | int32_t | value | ) |
Sets the value for a primitive member.
MyFlatMutable::Offset MyFlatUnionOffset::my_mutable | ( | ) |
Retrieves a non-const Offset to a complex member.
MyFlatFinal::Offset MyFlatUnionOffset::my_final | ( | ) |
Retrieves a non-const Offset to a complex member.