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

Offset to an array of final elements. More...

#include <SequenceOffsets.hpp>

Inheritance diagram for rti::flat::FinalArrayOffset< ElementOffset, N >:

Public Member Functions

ElementOffset get_element (unsigned int i)
 Gets the Offset to an 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.

Detailed Description

template<typename ElementOffset, unsigned int N>
class rti::flat::FinalArrayOffset< ElementOffset, N >

Offset to an array of final elements.

Template Parameters
ElementOffsetA final struct Offset, such as MyFlatFinalOffset.
NThe array bound. For multidimensional arrays, N is the product of each dimension bound.

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

FinalArrayOffset and FinalAlignedArrayOffset provide the same interface, but have different implementation details. FinalArrayOffset is used when the array member is part of a final type too, whereas FinalAlignedArrayOffset corresponds to an array inside a mutable type.

A FinalArrayOffset may meet the requirements to be cast to an array of the equivalent plain C++ element type (see rti::flat::plain_cast()).

Member Function Documentation

template<typename ElementOffset , unsigned int N>
ElementOffset rti::flat::FinalArrayOffset< ElementOffset, N >::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

RTI Connext Modern C++ API Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc