Panda3D
Loading...
Searching...
No Matches
eggComment.cxx
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file eggComment.cxx
10 * @author drose
11 * @date 1999-01-20
12 */
13
14#include "eggComment.h"
15#include "eggMiscFuncs.h"
16
17#include "indent.h"
18#include "string_utils.h"
19
20TypeHandle EggComment::_type_handle;
21
22
23/**
24 * Writes the comment definition to the indicated output stream in Egg format.
25 */
27write(std::ostream &out, int indent_level) const {
28 write_header(out, indent_level, "<Comment>");
29 enquote_string(out, get_comment(), indent_level + 2) << "\n";
30 indent(out, indent_level) << "}\n";
31}
virtual void write(std::ostream &out, int indent_level) const
Writes the comment definition to the indicated output stream in Egg format.
void write_header(std::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:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ostream & enquote_string(ostream &out, const string &str, int indent_level, bool always_quote)
Writes the string to the indicated output stream.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition indent.cxx:20
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.