casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AnnSymbol.h
Go to the documentation of this file.
1 //# Copyright (C) 1998,1999,2000,2001
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef ANNOTATIONS_ANNSYMBOL_H
27 #define ANNOTATIONS_ANNSYMBOL_H
28 
30 
32 
33 namespace casa {
34 
35 // <summary>Represents a symbol annotation</summary>
36 
37 // <use visibility=export>
38 
39 // <reviewed reviewer="" date="yyyy/mm/dd">
40 // </reviewed>
41 
42 // <synopsis>
43 
44 // Represents an ascii symbol annotation
45 // </synopsis>
46 
47 class AnnSymbol: public AnnotationBase {
48 public:
49 
50  // allowed symbols
51  enum Symbol {
69  X,
75  };
76 
77  AnnSymbol(
78  const casacore::Quantity& x, const casacore::Quantity& y,
79  const casacore::String& dirRefFrameString,
80  const casacore::CoordinateSystem& csys,
81  const casacore::Char symbolChar,
82  const casacore::Quantity& beginFreq,
83  const casacore::Quantity& endFreq,
84  const casacore::String& freqRefFrame,
85  const casacore::String& dopplerString,
86  const casacore::Quantity& restfreq,
88  );
89 
90  AnnSymbol(
91  const casacore::Quantity& x, const casacore::Quantity& y,
92  const casacore::CoordinateSystem& csys,
93  const Symbol symbol,
95  );
96 
97  // implicit copy constructor and destructor are fine
98 
99  AnnSymbol& operator=(const AnnSymbol& other);
100 
102 
103  Symbol getSymbol() const;
104 
105  static Symbol charToSymbol(const casacore::Char c);
106 
107  static casacore::Char symbolToChar(const Symbol s);
108 
109  virtual std::ostream& print(std::ostream &os) const;
110 
111 private:
115  const static casacore::String _class;
116  static std::map<casacore::Char, Symbol> _symbolMap;
117 
118  static void _initMap();
119 
120  void _init(const casacore::Quantity& x, const casacore::Quantity& y);
121 
122 };
123 
124 
125 
126 }
127 
128 #endif
A Measure: astronomical direction.
Definition: MDirection.h:174
A 1-D Specialization of the Array class.
Base class for annotations.
static casacore::Char symbolToChar(const Symbol s)
char Char
Definition: aipstype.h:46
Symbol _symbol
Definition: AnnSymbol.h:113
AnnSymbol & operator=(const AnnSymbol &other)
implicit copy constructor and destructor are fine
static void _initMap()
Represents a symbol annotation.
Definition: AnnSymbol.h:47
casacore::MDirection getDirection() const
virtual std::ostream & print(std::ostream &os) const
static const casacore::String _class
Definition: AnnSymbol.h:115
AnnotationBase::Direction _inputDirection
Definition: AnnSymbol.h:112
static Symbol charToSymbol(const casacore::Char c)
AnnSymbol(const casacore::Quantity &x, const casacore::Quantity &y, const casacore::String &dirRefFrameString, const casacore::CoordinateSystem &csys, const casacore::Char symbolChar, const casacore::Quantity &beginFreq, const casacore::Quantity &endFreq, const casacore::String &freqRefFrame, const casacore::String &dopplerString, const casacore::Quantity &restfreq, const casacore::Vector< casacore::Stokes::StokesTypes > &stokes)
const Double c
Fundamental physical constants (SI units):
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Symbol
allowed symbols
Definition: AnnSymbol.h:51
Symbol getSymbol() const
static std::map< casacore::Char, Symbol > _symbolMap
Definition: AnnSymbol.h:116
Interconvert pixel and world coordinates.
casacore::Char _symbolChar
Definition: AnnSymbol.h:114