Panda3D
interrogateManifest.cxx
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file interrogateManifest.cxx
10  * @author drose
11  * @date 2000-08-11
12  */
13 
14 #include "interrogateManifest.h"
15 #include "indexRemapper.h"
16 #include "interrogate_datafile.h"
17 
18 /**
19  * Formats the InterrogateManifest data for output to a data file.
20  */
22 output(std::ostream &out) const {
24  out << _flags << " "
25  << _int_value << " "
26  << _type << " "
27  << _getter << " ";
28  idf_output_string(out, _definition);
29 }
30 
31 /**
32  * Reads the data file as previously formatted by output().
33  */
35 input(std::istream &in) {
37  in >> _flags >> _int_value >> _type >> _getter;
38  idf_input_string(in, _definition);
39 }
40 
41 /**
42  * Remaps all internal index numbers according to the indicated map. This
43  * called from InterrogateDatabase::remap_indices().
44  */
47  _type = remap.map_from(_type);
48  _getter = remap.map_from(_getter);
49 }
This class manages a mapping of integers to integers.
Definition: indexRemapper.h:29
void idf_output_string(ostream &out, const string &str, char whitespace)
Writes the indicated string to the output file.
void idf_input_string(istream &in, string &str)
Reads the given string from the input file, as previously written by output_string().
void output(std::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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void output(std::ostream &out) const
Formats the InterrogateManifest data for output to a data file.
void input(std::istream &in)
Reads the data file as previously formatted by output().
void input(std::istream &in)
Reads the data file as previously formatted by output().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
int map_from(int from) const
Returns the integer that the given 'from' integer had been set to map to, or the same integer if noth...