|
iceoryx2
C++ Language Bindings
|
#include <layout.hpp>
Public Member Functions | |
| auto | size () const -> uint64_t |
| Returns the stored size. | |
| auto | alignment () const -> uint64_t |
| Returns the stored alignment. | |
Static Public Member Functions | |
| template<typename T > | |
| static auto | from () -> std::enable_if_t<!std::is_same< T, void >::value, Layout > |
| template<typename T > | |
| static auto | from () -> std::enable_if_t< std::is_same< T, void >::value, Layout > |
Creates a new [Layout] with size == 0 and alignment == 1. | |
| static auto | create (uint64_t size, uint64_t align) -> iox2::bb::Expected< Layout, LayoutCreationError > |
Contains a valid [Layout], meaning the alignment is a power of two and the size is zero or a multiple of the alignment.
Definition at line 31 of file layout.hpp.
|
inline |
Returns the stored alignment.
Definition at line 89 of file layout.hpp.
|
inlinestatic |
Creates a new [Layout] from the given size and align.
size is not a multiple of align it will be rounded up so that it becomes a multiple of align.align is not a power of two it fails. Definition at line 76 of file layout.hpp.
References iox2::bb::err(), iox2::bb::InvalidAlignment, and size().
|
static |
Creates a new [Layout] with size == 0 and alignment == 1.
|
inlinestatic |
Creates a new [Layout] from the provided type T by using sizeof(T) and alignof(T)
Definition at line 67 of file layout.hpp.
|
inline |