00001 // Filename: eggAnimPreload.cxx 00002 // Created by: drose (06Aug08) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "eggAnimPreload.h" 00016 00017 #include "string_utils.h" 00018 #include "indent.h" 00019 00020 TypeHandle EggAnimPreload::_type_handle; 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Function: EggAnimPreload::write 00024 // Access: Public, Virtual 00025 // Description: Writes the table and all of its children to the 00026 // indicated output stream in Egg format. 00027 //////////////////////////////////////////////////////////////////// 00028 void EggAnimPreload:: 00029 write(ostream &out, int indent_level) const { 00030 test_under_integrity(); 00031 00032 write_header(out, indent_level, "<AnimPreload>"); 00033 00034 if (has_fps()) { 00035 indent(out, indent_level + 2) 00036 << "<Scalar> fps { " << get_fps() << " }\n"; 00037 } 00038 00039 if (has_num_frames()) { 00040 indent(out, indent_level + 2) 00041 << "<Scalar> frames { " << get_num_frames() << " }\n"; 00042 } 00043 00044 indent(out, indent_level) << "}\n"; 00045 }