![]() |
Project
|
a move-only header stack with serialized headers This is the flat buffer where all the headers in a multi-header go. This guy knows how to move the serialized content to FairMQ and inform it how to release when all is sent. methods to construct a multi-header intended use: More...
#include <Stack.h>
Public Types | |
using | memory_resource = o2::pmr::memory_resource |
using | allocator_type = boost::container::pmr::polymorphic_allocator< std::byte > |
using | value_type = std::byte |
using | BufferType = std::unique_ptr< value_type[], freeobj > |
Public Member Functions | |
Stack ()=default | |
Stack (Stack &&)=default | |
Stack (Stack &)=delete | |
Stack & | operator= (Stack &)=delete |
Stack & | operator= (Stack &&)=default |
value_type * | data () const |
size_t | size () const |
allocator_type | get_allocator () const |
const BaseHeader * | first () const |
template<typename FirstArgType , typename... Headers, typename std::enable_if_t< !std::is_convertible< FirstArgType, boost::container::pmr::polymorphic_allocator< std::byte > >::value, int > = 0> | |
Stack (FirstArgType &&firstHeader, Headers &&... headers) | |
template<typename... Headers> | |
Stack (const allocator_type allocatorArg, Headers &&... headers) | |
Static Public Member Functions | |
static const BaseHeader * | firstHeader (std::byte const *buf) |
static const BaseHeader * | lastHeader (std::byte const *buf) |
static size_t | headerStackSize (std::byte const *buf) |
template<typename T , typename... Args> | |
static constexpr size_t | calculateSize (T &&h, Args &&... args) noexcept |
template<typename T > | |
static constexpr size_t | calculateSize (T &&h) noexcept |
static constexpr size_t | calculateSize () |
a move-only header stack with serialized headers This is the flat buffer where all the headers in a multi-header go. This guy knows how to move the serialized content to FairMQ and inform it how to release when all is sent. methods to construct a multi-header intended use:
returns a Stack ready to be shipped.
One can also use the ctor directly:
using o2::header::Stack::allocator_type = boost::container::pmr::polymorphic_allocator<std::byte> |
using o2::header::Stack::BufferType = std::unique_ptr<value_type[], freeobj> |
using o2::header::Stack::memory_resource = o2::pmr::memory_resource |
using o2::header::Stack::value_type = std::byte |
|
default |
|
default |
|
delete |
|
inline |
The magic constructors: take arbitrary number of headers and serialize them into the buffer allocated by the specified polymorphic allocator. By default allocation is done using new_delete_resource. In the final stack the first header must be DataHeader. all headers must derive from BaseHeader, in addition also other stacks can be passed to ctor.
|
inline |
|
inlinestaticconstexpr |
|
inlinestaticconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |