clean up output a bit

This commit is contained in:
David Rose 2010-10-13 00:14:15 +00:00
parent 20900b6797
commit 1bd404eaa8
2 changed files with 11 additions and 2 deletions

View File

@ -1039,11 +1039,15 @@ void SpeedTreeNode::
write(ostream &out, int indent_level) const {
PandaNode::write(out, indent_level);
// This makes NodePath.ls() too confusing.
/*
Trees::const_iterator ti;
for (ti = _trees.begin(); ti != _trees.end(); ++ti) {
InstanceList *instance_list = (*ti);
instance_list->write(out, indent_level + 2);
indent(out, indent_level + 2)
<< *instance_list << "\n";
}
*/
}
////////////////////////////////////////////////////////////////////
@ -1534,7 +1538,7 @@ fillin(DatagramIterator &scan, BamReader *manager) {
////////////////////////////////////////////////////////////////////
void SpeedTreeNode::InstanceList::
output(ostream &out) const {
out << *_tree << ": " << _instances.size() << " instances.";
out << *_tree << ": " << _instances.size() << " instances";
}
////////////////////////////////////////////////////////////////////

View File

@ -245,6 +245,11 @@ private:
friend class SpeedTreeNode::DrawCallback;
};
INLINE ostream &operator << (ostream &out, const SpeedTreeNode::InstanceList &instances) {
instances.output(out);
return out;
}
#include "speedTreeNode.I"
#endif