Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <>>
Public Member Functions | |
Pair (void) | |
Pair (const T1 &_fst, const T2 &_snd) | |
Pair (const Pair< T1, T2 > &pair) | |
Pair< T1, T2 > & | operator= (const Pair< T1, T2 > &pair) |
bool | operator== (const Pair< T1, T2 > &pair) const |
Public Attributes | |
T1 | fst |
T2 | snd |
This template class is mainly useful for returning or passing in parameter a data item composed of two values.
Pairs are useful to avoid developing specific structures or classes to group two data. To help using pairs, some shortcut functions are provided:
A common use of the last function is:
T1 | First value type. |
T2 | Second value type. |
Build a pair with uninitialized content.
Build a pair from two values.
_fst | First value. |
_snd | Second value. |
Build a pair by copying another pair.
pair | Pair to copy. |
bool elm::Pair< T1, T2 >::operator== | ( | const Pair< T1, T2 > & | pair | ) | const |
elm::Pair< T1, T2 >::fst |
The first value of the pair : may be read or written.
Referenced by elm::AssocComparator< K, T >::compare(), elm::avl::GenTree< T, IdAdapter< T >, C >::copy(), elm::AssocEquiv< K, T >::equals(), elm::serial2::TextSerializer::flush(), elm::serial2::XOMUnserializer::flush(), elm::serial2::XOMSerializer::flush(), elm::PairAdapter< K, T >::key(), elm::stree::MarkerBuilder< K, T, C >::make(), elm::Pair< elm::serial2::AbstractType *, const void * >::operator=(), elm::RefPair< T1, T2 >::operator=(), elm::Pair< elm::serial2::AbstractType *, const void * >::operator==(), and elm::serial::XOMUnserializer::readEnum().
elm::Pair< T1, T2 >::snd |
The second value of the pair : may be read or written.
Referenced by elm::avl::GenTree< T, IdAdapter< T >, C >::copy(), elm::genstruct::AssocList< string, Section * >::first(), elm::serial2::TextSerializer::flush(), elm::serial2::XOMUnserializer::flush(), elm::serial2::XOMSerializer::flush(), elm::genstruct::AVLMap< K, T, C >::get(), elm::avl::Map< Pair< K, K >, T, segment_comparator_t >::get(), elm::genstruct::SortedBinMap< char, elm::option::Option * >::get(), elm::genstruct::AssocList< string, Section * >::last(), elm::stree::MarkerBuilder< K, T, C >::make(), elm::Pair< elm::serial2::AbstractType *, const void * >::operator=(), elm::RefPair< T1, T2 >::operator=(), elm::Pair< elm::serial2::AbstractType *, const void * >::operator==(), elm::serial::XOMUnserializer::readEnum(), elm::PairAdapter< K, T >::ref(), and elm::PairAdapter< K, T >::value().