00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "interrogateFunction.h"
00020 #include "indexRemapper.h"
00021 #include "interrogate_datafile.h"
00022 #include "interrogateDatabase.h"
00023
00024
00025
00026
00027
00028
00029 void InterrogateFunction::
00030 operator = (const InterrogateFunction ©) {
00031 InterrogateComponent::operator = (copy);
00032 _flags = copy._flags;
00033 _scoped_name = copy._scoped_name;
00034 _comment = copy._comment;
00035 _prototype = copy._prototype;
00036 _class = copy._class;
00037 _c_wrappers = copy._c_wrappers;
00038 _python_wrappers = copy._python_wrappers;
00039
00040 _instances = copy._instances;
00041 _expression = copy._expression;
00042 }
00043
00044
00045
00046
00047
00048
00049
00050 void InterrogateFunction::
00051 output(ostream &out) const {
00052 InterrogateComponent::output(out);
00053 out << _flags << " "
00054 << _class << " ";
00055 idf_output_string(out, _scoped_name);
00056 idf_output_vector(out, _c_wrappers);
00057 idf_output_vector(out, _python_wrappers);
00058 idf_output_string(out, _comment, '\n');
00059 idf_output_string(out, _prototype, '\n');
00060 }
00061
00062
00063
00064
00065
00066
00067
00068 void InterrogateFunction::
00069 input(istream &in) {
00070 InterrogateComponent::input(in);
00071 in >> _flags >> _class;
00072 idf_input_string(in, _scoped_name);
00073 idf_input_vector(in, _c_wrappers);
00074 idf_input_vector(in, _python_wrappers);
00075 idf_input_string(in, _comment);
00076
00077 if (InterrogateDatabase::get_file_minor_version() >= 2) {
00078 idf_input_string(in, _prototype);
00079 }
00080 }
00081
00082
00083
00084
00085
00086
00087
00088
00089 void InterrogateFunction::
00090 remap_indices(const IndexRemapper &remap) {
00091 _class = remap.map_from(_class);
00092 Wrappers::iterator wi;
00093 for (wi = _c_wrappers.begin(); wi != _c_wrappers.end(); ++wi) {
00094 (*wi) = remap.map_from(*wi);
00095 }
00096 for (wi = _python_wrappers.begin(); wi != _python_wrappers.end(); ++wi) {
00097 (*wi) = remap.map_from(*wi);
00098 }
00099 }