Jelajahi Sumber

*** empty log message ***

David Rose 25 tahun lalu
induk
melakukan
39270a6f2c
2 mengubah file dengan 13 tambahan dan 0 penghapusan
  1. 12 0
      panda/src/graph/node.cxx
  2. 1 0
      panda/src/graph/node.h

+ 12 - 0
panda/src/graph/node.cxx

@@ -4,10 +4,12 @@
 
 #include "node.h"
 #include "nodeRelation.h"
+
 #include <bamWriter.h>
 #include <bamReader.h>
 #include <datagramIterator.h>
 #include <datagram.h>
+#include <indent.h>
 
 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

+ 1 - 0
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.