MdRecord Class Reference

All information for one workspace method. More...

#include <methods.h>

Collaboration diagram for MdRecord:

Collaboration graph
[legend]

List of all members.

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 StringName () const
const StringDescription () const
const ArrayOfStringAuthors () const
const ArrayOfIndexOut () const
const ArrayOfStringGOut () const
const ArrayOfIndexGOutType () const
const ArrayOfArrayOfIndexGOutSpecType () const
const Array< String > & GOutDescription () const
const ArrayOfIndexIn () const
const ArrayOfStringGIn () const
const ArrayOfIndexGInType () const
const ArrayOfArrayOfIndexGInSpecType () const
const Array< String > & GInDefault () const
const Array< String > & GInDescription () const
const ArrayOfIndexInOnly () const
const ArrayOfIndexInOut () const
bool SetMethod () const
bool AgendaMethod () const
bool Supergeneric () const
bool SuppressHeader () const
bool PassWorkspace () const
bool PassWsvNames () const
const StringActualGroups () 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.
MdRecordoperator= (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)


Detailed Description

All information for one workspace method.

Definition at line 38 of file methods.h.


Constructor & Destructor Documentation

MdRecord::MdRecord (  )  [inline]

Default constructor.

Definition at line 42 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().


Member Function Documentation

const String& MdRecord::Name (  )  const [inline]

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]

const ArrayOfString& MdRecord::GOut (  )  const [inline]

const ArrayOfIndex& MdRecord::GOutType (  )  const [inline]

const ArrayOfArrayOfIndex& MdRecord::GOutSpecType (  )  const [inline]

const Array<String>& MdRecord::GOutDescription (  )  const [inline]

Definition at line 92 of file methods.h.

Referenced by operator<<().

const ArrayOfIndex& MdRecord::In (  )  const [inline]

const ArrayOfString& MdRecord::GIn (  )  const [inline]

const ArrayOfIndex& MdRecord::GInType (  )  const [inline]

const ArrayOfArrayOfIndex& MdRecord::GInSpecType (  )  const [inline]

const Array<String>& MdRecord::GInDefault (  )  const [inline]

const Array<String>& MdRecord::GInDescription (  )  const [inline]

Definition at line 98 of file methods.h.

Referenced by operator<<().

const ArrayOfIndex& MdRecord::InOnly (  )  const [inline]

const ArrayOfIndex& MdRecord::InOut (  )  const [inline]

Definition at line 100 of file methods.h.

Referenced by Agenda::execute().

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]

bool MdRecord::Supergeneric (  )  const [inline]

bool MdRecord::SuppressHeader (  )  const [inline]

Definition at line 104 of file methods.h.

Referenced by main().

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]

Definition at line 107 of file methods.h.

Referenced by define_md_map(), and main().

void MdRecord::SetPassWorkspace (  )  [inline]

Definition at line 108 of file methods.h.

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..

Parameters:
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..

Parameters:
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.

Parameters:
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.

MdRecord& MdRecord::operator= ( const MdRecord m  )  [inline]

To override the default assignment operator.

MdRecords cannot be assigned!

Definition at line 129 of file methods.h.


Friends And Related Function Documentation

void subst_any_with_group ( MdRecord mdd,
Index  g 
) [friend]


Member Data Documentation

The name of this method.

Definition at line 142 of file methods.h.

Referenced by MdRecord().

A text string describing this method.

Definition at line 145 of file methods.h.

Author(s) of this method.

Definition at line 148 of file methods.h.

Workspace Output.

Definition at line 151 of file methods.h.

Referenced by MdRecord().

Generic Workspace Output Names.

Definition at line 154 of file methods.h.

Referenced by MdRecord().

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().

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().

Generic Workspace Output Description.

Definition at line 164 of file methods.h.

Workspace Input.

Definition at line 167 of file methods.h.

Referenced by MdRecord().

Generic Workspace Input Names.

Definition at line 170 of file methods.h.

Referenced by MdRecord().

Generic Workspace Input.

Definition at line 173 of file methods.h.

Referenced by MdRecord(), subst_any_with_group(), and subst_any_with_specific_group().

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().

Generic Workspace Input Defaults.

Definition at line 180 of file methods.h.

Referenced by MdRecord().

Generic Workspace Input Description.

Definition at line 183 of file methods.h.

Indexes of Input-only variables.

Definition at line 186 of file methods.h.

Referenced by MdRecord().

Indexes of Input-Output variables.

Definition at line 189 of file methods.h.

Referenced by MdRecord().

bool MdRecord::mset_method [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 196 of file methods.h.

bool MdRecord::magenda_method [private]

Flag, whether this is an agenda method.

Agenda methods expect other method definitions inside their body in the controlfile.

Definition at line 203 of file methods.h.

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().

Flag, whether method header should be suppressed.

If we want to implement a supergeneric method by a template function, we must not include method headers in auto_md.h.

Definition at line 217 of file methods.h.

bool MdRecord::mpass_workspace [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 224 of file methods.h.

bool MdRecord::mpass_wsv_names [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 232 of file methods.h.

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().


The documentation for this class was generated from the following files:

Generated on Mon Mar 23 14:07:01 2009 for ARTS by  doxygen 1.5.6