casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CPolarizationType.h
Go to the documentation of this file.
1 
2 #ifndef CPolarizationType_H
3 #define CPolarizationType_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 CPolarizationType.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 PolarizationTypeMod
55 {
58 
59 
60  const char *const revision = "-1";
61  const int version = 1;
62 
63  enum PolarizationType
64  {
65  R
66  ,
67  L
68  ,
69  X
70  ,
71  Y
72  ,
73  BOTH
75  };
76  typedef PolarizationType &PolarizationType_out;
77 }
78 #endif
79 
80 namespace PolarizationTypeMod {
81  std::ostream & operator << ( std::ostream & out, const PolarizationType& value);
82  std::istream & operator >> ( std::istream & in , PolarizationType& value );
83 }
84 
89 class CPolarizationType {
90  public:
91 
96  static const std::string& sR;
98  static const std::string& sL;
100  static const std::string& sX;
102  static const std::string& sY;
104  static const std::string& sBOTH;
111  static int version() ;
112 
113 
119  static std::string revision() ;
120 
121 
126  static unsigned int size() ;
127 
128 
134  static std::string name(const PolarizationTypeMod::PolarizationType& e);
135 
139  static std::string toString(const PolarizationTypeMod::PolarizationType& f) { return name(f); }
146  static const std::vector<std::string> names();
147 
148 
149  // Create a PolarizationType enumeration object by specifying its name.
150  static PolarizationTypeMod::PolarizationType newPolarizationType(const std::string& name);
151 
157  static PolarizationTypeMod::PolarizationType literal(const std::string& name);
158 
164  static PolarizationTypeMod::PolarizationType from_int(unsigned int i);
165 
166 
167  private:
168  /* Not Implemented. This is a pure static class. */
172 
173  static std::string badString(const std::string& name) ;
174  static std::string badInt(unsigned int i) ;
175 
176 };
177 
178 #endif
static const std::string & sR
Enumerators as strings.
static PolarizationTypeMod::PolarizationType from_int(unsigned int i)
static const std::vector< std::string > names()
Returns vector of all the enumerators as strings.
CPolarizationType & operator=(const CPolarizationType &)
static std::string toString(const PolarizationTypeMod::PolarizationType &f)
Equivalent to the name method.
static std::string revision()
Return the revision as a string.
static const std::string & sX
static PolarizationTypeMod::PolarizationType newPolarizationType(const std::string &name)
Create a PolarizationType enumeration object by specifying its name.
static int version()
Return the major version number as an int.
static std::string name(const PolarizationTypeMod::PolarizationType &e)
Returns an enumerator as a string.
static const std::string & sY
std::ostream & operator<<(std::ostream &out, const PolarizationType &value)
static const std::string & sL
static std::string badString(const std::string &name)
static std::string badInt(unsigned int i)
static PolarizationTypeMod::PolarizationType literal(const std::string &name)
const Double e
e and functions thereof:
A helper class for the enumeration PolarizationType.
static unsigned int size()
Return the number of enumerators declared in PolarizationTypeMod::PolarizationType.
static const std::string & sBOTH
std::istream & operator>>(std::istream &in, PolarizationType &value)
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.