casacore
Loading...
Searching...
No Matches
LogFilterExpr.h
Go to the documentation of this file.
1// # LogFilterExpr.h: Class to deal with a TaQL expression to filter messages
2// # Copyright (C) 2000
3// # Associated Universities, Inc. Washington DC, USA.
4// #
5// # This program is free software; you can redistribute it and/or modify it
6// # under the terms of the GNU General Public License as published by the Free
7// # Software Foundation; either version 2 of the License, or (at your option)
8// # any later version.
9// #
10// # This program 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 General Public License for
13// # more details.
14// #
15// # You should have received a copy of the GNU General Public License along
16// # with this program; if not, write to the Free Software Foundation, Inc.,
17// # 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_LOGFILTEREXPR_H
27#define TABLES_LOGFILTEREXPR_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/TaQL/TableExprData.h>
32
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35// # Forward Declarations
36class TableExprNode;
37class LogMessage;
38
39// <summary>
40// Class to deal with a TaQL expression to filter messages.
41// </summary>
42// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
43// </reviewed>
44
45// This program tests the class TableExprData.
46// This example shows how a data set consisting of two vectors
47// of scalars can be used.
48
50 public:
51 // Construct it from an expression which gets parsed.
52 LogFilterExpr(const String& expr);
53
54 // Copy constructor (copy semantics).
56
57 virtual ~LogFilterExpr();
58
59 // Assignment (copy semantics).
61
62 // Does this message match the expression?
63 Bool matches(const LogMessage& message);
64
65 // Get the data.
66 // <group>
67 virtual Double getDouble(const Block<Int>& fieldNrs) const;
68 virtual String getString(const Block<Int>& fieldNrs) const;
69 // </group>
70
71 // Get the data type of the various values.
72 virtual DataType dataType(const Block<Int>& fieldNrs) const;
73
74 private:
77};
78
79} // namespace casacore
80
81#endif
LogFilterExpr(const LogFilterExpr &)
Copy constructor (copy semantics).
LogFilterExpr & operator=(const LogFilterExpr &)
Assignment (copy semantics).
virtual Double getDouble(const Block< Int > &fieldNrs) const
Get the data.
virtual String getString(const Block< Int > &fieldNrs) const
Bool matches(const LogMessage &message)
Does this message match the expression?
LogFilterExpr(const String &expr)
Construct it from an expression which gets parsed.
virtual DataType dataType(const Block< Int > &fieldNrs) const
Get the data type of the various values.
const LogMessage * itsMessage
TableExprNode * itsExpr
String: the storage and methods of handling collections of characters.
Definition String.h:355
TableExprData()
Construct it from a row number.
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
double Double
Definition aipstype.h:53