Go to the documentation of this file.
39 ofs <<
"/*! \\file auto_wsv_groups.h\n"
40 <<
" \\brief Defines the enum type that acts as a\n"
41 <<
" handle for workspace variables groups.\n\n"
43 <<
" Also defined here is a special pointer class that can hold\n"
44 <<
" a pointer to any workspace variable.\n\n"
46 <<
" This file was generated automatically by make_auto_wsv_groups_h.cc.\n"
48 <<
" <b>DO NOT EDIT!</b>\n\n"
52 << __TIME__ <<
" */\n\n";
54 ofs <<
"#ifndef auto_wsv_groups_h\n"
55 <<
"#define auto_wsv_groups_h\n\n";
57 ofs <<
"#include \"los.h\"\n"
58 <<
"#include \"absorption.h\"\n\n";
60 ofs <<
"/*! This is only used for a consistency check. You can get the\n"
61 <<
" number of groups from wsv_group_names.nelem(). */\n"
62 <<
"#define N_WSV_GROUPS " << n_wsv_groups <<
"\n\n";
64 ofs <<
"/*! The enum type that identifies wsv groups.\n"
65 <<
" This is used to group workspace variables of the same type\n"
66 <<
" together, so that generic methods can operate on any of them. */\n";
68 ofs <<
"enum WsvGroup{\n";
70 for (
Index i=0; i<n_wsv_groups; ++i)
79 ofs <<
"/*! Base class for the different Wsv pointers.\n"
80 <<
" This contains a virtual function for the\n"
81 <<
" conversion operator for each group.\n\n"
82 <<
" \\author Stefan Buehler */\n";
84 ofs <<
"class WsvP {\n"
86 for (
Index i=0; i<n_wsv_groups; ++i)
88 ofs <<
" virtual operator "
90 <<
"*(){safety();return NULL;};\n";
93 ofs <<
"\nvirtual ~WsvP(){};\n";
95 ofs <<
"\nprivate:\n";
97 ofs <<
"/*! Safety check. This is called by all the virtual conversion\n"
98 <<
" operators. It just stops the program with an error message. This\n"
99 <<
" should never happen, because conversion should only be attempted\n"
100 <<
" to the correct type, for which an overloaded conversion operator\n"
103 ofs <<
" void safety() {\n"
104 <<
" cerr << \"Internal error: Tried to convert a WsvP \"\n"
105 <<
" << \"pointer to the wrong type.\\n\";\n"
112 ofs <<
"#endif // auto_wsv_groups_h\n";
114 catch (runtime_error x)
116 cout <<
"Something went wrong. Message text:\n";
117 cout << x.what() <<
'\n';
This file contains the definition of Array.
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.
INDEX Index
The type to use for all integer numbers and indices.
This file contains basic functions to handle ASCII and binary (HDF) data files.
Index nelem() const
Number of elements.
The global header file for ARTS.