00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "eggNamedObject.h"
00016 #include "eggMiscFuncs.h"
00017
00018 #include "indent.h"
00019
00020 TypeHandle EggNamedObject::_type_handle;
00021
00022
00023
00024
00025
00026
00027 void EggNamedObject::
00028 output(ostream &out) const {
00029 out << get_type();
00030 if (has_name()) {
00031 out << " " << get_name();
00032 }
00033 }
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 void EggNamedObject::
00045 write_header(ostream &out, int indent_level, const char *egg_keyword) const {
00046 indent(out, indent_level) << egg_keyword << " ";
00047
00048 if (has_name()) {
00049 enquote_string(out, get_name()) << " {\n";
00050 } else {
00051 out << "{\n";
00052 }
00053 }