RTI Connext Modern C++ API
Version 6.1.1
|
Builds a sequence member of variable-size elements. More...
#include <SequenceBuilders.hpp>
Public Types | |
typedef SequenceOffset< typename ElementBuilder::Offset > | Offset |
The related Offset type. More... | |
Public Member Functions | |
ElementBuilder | build_next () |
Begins building the next element. More... | |
Offset | finish () |
Finishes building the sequence. More... | |
![]() | |
void | discard () |
Discards a member in process of being built. More... | |
bool | is_nested () const |
Returns whether this is a member Builder. More... | |
bool | is_valid () const |
Whether this Builder is valid. More... | |
rti::xcdr::length_t | capacity () const |
Returns the total capacity in bytes. More... | |
Additional Inherited Members | |
![]() | |
unsigned int | element_count () const |
Returns the current number of elements that have been added. More... | |
![]() | |
virtual | ~AbstractBuilder () |
If this is a member Builder, it calls finish(). More... | |
Builds a sequence member of variable-size elements.
ElementBuilder | The Builder type for the elements of the sequence |
To build the elements use the ElementBuilder returned by build_next(). An empty sequence can be built by calling finish() without any call to build_next().
This class doesn't enforce the sequence bound set in IDL.
The following example uses a MutableSequenceBuilder to initialize a sequence member of MyFlatMutableBuilder with two elements:
typedef SequenceOffset<typename ElementBuilder::Offset> rti::flat::MutableSequenceBuilder< ElementBuilder >::Offset |
The related Offset type.
|
inline |
Begins building the next element.
Before calling build_next() to create a new element, the application must have called finish() on the previous element Builder.
|
inline |
Finishes building the sequence.