iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
iox2::bb::detail::RawByteStorage< T, Capacity > Class Template Reference

#include <raw_byte_storage.hpp>

Classes

struct  StorageMemoryLayoutMetrics

Public Member Functions

constexpr RawByteStorage () noexcept
constexpr RawByteStorage (RawByteStorage const &rhs)
constexpr RawByteStorage (RawByteStorage &&rhs) noexcept
template<uint64_t M, std::enable_if_t<(Capacity > M), bool > = true>
constexpr RawByteStorage (RawByteStorage< T, M > const &rhs)
template<uint64_t M, std::enable_if_t<(Capacity > M), bool > = true>
constexpr RawByteStorage (RawByteStorage< T, M > &&rhs) noexcept
IOX2_CONSTEXPR_DTOR ~RawByteStorage ()
constexpr auto operator= (RawByteStorage const &rhs) -> RawByteStorage &
constexpr auto operator= (RawByteStorage &&rhs) noexcept(std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_assignable< T >::value) -> RawByteStorage &
auto constexpr size () const noexcept -> uint64_t
template<typename... Args>
constexpr void emplace_back (Args &&... args)
template<typename... Args>
constexpr void emplace_at (uint64_t index, Args &&... args)
constexpr void insert_at (uint64_t index, uint64_t count, T const &value)
constexpr void erase_at (uint64_t index)
constexpr void erase_at (uint64_t begin_index, uint64_t end_index)
constexpr void remove_at (uint64_t index, uint64_t range_size)
constexpr void shrink_from_back (uint64_t target_size)
constexpr void rotate_from_back (uint64_t index_to, uint64_t index_first_from)
auto pointer_from_index (uint64_t idx) -> T *
auto pointer_from_index (uint64_t idx) const -> T const *
constexpr auto static_memory_layout_metrics () noexcept -> StorageMemoryLayoutMetrics

Detailed Description

template<typename T, uint64_t Capacity>
class iox2::bb::detail::RawByteStorage< T, Capacity >

A class for storing at most N objects of type T in a contiguous storage. All operations on this class are unchecked.

Definition at line 31 of file raw_byte_storage.hpp.

Constructor & Destructor Documentation

◆ RawByteStorage() [1/5]

template<typename T, uint64_t Capacity>
iox2::bb::detail::RawByteStorage< T, Capacity >::RawByteStorage ( )
inlineconstexprnoexcept

◆ RawByteStorage() [2/5]

template<typename T, uint64_t Capacity>
iox2::bb::detail::RawByteStorage< T, Capacity >::RawByteStorage ( RawByteStorage< T, Capacity > const & rhs)
inlineconstexpr

Definition at line 45 of file raw_byte_storage.hpp.

References pointer_from_index(), and RawByteStorage().

◆ RawByteStorage() [3/5]

template<typename T, uint64_t Capacity>
iox2::bb::detail::RawByteStorage< T, Capacity >::RawByteStorage ( RawByteStorage< T, Capacity > && rhs)
inlineconstexprnoexcept

Definition at line 53 of file raw_byte_storage.hpp.

References RawByteStorage().

◆ RawByteStorage() [4/5]

template<typename T, uint64_t Capacity>
template<uint64_t M, std::enable_if_t<(Capacity > M), bool > = true>
iox2::bb::detail::RawByteStorage< T, Capacity >::RawByteStorage ( RawByteStorage< T, M > const & rhs)
inlineconstexpr

Definition at line 63 of file raw_byte_storage.hpp.

References pointer_from_index(), RawByteStorage(), and size().

◆ RawByteStorage() [5/5]

template<typename T, uint64_t Capacity>
template<uint64_t M, std::enable_if_t<(Capacity > M), bool > = true>
iox2::bb::detail::RawByteStorage< T, Capacity >::RawByteStorage ( RawByteStorage< T, M > && rhs)
inlineconstexprnoexcept

Definition at line 73 of file raw_byte_storage.hpp.

References RawByteStorage().

◆ ~RawByteStorage()

template<typename T, uint64_t Capacity>
IOX2_CONSTEXPR_DTOR iox2::bb::detail::RawByteStorage< T, Capacity >::~RawByteStorage ( )
inline

Definition at line 81 of file raw_byte_storage.hpp.

References IOX2_CONSTEXPR_DTOR, and pointer_from_index().

