Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

dtool/src/interrogatedb/interrogateElement.cxx

Go to the documentation of this file.
00001 // Filename: interrogateElement.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 "interrogateElement.h"
00020 #include "indexRemapper.h"
00021 #include "interrogate_datafile.h"
00022 
00023 ////////////////////////////////////////////////////////////////////
00024 //     Function: InterrogateElement::output
00025 //       Access: Public
00026 //  Description: Formats the InterrogateElement data for output to a data
00027 //               file.
00028 ////////////////////////////////////////////////////////////////////
00029 void InterrogateElement::
00030 output(ostream &out) const {
00031   InterrogateComponent::output(out);
00032   out << _flags << " "
00033       << _type << " "
00034       << _getter << " "
00035       << _setter << " ";
00036   idf_output_string(out, _scoped_name);
00037 }
00038 
00039 ////////////////////////////////////////////////////////////////////
00040 //     Function: InterrogateElement::input
00041 //       Access: Public
00042 //  Description: Reads the data file as previously formatted by
00043 //               output().
00044 ////////////////////////////////////////////////////////////////////
00045 void InterrogateElement::
00046 input(istream &in) {
00047   InterrogateComponent::input(in);
00048   in >> _flags >> _type >> _getter >> _setter;
00049   idf_input_string(in, _scoped_name);
00050 }
00051 
00052 ////////////////////////////////////////////////////////////////////
00053 //     Function: InterrogateElement::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 InterrogateElement::
00060 remap_indices(const IndexRemapper &remap) {
00061   _type = remap.map_from(_type);
00062   _getter = remap.map_from(_getter);
00063   _setter = remap.map_from(_setter);
00064 }

Generated on Thu May 1 22:13:06 2003 for DTool by doxygen1.3