casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CStokesParameter.h
Go to the documentation of this file.
1 
2 #ifndef CStokesParameter_H
3 #define CStokesParameter_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 CStokesParameter.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 StokesParameterMod
55 {
58 
59  const char *const revision = "-1";
60  const int version = 1;
61 
62  enum StokesParameter
63  {
64  I
65  ,
66  Q
67  ,
68  U
69  ,
70  V
71  ,
72  RR
73  ,
74  RL
75  ,
76  LR
77  ,
78  LL
79  ,
80  XX
81  ,
82  XY
83  ,
84  YX
85  ,
86  YY
87  ,
88  RX
89  ,
90  RY
91  ,
92  LX
93  ,
94  LY
95  ,
96  XR
97  ,
98  XL
99  ,
100  YR
101  ,
102  YL
103  ,
104  PP
105  ,
106  PQ
107  ,
108  QP
109  ,
110  QQ
111  ,
112  RCIRCULAR
113  ,
114  LCIRCULAR
115  ,
116  LINEAR
117  ,
118  PTOTAL
119  ,
120  PLINEAR
121  ,
122  PFTOTAL
123  ,
124  PFLINEAR
125  ,
126  PANGLE
128  };
129  typedef StokesParameter &StokesParameter_out;
130 }
131 #endif
132 
133 namespace StokesParameterMod {
134  std::ostream & operator << ( std::ostream & out, const StokesParameter& value);
135  std::istream & operator >> ( std::istream & in , StokesParameter& value );
136 }
137 
142 class CStokesParameter {
143  public:
144 
149  static const std::string& sI;
151  static const std::string& sQ;
153  static const std::string& sU;
155  static const std::string& sV;
157  static const std::string& sRR;
159  static const std::string& sRL;
161  static const std::string& sLR;
163  static const std::string& sLL;
165  static const std::string& sXX;
167  static const std::string& sXY;
169  static const std::string& sYX;
171  static const std::string& sYY;
173  static const std::string& sRX;
175  static const std::string& sRY;
177  static const std::string& sLX;
179  static const std::string& sLY;
181  static const std::string& sXR;
183  static const std::string& sXL;
185  static const std::string& sYR;
187  static const std::string& sYL;
189  static const std::string& sPP;
191  static const std::string& sPQ;
193  static const std::string& sQP;
195  static const std::string& sQQ;
197  static const std::string& sRCIRCULAR;
199  static const std::string& sLCIRCULAR;
201  static const std::string& sLINEAR;
203  static const std::string& sPTOTAL;
205  static const std::string& sPLINEAR;
207  static const std::string& sPFTOTAL;
209  static const std::string& sPFLINEAR;
211  static const std::string& sPANGLE;
218  static int version() ;
219 
220 
226  static std::string revision() ;
227 
228 
233  static unsigned int size() ;
234 
235 
241  static std::string name(const StokesParameterMod::StokesParameter& e);
242 
246  static std::string toString(const StokesParameterMod::StokesParameter& f) { return name(f); }
253  static const std::vector<std::string> names();
254 
255 
256  // Create a StokesParameter enumeration object by specifying its name.
257  static StokesParameterMod::StokesParameter newStokesParameter(const std::string& name);
258 
264  static StokesParameterMod::StokesParameter literal(const std::string& name);
265 
271  static StokesParameterMod::StokesParameter from_int(unsigned int i);
272 
273 
274  private:
275  /* Not Implemented. This is a pure static class. */
279 
280  static std::string badString(const std::string& name) ;
281  static std::string badInt(unsigned int i) ;
282 
283 };
284 
285 #endif
A helper class for the enumeration StokesParameter.
static const std::string & sQP
static const std::string & sLY
static const std::string & sLX
static const std::string & sRCIRCULAR
static const std::string & sRY
static const std::string & sPFTOTAL
static StokesParameterMod::StokesParameter newStokesParameter(const std::string &name)
Create a StokesParameter enumeration object by specifying its name.
static const std::string & sPTOTAL
static const std::string & sQQ
static const std::string & sYR
static std::string toString(const StokesParameterMod::StokesParameter &f)
Equivalent to the name method.
static const std::string & sPLINEAR
static const std::string & sI
Enumerators as strings.
static const std::vector< std::string > names()
Returns vector of all the enumerators as strings.
static const std::string & sXL
static const std::string & sYY
static const std::string & sYL
static const std::string & sXR
static const std::string & sU
static const std::string & sRX
static const std::string & sLINEAR
static const std::string & sRL
static const std::string & sXX
static const std::string & sPP
static std::string badString(const std::string &name)
std::istream & operator>>(std::istream &in, StokesParameter &value)
static const std::string & sQ
static const std::string & sYX
static const std::string & sRR
CStokesParameter & operator=(const CStokesParameter &)
std::ostream & operator<<(std::ostream &out, const StokesParameter &value)
static std::string badInt(unsigned int i)
static const std::string & sV
static unsigned int size()
Return the number of enumerators declared in StokesParameterMod::StokesParameter. ...
static StokesParameterMod::StokesParameter literal(const std::string &name)
static std::string name(const StokesParameterMod::StokesParameter &e)
Returns an enumerator as a string.
static StokesParameterMod::StokesParameter from_int(unsigned int i)
const Double e
e and functions thereof:
static const std::string & sPFLINEAR
static std::string revision()
Return the revision as a string.
static const std::string & sXY
static const std::string & sPANGLE
static int version()
Return the major version number as an int.
static const std::string & sLCIRCULAR
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static const std::string & sLL
static const std::string & sLR
static const std::string & sPQ