diff --git a/panda/src/graph/node.cxx b/panda/src/graph/node.cxx index ed4bb9b74f..9f6a39d03d 100644 --- a/panda/src/graph/node.cxx +++ b/panda/src/graph/node.cxx @@ -4,10 +4,12 @@ #include "node.h" #include "nodeRelation.h" + #include #include #include #include +#include TypeHandle Node::_type_handle; Node* const Node::Null = (Node*)0L; @@ -261,6 +263,16 @@ output(ostream &out) const { out << get_type(); } +//////////////////////////////////////////////////////////////////// +// Function: Node::write +// Access: Public, Virtual +// Description: +//////////////////////////////////////////////////////////////////// +void Node:: +write(ostream &out, int indent_level) const { + indent(out, indent_level) << *this << "\n"; +} + //////////////////////////////////////////////////////////////////// // Function: Node::propagate_stale_bound diff --git a/panda/src/graph/node.h b/panda/src/graph/node.h index 3eecc69a9e..c9a829da29 100644 --- a/panda/src/graph/node.h +++ b/panda/src/graph/node.h @@ -75,6 +75,7 @@ public: PUBLISHED: virtual void output(ostream &out) const; + virtual void write(ostream &out, int indent_level = 0) const; // We reference-count the child pointer, but not the parent pointer, // to avoid circular reference counting.