i6engine
1.0
|
Class representing a message to be sent. More...
#include <D:/Projekte/i6engine/libs/i6engine-core/include/i6engine/core/messaging/Message.h>
Public Types | |
typedef boost::shared_ptr< Message > | Ptr |
Public Member Functions | |
Message () | |
Default constructor necessary for serialization. More... | |
Message (uint16_t messageType, uint16_t subtype, const Method method, MessageStruct *content, Subsystem sender) | |
Constructor. More... | |
Message (const Message &msg) | |
Standard copy constructor. More... | |
const Message & | operator= (const Message &) |
virtual | ~Message () |
Destructor, deleting message content. More... | |
uint16_t | getMessageType () const |
Getter for the message type. More... | |
uint16_t | getSubtype () const |
Getter for the message subtype. More... | |
Method | getMethod () const |
Getter for the message method. More... | |
MessageStruct * | getContent () const |
Getter for the message content. More... | |
void | setMessageType (uint16_t messageType) |
Changes the message type to the given parameter. More... | |
Subsystem | getSender () const |
returns the Subsystem sending this message More... | |
std::string | getMessageInfo () const |
Gives informations about the message. More... | |
std::string | Serialize () const |
Static Public Member Functions | |
static Message * | Deserialize (const std::string &s) |
Protected Member Functions | |
template<typename Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Prepares a Message to be sent over the Network. More... | |
Protected Attributes | |
uint16_t | _messageType |
uint16_t | _subType |
Method | _method |
MessageStruct * | _content |
Subsystem | _sender |
Friends | |
class | boost::serialization::access |
Class representing a message to be sent.
Every message that is sent in the i6m2etis engine is an instance of this class. A message has a certain type defined by a string and several variables which can be of varying types to describe the content of the message. To learn more about sending and receiving messages please look at MessagingController.
The copies of the message are deleted automatically by the shared_ptr. So don't call the destructor on your message. This will cause a segmentation fault!
To get an overview on the usage and functionality of the whole messaging subsystem in german have a look at our wiki (topic: 'Messaging in der i6engine (Kurzbeschreibung)' )
Have a look at here for an overview of typedef's in namespace i6e.
typedef boost::shared_ptr<Message> i6e::core::Message::Ptr |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
static |
|
inline |
std::string i6e::core::Message::getMessageInfo | ( | ) | const |
Gives informations about the message.
|
inline |
|
inline |
|
inline |
|
inline |
std::string i6e::core::Message::Serialize | ( | ) | const |
|
inlineprotected |
|
inline |
|
protected |