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 TABLES_STINDARRAIO_H
00029 #define TABLES_STINDARRAIO_H
00030
00031
00032
00033 #include <casacore/casa/aips.h>
00034 #include <casacore/tables/DataMan/StManAipsIO.h>
00035 #include <casacore/casa/Arrays/IPosition.h>
00036 #include <casacore/casa/IO/ByteIO.h>
00037
00038 namespace casacore {
00039
00040
00041 class AipsIO;
00042 class StManArrayFile;
00043 class StIndArray;
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
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 class StManColumnIndArrayAipsIO : public StManColumnAipsIO
00098 {
00099 public:
00100
00101
00102
00103 StManColumnIndArrayAipsIO (StManAipsIO*, int dataType);
00104
00105
00106 ~StManColumnIndArrayAipsIO();
00107
00108
00109 Bool canAccessSlice (Bool& reask) const;
00110
00111
00112 void setShapeColumn (const IPosition& shape);
00113
00114
00115
00116 void addRow (uInt newNrrow, uInt oldNrrow);
00117
00118
00119
00120 void setShape (uInt rownr, const IPosition& shape);
00121
00122
00123 Bool isShapeDefined (uInt rownr);
00124
00125
00126
00127 uInt ndim (uInt rownr);
00128
00129
00130
00131 IPosition shape (uInt rownr);
00132
00133
00134
00135 Bool canChangeShape() const;
00136
00137
00138
00139
00140
00141 void getArrayBoolV (uInt rownr, Array<Bool>* dataPtr);
00142 void getArrayuCharV (uInt rownr, Array<uChar>* dataPtr);
00143 void getArrayShortV (uInt rownr, Array<Short>* dataPtr);
00144 void getArrayuShortV (uInt rownr, Array<uShort>* dataPtr);
00145 void getArrayIntV (uInt rownr, Array<Int>* dataPtr);
00146 void getArrayuIntV (uInt rownr, Array<uInt>* dataPtr);
00147 void getArrayfloatV (uInt rownr, Array<float>* dataPtr);
00148 void getArraydoubleV (uInt rownr, Array<double>* dataPtr);
00149 void getArrayComplexV (uInt rownr, Array<Complex>* dataPtr);
00150 void getArrayDComplexV (uInt rownr, Array<DComplex>* dataPtr);
00151 void getArrayStringV (uInt rownr, Array<String>* dataPtr);
00152
00153
00154
00155
00156
00157
00158 void putArrayBoolV (uInt rownr, const Array<Bool>* dataPtr);
00159 void putArrayuCharV (uInt rownr, const Array<uChar>* dataPtr);
00160 void putArrayShortV (uInt rownr, const Array<Short>* dataPtr);
00161 void putArrayuShortV (uInt rownr, const Array<uShort>* dataPtr);
00162 void putArrayIntV (uInt rownr, const Array<Int>* dataPtr);
00163 void putArrayuIntV (uInt rownr, const Array<uInt>* dataPtr);
00164 void putArrayfloatV (uInt rownr, const Array<float>* dataPtr);
00165 void putArraydoubleV (uInt rownr, const Array<double>* dataPtr);
00166 void putArrayComplexV (uInt rownr, const Array<Complex>* dataPtr);
00167 void putArrayDComplexV (uInt rownr, const Array<DComplex>* dataPtr);
00168 void putArrayStringV (uInt rownr, const Array<String>* dataPtr);
00169
00170
00171
00172
00173
00174
00175 void getSliceBoolV (uInt rownr, const Slicer&, Array<Bool>* dataPtr);
00176 void getSliceuCharV (uInt rownr, const Slicer&, Array<uChar>* dataPtr);
00177 void getSliceShortV (uInt rownr, const Slicer&, Array<Short>* dataPtr);
00178 void getSliceuShortV (uInt rownr, const Slicer&, Array<uShort>* dataPtr);
00179 void getSliceIntV (uInt rownr, const Slicer&, Array<Int>* dataPtr);
00180 void getSliceuIntV (uInt rownr, const Slicer&, Array<uInt>* dataPtr);
00181 void getSlicefloatV (uInt rownr, const Slicer&, Array<float>* dataPtr);
00182 void getSlicedoubleV (uInt rownr, const Slicer&, Array<double>* dataPtr);
00183 void getSliceComplexV (uInt rownr, const Slicer&, Array<Complex>* dataPtr);
00184 void getSliceDComplexV (uInt rownr, const Slicer&, Array<DComplex>* dataPtr);
00185 void getSliceStringV (uInt rownr, const Slicer&, Array<String>* dataPtr);
00186
00187
00188
00189
00190
00191
00192 void putSliceBoolV (uInt rownr, const Slicer&,
00193 const Array<Bool>* dataPtr);
00194 void putSliceuCharV (uInt rownr, const Slicer&,
00195 const Array<uChar>* dataPtr);
00196 void putSliceShortV (uInt rownr, const Slicer&,
00197 const Array<Short>* dataPtr);
00198 void putSliceuShortV (uInt rownr, const Slicer&,
00199 const Array<uShort>* dataPtr);
00200 void putSliceIntV (uInt rownr, const Slicer&,
00201 const Array<Int>* dataPtr);
00202 void putSliceuIntV (uInt rownr, const Slicer&,
00203 const Array<uInt>* dataPtr);
00204 void putSlicefloatV (uInt rownr, const Slicer&,
00205 const Array<float>* dataPtr);
00206 void putSlicedoubleV (uInt rownr, const Slicer&,
00207 const Array<double>* dataPtr);
00208 void putSliceComplexV (uInt rownr, const Slicer&,
00209 const Array<Complex>* dataPtr);
00210 void putSliceDComplexV (uInt rownr, const Slicer&,
00211 const Array<DComplex>* dataPtr);
00212 void putSliceStringV (uInt rownr, const Slicer&,
00213 const Array<String>* dataPtr);
00214
00215
00216
00217
00218 void remove (uInt rownr);
00219
00220
00221 void doCreate (uInt nrrow);
00222
00223
00224
00225
00226 void putFile (uInt nrval, AipsIO&);
00227
00228
00229
00230
00231 void getFile (uInt nrval, AipsIO&);
00232
00233
00234 virtual void reopenRW();
00235
00236
00237 Bool ok() const;
00238
00239 private:
00240
00241 uInt seqnr_p;
00242
00243 IPosition fixedShape_p;
00244
00245 Bool shapeIsFixed_p;
00246
00247
00248
00249 uInt version_p;
00250
00251 StManArrayFile* iosfile_p;
00252
00253
00254
00255 void openFile (ByteIO::OpenOption opt);
00256
00257
00258 void deleteArray (uInt rownr);
00259
00260
00261
00262
00263 StIndArray* getShape (uInt rownr);
00264
00265
00266
00267
00268 void putData (void* datap, uInt nrval, AipsIO&);
00269
00270
00271
00272
00273
00274 void getData (void* datap, uInt index, uInt nrval, AipsIO&, uInt version);
00275
00276
00277 StManColumnIndArrayAipsIO (const StManColumnIndArrayAipsIO&);
00278
00279
00280 StManColumnIndArrayAipsIO& operator= (const StManColumnIndArrayAipsIO&);
00281 };
00282
00283
00284
00285
00286 }
00287
00288 #endif