casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CNetSideband.h
Go to the documentation of this file.
1 
2 #ifndef CNetSideband_H
3 #define CNetSideband_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 CNetSideband.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 NetSidebandMod
55 {
58 
59  const char *const revision = "-1";
60  const int version = 1;
61 
62  enum NetSideband
63  {
64  NOSB
65  ,
66  LSB
67  ,
68  USB
69  ,
70  DSB
72  };
73  typedef NetSideband &NetSideband_out;
74 }
75 #endif
76 
77 namespace NetSidebandMod {
78  std::ostream & operator << ( std::ostream & out, const NetSideband& value);
79  std::istream & operator >> ( std::istream & in , NetSideband& value );
80 }
81 
86 class CNetSideband {
87  public:
88 
93  static const std::string& sNOSB;
95  static const std::string& sLSB;
97  static const std::string& sUSB;
99  static const std::string& sDSB;
106  static int version() ;
107 
108 
114  static std::string revision() ;
115 
116 
121  static unsigned int size() ;
122 
123 
129  static std::string name(const NetSidebandMod::NetSideband& e);
130 
134  static std::string toString(const NetSidebandMod::NetSideband& f) { return name(f); }
141  static const std::vector<std::string> names();
142 
143 
144  // Create a NetSideband enumeration object by specifying its name.
145  static NetSidebandMod::NetSideband newNetSideband(const std::string& name);
146 
152  static NetSidebandMod::NetSideband literal(const std::string& name);
153 
159  static NetSidebandMod::NetSideband from_int(unsigned int i);
160 
161 
162  private:
163  /* Not Implemented. This is a pure static class. */
164  CNetSideband();
165  CNetSideband(const CNetSideband&);
167 
168  static std::string badString(const std::string& name) ;
169  static std::string badInt(unsigned int i) ;
170 
171 };
172 
173 #endif
std::ostream & operator<<(std::ostream &out, const NetSideband &value)
static NetSidebandMod::NetSideband from_int(unsigned int i)
static NetSidebandMod::NetSideband newNetSideband(const std::string &name)
Create a NetSideband enumeration object by specifying its name.
static const std::vector< std::string > names()
Returns vector of all the enumerators as strings.
CNetSideband & operator=(const CNetSideband &)
static const std::string & sNOSB
Enumerators as strings.
Definition: CNetSideband.h:94
No sideband (eg for HEMT)
static const std::string & sLSB
Definition: CNetSideband.h:96
static const std::string & sDSB
Definition: CNetSideband.h:100
static const std::string & sUSB
Definition: CNetSideband.h:98
Upper sideband (USB)
static std::string badInt(unsigned int i)
std::istream & operator>>(std::istream &in, NetSideband &value)
static std::string toString(const NetSidebandMod::NetSideband &f)
Equivalent to the name method.
Definition: CNetSideband.h:135
static NetSidebandMod::NetSideband literal(const std::string &name)
static std::string name(const NetSidebandMod::NetSideband &e)
Returns an enumerator as a string.
Lower sideband (LSB)
static std::string badString(const std::string &name)
Double sideband (no rejection)
const Double e
e and functions thereof:
static unsigned int size()
Return the number of enumerators declared in NetSidebandMod::NetSideband.
static std::string revision()
Return the revision as a string.
static int version()
Return the major version number as an int.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
A helper class for the enumeration NetSideband.
Definition: CNetSideband.h:87