casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LELLattCoordBase.h
Go to the documentation of this file.
1 //# LELLattCoordBase.h: The base letter class for lattice coordinates in LEL
2 //# Copyright (C) 1998,1999,2000,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef LATTICES_LELLATTCOORDBASE_H
29 #define LATTICES_LELLATTCOORDBASE_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
35 
36 namespace casacore { //# NAMESPACE CASACORE - BEGIN
37 
38 //# Forward Declarations
39 class LELImageCoord;
40 class IPosition;
41 template<class T> class Vector;
42 
43 
44 // <summary>
45 // The base letter class for lattice coordinates in LEL.
46 // </summary>
47 
48 // <use visibility=local>
49 
50 // <reviewed reviewer="Bob Garwood" date="2000/01/25" tests="tLatticeExpr">
51 // </reviewed>
52 
53 // <prerequisite>
54 // <li> <linkto class="Lattice"> Lattice</linkto>
55 // <li> <linkto class="LELCoordinates"> LELCoordinates</linkto>
56 // </prerequisite>
57 
58 // <synopsis>
59 // This abstract base class is the basic letter for the envelope class
60 // <linkto class=LELCoordinates>LELCoordinates</linkto>.
61 // It does not do anything, but makes it possible that derived classes
62 // (like <linkto class=LELLattCoord>LELLattCoord</linkto> and
63 // <linkto class=LELImageCoord>LELImageCoord</linkto>)
64 // implement their own behaviour.
65 // </synopsis>
66 
67 // <motivation>
68 // It must be possible to handle image coordinates in a lattice
69 // expression.
70 // </motivation>
71 
72 //# <todo asof="1998/01/31">
73 //# <li>
74 //# </todo>
75 
76 
78 {
79 public:
81  {};
82 
83  // A virtual destructor is needed so that it will use the actual
84  // destructor in the derived class.
85  virtual ~LELLattCoordBase();
86 
87  // Does the class have true coordinates?
88  virtual Bool hasCoordinates() const = 0;
89 
90  // The name of the class.
91  virtual String classname() const = 0;
92 
93  // Get the coordinates of the spectral axis for the given shape.
94  // It returns the pixel axis number of the spectral coordinates.
95  // -1 indicates that there is no pixel spectral axis.
96  // An exception is thrown if there are no world spectral coordinates.
97  virtual uInt getSpectralInfo (Vector<Double>& worldCoordinates,
98  const IPosition& shape) const = 0;
99 
100  // Check how the coordinates of this and that compare.
101  virtual Int compare (const LELLattCoordBase& other) const = 0;
102 
103  // Check how the coordinates of this and that image compare.
104  // This function is used by <src>conform</src> to make a
105  // double virtual dispatch possible.
106  virtual Int doCompare (const LELImageCoord& other) const = 0;
107 };
108 
109 
110 
111 } //# NAMESPACE CASACORE - END
112 
113 #endif
114 
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
int Int
Definition: aipstype.h:50
std::vector< double > Vector
Definition: ds9context.h:24
virtual uInt getSpectralInfo(Vector< Double > &worldCoordinates, const IPosition &shape) const =0
Get the coordinates of the spectral axis for the given shape.
virtual Bool hasCoordinates() const =0
Does the class have true coordinates?
virtual Int compare(const LELLattCoordBase &other) const =0
Check how the coordinates of this and that compare.
virtual String classname() const =0
The name of the class.
virtual Int doCompare(const LELImageCoord &other) const =0
Check how the coordinates of this and that image compare.
The letter class for image coordinates.
Definition: LELImageCoord.h:77
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Definition: ExprNode.h:1944
The base letter class for lattice coordinates in LEL.
virtual ~LELLattCoordBase()
A virtual destructor is needed so that it will use the actual destructor in the derived class...
String: the storage and methods of handling collections of characters.
Definition: String.h:223
unsigned int uInt
Definition: aipstype.h:51
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42