RTI Connext Modern C++ API  Version 6.0.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rti::flat::StringBuilder Class Reference

Builds a string. More...

#include <SequenceBuilders.hpp>

Inheritance diagram for rti::flat::StringBuilder:
rti::flat::PrimitiveSequenceBuilder< char > rti::flat::AbstractSequenceBuilder rti::flat::AbstractListBuilder rti::flat::AbstractBuilder

Public Member Functions

StringBuilderset_string (const char *value)
 Sets the string value.
Offset finish ()
 Finishes building the string.
- Public Member Functions inherited from rti::flat::PrimitiveSequenceBuilder< char >
PrimitiveSequenceBuilderadd_next (charvalue)
 Adds the next element.
PrimitiveSequenceBuilderadd_n (const char *array, unsigned int count)
 Adds all the elements in an array.
PrimitiveSequenceBuilderadd_n (unsigned int count, charvalue=char())
 Adds a number of elements with the same value.
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.

Detailed Description

Builds a string.

A StringBuilder only provides one method, set_string(), so it can be typically used as follows:

MyFlatMutableBuilder my_builder = ...;

Note that by relying on the builder destructor, there is no need to call finish() on the object returned by build_my_string().

Member Function Documentation

StringBuilder& rti::flat::StringBuilder::set_string ( const char *  value)

Sets the string value.

Offset rti::flat::StringBuilder::finish ( )

Finishes building the string.

An Offset to the member that has been built.
See Also

RTI Connext Modern C++ API Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc