casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SSMDirColumn.h
Go to the documentation of this file.
1 //# SSMDirColumn.h: A Column for Direct Arrays in the Standard Storage Manager
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: aips2-request@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 //# $Id$
27 
28 #ifndef TABLES_SSMDIRCOLUMN_H
29 #define TABLES_SSMDIRCOLUMN_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
35 
36 namespace casacore { //# NAMESPACE CASACORE - BEGIN
37 
38 //# Forward declarations
39 
40 
41 // <summary>
42 // A Direct Array Column in the Standard Storage Manager.
43 // </summary>
44 
45 // <use visibility=local>
46 
47 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tStandardStMan.cc">
48 // </reviewed>
49 
50 // <prerequisite>
51 //# Classes you should understand before using this one.
52 // <li> <linkto class=SSMBase>SSMBase</linkto>
53 // <li> <linkto class=SSMColumn>SSMColumn</linkto>
54 // <li> <linkto class=SSMStringHandler>SSMStringHandler</linkto>
55 // </prerequisite>
56 
57 // <etymology>
58 // SSMDirColumn represents a Direct Array Column in the
59 // Standard Storage Manager.
60 // </etymology>
61 
62 // <synopsis>
63 // SSMDirColumn handles the access to a column containing direct
64 // arrays of the various data types.
65 // <br>
66 // It is derived from <linkto class=SSMColumn>SSMColumn</linkto>
67 // and uses most of its functions. The only thing done differently
68 // in this class is that it maintains no cache.
69 // Furthermore fixed length strings are not handled specially.
70 // All string arrays are stored in the special string buckets.
71 // </synopsis>
72 
73 //# <todo asof="$DATE:$">
74 //# A List of bugs, limitations, extensions or planned refinements.
75 //# </todo>
76 
77 
78 class SSMDirColumn : public SSMColumn
79 {
80 public:
81  // Create a SSMDirColumn object with the given parent.
82  // It initializes the various variables.
83  // It keeps the pointer to its parent (but does not own it).
84  SSMDirColumn (SSMBase* aParent, int aDataType, uInt aColNr);
85 
86  virtual ~SSMDirColumn();
87 
88  // An array of 'fixed length' strings is not handled specially,
89  // thus this function is ignored.
90  // It is needed to override the bahviour of the base class.
91  virtual void setMaxLength (uInt maxLength);
92 
93  // Get an array value in the given row.
94  virtual void getArrayV (rownr_t rownr, ArrayBase& dataPtr);
95 
96  // Put an array value in the given row.
97  virtual void putArrayV (rownr_t rownr, const ArrayBase& dataPtr);
98 
99  // Remove the given row from the data bucket and possibly string bucket.
100  virtual void deleteRow (rownr_t aRowNr);
101 
102 
103 protected:
104  // Read the array data for the given row into the data buffer.
105  void getValue (rownr_t aRowNr, void* data);
106 
107 private:
108  // Forbid copy constructor.
109  SSMDirColumn (const SSMDirColumn&);
110 
111  // Forbid assignment.
113 };
114 
115 
116 
117 } //# NAMESPACE CASACORE - END
118 
119 #endif
SSMDirColumn(SSMBase *aParent, int aDataType, uInt aColNr)
Create a SSMDirColumn object with the given parent.
SSMDirColumn & operator=(const SSMDirColumn &)
Forbid assignment.
Non-templated base class for templated Array class.
Definition: ArrayBase.h:72
virtual void setMaxLength(uInt maxLength)
An array of &#39;fixed length&#39; strings is not handled specially, thus this function is ignored...
virtual void deleteRow(rownr_t aRowNr)
Remove the given row from the data bucket and possibly string bucket.
A Direct Array Column in the Standard Storage Manager.
Definition: SSMDirColumn.h:78
Base class of the Standard Storage Manager.
Definition: SSMBase.h:158
A Column in the Standard Storage Manager.
Definition: SSMColumn.h:99
uInt64 rownr_t
Define the type of a row number in a table.
Definition: aipsxtype.h:46
virtual void getArrayV(rownr_t rownr, ArrayBase &dataPtr)
Get an array value in the given row.
void getValue(rownr_t aRowNr, void *data)
Read the array data for the given row into the data buffer.
unsigned int uInt
Definition: aipstype.h:51
virtual void putArrayV(rownr_t rownr, const ArrayBase &dataPtr)
Put an array value in the given row.