#include <message_container.hpp>
|
unique_ptr< MessageContainerData > | m_data |
|
◆ MessageContainer()
kanzi::connect::MessageContainer::MessageContainer |
( |
| ) |
|
◆ ~MessageContainer()
virtual kanzi::connect::MessageContainer::~MessageContainer |
( |
| ) |
|
|
virtual |
◆ addMessage()
virtual bool kanzi::connect::MessageContainer::addMessage |
( |
const MessagePackage * |
message | ) |
|
|
virtual |
Add one message to container.
- Parameters
-
message | The message to be added. |
- Returns
- True if the message was successfully added.
◆ byteSize()
virtual unsigned int kanzi::connect::MessageContainer::byteSize |
( |
| ) |
const |
|
virtual |
Get the byte size of this package.
- Returns
- The byte size of this package.
◆ clear()
virtual void kanzi::connect::MessageContainer::clear |
( |
| ) |
|
|
virtual |
Purge the contents of the package.
◆ getMessages() [1/2]
virtual MessageArray kanzi::connect::MessageContainer::getMessages |
( |
| ) |
const |
|
virtual |
Get all messages contained in this package.
- Returns
- The contained messages as MessageArray.
◆ getMessages() [2/2]
virtual MessageArray kanzi::connect::MessageContainer::getMessages |
( |
int |
clientId | ) |
const |
|
virtual |
Get all messages contained in this package.
- Parameters
-
clientId | Update client identifier of message with the given value. |
- Returns
- The contained messages as MessageArray.
◆ initialize()
virtual bool kanzi::connect::MessageContainer::initialize |
( |
const string & |
buffer, |
|
|
bool |
isBinary |
|
) |
| |
|
virtual |
Parse the given string and convert it to internal message structure.
- Parameters
-
buffer | Serialized message container. |
isBinary | If true, the string is to be interpreted as binary, JSON otherwise. |
- Returns
- True if initialization was successful.
◆ serializeAsString()
virtual string kanzi::connect::MessageContainer::serializeAsString |
( |
bool |
asBinary | ) |
const |
|
virtual |
Serialize message container to a string.
- Parameters
-
asBinary | If true, the output string is to be produced as binary, JSON otherwise. |
- Returns
- Contents of the message container serialized as a string.
◆ size()
virtual size_t kanzi::connect::MessageContainer::size |
( |
| ) |
const |
|
virtual |
Get count of the messages in this package.
- Returns
- The count of the messages.
◆ m_data
unique_ptr<MessageContainerData> kanzi::connect::MessageContainer::m_data |
|
protected |
The documentation for this class was generated from the following file:
- connect/messages/message_container.hpp