OverSim
PubSubSubspace.cc File Reference
#include "PubSubSubspace.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &o, const PubSubSubspace &subspace)
std::ostream & operator<< (std::ostream &o, const PubSubSubspaceIntermediate &subspace)
std::ostream & operator<< (std::ostream &o, const PubSubSubspaceResponsible &subspace)

Detailed Description

Author
Stephan Krause

Definition in file PubSubSubspace.cc.

Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const PubSubSubspace subspace 
)

Definition at line 39 of file PubSubSubspace.cc.

{
o << "Id: " << subspace.spaceId << " responsible: " << subspace.responsibleNode;
return o;
}
std::ostream& operator<< ( std::ostream &  o,
const PubSubSubspaceIntermediate subspace 
)

Definition at line 50 of file PubSubSubspace.cc.

{
o << dynamic_cast<const PubSubSubspace&>(subspace) << "\n";
o << " Children:\n";
set<NodeHandle>::iterator it;
for( it = subspace.children.begin(); it != subspace.children.end(); ++it ){
o << " " << *it << "\n";
}
return o;
}
std::ostream& operator<< ( std::ostream &  o,
const PubSubSubspaceResponsible subspace 
)

Definition at line 127 of file PubSubSubspace.cc.

{
o << dynamic_cast<const PubSubSubspaceIntermediate&>(subspace) << " BackupNode: " << subspace.backupNode;
o << "\n cachedChildren:\n";
map<NodeHandle, bool>::const_iterator iit;
for( iit = subspace.cachedChildren.begin(); iit != subspace.cachedChildren.end(); ++iit ){
o << " " << iit->first << " waiting: " << iit->second << "\n";
}
o << " totalChildrenCount: " << subspace.totalChildrenCount;
o << "\n IntermediateNodes:\n";
std::deque<PubSubSubspaceResponsible::IntermediateNode>::const_iterator it;
for( it = subspace.intermediateNodes.begin(); it != subspace.intermediateNodes.end(); ++it ){
o << " " << it->node;
o << "\n Children:\n";
for( set<NodeHandle>::iterator iit = it->children.begin(); iit != it->children.end(); ++iit ){
o << " " << *iit << "\n";
}
}
return o;
}