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