casacore
Loading...
Searching...
No Matches
SSMIndStringColumn.h
Go to the documentation of this file.
1// # SSMIndStringColumn.h: An Indirect String Array Column in the SSM
2// # Copyright (C) 2000
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_SSMINDSTRINGCOLUMN_H
27#define TABLES_SSMINDSTRINGCOLUMN_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/DataMan/SSMDirColumn.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// # Forward declarations
36
37// <summary>
38// An Indirect String Array Column in the Standard Storage Manager.
39// </summary>
40
41// <use visibility=local>
42
43// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tSSMStringHandler.cc">
44// </reviewed>
45
46// <prerequisite>
47// # Classes you should understand before using this one.
48// <li> <linkto class=SSMBase>SSMBase</linkto>
49// <li> <linkto class=SSMDirColumn>SSMColumn</linkto>
50// <li> <linkto class=SSMStringHandler>SSMStringHandler</linkto>
51// </prerequisite>
52
53// <etymology>
54// SSMIndStringColumn represents an Indirect String Array Column in the
55// Standard Storage Manager.
56// </etymology>
57
58// <synopsis>
59// SSMIndStringColumn handles indirect variable shaped string arrays.
60// Note that indirect fixed shape string arrays are handled by
61// <linkto class=SSMDirColumn>SSMDirColumn</linkto>.
62// <p>
63// All string array access is handled by class
64// <linkto class=SSMStringHandler>SSMStringHandler</linkto>, so
65// SSMIndStringColumn is merely an interface to this class.
66// The only thing it does is accessing the bucketnr, offset, and length
67// in the data bucket.
68// </synopsis>
69
70// <motivation>
71// The reason that indirect string arrays are handled here instead of
72// in <linkto class=SSMIndColumn>SSMIndColumn</linkto> is that the string
73// buckets are more disk space efficient when string arrays are frequently
74// updated.
75// </motivation>
76
77// # <todo asof="$DATE:$">
78// # A List of bugs, limitations, extensions or planned refinements.
79// # </todo>
80
82 public:
83 // Create a SSMIndStringColumn object with the given parent.
84 // It initializes the various variables.
85 // It keeps the pointer to its parent (but does not own it).
86 SSMIndStringColumn(SSMBase* aParent, int aDataType, uInt aColNr);
87
89
90 // Forbid copy constructor.
92
93 // Forbid assignment.
95
96 // Get an array value in the given row.
97 // An exception is thrown if no array is defined in this row.
98 virtual void getArrayV(rownr_t rownr, ArrayBase& dataPtr);
99
100 // Put an array value in the given row.
101 virtual void putArrayV(rownr_t rownr, const ArrayBase& dataPtr);
102
103 // Set the shape of the array in the given row.
104 void setShape(rownr_t aRowNr, const IPosition& aShape);
105
106 // Get the shape of the array in the given row.
107 virtual IPosition shape(rownr_t aRowNr);
108
109 // This storage manager can handle changing array shapes.
111
112 // Is the shape defined (i.e. is there an array) in this row?
113 virtual Bool isShapeDefined(rownr_t aRowNr);
114
115 // Get the dimensionality of the item in the given row.
116 virtual uInt ndim(rownr_t aRowNr);
117};
118
119} // namespace casacore
120
121#endif
Non-templated base class for templated Array class.
Definition ArrayBase.h:69
SSMDirColumn(SSMBase *aParent, int aDataType, uInt aColNr)
Create a SSMDirColumn object with the given parent.
virtual Bool isShapeDefined(rownr_t aRowNr)
Is the shape defined (i.e.
Bool canChangeShape() const
This storage manager can handle changing array shapes.
SSMIndStringColumn(const SSMIndStringColumn &)=delete
Forbid copy constructor.
virtual void putArrayV(rownr_t rownr, const ArrayBase &dataPtr)
Put an array value in the given row.
SSMIndStringColumn(SSMBase *aParent, int aDataType, uInt aColNr)
Create a SSMIndStringColumn object with the given parent.
void setShape(rownr_t aRowNr, const IPosition &aShape)
Set the shape of the array in the given row.
SSMIndStringColumn & operator=(const SSMIndStringColumn &)=delete
Forbid assignment.
virtual void getArrayV(rownr_t rownr, ArrayBase &dataPtr)
Get an array value in the given row.
virtual IPosition shape(rownr_t aRowNr)
Get the shape of the array in the given row.
virtual uInt ndim(rownr_t aRowNr)
Get the dimensionality of the item in the given row.
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
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