casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ISMColumn.h
Go to the documentation of this file.
1 //# ISMColumn.h: A Column in the Incremental Storage Manager
2 //# Copyright (C) 1996,1997,1998,1999,2002
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: aips2-request@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 //# $Id$
27 
28 #ifndef TABLES_ISMCOLUMN_H
29 #define TABLES_ISMCOLUMN_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
40 
41 namespace casacore { //# NAMESPACE CASACORE - BEGIN
42 
43 //# Forward declarations
44 class ISMBucket;
45 
46 
47 // <summary>
48 // A Column in the Incremental Storage Manager.
49 // </summary>
50 
51 // <use visibility=local>
52 
53 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
54 // </reviewed>
55 
56 // <prerequisite>
57 //# Classes you should understand before using this one.
58 // <li> <linkto class=ISMBase>ISMBase</linkto>
59 // </prerequisite>
60 
61 // <etymology>
62 // ISMColumn represents a Column in the Incremental Storage Manager.
63 // </etymology>
64 
65 // <synopsis>
66 // ISMColumn handles the access to a column containing scalars or direct
67 // arrays of the various data types. It uses class <linkto class=ISMBucket>
68 // ISMBucket</linkto> to get and put the data into the correct bucket.
69 // When the value does not fit in the bucket, the bucket is split
70 // and the new bucket is added to the storage manager.
71 // <p>
72 // The object maintains a variable indicating the last row ever put.
73 // This is used to decide if a put of a value is valid until the
74 // end of the table or for that one row only. In this way it does not
75 // make any difference if rows are added before or after a value is put
76 // <br>
77 // A value put before or at the last row ever put will only affect that
78 // one row. The rows before and after it keep their original value. If
79 // needed that value is copied.
80 // <p>
81 // To optimize (especially sequential) access to the column, ISMColumn
82 // maintains the last value gotten and the rows for which it is valid.
83 // In this way a get does not need to access the data in the bucket.
84 // <p>
85 // ISMColumn use the static conversion functions in the
86 // <linkto class=Conversion>Conversion</linkto> framework to
87 // get/put the data in external format (be it canonical or local).
88 // Most data types are fixed length, but some are variable length
89 // (e.g. String). In external format variable length data is preceeded
90 // by its total length (which includes the length itself). This makes
91 // it possible to get the length of a data value without having to
92 // interpret it, which is easy when (re)moving a value. For this reason
93 // ISMColumn contains its own conversion functions for Strings.
94 // <p>
95 // ISMColumn also acts as the base class for more specialized ISM
96 // column classes (i.e. <linkto class=ISMIndColumn>ISMIndColumn</linkto>
97 // for indirect columns).
98 // In this way <linkto class=ISMBase>ISMBase</linkto> can hold a
99 // block of <src>ISMColumn*</src> for any column. Furthermore
100 // <src>ISMColumn</src> contains the hooks to allow a derived class
101 // to use other ISMColumn functions (e.g. there are "action" functions
102 // for a derived class to react on the duplication or removal of
103 // a data value (e.g. due to a bucket split).
104 // </synopsis>
105 
106 // <motivation>
107 // ISMColumn encapsulates all operations on an ISM Column.
108 // </motivation>
109 
110 //# <todo asof="$DATE:$">
111 //# A List of bugs, limitations, extensions or planned refinements.
112 //# </todo>
113 
114 
115 class ISMColumn : public StManColumn
116 {
117 public:
118  // Create a ISMColumn object with the given parent.
119  // It initializes the various variables.
120  // It keeps the pointer to its parent (but does not own it).
121  ISMColumn (ISMBase* parent, int dataType, uInt colnr);
122 
123  ~ISMColumn();
124 
125  // Set the shape of an array in the column.
126  virtual void setShapeColumn (const IPosition& shape);
127 
128  // Get the dimensionality of the item in the given row.
129  // This is the same for all rows.
130  virtual uInt ndim (uInt rownr);
131 
132  // Get the shape of the array in the given row.
133  // This is the same for all rows.
134  virtual IPosition shape (uInt rownr);
135 
136  // Let the column object initialize itself for a newly created table.
137  // This is meant for a derived class.
138  virtual void doCreate (ISMBucket*);
139 
140  // Let the column object initialize itself for an existing table.
141  virtual void getFile (uInt nrrow);
142 
143  // Flush and optionally fsync the data.
144  // This is meant for a derived class.
145  virtual Bool flush (uInt nrrow, Bool fsync);
146 
147  // Resync the storage manager with the new file contents.
148  // It resets the last rownr put.
149  void resync (uInt nrrow);
150 
151  // Let the column reopen its data files for read/write access.
152  virtual void reopenRW();
153 
154  // Get a scalar value in the given row.
155  // <group>
156  virtual void getBoolV (uInt rownr, Bool* dataPtr);
157  virtual void getuCharV (uInt rownr, uChar* dataPtr);
158  virtual void getShortV (uInt rownr, Short* dataPtr);
159  virtual void getuShortV (uInt rownr, uShort* dataPtr);
160  virtual void getIntV (uInt rownr, Int* dataPtr);
161  virtual void getuIntV (uInt rownr, uInt* dataPtr);
162  virtual void getInt64V (uInt rownr, Int64* dataPtr);
163  virtual void getfloatV (uInt rownr, float* dataPtr);
164  virtual void getdoubleV (uInt rownr, double* dataPtr);
165  virtual void getComplexV (uInt rownr, Complex* dataPtr);
166  virtual void getDComplexV (uInt rownr, DComplex* dataPtr);
167  virtual void getStringV (uInt rownr, String* dataPtr);
168  // </group>
169 
170  // Put a scalar value in the given row.
171  // <group>
172  virtual void putBoolV (uInt rownr, const Bool* dataPtr);
173  virtual void putuCharV (uInt rownr, const uChar* dataPtr);
174  virtual void putShortV (uInt rownr, const Short* dataPtr);
175  virtual void putuShortV (uInt rownr, const uShort* dataPtr);
176  virtual void putIntV (uInt rownr, const Int* dataPtr);
177  virtual void putuIntV (uInt rownr, const uInt* dataPtr);
178  virtual void putInt64V (uInt rownr, const Int64* dataPtr);
179  virtual void putfloatV (uInt rownr, const float* dataPtr);
180  virtual void putdoubleV (uInt rownr, const double* dataPtr);
181  virtual void putComplexV (uInt rownr, const Complex* dataPtr);
182  virtual void putDComplexV (uInt rownr, const DComplex* dataPtr);
183  virtual void putStringV (uInt rownr, const String* dataPtr);
184  // </group>
185 
186  // Get the scalar values in the entire column.
187  // The buffer pointed to by dataPtr has to have the correct length.
188  // (which is guaranteed by the ScalarColumn getColumn function).
189  // <group>
190  virtual void getScalarColumnBoolV (Vector<Bool>* dataPtr);
191  virtual void getScalarColumnuCharV (Vector<uChar>* dataPtr);
192  virtual void getScalarColumnShortV (Vector<Short>* dataPtr);
193  virtual void getScalarColumnuShortV (Vector<uShort>* dataPtr);
194  virtual void getScalarColumnIntV (Vector<Int>* dataPtr);
195  virtual void getScalarColumnuIntV (Vector<uInt>* dataPtr);
196  virtual void getScalarColumnInt64V (Vector<Int64>* dataPtr);
197  virtual void getScalarColumnfloatV (Vector<float>* dataPtr);
198  virtual void getScalarColumndoubleV (Vector<double>* dataPtr);
199  virtual void getScalarColumnComplexV (Vector<Complex>* dataPtr);
200  virtual void getScalarColumnDComplexV (Vector<DComplex>* dataPtr);
201  virtual void getScalarColumnStringV (Vector<String>* dataPtr);
202  // </group>
203 
204  // Put the scalar values into the entire column.
205  // The buffer pointed to by dataPtr has to have the correct length.
206  // (which is guaranteed by the ScalarColumn putColumn function).
207  // <group>
208  virtual void putScalarColumnBoolV (const Vector<Bool>* dataPtr);
209  virtual void putScalarColumnuCharV (const Vector<uChar>* dataPtr);
210  virtual void putScalarColumnShortV (const Vector<Short>* dataPtr);
211  virtual void putScalarColumnuShortV (const Vector<uShort>* dataPtr);
212  virtual void putScalarColumnIntV (const Vector<Int>* dataPtr);
213  virtual void putScalarColumnuIntV (const Vector<uInt>* dataPtr);
214  virtual void putScalarColumnInt64V (const Vector<Int64>* dataPtr);
215  virtual void putScalarColumnfloatV (const Vector<float>* dataPtr);
216  virtual void putScalarColumndoubleV (const Vector<double>* dataPtr);
217  virtual void putScalarColumnComplexV (const Vector<Complex>* dataPtr);
218  virtual void putScalarColumnDComplexV (const Vector<DComplex>* dataPtr);
219  virtual void putScalarColumnStringV (const Vector<String>* dataPtr);
220  // </group>
221 
222  // Get the scalar values in some cells of the column.
223  // The buffer pointed to by dataPtr has to have the correct length.
224  // (which is guaranteed by the ScalarColumn getColumnCells function).
225  // The default implementation loops through all rows.
226  // <group>
227  virtual void getScalarColumnCellsBoolV (const RefRows& rownrs,
228  Vector<Bool>* dataPtr);
229  virtual void getScalarColumnCellsuCharV (const RefRows& rownrs,
230  Vector<uChar>* dataPtr);
231  virtual void getScalarColumnCellsShortV (const RefRows& rownrs,
232  Vector<Short>* dataPtr);
233  virtual void getScalarColumnCellsuShortV (const RefRows& rownrs,
234  Vector<uShort>* dataPtr);
235  virtual void getScalarColumnCellsIntV (const RefRows& rownrs,
236  Vector<Int>* dataPtr);
237  virtual void getScalarColumnCellsuIntV (const RefRows& rownrs,
238  Vector<uInt>* dataPtr);
239  virtual void getScalarColumnCellsInt64V (const RefRows& rownrs,
240  Vector<Int64>* dataPtr);
241  virtual void getScalarColumnCellsfloatV (const RefRows& rownrs,
242  Vector<float>* dataPtr);
243  virtual void getScalarColumnCellsdoubleV (const RefRows& rownrs,
244  Vector<double>* dataPtr);
245  virtual void getScalarColumnCellsComplexV (const RefRows& rownrs,
246  Vector<Complex>* dataPtr);
247  virtual void getScalarColumnCellsDComplexV (const RefRows& rownrs,
248  Vector<DComplex>* dataPtr);
249  virtual void getScalarColumnCellsStringV (const RefRows& rownrs,
250  Vector<String>* dataPtr);
251  // </group>
252 
253  // Get an array value in the given row.
254  // <group>
255  virtual void getArrayBoolV (uInt rownr, Array<Bool>* dataPtr);
256  virtual void getArrayuCharV (uInt rownr, Array<uChar>* dataPtr);
257  virtual void getArrayShortV (uInt rownr, Array<Short>* dataPtr);
258  virtual void getArrayuShortV (uInt rownr, Array<uShort>* dataPtr);
259  virtual void getArrayIntV (uInt rownr, Array<Int>* dataPtr);
260  virtual void getArrayuIntV (uInt rownr, Array<uInt>* dataPtr);
261  virtual void getArrayInt64V (uInt rownr, Array<Int64>* dataPtr);
262  virtual void getArrayfloatV (uInt rownr, Array<float>* dataPtr);
263  virtual void getArraydoubleV (uInt rownr, Array<double>* dataPtr);
264  virtual void getArrayComplexV (uInt rownr, Array<Complex>* dataPtr);
265  virtual void getArrayDComplexV (uInt rownr, Array<DComplex>* dataPtr);
266  virtual void getArrayStringV (uInt rownr, Array<String>* dataPtr);
267  // </group>
268 
269  // Put an array value in the given row.
270  // <group>
271  virtual void putArrayBoolV (uInt rownr, const Array<Bool>* dataPtr);
272  virtual void putArrayuCharV (uInt rownr, const Array<uChar>* dataPtr);
273  virtual void putArrayShortV (uInt rownr, const Array<Short>* dataPtr);
274  virtual void putArrayuShortV (uInt rownr, const Array<uShort>* dataPtr);
275  virtual void putArrayIntV (uInt rownr, const Array<Int>* dataPtr);
276  virtual void putArrayuIntV (uInt rownr, const Array<uInt>* dataPtr);
277  virtual void putArrayInt64V (uInt rownr, const Array<Int64>* dataPtr);
278  virtual void putArrayfloatV (uInt rownr, const Array<float>* dataPtr);
279  virtual void putArraydoubleV (uInt rownr, const Array<double>* dataPtr);
280  virtual void putArrayComplexV (uInt rownr, const Array<Complex>* dataPtr);
281  virtual void putArrayDComplexV (uInt rownr, const Array<DComplex>* dataPtr);
282  virtual void putArrayStringV (uInt rownr, const Array<String>* dataPtr);
283  // </group>
284 
285  // Add (newNrrow-oldNrrow) rows to the column and initialize
286  // the new rows when needed.
287  virtual void addRow (uInt newNrrow, uInt oldNrrow);
288 
289  // Remove the given row in the bucket from the column.
290  void remove (uInt bucketRownr, ISMBucket* bucket, uInt bucketNrrow,
291  uInt newNrrow);
292 
293  // Get the function needed to read/write a uInt from/to external format.
294  // This is used by other classes to read the length of a variable
295  // data value.
296  // <group>
297  static Conversion::ValueFunction* getReaduInt (Bool asCanonical);
298  static Conversion::ValueFunction* getWriteuInt (Bool asCanonical);
299  // </group>
300 
301  // Give a derived class the opportunity to react on the duplication
302  // of a value. It is used by ISMIndColumn.
303  virtual void handleCopy (uInt rownr, const char* value);
304 
305  // Give a derived class the opportunity to react on the removal
306  // of a value. It is used by ISMIndColumn.
307  virtual void handleRemove (uInt rownr, const char* value);
308 
309  // Get the fixed length of the data value in a cell of this column
310  // (0 = variable length).
311  uInt getFixedLength() const;
312 
313  // Get the nr of elements in this data value.
314  uInt nelements() const;
315 
316 
317 protected:
318  // Test if the last value is invalid for this row.
319  int isLastValueInvalid (Int rownr) const;
320 
321  // Get the value for this row.
322  // Set the cache if the flag is set.
323  void getValue (uInt rownr, void* value, Bool setCache);
324 
325  // Put the value for this row.
326  void putValue (uInt rownr, const void* value);
327 
328  //# Declare member variables.
329  // Pointer to the parent storage manager.
331  // Length of column cell value in storage format (0 = variable length).
332  // If 0, the value is always preceeded by a uInt giving the length.
334  // Column sequence number of this column.
336  // The shape of the column.
338  // Number of elements in a value for this column.
340  // Number of values to be copied.
341  // Normally this is nrelem_p, but for complex types it is 2*nrelem_p.
342  // When local format is used, it is the number of bytes.
344  // Cache for interval for which last value read is valid.
345  // The last value is valid for startRow_p till endRow_p (inclusive).
348  void* lastValue_p;
349  // The last row for which a value has been put.
351  // The size of the data type in local format.
353  // Pointer to a convert function for writing.
355  // Pointer to a convert function for reading.
357  // Pointer to a compare function.
358  ObjCompareFunc* compareFunc_p;
359 
360 
361 private:
362  // Forbid copy constructor.
363  ISMColumn (const ISMColumn&);
364 
365  // Forbid assignment.
366  ISMColumn& operator= (const ISMColumn&);
367 
368  // Initialize part of the object.
369  // It is used by doCreate and getFile.
370  void init();
371 
372  // Clear the object (used by destructor and init).
373  void clear();
374 
375  // Put the value in all buckets from the given row on.
376  void putFromRow (uInt rownr, const char* data, uInt lenData);
377 
378  // Put a data value into the bucket.
379  // When it is at the first row of the bucket, it replaces the value.
380  // Otherwise it is added.
381  void putData (ISMBucket* bucket, uInt bucketStartRow,
382  uInt bucketNrrow, uInt bucketRownr,
383  const char* data, uInt lenData,
384  Bool afterLastRow, Bool canSplit);
385 
386  // Replace a value at the given offset in the bucket.
387  // If the bucket is too small, it will be split (if allowed).
388  void replaceData (ISMBucket* bucket, uInt bucketStartRow,
389  uInt bucketNrrow, uInt bucketRownr, uInt& offset,
390  const char* data, uInt lenData, Bool canSplit = True);
391 
392  // Add a value at the given index in the bucket.
393  // If the bucket is too small, it will be split (if allowed).
394  Bool addData (ISMBucket* bucket, uInt bucketStartRow,
395  uInt bucketNrrow, uInt bucketRownr, uInt inx,
396  const char* data, uInt lenData,
397  Bool afterLastRow = False, Bool canSplit = True);
398 
399  // Handle the duplicated values after a bucket split.
400  void handleSplit (ISMBucket& bucket, const Block<Bool>& duplicated);
401 
402  // Compare the values.
403  virtual Bool compareValue (const void* val1, const void* val2) const;
404 
405  // Handle a String in copying to/from external format.
406  // <group>
407  static size_t fromString (void* out, const void* in, size_t n,
408  Conversion::ValueFunction* writeLeng);
409  static size_t toString (void* out, const void* in, size_t n,
410  Conversion::ValueFunction* readLeng);
411  static size_t writeStringBE (void* out, const void* in, size_t n);
412  static size_t readStringBE (void* out, const void* in, size_t n);
413  static size_t writeStringLE (void* out, const void* in, size_t n);
414  static size_t readStringLE (void* out, const void* in, size_t n);
415  // </group>
416 };
417 
418 
419 inline int ISMColumn::isLastValueInvalid (Int rownr) const
420 {
421  return rownr < startRow_p || rownr > endRow_p;
422 }
423 
425 {
426  return fixedLength_p;
427 }
428 
430 {
431  return nrelem_p;
432 }
433 
434 
435 
436 } //# NAMESPACE CASACORE - END
437 
438 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
void getValue(uInt rownr, void *value, Bool setCache)
Get the value for this row.
virtual void putScalarColumnuShortV(const Vector< uShort > *dataPtr)
virtual void putArrayuCharV(uInt rownr, const Array< uChar > *dataPtr)
virtual void getScalarColumnCellsuIntV(const RefRows &rownrs, Vector< uInt > *dataPtr)
virtual void putComplexV(uInt rownr, const Complex *dataPtr)
virtual void getScalarColumnCellsStringV(const RefRows &rownrs, Vector< String > *dataPtr)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
virtual void getScalarColumnDComplexV(Vector< DComplex > *dataPtr)
virtual void putArrayShortV(uInt rownr, const Array< Short > *dataPtr)
int Int
Definition: aipstype.h:50
virtual void getfloatV(uInt rownr, float *dataPtr)
virtual void doCreate(ISMBucket *)
Let the column object initialize itself for a newly created table.
uInt colnr_p
Column sequence number of this column.
Definition: ISMColumn.h:335
virtual void putArrayuIntV(uInt rownr, const Array< uInt > *dataPtr)
virtual void putuIntV(uInt rownr, const uInt *dataPtr)
virtual void putScalarColumnDComplexV(const Vector< DComplex > *dataPtr)
void replaceData(ISMBucket *bucket, uInt bucketStartRow, uInt bucketNrrow, uInt bucketRownr, uInt &offset, const char *data, uInt lenData, Bool canSplit=True)
Replace a value at the given offset in the bucket.
Conversion::ValueFunction * readFunc_p
Pointer to a convert function for reading.
Definition: ISMColumn.h:356
virtual void getScalarColumnIntV(Vector< Int > *dataPtr)
virtual void putArrayuShortV(uInt rownr, const Array< uShort > *dataPtr)
virtual void putArrayInt64V(uInt rownr, const Array< Int64 > *dataPtr)
virtual void putShortV(uInt rownr, const Short *dataPtr)
void putData(ISMBucket *bucket, uInt bucketStartRow, uInt bucketNrrow, uInt bucketRownr, const char *data, uInt lenData, Bool afterLastRow, Bool canSplit)
Put a data value into the bucket.
virtual void getInt64V(uInt rownr, Int64 *dataPtr)
static size_t writeStringLE(void *out, const void *in, size_t n)
virtual void putDComplexV(uInt rownr, const DComplex *dataPtr)
virtual void getScalarColumnuShortV(Vector< uShort > *dataPtr)
virtual void putdoubleV(uInt rownr, const double *dataPtr)
virtual void putScalarColumnComplexV(const Vector< Complex > *dataPtr)
virtual void getScalarColumnCellsShortV(const RefRows &rownrs, Vector< Short > *dataPtr)
Bool addData(ISMBucket *bucket, uInt bucketStartRow, uInt bucketNrrow, uInt bucketRownr, uInt inx, const char *data, uInt lenData, Bool afterLastRow=False, Bool canSplit=True)
Add a value at the given index in the bucket.
virtual void getScalarColumnuIntV(Vector< uInt > *dataPtr)
virtual void handleCopy(uInt rownr, const char *value)
Give a derived class the opportunity to react on the duplication of a value.
void resync(uInt nrrow)
Resync the storage manager with the new file contents.
virtual void getArrayInt64V(uInt rownr, Array< Int64 > *dataPtr)
virtual void getArrayuIntV(uInt rownr, Array< uInt > *dataPtr)
virtual void getScalarColumnuCharV(Vector< uChar > *dataPtr)
uInt typeSize_p
The size of the data type in local format.
Definition: ISMColumn.h:352
virtual void getuCharV(uInt rownr, uChar *dataPtr)
virtual void putArrayfloatV(uInt rownr, const Array< float > *dataPtr)
virtual void getuIntV(uInt rownr, uInt *dataPtr)
virtual void putStringV(uInt rownr, const String *dataPtr)
unsigned char uChar
Definition: aipstype.h:47
static size_t toString(void *out, const void *in, size_t n, Conversion::ValueFunction *readLeng)
virtual void getArrayStringV(uInt rownr, Array< String > *dataPtr)
virtual void putScalarColumnShortV(const Vector< Short > *dataPtr)
void init()
Initialize part of the object.
virtual void getScalarColumnCellsdoubleV(const RefRows &rownrs, Vector< double > *dataPtr)
virtual void getScalarColumnCellsfloatV(const RefRows &rownrs, Vector< float > *dataPtr)
virtual void getScalarColumnComplexV(Vector< Complex > *dataPtr)
static size_t fromString(void *out, const void *in, size_t n, Conversion::ValueFunction *writeLeng)
Handle a String in copying to/from external format.
uInt nelements() const
Get the nr of elements in this data value.
Definition: ISMColumn.h:429
virtual IPosition shape(uInt rownr)
Get the shape of the array in the given row.
virtual void getScalarColumnCellsuCharV(const RefRows &rownrs, Vector< uChar > *dataPtr)
void putFromRow(uInt rownr, const char *data, uInt lenData)
Put the value in all buckets from the given row on.
virtual void getArrayuShortV(uInt rownr, Array< uShort > *dataPtr)
static size_t readStringLE(void *out, const void *in, size_t n)
virtual void getFile(uInt nrrow)
Let the column object initialize itself for an existing table.
virtual void getComplexV(uInt rownr, Complex *dataPtr)
virtual void putArrayStringV(uInt rownr, const Array< String > *dataPtr)
virtual void getArrayDComplexV(uInt rownr, Array< DComplex > *dataPtr)
IPosition shape_p
The shape of the column.
Definition: ISMColumn.h:337
int dataType() const
Return the data type of the column.
short Short
Definition: aipstype.h:48
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
Definition: PlotData.h:48
static Conversion::ValueFunction * getReaduInt(Bool asCanonical)
Get the function needed to read/write a uInt from/to external format.
Int startRow_p
Cache for interval for which last value read is valid.
Definition: ISMColumn.h:346
Base class of the Incremental Storage Manager.
Definition: ISMBase.h:87
virtual void addRow(uInt newNrrow, uInt oldNrrow)
Add (newNrrow-oldNrrow) rows to the column and initialize the new rows when needed.
virtual void getScalarColumnInt64V(Vector< Int64 > *dataPtr)
Conversion::ValueFunction * writeFunc_p
Pointer to a convert function for writing.
Definition: ISMColumn.h:354
virtual void putScalarColumnInt64V(const Vector< Int64 > *dataPtr)
virtual void getStringV(uInt rownr, String *dataPtr)
virtual void getdoubleV(uInt rownr, double *dataPtr)
ObjCompareFunc * compareFunc_p
Pointer to a compare function.
Definition: ISMColumn.h:358
virtual void setShapeColumn(const IPosition &shape)
Set the shape of an array in the column.
virtual void getScalarColumnBoolV(Vector< Bool > *dataPtr)
Get the scalar values in the entire column.
virtual void getScalarColumnCellsuShortV(const RefRows &rownrs, Vector< uShort > *dataPtr)
virtual void putArrayIntV(uInt rownr, const Array< Int > *dataPtr)
virtual void getArraydoubleV(uInt rownr, Array< double > *dataPtr)
virtual void putScalarColumndoubleV(const Vector< double > *dataPtr)
virtual void reopenRW()
Let the column reopen its data files for read/write access.
Class holding the row numbers in a RefTable.
Definition: RefRows.h:85
virtual void getScalarColumnCellsInt64V(const RefRows &rownrs, Vector< Int64 > *dataPtr)
virtual void getArrayIntV(uInt rownr, Array< Int > *dataPtr)
void putValue(uInt rownr, const void *value)
Put the value for this row.
virtual void getIntV(uInt rownr, Int *dataPtr)
virtual void handleRemove(uInt rownr, const char *value)
Give a derived class the opportunity to react on the removal of a value.
virtual void getScalarColumnfloatV(Vector< float > *dataPtr)
virtual void putuShortV(uInt rownr, const uShort *dataPtr)
virtual void putScalarColumnfloatV(const Vector< float > *dataPtr)
virtual void getScalarColumnCellsIntV(const RefRows &rownrs, Vector< Int > *dataPtr)
virtual void getArrayfloatV(uInt rownr, Array< float > *dataPtr)
uInt fixedLength_p
Length of column cell value in storage format (0 = variable length).
Definition: ISMColumn.h:333
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual void getArrayBoolV(uInt rownr, Array< Bool > *dataPtr)
Get an array value in the given row.
virtual void getuShortV(uInt rownr, uShort *dataPtr)
virtual void getScalarColumnCellsDComplexV(const RefRows &rownrs, Vector< DComplex > *dataPtr)
virtual void putArrayComplexV(uInt rownr, const Array< Complex > *dataPtr)
virtual void putArrayBoolV(uInt rownr, const Array< Bool > *dataPtr)
Put an array value in the given row.
const Bool False
Definition: aipstype.h:44
static Conversion::ValueFunction * getWriteuInt(Bool asCanonical)
virtual void getArrayuCharV(uInt rownr, Array< uChar > *dataPtr)
ISMColumn & operator=(const ISMColumn &)
Forbid assignment.
uInt lastRowPut_p
The last row for which a value has been put.
Definition: ISMColumn.h:350
A Column in the Incremental Storage Manager.
Definition: ISMColumn.h:115
virtual void putfloatV(uInt rownr, const float *dataPtr)
static size_t writeStringBE(void *out, const void *in, size_t n)
virtual Bool compareValue(const void *val1, const void *val2) const
Compare the values.
virtual void putIntV(uInt rownr, const Int *dataPtr)
uInt getFixedLength() const
Get the fixed length of the data value in a cell of this column (0 = variable length).
Definition: ISMColumn.h:424
A bucket in the Incremental Storage Manager.
Definition: ISMBucket.h:132
virtual void putScalarColumnuIntV(const Vector< uInt > *dataPtr)
virtual Bool flush(uInt nrrow, Bool fsync)
Flush and optionally fsync the data.
virtual void getBoolV(uInt rownr, Bool *dataPtr)
Get a scalar value in the given row.
virtual void putScalarColumnStringV(const Vector< String > *dataPtr)
virtual void getScalarColumnCellsBoolV(const RefRows &rownrs, Vector< Bool > *dataPtr)
Get the scalar values in some cells of the column.
uInt nrelem_p
Number of elements in a value for this column.
Definition: ISMColumn.h:339
virtual void getArrayComplexV(uInt rownr, Array< Complex > *dataPtr)
virtual void putBoolV(uInt rownr, const Bool *dataPtr)
Put a scalar value in the given row.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual uInt ndim(uInt rownr)
Get the dimensionality of the item in the given row.
virtual void getScalarColumndoubleV(Vector< double > *dataPtr)
void clear()
Clear the object (used by destructor and init).
void handleSplit(ISMBucket &bucket, const Block< Bool > &duplicated)
Handle the duplicated values after a bucket split.
virtual void getScalarColumnCellsComplexV(const RefRows &rownrs, Vector< Complex > *dataPtr)
static size_t readStringBE(void *out, const void *in, size_t n)
int isLastValueInvalid(Int rownr) const
Test if the last value is invalid for this row.
Definition: ISMColumn.h:419
virtual void getScalarColumnStringV(Vector< String > *dataPtr)
virtual void putInt64V(uInt rownr, const Int64 *dataPtr)
uInt nrcopy_p
Number of values to be copied.
Definition: ISMColumn.h:343
virtual void getScalarColumnShortV(Vector< Short > *dataPtr)
Base table column storage manager class.
Definition: StManColumn.h:102
virtual void putArraydoubleV(uInt rownr, const Array< double > *dataPtr)
virtual void putScalarColumnIntV(const Vector< Int > *dataPtr)
virtual void getShortV(uInt rownr, Short *dataPtr)
const Bool True
Definition: aipstype.h:43
virtual void putScalarColumnuCharV(const Vector< uChar > *dataPtr)
ISMBase * stmanPtr_p
Pointer to the parent storage manager.
Definition: ISMColumn.h:330
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual void getArrayShortV(uInt rownr, Array< Short > *dataPtr)
virtual void putArrayDComplexV(uInt rownr, const Array< DComplex > *dataPtr)
ISMColumn(ISMBase *parent, int dataType, uInt colnr)
Create a ISMColumn object with the given parent.
unsigned int uInt
Definition: aipstype.h:51
size_t ValueFunction(void *to, const void *from, size_t nvalues)
Define the signature of a function converting nvalues values from internal to external format or vice...
Definition: Conversion.h:100
virtual void getDComplexV(uInt rownr, DComplex *dataPtr)
unsigned short uShort
Definition: aipstype.h:49
virtual void putuCharV(uInt rownr, const uChar *dataPtr)
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42
virtual void putScalarColumnBoolV(const Vector< Bool > *dataPtr)
Put the scalar values into the entire column.