00001 // Filename: interrogateManifest.cxx 00002 // Created by: drose (11Aug00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "interrogateManifest.h" 00020 #include "indexRemapper.h" 00021 #include "interrogate_datafile.h" 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Function: InterrogateManifest::output 00025 // Access: Public 00026 // Description: Formats the InterrogateManifest data for output to a data 00027 // file. 00028 //////////////////////////////////////////////////////////////////// 00029 void InterrogateManifest:: 00030 output(ostream &out) const { 00031 InterrogateComponent::output(out); 00032 out << _flags << " " 00033 << _int_value << " " 00034 << _type << " " 00035 << _getter << " "; 00036 idf_output_string(out, _definition); 00037 } 00038 00039 //////////////////////////////////////////////////////////////////// 00040 // Function: InterrogateManifest::input 00041 // Access: Public 00042 // Description: Reads the data file as previously formatted by 00043 // output(). 00044 //////////////////////////////////////////////////////////////////// 00045 void InterrogateManifest:: 00046 input(istream &in) { 00047 InterrogateComponent::input(in); 00048 in >> _flags >> _int_value >> _type >> _getter; 00049 idf_input_string(in, _definition); 00050 } 00051 00052 //////////////////////////////////////////////////////////////////// 00053 // Function: InterrogateManifest::remap_indices 00054 // Access: Public 00055 // Description: Remaps all internal index numbers according to the 00056 // indicated map. This called from 00057 // InterrogateDatabase::remap_indices(). 00058 //////////////////////////////////////////////////////////////////// 00059 void InterrogateManifest:: 00060 remap_indices(const IndexRemapper &remap) { 00061 _type = remap.map_from(_type); 00062 _getter = remap.map_from(_getter); 00063 }