RSB
0.7.0
|
Default message QOS for sending is RELIABLE. More...
#include <SpreadMessage.h>
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 |
Default message QOS for sending is RELIABLE.
Definition at line 44 of file SpreadMessage.h.
Message reliability and QoS types.
For some strange reasons the int values directly resemble the sp.h defines. ;)
Definition at line 57 of file SpreadMessage.h.
Definition at line 47 of file SpreadMessage.h.
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.
mt | message 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.
d | data 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.
d | data to set |
Definition at line 59 of file SpreadMessage.cpp.
|
virtual |
Definition at line 63 of file SpreadMessage.cpp.
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().
const char * rsb::spread::SpreadMessage::getData | ( | ) | const |
Definition at line 78 of file SpreadMessage.cpp.
References data.
Referenced by rsb::spread::SpreadConnection::send().
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().
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().
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().
SpreadMessage::QOS rsb::spread::SpreadMessage::getQOS | ( | ) | const |
Definition at line 114 of file SpreadMessage.cpp.
References qos.
Referenced by rsb::spread::SpreadConnection::send().
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().
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.
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().
void rsb::spread::SpreadMessage::setType | ( | Type | mt | ) |
Definition at line 86 of file SpreadMessage.cpp.
References type.
|
private |
Definition at line 115 of file SpreadMessage.h.
Referenced by getData(), getDataAsString(), getSize(), reset(), and setData().
|
private |
Definition at line 116 of file SpreadMessage.h.
Referenced by addGroup(), getGroupCount(), getGroupsBegin(), getGroupsEnd(), and reset().
|
private |
Definition at line 118 of file SpreadMessage.h.
|
private |
Definition at line 117 of file SpreadMessage.h.