AipsrcVector.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef CASA_AIPSRCVECTOR_H
00029 #define CASA_AIPSRCVECTOR_H
00030
00031 #include <casacore/casa/aips.h>
00032 #include <casacore/casa/BasicSL/String.h>
00033 #include <casacore/casa/Containers/Block.h>
00034 #include <casacore/casa/System/Aipsrc.h>
00035 #include <casacore/casa/OS/Mutex.h>
00036
00037 namespace casacore {
00038
00039
00040 template<class T> class Vector;
00041 class Unit;
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 template <class T> class AipsrcVector : public Aipsrc {
00087
00088 public:
00089
00090
00091
00092 AipsrcVector();
00093
00094 ~AipsrcVector();
00095
00096
00097
00098
00099
00100
00101 static Bool find(Vector<T> &value, const String &keyword);
00102 static Bool find(Vector<T> &value, const String &keyword,
00103 const Vector<T> &deflt);
00104
00105
00106
00107
00108
00109
00110
00111 static Bool find(Vector<T> &value, const String &keyword,
00112 const Unit &defun, const Unit &resun);
00113 static Bool find(Vector<T> &value, const String &keyword,
00114 const Unit &defun, const Unit &resun,
00115 const Vector<T> &deflt);
00116
00117
00118
00119
00120 static uInt registerRC(const String &keyword,
00121 const Vector<T> &deflt);
00122 static uInt registerRC(const String &keyword,
00123 const Unit &defun, const Unit &resun,
00124 const Vector<T> &deflt);
00125
00126
00127
00128
00129 static const Vector<T> &get(uInt keyword);
00130
00131
00132
00133
00134 static void set(uInt keyword, const Vector<T> &deflt);
00135
00136
00137
00138 static void save(uInt keyword);
00139
00140 private:
00141
00142 static AipsrcVector myp_p;
00143 static Mutex theirMutex;
00144
00145
00146 Block<Vector<T> > tlst;
00147 Block<String> ntlst;
00148
00149
00150
00151
00152 AipsrcVector<T> &operator=(const AipsrcVector<T> &other);
00153
00154
00155 AipsrcVector(const AipsrcVector<T> &other);
00156
00157
00158 };
00159
00160 #define AipsrcVector_String AipsrcVector
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170 template <> class AipsrcVector_String<String> : public Aipsrc {
00171 public:
00172 AipsrcVector_String();
00173 ~AipsrcVector_String();
00174 static Bool find(Vector<String> &value, const String &keyword);
00175 static Bool find(Vector<String> &value, const String &keyword,
00176 const Vector<String> &deflt);
00177 static uInt registerRC(const String &keyword, const Vector<String> &deflt);
00178 static const Vector<String> &get(uInt keyword);
00179 static void set(uInt keyword, const Vector<String> &deflt);
00180 static void save(uInt keyword);
00181
00182 private:
00183 static AipsrcVector_String myp_p;
00184 static Mutex theirMutex;
00185 Block<Vector<String> > tlst;
00186 Block<String> ntlst;
00187 AipsrcVector_String<String>
00188 &operator=(const AipsrcVector_String<String> &other);
00189 AipsrcVector_String(const AipsrcVector_String<String> &other);
00190 };
00191
00192 #undef AipsrcVector_String
00193
00194 #define AipsrcVector_Bool AipsrcVector
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204 template <> class AipsrcVector_Bool<Bool> : public Aipsrc {
00205 public:
00206 AipsrcVector_Bool();
00207 ~AipsrcVector_Bool();
00208 static Bool find(Vector<Bool> &value, const String &keyword);
00209 static Bool find(Vector<Bool> &value, const String &keyword,
00210 const Vector<Bool> &deflt);
00211 static uInt registerRC(const String &keyword, const Vector<Bool> &deflt);
00212 static const Vector<Bool> &get(uInt keyword);
00213 static void set(uInt keyword, const Vector<Bool> &deflt);
00214 static void save(uInt keyword);
00215
00216 private:
00217 static AipsrcVector_Bool myp_p;
00218 static Mutex theirMutex;
00219 Block<Vector<Bool> > tlst;
00220 Block<String> ntlst;
00221 AipsrcVector_Bool<Bool>
00222 &operator=(const AipsrcVector_Bool<Bool> &other);
00223 AipsrcVector_Bool(const AipsrcVector_Bool<Bool> &other);
00224 };
00225
00226 #undef AipsrcVector_Bool
00227
00228
00229 }
00230
00231 #ifndef CASACORE_NO_AUTO_TEMPLATES
00232 #include <casacore/casa/System/AipsrcVector.tcc>
00233 #endif //# CASACORE_NO_AUTO_TEMPLATES
00234 #endif