ARTS  2.0.49
make_auto_md_h.cc
Go to the documentation of this file.
1 /* Copyright (C) 2000-2008 Stefan Buehler <sbuehler@ltu.se>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA. */
17 
68 #include "arts.h"
69 #include "array.h"
70 #include "file.h"
71 #include "methods.h"
72 #include "workspace_ng.h"
73 #include "agenda_record.h"
74 
75 /* Adds commas and indentation to parameter lists. */
76 void align(ofstream& ofs, bool& is_first_parameter, const String& indent)
77 {
78  // Add comma and line break, if not first element:
79  if (is_first_parameter)
80  is_first_parameter = false;
81  else
82  {
83  ofs << ",\n";
84  // Make proper indentation:
85  ofs << indent;
86  }
87 }
88 
90 
94 void write_method_header_documentation (ofstream& ofs, const MdRecord& mdd)
95 {
96  const Array<WsvRecord>& wsv_data = Workspace::wsv_data;
97 
98  String fullname = mdd.Name();
99 
100  // This is needed to flag the first function parameter, which
101  // needs no line break before being written:
102  bool is_first_parameter = true;
103 
104  // The String indent is needed to achieve the correct
105  // indentation of the functin parameters:
106  String indent(" ");
107 
108  // Flag to pass the workspace to the WSM. Only true if the WSM has
109  // an Agenda as input.
110  bool pass_workspace = false;
111 
112  // There are four lists of parameters that we have to
113  // write.
114  ArrayOfIndex vo=mdd.Out(); // Output
115  const ArrayOfIndex &vi = mdd.InOnly(); // Input
116  ArrayOfIndex vgo=mdd.GOutType(); // Generic Output
117  ArrayOfIndex vgi=mdd.GInType(); // Generic Input
118  // vo and vi contain handles of workspace variables,
119  // vgo and vgi handles of workspace variable groups.
120 
121  // Find out if the WSM gets an agenda as input. If so, pass
122  // the current workspace to this method
123  for (Index j = 0; !pass_workspace && j < mdd.In().nelem(); j++)
124  {
125  if (wsv_data[mdd.In()[j]].Group() == get_wsv_group_id ("Agenda"))
126  {
127  pass_workspace = true;
128  }
129  }
130 
131  // Find out if the WSM gets an agenda as input. If so, pass
132  // the current workspace to this method
133  for (Index j = 0; !pass_workspace && j < mdd.GInType().nelem(); j++)
134  {
135  if (mdd.GInType()[j] == get_wsv_group_id ("Agenda"))
136  {
137  pass_workspace = true;
138  }
139  }
140 
141  // Start with the name of the one line description
142  ofs << "//! WORKSPACE METHOD: " << fullname << ".\n";
143 
144  ofs << "/*!\n";
145 
146  String DoxyDescription = mdd.Description();
147  size_t start_pos = 0;
148 
149  while (start_pos != string::npos)
150  {
151  start_pos = DoxyDescription.find ("\n ", start_pos);
152  if (start_pos && start_pos != string::npos
153  && DoxyDescription[start_pos]-1 != '\n')
154  {
155  DoxyDescription.insert (start_pos + 1, "<br>");
156  start_pos += 5;
157  }
158  }
159 
160  // Some characters have to be masqueraded to appear properly in doxygen
161  // documentation
162  DoxyDescription.insert_substr ("<", "\\");
163  DoxyDescription.insert_substr (">", "\\");
164 
165  ofs << DoxyDescription << "\n";
166 
167  // Write the authors:
168  for (Index j=0; j<mdd.Authors().nelem(); ++j)
169  {
170  ofs << indent << "\\author " << mdd.Authors ()[j] << "\n";
171  }
172 
173  ofs << "\n";
174 
175  if (pass_workspace || mdd.PassWorkspace() || mdd.AgendaMethod())
176  {
177  ofs << indent << "\\param[in,out] " << "ws Workspace\n";
178  }
179 
180  // Write the Output workspace variables:
181  for (Index j=0; j<vo.nelem(); ++j)
182  {
183  ofs << indent << "\\param[out] "
184  << wsv_data[vo[j]].Name() << " WS Output\n";
185  }
186 
187  // Write the Generic output workspace variables:
188  for (Index j=0; j<vgo.nelem(); ++j)
189  {
190  ofs << indent << "\\param[out] ";
191 
192  if (mdd.GOut()[j].length())
193  ofs << mdd.GOut()[j];
194  else
195  ofs << "genericoutput" << j+1;
196 
197  if (mdd.Supergeneric ()) ofs << " Supergeneric output\n";
198  else ofs << " Generic output\n";
199  }
200 
201  // Write the Generic output workspace variable names:
202  if (mdd.PassWsvNames())
203  {
204  for (Index j=0; j<vgo.nelem(); ++j)
205  {
206  ofs << indent << "\\param[in] ";
207  if (mdd.GOut()[j].length())
208  ofs << mdd.GOut()[j] << "_wsvname";
209  else
210  ofs << "genericoutput" << j+1 << "_wsvname";
211 
212  ofs << " Generic Output Name" << endl;
213  }
214  }
215 
216  // Write the Input workspace variables:
217  for (Index j=0; j<vi.nelem(); ++j)
218  {
219  ofs << indent << "\\param[in] "
220  << wsv_data[vi[j]].Name() << " WS Input\n";
221  }
222 
223  // Write the Generic input workspace variables:
224  for (Index j=0; j<vgi.nelem(); ++j)
225  {
226  ofs << indent << "\\param[in] ";
227  if (mdd.GIn()[j] != "")
228  ofs << mdd.GIn()[j];
229  else
230  ofs << "genericinput" << j+1;
231 
232  ofs << " Generic Input";
233 
234  if (mdd.GInDefault()[j] != NODEF)
235  {
236  ofs << " (Default: \"" << mdd.GInDefault()[j] << "\")";
237  }
238  ofs << endl;
239  }
240 
241  // Write the Generic input workspace variable names:
242  if (mdd.PassWsvNames())
243  {
244  for (Index j=0; j<vgi.nelem(); ++j)
245  {
246  ofs << indent << "\\param[in] ";
247  if (mdd.GIn()[j].length())
248  ofs << mdd.GIn()[j] << "_wsvname";
249  else
250  ofs << "genericinput" << j+1 << "_wsvname";
251 
252  ofs << " Generic Input Name" << endl;
253  }
254  }
255 
256 
257  // Write agenda, if there is one:
258  if ( mdd.AgendaMethod() )
259  {
260  align(ofs,is_first_parameter,indent);
261  ofs << indent << "\\param[in] " << "input_agenda Agenda from controlfile\n";
262  }
263 
264  ofs << "*/\n";
265 }
266 
268 
272 void write_method_header( ofstream& ofs,
273  const MdRecord& mdd )
274 {
275  extern const ArrayOfString wsv_group_names;
276  const Array<WsvRecord>& wsv_data = Workspace::wsv_data;
277 
278 // // Work out the full name to use:
279 // String fullname;
280 // {
281 // ostringstream os;
282 // os << mdd.Name() << add_to_name;
283 // fullname = os.str();
284 // }
285 
286  String fullname = mdd.Name();
287 
288  // This is needed to flag the first function parameter, which
289  // needs no line break before being written:
290  bool is_first_parameter = true;
291 
292  // The String indent is needed to achieve the correct
293  // indentation of the functin parameters:
294  String indent(fullname.nelem()+6,' ');
295 
296  // Flag to pass the workspace to the WSM. Only true if the WSM has
297  // an Agenda as input.
298  bool pass_workspace = false;
299 
300  // There are four lists of parameters that we have to
301  // write.
302  ArrayOfIndex vo=mdd.Out(); // Output
303  const ArrayOfIndex &vi = mdd.InOnly(); // Input
304  ArrayOfIndex vgo=mdd.GOutType(); // Generic Output
305  ArrayOfIndex vgi=mdd.GInType(); // Generic Input
306  // vo and vi contain handles of workspace variables,
307  // vgo and vgi handles of workspace variable groups.
308 
309  // Find out if the WSM gets an agenda as input. If so, pass
310  // the current workspace to this method
311  for (Index j = 0; !pass_workspace && j < mdd.In().nelem(); j++)
312  {
313  if (wsv_data[mdd.In()[j]].Group() == get_wsv_group_id ("Agenda"))
314  {
315  pass_workspace = true;
316  }
317  }
318 
319  // Find out if the WSM gets an agenda as input. If so, pass
320  // the current workspace to this method
321  for (Index j = 0; !pass_workspace && j < mdd.GInType().nelem(); j++)
322  {
323  if (mdd.GInType()[j] == get_wsv_group_id ("Agenda"))
324  {
325  pass_workspace = true;
326  }
327  }
328 
329  // There used to be a similar block here for the generic
330  // input/output variables. However, this was a mistake. For
331  // example, if a method has a vector as generic input and a
332  // vector as generic output, this does not mean that it is
333  // the same vector!
334 
335  if (mdd.Supergeneric ())
336  {
337  ofs << "template <typename T>" << endl;
338  }
339 
340  // Start with the name of the method:
341  ofs << "void " << fullname << "(";
342 
343  if (pass_workspace || mdd.PassWorkspace() || mdd.AgendaMethod())
344  {
345  ofs << "// Workspace reference:\n";
346  ofs << indent << "Workspace& ws";
347  is_first_parameter = false;
348  }
349 
350  // Write the Output workspace variables:
351  {
352  // Flag first parameter of this sort:
353  bool is_first_of_these = true;
354 
355  for (Index j=0; j<vo.nelem(); ++j)
356  {
357  // Add comma and line break, if not first element:
358  align(ofs,is_first_parameter,indent);
359 
360  // Add comment if this is the first of this sort
361  if (is_first_of_these)
362  {
363  ofs << "// WS Output:\n";
364  ofs << indent;
365  is_first_of_these = false;
366  }
367 
368  ofs << wsv_group_names[Workspace::wsv_data[vo[j]].Group()] << "& "
369  << Workspace::wsv_data[vo[j]].Name();
370  }
371  }
372 
373  // Write the Generic output workspace variables:
374  {
375  // Flag first parameter of this sort:
376  bool is_first_of_these = true;
377 
378  for (Index j=0; j<vgo.nelem(); ++j)
379  {
380  // Add comma and line break, if not first element:
381  align(ofs,is_first_parameter,indent);
382 
383  // Add comment if this is the first of this sort
384  if (is_first_of_these)
385  {
386  ofs << "// WS Generic Output:\n";
387  ofs << indent;
388  is_first_of_these = false;
389  }
390 
391  if (wsv_group_names[mdd.GOutType()[j]] == "Any") ofs << "T& ";
392  else ofs << wsv_group_names[mdd.GOutType()[j]] << "& ";
393 
394  if (mdd.GOut()[j].length()) ofs << mdd.GOut()[j];
395  else ofs << "genericoutput" << j+1;
396  }
397  }
398 
399  // Write the Generic output workspace variable names:
400  if (mdd.PassWsvNames())
401  {
402  // Flag first parameter of this sort:
403  bool is_first_of_these = true;
404 
405  for (Index j=0; j<vgo.nelem(); ++j)
406  {
407  // Add comma and line break, if not first element:
408  align(ofs,is_first_parameter,indent);
409 
410  // Add comment if this is the first of this sort
411  if (is_first_of_these)
412  {
413  ofs << "// WS Generic Output Names:\n";
414  ofs << indent;
415  is_first_of_these = false;
416  }
417 
418  ofs << "const String& ";
419  if (mdd.GOut()[j].length())
420  ofs << mdd.GOut()[j] << "_wsvname";
421  else
422  ofs << "genericoutput" << j+1 << "_wsvname";
423  }
424  }
425 
426  // Write the Input workspace variables:
427  {
428  // Flag first parameter of this sort.
429  bool is_first_of_these = true;
430 
431  for (Index j=0; j<vi.nelem(); ++j)
432  {
433  // Add comma and line break, if not first element:
434  align(ofs,is_first_parameter,indent);
435 
436  // Add type if this is the first of this sort.
437  if (is_first_of_these)
438  {
439  ofs << "// WS Input:\n";
440  ofs << indent;
441  is_first_of_these = false;
442  }
443 
444  ofs << "const "
445  << wsv_group_names[Workspace::wsv_data[vi[j]].Group()] << "& "
446  << Workspace::wsv_data[vi[j]].Name();
447  }
448  }
449 
450  // Write the Generic input workspace variables:
451  {
452  // Flag first parameter of this sort.
453  bool is_first_of_these = true;
454 
455  for (Index j=0; j<vgi.nelem(); ++j)
456  {
457  // Add comma and line break, if not first element:
458  align(ofs,is_first_parameter,indent);
459 
460  // Add type if this is the first of this sort.
461  if (is_first_of_these)
462  {
463  ofs << "// WS Generic Input:\n";
464  ofs << indent;
465  is_first_of_these = false;
466  }
467 
468  if (wsv_group_names[mdd.GInType()[j]] == "Any")
469  {
470  ofs << "const T& ";
471  if (mdd.GIn()[j].length()) ofs << mdd.GIn()[j];
472  else ofs << "genericinput" << j+1;
473  }
474  else
475  {
476  ofs << "const " << wsv_group_names[mdd.GInType()[j]] << "& ";
477  if (mdd.GIn()[j].length()) ofs << mdd.GIn()[j];
478  else ofs << "genericinput" << j+1;
479  }
480  }
481  }
482 
483  // Write the Generic input workspace variable names:
484  if (mdd.PassWsvNames())
485  {
486  // Flag first parameter of this sort:
487  bool is_first_of_these = true;
488 
489  for (Index j=0; j<vgi.nelem(); ++j)
490  {
491  // Add comma and line break, if not first element:
492  align(ofs,is_first_parameter,indent);
493 
494  // Add comment if this is the first of this sort
495  if (is_first_of_these)
496  {
497  ofs << "// WS Generic Input Names:\n";
498  ofs << indent;
499  is_first_of_these = false;
500  }
501 
502  ofs << "const String& ";
503  if (mdd.GIn()[j].length())
504  ofs << mdd.GIn()[j] << "_wsvname";
505  else
506  ofs << "genericinput" << j+1 << "_wsvname";
507  }
508  }
509 
510  // Write agenda, if there is one:
511  if ( mdd.AgendaMethod() )
512  {
513  align(ofs,is_first_parameter,indent);
514  ofs << "// Agenda from controlfile:\n";
515  ofs << indent;
516  ofs << "const Agenda& input_agenda";
517  }
518 
519  // Flag that is set to false if the WSM has verbosity as an input or
520  // output already. Otherwise it's passed as the last parameter.
521  bool pass_verbosity = true;
522 
523  // Find out if the WSM has the verbosity as input.
524  for (Index j = 0; pass_verbosity && j < mdd.In().nelem(); j++)
525  {
526  if (wsv_data[mdd.In()[j]].Name() == "verbosity")
527  {
528  pass_verbosity = false;
529  }
530  }
531 
532  // Find out if the WSM has the verbosity as output.
533  for (Index j = 0; pass_verbosity && j < mdd.Out().nelem(); j++)
534  {
535  if (wsv_data[mdd.Out()[j]].Name() == "verbosity")
536  {
537  pass_verbosity = false;
538  }
539  }
540 
541  if (pass_verbosity)
542  {
543  align(ofs,is_first_parameter,indent);
544  ofs << "// Verbosity object:\n";
545  ofs << indent;
546  ofs << "const Verbosity& verbosity";
547  }
548 
549  ofs << ");\n\n";
550 }
551 
552 
554 {
555  ostringstream os;
556 
557  bool is_sane = true;
558  for (Array<MdRecord>::const_iterator i = md_data.begin ();
559  i < md_data.end (); ++i)
560  {
561  bool invalid_author = false;
562  for (ArrayOfString::const_iterator j = i->Authors ().begin ();
563  !invalid_author && j < i->Authors ().end (); ++j)
564  {
565  if (*j == "" || *j == "unknown")
566  invalid_author = true;
567  }
568 
569  if (invalid_author)
570  {
571  os << i->Name () << ": Missing or invalid author.\n";
572  is_sane = false;
573  }
574 
575  switch (check_newline (i->Description ())) {
576  case 1:
577  os << i->Name () << ": Empty description.\n";
578  is_sane = false;
579  break;
580  case 2:
581  os << i->Name () << ": Missing newline at the end of description.\n";
582  is_sane = false;
583  break;
584  case 3:
585  os << i->Name () << ": Extra newline at the end of description.\n";
586  is_sane = false;
587  break;
588  }
589  }
590 
591  if (!is_sane)
592  {
593  cerr << "Error(s) found in workspace method documentation (check methods.cc):\n"
594  << os.str ();
595  }
596 
597  return is_sane;
598 }
599 
600 
601 int main()
602 {
603  try
604  {
605  // Make the global data visible:
607  extern Array<MdRecord> md_data;
608 
609  // Initialize the wsv group name array:
611 
612  // Initialize wsv data.
614 
615  // Initialize WsvMap.
617 
618  // Initialize method data.
620 
621  // Expand supergeneric methods:
623 
624  if (!md_sanity_checks (md_data))
625  return 1;
626 
627  const Index n_md = md_data.nelem();
628 
629  // Write auto_md.h:
630  // -----------
631  ofstream ofs;
632  open_output_file(ofs,"auto_md.h");
633 
634  ofs << "// This file was generated automatically by make_auto_md_h.cc.\n";
635  ofs << "// DO NOT EDIT !\n";
636  ofs << "// Generated: "
637  << __DATE__ << ", "
638  << __TIME__ << "\n\n";
639 
640  ofs << "#ifndef auto_md_h\n";
641  ofs << "#define auto_md_h\n\n";
642 
643  ofs << "#include \"matpackI.h\"\n"
644  << "#include \"matpackII.h\"\n"
645  << "#include \"abs_species_tags.h\"\n"
646  << "#include \"gas_abs_lookup.h\"\n"
647  << "#include \"gridded_fields.h\"\n"
648  << "#include \"optproperties.h\"\n"
649  << "#include \"jacobian.h\"\n"
650  << "#include \"mc_antenna.h\"\n"
651  << "#include \"m_general.h\"\n"
652  << "#include \"parser.h\"\n"
653  << "#include \"workspace_ng.h\"\n"
654  << "\n";
655 
656  ofs << "// This is only used for a consistency check. You can get the\n"
657  << "// number of WSMs from md_data.nelem().\n"
658  << "#define N_MD " << n_md << "\n\n";
659 
660 
661  // We don't really need these handles, do we?
662 
663 // ofs << "enum MdHandle{\n";
664 // for (Index i=0; i<n_md-1; ++i)
665 // {
666 // ofs << " " << md_data[i].Name() << "_,\n";
667 // }
668 // ofs << " " << md_data[n_md-1].Name() << "_\n";
669 // ofs << "};\n\n";
670 
671  // Add all the method function declarations
672  ofs << "// Method function declarations:\n\n";
673  for (Index i=0; i<n_md; ++i)
674  {
675  const MdRecord& mdd = md_data[i];
676  if ( !mdd.SuppressHeader() )
677  {
679  write_method_header( ofs, mdd );
680  }
681  }
682 
683  // Add all the method function declarations
684  ofs << "// Supergeneric template function declarations:\n\n";
685  for (Index i=0; i<md_data_raw.nelem (); ++i)
686  {
687  const MdRecord& mdd = md_data_raw[i];
688  if ( mdd.Supergeneric() )
689  {
691  write_method_header( ofs, mdd );
692  }
693  }
694 
695  // Add all the get-away function declarations:
696  ofs << "// Get-away function declarations:\n\n";
697  for (Index i=0; i<n_md; ++i)
698  {
699  const MdRecord& mdd = md_data[i];
700  if ( mdd.Supergeneric() )
701  {
702  ofs << "void " << mdd.Name()
703  << "_sg_" << mdd.ActualGroups()
704  << "_g(Workspace& ws, const MRecord& mr);\n";
705  }
706  else
707  {
708  ofs << "void " << mdd.Name()
709  << "_g(Workspace& ws, const MRecord& mr);\n";
710  }
711  }
712 
713  ofs << "\n";
714 
715  // Create prototypes for the agenda wrappers
716 
717  // Initialize agenda data.
720 
721  extern const Array<AgRecord> agenda_data;
722  for (Index i = 0; i < agenda_data.nelem (); i++)
723  {
725 
726  ofs << ";\n\n";
727  }
728 
729  ofs << "\n#endif // auto_md_h\n";
730 
731  // Close auto_md.h.
732  ofs.close();
733 
734  }
735  catch (runtime_error x)
736  {
737  cout << "Something went wrong. Message text:\n";
738  cout << x.what() << '\n';
739  return 1;
740  }
741 
742  return 0;
743 }
agenda_record.h
Declarations for AgRecord, storing lookup information for one agenda.
MdRecord::GOut
const ArrayOfString & GOut() const
Definition: methods.h:93
Workspace::wsv_data
static Array< WsvRecord > wsv_data
Definition: workspace_ng.h:59
MdRecord::Supergeneric
bool Supergeneric() const
Definition: methods.h:108
MdRecord::GOutType
const ArrayOfIndex & GOutType() const
Definition: methods.h:94
define_agenda_data
void define_agenda_data()
Definition: agendas.cc:43
md_data_raw
Array< MdRecord > md_data_raw
Lookup information for workspace methods.
Definition: globals_2.cc:54
MdRecord::GInType
const ArrayOfIndex & GInType() const
Definition: methods.h:99
MdRecord::PassWsvNames
bool PassWsvNames() const
Definition: methods.h:111
write_method_header_documentation
void write_method_header_documentation(ofstream &ofs, const MdRecord &mdd)
Write method header documentation.
Definition: make_auto_md_h.cc:94
md_sanity_checks
bool md_sanity_checks(const Array< MdRecord > &md_data)
Definition: make_auto_md_h.cc:553
main
int main()
Definition: make_auto_md_h.cc:601
MdRecord::SuppressHeader
bool SuppressHeader() const
Definition: methods.h:109
array.h
This file contains the definition of Array.
Array< WsvRecord >
MdRecord::ActualGroups
const String & ActualGroups() const
Definition: methods.h:112
agenda_data
Array< AgRecord > agenda_data
Definition: agendas.cc:40
write_agenda_wrapper_header
void write_agenda_wrapper_header(ofstream &ofs, const AgRecord &agr)
Write a agenda wrapper header.
Definition: agenda_record.cc:279
my_basic_string
The implementation for String, the ARTS string class.
Definition: mystring.h:62
write_method_header
void write_method_header(ofstream &ofs, const MdRecord &mdd)
Write a method header.
Definition: make_auto_md_h.cc:272
NODEF
#define NODEF
Definition: methods.h:36
my_basic_string::insert_substr
void insert_substr(const my_basic_string< charT > &searchstr, const my_basic_string< charT > &insstr)
Insert string before all occurrences of the substring.
Definition: mystring.h:199
align
void align(ofstream &ofs, bool &is_first_parameter, const String &indent)
Definition: make_auto_md_h.cc:76
MdRecord::AgendaMethod
bool AgendaMethod() const
Definition: methods.h:107
Workspace::define_wsv_data
static void define_wsv_data()
Definition: workspace.cc:50
wsv_group_names
ArrayOfString wsv_group_names
Definition: groups.cc:40
expand_md_data_raw_to_md_data
void expand_md_data_raw_to_md_data()
Expand supergeneric methods.
Definition: methods_aux.cc:364
define_wsv_group_names
void define_wsv_group_names()
Define the array of workspace variable group names.
Definition: groups.cc:80
MdRecord::Name
const String & Name() const
Definition: methods.h:89
MdRecord::In
const ArrayOfIndex & In() const
Definition: methods.h:97
MdRecord::InOnly
const ArrayOfIndex & InOnly() const
Definition: methods.h:103
open_output_file
void open_output_file(ofstream &file, const String &name)
Open a file for writing.
Definition: file.cc:97
my_basic_string::nelem
Index nelem() const
Number of elements.
Definition: mystring.h:242
MdRecord::GInDefault
const Array< String > & GInDefault() const
Definition: methods.h:101
md_data
Array< MdRecord > md_data
Lookup information for workspace methods.
Definition: globals_2.cc:62
MdRecord::GIn
const ArrayOfString & GIn() const
Definition: methods.h:98
workspace_ng.h
This file contains the declaration and partly the implementation of the workspace class.
MdRecord
All information for one workspace method.
Definition: methods.h:42
check_newline
int check_newline(const String &s)
Checks if there is exactly one newline character at the end of the string.
Definition: file.cc:317
file.h
This file contains basic functions to handle ASCII files.
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
MdRecord::Out
const ArrayOfIndex & Out() const
Definition: methods.h:92
Workspace::define_wsv_map
static void define_wsv_map()
Definition: workspace_ng.cc:50
get_wsv_group_id
Index get_wsv_group_id(const String &name)
Definition: groups.cc:192
MdRecord::Description
const String & Description() const
Definition: methods.h:90
MdRecord::PassWorkspace
bool PassWorkspace() const
Definition: methods.h:110
Array::nelem
Index nelem() const
Number of elements.
Definition: array.h:172
methods.h
Declaration of the class MdRecord.
define_md_data_raw
void define_md_data_raw()
Definition: methods.cc:121
MdRecord::Authors
const ArrayOfString & Authors() const
Definition: methods.h:91
arts.h
The global header file for ARTS.