RTI Connext Modern C++ API Version 7.3.0

Offset to a string. More...

#include <SequenceOffsets.hpp>

Inheritance diagram for rti::flat::StringOffset:
rti::flat::PrimitiveSequenceOffset< char > rti::flat::AbstractPrimitiveList< char > rti::flat::OffsetBase

Public Member Functions

char * get_string ()
 Gets the string. More...
 
const char * get_string () const
 Gets the string (const) More...
 
unsigned int element_count () const
 Returns the number of characters. More...
 
- Public Member Functions inherited from rti::flat::PrimitiveSequenceOffset< char >
unsigned int element_count () const
 Returns the number of elements. More...
 
- Public Member Functions inherited from rti::flat::AbstractPrimitiveList< char >
char get_element (unsigned int i) const
 Returns an element by index. More...
 
bool set_element (unsigned int i, char value)
 Sets an element by index. More...
 
- Public Member Functions inherited from rti::flat::OffsetBase
bool is_null () const
 Indicates whether this Offset doesn't point to a valid element. More...
 
bool is_cpp_compatible () const
 Indicates whether rti::flat::plain_cast() is possible. More...
 
const unsigned char * get_buffer () const
 Gets this member's position in the buffer. More...
 
offset_t get_buffer_size () const
 Gets the size, in bytes, of this member in the buffer. More...
 

Detailed Description

Offset to a string.

Member Function Documentation

◆ get_string() [1/2]

char * rti::flat::StringOffset::get_string ( )
inline

Gets the string.

The string returned can be modified as long as its size doesn't change.

References rti::flat::OffsetBase::get_buffer().

◆ get_string() [2/2]

const char * rti::flat::StringOffset::get_string ( ) const
inline

Gets the string (const)

References rti::flat::OffsetBase::get_buffer().

◆ element_count()

unsigned int rti::flat::StringOffset::element_count ( ) const
inline

Returns the number of characters.

This number doesn't include the null terminating character.

References rti::flat::PrimitiveSequenceOffset< T >::element_count().