casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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: 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$
27 
28 #ifndef TABLES_LOGFILTEREXPR_H
29 #define TABLES_LOGFILTEREXPR_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
35 
36 namespace casacore { //# NAMESPACE CASACORE - BEGIN
37 
38 //# Forward Declarations
39 class TableExprNode;
40 class LogMessage;
41 
42 
43 // <summary>
44 // Class to deal with a TaQL expression to filter messages.
45 // </summary>
46 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
47 // </reviewed>
48 
49 // This program tests the class TableExprData.
50 // This example shows how a data set consisting of two vectors
51 // of scalars can be used.
52 
53 
55 {
56 public:
57  // Construct it from an expression which gets parsed.
58  LogFilterExpr (const String& expr);
59 
60  // Copy constructor (copy semantics).
62 
63  virtual ~LogFilterExpr();
64 
65  // Assignment (copy semantics).
67 
68  // Does this message match the expression?
69  Bool matches (const LogMessage& message);
70 
71  // Get the data.
72  // <group>
73  virtual Double getDouble (const Block<Int>& fieldNrs) const;
74  virtual String getString (const Block<Int>& fieldNrs) const;
75  // </group>
76 
77  // Get the data type of the various values.
78  virtual DataType dataType (const Block<Int>& fieldNrs) const;
79 
80 private:
83 };
84 
85 
86 
87 } //# NAMESPACE CASACORE - END
88 
89 #endif
Bool matches(const LogMessage &message)
Does this message match the expression?
Handle class for a table column expression tree.
Definition: ExprNode.h:156
virtual String getString(const Block< Int > &fieldNrs) const
Abstract base class for data object in a TaQL expression.
const LogMessage * itsMessage
Definition: LogFilterExpr.h:82
double Double
Definition: aipstype.h:55
TableExprNode * itsExpr
Definition: LogFilterExpr.h:81
LogFilterExpr & operator=(const LogFilterExpr &)
Assignment (copy semantics).
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
LogFilterExpr(const String &expr)
Construct it from an expression which gets parsed.
virtual Double getDouble(const Block< Int > &fieldNrs) const
Get the data.
String: the storage and methods of handling collections of characters.
Definition: String.h:225
virtual DataType dataType(const Block< Int > &fieldNrs) const
Get the data type of the various values.
Class to deal with a TaQL expression to filter messages.
Definition: LogFilterExpr.h:54
Informational log messages with with time, priority, and origin.
Definition: LogMessage.h:101