AbstractProxKeyComparator Class Reference

#include <Comparator.h>

Inheritance diagram for AbstractProxKeyComparator:
ProxKeyComparator< Metric, ProxComp > ProxKeyComparator< KeyPrefixMetric > KademliaPRComparator

List of all members.

Public Member Functions

virtual ~AbstractProxKeyComparator ()
virtual int compare (const ProxKey &lhs, const ProxKey &rhs) const =0
 indicates which of the two given prox/key-pairs is closer to the relative key

Detailed Description

Definition at line 285 of file Comparator.h.


Constructor & Destructor Documentation

virtual AbstractProxKeyComparator::~AbstractProxKeyComparator (  )  [inline, virtual]

Definition at line 288 of file Comparator.h.

00288 {};


Member Function Documentation

virtual int AbstractProxKeyComparator::compare ( const ProxKey lhs,
const ProxKey rhs 
) const [pure virtual]

indicates which of the two given prox/key-pairs is closer to the relative key

Parameters:
lhs first prox/key-pair
rhs second prox/key-pair
Returns:
-1 if lhs is closer, 0 if lhs and rhs are equal and 1 if rhs closer to the relative key

Implemented in KademliaPRComparator.

Referenced by BaseKeySortedVector< LookupEntry >::add(), and BaseKeySortedVector< LookupEntry >::isAddable().


The documentation for this class was generated from the following file:
Generated on Wed May 26 16:21:16 2010 for OverSim by  doxygen 1.6.3