ARTS  2.2.66
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 "messages.h"
33 #include "mystring.h"
34 #include "workspace_ng.h"
35 #include "agenda_class.h"
36 
37 
38 /* Workspace method: Doxygen documentation will be auto-generated */
39 template< class T >
40 void 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 {
48  // The use of CloneSize should not be necessary anymore, thanks to
49  // the new copy semantics.
50  // CloneSize( out, outname, in, inname );
51  out = in;
52 }
53 
54 /* Workspace method: Doxygen documentation will be auto-generated */
55 void Copy(Workspace& ws,
56  // WS Generic Output:
57  Agenda& out,
58  const String& out_name,
59  // WS Generic Input:
60  const Agenda& in,
61  const String& /* in_name */,
62  const Verbosity& verbosity)
63 {
64  // The use of CloneSize should not be necessary anymore, thanks to
65  // the new copy semantics.
66  // CloneSize( out, outname, in, inname );
67  out = in;
68  out.set_name(out_name);
69  out.check(ws, verbosity);
70 }
71 
72 #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:84
Declarations having to do with the four output streams.
This file contains the declaration and partly the implementation of the workspace class...
The implementation for String, the ARTS string class.
Definition: mystring.h:63
Declarations for agendas.
void set_name(const String &nname)
Set agenda name.
Workspace class.
Definition: workspace_ng.h:47
void Copy(T &out, const String &, const T &in, const String &, const Verbosity &)
WORKSPACE METHOD: Copy.
Definition: m_copy.h:40
This file contains the definition of String, the ARTS string class.