Go to the documentation of this file.
27 void align(ofstream& ofs,
bool& is_first_parameter,
const String& indent)
30 if (is_first_parameter)
31 is_first_parameter =
false;
66 cout <<
"The file wsv.h is not up to date!\n";
67 cout <<
"(N_WSV = " <<
N_WSV <<
", n_wsv = " << n_wsv <<
")\n";
68 cout <<
"Make wsv.h first. Check if Makefile is correct.\n";
77 ofs <<
"// This file was generated automatically by make_auto_md_cc.cc.\n";
78 ofs <<
"// DO NOT EDIT !\n";
79 ofs <<
"// Generated: "
81 << __TIME__ <<
"\n\n";
83 ofs <<
"#include \"arts.h\"\n"
84 <<
"#include \"make_array.h\"\n"
85 <<
"#include \"auto_md.h\"\n"
86 <<
"#include \"auto_wsv_groups.h\"\n"
87 <<
"#include \"wsv_aux.h\"\n"
91 ofs <<
"// The workspace variable pointers:\n"
92 <<
"extern const Array<WsvP*> wsv_pointers;\n\n"
94 <<
"// Other wsv data:\n"
95 <<
"extern const Array<WsvRecord> wsv_data;\n\n";
100 for (
Index i=0; i<n_md; ++i)
104 bool is_first_parameter =
true;
121 for (ArrayOfIndex::const_iterator j=vo.begin(); j<vo.end(); ++j)
122 for (ArrayOfIndex::iterator k=vi.begin(); k<vi.end(); ++k)
153 ||
md_data[i].Keywords().nelem())
158 ofs <<
"void " <<
md_data[i].Name()
159 <<
"_g(WorkSpace&" << ws
160 <<
", const MRecord&" << mr <<
")\n"
170 <<
" *GO" << j <<
" = *wsv_pointers[mr.Output()[" << j
178 <<
" *GI" << j <<
" = *wsv_pointers[mr.Input()[" << j
182 ofs <<
" " <<
md_data[i].Name() <<
"(";
188 align(ofs,is_first_parameter,indent);
190 ofs <<
"ws." <<
wsv_data[vo[j]].Name();
197 align(ofs,is_first_parameter,indent);
206 align(ofs,is_first_parameter,indent);
208 ofs <<
"wsv_data[mr.Output()["
217 align(ofs,is_first_parameter,indent);
219 ofs <<
"ws." <<
wsv_data[vi[j]].Name();
226 align(ofs,is_first_parameter,indent);
235 align(ofs,is_first_parameter,indent);
237 ofs <<
"wsv_data[mr.Input()["
248 for (
Index j=0; j!=n_mr; ++j)
251 align(ofs,is_first_parameter,indent);
253 ofs <<
"mr.Values()[" << j <<
"]";
264 bool is_first_parameter =
true;
266 ofs <<
"// The array holding the pointers to the getaway functions.\n"
267 <<
"void (*getaways[])(WorkSpace&, const MRecord&)\n"
269 for (
Index i=0; i<n_md; ++i)
272 align(ofs,is_first_parameter,indent);
274 ofs <<
md_data[i].Name() <<
"_g";
282 cout <<
"Something went wrong. Message text:\n";
283 cout << x.what() <<
'\n';
void define_wsv_data()
Define the lookup data for the workspace variables.
const Array< WsvRecord > wsv_data
void align(ofstream &ofs, bool &is_first_parameter, const String &indent)
This file contains the definition of Array.
This can be used to make arrays out of anything.
void define_md_data()
Define the lookup data for the workspace methods.
The implementation for String, the ARTS string class.
ArrayOfString wsv_group_names
void define_wsv_group_names()
Define the array of workspace variable group names.
void open_output_file(ofstream &file, const String &name)
Open a file for writing.
Array< MdRecord > md_data
The lookup information for the workspace methods.
INDEX Index
The type to use for all integer numbers and indices.
my_basic_string< char > String
The String type for ARTS.
This file contains basic functions to handle ASCII and binary (HDF) data files.
Index nelem() const
Number of elements.
Declaration of the class MdRecord.
Auxiliary header stuff related to workspace variable groups.
Declares the enum type that acts as a handle for workspace variables. Also declares the workspace its...
The global header file for ARTS.