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 {
48public:
49
50 //# The enum comments below are placed in the position they are to make the
51 //# extracted documentation look nice.
53
54 // undefined value = 0
56
57 // the data type
59
60 // the error type
61 ERROR
62 };
63
64 // The number of QualityTypes.
65 // <note role=warning>
66 // <b>Update</b> <src>NumberOfTypes</src> when entries are added.
67 // </note>
68 enum {
69 // The number of QualityTypes.
71 };
72
73 // Convert Int to QualityTypes, returns Quality::Undefined if
74 // it is an invalid type
75 static QualityTypes type(Int qualityNumber);
76
77 // Convert String to QualityTypes, returns Quality::Undefined if
78 // it is an unrecognized string. The valid strings are the
79 // same as the characters used in the enum above (i.e.
80 // "DATA" returns Quality::DATA, "ERROR" returns Quality::ERROR, etc).
81 static QualityTypes type(const String & quality);
82
83 // Convert QualityTypes to String, Quality::Undefined returns
84 // "??".
85 static String name(QualityTypes qualityType);
86
87 // Get all recognized quality names in no guaranteed order.
88 // The undefined type can be included.
89 static Vector<String> allNames(Bool includeUndefined = False);
90
91private:
92};
93
94} //# NAMESPACE CASACORE - END
95
96#endif
97
@ NumberOfTypes
The number of QualityTypes.
Definition Quality.h:70
@ Undefined
undefined value = 0
Definition Quality.h:55
@ DATA
the data type
Definition Quality.h:58
@ ERROR
the error type
Definition Quality.h:61
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:223
this file contains all the compiler specific defines
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