Classes | |
struct | MessageBuilderDeleter |
Typedefs | |
using | MessageBuilderPtr = unique_ptr<MessageBuilder, MessageBuilderDeleter> |
Functions | |
KANZI_CONNECT_MESSAGES_API void | addItem (MessageBuilder &builder, const char *name, uint32_t hash, int32_t type) noexcept |
Adds a new item node. | |
KANZI_CONNECT_MESSAGES_API MessageBuilderPtr | create () noexcept |
Create a message builder instance. | |
KANZI_CONNECT_MESSAGES_API void | popNode (MessageBuilder &builder) noexcept |
Sets the current node to the previous (parent) node. | |
KANZI_CONNECT_MESSAGES_API void | pushNode (MessageBuilder &builder, const char *name, uint32_t hash) noexcept |
Adds a new child object node and sets it as the current node. | |
KANZI_CONNECT_MESSAGES_API bool | serialize (const MessageBuilder &builder, string &output) noexcept |
Serialize the contents of the message builder to the supplied output string. | |
KANZI_CONNECT_MESSAGES_API void | setItemBool (MessageBuilder &builder, bool value) noexcept |
Sets the current item (added using addItem) to a boolean value. | |
KANZI_CONNECT_MESSAGES_API void | setItemFloat (MessageBuilder &builder, float value) noexcept |
Sets the current item (added using addItem) to a float value. | |
KANZI_CONNECT_MESSAGES_API void | setItemInt (MessageBuilder &builder, int32_t value) noexcept |
Sets the current item (added using addItem) to an interger value. | |
KANZI_CONNECT_MESSAGES_API void | setItemString (MessageBuilder &builder, const char *value) noexcept |
Sets the current item (added using addItem) to a string value. | |
using kanzi::connect::message_builder::MessageBuilderPtr = unique_ptr<MessageBuilder, MessageBuilderDeleter> |
|
noexcept |
Adds a new item node.
The node is initialized with a name, hash and type.
builder | The builder instance. |
name | The name given to the new item node. |
hash | The hash given to the new item node. |
type | The type given to the new item node. |
|
noexcept |
Create a message builder instance.
|
noexcept |
Sets the current node to the previous (parent) node.
It is the responsibility of the caller to ensure that every call popNode follows a matching call to pushNode.
builder | The builder instance. |
|
noexcept |
Adds a new child object node and sets it as the current node.
builder | The builder instance. |
name | The name given to the new object node. |
hash | The hash given to the new object node. |
|
noexcept |
Serialize the contents of the message builder to the supplied output string.
builder | The builder instance to serialize. |
output | The string to receive the serialized content. |
|
noexcept |
Sets the current item (added using addItem) to a boolean value.
It is the responsibility of the caller to ensure that this function is called only after a call to addItem to create the current item instance.
builder | The builder instance. |
value | The boolean value to set on the current item. |
|
noexcept |
Sets the current item (added using addItem) to a float value.
It is the responsibility of the caller to ensure that this function is called only after a call to addItem to create the current item instance.
builder | The builder instance. |
value | The float value to set on the current item. |
|
noexcept |
Sets the current item (added using addItem) to an interger value.
It is the responsibility of the caller to ensure that this function is called only after a call to addItem to create the current item instance.
builder | The builder instance. |
value | The integer value to set on the current item. |
|
noexcept |
Sets the current item (added using addItem) to a string value.
It is the responsibility of the caller to ensure that this function is called only after a call to addItem to create the current item instance.
builder | The builder instance. |
value | The string value to set on the current item. |