39 ofs <<
"/*! \\file auto_workspace.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_workspace_h.cc.\n" 48 <<
" <b>DO NOT EDIT!</b>\n\n" 52 << __TIME__ <<
" */\n\n";
54 ofs <<
"#ifndef auto_workspace_h\n" 55 <<
"#define auto_workspace_h\n\n";
57 ofs <<
"#include <iostream>\n" 58 <<
"#include \"matpackII.h\"\n" 59 <<
"#include \"m_general.h\"\n" 60 <<
"#include \"supergeneric.h\"\n" 61 <<
"#include \"ppath.h\"\n" 62 <<
"#include \"gas_abs_lookup.h\"\n" 63 <<
"#include \"optproperties.h\"\n" 64 <<
"#include \"gridded_fields.h\"\n" 65 <<
"#include \"jacobian.h\"\n" 66 <<
"#include \"agenda_class.h\"\n" 67 <<
"#include \"mc_interp.h\"\n" 68 <<
"#include \"mc_antenna.h\"\n" 69 <<
"#include \"cia.h\"\n" 70 <<
"#include \"linemixingrecord.h\"\n" 76 ofs <<
"class WorkspaceMemoryHandler {\n" 78 <<
" // List of function pointers to allocation routines\n" 80 <<
" // List of function pointers to deallocation routines\n" 82 <<
" // List of function pointers to duplication routines\n" 84 <<
" // Allocation and deallocation routines for workspace groups\n";
89 <<
" static void deallocate_wsvg_" <<
wsv_group_names[i] <<
"(void *vp)\n" 91 <<
" static void *duplicate_wsvg_" <<
wsv_group_names[i] <<
"(void *vp)\n" 97 <<
" /** Default constructor. Initialize allocation and " 99 <<
" function pointer lists.\n" 101 <<
" WorkspaceMemoryHandler ()\n" 106 ofs <<
" allocfp[" << i <<
"] = allocate_wsvg_" 108 <<
" deallocfp[" << i <<
"] = deallocate_wsvg_" 110 <<
" duplicatefp[" << i <<
"] = duplicate_wsvg_" 115 <<
" /** Getaway function to call the allocation function for the\n" 116 <<
" WSV group with the given Index.\n" 118 <<
" void *allocate (Index wsvg)\n" 120 <<
" return allocfp[wsvg]();\n" 122 <<
" /** Getaway function to call the deallocation function for the\n" 123 <<
" WSV group with the given Index.\n" 125 <<
" void deallocate (Index wsvg, void *vp)\n" 127 <<
" deallocfp[wsvg](vp);\n" 129 <<
" /** Getaway function to call the duplication function for the\n" 130 <<
" WSV group with the given Index.\n" 132 <<
" void *duplicate (Index wsvg, void *vp)\n" 134 <<
" return duplicatefp[wsvg](vp);\n" 142 ofs <<
"#endif // auto_workspace_h\n";
144 catch (runtime_error x)
146 cout <<
"Something went wrong. Message text:\n";
147 cout << x.what() <<
'\n';
INDEX Index
The type to use for all integer numbers and indices.
Index nelem() const
Number of elements.
This file contains basic functions to handle ASCII files.
This file contains the definition of Array.
The global header file for ARTS.
void open_output_file(ofstream &file, const String &name)
Open a file for writing.
void define_wsv_group_names()
Define the array of workspace variable group names.
const ArrayOfString wsv_group_names
The names associated with Wsv groups as Strings.