ReCodEx - Task Broker
ReCodEx is complex programmer testing solution, primary targeted to technical universities. It's highly customizable and based on modern technologies.
All Classes Functions Variables Typedefs Pages
message_container Struct Reference

#include <message_container.h>

Public Member Functions

 message_container ()
 
 message_container (const std::string &key, const std::string &identity, const std::vector< std::string > &data)
 
bool operator== (const message_container &other) const
 

Public Attributes

std::string key
 
std::string identity = ""
 
std::vector< std::string > data
 

Detailed Description

A helper structure that packs message data together with the associated reactor event key and the identity of the sender/receiver.

Definition at line 11 of file message_container.h.

Constructor & Destructor Documentation

§ message_container() [1/2]

message_container::message_container ( )

The default constructor

Definition at line 3 of file message_container.cpp.

§ message_container() [2/2]

message_container::message_container ( const std::string &  key,
const std::string &  identity,
const std::vector< std::string > &  data 
)

A shorthand constructor for creating a message container in a single expression

Parameters
keyname of the origin or destinarion
identityidentity of the peer we're communicating with
dataframes of the message

Definition at line 7 of file message_container.cpp.

Member Function Documentation

§ operator==()

bool message_container::operator== ( const message_container other) const

A natural comparison - two messages are equal if all their fields are equal

Parameters
otherthe object we are comparing with
Returns
true if and only if the objects are equal

Definition at line 13 of file message_container.cpp.

Member Data Documentation

§ data

std::vector<std::string> message_container::data

Frames of the message

Definition at line 19 of file message_container.h.

§ identity

std::string message_container::identity = ""

Identity of the peer we are communicating with (optional)

Definition at line 16 of file message_container.h.

§ key

std::string message_container::key

Name of the origin or destination

Definition at line 13 of file message_container.h.


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