Go to the documentation of this file.
38 ofs <<
"/*! \\file auto_workspace.h\n"
39 <<
" \\brief Defines the enum type that acts as a\n"
40 <<
" handle for workspace variables groups.\n\n"
42 <<
" Also defined here is a special pointer class that can hold\n"
43 <<
" a pointer to any workspace variable.\n\n"
45 <<
" This file was generated automatically by make_auto_workspace_h.cc.\n"
47 <<
" <b>DO NOT EDIT!</b>\n\n"
51 << __TIME__ <<
" */\n\n";
53 ofs <<
"#ifndef auto_workspace_h\n"
54 <<
"#define auto_workspace_h\n\n";
56 ofs <<
"#include <iostream>\n"
57 <<
"#include \"matpackII.h\"\n"
58 <<
"#include \"m_general.h\"\n"
59 <<
"#include \"supergeneric.h\"\n"
60 <<
"#include \"ppath.h\"\n"
61 <<
"#include \"gas_abs_lookup.h\"\n\n"
62 <<
"#include \"optproperties.h\"\n\n"
63 <<
"#include \"gridded_fields.h\"\n\n"
64 <<
"#include \"jacobian.h\"\n\n"
65 <<
"#include \"agenda_class.h\"\n\n"
66 <<
"#include \"mc_interp.h\"\n\n"
67 <<
"#include \"mc_antenna.h\"\n\n";
72 ofs <<
"class WorkspaceMemoryHandler {\n"
74 <<
" // List of function pointers to allocation routines\n"
76 <<
" // List of function pointers to deallocation routines\n"
78 <<
" // List of function pointers to duplication routines\n"
80 <<
" // Allocation and deallocation routines for workspace groups\n";
85 <<
" static void deallocate_wsvg_" <<
wsv_group_names[i] <<
"(void *vp)\n"
87 <<
" static void *duplicate_wsvg_" <<
wsv_group_names[i] <<
"(void *vp)\n"
93 <<
" /** Default constructor. Initialize allocation and "
95 <<
" function pointer lists.\n"
97 <<
" WorkspaceMemoryHandler ()\n"
102 ofs <<
" allocfp[" << i <<
"] = allocate_wsvg_"
104 <<
" deallocfp[" << i <<
"] = deallocate_wsvg_"
106 <<
" duplicatefp[" << i <<
"] = duplicate_wsvg_"
111 <<
" /** Getaway function to call the allocation function for the\n"
112 <<
" WSV group with the given Index.\n"
114 <<
" void *allocate (Index wsvg)\n"
116 <<
" return allocfp[wsvg]();\n"
118 <<
" /** Getaway function to call the deallocation function for the\n"
119 <<
" WSV group with the given Index.\n"
121 <<
" void deallocate (Index wsvg, void *vp)\n"
123 <<
" deallocfp[wsvg](vp);\n"
125 <<
" /** Getaway function to call the duplication function for the\n"
126 <<
" WSV group with the given Index.\n"
128 <<
" void *duplicate (Index wsvg, void *vp)\n"
130 <<
" return duplicatefp[wsvg](vp);\n"
138 ofs <<
"#endif // auto_workspace_h\n";
140 catch (runtime_error x)
142 cout <<
"Something went wrong. Message text:\n";
143 cout << x.what() <<
'\n';
This file contains the definition of Array.
This can be used to make arrays out of anything.
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.
This file contains basic functions to handle ASCII files.
INDEX Index
The type to use for all integer numbers and indices.
Index nelem() const
Number of elements.
The global header file for ARTS.