ARTS  1.0.222
wsv_aux.h
Go to the documentation of this file.
1 /* Copyright (C) 2000, 2001 Stefan Buehler <sbuehler@uni-bremen.de>
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 wsv_aux_h
29 #define wsv_aux_h
30 
31 #include "auto_wsv_groups.h"
32 
41 template<class T>
42 class WsvPointer : public WsvP {
43 public:
44  WsvPointer(T* x) : mx(x) { /* Nothing to do here. */ };
45  operator T*() { return mx; }
46 private:
47  T* mx;
48 };
49 
50 
51 
60 class WsvRecord {
61 public:
62 
64  WsvRecord(){};
65 
70  WsvRecord(const char name[],
71  const char description[],
72  const Index group)
73  : mname(name),
74  mdescription(description),
75  mgroup(group)
76  {
77  // Nothing to do here.
78  }
80  const String& Name() const { return mname; }
82  const String& Description() const { return mdescription; }
84  Index Group() const { return mgroup; }
85 private:
89 };
90 
93 ostream& operator<<(ostream& os, const WsvRecord& wr);
94 
95 
104 void define_wsv_data();
105 
110 void define_wsv_map();
111 
112 
113 #endif // wsv_aux_h
WsvPointer::mx
T * mx
Definition: wsv_aux.h:47
WsvRecord::mgroup
Index mgroup
Definition: wsv_aux.h:88
WsvRecord::WsvRecord
WsvRecord()
Default constructor.
Definition: wsv_aux.h:64
auto_wsv_groups.h
Defines the enum type that acts as a handle for workspace variables groups.
define_wsv_data
void define_wsv_data()
Define the lookup data for the workspace variables.
Definition: workspace.cc:44
WsvRecord::Group
Index Group() const
The wsv group to which this variable belongs.
Definition: wsv_aux.h:84
WsvRecord::mdescription
String mdescription
Definition: wsv_aux.h:87
my_basic_string< char >
WsvRecord::Name
const String & Name() const
Name of this workspace variable.
Definition: wsv_aux.h:80
WsvPointer::WsvPointer
WsvPointer(T *x)
Definition: wsv_aux.h:44
operator<<
ostream & operator<<(ostream &os, const WsvRecord &wr)
Output operator for WsvRecord.
Definition: workspace_aux.cc:52
define_wsv_map
void define_wsv_map()
Define WsvMap.
Definition: workspace_aux.cc:40
WsvP
Definition: auto_wsv_groups.h:48
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: arts.h:153
WsvRecord
This class contains all static information for one workspace variable.
Definition: wsv_aux.h:60
WsvRecord::Description
const String & Description() const
A text describing this workspace variable.
Definition: wsv_aux.h:82
WsvRecord::WsvRecord
WsvRecord(const char name[], const char description[], const Index group)
Initializing constructor.
Definition: wsv_aux.h:70
WsvPointer
Template for Wsv Pointers.
Definition: wsv_aux.h:42
WsvRecord::mname
String mname
Definition: wsv_aux.h:86