wrench::MessageManager Class Reference

A helper class that manages messages (in terms of memory deallocation to avoid leaks when a message was sent but never received) More...

#include <MessageManager.h>

Static Public Member Functions

static void cleanUpAllMessages ()
 Clean up all the messages that MessageManager has stored (so as to free up memory)
 
static void cleanUpMessages (std::string)
 Clean up messages for a given mailbox (so as to free up memory) More...
 
static void manageMessage (std::string, SimulationMessage *msg)
 Insert a message in the manager's "database". More...
 
static void removeReceivedMessages (std::string, SimulationMessage *msg)
 Remove a received message from the "database" of messages. More...
 

Detailed Description

A helper class that manages messages (in terms of memory deallocation to avoid leaks when a message was sent but never received)

Member Function Documentation

◆ cleanUpMessages()

void wrench::MessageManager::cleanUpMessages ( std::string  mailbox)
static

Clean up messages for a given mailbox (so as to free up memory)

Parameters
mailboxthe mailbox name

◆ manageMessage()

void wrench::MessageManager::manageMessage ( std::string  mailbox,
SimulationMessage msg 
)
static

Insert a message in the manager's "database".

Parameters
mailboxthe name of the relevant mailbox
msgthe message
Exceptions
std::runtime_error

◆ removeReceivedMessages()

void wrench::MessageManager::removeReceivedMessages ( std::string  mailbox,
SimulationMessage msg 
)
static

Remove a received message from the "database" of messages.

Parameters
mailboxthe name of the mailbox from which the message was received
msgthe message

The documentation for this class was generated from the following files:
  • /Users/rafsilva/Documents/isi/workspace/wrench/wrench/include/wrench/util/MessageManager.h
  • /Users/rafsilva/Documents/isi/workspace/wrench/wrench/src/wrench/util/MessageManager.cpp