casacore
ForwardCol.h
Go to the documentation of this file.
1 //# ForwardCol.h: Virtual Column Engine to forward to other columns
2 //# Copyright (C) 1995,1996,1997,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_FORWARDCOL_H
29 #define TABLES_FORWARDCOL_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/DataMan/VirtColEng.h>
34 #include <casacore/tables/DataMan/DataManager.h>
35 #include <casacore/tables/Tables/Table.h>
36 #include <casacore/tables/Tables/TableColumn.h>
37 #include <casacore/casa/Containers/Block.h>
38 #include <casacore/casa/BasicSL/String.h>
39 
40 namespace casacore { //# NAMESPACE CASACORE - BEGIN
41 
42 //# Forward Declarations
43 class ForwardColumnEngine;
44 class BaseColumn;
45 
46 
47 // <summary>
48 // Virtual column forwarding to another column
49 // </summary>
50 
51 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
52 // </reviewed>
53 
54 // <use visibility=local>
55 
56 // <prerequisite>
57 //# Classes you should understand before using this one.
58 // <li> ForwardColumnEngine
59 // <li> DataManagerColumn
60 // </prerequisite>
61 
62 // <synopsis>
63 // ForwardColumn represents a virtual column which forwards the
64 // gets and puts to a column with the same name in another table.
65 // It is, in fact, a reference to the other column.
66 // The name of the other table is stored as a keyword in the
67 // forwarding column. When there is a forwarding chain (i.e.
68 // forwarding to a forwarding column), the name of the last
69 // table in the chain is stored in the keyword. In this way, the
70 // length of the chain is kept to a minimum. Otherwise a very long
71 // chain could occur, which would slow things down.
72 //
73 // Addition and deletion of rows is allowed, but the functions addRow and
74 // removeRow do not do anything at all. They are implemented to override
75 // the default "throw exception" implementation. Because the engine
76 // allows this, it can be used in a table supporting addition and removal
77 // of rows.
78 //
79 // An object of this class is created (and deleted) by
80 // <linkto class="ForwardColumnEngine:description">ForwardColumnEngine</linkto>
81 // which creates a ForwardColumn object for each column being forwarded.
82 // </synopsis>
83 
84 // <motivation>
85 // This class will be used by the calibration software.
86 // Most columns in a measurement table will be forwarded, while
87 // a few (i.e. the data themselves) will be calculated by a dedicated
88 // calibration engine.
89 // </motivation>
90 
92 {
93 public:
94 
95  // Construct it for the given column.
97  const String& columnName,
98  int dataType,
99  const String& dataTypeId,
100  const Table& referencedTable);
101 
102  // Destructor is mandatory.
103  virtual ~ForwardColumn();
104 
105  // Define the special keyword containing the name of the original table.
106  // If the column in the referenced table contains that special keyword,
107  // it is in its turn a forwarding column. In that case the special
108  // keyword value will be copied over to shortcut the forwarding chain.
109  // The suffix is appended to the keyword name when defining it.
110  // This makes this function usable for derived classes.
111  void fillTableName (const Table& thisTable, const Table& referencedTable);
112 
113  // Initialize the object.
114  // This means binding the column to the column with the same name
115  // in the original table.
116  // It checks if the description of both columns is the same.
117  // It also determines if the column is writable.
118  virtual void prepare (const Table& thisTable);
119 
120  // Set the column to writable if its underlying table is writable.
121  void setRW();
122 
123 protected:
124  // Do the preparation of the base class column object.
125  void basePrepare (const Table& thisTable, Bool writable);
126 
128  { return colPtr_p; }
129 
130 private:
131  // Copy constructor is not needed and therefore forbidden
132  // (so make it private).
134 
135  // Assignment is not needed and therefore forbidden (so make it private).
137 
138  // Create a SetupNewTable object with the given name and option
139  // and with the description from the given table.
140  // The SetupNewTable object will use a single ForwardColumn
141  // engine which forwards all columns to the given table.
142  // Later the SetupNewTable::bind functions can be used to bind one
143  // or more columns to another data manager.
144  static SetupNewTable setupNewTable (const Table& table,
145  const String& tableName,
146  Table::TableOption option);
147 
148  // This data manager may be able to handle changing array shapes.
150 
151  // This data manager may be able to do get/putScalarColumn.
153 
154  // This data manager may be able to do get/putArrayColumn.
156 
157  // This data manager may be able to do get/putSlice.
158  Bool canAccessSlice (Bool& reask) const;
159 
160  // This data manager may be able to do get/putColumnSlice.
162 
163  // Get the data type of the column as defined in DataType.h.
164  int dataType() const;
165 
166  // Get the data type id of the column for dataType==TpOther.
167  // This function is required for virtual column engines handling
168  // non-standard data types. It is used to check the data type.
170 
171  // Test if data can be put into this column.
172  Bool isWritable() const;
173 
174  // Set the shape of an direct array.
175  // This only checks if the shape matches the referenced column.
177 
178  // Set the shape of an (indirect) array in the given row.
179  void setShape (uInt rownr, const IPosition& shape);
180 
181  // Is the value shape defined in the given row?
183 
184  // Get the dimensionality of the item in the given row.
185  uInt ndim (uInt rownr);
186 
187  // Get the shape of the item in the given row.
189 
190  // Get the scalar value with a standard data type in the given row.
191  // <group>
192  void getBoolV (uInt rownr, Bool* dataPtr);
193  void getuCharV (uInt rownr, uChar* dataPtr);
194  void getShortV (uInt rownr, Short* dataPtr);
195  void getuShortV (uInt rownr, uShort* dataPtr);
196  void getIntV (uInt rownr, Int* dataPtr);
197  void getuIntV (uInt rownr, uInt* dataPtr);
198  void getInt64V (uInt rownr, Int64* dataPtr);
199  void getfloatV (uInt rownr, float* dataPtr);
200  void getdoubleV (uInt rownr, double* dataPtr);
201  void getComplexV (uInt rownr, Complex* dataPtr);
202  void getDComplexV (uInt rownr, DComplex* dataPtr);
203  void getStringV (uInt rownr, String* dataPtr);
204  // </group>
205 
206  // Get the scalar value with a non-standard data type in the given row.
207  void getOtherV (uInt rownr, void* dataPtr);
208 
209  // Put the scalar value with a standard data type into the given row.
210  // <group>
211  void putBoolV (uInt rownr, const Bool* dataPtr);
212  void putuCharV (uInt rownr, const uChar* dataPtr);
213  void putShortV (uInt rownr, const Short* dataPtr);
214  void putuShortV (uInt rownr, const uShort* dataPtr);
215  void putIntV (uInt rownr, const Int* dataPtr);
216  void putuIntV (uInt rownr, const uInt* dataPtr);
217  void putInt64V (uInt rownr, const Int64* dataPtr);
218  void putfloatV (uInt rownr, const float* dataPtr);
219  void putdoubleV (uInt rownr, const double* dataPtr);
220  void putComplexV (uInt rownr, const Complex* dataPtr);
221  void putDComplexV (uInt rownr, const DComplex* dataPtr);
222  void putStringV (uInt rownr, const String* dataPtr);
223  // </group>
224 
225  // Put the scalar value with a non-standard data type into the given row.
226  void putOtherV (uInt rownr, const void* dataPtr);
227 
228  // Get all scalar values in the column.
229  // The argument dataPtr is in fact a Vector<T>*, but a void*
230  // is needed to be generic.
231  // The vector pointed to by dataPtr has to have the correct length
232  // (which is guaranteed by the ScalarColumn getColumn function).
233  void getScalarColumnV (void* dataPtr);
234 
235  // Put all scalar values in the column.
236  // The argument dataPtr is in fact a const Vector<T>*, but a const void*
237  // is needed to be generic.
238  // The vector pointed to by dataPtr has to have the correct length
239  // (which is guaranteed by the ScalarColumn putColumn function).
240  void putScalarColumnV (const void* dataPtr);
241 
242  // Get some scalar values in the column.
243  // The argument dataPtr is in fact a Vector<T>*, but a void*
244  // is needed to be generic.
245  // The vector pointed to by dataPtr has to have the correct length
246  // (which is guaranteed by the ScalarColumn getColumn function).
247  virtual void getScalarColumnCellsV (const RefRows& rownrs,
248  void* dataPtr);
249 
250  // Put some scalar values in the column.
251  // The argument dataPtr is in fact a const Vector<T>*, but a const void*
252  // is needed to be generic.
253  // The vector pointed to by dataPtr has to have the correct length
254  // (which is guaranteed by the ScalarColumn getColumn function).
255  virtual void putScalarColumnCellsV (const RefRows& rownrs,
256  const void* dataPtr);
257 
258  // Get the array value in the given row.
259  // The argument dataPtr is in fact a Array<T>*, but a void*
260  // is needed to be generic.
261  // The array pointed to by dataPtr has to have the correct shape
262  // (which is guaranteed by the ArrayColumn get function).
263  void getArrayV (uInt rownr, void* dataPtr);
264 
265  // Put the array value into the given row.
266  // The argument dataPtr is in fact a const Array<T>*, but a const void*
267  // is needed to be generic.
268  // The array pointed to by dataPtr has to have the correct shape
269  // (which is guaranteed by the ArrayColumn put function).
270  void putArrayV (uInt rownr, const void* dataPtr);
271 
272  // Get a section of the array in the given row.
273  // The argument dataPtr is in fact a Array<T>*, but a void*
274  // is needed to be generic.
275  // The array pointed to by dataPtr has to have the correct shape
276  // (which is guaranteed by the ArrayColumn getSlice function).
277  void getSliceV (uInt rownr, const Slicer& slicer, void* dataPtr);
278 
279  // Put into a section of the array in the given row.
280  // The argument dataPtr is in fact a const Array<T>*, but a const void*
281  // is needed to be generic.
282  // The array pointed to by dataPtr has to have the correct shape
283  // (which is guaranteed by the ArrayColumn putSlice function).
284  void putSliceV (uInt rownr, const Slicer& slicer, const void* dataPtr);
285 
286  // Get all scalar values in the column.
287  // The argument dataPtr is in fact a Vector<T>*, but a void*
288  // is needed to be generic.
289  // The vector pointed to by dataPtr has to have the correct length
290  // (which is guaranteed by the ScalarColumn getColumn function).
291  void getArrayColumnV (void* dataPtr);
292 
293  // Put all scalar values in the column.
294  // The argument dataPtr is in fact a const Vector<T>*, but a const void*
295  // is needed to be generic.
296  // The vector pointed to by dataPtr has to have the correct length
297  // (which is guaranteed by the ScalarColumn putColumn function).
298  void putArrayColumnV (const void* dataPtr);
299 
300  // Get some array values in the column.
301  // The argument dataPtr is in fact an Array<T>*, but a void*
302  // is needed to be generic.
303  // The vector pointed to by dataPtr has to have the correct length
304  // (which is guaranteed by the ArrayColumn getColumn function).
305  virtual void getArrayColumnCellsV (const RefRows& rownrs,
306  void* dataPtr);
307 
308  // Put some array values in the column.
309  // The argument dataPtr is in fact an const Array<T>*, but a const void*
310  // is needed to be generic.
311  // The vector pointed to by dataPtr has to have the correct length
312  // (which is guaranteed by the ArrayColumn getColumn function).
313  virtual void putArrayColumnCellsV (const RefRows& rownrs,
314  const void* dataPtr);
315 
316  // Get a section of all arrays in the column.
317  // The argument dataPtr is in fact a Array<T>*, but a void*
318  // is needed to be generic.
319  // The array pointed to by dataPtr has to have the correct shape
320  // (which is guaranteed by the ArrayColumn getColumn function).
321  void getColumnSliceV (const Slicer& slicer, void* dataPtr);
322 
323  // Put a section into all arrays in the column.
324  // The argument dataPtr is in fact a const Array<T>*, but a const void*
325  // is needed to be generic.
326  // The array pointed to by dataPtr has to have the correct shape
327  // (which is guaranteed by the ArrayColumn putColumn function).
328  void putColumnSliceV (const Slicer& slicer, const void* dataPtr);
329 
330  // Get a section of some arrays in the column.
331  // The argument dataPtr is in fact an Array<T>*, but a void*
332  // is needed to be generic.
333  // The array pointed to by dataPtr has to have the correct shape
334  // (which is guaranteed by the ArrayColumn getColumn function).
335  virtual void getColumnSliceCellsV (const RefRows& rownrs,
336  const Slicer& slicer, void* dataPtr);
337 
338  // Put into a section of some arrays in the column.
339  // The argument dataPtr is in fact a const Array<T>*, but a const void*
340  // is needed to be generic.
341  // The array pointed to by dataPtr has to have the correct shape
342  // (which is guaranteed by the ArrayColumn putColumn function).
343  virtual void putColumnSliceCellsV (const RefRows& rownrs,
344  const Slicer& slicer,
345  const void* dataPtr);
346 
347 
348  //# Now define the data members.
349  ForwardColumnEngine* enginePtr_p; //# pointer to parent engine
350  String colName_p; //# The name of the column
351  int dataType_p; //# data type of the column
352  String dataTypeId_p; //# data type Id of the column
353  TableColumn refCol_p; //# Column in referenced table
354  //# This is only filled in when
355  //# a new table is created.
356  Bool writable_p; //# True = column is writable
357  Table origTable_p; //# The original table for this column
358  BaseColumn* colPtr_p; //# pointer to column in original table
359 };
360 
361 
362 
363 
364 // <summary>
365 // Virtual column engine forwarding to other columns
366 // </summary>
367 
368 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
369 // </reviewed>
370 
371 // <use visibility=export>
372 
373 // <prerequisite>
374 //# Classes you should understand before using this one.
375 // <li> VirtualColumnEngine
376 // </prerequisite>
377 
378 // <synopsis>
379 // ForwardColumnEngine is a data manager which forwards
380 // the gets and puts of columns to columns with the same names in
381 // another table.
382 // It is, in fact, a reference to the other table columns.
383 // The engine consists of a set of
384 // <linkto class="ForwardColumn:description">ForwardColumn</linkto>
385 // objects, which handle the actual gets and puts.
386 // </synopsis>
387 
388 // <motivation>
389 // This class will be used by the calibration software.
390 // Most columns in a measurement table will be forwarded
391 // (thus bound to a ForwardColumnEngine object), while
392 // a few (i.e. the data themselves) will be calculated by a dedicated
393 // calibration engine.
394 // </motivation>
395 
396 // <example>
397 // <srcblock>
398 // // The original table.
399 // Table tab("someTable");
400 // // Create another table with the same description.
401 // SetupNewTable newtab("tForwardCol1.data", tab.tableDesc(), Table::New);
402 // // Create an engine which forwards to the original table.
403 // // Bind all columns in the new table to the forwarding engine.
404 // ForwardColumnEngine fce(tab);
405 // newtab.bindAll (fce);
406 // // Create the new table.
407 // // Every get and put on this table is forwarded to the original table.
408 // // NB. Puts cannot be done here, because the original table was
409 // // opened as readonly.
410 // // Of course, some columns could have been bound to another
411 // // data manager (storage manager, calibration engine, ...).
412 // Table forwTab(newtab);
413 // </srcblock>
414 // </example>
415 
417 {
418 public:
419 
420  // The default constructor is required for reconstruction of the
421  // engine when a table is read back.
423 
424  // Create the engine.
425  // The columns using this engine will reference the given table.
426  // The data manager gets the given name.
427  ForwardColumnEngine (const Table& referencedTable,
428  const String& dataManagerName);
429 
430  // Create the engine.
431  // The columns using this engine will reference the given table.
432  // The data manager has no name.
433  ForwardColumnEngine (const Table& referencedTable);
434 
435  // Destructor is mandatory.
437 
438  // Clone the engine object.
439  DataManager* clone() const;
440 
441  // Return the name of the data manager. This is the name of this
442  // instantiation of the data manager, thus not its type name.
444 
445  // Return the type of the engine (i.e. its class name ForwardColumnEngine).
447 
448  // Record a record containing data manager specifications.
449  virtual Record dataManagerSpec() const;
450 
451  // Get the suffix to be used for names.
452  const String& suffix() const;
453 
454  // Return the name of the class.
455  static String className();
456 
457  // Register the class name and the static makeObject "constructor".
458  // This will make the engine known to the table system.
459  static void registerClass();
460 
461 protected:
462  // Set the suffix.
463  void setSuffix (const String& suffix);
464 
465  // Add a ForwardColumn object to the block.
467 
468  // Get access to the refTable_p data member.
469  const Table& refTable() const
470  { return refTable_p; }
471 
472  // Do the creation (i.e. initialization) of the engine.
473  void baseCreate();
474 
475  // Do the preparation of the engine by preparing all columns.
476  void basePrepare();
477 
478 private:
479  // The copy constructor is forbidden (so it is private).
481 
482  // Assignment is forbidden (so it is private).
484 
485  // This data manager allows to add rows.
486  Bool canAddRow() const;
487 
488  // This data manager allows to delete rows.
490 
491  // Add rows to all columns.
492  // This is not doing anything (but needed to override the default).
493  void addRow (uInt nrrow);
494 
495  // Delete a row from all columns.
496  // This is not doing anything (but needed to override the default).
497  void removeRow (uInt rownr);
498 
499  // This data manager allows to add columns.
501 
502  // This data manager allows to delete columns.
504 
505  // Add a column.
507 
508  // Delete a column.
510 
511  // Create the column object for the scalar column in this engine.
513  int dataType,
514  const String& dataTypeId);
515 
516  // Create the column object for the indirect array column in this engine.
518  int dataType,
519  const String& dataTypeId);
520 
521  // Initialize the object for a new table.
522  // It defines the column keywords containing the name of the
523  // original table, which can be the parent of the referenced table.
524  void create (uInt initialNrrow);
525 
526  // Initialize the engine.
527  // It gets the name of the original table(s) from the column keywords,
528  // opens those tables and attaches the ForwardColumn objects to the
529  // columns in those tables.
530  void prepare();
531 
532  // Reopen the engine for read/write access.
533  // It makes all its columns writable if their underlying table is writable.
534  void reopenRW();
535 
536 
537  // Define the various engine column objects.
539  // The referenced table.
540  // For newly created tables this is filled in by the constructor.
541  // For existing tables this is filled in by the first ForwardColumn
542  // object being constructed.
544  // The name of the data manager.
546  // The suffix to be used in names.
548 
549 
550 public:
551  // Set RefTable_p if not set yet.
552  // This is done by ForwardColumn to cover the case for existing
553  // tables where the default constructor of ForwardColumnEngine
554  // is used and refTable_p is not filled in.
555  void setRefTable (const Table& refTable);
556 
557  // Define the "constructor" to construct this engine when a
558  // table is read back.
559  // This "constructor" has to be registered by the user of the engine.
560  // If the engine is commonly used, its registration can be added
561  // into the registerAllCtor function in DataManReg.cc.
562  // This function gets automatically invoked by the table system.
564  const Record& spec);
565 };
566 
567 
568 
569 inline const String& ForwardColumnEngine::suffix() const
570  { return suffix_p; }
571 
572 inline void ForwardColumnEngine::setSuffix (const String& suffix)
573  { suffix_p = suffix; }
574 
575 
576 
577 } //# NAMESPACE CASACORE - END
578 
579 #endif
casacore::ForwardColumn::getBoolV
void getBoolV(uInt rownr, Bool *dataPtr)
Get the scalar value with a standard data type in the given row.
casacore::ForwardColumnEngine::addRow
void addRow(uInt nrrow)
Add rows to all columns.
casacore::ForwardColumn::putComplexV
void putComplexV(uInt rownr, const Complex *dataPtr)
casacore::ForwardColumn::getOtherV
void getOtherV(uInt rownr, void *dataPtr)
Get the scalar value with a non-standard data type in the given row.
casacore::ForwardColumn::operator=
ForwardColumn & operator=(const ForwardColumn &)
Assignment is not needed and therefore forbidden (so make it private).
casacore::Slicer
Definition: Slicer.h:290
casacore::ForwardColumnEngine::makeScalarColumn
DataManagerColumn * makeScalarColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the scalar column in this engine.
casacore::ForwardColumn::putColumnSliceCellsV
virtual void putColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, const void *dataPtr)
Put into a section of some arrays in the column.
casacore::ForwardColumn::putColumnSliceV
void putColumnSliceV(const Slicer &slicer, const void *dataPtr)
Put a section into all arrays in the column.
casacore::IPosition
Definition: IPosition.h:120
casacore::ForwardColumn::fillTableName
void fillTableName(const Table &thisTable, const Table &referencedTable)
Define the special keyword containing the name of the original table.
casacore::ForwardColumnEngine::removeRow
void removeRow(uInt rownr)
Delete a row from all columns.
casacore::DataManager
Abstract base class for a data manager.
Definition: DataManager.h:225
casacore::ForwardColumn::getComplexV
void getComplexV(uInt rownr, Complex *dataPtr)
casacore::ForwardColumnEngine::addForwardColumn
void addForwardColumn(ForwardColumn *colp)
Add a ForwardColumn object to the block.
casacore::ForwardColumn::setShapeColumn
void setShapeColumn(const IPosition &shape)
Set the shape of an direct array.
casacore::PtrBlock
A drop-in replacement for Block<T*>.
Definition: Block.h:814
casacore::ForwardColumnEngine::canAddRow
Bool canAddRow() const
This data manager allows to add rows.
casacore::TableColumn
Definition: TableColumn.h:99
casacore::ForwardColumnEngine::registerClass
static void registerClass()
Register the class name and the static makeObject "constructor".
casacore::ForwardColumn::getSliceV
void getSliceV(uInt rownr, const Slicer &slicer, void *dataPtr)
Get a section of the array in the given row.
Complexfwd_global_functions_Complexfwd::casacore::DComplex
std::complex< Double > DComplex
Definition: Complexfwd.h:50
casacore::ForwardColumn::setRW
void setRW()
Set the column to writable if its underlying table is writable.
casacore::ForwardColumn::canChangeShape
Bool canChangeShape() const
This data manager may be able to handle changing array shapes.
casacore::ForwardColumn::putShortV
void putShortV(uInt rownr, const Short *dataPtr)
casacore::ForwardColumnEngine::ForwardColumnEngine
ForwardColumnEngine(const ForwardColumnEngine &)
The copy constructor is forbidden (so it is private).
casacore::ForwardColumn::setupNewTable
static SetupNewTable setupNewTable(const Table &table, const String &tableName, Table::TableOption option)
Create a SetupNewTable object with the given name and option and with the description from the given ...
casacore::ForwardColumn::getuIntV
void getuIntV(uInt rownr, uInt *dataPtr)
casacore::ForwardColumnEngine::makeIndArrColumn
DataManagerColumn * makeIndArrColumn(const String &columnName, int dataType, const String &dataTypeId)
Create the column object for the indirect array column in this engine.
casacore::uChar
unsigned char uChar
Definition: aipstype.h:47
casacore::ForwardColumn::getArrayV
void getArrayV(uInt rownr, void *dataPtr)
Get the array value in the given row.
casacore::ForwardColumn::getIntV
void getIntV(uInt rownr, Int *dataPtr)
casacore::ForwardColumn::dataTypeId
String dataTypeId() const
Get the data type id of the column for dataType==TpOther.
casacore::ForwardColumnEngine::suffix
const String & suffix() const
Get the suffix to be used for names.
Definition: ForwardCol.h:569
casacore::ForwardColumnEngine::refColumns_p
PtrBlock< ForwardColumn * > refColumns_p
Define the various engine column objects.
Definition: ForwardCol.h:538
casacore::ForwardColumn::getInt64V
void getInt64V(uInt rownr, Int64 *dataPtr)
casacore::ForwardColumn::putfloatV
void putfloatV(uInt rownr, const float *dataPtr)
casacore::DataManagerColumn
Abstract base class for a column in a data manager.
Definition: DataManager.h:612
casacore::ForwardColumn::putuCharV
void putuCharV(uInt rownr, const uChar *dataPtr)
casacore::ForwardColumnEngine::className
static String className()
Return the name of the class.
casacore::ForwardColumnEngine::suffix_p
String suffix_p
The suffix to be used in names.
Definition: ForwardCol.h:547
casacore::ForwardColumnEngine::canAddColumn
Bool canAddColumn() const
This data manager allows to add columns.
casacore::ForwardColumn::putdoubleV
void putdoubleV(uInt rownr, const double *dataPtr)
casacore::ForwardColumn::putArrayV
void putArrayV(uInt rownr, const void *dataPtr)
Put the array value into the given row.
casacore::ForwardColumn::putOtherV
void putOtherV(uInt rownr, const void *dataPtr)
Put the scalar value with a non-standard data type into the given row.
casacore::ForwardColumn::isWritable
Bool isWritable() const
Test if data can be put into this column.
casacore::ForwardColumn::dataType
int dataType() const
Get the data type of the column as defined in DataType.h.
casacore::ForwardColumn::ForwardColumn
ForwardColumn(ForwardColumnEngine *enginePtr, const String &columnName, int dataType, const String &dataTypeId, const Table &referencedTable)
Construct it for the given column.
casacore::ForwardColumnEngine::canRemoveRow
Bool canRemoveRow() const
This data manager allows to delete rows.
casacore::ForwardColumn
Definition: ForwardCol.h:92
casacore::ForwardColumnEngine::refTable
const Table & refTable() const
Get access to the refTable_p data member.
Definition: ForwardCol.h:469
casacore::ForwardColumn::shape
IPosition shape(uInt rownr)
Get the shape of the item in the given row.
casacore::ForwardColumnEngine::dataManagerSpec
virtual Record dataManagerSpec() const
Record a record containing data manager specifications.
casacore::ForwardColumn::putScalarColumnV
void putScalarColumnV(const void *dataPtr)
Put all scalar values in the column.
casacore::DataManagerColumn::columnName
const String & columnName() const
Get rhe column name.
Definition: DataManager.h:1003
casacore::ForwardColumn::basePrepare
void basePrepare(const Table &thisTable, Bool writable)
Do the preparation of the base class column object.
casacore::ForwardColumn::canAccessArrayColumn
Bool canAccessArrayColumn(Bool &reask) const
This data manager may be able to do get/putArrayColumn.
casacore::ForwardColumn::setShape
void setShape(uInt rownr, const IPosition &shape)
Set the shape of an (indirect) array in the given row.
casacore::ForwardColumnEngine::ForwardColumnEngine
ForwardColumnEngine(const Table &referencedTable)
Create the engine.
casacore::Table
Definition: Table.h:154
casacore::ForwardColumn::getArrayColumnV
void getArrayColumnV(void *dataPtr)
Get all scalar values in the column.
casacore::ForwardColumnEngine::~ForwardColumnEngine
~ForwardColumnEngine()
Destructor is mandatory.
casacore::ForwardColumn::getDComplexV
void getDComplexV(uInt rownr, DComplex *dataPtr)
casacore::ForwardColumn::dataType_p
int dataType_p
Definition: ForwardCol.h:351
casacore::ForwardColumn::getScalarColumnV
void getScalarColumnV(void *dataPtr)
Get all scalar values in the column.
casacore::ForwardColumn::putuShortV
void putuShortV(uInt rownr, const uShort *dataPtr)
casacore::uShort
unsigned short uShort
Definition: aipstype.h:49
casacore::ForwardColumn::colPtr
BaseColumn * colPtr() const
Definition: ForwardCol.h:127
casacore::RefRows
Definition: RefRows.h:86
casacore::ForwardColumn::getScalarColumnCellsV
virtual void getScalarColumnCellsV(const RefRows &rownrs, void *dataPtr)
Get some scalar values in the column.
casacore::ForwardColumn::ndim
uInt ndim(uInt rownr)
Get the dimensionality of the item in the given row.
casacore::BaseColumn
Definition: BaseColumn.h:99
casacore::ForwardColumn::getShortV
void getShortV(uInt rownr, Short *dataPtr)
casacore::uInt
unsigned int uInt
Definition: aipstype.h:51
casacore::ForwardColumnEngine::dataManName_p
String dataManName_p
The name of the data manager.
Definition: ForwardCol.h:545
casacore::ForwardColumn::refCol_p
TableColumn refCol_p
Definition: ForwardCol.h:353
casacore::ForwardColumnEngine::dataManagerType
String dataManagerType() const
Return the type of the engine (i.e.
casacore::ForwardColumn::canAccessColumnSlice
Bool canAccessColumnSlice(Bool &reask) const
This data manager may be able to do get/putColumnSlice.
casacore::ForwardColumn::enginePtr_p
ForwardColumnEngine * enginePtr_p
Definition: ForwardCol.h:349
casacore::ForwardColumnEngine::create
void create(uInt initialNrrow)
Initialize the object for a new table.
casacore::ForwardColumn::putDComplexV
void putDComplexV(uInt rownr, const DComplex *dataPtr)
casacore::ForwardColumn::ForwardColumn
ForwardColumn(const ForwardColumn &)
Copy constructor is not needed and therefore forbidden (so make it private).
casacore::ForwardColumn::origTable_p
Table origTable_p
Definition: ForwardCol.h:357
casacore::VirtualColumnEngine
Definition: VirtColEng.h:112
casacore::SetupNewTable
Create a new table - define shapes, data managers, etc.
Definition: SetupNewTab.h:347
casacore::ForwardColumn::putuIntV
void putuIntV(uInt rownr, const uInt *dataPtr)
casacore::ForwardColumnEngine::setRefTable
void setRefTable(const Table &refTable)
Set RefTable_p if not set yet.
casacore::Int
int Int
Definition: aipstype.h:50
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
casacore::ForwardColumnEngine::makeObject
static DataManager * makeObject(const String &dataManagerType, const Record &spec)
Define the "constructor" to construct this engine when a table is read back.
casacore::ForwardColumnEngine::operator=
ForwardColumnEngine & operator=(const ForwardColumnEngine &)
Assignment is forbidden (so it is private).
casacore::ForwardColumn::getuShortV
void getuShortV(uInt rownr, uShort *dataPtr)
casacore::ForwardColumn::putStringV
void putStringV(uInt rownr, const String *dataPtr)
casacore::ForwardColumn::getStringV
void getStringV(uInt rownr, String *dataPtr)
casacore::ForwardColumnEngine::setSuffix
void setSuffix(const String &suffix)
Set the suffix.
Definition: ForwardCol.h:572
casacore::ForwardColumnEngine::removeColumn
void removeColumn(DataManagerColumn *)
Delete a column.
casacore::ForwardColumn::getfloatV
void getfloatV(uInt rownr, float *dataPtr)
casacore::ForwardColumn::isShapeDefined
Bool isShapeDefined(uInt rownr)
Is the value shape defined in the given row?
casacore::ForwardColumnEngine::reopenRW
void reopenRW()
Reopen the engine for read/write access.
casacore::ForwardColumn::putInt64V
void putInt64V(uInt rownr, const Int64 *dataPtr)
casacore::ForwardColumn::writable_p
Bool writable_p
Definition: ForwardCol.h:356
casacore::ForwardColumn::getuCharV
void getuCharV(uInt rownr, uChar *dataPtr)
casacore::ForwardColumnEngine::dataManagerName
String dataManagerName() const
Return the name of the data manager.
casacore::ForwardColumn::getColumnSliceCellsV
virtual void getColumnSliceCellsV(const RefRows &rownrs, const Slicer &slicer, void *dataPtr)
Get a section of some arrays in the column.
casacore::Int64
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
casacore::ForwardColumnEngine::refTable_p
Table refTable_p
The referenced table.
Definition: ForwardCol.h:543
casacore::ForwardColumn::getdoubleV
void getdoubleV(uInt rownr, double *dataPtr)
casacore::ForwardColumnEngine::addColumn
void addColumn(DataManagerColumn *)
Add a column.
casacore::ForwardColumnEngine::ForwardColumnEngine
ForwardColumnEngine(const String &dataManagerName, const Record &spec)
The default constructor is required for reconstruction of the engine when a table is read back.
casacore::ForwardColumnEngine::baseCreate
void baseCreate()
Do the creation (i.e.
casacore::String
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::ForwardColumnEngine
Virtual column engine forwarding to other columns.
Definition: ForwardCol.h:417
casacore::ForwardColumn::canAccessSlice
Bool canAccessSlice(Bool &reask) const
This data manager may be able to do get/putSlice.
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Complexfwd_global_functions_Complexfwd::casacore::Complex
std::complex< Float > Complex
Definition: Complexfwd.h:49
casacore::ForwardColumn::colPtr_p
BaseColumn * colPtr_p
Definition: ForwardCol.h:358
casacore::ForwardColumn::putScalarColumnCellsV
virtual void putScalarColumnCellsV(const RefRows &rownrs, const void *dataPtr)
Put some scalar values in the column.
casacore::Record
Definition: Record.h:181
casacore::Short
short Short
Definition: aipstype.h:48
casacore::ForwardColumnEngine::canRemoveColumn
Bool canRemoveColumn() const
This data manager allows to delete columns.
casacore::ForwardColumnEngine::basePrepare
void basePrepare()
Do the preparation of the engine by preparing all columns.
casacore::ForwardColumn::putArrayColumnV
void putArrayColumnV(const void *dataPtr)
Put all scalar values in the column.
casacore::ForwardColumn::getArrayColumnCellsV
virtual void getArrayColumnCellsV(const RefRows &rownrs, void *dataPtr)
Get some array values in the column.
casacore::ForwardColumnEngine::clone
DataManager * clone() const
Clone the engine object.
casacore::ForwardColumn::prepare
virtual void prepare(const Table &thisTable)
Initialize the object.
casacore::ForwardColumn::colName_p
String colName_p
Definition: ForwardCol.h:350
casacore::Table::TableOption
TableOption
Define the possible options how a table can be opened.
Definition: Table.h:168
casacore::ForwardColumn::putSliceV
void putSliceV(uInt rownr, const Slicer &slicer, const void *dataPtr)
Put into a section of the array in the given row.
casacore::ForwardColumn::putBoolV
void putBoolV(uInt rownr, const Bool *dataPtr)
Put the scalar value with a standard data type into the given row.
casacore::ForwardColumn::putIntV
void putIntV(uInt rownr, const Int *dataPtr)
casacore::ForwardColumn::getColumnSliceV
void getColumnSliceV(const Slicer &slicer, void *dataPtr)
Get a section of all arrays in the column.
casacore::ForwardColumnEngine::ForwardColumnEngine
ForwardColumnEngine(const Table &referencedTable, const String &dataManagerName)
Create the engine.
casacore::ForwardColumn::~ForwardColumn
virtual ~ForwardColumn()
Destructor is mandatory.
casacore::ForwardColumn::dataTypeId_p
String dataTypeId_p
Definition: ForwardCol.h:352
casacore::ForwardColumn::putArrayColumnCellsV
virtual void putArrayColumnCellsV(const RefRows &rownrs, const void *dataPtr)
Put some array values in the column.
casacore::ForwardColumn::canAccessScalarColumn
Bool canAccessScalarColumn(Bool &reask) const
This data manager may be able to do get/putScalarColumn.
casacore::ForwardColumnEngine::prepare
void prepare()
Initialize the engine.