casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CCalType.h
Go to the documentation of this file.
1 
2 #ifndef CCalType_H
3 #define CCalType_H
4 
5 /*
6  * ALMA - Atacama Large Millimeter Array
7  * (c) European Southern Observatory, 2002
8  * (c) Associated Universities Inc., 2002
9  * Copyright by ESO (in the framework of the ALMA collaboration),
10  * Copyright by AUI (in the framework of the ALMA collaboration),
11  * All rights reserved.
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY, without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26  * MA 02111-1307 USA
27  *
28  * /////////////////////////////////////////////////////////////////
29  * // WARNING! DO NOT MODIFY THIS FILE! //
30  * // --------------------------------------------------------- //
31  * // | This is generated code! Do not modify this file. | //
32  * // | Any changes will be lost when the file is re-generated. | //
33  * // --------------------------------------------------------- //
34  * /////////////////////////////////////////////////////////////////
35  *
36  * File CCalType.h
37  */
38 
39 #ifndef __cplusplus
40 #error This is a C++ include file and cannot be used from plain C
41 #endif
42 
43 #include <iostream>
44 #include <string>
45 #include <vector>
49 #ifndef WITHOUT_ACS
50 #include <almaEnumerations_IFC.h>
51 #else
52 
53 // This part mimics the behaviour of
54 namespace CalTypeMod
55 {
58 
59  const char *const revision = "-1";
60  const int version = 1;
61 
62  enum CalType
63  {
64  CAL_AMPLI
65  ,
66  CAL_ATMOSPHERE
67  ,
68  CAL_BANDPASS
69  ,
70  CAL_CURVE
71  ,
72  CAL_DELAY
73  ,
74  CAL_FLUX
75  ,
76  CAL_FOCUS
77  ,
78  CAL_FOCUS_MODEL
79  ,
80  CAL_GAIN
81  ,
82  CAL_HOLOGRAPHY
83  ,
84  CAL_PHASE
85  ,
86  CAL_POINTING
87  ,
88  CAL_POINTING_MODEL
89  ,
90  CAL_POSITION
91  ,
92  CAL_PRIMARY_BEAM
93  ,
94  CAL_SEEING
95  ,
96  CAL_WVR
97  ,
98  CAL_APPPHASE
100  };
101  typedef CalType &CalType_out;
102 }
103 #endif
104 
105 namespace CalTypeMod {
106  std::ostream & operator << ( std::ostream & out, const CalType& value);
107  std::istream & operator >> ( std::istream & in , CalType& value );
108 }
109 
114 class CCalType {
115  public:
116 
121  static const std::string& sCAL_AMPLI;
123  static const std::string& sCAL_ATMOSPHERE;
125  static const std::string& sCAL_BANDPASS;
127  static const std::string& sCAL_CURVE;
129  static const std::string& sCAL_DELAY;
131  static const std::string& sCAL_FLUX;
133  static const std::string& sCAL_FOCUS;
135  static const std::string& sCAL_FOCUS_MODEL;
137  static const std::string& sCAL_GAIN;
139  static const std::string& sCAL_HOLOGRAPHY;
141  static const std::string& sCAL_PHASE;
143  static const std::string& sCAL_POINTING;
145  static const std::string& sCAL_POINTING_MODEL;
147  static const std::string& sCAL_POSITION;
149  static const std::string& sCAL_PRIMARY_BEAM;
151  static const std::string& sCAL_SEEING;
153  static const std::string& sCAL_WVR;
155  static const std::string& sCAL_APPPHASE;
162  static int version() ;
163 
164 
170  static std::string revision() ;
171 
172 
177  static unsigned int size() ;
178 
179 
185  static std::string name(const CalTypeMod::CalType& e);
186 
190  static std::string toString(const CalTypeMod::CalType& f) { return name(f); }
197  static const std::vector<std::string> names();
198 
199 
200  // Create a CalType enumeration object by specifying its name.
201  static CalTypeMod::CalType newCalType(const std::string& name);
202 
208  static CalTypeMod::CalType literal(const std::string& name);
209 
215  static CalTypeMod::CalType from_int(unsigned int i);
216 
217 
218  private:
219  /* Not Implemented. This is a pure static class. */
220  CCalType();
221  CCalType(const CCalType&);
222  CCalType& operator=(const CCalType&);
223 
224  static std::string badString(const std::string& name) ;
225  static std::string badInt(unsigned int i) ;
226 
227 };
228 
229 #endif
A helper class for the enumeration CalType.
Definition: CCalType.h:115
static const std::string & sCAL_FLUX
Definition: CCalType.h:132
static const std::string & sCAL_FOCUS
Definition: CCalType.h:134
static const std::string & sCAL_FOCUS_MODEL
Definition: CCalType.h:136
CCalType & operator=(const CCalType &)
static const std::string & sCAL_AMPLI
Enumerators as strings.
Definition: CCalType.h:122
static const std::string & sCAL_PHASE
Definition: CCalType.h:142
static const std::string & sCAL_CURVE
Definition: CCalType.h:128
static std::string badString(const std::string &name)
std::istream & operator>>(std::istream &in, CalType &value)
static std::string toString(const CalTypeMod::CalType &f)
Equivalent to the name method.
Definition: CCalType.h:191
static std::string name(const CalTypeMod::CalType &e)
Returns an enumerator as a string.
static const std::string & sCAL_DELAY
Definition: CCalType.h:130
static const std::string & sCAL_GAIN
Definition: CCalType.h:138
static const std::string & sCAL_HOLOGRAPHY
Definition: CCalType.h:140
static std::string revision()
Return the revision as a string.
std::ostream & operator<<(std::ostream &out, const CalType &value)
static CalTypeMod::CalType literal(const std::string &name)
static const std::string & sCAL_ATMOSPHERE
Definition: CCalType.h:124
static const std::string & sCAL_BANDPASS
Definition: CCalType.h:126
static const std::string & sCAL_POINTING
Definition: CCalType.h:144
static CalTypeMod::CalType from_int(unsigned int i)
static std::string badInt(unsigned int i)
static const std::string & sCAL_POINTING_MODEL
Definition: CCalType.h:146
static const std::string & sCAL_WVR
Definition: CCalType.h:154
static int version()
Return the major version number as an int.
static const std::string & sCAL_PRIMARY_BEAM
Definition: CCalType.h:150
static const std::string & sCAL_POSITION
Definition: CCalType.h:148
const Double e
e and functions thereof:
static CalTypeMod::CalType newCalType(const std::string &name)
Create a CalType enumeration object by specifying its name.
static const std::string & sCAL_APPPHASE
Definition: CCalType.h:156
static unsigned int size()
Return the number of enumerators declared in CalTypeMod::CalType.
static const std::vector< std::string > names()
Returns vector of all the enumerators as strings.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static const std::string & sCAL_SEEING
Definition: CCalType.h:152