CoreComponents 3.0.0
A Modern C++ Toolkit
|
Key-value pair. More...
#include <cc/KeyValue>
Public Types | |
using | Key = K |
key type | |
using | Value = V |
value type | |
Public Member Functions | |
KeyValue () | |
Create an undefined key-value pair. | |
KeyValue (const Key &key) | |
Create a search key. | |
KeyValue (const Key &key, const Value &value) | |
Create a defined key-value pair. | |
KeyValue (const Key &&key, const Value &&value) | |
const Key & | key () const |
Get key. | |
const Value & | value () const |
Get value. | |
Value & | value () |
Get mutable value. | |
void | setValue (const Value &newValue) |
Set new value | |
bool | operator== (const KeyValue &other) const |
Comparism operators. | |
template<class Pattern > | |
bool | operator== (const Pattern &pattern) const |
Equality operator. | |
std::strong_ordering | operator<=> (const KeyValue &other) const |
Ordering operator. | |
template<class Pattern > | |
std::strong_ordering | operator<=> (const Pattern &pattern) const |
Ordering operator. | |
Key-value pair.
using Key = K |
key type
using Value = V |
value type
KeyValue | ( | ) |
Create an undefined key-value pair.
Create a defined key-value pair.
const Key & key | ( | ) | const |
Get key.
const Value & value | ( | ) | const |
Get value.
Value & value | ( | ) |
Get mutable value.
void setValue | ( | const Value & | newValue | ) |
Set new value
bool operator== | ( | const KeyValue< K, V > & | other | ) | const |
Comparism operators.
Equality operator
bool operator== | ( | const Pattern & | pattern | ) | const |
Equality operator.
std::strong_ordering operator<=> | ( | const KeyValue< K, V > & | other | ) | const |
Ordering operator.