ChordFingerTable.h File Reference


Detailed Description

Author:
Markus Mauch, Ingmar Baumgart

#include <vector>
#include <map>
#include <omnetpp.h>
#include <NodeHandle.h>
#include <InitStages.h>
#include <BaseOverlay.h>

Classes

class  ChordFingerTable
 Chord's finger table module. More...

Typedefs

typedef std::multimap< double,
NodeHandle
Successors
typedef std::pair< NodeHandle,
Successors
FingerEntry

Functions

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


Typedef Documentation

typedef std::pair<NodeHandle, Successors> FingerEntry

typedef std::multimap<double, NodeHandle> Successors


Function Documentation

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 Tue Jul 24 16:51:17 2007 for ITM OverSim by  doxygen 1.5.1