casacore
Loading...
Searching...
No Matches
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: 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_QUALITY_H
27#define MEASURES_QUALITY_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/casa/BasicSL/String.h>
31#include <casacore/casa/Arrays/Vector.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// <summary>
36// Quality parameter definitions.
37// </summary>
38
39// <reviewed tests="tQuality">
40// </reviewed>
41
42// <synopsis>
43// This enumerates the available Quality types. This class is a wrapper
44// for the ENUM and conversion functions. All methods are static.
45// </synopsis>
46
47class Quality {
48 public:
49 // # The enum comments below are placed in the position they are to make the
50 // # extracted documentation look nice.
52
53 // undefined value = 0
55
56 // the data type
58
59 // the error type
61 };
62
63 // The number of QualityTypes.
64 // <note role=warning>
65 // <b>Update</b> <src>NumberOfTypes</src> when entries are added.
66 // </note>
67 enum {
68 // The number of QualityTypes.
70 };
71
72 // Convert Int to QualityTypes, returns Quality::Undefined if
73 // it is an invalid type
74 static QualityTypes type(Int qualityNumber);
75
76 // Convert String to QualityTypes, returns Quality::Undefined if
77 // it is an unrecognized string. The valid strings are the
78 // same as the characters used in the enum above (i.e.
79 // "DATA" returns Quality::DATA, "ERROR" returns Quality::ERROR, etc).
80 static QualityTypes type(const String& quality);
81
82 // Convert QualityTypes to String, Quality::Undefined returns
83 // "??".
84 static String name(QualityTypes qualityType);
85
86 // Get all recognized quality names in no guaranteed order.
87 // The undefined type can be included.
88 static Vector<String> allNames(Bool includeUndefined = False);
89
90 private:
91};
92
93} // namespace casacore
94
95#endif
@ NumberOfTypes
The number of QualityTypes.
Definition Quality.h:69
@ Undefined
undefined value = 0
Definition Quality.h:54
@ DATA
the data type
Definition Quality.h:57
@ ERROR
the error type
Definition Quality.h:60
static QualityTypes type(const String &quality)
Convert String to QualityTypes, returns Quality::Undefined if it is an unrecognized string.
static QualityTypes type(Int qualityNumber)
Convert Int to QualityTypes, returns Quality::Undefined if it is an invalid type.
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 "??".
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
const Bool False
Definition aipstype.h:42
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40