ARTS  1.0.222
workspace_aux.cc
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 
30 #include "arts.h"
31 #include <map>
32 #include "matpackI.h"
33 #include "array.h"
34 #include "auto_wsv_groups.h"
35 #include "wsv_aux.h"
36 
38 std::map<String, Index> WsvMap;
39 
41 {
42  extern const Array<WsvRecord> wsv_data;
43  extern std::map<String, Index> WsvMap;
44 
45  for ( Index i=0 ; i<wsv_data.nelem() ; ++i)
46  {
47  WsvMap[wsv_data[i].Name()] = i;
48  }
49 }
50 
51 
52 ostream& operator<<(ostream& os, const WsvRecord& wr)
53 {
54  extern const ArrayOfString wsv_group_names;
55 
56  os << "\n*--------------------------------------------------------------*\n"
57  << "Workspace variable = " << wr.Name()
58  << "\n----------------------------------------------------------------\n"
59  << "\n" << wr.Description() << "\n"
60  << "\n----------------------------------------------------------------\n"
61  << "Group = " << wsv_group_names[wr.Group()]
62  << "\n*--------------------------------------------------------------*\n";
63 
64  return os;
65 }
define_wsv_map
void define_wsv_map()
Define WsvMap.
Definition: workspace_aux.cc:40
auto_wsv_groups.h
Defines the enum type that acts as a handle for workspace variables groups.
wsv_data
const Array< WsvRecord > wsv_data
Definition: workspace.cc:42
array.h
This file contains the definition of Array.
WsvMap
std::map< String, Index > WsvMap
Definition: workspace_aux.cc:38
matpackI.h
Array
This can be used to make arrays out of anything.
Definition: array.h:48
WsvRecord::Group
Index Group() const
The wsv group to which this variable belongs.
Definition: wsv_aux.h:84
WsvRecord::Name
const String & Name() const
Name of this workspace variable.
Definition: wsv_aux.h:80
wsv_group_names
ArrayOfString wsv_group_names
Definition: groups.cc:36
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
operator<<
ostream & operator<<(ostream &os, const WsvRecord &wr)
Output operator for WsvRecord.
Definition: workspace_aux.cc:52
WsvRecord::Description
const String & Description() const
A text describing this workspace variable.
Definition: wsv_aux.h:82
wsv_aux.h
Auxiliary header stuff related to workspace variable groups.
arts.h
The global header file for ARTS.