casacore
Loading...
Searching...
No Matches
ConcatScalarColumn.h
Go to the documentation of this file.
1// # ConcatScalarColumn.h: A typed scalar column in a concatenated table
2// # Copyright (C) 2008
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_CONCATSCALARCOLUMN_H
27#define TABLES_CONCATSCALARCOLUMN_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/Tables/ConcatColumn.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// <summary>
36// A typed column in a concatenated table
37// </summary>
38
39// <use visibility=local>
40
41// <reviewed reviewer="UNKNOWN" date="" tests="">
42// </reviewed>
43
44// <prerequisite>
45// # Classes you should understand before using this one.
46// <li> ConcatTable
47// <li> BaseColumn
48// </prerequisite>
49
50// <etymology>
51// ConcatTable represents a column in a ConcatTable. A ConcatTable is a table
52// referencing another table, usually as the result of a select, etc..
53// </etymology>
54
55// <synopsis>
56// ConcatColumn handles the access of a column in a ConcatTable.
57// It calls the corresponding function in the referenced column
58// while converting the given row number to the row number in the
59// referenced table.
60// </synopsis>
61
62// <motivation>
63// This class is untyped, i.e. not templated.
64// Every call is sent to the underlying referenced BaseColumn which
65// is typed by the virtual function mechanism.
66// A ConcatColumn can never be used directly. A user always has to
67// construct a typed ArrayColumn or ScalarColumn object to access a column.
68// This means everyting is fully type safe.
69// </motivation>
70
71// <todo asof="$DATE:$">
72// # A List of bugs, limitations, extensions or planned refinements.
73// <li> Act upon removal of rows or the underlying column
74// </todo>
75
76template <typename T>
78 public:
79 // Construct the ConcatColumn. It will point to the given column
80 // description, ConcatTable and referenced column.
81 // The ConcatTable will be used to convert the rownr to the rownr
82 // in the apprpriate table.
84
86
87 // Get the vector of all scalar values in a column.
88 virtual void getScalarColumn(ArrayBase& dataPtr) const;
89
90 // Get the vector of some scalar values in a column.
91 virtual void getScalarColumnCells(const RefRows& rownrs, ArrayBase& dataPtr) const;
92
93 // Put the vector of all scalar values in the column.
94 virtual void putScalarColumn(const ArrayBase& dataPtr);
95
96 // Get the vector of some scalar values in a column.
97 virtual void putScalarColumnCells(const RefRows& rownrs, const ArrayBase& dataPtr);
98
99 // Handle the creation and deletion of sort keys.
100 // <group>
101 virtual void makeSortKey(Sort& sortobj, std::shared_ptr<BaseCompare>& cmpObj, Int order,
102 std::shared_ptr<ArrayBase>& dataSave);
103 virtual void makeRefSortKey(Sort& sortobj, std::shared_ptr<BaseCompare>& cmpObj, Int order,
104 const Vector<rownr_t>& rownrs, std::shared_ptr<ArrayBase>& dataSave);
105 virtual void fillSortKey(const Vector<T>* vecPtr, Sort& sortobj,
106 std::shared_ptr<BaseCompare>& cmpObj, Int order);
107 // </group>
108};
109
110} // namespace casacore
111
112#ifndef CASACORE_NO_AUTO_TEMPLATES
113#include <casacore/tables/Tables/ConcatScalarColumn.tcc>
114#endif // # CASACORE_NO_AUTO_TEMPLATES
115#endif
Non-templated base class for templated Array class.
Definition ArrayBase.h:69
ConcatColumn(const BaseColumnDesc *, ConcatTable *)
Construct the ConcatColumn.
virtual void getScalarColumnCells(const RefRows &rownrs, ArrayBase &dataPtr) const
Get the vector of some scalar values in a column.
virtual void makeRefSortKey(Sort &sortobj, std::shared_ptr< BaseCompare > &cmpObj, Int order, const Vector< rownr_t > &rownrs, std::shared_ptr< ArrayBase > &dataSave)
Do it only for the given row numbers.
virtual void getScalarColumn(ArrayBase &dataPtr) const
Get the vector of all scalar values in a column.
ConcatScalarColumn(const BaseColumnDesc *, ConcatTable *)
Construct the ConcatColumn.
virtual void fillSortKey(const Vector< T > *vecPtr, Sort &sortobj, std::shared_ptr< BaseCompare > &cmpObj, Int order)
virtual void putScalarColumn(const ArrayBase &dataPtr)
Put the vector of all scalar values in the column.
virtual void makeSortKey(Sort &sortobj, std::shared_ptr< BaseCompare > &cmpObj, Int order, std::shared_ptr< ArrayBase > &dataSave)
Handle the creation and deletion of sort keys.
virtual void putScalarColumnCells(const RefRows &rownrs, const ArrayBase &dataPtr)
Get the vector of some scalar values in a column.
Sort on one or more keys, ascending and/or descending.
Definition Sort.h:239
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
uInt order() const
What is the order of the polynomial, i.e.
int Int
Definition aipstype.h:48