Evo C++ Library v0.5.1
|
#include <evo/pair.h>
Stores a key/value pair of independent objects or values.
C++11:
TA | First (key) type |
TB | Second (value) type |
Public Types | |
typedef TA | A |
First value type (same as Key) More... | |
typedef TB | B |
Second value type (same as Value) More... | |
typedef TA | First |
First value type (same as Key) More... | |
typedef TA | Key |
Pair key type (same as A) More... | |
typedef TB | Second |
Second value type (same as Value) More... | |
typedef Pair< TA, TB > | This |
This type. More... | |
typedef TB | Value |
Pair value type (same as B) More... | |
Public Member Functions | |
Pair () | |
Constructor. More... | |
Pair (const TA &a) | |
Constructor. More... | |
Pair (const TA &a, const TB &b) | |
Constructor. More... | |
Pair (const This &src) | |
Copy constructor. More... | |
Pair (This &&src) | |
Move constructor (C++11). More... | |
const A & | a () const |
Get first value (const). More... | |
A & | a () |
Get first value. More... | |
const B & | b () const |
Get second value (const). More... | |
B & | b () |
Get second value. More... | |
int | compare (const This &src) const |
Compare with another instance. More... | |
ulong | hash (ulong seed=0) const |
Get hash value for both values in pair. More... | |
const Key & | key () const |
Get key for pair (first value) (const). More... | |
Key & | key () |
Get key for pair (first value). More... | |
bool | operator!= (const This &src) const |
Compare for inequality. More... | |
bool | operator< (const This &src) const |
Compare whether less than given pair. More... | |
bool | operator<= (const This &src) const |
Compare whether less than or equal to given pair. More... | |
This & | operator= (const This &src) |
Assignment operator. More... | |
This & | operator= (This &&src) |
Move assignment operator (C++11). More... | |
bool | operator== (const This &src) const |
Compare for equality. More... | |
bool | operator> (const This &src) const |
Compare whether greater than given pair. More... | |
bool | operator>= (const This &src) const |
Compare whether greater than or equal to given pair. More... | |
const Value & | value () const |
Get value for pair (second value) (const). More... | |
Value & | value () |
Get value for pair (second value). More... | |
Public Attributes | |
TA | first |
First value (same as a() and key()) More... | |
TB | second |
Second value (same as b() and value()) More... | |
typedef TA A |
First value type (same as Key)
typedef TB B |
Second value type (same as Value)
typedef TA First |
First value type (same as Key)
typedef TA Key |
Pair key type (same as A)
typedef TB Second |
Second value type (same as Value)
typedef TB Value |
Pair value type (same as B)
|
inline |
Constructor.
|
inline |
Constructor.
a | First value (pair key) |
|
inline |
Constructor.
a | First value (pair key) |
b | Second value (pair value) |
|
inline |
Get first value (const).
|
inline |
Get first value.
|
inline |
Get second value (const).
|
inline |
Get second value.
|
inline |
Compare with another instance.
src | Pair to compare to |
|
inline |
Get hash value for both values in pair.
seed | Seed value for hashing multiple values, 0 if none |
|
inline |
Get key for pair (first value) (const).
|
inline |
Get key for pair (first value).
|
inline |
Compare for inequality.
src | Pair to compare to |
|
inline |
Compare whether less than given pair.
src | Pair to compare to |
|
inline |
Compare whether less than or equal to given pair.
src | Pair to compare to |
Assignment operator.
src | Pair to copy |
Move assignment operator (C++11).
src | Source to move |
|
inline |
Compare for equality.
src
src | Pair to compare to |
|
inline |
Compare whether greater than given pair.
src | Pair to compare to |
|
inline |
Compare whether greater than or equal to given pair.
src | Pair to compare to |
|
inline |
Get value for pair (second value) (const).
|
inline |
Get value for pair (second value).