Nebula
|
#include <keyvaluepair.h>
Key/Value pair objects are used by most assiociative container classes, like Dictionary or HashTable.
Public Member Functions | |
KeyValuePair () | |
default constructor | |
KeyValuePair (const KEYTYPE &k, const VALUETYPE &v) | |
constructor with key and value | |
KeyValuePair (const KEYTYPE &k) | |
constructor with key and undefined value | |
KeyValuePair (const KeyValuePair< KEYTYPE, VALUETYPE > &rhs) | |
copy constructor | |
KeyValuePair (KeyValuePair< KEYTYPE, VALUETYPE > &&rhs) noexcept | |
move constructor | |
void | operator= (const KeyValuePair< KEYTYPE, VALUETYPE > &rhs) |
assignment operator | |
void | operator= (KeyValuePair< KEYTYPE, VALUETYPE > &&rhs) noexcept |
move assignment operator | |
bool | operator== (const KeyValuePair< KEYTYPE, VALUETYPE > &rhs) const |
equality operator | |
bool | operator!= (const KeyValuePair< KEYTYPE, VALUETYPE > &rhs) const |
inequality operator | |
bool | operator> (const KeyValuePair< KEYTYPE, VALUETYPE > &rhs) const |
greater operator | |
bool | operator>= (const KeyValuePair< KEYTYPE, VALUETYPE > &rhs) const |
greater-or-equal operator | |
bool | operator< (const KeyValuePair< KEYTYPE, VALUETYPE > &rhs) const |
lesser operator | |
bool | operator<= (const KeyValuePair< KEYTYPE, VALUETYPE > &rhs) const |
lesser-or-equal operator | |
bool | operator== (const KEYTYPE &rhs) const |
equality operator | |
bool | operator!= (const KEYTYPE &rhs) const |
inequality operator | |
bool | operator> (const KEYTYPE &rhs) const |
greater operator | |
bool | operator>= (const KEYTYPE &rhs) const |
greater-or-equal operator | |
bool | operator< (const KEYTYPE &rhs) const |
lesser operator | |
bool | operator<= (const KEYTYPE &rhs) const |
lesser-or-equal operator | |
VALUETYPE & | Value () |
read/write access to value | |
const KEYTYPE & | Key () const |
read access to key | |
const VALUETYPE & | Value () const |
read access to key | |
Public Attributes | |
KEYTYPE | keyData = KEYTYPE() |
VALUETYPE | valueData = VALUETYPE() |
Util::KeyValuePair< KEYTYPE, VALUETYPE >::KeyValuePair | ( | ) |
default constructor
Util::KeyValuePair< KEYTYPE, VALUETYPE >::KeyValuePair | ( | const KEYTYPE & | k, |
const VALUETYPE & | v ) |
constructor with key and value
|
explicit |
constructor with key and undefined value
This strange constructor is useful for search-by-key if the key-value-pairs are stored in a Util::Array.
Util::KeyValuePair< KEYTYPE, VALUETYPE >::KeyValuePair | ( | const KeyValuePair< KEYTYPE, VALUETYPE > & | rhs | ) |
copy constructor
|
noexcept |
move constructor
const KEYTYPE & Util::KeyValuePair< KEYTYPE, VALUETYPE >::Key | ( | ) | const |
read access to key
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator!= | ( | const KEYTYPE & | rhs | ) | const |
inequality operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator!= | ( | const KeyValuePair< KEYTYPE, VALUETYPE > & | rhs | ) | const |
inequality operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator< | ( | const KEYTYPE & | rhs | ) | const |
lesser operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator< | ( | const KeyValuePair< KEYTYPE, VALUETYPE > & | rhs | ) | const |
lesser operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator<= | ( | const KEYTYPE & | rhs | ) | const |
lesser-or-equal operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator<= | ( | const KeyValuePair< KEYTYPE, VALUETYPE > & | rhs | ) | const |
lesser-or-equal operator
void Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator= | ( | const KeyValuePair< KEYTYPE, VALUETYPE > & | rhs | ) |
assignment operator
|
noexcept |
move assignment operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator== | ( | const KEYTYPE & | rhs | ) | const |
equality operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator== | ( | const KeyValuePair< KEYTYPE, VALUETYPE > & | rhs | ) | const |
equality operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator> | ( | const KEYTYPE & | rhs | ) | const |
greater operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator> | ( | const KeyValuePair< KEYTYPE, VALUETYPE > & | rhs | ) | const |
greater operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator>= | ( | const KEYTYPE & | rhs | ) | const |
greater-or-equal operator
bool Util::KeyValuePair< KEYTYPE, VALUETYPE >::operator>= | ( | const KeyValuePair< KEYTYPE, VALUETYPE > & | rhs | ) | const |
greater-or-equal operator
VALUETYPE & Util::KeyValuePair< KEYTYPE, VALUETYPE >::Value | ( | ) |
read/write access to value
const VALUETYPE & Util::KeyValuePair< KEYTYPE, VALUETYPE >::Value | ( | ) | const |
read access to key
KEYTYPE Util::KeyValuePair< KEYTYPE, VALUETYPE >::keyData = KEYTYPE() |
VALUETYPE Util::KeyValuePair< KEYTYPE, VALUETYPE >::valueData = VALUETYPE() |