casacore
MSCorrParse.h
Go to the documentation of this file.
1 //# MSCorrParse.h: Classes to hold results from corr grammar parser
2 //# Copyright (C) 1994,1995,1997,1998,1999,2000,2001,2003
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$
27 
28 #ifndef MS_MSUVDISTPARSE_H
29 #define MS_MSUVDISTPARSE_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
33 #include <casacore/ms/MSSel/MSParse.h>
34 
35 namespace casacore { //# NAMESPACE CASACORE - BEGIN
36 
37 //# Forward Declarations
38 
39 // <summary>
40 // Class to hold values from UV dist grammar parser
41 // </summary>
42 
43 // <use visibility=local>
44 
45 // <reviewed reviewer="" date="" tests="">
46 // </reviewed>
47 
48 // <prerequisite>
49 //# Classes you should understand before using this one.
50 // </prerequisite>
51 
52 // <etymology>
53 // MSCorrParse is the class used to parse a corr command.
54 // </etymology>
55 
56 // <synopsis>
57 // MSCorrParse is used by the parser of UV dist sub-expression statements.
58 // The parser is written in Bison and Flex in files MSCorrGram.y and .l.
59 // The statements in there use the routines in this file to act
60 // upon a reduced rule.
61 // Since multiple tables can be given (with a shorthand), the table
62 // names are stored in a list. The variable names can be qualified
63 // by the table name and will be looked up in the appropriate table.
64 //
65 // The class MSCorrParse only contains information about a table
66 // used in the table command. Global variables (like a list and a vector)
67 // are used in MSCorrParse.cc to hold further information.
68 //
69 // Global functions are used to operate on the information.
70 // The main function is the global function msCorrCommand.
71 // It executes the given STaQL command and returns the resulting ms.
72 // This is, in fact, the only function to be used by a user.
73 // </synopsis>
74 
75 // <motivation>
76 // It is necessary to be able to give a ms command in ASCII.
77 // This can be used in a CLI or in the table browser to get a subset
78 // of a table or to sort a table.
79 // </motivation>
80 
81 //# <todo asof="$DATE:$">
82 //# A List of bugs, limitations, extensions or planned refinements.
83 //# </todo>
84 
85 
86 class MSCorrParse : public MSParse
87 {
88 
89 public:
90  // Default constructor
92 
93  // Associate the ms and the shorthand.
95 
96  // ~MSCorrParse() {if (node_p) delete node_p;node_p=0x0;}
97  // MS selection
98  const TableExprNode * selectCorrType(const String& corrType);
99 
100  // Get table expression node object.
101  static const TableExprNode* node();
102  static void cleanup() {if (node_p) delete node_p;node_p=0x0;}
103 
104 private:
106 };
107 
108 } //# NAMESPACE CASACORE - END
109 
110 #endif
MSCorrParse()
Default constructor.
static void cleanup()
Definition: MSCorrParse.h:102
static const TableExprNode * node()
Get table expression node object.
static TableExprNode * node_p
Definition: MSCorrParse.h:105
MSCorrParse(const MeasurementSet *ms)
Associate the ms and the shorthand.
const TableExprNode * selectCorrType(const String &corrType)
~MSCorrParse() {if (node_p) delete node_p;node_p=0x0;} MS selection
MeasurementSet * ms()
Get ms object.
String: the storage and methods of handling collections of characters.
Definition: String.h:225
this file contains all the compiler specific defines
Definition: mainpage.dox:28