OverSim
ChordFingerTable.h File Reference
#include <deque>
#include <map>
#include <omnetpp.h>
#include <NodeVector.h>
#include <InitStages.h>

Go to the source code of this file.

Classes

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

Namespaces

namespace  oversim

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)

Detailed Description

Author
Markus Mauch, Ingmar Baumgart

Definition in file ChordFingerTable.h.

Function Documentation

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

Definition at line 237 of file ChordFingerTable.cc.

{
for (Successors::const_iterator i = suc.begin(); i != suc.end(); i++) {
if (i != suc.begin()) {
os << endl;
}
os << i->second;
if (i->first == -1) {
continue;
} else if (i->first == MAXTIME) {
os << "; RTT: --- ";
} else {
os << "; RTT: " << i->first;
}
}
return os;
}
std::ostream& operator<< ( std::ostream &  os,
const oversim::FingerEntry entry 
)

Definition at line 258 of file ChordFingerTable.cc.

{
if (entry.second.size() > 0) {
os << "[ " << entry.first << " ]\n" << entry.second;
} else {
os << entry.first;
}
return os;
}