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