WarpX
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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. More...
 

Static Public Member Functions

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

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 &&  it)
static

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

Parameters
[in]ititerator 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

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: