Key-Value Pair Class.
More...
#include <key_value.hpp>
|
| | KeyValuePair (const std::string &key, const std::string &value) |
| | Construct a new Key Value Pair object.
|
|
| KeyValuePair (const std::string &keyBytes) |
| void | setValue (const std::string &newValue) |
| | Set the Value object.
|
| const std::string & | getKey () const |
| | Get the Key object.
|
| const std::string & | getValue () const |
| | Get the Value object.
|
| size_t | size () const |
| | Get the Size of the Key Value Pair object.
|
Key-Value Pair Class.
This class represents a key-value pair with methods to set and get
◆ KeyValuePair()
| KeyValuePair::KeyValuePair |
( |
const std::string & | key, |
|
|
const std::string & | value ) |
|
inline |
Construct a new Key Value Pair object.
- Parameters
-
| key | key string |
| value | value string |
◆ getKey()
| const std::string & KeyValuePair::getKey |
( |
| ) |
const |
|
inline |
Get the Key object.
- Returns
- const std::string& key string
◆ getValue()
| const std::string & KeyValuePair::getValue |
( |
| ) |
const |
|
inline |
Get the Value object.
- Returns
- const std::string& value string
◆ setValue()
| void KeyValuePair::setValue |
( |
const std::string & | newValue | ) |
|
|
inline |
Set the Value object.
- Parameters
-
◆ size()
| size_t KeyValuePair::size |
( |
| ) |
const |
|
inline |
Get the Size of the Key Value Pair object.
The key value pair size is calculated as the sum of the size of the key and value strings, plus the size of the string object itself.
- Returns
- size_t size of the key-value pair
The documentation for this class was generated from the following file: