RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::spread::SpreadMessage Class Reference

Default message QOS for sending is RELIABLE. More...

#include <SpreadMessage.h>

Collaboration diagram for rsb::spread::SpreadMessage:
Collaboration graph

Public Types

enum  Type { REGULAR = 0x0001, MEMBERSHIP = 0x0002, OTHER = 0xFFFF }
enum  QOS {
  UNRELIABLE = 0x00000001, RELIABLE = 0x00000002, FIFO = 0x00000004, CASUAL = 0x00000008,
  AGREED = 0x00000010, SAFE = 0x00000020
}
 Message reliability and QoS types. More...

Public Member Functions

 SpreadMessage ()
 Creates a new empty message with undefined type OTHER and QoS UNRELIABLE.
 SpreadMessage (const Type &mt)
 Creates a new message with the specified type and QoS UNRELIABLE.
 SpreadMessage (const std::string &d)
 Creates a message with the specified data and message type OTHER and QoS UNRELIABLE.
 SpreadMessage (const char *d)
 Creates a message with the specified data and message type OTHER and QoS UNRELIABLE.
virtual ~SpreadMessage ()
void setData (const std::string &doc)
void setData (const char *d)
std::string getDataAsString () const
const char * getData () const
int getSize () const
SpreadMessage::Type getType () const
void setType (Type mt)
QOS getQOS () const
void setQOS (const QOS &qos)
void addGroup (const std::string &name)
unsigned int getGroupCount () const
std::list< std::string >
::const_iterator 
getGroupsBegin () const
std::list< std::string >
::const_iterator 
getGroupsEnd () const
void reset ()
 Resets this message to a message of type OTHER with no contents and groups.

Private Attributes

std::string data
std::list< std::string > groups
Type type
QOS qos

Detailed Description

Default message QOS for sending is RELIABLE.

Author
swrede

Definition at line 44 of file SpreadMessage.h.

Member Enumeration Documentation

Message reliability and QoS types.

For some strange reasons the int values directly resemble the sp.h defines. ;)

Author
jwienke
Enumerator:
UNRELIABLE 
RELIABLE 
FIFO 
CASUAL 
AGREED 
SAFE 

Definition at line 57 of file SpreadMessage.h.

Enumerator:
REGULAR 
MEMBERSHIP 
OTHER 

Definition at line 47 of file SpreadMessage.h.

Constructor & Destructor Documentation

rsb::spread::SpreadMessage::SpreadMessage ( )

Creates a new empty message with undefined type OTHER and QoS UNRELIABLE.

Definition at line 47 of file SpreadMessage.cpp.

rsb::spread::SpreadMessage::SpreadMessage ( const Type mt)

Creates a new message with the specified type and QoS UNRELIABLE.

Parameters
mtmessage type

Definition at line 51 of file SpreadMessage.cpp.

rsb::spread::SpreadMessage::SpreadMessage ( const std::string &  d)

Creates a message with the specified data and message type OTHER and QoS UNRELIABLE.

Parameters
ddata to set

Definition at line 55 of file SpreadMessage.cpp.

rsb::spread::SpreadMessage::SpreadMessage ( const char *  d)

Creates a message with the specified data and message type OTHER and QoS UNRELIABLE.

Parameters
ddata to set

Definition at line 59 of file SpreadMessage.cpp.

rsb::spread::SpreadMessage::~SpreadMessage ( )
virtual

Definition at line 63 of file SpreadMessage.cpp.

Member Function Documentation

void rsb::spread::SpreadMessage::addGroup ( const std::string &  name)

Definition at line 94 of file SpreadMessage.cpp.

References groups.

Referenced by rsb::spread::OutConnector::handle().

Here is the caller graph for this function:

const char * rsb::spread::SpreadMessage::getData ( ) const

Definition at line 78 of file SpreadMessage.cpp.

References data.

Referenced by rsb::spread::SpreadConnection::send().

Here is the caller graph for this function:

string rsb::spread::SpreadMessage::getDataAsString ( ) const

Definition at line 74 of file SpreadMessage.cpp.

References data.

unsigned int rsb::spread::SpreadMessage::getGroupCount ( ) const

Definition at line 102 of file SpreadMessage.cpp.

References groups.

Referenced by rsb::spread::SpreadConnection::send().

Here is the caller graph for this function:

list< string >::const_iterator rsb::spread::SpreadMessage::getGroupsBegin ( ) const

Definition at line 106 of file SpreadMessage.cpp.

References groups.

Referenced by rsb::spread::SpreadConnection::send().

Here is the caller graph for this function:

list< string >::const_iterator rsb::spread::SpreadMessage::getGroupsEnd ( ) const

Definition at line 110 of file SpreadMessage.cpp.

References groups.

Referenced by rsb::spread::SpreadConnection::send().

Here is the caller graph for this function:

SpreadMessage::QOS rsb::spread::SpreadMessage::getQOS ( ) const

Definition at line 114 of file SpreadMessage.cpp.

References qos.

Referenced by rsb::spread::SpreadConnection::send().

Here is the caller graph for this function:

int rsb::spread::SpreadMessage::getSize ( ) const

Definition at line 82 of file SpreadMessage.cpp.

References data.

Referenced by rsb::spread::OutConnector::handle(), and rsb::spread::SpreadConnection::send().

Here is the caller graph for this function:

SpreadMessage::Type rsb::spread::SpreadMessage::getType ( ) const

Definition at line 90 of file SpreadMessage.cpp.

References type.

void rsb::spread::SpreadMessage::reset ( )

Resets this message to a message of type OTHER with no contents and groups.

Definition at line 122 of file SpreadMessage.cpp.

References data, groups, OTHER, qos, type, and UNRELIABLE.

void rsb::spread::SpreadMessage::setData ( const std::string &  doc)

Definition at line 66 of file SpreadMessage.cpp.

References data.

void rsb::spread::SpreadMessage::setData ( const char *  d)

Definition at line 70 of file SpreadMessage.cpp.

References data.

void rsb::spread::SpreadMessage::setQOS ( const QOS qos)

Definition at line 118 of file SpreadMessage.cpp.

References qos.

Referenced by rsb::spread::OutConnector::handle().

Here is the caller graph for this function:

void rsb::spread::SpreadMessage::setType ( Type  mt)

Definition at line 86 of file SpreadMessage.cpp.

References type.

Member Data Documentation

std::string rsb::spread::SpreadMessage::data
private

Definition at line 115 of file SpreadMessage.h.

Referenced by getData(), getDataAsString(), getSize(), reset(), and setData().

std::list<std::string> rsb::spread::SpreadMessage::groups
private

Definition at line 116 of file SpreadMessage.h.

Referenced by addGroup(), getGroupCount(), getGroupsBegin(), getGroupsEnd(), and reset().

QOS rsb::spread::SpreadMessage::qos
private

Definition at line 118 of file SpreadMessage.h.

Referenced by getQOS(), reset(), and setQOS().

Type rsb::spread::SpreadMessage::type
private

Definition at line 117 of file SpreadMessage.h.

Referenced by getType(), reset(), and setType().


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