fesa-core  7.0.0
fesa::AbstractMessage Class Reference

A message that can be transmitted on a message queue. More...

#include <MessageTypes.h>

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

Public Member Functions

 AbstractMessage (uint32_t prio, MessageType msgType)
 Constructor.
 
 AbstractMessage (std::istream &stream, MessageType msgType)
 Constructor. Create a message from serialized data. More...
 
virtual ~AbstractMessage ()
 Destructor.
 
bool operator< (const AbstractMessage &msg) const
 Compare priorities (needed because this class is an element of a priority queue) More...
 
virtual void serialize (std::ostream &stream) const
 Serialize the information in the message into a stream. More...
 

Public Attributes

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

Detailed Description

A message that can be transmitted on a message queue.

Constructor & Destructor Documentation

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

Constructor. Create a message from serialized data.

Parameters
streamThe stream that contains the data
msgTypeThe type of the message

Member Function Documentation

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

Compare priorities (needed because this class is an element of a priority queue)

Parameters
msgThe message to compare to
Returns
'true' if the priority is smaller than the priority of msg, 'false' otherwise
void fesa::AbstractMessage::serialize ( std::ostream &  stream) const
virtual

Serialize the information in the message into a stream.

Parameters
streamThe serialized message

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


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