RTI Connext Traditional C++ API
Version 6.0.1
|
Represents the Builder for an arbitrary user-defined mutable IDL union. More...
#include <Builder.hpp>
Public Types | |
typedef MyFlatUnionOffset | Offset |
The related offset type. | |
Public Member Functions | |
MyFlatUnionBuilder () | |
Creates an invalid Builder. | |
Offset | finish () |
Finishes building a member. | |
MyFlatUnion * | finish_sample () |
Finishes building a sample. | |
bool | add_my_primitive (int32_t value) |
Adds a primitive member. | |
MyFlatMutableBuilder | build_my_mutable (int32_t discriminator=1) |
Builds a mutable-struct member. | |
MyFlatFinal::Offset | add_my_final () |
Adds a final-struct member. | |
Additional Inherited Members | |
Protected Member Functions inherited from rti::flat::AbstractBuilder | |
virtual | ~AbstractBuilder () |
If this is a member Builder, it calls finish(). | |
Represents the Builder for an arbitrary user-defined mutable IDL union.
This example type represents the Builder type that rtiddsgen would generate for MyFlatUnion and allows creating a sample or a member of that type.
Union builders are similar to struct builders (see MyFlatMutableBuilder), except that they only allow adding/building one member.
"Add" and "build" functions automatically set the discriminator value that in the IDL definition selects that member. If more than one discriminator value selects a member, the add/build function allows picking one.
The related offset type.
|
inline |
Creates an invalid Builder.
build_<member>
function. Offset MyFlatUnionBuilder::finish | ( | ) |
Finishes building a member.
MyFlatUnion* MyFlatUnionBuilder::finish_sample | ( | ) |
Finishes building a sample.
bool MyFlatUnionBuilder::add_my_primitive | ( | int32_t | value | ) |
Adds a primitive member.
This function automatically selects the discriminator 0, which corresponds to the member 'my_primitive' (see MyFlatUnion)
MyFlatMutableBuilder MyFlatUnionBuilder::build_my_mutable | ( | int32_t | discriminator = 1 | ) |
Builds a mutable-struct member.
discriminator | Allows selecting one of the possible discriminator values for this member: 1 or 2. This argument is optional: if not specified it selects the first 'case' label in the IDL definition (1). |
MyFlatFinal::Offset MyFlatUnionBuilder::add_my_final | ( | ) |
Adds a final-struct member.
This function automatically selects the discriminator value 3, which corresponds to the member 'my_final' (see MyFlatUnion).