RTI Connext Modern C++ API
Version 6.0.0
|
Base class of all Builders. More...
#include <Builder.hpp>
Public Member Functions | |
void | discard () |
Discards a member in process of being built. | |
bool | is_nested () const |
Returns whether this is a member Builder. | |
bool | is_valid () const |
Whether this Builder is valid. | |
rti::xcdr::length_t | capacity () const |
Returns the total capacity in bytes. | |
Protected Member Functions | |
virtual | ~AbstractBuilder () |
If this is a member Builder, it calls finish(). | |
Base class of all Builders.
|
inlineprotectedvirtual |
If this is a member Builder, it calls finish().
If this Builder is building a member (that is, is_nested() is true), and the object goes out of scope before finish() has been called, its destructor calls finish(). Note, however, that it won't report any error.
If this Builder is building a sample (!is_nested()), its destructor doesn't do anything.
|
inline |
Discards a member in process of being built.
This function ends the creation of a member, returning the Builder of the type that contains the member to its previous state, as if this member had never been built.
This method is useful when during the building of a member an error occurs and the application wants to roll back, instead of finishing an incomplete member.
|
inline |
Returns whether this is a member Builder.
A member Builder is a Builder that has been created by calling a "build_<member>"
function on another Builder (for example, MyFlatMutableBuilder::build_my_mutable()).
|
inline |
Whether this Builder is valid.
A Builder is not valid when it is default-constructed, or after any of these functions is called: finish(), finish_sample(), discard().
|
inline |
Returns the total capacity in bytes.
The capacity is the total number of bytes this Builder can contain. For a sample Builder (that is, one such that is_nested() returns false), rti::flat::build_data reserves enough bytes to accommodate any sample of a given type.