Safe DDS
eprosima::safedds::memory::container::Array< T, N > Struct Template Reference

Array container. More...

#include <Array.hpp>

Public Types

using value_type = T
 Type of the elements. More...
 

Public Member Functions

uint32_t size () const noexcept
 Size of the array. More...
 
uint32_t max_size () const noexcept
 Maximum size of the array. More...
 
T & at (uint32_t pos) &noexcept
 Access to an element. Can only be used on lvalue objects. More...
 
const T & at (uint32_t pos) const &&noexcept=delete
 Deleted at method on rvalue objects. More...
 
const T & at (uint32_t pos) const &noexcept
 Const access to an element. Can only be used on lvalue objects. More...
 
T * data () &noexcept
 Access to the first element. More...
 
T const * data () const &&noexcept=delete
 Deleted data method on rvalue objects. More...
 
T const * data () const &noexcept
 Const access to the first element. More...
 
T & operator[] (uint32_t pos) &noexcept
 Access to an element. More...
 
const T & operator[] (uint32_t pos) const &&noexcept=delete
 Deleted operator [] on rvalue objects. More...
 
const T & operator[] (uint32_t pos) const &noexcept
 Const access to an element. More...
 
void fill (const T &value) noexcept
 Fill the array with a value. More...
 

Public Attributes

ArrayTraits< T, N >::InnerArrayType inner_array
 Inner array. More...
 

Detailed Description

template<typename T, uint32_t N>
struct eprosima::safedds::memory::container::Array< T, N >

Array container.

Template Parameters
TType of the elements
NNumber of elements

Member Typedef Documentation

◆ value_type

template<typename T , uint32_t N>
using eprosima::safedds::memory::container::Array< T, N >::value_type = T

Type of the elements.

Member Function Documentation

◆ at() [1/3]

template<typename T , uint32_t N>
T& eprosima::safedds::memory::container::Array< T, N >::at ( uint32_t  pos) &
inlinenoexcept

Access to an element. Can only be used on lvalue objects.

Parameters
posPosition of the element
Returns
Reference to the element

◆ at() [2/3]

template<typename T , uint32_t N>
const T& eprosima::safedds::memory::container::Array< T, N >::at ( uint32_t  pos) const &&
deletenoexcept

Deleted at method on rvalue objects.

◆ at() [3/3]

template<typename T , uint32_t N>
const T& eprosima::safedds::memory::container::Array< T, N >::at ( uint32_t  pos) const &
inlinenoexcept

Const access to an element. Can only be used on lvalue objects.

Parameters
posPosition of the element
Returns
Reference to the element

◆ data() [1/3]

template<typename T , uint32_t N>
T* eprosima::safedds::memory::container::Array< T, N >::data ( ) &
inlinenoexcept

Access to the first element.

Returns
Pointer to the first element

◆ data() [2/3]

template<typename T , uint32_t N>
T const* eprosima::safedds::memory::container::Array< T, N >::data ( ) const &&
deletenoexcept

Deleted data method on rvalue objects.

◆ data() [3/3]

template<typename T , uint32_t N>
T const* eprosima::safedds::memory::container::Array< T, N >::data ( ) const &
inlinenoexcept

Const access to the first element.

Returns
Pointer to the first element

◆ fill()

template<typename T , uint32_t N>
void eprosima::safedds::memory::container::Array< T, N >::fill ( const T &  value)
inlinenoexcept

Fill the array with a value.

Parameters
valueValue to fill the array with

◆ max_size()

template<typename T , uint32_t N>
uint32_t eprosima::safedds::memory::container::Array< T, N >::max_size ( ) const
inlinenoexcept

Maximum size of the array.

Returns
Number of elements

◆ operator[]() [1/3]

template<typename T , uint32_t N>
T& eprosima::safedds::memory::container::Array< T, N >::operator[] ( uint32_t  pos) &
inlinenoexcept

Access to an element.

Parameters
posPosition of the element
Returns
Reference to the element

◆ operator[]() [2/3]

template<typename T , uint32_t N>
const T& eprosima::safedds::memory::container::Array< T, N >::operator[] ( uint32_t  pos) const &&
deletenoexcept

Deleted operator [] on rvalue objects.

◆ operator[]() [3/3]

template<typename T , uint32_t N>
const T& eprosima::safedds::memory::container::Array< T, N >::operator[] ( uint32_t  pos) const &
inlinenoexcept

Const access to an element.

Parameters
posPosition of the element
Returns
Reference to the element

◆ size()

template<typename T , uint32_t N>
uint32_t eprosima::safedds::memory::container::Array< T, N >::size ( ) const
inlinenoexcept

Size of the array.

Returns
Number of elements

Member Data Documentation

◆ inner_array

template<typename T , uint32_t N>
ArrayTraits<T, N>::InnerArrayType eprosima::safedds::memory::container::Array< T, N >::inner_array

Inner array.


The documentation for this struct was generated from the following file: