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

Base class for Offsets to sequences and arrays of primitive types. More...

#include <SequenceOffsets.hpp>

Inheritance diagram for rti::flat::AbstractPrimitiveList< T >:
rti::flat::OffsetBase rti::flat::PrimitiveArrayOffset< T, N > rti::flat::PrimitiveSequenceOffset< T >

Public Member Functions

get_element (unsigned int i) const
 Returns an element by index.
 
bool set_element (unsigned int i, T value)
 Sets an element by index.
 
- 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 T>
class rti::flat::AbstractPrimitiveList< T >

Base class for Offsets to sequences and arrays of primitive types.

Template Parameters
TThe primitive type

Member Function Documentation

template<typename T>
T rti::flat::AbstractPrimitiveList< T >::get_element ( unsigned int  i) const
inline

Returns an element by index.

Parameters
iThe zero-based index of the element
See Also
rti::flat::plain_cast() for a method to access all the elements at once
template<typename T>
bool rti::flat::AbstractPrimitiveList< T >::set_element ( unsigned int  i,
value 
)
inline

Sets an element by index.

Parameters
iThe zero-based index of the element to set
valueThe value to set
Returns
true if it was possible to set the element, or false if this collection has less than i - 1 elements.
See Also
rti::flat::plain_cast() for a method to access all the elements at once

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