#include <methods.h>
Public Member Functions | |
MdRecord () | |
Default constructor. | |
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 suppress_header=false, bool pass_workspace=false, bool pass_wsv_names=false) | |
Initializing constructor for MdRecord. | |
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 |
bool | SetMethod () const |
bool | AgendaMethod () const |
bool | Supergeneric () const |
bool | SuppressHeader () 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. | |
void | subst_any_with_specific_group (Index g) |
Expand supergeneric record for given Index in GOutSpecType and GInSpecType. | |
ostream & | PrintTemplate (ostream &os, bool show_description=true) const |
Print method template for the control file. | |
MdRecord & | operator= (const MdRecord &m) |
To override the default assignment operator. | |
Private Attributes | |
String | mname |
The name of this method. | |
String | mdescription |
A text string describing this method. | |
ArrayOfString | mauthors |
Author(s) of this method. | |
ArrayOfIndex | moutput |
Workspace Output. | |
ArrayOfString | mgout |
Generic Workspace Output Names. | |
ArrayOfIndex | mgouttype |
Generic Workspace Output Type. | |
ArrayOfArrayOfIndex | mgoutspectype |
Generic Workspace Output Types (Contains the valid types if the method. | |
ArrayOfString | mgoutdesc |
Generic Workspace Output Description. | |
ArrayOfIndex | minput |
Workspace Input. | |
ArrayOfString | mgin |
Generic Workspace Input Names. | |
ArrayOfIndex | mgintype |
Generic Workspace Input. | |
ArrayOfArrayOfIndex | mginspectype |
Generic Workspace Input Types (Contains the valid types if the method. | |
ArrayOfString | mgindefault |
Generic Workspace Input Defaults. | |
ArrayOfString | mgindesc |
Generic Workspace Input Description. | |
ArrayOfIndex | minonly |
Indexes of Input-only variables. | |
ArrayOfIndex | minout |
Indexes of Input-Output variables. | |
bool | mset_method |
Flag, whether this is a set method. | |
bool | magenda_method |
Flag, whether this is an agenda method. | |
bool | msupergeneric |
Flag, whether this method is supergeneric. | |
bool | msuppress_header |
Flag, whether method header should be suppressed. | |
bool | mpass_workspace |
Flag, whether a workspace reference should be passed to the WSM. | |
bool | mpass_wsv_names |
Flag, whether WSV names should be passed to the WSM. | |
String | mactual_groups |
The actual groups of a supergeneric method. | |
Friends | |
void | subst_any_with_group (MdRecord &mdd, Index g) |
Definition at line 38 of file methods.h.
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 | suppress_header = 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 49 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, moutput, msupergeneric, and Array< base >::nelem().
const String& MdRecord::Name | ( | ) | const [inline] |
Definition at line 85 of file methods.h.
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_specific_output(), MRecord::print(), PrintTemplate(), ArtsParser::read_name_or_value(), ArtsParser::set_gin_to_default(), write_method_header(), and write_method_header_documentation().
const String& MdRecord::Description | ( | ) | const [inline] |
Definition at line 86 of file methods.h.
Referenced by operator<<(), and write_method_header_documentation().
const ArrayOfString& MdRecord::Authors | ( | ) | const [inline] |
Definition at line 87 of file methods.h.
Referenced by operator<<(), and write_method_header_documentation().
const ArrayOfIndex& MdRecord::Out | ( | ) | const [inline] |
Definition at line 88 of file methods.h.
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().
const ArrayOfString& MdRecord::GOut | ( | ) | const [inline] |
Definition at line 89 of file methods.h.
Referenced by operator<<(), ArtsParser::parse_generic_output(), write_method_header(), and write_method_header_documentation().
const ArrayOfIndex& MdRecord::GOutType | ( | ) | const [inline] |
Definition at line 90 of file methods.h.
Referenced by main(), operator<<(), option_methods(), ArtsParser::parse_generic_output(), MRecord::print(), PrintTemplate(), write_method_header(), and write_method_header_documentation().
const ArrayOfArrayOfIndex& MdRecord::GOutSpecType | ( | ) | const [inline] |
Definition at line 91 of file methods.h.
Referenced by expand_md_data_raw_to_md_data(), operator<<(), option_methods(), and ArtsParser::parse_generic_output().
const ArrayOfIndex& MdRecord::In | ( | ) | const [inline] |
Definition at line 93 of file methods.h.
Referenced by main(), operator<<(), option_input(), option_workspacevariables(), write_method_header(), and write_method_header_documentation().
const ArrayOfString& MdRecord::GIn | ( | ) | const [inline] |
Definition at line 94 of file methods.h.
Referenced by operator<<(), ArtsParser::parse_method_args(), PrintTemplate(), ArtsParser::set_gin_to_default(), write_method_header(), and write_method_header_documentation().
const ArrayOfIndex& MdRecord::GInType | ( | ) | const [inline] |
Definition at line 95 of file methods.h.
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().
const ArrayOfArrayOfIndex& MdRecord::GInSpecType | ( | ) | const [inline] |
Definition at line 96 of file methods.h.
Referenced by expand_md_data_raw_to_md_data(), operator<<(), option_input(), and ArtsParser::parse_generic_input().
Definition at line 97 of file methods.h.
Referenced by operator<<(), ArtsParser::parse_method_args(), ArtsParser::set_gin_to_default(), and write_method_header_documentation().
const ArrayOfIndex& MdRecord::InOnly | ( | ) | const [inline] |
Definition at line 99 of file methods.h.
Referenced by main(), operator<<(), ArtsParser::parse_method_args(), ArtsParser::parse_specific_input(), write_method_header(), and write_method_header_documentation().
const ArrayOfIndex& MdRecord::InOut | ( | ) | const [inline] |
bool MdRecord::SetMethod | ( | ) | const [inline] |
Definition at line 101 of file methods.h.
Referenced by Agenda::execute(), main(), and ArtsParser::parse_generic_input().
bool MdRecord::AgendaMethod | ( | ) | const [inline] |
Definition at line 102 of file methods.h.
Referenced by main(), ArtsParser::parse_method(), write_method_header(), and write_method_header_documentation().
bool MdRecord::Supergeneric | ( | ) | const [inline] |
Definition at line 103 of file methods.h.
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().
bool MdRecord::SuppressHeader | ( | ) | const [inline] |
bool MdRecord::PassWorkspace | ( | ) | const [inline] |
Definition at line 105 of file methods.h.
Referenced by main(), write_method_header(), and write_method_header_documentation().
bool MdRecord::PassWsvNames | ( | ) | const [inline] |
Definition at line 106 of file methods.h.
Referenced by main(), write_method_header(), and write_method_header_documentation().
const String& MdRecord::ActualGroups | ( | ) | const [inline] |
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 253 of file methods_aux.cc.
References get_wsv_group_id(), mactual_groups, mgintype, mgouttype, Array< base >::nelem(), Supergeneric(), and wsv_group_names.
Referenced by expand_md_data_raw_to_md_data().
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 298 of file methods_aux.cc.
References get_wsv_group_id(), mactual_groups, mginspectype, mgintype, mgoutspectype, mgouttype, Array< base >::nelem(), Supergeneric(), and wsv_group_names.
Referenced by expand_md_data_raw_to_md_data().
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 543 of file methods_aux.cc.
References GIn(), GInType(), GOutType(), Name(), Array< base >::nelem(), and wsv_group_names.
String MdRecord::mname [private] |
String MdRecord::mdescription [private] |
ArrayOfString MdRecord::mauthors [private] |
ArrayOfIndex MdRecord::moutput [private] |
ArrayOfString MdRecord::mgout [private] |
ArrayOfIndex MdRecord::mgouttype [private] |
Generic Workspace Output Type.
Definition at line 157 of file methods.h.
Referenced by MdRecord(), subst_any_with_group(), and subst_any_with_specific_group().
ArrayOfArrayOfIndex MdRecord::mgoutspectype [private] |
Generic Workspace Output Types (Contains the valid types if the method.
Definition at line 161 of file methods.h.
Referenced by MdRecord(), and subst_any_with_specific_group().
ArrayOfString MdRecord::mgoutdesc [private] |
ArrayOfIndex MdRecord::minput [private] |
ArrayOfString MdRecord::mgin [private] |
ArrayOfIndex MdRecord::mgintype [private] |
Generic Workspace Input.
Definition at line 173 of file methods.h.
Referenced by MdRecord(), subst_any_with_group(), and subst_any_with_specific_group().
ArrayOfArrayOfIndex MdRecord::mginspectype [private] |
Generic Workspace Input Types (Contains the valid types if the method.
Definition at line 177 of file methods.h.
Referenced by MdRecord(), and subst_any_with_specific_group().
ArrayOfString MdRecord::mgindefault [private] |
Generic Workspace Input Defaults.
Definition at line 180 of file methods.h.
Referenced by MdRecord().
ArrayOfString MdRecord::mgindesc [private] |
ArrayOfIndex MdRecord::minonly [private] |
Indexes of Input-only variables.
Definition at line 186 of file methods.h.
Referenced by MdRecord().
ArrayOfIndex MdRecord::minout [private] |
Indexes of Input-Output variables.
Definition at line 189 of file methods.h.
Referenced by MdRecord().
bool MdRecord::mset_method [private] |
bool MdRecord::magenda_method [private] |
bool MdRecord::msupergeneric [private] |
Flag, whether this method is supergeneric.
This flag is set automatically if the gouttype or gintype contains Any_.
Definition at line 210 of file methods.h.
Referenced by MdRecord().
bool MdRecord::msuppress_header [private] |
bool MdRecord::mpass_workspace [private] |
bool MdRecord::mpass_wsv_names [private] |
String MdRecord::mactual_groups [private] |
The actual groups of a supergeneric method.
This holds the actual groups after expansion of a supergeneric method.
Definition at line 238 of file methods.h.
Referenced by subst_any_with_group(), and subst_any_with_specific_group().