casa
$Rev:20696$
|
00001 //# Quality.h: Quality parameter definitions for interface to table data 00002 //# Copyright (C) 1994,1995,1996,1997,2000 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id: Quality.h 21292 2012-11-28 14:58:19Z gervandiepen $ 00027 00028 #ifndef MEASURES_QUALITY_H 00029 #define MEASURES_QUALITY_H 00030 00031 #include <casa/aips.h> 00032 #include <casa/BasicSL/String.h> 00033 #include <casa/Arrays/Vector.h> 00034 00035 namespace casa { //# NAMESPACE CASA - BEGIN 00036 00037 // <summary> 00038 // Quality parameter definitions. 00039 // </summary> 00040 00041 // <reviewed tests="tQuality"> 00042 // </reviewed> 00043 00044 // <synopsis> 00045 // This enumerates the available Quality types. This class is a wrapper 00046 // for the ENUM and conversion functions. All methods are static. 00047 // </synopsis> 00048 00049 class Quality { 00050 public: 00051 00052 //# The enum comments below are placed in the position they are to make the 00053 //# extracted documentation look nice. 00054 enum QualityTypes { 00055 00056 // undefined value = 0 00057 Undefined=0, 00058 00059 // the data type 00060 DATA, 00061 00062 // the error type 00063 ERROR 00064 }; 00065 00066 // The number of QualityTypes. 00067 // <note role=warning> 00068 // <b>Update</b> <src>NumberOfTypes</src> when entries are added. 00069 // </note> 00070 enum { 00071 // The number of QualityTypes. 00072 NumberOfTypes = 3 00073 }; 00074 00075 // Convert Int to QualityTypes, returns Quality::Undefined if 00076 // it is an invalid type 00077 static QualityTypes type(Int qualityNumber); 00078 00079 // Convert String to QualityTypes, returns Quality::Undefined if 00080 // it is an unrecognized string. The valid strings are the 00081 // same as the characters used in the enum above (i.e. 00082 // "DATA" returns Quality::DATA, "ERROR" returns Quality::ERROR, etc). 00083 static QualityTypes type(const String & quality); 00084 00085 // Convert QualityTypes to String, Quality::Undefined returns 00086 // "??". 00087 static String name(QualityTypes qualityType); 00088 00089 // Get all recognized quality names in no guaranteed order. 00090 // The undefined type can be included. 00091 static Vector<String> allNames(Bool includeUndefined = False); 00092 00093 private: 00094 }; 00095 00096 } //# NAMESPACE CASA - END 00097 00098 #endif 00099