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