casa  5.7.0-16
 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  // <group>
95  virtual void getArrayBoolV (uInt rownr, Array<Bool>* dataPtr);
96  virtual void getArrayuCharV (uInt rownr, Array<uChar>* dataPtr);
97  virtual void getArrayShortV (uInt rownr, Array<Short>* dataPtr);
98  virtual void getArrayuShortV (uInt rownr, Array<uShort>* dataPtr);
99  virtual void getArrayIntV (uInt rownr, Array<Int>* dataPtr);
100  virtual void getArrayuIntV (uInt rownr, Array<uInt>* dataPtr);
101  virtual void getArrayInt64V (uInt rownr, Array<Int64>* dataPtr);
102  virtual void getArrayfloatV (uInt rownr, Array<float>* dataPtr);
103  virtual void getArraydoubleV (uInt rownr, Array<double>* dataPtr);
104  virtual void getArrayComplexV (uInt rownr, Array<Complex>* dataPtr);
105  virtual void getArrayDComplexV (uInt rownr, Array<DComplex>* dataPtr);
106  virtual void getArrayStringV (uInt rownr, Array<String>* dataPtr);
107  // </group>
108 
109  // Put an array value in the given row.
110  // <group>
111  virtual void putArrayBoolV (uInt rownr, const Array<Bool>* dataPtr);
112  virtual void putArrayuCharV (uInt rownr, const Array<uChar>* dataPtr);
113  virtual void putArrayShortV (uInt rownr, const Array<Short>* dataPtr);
114  virtual void putArrayuShortV (uInt rownr, const Array<uShort>* dataPtr);
115  virtual void putArrayIntV (uInt rownr, const Array<Int>* dataPtr);
116  virtual void putArrayuIntV (uInt rownr, const Array<uInt>* dataPtr);
117  virtual void putArrayInt64V (uInt rownr, const Array<Int64>* dataPtr);
118  virtual void putArrayfloatV (uInt rownr, const Array<float>* dataPtr);
119  virtual void putArraydoubleV (uInt rownr, const Array<double>* dataPtr);
120  virtual void putArrayComplexV (uInt rownr, const Array<Complex>* dataPtr);
121  virtual void putArrayDComplexV (uInt rownr, const Array<DComplex>* dataPtr);
122  virtual void putArrayStringV (uInt rownr, const Array<String>* dataPtr);
123  // </group>
124 
125  // Remove the given row from the data bucket and possibly string bucket.
126  virtual void deleteRow(uInt aRowNr);
127 
128 
129 protected:
130  // Read the array data for the given row into the data buffer.
131  void getValue (uInt aRowNr, void* data);
132 
133 private:
134  // Forbid copy constructor.
135  SSMDirColumn (const SSMDirColumn&);
136 
137  // Forbid assignment.
139 };
140 
141 
142 
143 } //# NAMESPACE CASACORE - END
144 
145 #endif
SSMDirColumn(SSMBase *aParent, int aDataType, uInt aColNr)
Create a SSMDirColumn object with the given parent.
virtual void putArrayfloatV(uInt rownr, const Array< float > *dataPtr)
virtual void getArrayuIntV(uInt rownr, Array< uInt > *dataPtr)
virtual void putArrayuCharV(uInt rownr, const Array< uChar > *dataPtr)
SSMDirColumn & operator=(const SSMDirColumn &)
Forbid assignment.
virtual void setMaxLength(uInt maxLength)
An array of &#39;fixed length&#39; strings is not handled specially, thus this function is ignored...
virtual void getArrayBoolV(uInt rownr, Array< Bool > *dataPtr)
Get an array value in the given row.
virtual void putArrayuIntV(uInt rownr, const Array< uInt > *dataPtr)
virtual void putArrayuShortV(uInt rownr, const Array< uShort > *dataPtr)
virtual void getArrayIntV(uInt rownr, Array< Int > *dataPtr)
A Direct Array Column in the Standard Storage Manager.
Definition: SSMDirColumn.h:78
virtual void putArrayStringV(uInt rownr, const Array< String > *dataPtr)
virtual void putArrayDComplexV(uInt rownr, const Array< DComplex > *dataPtr)
void getValue(uInt aRowNr, void *data)
Read the array data for the given row into the data buffer.
Base class of the Standard Storage Manager.
Definition: SSMBase.h:158
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
Definition: PlotData.h:48
virtual void putArrayInt64V(uInt rownr, const Array< Int64 > *dataPtr)
virtual void getArrayComplexV(uInt rownr, Array< Complex > *dataPtr)
virtual void getArrayInt64V(uInt rownr, Array< Int64 > *dataPtr)
virtual void deleteRow(uInt aRowNr)
Remove the given row from the data bucket and possibly string bucket.
virtual void putArrayIntV(uInt rownr, const Array< Int > *dataPtr)
virtual void putArrayShortV(uInt rownr, const Array< Short > *dataPtr)
A Column in the Standard Storage Manager.
Definition: SSMColumn.h:99
virtual void putArrayComplexV(uInt rownr, const Array< Complex > *dataPtr)
virtual void getArrayShortV(uInt rownr, Array< Short > *dataPtr)
virtual void getArrayuShortV(uInt rownr, Array< uShort > *dataPtr)
virtual void getArrayStringV(uInt rownr, Array< String > *dataPtr)
virtual void putArraydoubleV(uInt rownr, const Array< double > *dataPtr)
virtual void putArrayBoolV(uInt rownr, const Array< Bool > *dataPtr)
Put an array value in the given row.
virtual void getArrayDComplexV(uInt rownr, Array< DComplex > *dataPtr)
virtual void getArrayfloatV(uInt rownr, Array< float > *dataPtr)
virtual void getArrayuCharV(uInt rownr, Array< uChar > *dataPtr)
unsigned int uInt
Definition: aipstype.h:51
virtual void getArraydoubleV(uInt rownr, Array< double > *dataPtr)
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42