16 #ifndef IOX_POSH_ROUDI_MEMORY_GENERIC_MEMORY_BLOCK_HPP
17 #define IOX_POSH_ROUDI_MEMORY_GENERIC_MEMORY_BLOCK_HPP
19 #include "iceoryx_posh/roudi/memory/memory_block.hpp"
21 #include "iceoryx_utils/cxx/optional.hpp"
46 uint64_t
size()
const noexcept
override;
50 uint64_t
alignment()
const noexcept
override;
53 void destroy() noexcept
override;
59 template <
typename... Targs>
60 cxx::optional<T*>
emplace(Targs&&... args) noexcept;
64 cxx::optional<T*>
value()
const noexcept;
73 #include "iceoryx_posh/internal/roudi/memory/generic_memory_block.inl"
The GenericMemoryBlock is an implementation of a MemoryBlock for a common use case.
Definition: generic_memory_block.hpp:32
cxx::optional< T * > emplace(Targs &&... args) noexcept
A new element is constructed by forwarding the arguments to the constructor of T. If the MemoryBlock ...
Definition: generic_memory_block.inl:53
uint64_t size() const noexcept override
Implementation of MemoryBlock::size.
Definition: generic_memory_block.inl:30
uint64_t alignment() const noexcept override
Implementation of MemoryBlock::alignment.
Definition: generic_memory_block.inl:36
void destroy() noexcept override
Implementation of MemoryBlock::destroy.
Definition: generic_memory_block.inl:42
cxx::optional< T * > value() const noexcept
This function enables the access to the underlying type.
Definition: generic_memory_block.inl:67
The MemoryBlock is a container for general purpose memory. It is used to request some memory from a M...
Definition: memory_block.hpp:32
This class creates memory which is requested by the MemoryBlocks. Once the memory is available,...
Definition: memory_provider.hpp:72
Definition: service_description.hpp:29