![]() |
PahoMqttCpp
MQTT C++ Client for POSIX and Windows
|
#include <string_collection.h>
Public Types | |
using | ptr_t = std::shared_ptr< name_value_collection > |
using | const_ptr_t = std::shared_ptr< const name_value_collection > |
using | value_type = collection_type::value_type |
Public Member Functions | |
name_value_collection ()=default | |
name_value_collection (const collection_type &map) | |
name_value_collection (collection_type &&map) | |
name_value_collection (const name_value_collection &other) | |
name_value_collection (name_value_collection &&other)=default | |
name_value_collection (std::initializer_list< value_type > init) | |
name_value_collection & | operator= (const name_value_collection &other) |
name_value_collection & | operator= (name_value_collection &&other)=default |
bool | empty () const |
size_t | size () const |
void | clear () |
bool | insert (const value_type &nvpair) |
const MQTTAsync_nameValue * | c_arr () const |
A collection of name/value string pairs.
using mqtt::name_value_collection::ptr_t = std::shared_ptr<name_value_collection> |
Smart/shared pointer to an object of this type
using mqtt::name_value_collection::const_ptr_t = std::shared_ptr<const name_value_collection> |
Smart/shared pointer to a const object of this type
using mqtt::name_value_collection::value_type = collection_type::value_type |
The type of the string/string pair of values
|
default |
Default constructor for an empty collection.
|
inline |
Creates a name/value collection from an underlying STL collection.
map | The collection of name/value pairs. |
|
inline |
Creates a name/value collection from an underlying STL collection.
map | The collection of name/value pairs. |
|
inline |
Copy constructor.
other | Another collection of name/value pairs. |
|
default |
Move constructor.
other | Another collection of name/value pairs |
|
inline |
Constructs the collection with an initializer list.
This works identically to initializing a std::map<> with string/tring pairs.
init | Initializer list to construct the members of the collection. |
|
inline |
Copy assignment.
other | Another collection of name/value pairs. |
|
default |
Move constructor.
other | Another collection of name/value pairs |
|
inline |
Determines if the collection is empty.
|
inline |
Gets the number of name/value pairs in the collection.
|
inline |
Removes all items from the collection.
|
inline |
Inserts a name/value pair into the collection.
nvpair | The name/value string pair. |
|
inline |
Gets a pointer to an array of NUL-terminated C string pointer pairs. This is a collection type supported by the underlying Paho C library. The returned pointer is guaranteed valid so long as the object is not updated. The return value may change if the object is modified, so the application should not cache the return value, but rather request the value when needed.