The GenericMemoryBlock is an implementation of a MemoryBlock for a common use case.
More...
#include <iceoryx_posh/roudi/memory/generic_memory_block.hpp>
template<typename T>
class iox::roudi::GenericMemoryBlock< T >
The GenericMemoryBlock is an implementation of a MemoryBlock for a common use case.
◆ alignment()
This function provides the alignment of the memory for the underlying data. This information is needed for the MemoryProvider.
- Returns
- the alignment of the underlying data.
- Note
- The alignment of the underlying type T
Implements iox::roudi::MemoryBlock.
◆ destroy()
template<typename T >
|
overrideprotectedvirtualnoexcept |
◆ emplace()
template<typename T >
template<typename... Targs>
A new element is constructed by forwarding the arguments to the constructor of T. If the MemoryBlock has a value then the destructor of T is called.
- Parameters
-
[in] | args | are perfectly forwarded to the constructor of T to perform a placement new |
- Returns
- an optional pointer to the underlying type, cxx::nullopt_t if memory was not yet available
◆ size()
This function provides the size of the required memory for the underlying data. It is needed for the MemoryProvider to calculate the total size of memory.
- Returns
- the required memory as multiple of the alignment
- Note
- The size of the underlying type T
Implements iox::roudi::MemoryBlock.
◆ value()
This function enables the access to the underlying type.
- Returns
- an optional pointer to the underlying type, cxx::nullopt_t if value is not initialized
The documentation for this class was generated from the following file: