ARTS  2.0.49
ArtsParser Class Reference

#include <parser.h>

Public Member Functions

 ArtsParser (Agenda &tasklist, String controlfile, const Verbosity &verbosity)
 Constructs a new parser. More...
 
void parse_tasklist ()
 Public interface to the main function of the parser. More...
 

Private Member Functions

void parse_main ()
 The main function of the parser. More...
 
void parse_agenda (Agenda &tasklist)
 Parse the Contents of text as ARTS control input. More...
 
void parse_method (Index &id, ArrayOfIndex &output, ArrayOfIndex &input, Agenda &tasks, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, String &include_file, bool no_eot=false)
 Parse the Contents of text as ARTS control input. More...
 
void parse_generic_input (const MdRecord *&mdd, Index &id, String &methodname, ArrayOfIndex &input, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, bool &first, bool &still_supergeneric, String &supergeneric_args, Index &supergeneric_index)
 Parse the generic input WSVs for current method from the controlfile. More...
 
void parse_generic_output (const MdRecord *&mdd, Index &id, String &methodname, ArrayOfIndex &output, bool &first, bool &still_supergeneric, String &supergeneric_args, Index &supergeneric_index)
 Parse the generic output WSVs for current method from the controlfile. More...
 
void parse_specific_input (const MdRecord *mdd, ArrayOfIndex &input, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, bool &first)
 Parse the specific input WSVs for current method from the controlfile. More...
 
void parse_specific_output (const MdRecord *mdd, ArrayOfIndex &output, bool &first)
 Parse the output WSVs for current method from the controlfile. More...
 
void parse_method_args (const MdRecord *&mdd, Index &id, String &methodname, ArrayOfIndex &output, ArrayOfIndex &input, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values)
 Parse method's argument list. More...
 
String set_gin_to_default (const MdRecord *mdd, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, Index keyword_index)
 Set generic input to default value. More...
 
void tasklist_insert_set_delete (const ArrayOfIndex &auto_vars, const Array< TokVal > &auto_vars_values, const Index method_type, Agenda &tasklist)
 Insert Set and Delete methods for automatically allocated output WSVs. More...
 
bool is_whitespace (const char c)
 Returns true if this character is considered whitespace. More...
 
void eat_whitespace ()
 Eats whitespace. More...
 
void eat_whitespace_from_string (String &str, size_t &pos)
 Eats whitespace from a String. More...
 
void read_name (String &name)
 Reads name of method, keyword, or workspace variable. More...
 
Index read_name_or_value (String &name, ArrayOfIndex &auto_vars, Array< TokVal > &auto_vars_values, const String &default_name, const MdRecord *mdd, const Index group)
 Reads name of a workspace variable or a value. More...
 
void assertain_character (char c)
 Make sure that the current character is equal to c and go to the next character. More...
 
void parse_String (String &res)
 Reads a String, complete with quotation marks. More...
 
void read_integer (String &res)
 Reads an integer. More...
 
void read_numeric (String &res)
 Reads a floating point number. More...
 
void parse_integer (Index &n)
 Use a String stream to parse an integer number. More...
 
void parse_numeric (Numeric &n)
 Use a String stream to parse a floating point number. More...
 
void parse_Stringvector (ArrayOfString &res)
 Read a vector of Strings. More...
 
void parse_intvector (ArrayOfIndex &res)
 Read a vector of integers. More...
 
void parse_numvector (Vector &res)
 Read a vector of Numerics. More...
 
void parse_matrix (Matrix &res)
 Read a Matrix. More...
 
bool parse_numvector_from_string (Vector &res, String &str)
 Read a vector of Numerics from a String. More...
 
bool parse_stringarray_from_string (ArrayOfString &res, String &str)
 Read an Array of Strings from a String. More...
 

Private Attributes

Agendamtasklist
 
String mcfile
 
SourceText msource
 
Index mcfile_version
 
const Verbosityverbosity
 

Detailed Description

Definition at line 27 of file parser.h.

Constructor & Destructor Documentation

◆ ArtsParser()

ArtsParser::ArtsParser ( Agenda tasklist,
String  controlfile,
const Verbosity rverbosity 
)

Constructs a new parser.

Parameters
[out]tasklistMethod list read from the controlfile.
[in]controlfilePath to the controlfile.
Author
Oliver Lemke

Definition at line 36 of file parser.cc.

References SourceText::AppendFile(), mcfile, and msource.

Member Function Documentation

◆ assertain_character()

void ArtsParser::assertain_character ( char  c)
private

Make sure that the current character is equal to c and go to the next character.

Parameters
[in]cExpected character.
Exceptions
UnexpectedCharThe character is not right.

Definition at line 1657 of file parser.cc.

References SourceText::AdvanceChar(), SourceText::Column(), SourceText::Current(), SourceText::File(), SourceText::Line(), and msource.

Referenced by parse_generic_input(), parse_generic_output(), parse_intvector(), parse_matrix(), parse_method(), parse_method_args(), parse_numvector(), parse_specific_input(), parse_specific_output(), parse_String(), and parse_Stringvector().

◆ eat_whitespace()

void ArtsParser::eat_whitespace ( )
private

Eats whitespace.

Comments are a special case of whitespace. Everything from the ‘#’ to the end of the line is eaten.

The whitespace cases implemented here must be consistent with is_whitespace!

See also
is_whitespace
Exceptions
UnexpectedCharNon-whitespace character encountered.

Definition at line 1440 of file parser.cc.

References SourceText::AdvanceChar(), SourceText::AdvanceLine(), SourceText::Column(), SourceText::Current(), SourceText::File(), is_whitespace(), SourceText::Line(), and msource.

Referenced by parse_agenda(), parse_generic_input(), parse_generic_output(), parse_intvector(), parse_main(), parse_matrix(), parse_method(), parse_method_args(), parse_numvector(), parse_specific_input(), parse_specific_output(), and parse_Stringvector().

◆ eat_whitespace_from_string()

void ArtsParser::eat_whitespace_from_string ( String str,
size_t &  pos 
)
private

Eats whitespace from a String.

Parameters
[in]strString.
[in,out]posCurrent position in the String.

Definition at line 1476 of file parser.cc.

References is_whitespace().

Referenced by parse_numvector_from_string(), and parse_stringarray_from_string().

◆ is_whitespace()

bool ArtsParser::is_whitespace ( const char  c)
private

Returns true if this character is considered whitespace.

This includes the comment sign ‘#’. This function is used by other functions to test for delimiting whitespace.

The whitespace cases implemented here must be consistent with eat_whitespace!

Parameters
[in]cCharacter to test.
See also
eat_whitespace

Definition at line 1415 of file parser.cc.

Referenced by eat_whitespace(), and eat_whitespace_from_string().

◆ parse_agenda()

void ArtsParser::parse_agenda ( Agenda tasklist)
private

Parse the Contents of text as ARTS control input.

This method is used to parse the list of methods given in the curly braces of an agenda method. So the end is marked by a closing curly brace ahead.

Parameters
[out]tasklistThe method ids.
See also
eat_whitespace
parse_method
Author
Stefan Buehler

Definition at line 215 of file parser.cc.

References CREATE_OUT2, CREATE_OUT3, SourceText::Current(), eat_whitespace(), SourceText::File(), find_file(), Parameters::includepath, md_data, Agenda::Methods(), msource, Agenda::nelem(), Array< base >::nelem(), parameters, parse_method(), parse_tasklist(), Agenda::push_back(), tasklist_insert_set_delete(), verbosity, and Workspace::wsv_data.

Referenced by parse_method().

◆ parse_generic_input()

void ArtsParser::parse_generic_input ( const MdRecord *&  mdd,
Index id,
String methodname,
ArrayOfIndex input,
ArrayOfIndex auto_vars,
Array< TokVal > &  auto_vars_values,
bool &  first,
bool &  still_supergeneric,
String supergeneric_args,
Index supergeneric_index 
)
private

Parse the generic input WSVs for current method from the controlfile.

Parameters
[in]mddPointer to the current WSM
[out]idMethod index in md_data.
[out]methodnameName of the WSM
[out]inputInput WSVs
[out]auto_varsIndexes of automatically created variables.
[out]auto_vars_valuesValues of automatically created variables.
[in,out]firstIf set to false, there must be a comma before the first WSV in the controlfile
[in,out]still_supergenericTrue if the supergeneric method has not been expanded for the different types yet.
Author
Oliver Lemke
Date
2008-03-05

Definition at line 772 of file parser.cc.

References assertain_character(), SourceText::Column(), SourceText::Current(), eat_whitespace(), SourceText::File(), get_wsv_group_id(), MdRecord::GInSpecType(), MdRecord::GInType(), SourceText::Line(), md_data, MdMap, msource, MdRecord::Name(), Array< base >::nelem(), read_name_or_value(), set_gin_to_default(), MdRecord::SetMethod(), Workspace::wsv_data, wsv_group_names, and Workspace::WsvMap.

Referenced by parse_method_args().

◆ parse_generic_output()

void ArtsParser::parse_generic_output ( const MdRecord *&  mdd,
Index id,
String methodname,
ArrayOfIndex output,
bool &  first,
bool &  still_supergeneric,
String supergeneric_args,
Index supergeneric_index 
)
private

Parse the generic output WSVs for current method from the controlfile.

Parameters
[in]mddPointer to the current WSM
[out]idMethod index in md_data.
[out]methodnameName of the WSM
[out]outputOutput WSVs
[in,out]firstIf set to false, there must be a comma before the first WSV in the controlfile
[in,out]still_supergenericTrue if the supergeneric method has not been expanded for the different types yet.
Author
Oliver Lemke
Date
2008-03-05

Definition at line 953 of file parser.cc.

References Workspace::add_wsv(), assertain_character(), SourceText::Column(), eat_whitespace(), SourceText::File(), get_wsv_group_id(), MdRecord::GOut(), MdRecord::GOutSpecType(), MdRecord::GOutType(), SourceText::Line(), md_data, MdMap, msource, MdRecord::Name(), Array< base >::nelem(), read_name(), Workspace::wsv_data, wsv_group_names, and Workspace::WsvMap.

Referenced by parse_method_args().

◆ parse_integer()

void ArtsParser::parse_integer ( Index n)
private

Use a String stream to parse an integer number.

Parameters
[out]nParsed integer.

Definition at line 1908 of file parser.cc.

References read_integer().

Referenced by parse_intvector(), and read_name_or_value().

◆ parse_intvector()

void ArtsParser::parse_intvector ( ArrayOfIndex res)
private

Read a vector of integers.

