#include <CommModule.h>
Public Member Functions | |
CommPacket () | |
Default constructor. | |
CommPacket (string message, string messageType, CommNode sender, CommNode recipient) | |
Complete constructor. | |
CommPacket (const CommPacket &p) | |
Copy constructor. | |
CommPacket & | operator= (const CommPacket &p) |
assigment operator =. | |
bool | deleteRecipientId (const int id) |
Deletes a recipient id from the _recipient._ids list. | |
bool | deleteRecipientTask (const int task) |
Deletes a Task id from the _recipient._tasks list. | |
string | message () |
Returns the message. | |
string | messageType () |
Returns the messageType. | |
CommNode | sender () |
Returns the sender. | |
CommNode | recipient () |
Returns the recipient. | |
Time | time () |
Returns the time. | |
void | setSender (const CommNode &sender) |
Returns the time. | |
void | setRecipient (const CommNode &recipient) |
Returns the time. | |
string | print () |
Print function. | |
Friends | |
class | boost::serialization::access |
MipResources::CommPacket::CommPacket | ( | ) |
Default constructor.
This constructor doesn't do anything.
MipResources::CommPacket::CommPacket | ( | string | message, | |
string | messageType, | |||
CommNode | sender, | |||
CommNode | recipient | |||
) |
Complete constructor.
This constructor completely create a packet, with all information needed for sending or reading it.
MipResources::CommPacket::CommPacket | ( | const CommPacket & | p | ) |
Copy constructor.
This constructor completely create a packet, copying it from another CommPacket.
CommPacket & MipResources::CommPacket::operator= | ( | const CommPacket & | p | ) |
assigment operator =.
bool MipResources::CommPacket::deleteRecipientId | ( | const int | id | ) |
Deletes a recipient id from the _recipient._ids list.
[in] | id | the id of the recipient to cancel |
bool MipResources::CommPacket::deleteRecipientTask | ( | const int | task | ) |
Deletes a Task id from the _recipient._tasks list.
[in] | id | the id of the task to cancel |
string MipResources::CommPacket::message | ( | ) |
Returns the message.
This function returns a string representing the message contained in the CommPacket.
string MipResources::CommPacket::messageType | ( | ) |
Returns the messageType.
This function returns a string representing the type of the message contained in the CommPacket.
CommNode MipResources::CommPacket::sender | ( | ) |
Returns the sender.
This function returns a CommNode representing the sender of the message contained in the CommPacket.
CommNode MipResources::CommPacket::recipient | ( | ) |
Returns the recipient.
This function returns a CommNode representing the recipient of the message contained in the CommPacket.
Time MipResources::CommPacket::time | ( | ) |
Returns the time.
This function returns the time of this packet.
void MipResources::CommPacket::setSender | ( | const CommNode & | sender | ) |
Returns the time.
This function sets the sender of the packet.
sender | CommNode representing the sender to set. |
void MipResources::CommPacket::setRecipient | ( | const CommNode & | recipient | ) |
Returns the time.
This function sets the recipient of the packet.
sender | CommNode representing the recipient to set. |
string MipResources::CommPacket::print | ( | ) |
Print function.
This function returns a string that can be printed, with all the informations contained in the class.
friend class boost::serialization::access [friend] |