15 #include "interrogateType.h" 16 #include "indexRemapper.h" 17 #include "interrogate_datafile.h" 18 #include "interrogateDatabase.h" 33 _atomic_token = AT_not_atomic;
38 _cpptype = (CPPType *)NULL;
39 _cppscope = (CPPScope *)NULL;
57 void InterrogateType::Derivation::
58 output(ostream &out)
const {
59 out << _flags <<
" " << _base <<
" " << _upcast <<
" " << _downcast;
67 void InterrogateType::Derivation::
69 in >> _flags >> _base >> _upcast >> _downcast;
77 void InterrogateType::EnumValue::
78 output(ostream &out)
const {
79 idf_output_string(out, _name);
80 idf_output_string(out, _scoped_name);
81 idf_output_string(out, _comment,
'\n');
90 void InterrogateType::EnumValue::
92 idf_input_string(in, _name);
93 idf_input_string(in, _scoped_name);
95 idf_input_string(in, _comment);
105 void InterrogateType::
107 InterrogateComponent::operator = (copy);
108 _flags = copy._flags;
109 _scoped_name = copy._scoped_name;
110 _true_name = copy._true_name;
111 _comment = copy._comment;
112 _outer_class = copy._outer_class;
113 _atomic_token = copy._atomic_token;
114 _wrapped_type = copy._wrapped_type;
115 _array_size = copy._array_size;
116 _constructors = copy._constructors;
117 _destructor = copy._destructor;
118 _elements = copy._elements;
119 _methods = copy._methods;
120 _make_seqs = copy._make_seqs;
121 _casts = copy._casts;
122 _derivations = copy._derivations;
123 _enum_values = copy._enum_values;
124 _nested_types = copy._nested_types;
126 _cpptype = copy._cpptype;
127 _cppscope = copy._cppscope;
142 if (is_fully_defined()) {
144 _flags |= (other._flags & F_global);
148 int old_flags = (_flags & F_global);
164 out << _flags <<
" ";
165 idf_output_string(out, _scoped_name);
166 idf_output_string(out, _true_name);
167 out << _outer_class <<
" " 168 << (int)_atomic_token <<
" " 169 << _wrapped_type <<
" ";
172 out << _array_size <<
" ";
175 idf_output_vector(out, _constructors);
176 out << _destructor <<
" ";
177 idf_output_vector(out, _elements);
178 idf_output_vector(out, _methods);
179 idf_output_vector(out, _make_seqs);
180 idf_output_vector(out, _casts);
181 idf_output_vector(out, _derivations);
182 idf_output_vector(out, _enum_values);
183 idf_output_vector(out, _nested_types);
184 idf_output_string(out, _comment,
'\n');
198 idf_input_string(in, _scoped_name);
199 idf_input_string(in, _true_name);
204 _atomic_token = (AtomicToken)token;
211 idf_input_vector(in, _constructors);
214 idf_input_vector(in, _elements);
215 idf_input_vector(in, _methods);
216 idf_input_vector(in, _make_seqs);
217 idf_input_vector(in, _casts);
218 idf_input_vector(in, _derivations);
219 idf_input_vector(in, _enum_values);
220 idf_input_vector(in, _nested_types);
221 idf_input_string(in, _comment);
233 _outer_class = remap.
map_from(_outer_class);
234 _wrapped_type = remap.
map_from(_wrapped_type);
236 Functions::iterator fi;
237 for (fi = _constructors.begin(); fi != _constructors.end(); ++fi) {
240 _destructor = remap.
map_from(_destructor);
242 Elements::iterator ei;
243 for (ei = _elements.begin(); ei != _elements.end(); ++ei) {
247 for (fi = _methods.begin(); fi != _methods.end(); ++fi) {
250 for (fi = _casts.begin(); fi != _casts.end(); ++fi) {
254 MakeSeqs::iterator si;
255 for (si = _make_seqs.begin(); si != _make_seqs.end(); ++si) {
259 Derivations::iterator di;
260 for (di = _derivations.begin(); di != _derivations.end(); ++di) {
261 (*di)._base = remap.
map_from((*di)._base);
262 (*di)._upcast = remap.
map_from((*di)._upcast);
263 (*di)._downcast = remap.
map_from((*di)._downcast);
267 for (ti = _nested_types.begin(); ti != _nested_types.end(); ++ti) {
277 EXPCL_DTOOLCONFIG RunTimeTypeDictionary & GetRunTimeDictionary()
279 static RunTimeTypeDictionary dict;
286 EXPCL_DTOOLCONFIG RunTimeTypeList & GetRunTimeTypeList()
288 static RunTimeTypeList list;
void remap_indices(const IndexRemapper &remap)
Remaps all internal index numbers according to the indicated map.
static int get_file_minor_version()
Returns the minor version number of the interrogate database file currently being read...
This class manages a mapping of integers to integers.
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 input(istream &in)
Reads the data file as previously formatted by output().
An internal representation of a type.
The base class for things that are part of the interrogate database.
void output(ostream &out) const
Formats the InterrogateType data for output to a data file.
void merge_with(const InterrogateType &other)
Combines type with the other similar definition.
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...