FNSS C++ library
C++ API for the Fast Network Simulation Setup (FNSS) toolchain
 All Classes Functions Typedefs Pages
Public Member Functions | Public Attributes | List of all members
fnss::Pair< T1, T2 > Class Template Reference

#include <pair.h>

+ Inheritance diagram for fnss::Pair< T1, T2 >:

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_)
 
Pairoperator= (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
 

Detailed Description

template<class T1, class T2>
class fnss::Pair< T1, T2 >

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).

Author
Cosmin Cocora

The documentation for this class was generated from the following file: