casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CAxisName.h
Go to the documentation of this file.
1 
2 #ifndef CAxisName_H
3 #define CAxisName_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 CAxisName.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 AxisNameMod
55 {
58 
59  const char *const revision = "-1";
60  const int version = 1;
61 
62  enum AxisName
63  {
64  TIM
65  ,
66  BAL
67  ,
68  ANT
69  ,
70  BAB
71  ,
72  SPW
73  ,
74  SIB
75  ,
76  SUB
77  ,
78  BIN
79  ,
80  APC
81  ,
82  SPP
83  ,
84  POL
85  ,
86  STO
87  ,
88  HOL
90  };
91  typedef AxisName &AxisName_out;
92 }
93 #endif
94 
95 namespace AxisNameMod {
96  std::ostream & operator << ( std::ostream & out, const AxisName& value);
97  std::istream & operator >> ( std::istream & in , AxisName& value );
98 }
99 
104 class CAxisName {
105  public:
106 
111  static const std::string& sTIM;
113  static const std::string& sBAL;
115  static const std::string& sANT;
117  static const std::string& sBAB;
119  static const std::string& sSPW;
121  static const std::string& sSIB;
123  static const std::string& sSUB;
125  static const std::string& sBIN;
127  static const std::string& sAPC;
129  static const std::string& sSPP;
131  static const std::string& sPOL;
133  static const std::string& sSTO;
135  static const std::string& sHOL;
142  static int version() ;
143 
144 
150  static std::string revision() ;
151 
152 
157  static unsigned int size() ;
158 
159 
165  static std::string name(const AxisNameMod::AxisName& e);
166 
170  static std::string toString(const AxisNameMod::AxisName& f) { return name(f); }
177  static const std::vector<std::string> names();
178 
179 
180  // Create a AxisName enumeration object by specifying its name.
181  static AxisNameMod::AxisName newAxisName(const std::string& name);
182 
188  static AxisNameMod::AxisName literal(const std::string& name);
189 
195  static AxisNameMod::AxisName from_int(unsigned int i);
196 
197 
198  private:
199  /* Not Implemented. This is a pure static class. */
200  CAxisName();
201  CAxisName(const CAxisName&);
202  CAxisName& operator=(const CAxisName&);
203 
204  static std::string badString(const std::string& name) ;
205  static std::string badInt(unsigned int i) ;
206 
207 };
208 
209 #endif
static const std::string & sSPP
Definition: CAxisName.h:130
std::istream & operator>>(std::istream &in, AxisName &value)
static std::string badString(const std::string &name)
static std::string name(const AxisNameMod::AxisName &e)
Returns an enumerator as a string.
static const std::vector< std::string > names()
Returns vector of all the enumerators as strings.
static const std::string & sSPW
Definition: CAxisName.h:120
CAxisName & operator=(const CAxisName &)
static const std::string & sTIM
Enumerators as strings.
Definition: CAxisName.h:112
static const std::string & sBIN
Definition: CAxisName.h:126
static std::string toString(const AxisNameMod::AxisName &f)
Equivalent to the name method.
Definition: CAxisName.h:171
static unsigned int size()
Return the number of enumerators declared in AxisNameMod::AxisName.
static const std::string & sHOL
Definition: CAxisName.h:136
static const std::string & sBAB
Definition: CAxisName.h:118
static AxisNameMod::AxisName newAxisName(const std::string &name)
Create a AxisName enumeration object by specifying its name.
std::ostream & operator<<(std::ostream &out, const AxisName &value)
static std::string badInt(unsigned int i)
A helper class for the enumeration AxisName.
Definition: CAxisName.h:105
static const std::string & sSIB
Definition: CAxisName.h:122
static AxisNameMod::AxisName from_int(unsigned int i)
static const std::string & sSTO
Definition: CAxisName.h:134
static const std::string & sAPC
Definition: CAxisName.h:128
const Double e
e and functions thereof:
static AxisNameMod::AxisName literal(const std::string &name)
static const std::string & sBAL
Definition: CAxisName.h:114
static const std::string & sANT
Definition: CAxisName.h:116
static int version()
Return the major version number as an int.
static const std::string & sPOL
Definition: CAxisName.h:132
static std::string revision()
Return the revision as a string.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static const std::string & sSUB
Definition: CAxisName.h:124