Member Function Documentation

◆ emplace_at()

template<typename T, uint64_t Capacity>
template<typename... Args>
void iox2::bb::detail::RawByteStorage< T, Capacity >::emplace_at ( uint64_t index,
Args &&... args )
inlineconstexpr

Definition at line 136 of file raw_byte_storage.hpp.

References emplace_back(), and rotate_from_back().

◆ emplace_back()

template<typename T, uint64_t Capacity>
template<typename... Args>
void iox2::bb::detail::RawByteStorage< T, Capacity >::emplace_back ( Args &&... args)
inlineconstexpr

Definition at line 129 of file raw_byte_storage.hpp.

References pointer_from_index(), and size().

Referenced by emplace_at(), and insert_at().

◆ erase_at() [1/2]

template<typename T, uint64_t Capacity>
void iox2::bb::detail::RawByteStorage< T, Capacity >::erase_at ( uint64_t begin_index,
uint64_t end_index )
inlineconstexpr

Definition at line 156 of file raw_byte_storage.hpp.

References remove_at(), and shrink_from_back().

◆ erase_at() [2/2]

template<typename T, uint64_t Capacity>
void iox2::bb::detail::RawByteStorage< T, Capacity >::erase_at ( uint64_t index)
inlineconstexpr

Definition at line 150 of file raw_byte_storage.hpp.

References remove_at(), and shrink_from_back().

◆ insert_at()

template<typename T, uint64_t Capacity>
void iox2::bb::detail::RawByteStorage< T, Capacity >::insert_at ( uint64_t index,
uint64_t count,
T const & value )
inlineconstexpr

Definition at line 142 of file raw_byte_storage.hpp.

References emplace_back(), and rotate_from_back().

◆ operator=() [1/2]

template<typename T, uint64_t Capacity>
auto iox2::bb::detail::RawByteStorage< T, Capacity >::operator= ( RawByteStorage< T, Capacity > && rhs) ->RawByteStorage &
inlineconstexprnoexcept

Definition at line 105 of file raw_byte_storage.hpp.

References pointer_from_index(), and RawByteStorage().

◆ operator=() [2/2]

template<typename T, uint64_t Capacity>
auto iox2::bb::detail::RawByteStorage< T, Capacity >::operator= ( RawByteStorage< T, Capacity > const & rhs) ->RawByteStorage &
inlineconstexpr

Definition at line 88 of file raw_byte_storage.hpp.

References pointer_from_index(), and RawByteStorage().

◆ pointer_from_index() [1/2]

template<typename T, uint64_t Capacity>
auto iox2::bb::detail::RawByteStorage< T, Capacity >::pointer_from_index ( uint64_t idx) ->T *
inline

◆ pointer_from_index() [2/2]

template<typename T, uint64_t Capacity>
auto iox2::bb::detail::RawByteStorage< T, Capacity >::pointer_from_index ( uint64_t idx) const->Tconst *
inline

Definition at line 193 of file raw_byte_storage.hpp.

◆ remove_at()

template<typename T, uint64_t Capacity>
void iox2::bb::detail::RawByteStorage< T, Capacity >::remove_at ( uint64_t index,
uint64_t range_size )
inlineconstexpr

Definition at line 163 of file raw_byte_storage.hpp.

References pointer_from_index().

Referenced by erase_at(), and erase_at().

◆ rotate_from_back()

template<typename T, uint64_t Capacity>
void iox2::bb::detail::RawByteStorage< T, Capacity >::rotate_from_back ( uint64_t index_to,
uint64_t index_first_from )
inlineconstexpr

Definition at line 182 of file raw_byte_storage.hpp.

References pointer_from_index().

Referenced by emplace_at(), and insert_at().

◆ shrink_from_back()

template<typename T, uint64_t Capacity>
void iox2::bb::detail::RawByteStorage< T, Capacity >::shrink_from_back ( uint64_t target_size)
inlineconstexpr

Definition at line 173 of file raw_byte_storage.hpp.

References pointer_from_index().

Referenced by erase_at(), and erase_at().

◆ size()

template<typename T, uint64_t Capacity>
auto constexpr iox2::bb::detail::RawByteStorage< T, Capacity >::size ( ) const->uint64_t
inlineconstexprnoexcept

◆ static_memory_layout_metrics()


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