RTI Connext Modern C++ API Version 7.3.0
rti::flat::AbstractAlignedList< ElementOffset > Class Template Reference

Base class of Offsets to sequences and arrays of non-primitive members. More...

#include <SequenceOffsets.hpp>

Inheritance diagram for rti::flat::AbstractAlignedList< ElementOffset >:
rti::flat::OffsetBase rti::flat::FinalAlignedArrayOffset< ElementOffset, N > rti::flat::MutableArrayOffset< ElementOffset, N > rti::flat::SequenceOffset< ElementOffset >

Public Types

typedef SequenceIterator< ElementOffset, typename ElementOffset::offset_kind > iterator
 The iterator type, SequenceIterator. More...
 

Public Member Functions

iterator begin ()
 Gets an iterator to the first Offset. More...
 
iterator end ()
 Gets an iterator to the past-the-end element. 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

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

Base class of Offsets to sequences and arrays of non-primitive members.

Template Parameters
ElementOffsetThe Offset type of the elements

Member Typedef Documentation

◆ iterator

template<typename ElementOffset >
typedef SequenceIterator<ElementOffset, typename ElementOffset::offset_kind> rti::flat::AbstractAlignedList< ElementOffset >::iterator

The iterator type, SequenceIterator.

Member Function Documentation

◆ begin()

template<typename ElementOffset >
iterator rti::flat::AbstractAlignedList< ElementOffset >::begin ( )
inline

Gets an iterator to the first Offset.

begin() and end() enable the use of range-for loops, for example:

SequenceOffset<MyFlatMutableOffset> sequence_offset = my_type_offset.my_sequence();
for (auto element : sequence_offset) {
std::cout << element.x() << std::endl;
}

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

◆ end()

template<typename ElementOffset >
iterator rti::flat::AbstractAlignedList< ElementOffset >::end ( )
inline

Gets an iterator to the past-the-end element.

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