ARTS  2.3.1285(git:92a29ea9-dirty)
m_copy.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2012 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 
29 #ifndef m_copy_h
30 #define m_copy_h
31 
32 #include "agenda_class.h"
33 #include "messages.h"
34 #include "mystring.h"
35 #include "workspace_ng.h"
36 
37 /* Workspace method: Doxygen documentation will be auto-generated */
38 template <class T>
39 void Copy( // WS Generic Output:
40  T& out,
41  const String& /* out_name */,
42  // WS Generic Input:
43  const T& in,
44  const String& /* in_name */,
45  const Verbosity&) {
46  out = in;
47 }
48 
49 /* Workspace method: Doxygen documentation will be auto-generated */
50 inline void Copy(Workspace& ws,
51  // WS Generic Output:
52  Agenda& out,
53  const String& out_name,
54  // WS Generic Input:
55  const Agenda& in,
56  const String& /* in_name */,
57  const Verbosity& verbosity) {
58  out = in;
59  out.set_name(out_name);
60  out.check(ws, verbosity);
61 }
62 
63 /* Workspace method: Doxygen documentation will be auto-generated */
64 inline void Copy(Workspace& ws,
65  // WS Generic Output:
66  ArrayOfAgenda& out,
67  const String& out_name,
68  // WS Generic Input:
69  const ArrayOfAgenda& in,
70  const String& /* in_name */,
71  const Verbosity& verbosity) {
72  out = in;
73  for (ArrayOfAgenda::iterator it = out.begin(); it != out.end(); it++) {
74  (*it).set_name(out_name);
75  (*it).check(ws, verbosity);
76  }
77 }
78 
79 #endif // m_copy_h
The Agenda class.
Definition: agenda_class.h:44
void check(Workspace &ws, const Verbosity &verbosity)
Checks consistency of an agenda.
Definition: agenda_class.cc:80
Declarations having to do with the four output streams.
This file contains the Workspace class.
Declarations for agendas.
This can be used to make arrays out of anything.
Definition: array.h:40
void set_name(const String &nname)
Set agenda name.
Workspace class.
Definition: workspace_ng.h:40
void Copy(T &out, const String &, const T &in, const String &, const Verbosity &)
WORKSPACE METHOD: Copy.
Definition: m_copy.h:39
This file contains the definition of String, the ARTS string class.