ChordFingerTable.cc File Reference

#include <cfloat>
#include "hashWatch.h"
#include "Chord.h"
#include "ChordSuccessorList.h"
#include <map>
#include <omnetpp.h>
#include <InitStages.h>
#include <NodeHandle.h>
#include <deque>
#include <NodeVector.h>

Go to the source code of this file.

Namespaces

namespace  oversim

Functions

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

Detailed Description

Author:
Markus Mauch, Ingmar Baumgart

Definition in file ChordFingerTable.cc.


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const 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 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 May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3