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

Offset to a sequence of non-primitive elements. More...

#include <SequenceOffsets.hpp>

Inheritance diagram for rti::flat::SequenceOffset< ElementOffset >:
rti::flat::AbstractAlignedList< ElementOffset > rti::flat::OffsetBase

Public Member Functions

ElementOffset get_element (unsigned int i)
 Gets the Offset to an element.
unsigned int element_count () const
 The number of elements.
- Public Member Functions inherited from rti::flat::AbstractAlignedList< ElementOffset >
iterator begin ()
 Gets an iterator to the first Offset.
iterator end ()
 Gets an iterator to the past-the-end element.
- Public Member Functions inherited from rti::flat::OffsetBase
bool is_null () const
 Indicates whether this Offset doesn't point to a valid element.
bool is_cpp_compatible () const
 Indicates whether rti::flat::plain_cast() is possible.
const unsigned char * get_buffer () const
 Gets this member's position in the buffer.
offset_t get_buffer_size () const
 Gets the size, in bytes, of this member in the buffer.

Additional Inherited Members

- Public Types inherited from rti::flat::AbstractAlignedList< ElementOffset >
typedef SequenceIterator
< ElementOffset, typename
ElementOffset::offset_kind > 
 The iterator type, SequenceIterator.

Detailed Description

template<typename ElementOffset>
class rti::flat::SequenceOffset< ElementOffset >

Offset to a sequence of non-primitive elements.

Template Parameters
ElementOffsetThe Offset type, for example MyFlatMutableOffset, MyFlatFinalOffset, or StringOffset.

Represents an Offset to a sequence member and allows getting an Offset to each of its elements.

A SequenceOffset may meet the requirements to be cast to an array of the equivalent plain C++ element type (see rti::flat::plain_cast), if the ElementOffset is a final type.

Member Function Documentation

template<typename ElementOffset>
ElementOffset rti::flat::SequenceOffset< ElementOffset >::get_element ( unsigned int  i)

Gets the Offset to an element.

iThe zero-based index to the element
The Offset to the element in the i-th position
template<typename ElementOffset>
unsigned int rti::flat::SequenceOffset< ElementOffset >::element_count ( ) const

The number of elements.

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