FNSS C++ library
C++ API for the Fast Network Simulation Setup (FNSS) toolchain
|
#include <pair.h>
Public Member Functions | |
Pair (bool commutative_=false) | |
Pair (const T1 &first_, const T2 &second_, bool commutative_=false) | |
Pair (const std::pair< T1, T2 > &p, bool commutative_=false) | |
Pair (const Pair< T1, T2 > &other) | |
std::pair< T1, T2 > | getStlPair () const |
bool | getCommutative () const |
void | setCommutative (bool commutative_) |
Pair & | operator= (const Pair &rhs) |
bool | operator== (const Pair &rhs) const |
bool | operator< (const Pair &rhs) const |
Public Member Functions inherited from fnss::RelOP< Pair< T1, T2 > > | |
bool | operator!= (const Pair< T1, T2 > &rhs) const |
bool | operator<= (const Pair< T1, T2 > &rhs) const |
bool | operator> (const Pair< T1, T2 > &rhs) const |
bool | operator>= (const Pair< T1, T2 > &rhs) const |
Public Attributes | |
T1 & | first |
T2 & | second |
Wrapper class for std::pair that adds optional commutativity to the pair, eg. the pairs <1, 2> and <2, 1> will return true for operator==(..) if the commutative flag is set. You can use T1 != T2, but operators == and < must be defined for (T1, T1), (T2, T2) and (T1, T2).