casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SSMDirColumn.h
Go to the documentation of this file.
00001 //# SSMDirColumn.h: A Column for Direct Arrays in the Standard Storage Manager
00002 //# Copyright (C) 2000
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: SSMDirColumn.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $
00027 
00028 #ifndef TABLES_SSMDIRCOLUMN_H
00029 #define TABLES_SSMDIRCOLUMN_H
00030 
00031 
00032 //# Includes
00033 #include <casa/aips.h>
00034 #include <tables/Tables/SSMColumn.h>
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 //# Forward declarations
00039 
00040 
00041 // <summary>
00042 // A Direct Array Column in the Standard Storage Manager.
00043 // </summary>
00044 
00045 // <use visibility=local>
00046 
00047 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tStandardStMan.cc">
00048 // </reviewed>
00049 
00050 // <prerequisite>
00051 //# Classes you should understand before using this one.
00052 //   <li> <linkto class=SSMBase>SSMBase</linkto>
00053 //   <li> <linkto class=SSMColumn>SSMColumn</linkto>
00054 //   <li> <linkto class=SSMStringHandler>SSMStringHandler</linkto>
00055 // </prerequisite>
00056 
00057 // <etymology>
00058 // SSMDirColumn represents a Direct Array Column in the 
00059 // Standard Storage Manager.
00060 // </etymology>
00061 
00062 // <synopsis>
00063 // SSMDirColumn handles the access to a column containing direct
00064 // arrays of the various data types.
00065 // <br>
00066 // It is derived from <linkto class=SSMColumn>SSMColumn</linkto>
00067 // and uses most of its functions. The only thing done differently
00068 // in this class is that it maintains no cache.
00069 // Furthermore fixed length strings are not handled specially.
00070 // All string arrays are stored in the special string buckets.
00071 // </synopsis>
00072 
00073 //# <todo asof="$DATE:$">
00074 //# A List of bugs, limitations, extensions or planned refinements.
00075 //# </todo>
00076 
00077 
00078 class SSMDirColumn : public SSMColumn
00079 {
00080 public:
00081   // Create a SSMDirColumn object with the given parent.
00082   // It initializes the various variables.
00083   // It keeps the pointer to its parent (but does not own it).
00084   SSMDirColumn (SSMBase* aParent, int aDataType, uInt aColNr);
00085   
00086   virtual ~SSMDirColumn();
00087 
00088   // An array of 'fixed length' strings is not handled specially,
00089   // thus this function is ignored.
00090   // It is needed to override the bahviour of the base class.
00091   virtual void setMaxLength (uInt maxLength);
00092 
00093   // Get an array value in the given row.
00094   // <group>
00095   virtual void getArrayBoolV     (uInt rownr, Array<Bool>* dataPtr);
00096   virtual void getArrayuCharV    (uInt rownr, Array<uChar>* dataPtr);
00097   virtual void getArrayShortV    (uInt rownr, Array<Short>* dataPtr);
00098   virtual void getArrayuShortV   (uInt rownr, Array<uShort>* dataPtr);
00099   virtual void getArrayIntV      (uInt rownr, Array<Int>* dataPtr);
00100   virtual void getArrayuIntV     (uInt rownr, Array<uInt>* dataPtr);
00101   virtual void getArrayfloatV    (uInt rownr, Array<float>* dataPtr);
00102   virtual void getArraydoubleV   (uInt rownr, Array<double>* dataPtr);
00103   virtual void getArrayComplexV  (uInt rownr, Array<Complex>* dataPtr);
00104   virtual void getArrayDComplexV (uInt rownr, Array<DComplex>* dataPtr);
00105   virtual void getArrayStringV   (uInt rownr, Array<String>* dataPtr);
00106   // </group>
00107   
00108   // Put an array value in the given row.
00109   // <group>
00110   virtual void putArrayBoolV     (uInt rownr, const Array<Bool>* dataPtr);
00111   virtual void putArrayuCharV    (uInt rownr, const Array<uChar>* dataPtr);
00112   virtual void putArrayShortV    (uInt rownr, const Array<Short>* dataPtr);
00113   virtual void putArrayuShortV   (uInt rownr, const Array<uShort>* dataPtr);
00114   virtual void putArrayIntV      (uInt rownr, const Array<Int>* dataPtr);
00115   virtual void putArrayuIntV     (uInt rownr, const Array<uInt>* dataPtr);
00116   virtual void putArrayfloatV    (uInt rownr, const Array<float>* dataPtr);
00117   virtual void putArraydoubleV   (uInt rownr, const Array<double>* dataPtr);
00118   virtual void putArrayComplexV  (uInt rownr, const Array<Complex>* dataPtr);
00119   virtual void putArrayDComplexV (uInt rownr, const Array<DComplex>* dataPtr);
00120   virtual void putArrayStringV   (uInt rownr, const Array<String>* dataPtr);
00121   // </group>
00122 
00123   // Remove the given row from the data bucket and possibly string bucket.
00124   virtual void deleteRow(uInt aRowNr);
00125 
00126 
00127 protected:
00128   // Read the array data for the given row into the data buffer.
00129   void getValue (uInt aRowNr, void* data);
00130   
00131 private:
00132   // Forbid copy constructor.
00133   SSMDirColumn (const SSMDirColumn&);
00134   
00135   // Forbid assignment.
00136   SSMDirColumn& operator= (const SSMDirColumn&);
00137 };
00138 
00139 
00140 
00141 } //# NAMESPACE CASA - END
00142 
00143 #endif