Panda3D
interrogateManifest.cxx
1 // Filename: interrogateManifest.cxx
2 // Created by: drose (11Aug00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "interrogateManifest.h"
16 #include "indexRemapper.h"
17 #include "interrogate_datafile.h"
18 
19 ////////////////////////////////////////////////////////////////////
20 // Function: InterrogateManifest::output
21 // Access: Public
22 // Description: Formats the InterrogateManifest data for output to a data
23 // file.
24 ////////////////////////////////////////////////////////////////////
26 output(ostream &out) const {
28  out << _flags << " "
29  << _int_value << " "
30  << _type << " "
31  << _getter << " ";
32  idf_output_string(out, _definition);
33 }
34 
35 ////////////////////////////////////////////////////////////////////
36 // Function: InterrogateManifest::input
37 // Access: Public
38 // Description: Reads the data file as previously formatted by
39 // output().
40 ////////////////////////////////////////////////////////////////////
42 input(istream &in) {
44  in >> _flags >> _int_value >> _type >> _getter;
45  idf_input_string(in, _definition);
46 }
47 
48 ////////////////////////////////////////////////////////////////////
49 // Function: InterrogateManifest::remap_indices
50 // Access: Public
51 // Description: Remaps all internal index numbers according to the
52 // indicated map. This called from
53 // InterrogateDatabase::remap_indices().
54 ////////////////////////////////////////////////////////////////////
57  _type = remap.map_from(_type);
58  _getter = remap.map_from(_getter);
59 }
This class manages a mapping of integers to integers.
Definition: indexRemapper.h:33
void input(istream &in)
Reads the data file as previously formatted by output().
void output(ostream &out) const
Formats the component for output to a data file.
void remap_indices(const IndexRemapper &remap)
Remaps all internal index numbers according to the indicated map.
void output(ostream &out) const
Formats the InterrogateManifest data for output to a data file.
int map_from(int from) const
Returns the integer that the given &#39;from&#39; integer had been set to map to, or the same integer if noth...
void input(istream &in)
Reads the data file as previously formatted by output().