casacore
StManAipsIO.h
Go to the documentation of this file.
1 //# StManAipsIO.h: Storage manager for tables using AipsIO
2 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2001
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_STMANAIPSIO_H
29 #define TABLES_STMANAIPSIO_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/DataMan/DataManager.h>
35 #include <casacore/tables/DataMan/StManColumn.h>
36 #include <casacore/casa/Containers/Block.h>
37 #include <casacore/casa/BasicSL/Complex.h>
38 #include <casacore/casa/Arrays/IPosition.h>
39 #include <casacore/casa/BasicSL/String.h>
40 #include <casacore/casa/IO/ByteIO.h>
41 
42 namespace casacore { //# NAMESPACE CASACORE - BEGIN
43 
44 //# Forward clarations
45 class AipsIO;
46 class StManAipsIO;
47 class StManArrayFile;
48 
49 
50 // <summary>
51 // AipsIO table column storage manager class
52 // </summary>
53 
54 // <use visibility=local>
55 
56 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
57 // </reviewed>
58 
59 // <prerequisite>
60 //# Classes you should understand before using this one.
61 // <li> StManColumn
62 // </prerequisite>
63 
64 // <etymology>
65 // StManColumnAipsIO handles a column for an AipsIO storage manager.
66 // </etymology>
67 
68 // <synopsis>
69 // StManColumnAipsIO is used by StManAipsIO to handle the access to
70 // the data in a table column.
71 // It is an storage manager based on AipsIO. The entire column is
72 // kept in memory and only written when the storage manager closes.
73 // When the storage manager gets opened, the entire column gets
74 // read back.
75 // It fully supports addition and removal of rows.
76 //
77 // StManColumnAipsIO serves 2 purposes:
78 // <ol>
79 // <li> It handles a column containing scalar values.
80 // <li> It serves as a base class for StManArrayColumnAipsIO and
81 // StManIndArrayColumnAipsIO. These classes handle arrays and
82 // use StManColumnAipsIO to hold a pointer to the array in each row.
83 // </ol>
84 //
85 // StManColumnAipsIO does not hold a column as a consecutive array,
86 // because extending the column (i.e. adding rows) proofed be too
87 // expensive due to the repeated copying involved when creating a table
88 // (this method was used by the old table system).
89 // Instead it has a number of data blocks (extensions) indexed to by a
90 // super block. Accessing a row means finding the appropriate extension
91 // via a binary search. Because there is only 1 extension when a table is
92 // read back, the overhead in finding a row is small.
93 // </synopsis>
94 
95 // <motivation>
96 // StManColumnAipsIO handles the standard data types. The class
97 // is not templated, but a switch statement is used instead.
98 // Templates would cause too many instantiations.
99 // </motivation>
100 
101 // <todo asof="$DATE:$">
102 //# A List of bugs, limitations, extensions or planned refinements.
103 // </todo>
104 
105 
107 {
108 public:
109 
110  // Create a column of the given type.
111  // It will maintain a pointer to its parent storage manager.
112  StManColumnAipsIO (StManAipsIO* stMan, int dataType, Bool byPtr);
113 
114  // Frees up the storage.
115  virtual ~StManColumnAipsIO();
116 
117  // Get a scalar value in the given row.
118  // The buffer pointed to by dataPtr has to have the correct length
119  // (which is guaranteed by the Scalar/ArrayColumn get function).
120  // <group>
121  void getBoolV (uInt rownr, Bool* dataPtr);
122  void getuCharV (uInt rownr, uChar* dataPtr);
123  void getShortV (uInt rownr, Short* dataPtr);
124  void getuShortV (uInt rownr, uShort* dataPtr);
125  void getIntV (uInt rownr, Int* dataPtr);
126  void getuIntV (uInt rownr, uInt* dataPtr);
127  void getfloatV (uInt rownr, float* dataPtr);
128  void getdoubleV (uInt rownr, double* dataPtr);
129  void getComplexV (uInt rownr, Complex* dataPtr);
130  void getDComplexV (uInt rownr, DComplex* dataPtr);
131  void getStringV (uInt rownr, String* dataPtr);
132  // </group>
133 
134  // Put a scalar value into the given row.
135  // The buffer pointed to by dataPtr has to have the correct length
136  // (which is guaranteed by the Scalar/ArrayColumn put function).
137  // <group>
138  void putBoolV (uInt rownr, const Bool* dataPtr);
139  void putuCharV (uInt rownr, const uChar* dataPtr);
140  void putShortV (uInt rownr, const Short* dataPtr);
141  void putuShortV (uInt rownr, const uShort* dataPtr);
142  void putIntV (uInt rownr, const Int* dataPtr);
143  void putuIntV (uInt rownr, const uInt* dataPtr);
144  void putfloatV (uInt rownr, const float* dataPtr);
145  void putdoubleV (uInt rownr, const double* dataPtr);
146  void putComplexV (uInt rownr, const Complex* dataPtr);
147  void putDComplexV (uInt rownr, const DComplex* dataPtr);
148  void putStringV (uInt rownr, const String* dataPtr);
149  // </group>
150 
151  // Get scalars from the given row on with a maximum of nrmax values.
152  // This can be used to get an entire column of scalars or to get
153  // a part of a column (for a cache for example).
154  // The buffer pointed to by dataPtr has to have the correct length
155  // (which is guaranteed by the ScalarColumn get function).
156  // <group>
157  uInt getBlockBoolV (uInt rownr, uInt nrmax, Bool* dataPtr);
158  uInt getBlockuCharV (uInt rownr, uInt nrmax, uChar* dataPtr);
159  uInt getBlockShortV (uInt rownr, uInt nrmax, Short* dataPtr);
160  uInt getBlockuShortV (uInt rownr, uInt nrmax, uShort* dataPtr);
161  uInt getBlockIntV (uInt rownr, uInt nrmax, Int* dataPtr);
162  uInt getBlockuIntV (uInt rownr, uInt nrmax, uInt* dataPtr);
163  uInt getBlockfloatV (uInt rownr, uInt nrmax, float* dataPtr);
164  uInt getBlockdoubleV (uInt rownr, uInt nrmax, double* dataPtr);
165  uInt getBlockComplexV (uInt rownr, uInt nrmax, Complex* dataPtr);
166  uInt getBlockDComplexV (uInt rownr, uInt nrmax, DComplex* dataPtr);
167  uInt getBlockStringV (uInt rownr, uInt nrmax, String* dataPtr);
168  // </group>
169 
170  // Put nrmax scalars from the given row on.
171  // This can be used to put an entire column of scalars or to put
172  // a part of a column (for a cache for example).
173  // The buffer pointed to by dataPtr has to have the correct length
174  // (which is guaranteed by the ScalarColumn put function).
175  // <group>
176  void putBlockBoolV (uInt rownr, uInt nrmax, const Bool* dataPtr);
177  void putBlockuCharV (uInt rownr, uInt nrmax, const uChar* dataPtr);
178  void putBlockShortV (uInt rownr, uInt nrmax, const Short* dataPtr);
179  void putBlockuShortV (uInt rownr, uInt nrmax, const uShort* dataPtr);
180  void putBlockIntV (uInt rownr, uInt nrmax, const Int* dataPtr);
181  void putBlockuIntV (uInt rownr, uInt nrmax, const uInt* dataPtr);
182  void putBlockfloatV (uInt rownr, uInt nrmax, const float* dataPtr);
183  void putBlockdoubleV (uInt rownr, uInt nrmax, const double* dataPtr);
184  void putBlockComplexV (uInt rownr, uInt nrmax, const Complex* dataPtr);
185  void putBlockDComplexV (uInt rownr, uInt nrmax, const DComplex* dataPtr);
186  void putBlockStringV (uInt rownr, uInt nrmax, const String* dataPtr);
187  // </group>
188 
189  // Get the scalar values in some cells of the column.
190  // The buffer pointed to by dataPtr has to have the correct length.
191  // (which is guaranteed by the ScalarColumn getColumnCells function).
192  // The default implementation loops through all rows.
193  // <group>
194  virtual void getScalarColumnCellsBoolV (const RefRows& rownrs,
195  Vector<Bool>* dataPtr);
196  virtual void getScalarColumnCellsuCharV (const RefRows& rownrs,
197  Vector<uChar>* dataPtr);
198  virtual void getScalarColumnCellsShortV (const RefRows& rownrs,
199  Vector<Short>* dataPtr);
200  virtual void getScalarColumnCellsuShortV (const RefRows& rownrs,
201  Vector<uShort>* dataPtr);
202  virtual void getScalarColumnCellsIntV (const RefRows& rownrs,
203  Vector<Int>* dataPtr);
204  virtual void getScalarColumnCellsuIntV (const RefRows& rownrs,
205  Vector<uInt>* dataPtr);
206  virtual void getScalarColumnCellsfloatV (const RefRows& rownrs,
207  Vector<float>* dataPtr);
208  virtual void getScalarColumnCellsdoubleV (const RefRows& rownrs,
209  Vector<double>* dataPtr);
210  virtual void getScalarColumnCellsComplexV (const RefRows& rownrs,
211  Vector<Complex>* dataPtr);
212  virtual void getScalarColumnCellsDComplexV (const RefRows& rownrs,
213  Vector<DComplex>* dataPtr);
214  virtual void getScalarColumnCellsStringV (const RefRows& rownrs,
215  Vector<String>* dataPtr);
216  // </group>
217 
218  // Add (newNrrow-oldNrrow) rows to the column.
219  virtual void addRow (uInt newNrrow, uInt oldNrrow);
220 
221  // Resize the data blocks.
222  // This adds an extension when needed.
223  void resize (uInt nrval);
224 
225  // Remove the given row.
226  // If no rows remain in the extension, the extension is also removed.
227  virtual void remove (uInt rownr);
228 
229  // Create the number of rows in a new table.
230  // This is used when a table gets created.
231  virtual void doCreate (uInt nrrow);
232 
233  // Write the column data into AipsIO.
234  // It will successively write all extensions using putData.
235  virtual void putFile (uInt nrval, AipsIO&);
236 
237  // Read the column data from AipsIO.
238  // One extension gets allocated to hold all rows in the column.
239  virtual void getFile (uInt nrval, AipsIO&);
240 
241  // Reopen the storage manager files for read/write.
242  virtual void reopenRW();
243 
244  // Check if the class invariants still hold.
245  virtual Bool ok() const;
246 
247 protected:
248  // The storage manager.
250  // The data type (for caching purposes).
251  int dtype_p;
252  // The data is indirectly accessed via a pointer (for the derived classes).
254  // The number of allocated rows in the column.
256  // The nr of extensions in use.
258  // The assembly of all extensions (actually Block<T*>).
260  // The cumulative nr of rows in all extensions.
262 
263  // Find the extension in which the row number is.
264  // If the flag is true, it also sets the columnCache object.
265  uInt findExt (uInt rownr, Bool setCache);
266 
267  // Get the next extension.
268  // For the first iteration extnr should be zero.
269  // It returns the number of values in it until the maximum is reached.
270  // Zero means no more extensions.
271  uInt nextExt (void*& ext, uInt& extnr, uInt nrmax) const;
272 
273  // Allocate an extension with the data type of the column.
274  void* allocData (uInt nrval, Bool byPtr);
275 
276  // Delete all extensions.
277  // Possible underlying data (as used by StManArrayColumnAipsIO)
278  // will not be deleted and should have been deleted beforehand.
279  void deleteAll();
280 
281  // Delete an extension.
282  void deleteData (void* datap, Bool byPtr);
283 
284  // Remove an entry (i.e. a row) from an extension at the given index.
285  // It will do this by shifting the rest (nrvalAfter elements)
286  // one position to the left.
287  void removeData (void* datap, uInt inx, uInt nrvalAfter);
288 
289  // Put the data (nrval elements) in an extension (starting at datap)
290  // into AipsIO.
291  virtual void putData (void* datap, uInt nrval, AipsIO&);
292 
293  // Get data (nrval elements) into an extension (starting at datap
294  // plus the given index).
295  virtual void getData (void* datap, uInt index, uInt nrval, AipsIO&,
296  uInt version);
297 
298  // Get the pointer for the given row.
299  // This is for the derived classes like StManArrayColumnAipsIO.
300  void* getArrayPtr (uInt rownr);
301 
302  // Put the pointer for the given row.
303  // This is for the derived classes like StManArrayColumnAipsIO.
304  void putArrayPtr (uInt rownr, void* dataPtr);
305 
306 private:
307  // Forbid copy constructor.
309 
310  // Forbid assignment.
312 };
313 
314 
315 
316 
317 // <summary>
318 // AipsIO table storage manager class
319 // </summary>
320 
321 // <use visibility=export>
322 
323 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
324 // </reviewed>
325 
326 // <prerequisite>
327 //# Classes you should understand before using this one.
328 // <li> DataManager
329 // <li> StManColumnAipsIO
330 // </prerequisite>
331 
332 // <etymology>
333 // StManAipsIO is the storage manager using AipsIO.
334 // </etymology>
335 
336 // <synopsis>
337 // StManAipsIO is a table storage manager based on AipsIO.
338 // It holds the data in the columns in memory and writes them to
339 // a file when the table gets closed. Only the data of indirect arrays
340 // are directly read/written from/to a file.
341 // It contains pointers to the underlying StManColumnAipsIO objects,
342 // which do the actual data handling.
343 //
344 // The AipsIO storage manager does fully support addition and removal
345 // of rows and columns.
346 //
347 // All data, except indirect columns, for this storage manager are kept
348 // in one file. The file name is the table name appended with
349 // .N_AipsIO, where N is the (unique) storage manager sequence number.
350 // Each column containing indirect arrays is stored in a separate file
351 // using class StManIndArrayColumnAipsIO. The name of such a file is
352 // the storage manager file name appended with _cM, where M is a unique
353 // column sequence number acquired using function uniqueNr().
354 // </synopsis>
355 
356 // <todo asof="$DATE:$">
357 //# A List of bugs, limitations, extensions or planned refinements.
358 // </todo>
359 
360 
361 class StManAipsIO : public DataManager
362 {
363 public:
364 
365  // Create an AipsIO storage manager.
366  // Its name will be blank.
367  StManAipsIO();
368 
369  // Create an AipsIO storage manager with the given name.
370  // Its name can be used later in e.g. Table::addColumn to
371  // add a column to this storage manager.
372  // <br> Note that the 2nd constructor is needed for table creation
373  // from a record specification.
374  // <group>
375  StManAipsIO (const String& storageManagerName);
376  StManAipsIO (const String& storageManagerName, const Record&);
377  // </group>
378 
379  ~StManAipsIO();
380 
381  // Clone this object.
382  // It does not clone StManAipsIOColumn objects possibly used.
383  DataManager* clone() const;
384 
385  // Get the type name of the data manager (i.e. StManAipsIO).
386  String dataManagerType() const;
387 
388  // Get the name given to this storage manager.
389  String dataManagerName() const;
390 
391  // Get a unique column number for the column
392  // (it is only unique for this storage manager).
393  // This is used by StManIndArrayColumnAipsIO to create a unique file name.
395  { return uniqnr_p++; }
396 
397  // Get the nr of rows in this storage manager.
398  uInt nrow() const
399  { return nrrow_p; }
400 
401  // Set the hasPut_p flag. In this way the StManAipsIOColumn objects
402  // can indicate that data have been put.
403  void setHasPut()
404  { hasPut_p = True; }
405 
406  // Does the storage manager allow to add rows? (yes)
407  Bool canAddRow() const;
408 
409  // Does the storage manager allow to delete rows? (yes)
410  Bool canRemoveRow() const;
411 
412  // Does the storage manager allow to add columns? (yes)
413  Bool canAddColumn() const;
414 
415  // Does the storage manager allow to delete columns? (yes)
416  Bool canRemoveColumn() const;
417 
418  // Make the object from the string.
419  // This function gets registered in the DataManager "constructor" map.
420  static DataManager* makeObject (const String& dataManagerType,
421  const Record& spec);
422 
423  // Open (if needed) the file for indirect arrays with the given mode.
424  // Return a pointer to the object.
425  StManArrayFile* openArrayFile (ByteIO::OpenOption opt);
426 
427 
428 private:
429  // Forbid copy constructor.
430  StManAipsIO (const StManAipsIO&);
431 
432  // Forbid assignment.
434 
435  // Flush and optionally fsync the data.
436  // It returns a True status if it had to flush (i.e. if data have changed).
437  virtual Bool flush (AipsIO&, Bool fsync);
438 
439  // Let the storage manager create files as needed for a new table.
440  // This allows a column with an indirect array to create its file.
441  virtual void create (uInt nrrow);
442 
443  // Open the storage manager file for an existing table and read in
444  // the data and let the StManColumnAipsIO objects read their data.
445  virtual void open (uInt nrrow, AipsIO&);
446 
447  // Resync the storage manager with the new file contents.
448  // This is done by clearing the cache.
449  virtual void resync (uInt nrrow);
450 
451  // Reopen the storage manager files for read/write.
452  virtual void reopenRW();
453 
454  // The data manager will be deleted (because all its columns are
455  // requested to be deleted).
456  // So clean up the things needed (e.g. delete files).
457  virtual void deleteManager();
458 
459  // Add rows to all columns.
460  void addRow (uInt nrrow);
461 
462  // Delete a row from all columns.
463  void removeRow (uInt rownr);
464 
465  // Create a column in the storage manager on behalf of a table column.
466  // <group>
467  // Create a scalar column.
468  DataManagerColumn* makeScalarColumn (const String& name, int dataType,
469  const String& dataTypeID);
470  // Create a direct array column.
471  DataManagerColumn* makeDirArrColumn (const String& name, int dataType,
472  const String& dataTypeID);
473  // Create an indirect array column.
474  DataManagerColumn* makeIndArrColumn (const String& name, int dataType,
475  const String& dataTypeID);
476  // </group>
477 
478  // Add a column.
479  void addColumn (DataManagerColumn*);
480 
481  // Delete a column.
482  void removeColumn (DataManagerColumn*);
483 
484 
485  // Name given by user to this storage manager.
487  // Unique nr for column in this storage manager.
489  // The number of rows in the columns.
491  // The assembly of all columns.
493  // Has anything been put since the last flush?
495  // The file containing the indirect arrays.
497 };
498 
499 
500 
501 
502 } //# NAMESPACE CASACORE - END
503 
504 #endif
uInt getBlockStringV(uInt rownr, uInt nrmax, String *dataPtr)
uInt getBlockdoubleV(uInt rownr, uInt nrmax, double *dataPtr)
void putuShortV(uInt rownr, const uShort *dataPtr)
int Int
Definition: aipstype.h:47
virtual void putData(void *datap, uInt nrval, AipsIO &)
Put the data (nrval elements) in an extension (starting at datap) into AipsIO.
void putfloatV(uInt rownr, const float *dataPtr)
void putBlockShortV(uInt rownr, uInt nrmax, const Short *dataPtr)
void getuShortV(uInt rownr, uShort *dataPtr)
uInt nrext_p
The nr of extensions in use.
Definition: StManAipsIO.h:257
void putBlockdoubleV(uInt rownr, uInt nrmax, const double *dataPtr)
void resize(uInt nrval)
Resize the data blocks.
virtual void putFile(uInt nrval, AipsIO &)
Write the column data into AipsIO.
virtual ~StManColumnAipsIO()
Frees up the storage.
void getShortV(uInt rownr, Short *dataPtr)
void putBlockBoolV(uInt rownr, uInt nrmax, const Bool *dataPtr)
Put nrmax scalars from the given row on.
void putBlockfloatV(uInt rownr, uInt nrmax, const float *dataPtr)
AipsIO is the object persistency mechanism of Casacore.
Definition: AipsIO.h:168
void putShortV(uInt rownr, const Short *dataPtr)
uInt nralloc_p
The number of allocated rows in the column.
Definition: StManAipsIO.h:255
Abstract base class for a column in a data manager.
Definition: DataManager.h:616
virtual void getScalarColumnCellsShortV(const RefRows &rownrs, Vector< Short > *dataPtr)
int dtype_p
The data type (for caching purposes).
Definition: StManAipsIO.h:251
uInt getBlockDComplexV(uInt rownr, uInt nrmax, DComplex *dataPtr)
uInt getBlockuCharV(uInt rownr, uInt nrmax, uChar *dataPtr)
void deleteAll()
Delete all extensions.
void putdoubleV(uInt rownr, const double *dataPtr)
void getdoubleV(uInt rownr, double *dataPtr)
virtual void getData(void *datap, uInt index, uInt nrval, AipsIO &, uInt version)
Get data (nrval elements) into an extension (starting at datap plus the given index).
unsigned char uChar
Definition: aipstype.h:44
void setHasPut()
Set the hasPut_p flag.
Definition: StManAipsIO.h:403
void putBlockIntV(uInt rownr, uInt nrmax, const Int *dataPtr)
uInt getBlockComplexV(uInt rownr, uInt nrmax, Complex *dataPtr)
void putuIntV(uInt rownr, const uInt *dataPtr)
void putBlockuShortV(uInt rownr, uInt nrmax, const uShort *dataPtr)
void putComplexV(uInt rownr, const Complex *dataPtr)
String stmanName_p
Name given by user to this storage manager.
Definition: StManAipsIO.h:486
void putBlockuCharV(uInt rownr, uInt nrmax, const uChar *dataPtr)
StManAipsIO * stmanPtr_p
The storage manager.
Definition: StManAipsIO.h:249
Block< void * > data_p
The assembly of all extensions (actually Block<T*>).
Definition: StManAipsIO.h:259
uInt getBlockShortV(uInt rownr, uInt nrmax, Short *dataPtr)
virtual void getScalarColumnCellsStringV(const RefRows &rownrs, Vector< String > *dataPtr)
void putDComplexV(uInt rownr, const DComplex *dataPtr)
virtual void getScalarColumnCellsIntV(const RefRows &rownrs, Vector< Int > *dataPtr)
int dataType() const
Return the data type of the column.
short Short
Definition: aipstype.h:45
void getDComplexV(uInt rownr, DComplex *dataPtr)
virtual void getScalarColumnCellsDComplexV(const RefRows &rownrs, Vector< DComplex > *dataPtr)
virtual void getScalarColumnCellsuShortV(const RefRows &rownrs, Vector< uShort > *dataPtr)
StManArrayFile * iosfile_p
The file containing the indirect arrays.
Definition: StManAipsIO.h:496
AipsIO table column storage manager class.
Definition: StManAipsIO.h:106
void putIntV(uInt rownr, const Int *dataPtr)
Bool byPtr_p
The data is indirectly accessed via a pointer (for the derived classes).
Definition: StManAipsIO.h:253
virtual void getScalarColumnCellsuCharV(const RefRows &rownrs, Vector< uChar > *dataPtr)
Block< uInt > ncum_p
The cumulative nr of rows in all extensions.
Definition: StManAipsIO.h:261
void * getArrayPtr(uInt rownr)
Get the pointer for the given row.
void getuCharV(uInt rownr, uChar *dataPtr)
StManColumnAipsIO(StManAipsIO *stMan, int dataType, Bool byPtr)
Create a column of the given type.
uInt nrrow_p
The number of rows in the columns.
Definition: StManAipsIO.h:490
void deleteData(void *datap, Bool byPtr)
Delete an extension.
virtual void getScalarColumnCellsuIntV(const RefRows &rownrs, Vector< uInt > *dataPtr)
virtual void getFile(uInt nrval, AipsIO &)
Read the column data from AipsIO.
Class holding the row numbers in a RefTable.
Definition: RefRows.h:85
void getIntV(uInt rownr, Int *dataPtr)
virtual void getScalarColumnCellsdoubleV(const RefRows &rownrs, Vector< double > *dataPtr)
virtual void reopenRW()
Reopen the storage manager files for read/write.
void putBlockComplexV(uInt rownr, uInt nrmax, const Complex *dataPtr)
void putArrayPtr(uInt rownr, void *dataPtr)
Put the pointer for the given row.
A hierarchical collection of named fields of various types.
Definition: Record.h:181
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:39
virtual void getScalarColumnCellsComplexV(const RefRows &rownrs, Vector< Complex > *dataPtr)
virtual void doCreate(uInt nrrow)
Create the number of rows in a new table.
virtual void getScalarColumnCellsfloatV(const RefRows &rownrs, Vector< float > *dataPtr)
uInt getBlockBoolV(uInt rownr, uInt nrmax, Bool *dataPtr)
Get scalars from the given row on with a maximum of nrmax values.
A drop-in replacement for Block<T*>.
Definition: Block.h:861
uInt getBlockfloatV(uInt rownr, uInt nrmax, float *dataPtr)
void putBlockStringV(uInt rownr, uInt nrmax, const String *dataPtr)
virtual Bool ok() const
Check if the class invariants still hold.
void putBlockDComplexV(uInt rownr, uInt nrmax, const DComplex *dataPtr)
AipsIO table storage manager class.
Definition: StManAipsIO.h:361
OpenOption
Define the possible ByteIO open options.
Definition: ByteIO.h:65
uInt nrow() const
Get the nr of rows in this storage manager.
Definition: StManAipsIO.h:398
uInt uniqueNr()
Get a unique column number for the column (it is only unique for this storage manager).
Definition: StManAipsIO.h:394
void putBlockuIntV(uInt rownr, uInt nrmax, const uInt *dataPtr)
Abstract base class for a data manager.
Definition: DataManager.h:222
StManColumnAipsIO & operator=(const StManColumnAipsIO &)
Forbid assignment.
uInt getBlockuShortV(uInt rownr, uInt nrmax, uShort *dataPtr)
uInt getBlockuIntV(uInt rownr, uInt nrmax, uInt *dataPtr)
void removeData(void *datap, uInt inx, uInt nrvalAfter)
Remove an entry (i.e.
void putBoolV(uInt rownr, const Bool *dataPtr)
Put a scalar value into the given row.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void putStringV(uInt rownr, const String *dataPtr)
virtual void addRow(uInt newNrrow, uInt oldNrrow)
Add (newNrrow-oldNrrow) rows to the column.
PtrBlock< StManColumnAipsIO * > colSet_p
The assembly of all columns.
Definition: StManAipsIO.h:492
uInt uniqnr_p
Unique nr for column in this storage manager.
Definition: StManAipsIO.h:488
Base table column storage manager class.
Definition: StManColumn.h:102
void getStringV(uInt rownr, String *dataPtr)
Bool hasPut_p
Has anything been put since the last flush?
Definition: StManAipsIO.h:494
void * allocData(uInt nrval, Bool byPtr)
Allocate an extension with the data type of the column.
Read/write array in external format for a storage manager.
Definition: StArrayFile.h:129
uInt findExt(uInt rownr, Bool setCache)
Find the extension in which the row number is.
const Bool True
Definition: aipstype.h:40
this file contains all the compiler specific defines
Definition: mainpage.dox:28
void getComplexV(uInt rownr, Complex *dataPtr)
uInt nextExt(void *&ext, uInt &extnr, uInt nrmax) const
Get the next extension.
uInt getBlockIntV(uInt rownr, uInt nrmax, Int *dataPtr)
unsigned int uInt
Definition: aipstype.h:48
void getBoolV(uInt rownr, Bool *dataPtr)
Get a scalar value in the given row.
void getfloatV(uInt rownr, float *dataPtr)
void getuIntV(uInt rownr, uInt *dataPtr)
unsigned short uShort
Definition: aipstype.h:46
virtual void getScalarColumnCellsBoolV(const RefRows &rownrs, Vector< Bool > *dataPtr)
Get the scalar values in some cells of the column.
void putuCharV(uInt rownr, const uChar *dataPtr)