casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExprConeNode.h
Go to the documentation of this file.
1 //# ExprConeNode.h: Class representing a cone search in table select expression
2 //# Copyright (C) 2005
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: ExprConeNode.h 21262 2012-09-07 12:38:36Z gervandiepen $
27 
28 #ifndef TABLES_EXPRCONENODE_H
29 #define TABLES_EXPRCONENODE_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
35 
36 namespace casacore { //# NAMESPACE CASACORE - BEGIN
37 
38 
39 // <summary>
40 // Class representing a cone search in table select expression
41 // </summary>
42 
43 // <use visibility=local>
44 
45 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
46 // </reviewed>
47 // <prerequisite>
48 //# Classes you should understand before using this one.
49 // <li> <linkto class=TableExprFuncNode>TableExprFuncNode</linkto>
50 // </prerequisite>
51 
52 // <synopsis>
53 // The class represents a cone search.
54 // It is a specialization of the TableExprFuncNode class.
55 // Currently the implementation is straightforward, but in the future
56 // it can do smarter things.
57 // For instance:
58 // <ul>
59 // <li> If the cone positions and radii are constant, one can use
60 // an integer zone number (e.g. floor(dec)) to avoid the much
61 // more expensive sine/cosine calculations. Each cone will get a
62 // minzone and maxzone value (derived from cone position and radius).
63 // <li> Multiple cones can be ordered on minzone and maxzone.
64 // </ul>
65 // </synopsis>
66 
67 
69 {
70 public:
71  // Constructor
73  const TableExprNodeSet& source,
74  const vector<TENShPtr>& nodes,
75  const Block<Int>& dtypeOper,
76  uInt origin);
77 
78  // Destructor
80 
81  // 'get' Functions to get the desired result of a function.
82  // <group>
83  Bool getBool (const TableExprId& id);
84  Int64 getInt (const TableExprId& id);
85  // </group>
86 
87  // Check the data and value types of the operands.
88  // It sets the exptected data and value types of the operands.
89  // Set the value type of the function result and returns
90  // the data type of the function result.
91  static NodeDataType checkOperands (Block<Int>& dtypeOper,
92  ValueType& resVT,
93  Block<Int>& vtypeOper,
95  const std::vector<TENShPtr>&);
96 
97 private:
98  // Find the number of elements in an argument.
99  // It returns -1 if unknown.
100  static Int findNelem (const TENShPtr& node);
101 
102 
104 };
105 
106 
107 
108 
110 {
111 public:
112  // Constructor
114  const TableExprNodeSet& source,
115  const vector<TENShPtr>& nodes,
116  const Block<Int>& dtypeOper,
117  uInt origin);
118 
119  // Destructor
121 
122  // 'get' Functions to get the desired result of a function.
123  // <group>
126  // </group>
127 
128 private:
130 };
131 
132 
133 } //# NAMESPACE CASACORE - END
134 
135 #endif
Class representing a function in table select expression.
Definition: ExprFuncNode.h:76
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
int Int
Definition: aipstype.h:50
Class representing an array function in table select expression.
Class to hold multiple table expression nodes.
Definition: ExprNodeSet.h:311
Bool getBool(const TableExprId &id)
&#39;get&#39; Functions to get the desired result of a function.
MArray< Int64 > getArrayInt(const TableExprId &id)
NodeDataType
Define the data types of a node.
Definition: ExprNodeRep.h:161
static NodeDataType checkOperands(Block< Int > &dtypeOper, ValueType &resVT, Block< Int > &vtypeOper, FunctionType, const std::vector< TENShPtr > &)
Check the data and value types of the operands.
Class representing a cone search in table select expression.
Definition: ExprConeNode.h:68
~TableExprConeNode()
Destructor.
static Int findNelem(const TENShPtr &node)
Find the number of elements in an argument.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
ValueType
Define the value types.
Definition: ExprNodeRep.h:176
TableExprConeNodeArray(TableExprFuncNode::FunctionType, NodeDataType, const TableExprNodeSet &source, const vector< TENShPtr > &nodes, const Block< Int > &dtypeOper, uInt origin)
Constructor.
virtual Origin origin() const =0
ABSTRACT METHODS //.
Int64 getInt(const TableExprId &id)
The identification of a TaQL selection subject.
Definition: TableExprId.h:97
TableExprConeNode(FunctionType, NodeDataType, const TableExprNodeSet &source, const vector< TENShPtr > &nodes, const Block< Int > &dtypeOper, uInt origin)
Constructor.
MArray< Bool > getArrayBool(const TableExprId &id)
&#39;get&#39; Functions to get the desired result of a function.
unsigned int uInt
Definition: aipstype.h:51
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42