ChordFingerTable.h File Reference


Detailed Description

Author:
Markus Mauch, Ingmar Baumgart

Definition in file ChordFingerTable.h.

#include <deque>
#include <map>
#include <omnetpp.h>
#include <NodeVector.h>
#include <InitStages.h>

Go to the source code of this file.

Namespaces

namespace  oversim

Classes

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

Typedefs

typedef std::multimap
< simtime_t, NodeHandle > 
oversim::Successors
typedef std::pair< NodeHandle,
Successors > 
oversim::FingerEntry

Functions

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


Function Documentation

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

Definition at line 256 of file ChordFingerTable.cc.

00257 {
00258     if (entry.second.size() > 0) {
00259         os << "[ " << entry.first << " ]\n" << entry.second;
00260     } else {
00261         os << entry.first;
00262     }
00263 
00264     return os;
00265 }

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

Definition at line 235 of file ChordFingerTable.cc.

00236 {
00237     for (Successors::const_iterator i = suc.begin(); i != suc.end(); i++) {
00238         if (i != suc.begin()) {
00239             os << endl;
00240         }
00241 
00242         os << i->second;
00243 
00244         if (i->first == -1) {
00245             continue;
00246         } else if (i->first == MAXTIME) {
00247             os << "; RTT:  --- ";
00248         } else {
00249             os << "; RTT: " << i->first;
00250         }
00251     }
00252 
00253     return os;
00254 }


Generated on Wed Mar 25 16:32:50 2009 for OverSim by  doxygen 1.5.5