00001 //# ExprDerArrayNode.h: Nodes representing constant arrays in table select expression tree 00002 //# Copyright (C) 1997,1999,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: ExprDerNodeArray.h 21262 2012-09-07 12:38:36Z gervandiepen $ 00027 00028 #ifndef TABLES_EXPRDERNODEARRAY_H 00029 #define TABLES_EXPRDERNODEARRAY_H 00030 00031 //# Includes 00032 #include <casacore/casa/aips.h> 00033 #include <casacore/tables/TaQL/ExprNodeArray.h> 00034 #include <casacore/casa/Arrays/Array.h> 00035 00036 namespace casacore { //# NAMESPACE CASACORE - BEGIN 00037 00038 //# Forward Declarations 00039 00040 00041 // <summary> 00042 // Bool Array constant in table select expression tree 00043 // </summary> 00044 00045 // <use visibility=local> 00046 00047 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests=""> 00048 // </reviewed> 00049 00050 // <prerequisite> 00051 //# Classes you should understand before using this one. 00052 // <li> TableExprNodeArray 00053 // </prerequisite> 00054 00055 // <synopsis> 00056 // This class represents a constant in a table select expression tree. 00057 // This is also used to hold the value of a table keyword, which is 00058 // constant over the entire table. 00059 // </synopsis> 00060 00061 class TableExprNodeArrayConstBool : public TableExprNodeArray 00062 { 00063 public: 00064 TableExprNodeArrayConstBool (const Array<Bool>& value); 00065 TableExprNodeArrayConstBool (const MArray<Bool>& value); 00066 ~TableExprNodeArrayConstBool(); 00067 MArray<Bool> getArrayBool (const TableExprId& id); 00068 private: 00069 MArray<Bool> value_p; 00070 }; 00071 00072 00073 // <summary> 00074 // Int Array constant in table select expression tree 00075 // </summary> 00076 00077 // <use visibility=local> 00078 00079 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests=""> 00080 // </reviewed> 00081 00082 // <prerequisite> 00083 //# Classes you should understand before using this one. 00084 // <li> TableExprNodeArray 00085 // </prerequisite> 00086 00087 // <synopsis> 00088 // This class represents a constant in a table select expression tree. 00089 // This is also used to hold the value of a table keyword, which is 00090 // constant over the entire table. 00091 // </synopsis> 00092 00093 class TableExprNodeArrayConstInt : public TableExprNodeArray 00094 { 00095 public: 00096 TableExprNodeArrayConstInt (const Array<Int64>& value); 00097 TableExprNodeArrayConstInt (const Array<uInt>& value); 00098 TableExprNodeArrayConstInt (const Array<Int>& value); 00099 TableExprNodeArrayConstInt (const Array<uShort>& value); 00100 TableExprNodeArrayConstInt (const Array<Short>& value); 00101 TableExprNodeArrayConstInt (const Array<uChar>& value); 00102 TableExprNodeArrayConstInt (const MArray<Int64>& value); 00103 TableExprNodeArrayConstInt (const MArray<uInt>& value); 00104 TableExprNodeArrayConstInt (const MArray<Int>& value); 00105 TableExprNodeArrayConstInt (const MArray<uShort>& value); 00106 TableExprNodeArrayConstInt (const MArray<Short>& value); 00107 TableExprNodeArrayConstInt (const MArray<uChar>& value); 00108 ~TableExprNodeArrayConstInt(); 00109 MArray<Int64> getArrayInt (const TableExprId& id); 00110 MArray<Double> getArrayDouble (const TableExprId& id); 00111 MArray<DComplex> getArrayDComplex (const TableExprId& id); 00112 private: 00113 MArray<Int64> value_p; 00114 }; 00115 00116 00117 // <summary> 00118 // Double Array constant in table select expression tree 00119 // </summary> 00120 00121 // <use visibility=local> 00122 00123 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests=""> 00124 // </reviewed> 00125 00126 // <prerequisite> 00127 //# Classes you should understand before using this one. 00128 // <li> TableExprNodeArray 00129 // </prerequisite> 00130 00131 // <synopsis> 00132 // This class represents a constant in a table select expression tree. 00133 // This is also used to hold the value of a table keyword, which is 00134 // constant over the entire table. 00135 // </synopsis> 00136 00137 class TableExprNodeArrayConstDouble : public TableExprNodeArray 00138 { 00139 public: 00140 TableExprNodeArrayConstDouble (const Array<Double>& value); 00141 TableExprNodeArrayConstDouble (const Array<Float>& value); 00142 TableExprNodeArrayConstDouble (const Array<Int64>& value); 00143 TableExprNodeArrayConstDouble (const MArray<Double>& value); 00144 TableExprNodeArrayConstDouble (const MArray<Float>& value); 00145 TableExprNodeArrayConstDouble (const MArray<Int64>& value); 00146 ~TableExprNodeArrayConstDouble(); 00147 MArray<Double> getArrayDouble (const TableExprId& id); 00148 MArray<DComplex> getArrayDComplex (const TableExprId& id); 00149 private: 00150 MArray<Double> value_p; 00151 }; 00152 00153 00154 // <summary> 00155 // DComplex Array constant in table select expression tree 00156 // </summary> 00157 00158 // <use visibility=local> 00159 00160 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests=""> 00161 // </reviewed> 00162 00163 // <prerequisite> 00164 //# Classes you should understand before using this one. 00165 // <li> TableExprNodeArray 00166 // </prerequisite> 00167 00168 // <synopsis> 00169 // This class represents a constant in a table select expression tree. 00170 // This is also used to hold the value of a table keyword, which is 00171 // constant over the entire table. 00172 // </synopsis> 00173 00174 class TableExprNodeArrayConstDComplex : public TableExprNodeArray 00175 { 00176 public: 00177 TableExprNodeArrayConstDComplex (const Array<DComplex>& value); 00178 TableExprNodeArrayConstDComplex (const Array<Complex>& value); 00179 TableExprNodeArrayConstDComplex (const Array<Double>& value); 00180 TableExprNodeArrayConstDComplex (const Array<Int64>& value); 00181 TableExprNodeArrayConstDComplex (const MArray<DComplex>& value); 00182 TableExprNodeArrayConstDComplex (const MArray<Complex>& value); 00183 TableExprNodeArrayConstDComplex (const MArray<Double>& value); 00184 TableExprNodeArrayConstDComplex (const MArray<Int64>& value); 00185 ~TableExprNodeArrayConstDComplex(); 00186 MArray<DComplex> getArrayDComplex (const TableExprId& id); 00187 private: 00188 MArray<DComplex> value_p; 00189 }; 00190 00191 00192 // <summary> 00193 // String Array constant in table select expression tree 00194 // </summary> 00195 00196 // <use visibility=local> 00197 00198 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests=""> 00199 // </reviewed> 00200 00201 // <prerequisite> 00202 //# Classes you should understand before using this one. 00203 // <li> TableExprNodeArray 00204 // </prerequisite> 00205 00206 // <synopsis> 00207 // This class represents a constant in a table select expression tree. 00208 // This is also used to hold the value of a table keyword, which is 00209 // constant over the entire table. 00210 // </synopsis> 00211 00212 class TableExprNodeArrayConstString : public TableExprNodeArray 00213 { 00214 public: 00215 TableExprNodeArrayConstString (const Array<String>& value); 00216 TableExprNodeArrayConstString (const MArray<String>& value); 00217 ~TableExprNodeArrayConstString(); 00218 MArray<String> getArrayString (const TableExprId& id); 00219 private: 00220 MArray<String> value_p; 00221 }; 00222 00223 00224 // <summary> 00225 // Date Array constant in table select expression tree 00226 // </summary> 00227 00228 // <use visibility=local> 00229 00230 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests=""> 00231 // </reviewed> 00232 00233 // <prerequisite> 00234 //# Classes you should understand before using this one. 00235 // <li> TableExprNodeArray 00236 // </prerequisite> 00237 00238 // <synopsis> 00239 // This class represents a constant in a table select expression tree. 00240 // This is also used to hold the value of a table keyword, which is 00241 // constant over the entire table. 00242 // </synopsis> 00243 00244 class TableExprNodeArrayConstDate : public TableExprNodeArray 00245 { 00246 public: 00247 TableExprNodeArrayConstDate (const Array<MVTime>& value); 00248 TableExprNodeArrayConstDate (const MArray<MVTime>& value); 00249 ~TableExprNodeArrayConstDate(); 00250 MArray<Double> getArrayDouble(const TableExprId& id); 00251 MArray<MVTime> getArrayDate (const TableExprId& id); 00252 private: 00253 MArray<MVTime> value_p; 00254 }; 00255 00256 00257 00258 00259 } //# NAMESPACE CASACORE - END 00260 00261 #endif