simple thread
Public Member Functions | Static Public Member Functions | List of all members
st::message Struct Reference

interthread type erased message container More...

#include <message.hpp>

Inheritance diagram for st::message:
st::shared_context< message, detail::message::context >

Public Member Functions

const std::size_t id () const
 an unsigned integer representing message's intended operation More...
 
st::datadata ()
 optional type erased payload data
 

Static Public Member Functions

static message make (message msg)
 convenience function for templating More...
 
static message make (std::size_t id, st::data &&d)
 construct a message More...
 
template<typename T >
static message make (std::size_t id, T &&t)
 construct a message More...
 
static message make (std::size_t id)
 construct a message More...
 
static message make ()
 construct a message More...
 

Detailed Description

interthread type erased message container

this object is not mutex locked.

Member Function Documentation

◆ id()

const std::size_t st::message::id ( ) const
inline

an unsigned integer representing message's intended operation

an id can trivially represent an enumeration, which can represent a specific request, response, or notification operation.

◆ make() [1/5]

static message st::message::make ( )
inlinestatic

construct a message

Returns
default allocated st::message

◆ make() [2/5]

static message st::message::make ( message  msg)
inlinestatic

convenience function for templating

Parameters
msgst::message object to immediately return
Returns
st::message object passed as argument

◆ make() [3/5]

static message st::message::make ( std::size_t  id)
inlinestatic

construct a message

Parameters
idan unsigned integer representing which type of message
Returns
an allocated st::message

◆ make() [4/5]

static message st::message::make ( std::size_t  id,
st::data &&  d 
)
inlinestatic

construct a message

Parameters
idan unsigned integer representing which type of message
tarbitrary typed data to be stored as the message data
Returns
an allocated st::message

◆ make() [5/5]

template<typename T >
static message st::message::make ( std::size_t  id,
T &&  t 
)
inlinestatic

construct a message

Parameters
idan unsigned integer representing which type of message
tarbitrary typed data to be stored as the message data
Returns
an allocated st::message

The documentation for this struct was generated from the following file: