ChordFingerTable.cc File Reference


Detailed Description

Author:
Markus Mauch, Ingmar Baumgart

#include <cfloat>
#include <omnetpp.h>
#include <IPAddressResolver.h>
#include <NodeHandle.h>
#include <OverlayKey.h>
#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 
)

00149 {
00150     if(entry.second.size() > 0)
00151         os << "[ " << entry.first << " ]\n" << entry.second;
00152     else 
00153         os << entry.first;
00154 
00155     return os;
00156 }

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

00132 {
00133     for (Successors::const_iterator i = suc.begin(); i != suc.end(); i++) {
00134         if(i != suc.begin())
00135             os << endl; 
00136         os << i->second;
00137         if(i->first == -1)
00138             continue;
00139         else if(i->first == DBL_MAX) 
00140             os << "; RTT:  --- ";
00141         else
00142             os << "; RTT: " << i->first;
00143     }
00144 
00145     return os;
00146 }


Generated on Thu Apr 17 13:19:27 2008 for ITM OverSim by  doxygen 1.5.3