casacore
Loading...
Searching...
No Matches
TaQLResult.h
Go to the documentation of this file.
1//# TaQLResult.h: Class to hold the result of a TaQL command
2//# Copyright (C) 2004
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: casa-feedback@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#ifndef TABLES_TAQLRESULT_H
27#define TABLES_TAQLRESULT_H
28
29
30//# Includes
31#include <casacore/casa/aips.h>
32#include <casacore/tables/TaQL/ExprNode.h>
33
34namespace casacore {
35
36// <summary>
37// Class to hold the result of a TaQL command.
38// </summary>
39
40// <use visibility=local>
41
42// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
43// </reviewed>
44
45// <prerequisite>
46//# Classes you should understand before using this one.
47// </prerequisite>
48
49// <synopsis>
50// The result of a TaQL command can be a Table or a TableExprNode.
51// This class holds the actual result.
52// </synopsis>
53
54// <motivation>
55// It is possible to give a TaQL command resulting in a TableExprNode
56// to make it possible to make expressions of columns.
57// </motivation>
58
59//# <todo asof="$DATE:$">
60//# A List of bugs, limitations, extensions or planned refinements.
61//# </todo>
62
63
65{
66public:
67 // Construct from a Table.
68 explicit TaQLResult (const Table& = Table());
69
70 // Construct from a TableExprNode.
71 explicit TaQLResult (const TableExprNode&);
72
73 // Is the result a Table?
74 Bool isTable() const
75 { return itsNode.isNull(); }
76
77 // Return the result as a TableExprInfo.
78 // It throws an exception if it is not a table.
79 const Table& table() const;
80
81 // Return the result as a TableExprNode.
82 // It throws an exception if it is not a TableExprNode.
84
85private:
88};
89
90}
91#endif
Bool isTable() const
Is the result a Table?
Definition TaQLResult.h:74
TableExprNode node() const
Return the result as a TableExprNode.
TableExprNode itsNode
Definition TaQLResult.h:87
TaQLResult(const TableExprNode &)
Construct from a TableExprNode.
const Table & table() const
Return the result as a TableExprInfo.
TaQLResult(const Table &=Table())
Construct from a Table.
Bool isNull() const
Does the node contain no actual node?
Definition ExprNode.h:269
this file contains all the compiler specific defines
Definition mainpage.dox:28
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40