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