RTI Connext Modern C++ API
Version 6.0.1
|
Builds a sequence of primitive members. More...
#include <SequenceBuilders.hpp>
Public Member Functions | |
PrimitiveSequenceBuilder & | add_next (T value) |
Adds the next element. | |
PrimitiveSequenceBuilder & | add_n (const T *array, unsigned int count) |
Adds all the elements in an array. | |
PrimitiveSequenceBuilder & | add_n (unsigned int count, T value) |
Adds a number of elements with the same value. | |
PrimitiveSequenceBuilder & | add_n (unsigned int count) |
Adds a number of uninitialized elements. | |
Offset | finish () |
Finishes building the sequence. | |
Additional Inherited Members | |
Protected Member Functions inherited from rti::flat::AbstractListBuilder | |
unsigned int | element_count () const |
Returns the current number of elements that have been added. | |
Builds a sequence of primitive members.
The elements can be added one by one with add_next() or all at once with add_n().
|
inline |
Adds the next element.
value | The primitive element to add |
|
inline |
Adds all the elements in an array.
array | The array containing the values to add |
count | The size of the array |
|
inline |
Adds a number of elements with the same value.
This overload initializes all the elements to a value.
count
). The other overloads, add_n(unsigned int) and add_n(const T*, unsigned int), are more efficientcount | The number of elements to add |
value | The value to set for each element |
|
inline |
Adds a number of uninitialized elements.
This operation is O(1), since it leaves the elements uninitialized. They can be initialized using the Offset returned by finish() and rti::flat::plain_cast(). For example:
count | The number of elements to add |
|
inline |
Finishes building the sequence.