reSIProcate/stack  9694
Public Member Functions
resip::Tuple::AnyPortAnyInterfaceCompare Class Reference

A "less than" comparator for Tuple, for use in map containers etc. More...

#include <Tuple.hxx>

List of all members.

Public Member Functions

bool operator() (const Tuple &x, const Tuple &y) const

Detailed Description

A "less than" comparator for Tuple, for use in map containers etc.

Comparison is based only on transport type

Definition at line 215 of file Tuple.hxx.


Member Function Documentation

bool Tuple::AnyPortAnyInterfaceCompare::operator() ( const Tuple x,
const Tuple y 
) const

Definition at line 955 of file Tuple.cxx.

References resip::Tuple::mSockaddr, and resip::Tuple::mTransportType.

{
   if (lhs.mTransportType < rhs.mTransportType)
   {
      return true;
   }
   else if (lhs.mTransportType > rhs.mTransportType)
   {
      return false;
   }
#ifdef USE_IPV6
   else if (lhs.mSockaddr.sa_family == AF_INET6 &&
            rhs.mSockaddr.sa_family == AF_INET)
   {
      return true;
   }
   else if (lhs.mSockaddr.sa_family == AF_INET &&
            rhs.mSockaddr.sa_family == AF_INET6)
   {
      return false;
   }
#endif
   else
   {
      return false;
   }
};

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