casacore
Loading...
Searching...
No Matches
MCBaseline.h
Go to the documentation of this file.
1//# MCBaseline.h: MBaseline conversion routines
2//# Copyright (C) 1998-2000,2002,2004,2007
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: casa-feedback@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#ifndef MEASURES_MCBASELINE_H
27#define MEASURES_MCBASELINE_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Arrays/ArrayFwd.h>
32#include <casacore/measures/Measures/MBaseline.h>
33#include <casacore/measures/Measures/MeasBase.h>
34#include <casacore/measures/Measures/MeasRef.h>
35#include <casacore/measures/Measures/MCBase.h>
36#include <casacore/measures/Measures/MConvertBase.h>
37#include <casacore/measures/Measures/MeasMath.h>
38
39#include <mutex>
40
41namespace casacore { //# NAMESPACE CASACORE - BEGIN
42
43//# Forward Declarations
44class MCBaseline;
45class String;
46
47//# Typedefs
48
49// <summary> MBaseline conversion routines </summary>
50
51// <use visibility=local>
52
53// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMBaseline" demos="">
54// </reviewed>
55
56// <prerequisite>
57// <li> <linkto class=Measure>Measure</linkto> class
58// <li> <linkto class=MCBase>MCBase</linkto> base class
59// <li> <linkto class=MConvertBase>overall conversion</linkto> class
60// </prerequisite>
61//
62// <etymology>
63// Measure, Convert and Baseline
64// </etymology>
65//
66// <synopsis>
67// Contains state machinery and caching for actual conversions
68// </synopsis>
69//
70// <example>
71// See <linkto module=Measures>Measures</linkto> module description for
72// conversion examples.
73// </example>
74//
75// <motivation>
76// </motivation>
77//
78// <todo asof="2000/09/12">
79// <li> nothing I know
80// </todo>
81
82class MCBaseline : public MCBase {
83
84public:
85
86 //# Friends
87 // Conversion of data
88 friend class MeasConvert<MBaseline>;
89
90 //# Constructors
91 // Default constructor
93
94 //# Destructor
96
97 //# Member functions
98 // Show the state of the conversion engine (mainly for debugging purposes)
99 static String showState();
100
101private:
102 //# Enumerations
103 // The list of actual routines provided.
104 // <note role=warning> Each <src>AA_BB</src> in the list points to routine
105 // that can be used in the FromTo list in the getConvert routine.
106 // In addition the type to which each is converted should be in the
107 // ToRef array, again in the proper order. </note>
159
160 //# Typedefs
161
162 //# Operators
163
164 //# General Member Functions
165
166 //# Enumerations
167
168 //# Cached Data
170
171 //# State machine data
172 // Transition list
174 // Transition matrix
176 // Object to ensure safe multi-threaded lazy single initialization
177 static std::once_flag theirInitOnceFlag;
178
179 //# Constructors
180 // Copy constructor (not implemented)
181 MCBaseline(const MCBaseline &other);
182 // Assignment (not implemented)
184
185 //# Member functions
186
187 // Create conversion function pointer
188 virtual void getConvert(MConvertBase &mc,
189 const MRBase &inref,
190 const MRBase &outref);
191
192 // Create help structures for Measure conversion routines
193 virtual void initConvert(uInt which, MConvertBase &mc);
194
195 // Delete the pointers used in the MeasConvert help structure cache
196 virtual void clearConvert();
197
198 // Routines to convert Baselines from one reference frame to another
199 virtual void doConvert(MeasValue &in,
200 MRBase &inref,
201 MRBase &outref,
202 const MConvertBase &mc);
203 // Conversion routine to cater for inheritance question
205 MRBase &inref,
206 MRBase &outref,
207 const MConvertBase &mc);
208
209private:
210 // Fill the global state. Called using theirInitOnce.
211 static void doFillState();
212};
213
214
215} //# NAMESPACE CASACORE - END
216
217#endif
218
virtual void clearConvert()
Delete the pointers used in the MeasConvert help structure cache.
static std::once_flag theirInitOnceFlag
Object to ensure safe multi-threaded lazy single initialization.
Definition MCBaseline.h:177
virtual void doConvert(MeasValue &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
Routines to convert Baselines from one reference frame to another.
MCBaseline()
Default constructor.
void doConvert(MVBaseline &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
Conversion routine to cater for inheritance question.
static uInt ToRef_p[N_Routes][3]
Transition list.
Definition MCBaseline.h:173
Routes
The list of actual routines provided.
Definition MCBaseline.h:108
virtual void initConvert(uInt which, MConvertBase &mc)
Create help structures for Measure conversion routines.
static uInt FromTo_p[MBaseline::N_Types][MBaseline::N_Types]
Transition matrix.
Definition MCBaseline.h:175
MCBaseline & operator=(const MCBaseline &other)
Assignment (not implemented)
virtual void getConvert(MConvertBase &mc, const MRBase &inref, const MRBase &outref)
Create conversion function pointer.
MCBaseline(const MCBaseline &other)
Copy constructor (not implemented)
static String showState()
Show the state of the conversion engine (mainly for debugging purposes)
static void doFillState()
Fill the global state.
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49