ARTS
2.2.66
|
All information for one workspace method. More...
#include <methods.h>
Public Member Functions | |
MdRecord () | |
Default constructor. More... | |
MdRecord (const char name[], const char description[], const MakeArray< String > &authors, const MakeArray< String > &output, const MakeArray< String > &gout, const MakeArray< String > &gouttype, const MakeArray< String > &goutdesc, const MakeArray< String > &input, const MakeArray< String > &gin, const MakeArray< String > &gintype, const MakeArray< String > &gindefault, const MakeArray< String > &gindesc, bool set_method=false, bool agenda_method=false, bool uses_templates=false, bool pass_workspace=false, bool pass_wsv_names=false) | |
Initializing constructor for MdRecord. More... | |
const String & | Name () const |
const String & | Description () const |
const ArrayOfString & | Authors () const |
const ArrayOfIndex & | Out () const |
const ArrayOfString & | GOut () const |
const ArrayOfIndex & | GOutType () const |
const ArrayOfArrayOfIndex & | GOutSpecType () const |
const Array< String > & | GOutDescription () const |
const ArrayOfIndex & | In () const |
const ArrayOfString & | GIn () const |
const ArrayOfIndex & | GInType () const |
const ArrayOfArrayOfIndex & | GInSpecType () const |
const Array< String > & | GInDefault () const |
const Array< String > & | GInDescription () const |
const ArrayOfIndex & | InOnly () const |
const ArrayOfIndex & | InOut () const |
const ArrayOfIndex & | OutOnly () const |
bool | SetMethod () const |
bool | AgendaMethod () const |
bool | Supergeneric () const |
bool | UsesTemplates () const |
bool | PassWorkspace () const |
bool | PassWsvNames () const |
const String & | ActualGroups () const |
void | SetPassWorkspace () |
void | subst_any_with_group (Index g) |
Expand supergeneric record for given group. More... | |
void | subst_any_with_specific_group (Index g) |
Expand supergeneric record for given Index in GOutSpecType and GInSpecType. More... | |
ostream & | PrintTemplate (ostream &os, bool show_description=true) const |
Print method template for the control file. More... | |
MdRecord & | operator= (const MdRecord &m) |
To override the default assignment operator. More... | |
Private Attributes | |
String | mname |
The name of this method. More... | |
String | mdescription |
A text string describing this method. More... | |
ArrayOfString | mauthors |
Author(s) of this method. More... | |
ArrayOfIndex | moutput |
Workspace Output. More... | |
ArrayOfString | mgout |
Generic Workspace Output Names. More... | |
ArrayOfIndex | mgouttype |
Generic Workspace Output Type. More... | |
ArrayOfArrayOfIndex | mgoutspectype |
Generic Workspace Output Types (Contains the valid types if the method. More... | |
ArrayOfString | mgoutdesc |
Generic Workspace Output Description. More... | |
ArrayOfIndex | minput |
Workspace Input. More... | |
ArrayOfString | mgin |
Generic Workspace Input Names. More... | |
ArrayOfIndex | mgintype |
Generic Workspace Input. More... | |
ArrayOfArrayOfIndex | mginspectype |
Generic Workspace Input Types (Contains the valid types if the method. More... | |
ArrayOfString | mgindefault |
Generic Workspace Input Defaults. More... | |
ArrayOfString | mgindesc |
Generic Workspace Input Description. More... | |
ArrayOfIndex | minonly |
Indexes of Input-only variables. More... | |
ArrayOfIndex | moutonly |
Indexes of Output-only variables. More... | |
ArrayOfIndex | minout |
Indexes of Input-Output variables. More... | |
bool | mset_method |
Flag, whether this is a set method. More... | |
bool | magenda_method |
Flag, whether this is an agenda method. More... | |
bool | msupergeneric |
Flag, whether this method is supergeneric. More... | |
bool | muses_templates |
Flag, whether method implementation relies on templates. More... | |
bool | mpass_workspace |
Flag, whether a workspace reference should be passed to the WSM. More... | |
bool | mpass_wsv_names |
Flag, whether WSV names should be passed to the WSM. More... | |
String | mactual_groups |
The actual groups of a supergeneric method. More... | |
Friends | |
void | subst_any_with_group (MdRecord &mdd, Index g) |
|
inline |
MdRecord::MdRecord | ( | const char | name[], |
const char | description[], | ||
const MakeArray< String > & | authors, | ||
const MakeArray< String > & | output, | ||
const MakeArray< String > & | gout, | ||
const MakeArray< String > & | gouttype, | ||
const MakeArray< String > & | goutdesc, | ||
const MakeArray< String > & | input, | ||
const MakeArray< String > & | gin, | ||
const MakeArray< String > & | gintype, | ||
const MakeArray< String > & | gindefault, | ||
const MakeArray< String > & | gindesc, | ||
bool | set_method = false , |
||
bool | agenda_method = false , |
||
bool | uses_templates = false , |
||
bool | pass_workspace = false , |
||
bool | pass_wsv_names = false |
||
) |
Initializing constructor for MdRecord.
This is the only non-trivial constructor, which sets all the fields. The flag for supergenericity is not set directly, but inferred from the presence of Any_ in the generic input or output list.
Definition at line 65 of file methods_aux.cc.
References get_wsv_group_id(), get_wsv_group_ids(), get_wsv_id(), mgin, mgindefault, mginspectype, mgintype, mgout, mgoutspectype, mgouttype, minonly, minout, minput, mname, moutonly, moutput, msupergeneric, muses_templates, and Array< base >::nelem().
|
inline |
Definition at line 112 of file methods.h.
References mactual_groups.
Referenced by define_md_map(), and main().
|
inline |
Definition at line 107 of file methods.h.
References magenda_method.
Referenced by main(), ArtsParser::parse_method(), write_method_header(), and write_method_header_documentation().
|
inline |
Definition at line 91 of file methods.h.
References mauthors.
Referenced by operator<<(), and write_method_header_documentation().
|
inline |
Definition at line 90 of file methods.h.
References mdescription.
Referenced by operator<<(), and write_method_header_documentation().
|
inline |
Definition at line 98 of file methods.h.
References mgin.
Referenced by operator<<(), ArtsParser::parse_generic_input(), ArtsParser::parse_method_args(), PrintTemplate(), ArtsParser::set_gin_to_default(), write_method_header(), and write_method_header_documentation().
Definition at line 101 of file methods.h.
References mgindefault.
Referenced by operator<<(), ArtsParser::parse_method_args(), ArtsParser::set_gin_to_default(), and write_method_header_documentation().
|
inline |
Definition at line 100 of file methods.h.
References mginspectype.
Referenced by expand_md_data_raw_to_md_data(), operator<<(), option_input(), and ArtsParser::parse_generic_input().
|
inline |
Definition at line 99 of file methods.h.
References mgintype.
Referenced by main(), operator<<(), option_input(), option_workspacevariables(), ArtsParser::parse_generic_input(), MRecord::print(), PrintTemplate(), ArtsParser::set_gin_to_default(), write_method_header(), and write_method_header_documentation().
|
inline |
Definition at line 93 of file methods.h.
References mgout.
Referenced by operator<<(), ArtsParser::parse_generic_output(), ArtsParser::parse_method_args(), write_method_header(), and write_method_header_documentation().
|
inline |
Definition at line 95 of file methods.h.
References mgoutspectype.
Referenced by expand_md_data_raw_to_md_data(), operator<<(), option_methods(), and ArtsParser::parse_generic_output().
|
inline |
Definition at line 94 of file methods.h.
References mgouttype.
Referenced by main(), operator<<(), option_methods(), ArtsParser::parse_generic_output(), MRecord::print(), PrintTemplate(), write_method_header(), and write_method_header_documentation().
|
inline |
Definition at line 97 of file methods.h.
References minput.
Referenced by main(), operator<<(), option_input(), option_workspacevariables(), write_method_header(), and write_method_header_documentation().
|
inline |
Definition at line 103 of file methods.h.
References minonly.
Referenced by main(), operator<<(), ArtsParser::parse_method_args(), ArtsParser::parse_specific_input(), write_method_header(), and write_method_header_documentation().
|
inline |
|
inline |
Definition at line 89 of file methods.h.
References mname.
Referenced by define_md_map(), Agenda::execute(), main(), operator<<(), option_input(), option_methods(), option_workspacevariables(), ArtsParser::parse_generic_input(), ArtsParser::parse_generic_output(), ArtsParser::parse_method(), ArtsParser::parse_method_args(), ArtsParser::parse_specific_output(), MRecord::print(), PrintTemplate(), ArtsParser::read_name_or_value(), ArtsParser::set_gin_to_default(), write_method_header(), and write_method_header_documentation().
To override the default assignment operator.
MdRecords cannot be assigned!
Definition at line 134 of file methods.h.
References arts_exit(), and subst_any_with_group().
|
inline |
Definition at line 92 of file methods.h.
References moutput.
Referenced by main(), operator<<(), option_methods(), ArtsParser::parse_method_args(), ArtsParser::parse_specific_input(), ArtsParser::parse_specific_output(), write_method_header(), and write_method_header_documentation().
|
inline |
|
inline |
Definition at line 110 of file methods.h.
References mpass_workspace.
Referenced by main(), write_method_header(), and write_method_header_documentation().
|
inline |
Definition at line 111 of file methods.h.
References mpass_wsv_names.
Referenced by main(), write_method_header(), and write_method_header_documentation().
ostream & MdRecord::PrintTemplate | ( | ostream & | os, |
bool | show_description = true |
||
) | const |
Print method template for the control file.
This prints the method data exactly in the same way how it can be included in the control file. The description string is also printed as a comment, but this can be turned off by setting show_comment to false.
os | Output stream |
show_description | Should the description string also be printed? |
Definition at line 588 of file methods_aux.cc.
References GIn(), GInType(), GOutType(), Name(), Array< base >::nelem(), and global_data::wsv_group_names.
Referenced by SetPassWorkspace().
|
inline |
Definition at line 106 of file methods.h.
References mset_method.
Referenced by Agenda::execute(), main(), and ArtsParser::parse_generic_input().
|
inline |
Definition at line 113 of file methods.h.
References mpass_workspace, PrintTemplate(), subst_any_with_group(), and subst_any_with_specific_group().
void MdRecord::subst_any_with_group | ( | Index | g | ) |
Expand supergeneric record for given group.
This function will substitute any occurance of Any_ in the GOutType and GInType list of MdRecord by group g.
It also adds the group to the name like this: Copy becomes Copy_sg_Vector, Copy_sg_Matrix, etc..
g | The group for which to expand. |
Definition at line 300 of file methods_aux.cc.
References get_wsv_group_id(), mactual_groups, mgintype, mgouttype, Array< base >::nelem(), Supergeneric(), and global_data::wsv_group_names.
Referenced by expand_md_data_raw_to_md_data(), operator=(), and SetPassWorkspace().
void MdRecord::subst_any_with_specific_group | ( | Index | g | ) |
Expand supergeneric record for given Index in GOutSpecType and GInSpecType.
This function will substitute any occurance of Any_ in the GOutType and GInType list of MdRecord by group GOutSpecType[g] and GInSpecType[g].
It also adds the group to the name like this: Copy becomes Copy_sg_Vector, Copy_sg_Matrix, etc..
g | The SpecType index for which to expand. |
Definition at line 345 of file methods_aux.cc.
References get_wsv_group_id(), mactual_groups, mginspectype, mgintype, mgoutspectype, mgouttype, Array< base >::nelem(), Supergeneric(), and global_data::wsv_group_names.
Referenced by expand_md_data_raw_to_md_data(), and SetPassWorkspace().
|
inline |
Definition at line 108 of file methods.h.
References msupergeneric.
Referenced by define_md_map(), expand_md_data_raw_to_md_data(), main(), ArtsParser::parse_method_args(), subst_any_with_group(), subst_any_with_specific_group(), write_method_header(), and write_method_header_documentation().
|
inline |
Definition at line 109 of file methods.h.
References muses_templates.
Referenced by main(), and write_method_header().
|
private |
The actual groups of a supergeneric method.
This holds the actual groups after expansion of a supergeneric method.
Definition at line 248 of file methods.h.
Referenced by ActualGroups(), subst_any_with_group(), and subst_any_with_specific_group().
|
private |
Flag, whether this is an agenda method.
Agenda methods expect other method definitions inside their body in the controlfile.
Definition at line 213 of file methods.h.
Referenced by AgendaMethod().
|
private |
|
private |
A text string describing this method.
Definition at line 152 of file methods.h.
Referenced by Description().
|
private |
Generic Workspace Input Names.
Definition at line 177 of file methods.h.
Referenced by GIn(), and MdRecord().
|
private |
Generic Workspace Input Defaults.
Definition at line 187 of file methods.h.
Referenced by GInDefault(), and MdRecord().
|
private |
Generic Workspace Input Description.
Definition at line 190 of file methods.h.
Referenced by GInDescription().
|
private |
Generic Workspace Input Types (Contains the valid types if the method.
Definition at line 184 of file methods.h.
Referenced by GInSpecType(), MdRecord(), and subst_any_with_specific_group().
|
private |
Generic Workspace Input.
Definition at line 180 of file methods.h.
Referenced by GInType(), MdRecord(), subst_any_with_group(), and subst_any_with_specific_group().
|
private |
Generic Workspace Output Names.
Definition at line 161 of file methods.h.
Referenced by GOut(), and MdRecord().
|
private |
Generic Workspace Output Description.
Definition at line 171 of file methods.h.
Referenced by GOutDescription().
|
private |
Generic Workspace Output Types (Contains the valid types if the method.
Definition at line 168 of file methods.h.
Referenced by GOutSpecType(), MdRecord(), and subst_any_with_specific_group().
|
private |
Generic Workspace Output Type.
Definition at line 164 of file methods.h.
Referenced by GOutType(), MdRecord(), subst_any_with_group(), and subst_any_with_specific_group().
|
private |
Indexes of Input-only variables.
Definition at line 193 of file methods.h.
Referenced by InOnly(), and MdRecord().
|
private |
Indexes of Input-Output variables.
Definition at line 199 of file methods.h.
Referenced by InOut(), and MdRecord().
|
private |
|
private |
The name of this method.
Definition at line 149 of file methods.h.
Referenced by MdRecord(), and Name().
|
private |
Indexes of Output-only variables.
Definition at line 196 of file methods.h.
Referenced by MdRecord(), and OutOnly().
|
private |
|
private |
Flag, whether a workspace reference should be passed to the WSM.
Some WSMs (like Delete) need direct access to the workspace object. If this flag is set to true, the gateway function will take care of that.
Definition at line 234 of file methods.h.
Referenced by PassWorkspace(), and SetPassWorkspace().
|
private |
Flag, whether WSV names should be passed to the WSM.
Some WSMs (like ReadXML, WriteXML) need to know the names of the WSVs that have been passed to them. If this flag is set to true, the gateway function will take care of that.
Definition at line 242 of file methods.h.
Referenced by PassWsvNames().
|
private |
Flag, whether this is a set method.
Set methods have exactly one generic input. Unlike other inputs these are not stored in a workspace variable.
Definition at line 206 of file methods.h.
Referenced by SetMethod().
|
private |
Flag, whether this method is supergeneric.
This flag is set automatically if the gouttype or gintype contains Any_.
Definition at line 220 of file methods.h.
Referenced by MdRecord(), and Supergeneric().
|
private |
Flag, whether method implementation relies on templates.
If we want to implement a supergeneric method by a template function, we must not generate explicit method headers in auto_md.h.
Definition at line 227 of file methods.h.
Referenced by MdRecord(), and UsesTemplates().