ARTS  2.3.1285(git:92a29ea9-dirty)
m_gridded_fields.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2012 Oliver Lemke <olemke@core-dump.info>
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 
28 #ifndef m_gridded_fields_h
29 #define m_gridded_fields_h
30 
31 #include "gridded_fields.h"
32 #include "mystring.h"
33 
34 /* Workspace method: Doxygen documentation will be auto-generated */
35 template <typename T>
36 void GriddedFieldGetName( // WS Generic Output:
37  String& name,
38  // WS Generic Input:
39  const T& gf,
40  const Verbosity&) {
41  // Return the name of the given GriddedField.
42  name = gf.get_name();
43 }
44 
45 /* Workspace method: Doxygen documentation will be auto-generated */
46 template <typename T>
47 void ArrayOfGriddedFieldGetNames( // WS Generic Output:
48  ArrayOfString& names,
49  // WS Generic Input:
50  const Array<T>& aogf,
51  const Verbosity&) {
52  // Return the name of the given GriddedField.
53  names.resize(aogf.nelem());
54  for (Index i = 0; i < aogf.nelem(); i++) {
55  names[i] = aogf[i].get_name();
56  }
57 }
58 
59 #endif // m_gridded_fields_h
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Index nelem() const
Number of elements.
Definition: array.h:195
void ArrayOfGriddedFieldGetNames(ArrayOfString &names, const Array< T > &aogf, const Verbosity &)
void GriddedFieldGetName(String &name, const T &gf, const Verbosity &)
WORKSPACE METHOD: GriddedFieldGetName.
This can be used to make arrays out of anything.
Definition: array.h:40
Implementation of gridded fields.
This file contains the definition of String, the ARTS string class.