fesa::AbstractMessage Class Reference

Message class that will be transmitted on the message queue. More...

#include <MessageTypes.h>

Inheritance diagram for fesa::AbstractMessage:
fesa::AutomaticNotificationMessage fesa::CommandMessage fesa::ManualNotificationMessage fesa::OnDemandMessage

List of all members.

Public Member Functions

bool operator< (const AbstractMessage &msg) const
 This operator is used to compare priorities (needed because this class is a element of a priority queue).
virtual void serialize (std::ostream &stream)
 this method serializes the information in the message into a stream
 AbstractMessage (uint32_t prio, MessageType msgType)
 Constructor.
 AbstractMessage (std::istream &stream, MessageType msgType)
 Constructor that creates the message from a serialize data.
virtual ~AbstractMessage ()
 Destructor.

Public Attributes

uint32_t prio_
 priority of the message
MessageType msgType_
 type of the message

Detailed Description

Message class that will be transmitted on the message queue.

Definition at line 34 of file MessageTypes.h.


Constructor & Destructor Documentation

fesa::AbstractMessage::AbstractMessage ( uint32_t  prio,
MessageType  msgType 
)

Constructor.

Definition at line 17 of file MessageTypes.cpp.

fesa::AbstractMessage::AbstractMessage ( std::istream &  stream,
MessageType  msgType 
)

Constructor that creates the message from a serialize data.

Parameters:
stream that contains the data

Definition at line 23 of file MessageTypes.cpp.

References prio_.

fesa::AbstractMessage::~AbstractMessage (  )  [virtual]

Destructor.

Definition at line 29 of file MessageTypes.cpp.


Member Function Documentation

bool fesa::AbstractMessage::operator< ( const AbstractMessage msg  )  const [inline]

This operator is used to compare priorities (needed because this class is a element of a priority queue).

Parameters:
the message to be checked
Returns:
true if priority is smaller than priority of message, false otherwise

Definition at line 78 of file MessageTypes.h.

References prio_.

void fesa::AbstractMessage::serialize ( std::ostream &  stream  )  [virtual]

this method serializes the information in the message into a stream

Parameters:
the serialized message

Reimplemented in fesa::AutomaticNotificationMessage, fesa::ManualNotificationMessage, fesa::CommandMessage, and fesa::OnDemandMessage.

Definition at line 33 of file MessageTypes.cpp.

References msgType_, fesa::NUMBER_SEPARATOR, and prio_.

Referenced by fesa::IpcMsgQueue::postMsg().


Member Data Documentation

type of the message

Definition at line 75 of file MessageTypes.h.

Referenced by fesa::NotificationConsumer::run(), and serialize().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1