This looks as follows in the control file: [123,5,334] Whitespace has to have been eaten before, that is, the current character must be ‘[’.

The empty vector is allowed.

Line breaks are allowed before and after each number. Line breaks inside numbers are not allowed.

See also
parse_integer

Definition at line 1989 of file parser.cc.

References SourceText::AdvanceChar(), assertain_character(), SourceText::Current(), eat_whitespace(), msource, and parse_integer().

Referenced by read_name_or_value().

◆ parse_main()

void ArtsParser::parse_main ( )
private

The main function of the parser.

This will parse the entire text.

Author
Stefan Buehler, Oliver Lemke

Definition at line 58 of file parser.cc.

References arts_exit(), SourceText::Column(), ParseError::column(), CREATE_OUT0, CREATE_OUT3, eat_whitespace(), SourceText::File(), ParseError::file(), SourceText::Init(), SourceText::Line(), ParseError::line(), md_data, msource, mtasklist, parse_method(), and SourceText::reachedEot().

Referenced by parse_tasklist().

◆ parse_matrix()

void ArtsParser::parse_matrix ( Matrix res)
private

Read a Matrix.

This looks as follows in the control file: [1, 2, 3; 4, 5, 6] Whitespace has to have been eaten before, that is, the current character must be ‘[’.

The empty matrix is allowed.

Line breaks are allowed before and after each number. Line breaks inside numbers are not allowed.

See also
parse_numeric

Definition at line 2090 of file parser.cc.

References SourceText::AdvanceChar(), assertain_character(), SourceText::Column(), SourceText::Current(), eat_whitespace(), SourceText::File(), SourceText::Line(), msource, Array< base >::nelem(), parse_numeric(), and Matrix::resize().

Referenced by read_name_or_value().

◆ parse_method()

void ArtsParser::parse_method ( Index id,
ArrayOfIndex output,
ArrayOfIndex input,
Agenda tasks,
ArrayOfIndex auto_vars,
Array< TokVal > &  auto_vars_values,
String include_file,
bool  no_eot = false 
)
private

Parse the Contents of text as ARTS control input.

Either values or tasks will be empty.

Parameters
[out]idMethod id.
[out]outputOutput workspace variables (for generic methods).
[out]inputInput workspace variables (for generic methods).
[out]tasksA list of other methods.
[out]auto_varsIndexes of automatically created variables.
[out]auto_vars_valuesValues of automatically created variables.
[out]include_fileThe input to parse.
[in]no_eotSuppress throwing an error on EOT after the closing curly brace.
See also
read_name
eat_whitespace
assertain_character
parse_String
parse_integer
parse_numeric
parse_Stringvector
parse_intvector
parse_numvector
parse_matrix
Exceptions
UnknownMethod
UnknownWsv
WrongWsvGroup
Author
Stefan Buehler

Definition at line 352 of file parser.cc.

References SourceText::AdvanceChar(), MdRecord::AgendaMethod(), assertain_character(), SourceText::Column(), CREATE_OUT3, SourceText::Current(), eat_whitespace(), SourceText::File(), SourceText::Line(), mcfile_version, msource, MdRecord::Name(), parse_agenda(), parse_method_args(), parse_String(), read_name(), and Agenda::resize().

Referenced by parse_agenda(), and parse_main().

◆ parse_method_args()

void ArtsParser::parse_method_args ( const MdRecord *&  mdd,
Index id,
String methodname,
ArrayOfIndex output,
ArrayOfIndex input,
ArrayOfIndex auto_vars,
Array< TokVal > &  auto_vars_values 
)
private

Parse method's argument list.

This function parses a method's argument list.

Parameters
[in]mddMethod
[out]idMethod index in md_data.
[out]methodnameName of the WSM
[out]outputOutput WSVs
[out]inputInput WSVs
[out]auto_varsIndexes of automatically created variables.
[out]auto_vars_valuesValues of automatically created variables.
Author
Oliver Lemke
Date
2008-03-05

Definition at line 617 of file parser.cc.

References SourceText::AdvanceChar(), assertain_character(), SourceText::Column(), SourceText::Current(), eat_whitespace(), SourceText::File(), MdRecord::GIn(), MdRecord::GInDefault(), MdRecord::InOnly(), SourceText::Line(), md_data, md_data_raw, MdMap, MdRawMap, msource, NODEF, MdRecord::Out(), parse_generic_input(), parse_generic_output(), parse_specific_input(), parse_specific_output(), set_gin_to_default(), MdRecord::Supergeneric(), and Workspace::WsvMap.

Referenced by parse_method().

◆ parse_numeric()

void ArtsParser::parse_numeric ( Numeric n)
private

Use a String stream to parse a floating point number.

Parameters
[out]nParsed numeric.

Definition at line 1921 of file parser.cc.

References read_numeric().

Referenced by parse_matrix(), parse_numvector(), and read_name_or_value().

◆ parse_numvector()

void ArtsParser::parse_numvector ( Vector res)
private

Read a vector of Numerics.

This looks as follows in the control file: [1.3, 5, 3.4] Whitespace has to have been eaten before, that is, the current character must be ‘[’.

The empty vector is allowed.

Line breaks are allowed before and after each number. Line breaks inside numbers are not allowed.

See also
parse_numeric

Definition at line 2034 of file parser.cc.

References SourceText::AdvanceChar(), assertain_character(), SourceText::Current(), eat_whitespace(), msource, Array< base >::nelem(), parse_numeric(), and Vector::resize().

Referenced by read_name_or_value().

◆ parse_numvector_from_string()

bool ArtsParser::parse_numvector_from_string ( Vector res,
String str 
)
private

Read a vector of Numerics from a String.

This looks as follows: [1.3, 5] Whitespace has to have been eaten before, that is, the current character must be ‘[’.

The empty vector is allowed.

See also
parse_numeric

Definition at line 2198 of file parser.cc.

References eat_whitespace_from_string(), Array< base >::nelem(), and Vector::resize().

Referenced by set_gin_to_default().

◆ parse_specific_input()

void ArtsParser::parse_specific_input ( const MdRecord mdd,
ArrayOfIndex input,
ArrayOfIndex auto_vars,
Array< TokVal > &  auto_vars_values,
bool &  first 
)
private

Parse the specific input WSVs for current method from the controlfile.

Parameters
[in]mddPointer to the current WSM
[out]inputIndexes of input variables for the WSM
[out]auto_varsIndexes of automatically created variables.
[out]auto_vars_valuesValues of automatically created variables.
[in]firstIf set to false, there must be a comma before the first WSV in the controlfile
Author
Oliver Lemke
Date
2008-03-05

Definition at line 1155 of file parser.cc.

References assertain_character(), SourceText::Column(), eat_whitespace(), SourceText::File(), MdRecord::InOnly(), SourceText::Line(), msource, MdRecord::Out(), read_name_or_value(), Workspace::wsv_data, wsv_group_names, and Workspace::WsvMap.

Referenced by parse_method_args().

◆ parse_specific_output()

void ArtsParser::parse_specific_output ( const MdRecord mdd,
ArrayOfIndex output,
bool &  first 
)
private

Parse the output WSVs for current method from the controlfile.

Parameters
[in]mddPointer to the current WSM
[out]outputIndexes of output variables for the WSM
[in]firstIf set to false, there must be a comma before the first WSV in the controlfile
Author
Oliver Lemke
Date
2008-03-05

Definition at line 1235 of file parser.cc.

References Workspace::add_wsv(), assertain_character(), SourceText::Column(), eat_whitespace(), SourceText::File(), SourceText::Line(), msource, MdRecord::Name(), MdRecord::Out(), read_name(), Workspace::wsv_data, wsv_group_names, and Workspace::WsvMap.

Referenced by parse_method_args().

◆ parse_String()

void ArtsParser::parse_String ( String res)
private

Reads a String, complete with quotation marks.

Whitespace has to have been eaten before, that is, the current character must be the quotation mark ("). Quotation marks inside Strings are currently not possible.

Line breaks inside Strings are not allowed.

Parameters
[out]resOutput string.
Exceptions
IllegalLinebreakAn illegal linebreak has occured.

Definition at line 1683 of file parser.cc.

References SourceText::AdvanceChar(), assertain_character(), SourceText::Column(), SourceText::Current(), SourceText::File(), SourceText::Line(), SourceText::LineBreak(), and msource.

Referenced by parse_method(), parse_Stringvector(), and read_name_or_value().

◆ parse_stringarray_from_string()

bool ArtsParser::parse_stringarray_from_string ( ArrayOfString res,
String str 
)
private

Read an Array of Strings from a String.

This looks as follows: [ "String1", "String2"] Whitespace has to have been eaten before, that is, the current character must be ‘[’.

The empty vector is allowed.

See also
parse_numeric

Definition at line 2267 of file parser.cc.

References eat_whitespace_from_string(), and Array< base >::nelem().

Referenced by set_gin_to_default().

◆ parse_Stringvector()

void ArtsParser::parse_Stringvector ( ArrayOfString res)
private

Read a vector of Strings.

This looks as follows in the control file: ["String1","String2"]

Whitespace has to have been eaten before, that is, the current character must be ‘[’.

The empty vector is allowed.

Quotation marks inside Strings are currently not possible.

Line breaks are allowed before and after each String. Line breaks inside Strings are not allowed.

See also
parse_String

Definition at line 1944 of file parser.cc.

References SourceText::AdvanceChar(), assertain_character(), SourceText::Current(), eat_whitespace(), msource, and parse_String().

Referenced by read_name_or_value().

◆ parse_tasklist()

void ArtsParser::parse_tasklist ( )

Public interface to the main function of the parser.

Author
Oliver Lemke

Definition at line 47 of file parser.cc.

References parse_main().

Referenced by main(), and parse_agenda().

◆ read_integer()

void ArtsParser::read_integer ( String res)
private

Reads an integer.

Whitespace has to have been eaten before, that is, the current character must be a number or ‘+’ or ‘-’.

Whitespace or line breaks terminate the scanning! There are no whitespaces allowed anywhere, consisten with ANSI C scanf.

Parameters
[out]resOutput string containing the integer.
Exceptions
IllegalLinebreakAn illegal linebreak has occured.
UnexpectedCharUnexpected character encountered.

Definition at line 1731 of file parser.cc.

References SourceText::AdvanceChar(), SourceText::Column(), SourceText::Current(), SourceText::File(), SourceText::Line(), SourceText::LineBreak(), and msource.

Referenced by parse_integer(), and read_numeric().

◆ read_name()

void ArtsParser::read_name ( String name)
private

Reads name of method, keyword, or workspace variable.

These names may consist only of letters (case matters!), numbers, and underscores. Line break or any other character ends the name.

Whitespace has to have been eaten before. Scanns source for the name, starting at position specified by line and column.

Parameters
[out]nameMethod, keyword or WSV name

Definition at line 1494 of file parser.cc.

References SourceText::AdvanceChar(), SourceText::Column(), SourceText::Current(), SourceText::File(), SourceText::Line(), SourceText::LineBreak(), and msource.

Referenced by parse_generic_output(), parse_method(), parse_specific_output(), and read_name_or_value().

◆ read_name_or_value()

Index ArtsParser::read_name_or_value ( String name,
ArrayOfIndex auto_vars,
Array< TokVal > &  auto_vars_values,
const String default_name,
const MdRecord mdd,
const Index  group 
)
private

Reads name of a workspace variable or a value.

These names may consist only of letters (case matters!), numbers, and underscores. Line break or any other character ends the name.

Whitespace has to have been eaten before. Scanns source for the name, starting at position specified by line and column.

Parameters
[out]nameWSV name or value
[out]auto_varsIndexes of automatically created variables.
[out]auto_vars_valuesValues of automatically created variables.
[in]default_nameDefault WSV name.
[in]mddPointer to the current WSM
[in]groupExpected WSV group index
Returns
-1 If a WSV name was found or the index of the newly created WSV

Definition at line 1548 of file parser.cc.

References Workspace::add_wsv(), SourceText::Column(), SourceText::Current(), SourceText::File(), get_wsv_group_id(), SourceText::Line(), msource, MdRecord::Name(), parse_integer(), parse_intvector(), parse_matrix(), parse_numeric(), parse_numvector(), parse_String(), parse_Stringvector(), read_name(), wsv_group_names, and Workspace::WsvMap.

Referenced by parse_generic_input(), and parse_specific_input().

◆ read_numeric()

void ArtsParser::read_numeric ( String res)
private

Reads a floating point number.

Whitespace has to have been eaten before, that is, the current character must be a number or ‘+’ or ‘-’.

Example numbers: 23., 1.0, -.3, -3.3e5, +3e8, 1.0E-9

Illegal numbers: ., 3e, e3, 2e-

Whitespace is not allowed inside the number. Line breaks or whitespace terminates the scanning.

Parameters
[out]resOutput string containing the numeric.
Exceptions
IllegalLinebreakIllegal line break.
ParseErrorCannot parse this as a number.

Definition at line 1793 of file parser.cc.

References SourceText::AdvanceChar(), SourceText::Column(), SourceText::Current(), SourceText::File(), SourceText::Line(), SourceText::LineBreak(), msource, and read_integer().

Referenced by parse_numeric().

◆ set_gin_to_default()

String ArtsParser::set_gin_to_default ( const MdRecord mdd,
ArrayOfIndex auto_vars,
Array< TokVal > &  auto_vars_values,
Index  gin_index 
)
private

Set generic input to default value.

Sets the value of the generic input with the given index to its default value.

Parameters
[in]mddMethod object.
[out]auto_varsIndexes of automatically created variables.
[out]auto_vars_valuesValues of automatically created variables.
[in]gin_indexIndex of the generic input which should be set to its default value.
Returns
Workspace variable name containing the default value
Author
Oliver Lemke
Date
2008-07-16

Definition at line 473 of file parser.cc.

References Workspace::add_wsv(), SourceText::Column(), SourceText::File(), get_wsv_group_id(), MdRecord::GIn(), MdRecord::GInDefault(), MdRecord::GInType(), SourceText::Line(), msource, MdRecord::Name(), NODEF, parse_numvector_from_string(), parse_stringarray_from_string(), wsv_group_names, and Workspace::WsvMap.

Referenced by parse_generic_input(), and parse_method_args().

◆ tasklist_insert_set_delete()

void ArtsParser::tasklist_insert_set_delete ( const ArrayOfIndex auto_vars,
const Array< TokVal > &  auto_vars_values,
const Index  method_type,
Agenda tasklist 
)
private

Insert Set and Delete methods for automatically allocated output WSVs.

This function inserts either a bunch of Set or Delete methods for implicitly allocated output WSVs. This needs to be done if the controlfile contains a value instead of an output variable name.

See also
ArtsParser::parse_agenda
Parameters
[in]auto_varsIndexes of automatically created variables.
[in]auto_vars_valuesValues of automatically created variables.
[in]method_type0 = insert Set method, 1 = insert Delete method.
[out]tasklistAgenda to which the methods should be appended.

Definition at line 1340 of file parser.cc.

References SourceText::Column(), SourceText::File(), get_wsv_group_id(), SourceText::Line(), MdMap, msource, Array< base >::nelem(), Agenda::push_back(), Workspace::wsv_data, and wsv_group_names.

Referenced by parse_agenda().

Member Data Documentation

◆ mcfile

String ArtsParser::mcfile
private

Definition at line 136 of file parser.h.

Referenced by ArtsParser().

◆ mcfile_version

Index ArtsParser::mcfile_version
private

Definition at line 140 of file parser.h.

Referenced by parse_method().

◆ msource

◆ mtasklist

Agenda& ArtsParser::mtasklist
private

Definition at line 134 of file parser.h.

Referenced by parse_main().

◆ verbosity

const Verbosity& ArtsParser::verbosity
private

Definition at line 142 of file parser.h.

Referenced by parse_agenda().


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