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