ChordFingerTable.cc File Reference


Detailed Description

Author:
Markus Mauch, Ingmar Baumgart

#include <cfloat>
#include "ChordFingerTable.h"

Functions

 Define_Module (ChordFingerTable)
std::ostream & operator<< (std::ostream &os, const Successors &suc)
std::ostream & operator<< (std::ostream &os, const FingerEntry &entry)


Function Documentation

Define_Module ( ChordFingerTable   ) 

std::ostream& operator<< ( std::ostream &  os,
const FingerEntry entry 
)

00139 {
00140     if(entry.second.size() > 0)
00141         os << "[ " << entry.first << " ]\n" << entry.second;
00142     else
00143         os << entry.first;
00144 
00145     return os;
00146 }

std::ostream& operator<< ( std::ostream &  os,
const Successors suc 
)

00122 {
00123     for (Successors::const_iterator i = suc.begin(); i != suc.end(); i++) {
00124         if(i != suc.begin())
00125             os << endl;
00126         os << i->second;
00127         if(i->first == -1)
00128             continue;
00129         else if(i->first == DBL_MAX)
00130             os << "; RTT:  --- ";
00131         else
00132             os << "; RTT: " << i->first;
00133     }
00134 
00135     return os;
00136 }


Generated on Fri Sep 19 13:05:05 2008 for ITM OverSim by  doxygen 1.5.5