casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Quality.h
Go to the documentation of this file.
1 //# Quality.h: Quality parameter definitions for interface to table data
2 //# Copyright (C) 1994,1995,1996,1997,2000
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 MEASURES_QUALITY_H
29 #define MEASURES_QUALITY_H
30 
31 #include <casacore/casa/aips.h>
34 
35 namespace casacore { //# NAMESPACE CASACORE - BEGIN
36 
37 // <summary>
38 // Quality parameter definitions.
39 // </summary>
40 
41 // <reviewed tests="tQuality">
42 // </reviewed>
43 
44 // <synopsis>
45 // This enumerates the available Quality types. This class is a wrapper
46 // for the ENUM and conversion functions. All methods are static.
47 // </synopsis>
48 
49 class Quality {
50 public:
51 
52  //# The enum comments below are placed in the position they are to make the
53  //# extracted documentation look nice.
54  enum QualityTypes {
55 
56  // undefined value = 0
58 
59  // the data type
61 
62  // the error type
64  };
65 
66  // The number of QualityTypes.
67  // <note role=warning>
68  // <b>Update</b> <src>NumberOfTypes</src> when entries are added.
69  // </note>
70  enum {
71  // The number of QualityTypes.
73  };
74 
75  // Convert Int to QualityTypes, returns Quality::Undefined if
76  // it is an invalid type
77  static QualityTypes type(Int qualityNumber);
78 
79  // Convert String to QualityTypes, returns Quality::Undefined if
80  // it is an unrecognized string. The valid strings are the
81  // same as the characters used in the enum above (i.e.
82  // "DATA" returns Quality::DATA, "ERROR" returns Quality::ERROR, etc).
83  static QualityTypes type(const String & quality);
84 
85  // Convert QualityTypes to String, Quality::Undefined returns
86  // "??".
87  static String name(QualityTypes qualityType);
88 
89  // Get all recognized quality names in no guaranteed order.
90  // The undefined type can be included.
91  static Vector<String> allNames(Bool includeUndefined = False);
92 
93 private:
94 };
95 
96 } //# NAMESPACE CASACORE - END
97 
98 #endif
99 
A 1-D Specialization of the Array class.
int Int
Definition: aipstype.h:50
the data type
Definition: Quality.h:60
static QualityTypes type(Int qualityNumber)
Convert Int to QualityTypes, returns Quality::Undefined if it is an invalid type. ...
the error type
Definition: Quality.h:63
undefined value = 0
Definition: Quality.h:57
static Vector< String > allNames(Bool includeUndefined=False)
Get all recognized quality names in no guaranteed order.
static String name(QualityTypes qualityType)
Convert QualityTypes to String, Quality::Undefined returns &quot;??&quot;.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Quality parameter definitions.
Definition: Quality.h:49
The number of QualityTypes.
Definition: Quality.h:72
const Bool False
Definition: aipstype.h:44
String: the storage and methods of handling collections of characters.
Definition: String.h:223
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42