Blink DB Documentation v1.0.0
Blink DB Documentation
Loading...
Searching...
No Matches
KeyValuePair Class Reference

Key-Value Pair Class. More...

#include <key_value.hpp>

Public Member Functions

 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.

Detailed Description

Key-Value Pair Class.

This class represents a key-value pair with methods to set and get

Constructor & Destructor Documentation

◆ KeyValuePair()

KeyValuePair::KeyValuePair ( const std::string & key,
const std::string & value )
inline

Construct a new Key Value Pair object.

Parameters
keykey string
valuevalue string

Member Function Documentation

◆ 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
newValue

◆ 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: