33 _atomic_token = AT_not_atomic;
53 void InterrogateType::Derivation::
54 output(ostream &out)
const {
55 out << _flags <<
" " << _base <<
" " << _upcast <<
" " << _downcast;
61 void InterrogateType::Derivation::
63 in >> _flags >> _base >> _upcast >> _downcast;
69 void InterrogateType::EnumValue::
70 output(ostream &out)
const {
80 void InterrogateType::EnumValue::
91 void InterrogateType::
93 InterrogateComponent::operator = (copy);
95 _scoped_name = copy._scoped_name;
96 _true_name = copy._true_name;
97 _comment = copy._comment;
98 _outer_class = copy._outer_class;
99 _atomic_token = copy._atomic_token;
100 _wrapped_type = copy._wrapped_type;
101 _array_size = copy._array_size;
102 _constructors = copy._constructors;
103 _destructor = copy._destructor;
104 _elements = copy._elements;
105 _methods = copy._methods;
106 _make_seqs = copy._make_seqs;
107 _casts = copy._casts;
108 _derivations = copy._derivations;
109 _enum_values = copy._enum_values;
110 _nested_types = copy._nested_types;
112 _cpptype = copy._cpptype;
113 _cppscope = copy._cppscope;
126 if (is_fully_defined() &&
127 (!other.is_fully_defined() || (other._flags & F_global) == 0)) {
129 _flags |= (other._flags & F_global);
133 int old_flags = (_flags & F_global);
146 out << _flags <<
" ";
149 out << _outer_class <<
" " 150 << (int)_atomic_token <<
" " 151 << _wrapped_type <<
" ";
154 out << _array_size <<
" ";
158 out << _destructor <<
" ";
183 _atomic_token = (AtomicToken)token;
209 _outer_class = remap.
map_from(_outer_class);
210 _wrapped_type = remap.
map_from(_wrapped_type);
212 Functions::iterator fi;
213 for (fi = _constructors.begin(); fi != _constructors.end(); ++fi) {
216 _destructor = remap.
map_from(_destructor);
218 Elements::iterator ei;
219 for (ei = _elements.begin(); ei != _elements.end(); ++ei) {
223 for (fi = _methods.begin(); fi != _methods.end(); ++fi) {
226 for (fi = _casts.begin(); fi != _casts.end(); ++fi) {
230 MakeSeqs::iterator si;
231 for (si = _make_seqs.begin(); si != _make_seqs.end(); ++si) {
235 Derivations::iterator di;
236 for (di = _derivations.begin(); di != _derivations.end(); ++di) {
237 (*di)._base = remap.
map_from((*di)._base);
238 (*di)._upcast = remap.
map_from((*di)._upcast);
239 (*di)._downcast = remap.
map_from((*di)._downcast);
243 for (ti = _nested_types.begin(); ti != _nested_types.end(); ++ti) {
void idf_input_vector(std::istream &in, std::vector< Element > &vec)
Reads the given vector from the input file, as previously written by output_string().
void remap_indices(const IndexRemapper &remap)
Remaps all internal index numbers according to the indicated map.
void output(std::ostream &out) const
Formats the InterrogateType data for output to a data file.
This class manages a mapping of integers to integers.
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.
An internal representation of a type.
void input(std::istream &in)
Reads the data file as previously formatted by output().
The base class for things that are part of the interrogate database.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
void merge_with(const InterrogateType &other)
Combines type with the other similar definition.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void idf_output_vector(std::ostream &out, const std::vector< Element > &vec)
Writes the indicated vector to the output file.
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...