actor-framework
Public Types | Public Member Functions | Static Public Member Functions | Related Functions | List of all members
caf::type_id_list Class Reference

A list of type IDs, stored in a size-prefix, contiguous memory block. More...

#include <type_id_list.hpp>

Inheritance diagram for caf::type_id_list:
Inheritance graph
[legend]
Collaboration diagram for caf::type_id_list:
Collaboration graph
[legend]

Public Types

using pointer = const type_id_t *
 

Public Member Functions

constexpr type_id_list (pointer data) noexcept
 
constexpr type_id_list (const type_id_list &) noexcept=default
 
type_id_listoperator= (const type_id_list &) noexcept=default
 
constexpr operator bool () const noexcept
 Queries whether this type list contains data, i.e, data() != nullptr.
 
constexpr pointer data () const noexcept
 Returns the raw pointer to the size-prefixed list.
 
constexpr size_t size () const noexcept
 Returns the number of elements in the list.
 
constexpr bool empty () const noexcept
 Returns size() == 0.
 
constexpr type_id_t operator[] (size_t index) const noexcept
 Returns the type ID at index.
 
int compare (type_id_list other) const noexcept
 Compares this list to other.
 
pointer begin () const noexcept
 Returns an iterator to the first type ID.
 
pointer end () const noexcept
 Returns the past-the-end iterator.
 
size_t data_size () const noexcept
 Returns the number of bytes that a buffer needs to allocate for storing a type-erased tuple for the element types stored in this list. More...
 

Static Public Member Functions

static type_id_list concat (span< type_id_list > lists)
 Concatenates all lists into a single type ID list.
 
template<class... Ts>
static type_id_list concat (type_id_list list1, type_id_list list2, Ts... lists)
 Concatenates all lists into a single type ID list.
 

Related Functions

(Note that these are not member functions.)

template<class... Ts>
constexpr type_id_list make_type_id_list ()
 Constructs a ::type_id_list from the template parameter pack Ts.
 
CAF_CORE_EXPORT std::string to_string (type_id_list xs)
 
CAF_CORE_EXPORT type_id_list types_of (const message &msg)
 

Detailed Description

A list of type IDs, stored in a size-prefix, contiguous memory block.

Member Function Documentation

◆ data_size()

size_t caf::type_id_list::data_size ( ) const
noexcept

Returns the number of bytes that a buffer needs to allocate for storing a type-erased tuple for the element types stored in this list.

Friends And Related Function Documentation

◆ to_string()

CAF_CORE_EXPORT std::string to_string ( type_id_list  xs)
related

◆ types_of()

CAF_CORE_EXPORT type_id_list types_of ( const message msg)
related

The documentation for this class was generated from the following files: