WarpX
Loading...
Searching...
No Matches
ablastr::utils::msg_logger::Msg Struct Reference

#include <MsgLogger.H>

Public Member Functions

std::vector< char > serialize () const
 This function returns a byte representation of the struct.
 

Static Public Member Functions

static Msg deserialize (std::vector< char >::const_iterator &it)
 This function generates a Msg struct from a byte vector.
 
static Msg deserialize (std::vector< char >::const_iterator &&rit)
 Same as static Msg deserialize(std::vector<char>::const_iterator& it) but accepting an rvalue as an argument.
 

Public Attributes

std::string topic
 
std::string text
 
Priority priority
 

Detailed Description

This struct represents a message, which is composed by a topic, a text and a priority. It also provides methods for serialization and deserialization.

Member Function Documentation

◆ deserialize() [1/2]

Msg Msg::deserialize ( std::vector< char >::const_iterator && rit)
static

Same as static Msg deserialize(std::vector<char>::const_iterator& it) but accepting an rvalue as an argument.

Parameters
[in]rititerator of a byte array
Returns
a Msg struct

◆ deserialize() [2/2]

Msg Msg::deserialize ( std::vector< char >::const_iterator & it)
static

This function generates a Msg struct from a byte vector.

Parameters
[in]ititerator of a byte array
Returns
a Msg struct

◆ serialize()

std::vector< char > Msg::serialize ( ) const
nodiscard

This function returns a byte representation of the struct.

Returns
a byte vector

Member Data Documentation

◆ priority

Priority ablastr::utils::msg_logger::Msg::priority

The priority of the message

◆ text

std::string ablastr::utils::msg_logger::Msg::text

The message text

◆ topic

std::string ablastr::utils::msg_logger::Msg::topic

The message topic


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