ARTS 2.5.11 (git: 6827797f) File Reference

This is a little C++ program that generates the file auto_md.h from the workspace methods data md_data. More...

#include "agenda_record.h"
#include "array.h"
#include "arts.h"
#include "debug.h"
#include "file.h"
#include "global_data.h"
#include "methods.h"
#include "workspace.h"
#include "workspace_global_data.h"
#include "workspace_ng.h"
#include <stdexcept>

Go to the source code of this file.


void align (ofstream &ofs, bool &is_first_parameter, const String &indent)
void write_method_header_documentation (ofstream &ofs, const MdRecord &mdd)
 Write method header documentation.
void write_method_header (ofstream &ofs, const MdRecord &mdd)
 Write a method header.
bool md_sanity_checks (const Array< MdRecord > &md_data)
int main ()

Detailed Description

This is a little C++ program that generates the file auto_md.h from the workspace methods data md_data.

The file auto_md.h declares the enum type MdHandle that is used to access the method data, so it has to be made sure that the two are allways consistent.

A second file is produced: This contains the ‘get-away’ functions that provided the interface between the engine and the workspace methods. The get-functions all have the same arguments:

void get_away_example_g(Workspace& ws,
const MRecord& mr);
Method runtime data.
Definition: agenda_class.h:125
Workspace class.
Definition: workspace_ng.h:36

Their names all have the extension _g

Pointers to the get-away functions are stored in the array ‘getaway’.

Each get-away function simply contains a function call to the matching workspace method. The parameters are arranged similar to the follwing example:

void SomeMethod(owsv1,iwsv1,iwsv2,iwsv3,c1,c2,c3,...)

First come the output workspace variables, then the input workspace variables, and then the control parameters. There can be an arbitrary number of parameters of each type, but the most usual case is to have only one output workspace variable.

The same variable may be both in the list of input and in the list of output workspace variables. This case makes good sense, actually, if you think for example of a method that adds an offset to the absorption coefficients. IN THAT CASE THE VARIABLE IS ADDED TO THE LIST ONLY ONCE, namely among the OUTPUT variables.

For generic methods the names of the actual workspace variables are also passed on to the method function.

Stefan Buehler

Definition in file

Function Documentation

◆ align()

void align ( ofstream &  ofs,
bool &  is_first_parameter,
const String indent 

Definition at line 64 of file

Referenced by write_method_header(), and write_method_header_documentation().

◆ main()

◆ md_sanity_checks()

bool md_sanity_checks ( const Array< MdRecord > &  md_data)

Definition at line 506 of file

References check_newline().

Referenced by main().

◆ write_method_header()

◆ write_method_header_documentation()