#include <message_container.hpp>
Public Member Functions | |
virtual bool | addMessage (const MessagePackage *message) |
Add one message to container. | |
virtual unsigned int | byteSize () const |
Get the byte size of this package. | |
virtual void | clear () |
Purge the contents of the package. | |
virtual MessageArray | getMessages () const |
Get all messages contained in this package. | |
virtual MessageArray | getMessages (int clientId) const |
Get all messages contained in this package. | |
virtual bool | initialize (const string &buffer, bool isBinary) |
Parse the given string and convert it to internal message structure. | |
MessageContainer () | |
Constructor. | |
virtual string | serializeAsString (bool asBinary) const |
Serialize message container to a string. | |
virtual size_t | size () const |
Get count of the messages in this package. | |
virtual | ~MessageContainer () |
Destructor. | |
Protected Attributes | |
unique_ptr< MessageContainerData > | m_data |
kanzi::connect::MessageContainer::MessageContainer | ( | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Add one message to container.
message | The message to be added. |
|
virtual |
Get the byte size of this package.
|
virtual |
Purge the contents of the package.
|
virtual |
Get all messages contained in this package.
|
virtual |
Get all messages contained in this package.
clientId | Update client identifier of message with the given value. |
|
virtual |
Parse the given string and convert it to internal message structure.
buffer | Serialized message container. |
isBinary | If true, the string is to be interpreted as binary, JSON otherwise. |
|
virtual |
Serialize message container to a string.
asBinary | If true, the output string is to be produced as binary, JSON otherwise. |
|
virtual |
Get count of the messages in this package.
|
protected |