casacore
Loading...
Searching...
No Matches
QuantumType.h
Go to the documentation of this file.
1//# QuantumType.h: Get an integer type for a Qunatum<T>
2//# Copyright (C) 2010
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 CASA_QUANTUMTYPE_H
27#define CASA_QUANTUMTYPE_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Arrays/ArrayFwd.h>
32#include <casacore/casa/BasicSL/Complex.h>
33
34namespace casacore { //# NAMESPACE CASACORE - BEGIN
35
36//# Forward Declarations
37template <class T> class Quantum;
38
39// <summary> Get an integer type for a Qunatum<T> </summary>
40
41// <use visibility=export>
42
43// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tQuantumHolder" demos="">
44// </reviewed>
45
46// <synopsis>
47// The old way of getting a type number for a Quantum<T> uses the Register
48// class. This did not work well with shared libraries, because each shared
49// library gets its own static type data. Hence a type generated in one
50// python module sometimes mismatched the type for the same Quantum in
51// another module. For instance, it appeared that whem first loading
52// pyrap.tables and thereafter pyrap.quanta, things went wrong.
53//
54// Therefore this class has been developed that returns the type for the
55// Quantum template types used by QuantumHolder.
56// </synopsis>
57
58// <group name=QuantumType>
61 { return 1; }
63 { return 2; }
65 { return 3; }
67 { return 4; }
69 { return 5; }
71 { return 6; }
73 { return 7; }
75 { return 8; }
77 { return 9; }
79 { return 10; }
81 { return 11; }
83 { return 12; }
85 { return 13; }
87 { return 14; }
89 { return 15; }
91 { return 16; }
93 { return 17; }
95 { return 18; }
97 { return 19; }
99 { return 20; }
100
101// </group>
102
103} //# NAMESPACE CASACORE - END
104
105#endif
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
uInt quantumType(const Quantum< Matrix< DComplex > > *)
Definition QuantumType.h:96
uInt quantumType(const Quantum< DComplex > *)
Definition QuantumType.h:66
uInt quantumType(const Quantum< Array< Complex > > *)
Definition QuantumType.h:88
uInt quantumType(const Quantum< Vector< Float > > *)
Definition QuantumType.h:72
uInt quantumType(const Quantum< Matrix< Int > > *)
Definition QuantumType.h:94
uInt quantumType(const Quantum< Matrix< Double > > *)
Definition QuantumType.h:90
uInt quantumType(const Quantum< Vector< Int > > *)
Definition QuantumType.h:74
uInt quantumType(const Quantum< Vector< DComplex > > *)
Definition QuantumType.h:76
uInt quantumType(const Quantum< Vector< Double > > *)
Definition QuantumType.h:70
uInt quantumType(const Quantum< Array< Float > > *)
Definition QuantumType.h:82
uInt quantumType(const Quantum< Float > *)
Definition QuantumType.h:62
uInt quantumType(const Quantum< Double > *)
Definition QuantumType.h:60
uInt quantumType(const Quantum< Matrix< Float > > *)
Definition QuantumType.h:92
uInt quantumType(const Quantum< Array< DComplex > > *)
Definition QuantumType.h:86
uInt quantumType(const Quantum< Array< Int > > *)
Definition QuantumType.h:84
uInt quantumType(const Quantum< Matrix< Complex > > *)
Definition QuantumType.h:98
uInt quantumType(const Quantum< Array< Double > > *)
Definition QuantumType.h:80
uInt quantumType(const Quantum< Vector< Complex > > *)
Definition QuantumType.h:78
uInt quantumType(const Quantum< Complex > *)
Definition QuantumType.h:68