iceoryx_posh 2.0.3
|
The GenericMemoryBlock is an implementation of a MemoryBlock for a common use case. More...
#include <iceoryx_posh/roudi/memory/generic_memory_block.hpp>
Public Member Functions | |
GenericMemoryBlock (const GenericMemoryBlock &)=delete | |
GenericMemoryBlock (GenericMemoryBlock &&)=delete | |
GenericMemoryBlock & | operator= (const GenericMemoryBlock &)=delete |
GenericMemoryBlock & | operator= (GenericMemoryBlock &&)=delete |
uint64_t | size () const noexcept override |
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. More... | |
uint64_t | alignment () const noexcept override |
This function provides the alignment of the memory for the underlying data. This information is needed for the MemoryProvider. More... | |
template<typename... Targs> | |
cxx::optional< T * > | emplace (Targs &&... args) noexcept |
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. More... | |
cxx::optional< T * > | value () const noexcept |
This function enables the access to the underlying type. More... | |
![]() | |
MemoryBlock (const MemoryBlock &)=delete | |
MemoryBlock (MemoryBlock &&)=delete | |
MemoryBlock & | operator= (const MemoryBlock &)=delete |
MemoryBlock & | operator= (MemoryBlock &&)=delete |
virtual uint64_t | size () const noexcept=0 |
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. More... | |
virtual uint64_t | alignment () const noexcept=0 |
This function provides the alignment of the memory for the underlying data. This information is needed for the MemoryProvider. More... | |
cxx::optional< void * > | memory () const noexcept |
This function provides the pointer to the requested memory. More... | |
Protected Member Functions | |
void | destroy () noexcept override |
The MemoryProvider calls this either when MemoryProvider::destroy is called or in its destructor. More... | |
![]() | |
virtual void | destroy () noexcept=0 |
The MemoryProvider calls this either when MemoryProvider::destroy is called or in its destructor. More... | |
virtual void | onMemoryAvailable (cxx::not_null< void * > memory) noexcept |
This function is called once the memory is available and is therefore the earliest possibility to use the memory. More... | |
Friends | |
class | MemoryProvider |
The GenericMemoryBlock is an implementation of a MemoryBlock for a common use case.
|
overridevirtualnoexcept |
This function provides the alignment of the memory for the underlying data. This information is needed for the MemoryProvider.
Implements iox::roudi::MemoryBlock.
|
overrideprotectedvirtualnoexcept |
The MemoryProvider calls this either when MemoryProvider::destroy is called or in its destructor.
Implements iox::roudi::MemoryBlock.
|
noexcept |
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.
[in] | args | are perfectly forwarded to the constructor of T to perform a placement new |
|
overridevirtualnoexcept |
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.
Implements iox::roudi::MemoryBlock.
|
noexcept |
This function enables the access to the underlying type.