Panda3D
eggComment.cxx
1 // Filename: eggComment.cxx
2 // Created by: drose (20Jan99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "eggComment.h"
16 #include "eggMiscFuncs.h"
17 
18 #include "indent.h"
19 #include "string_utils.h"
20 
21 TypeHandle EggComment::_type_handle;
22 
23 
24 ////////////////////////////////////////////////////////////////////
25 // Function: EggComment::write
26 // Access: Public, Virtual
27 // Description: Writes the comment definition to the indicated output
28 // stream in Egg format.
29 ////////////////////////////////////////////////////////////////////
30 void EggComment::
31 write(ostream &out, int indent_level) const {
32  write_header(out, indent_level, "<Comment>");
33  enquote_string(out, get_comment(), indent_level + 2) << "\n";
34  indent(out, indent_level) << "}\n";
35 }
virtual void write(ostream &out, int indent_level) const
Writes the comment definition to the indicated output stream in Egg format.
Definition: eggComment.cxx:31
void write_header(ostream &out, int indent_level, const char *egg_keyword) const
Writes the first line of the egg object, e.g.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85