00001 //# MSPolnGram.h: Grammar for ms field sub-expressions 00002 //# Copyright (C) 1998 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# $Id$ 00027 00028 #ifndef MS_MSPOLNGRAM_H 00029 #define MS_MSPOLNGRAM_H 00030 00031 00032 //# Includes 00033 #include <casacore/casa/aips.h> 00034 #include <casacore/casa/BasicSL/String.h> 00035 #include <casacore/ms/MSSel/MSDataDescIndex.h> 00036 #include <casacore/ms/MSSel/MSPolIndex.h> 00037 #include <casacore/casa/Containers/OrderedMap.h> 00038 00039 namespace casacore { //# NAMESPACE CASACORE - BEGIN 00040 00041 //# Forward Declarations 00042 class MeasurementSet; 00043 class TableExprNode; 00044 00045 // <summary> 00046 // Global functions to drive the MSPolnParse class. These, for 00047 // Polarization selection, need not be global functions, but are 00048 // done this way to keep the interface uniform for the various 00049 // selection expressions. 00050 // </summary> 00051 00052 // <use visibility=local> 00053 00054 // <reviewed reviewer="" date="" tests=""> 00055 // </reviewed> 00056 00057 // <prerequisite> 00058 //# Classes you should understand before using this one. 00059 // </prerequisite> 00060 00061 // <synopsis> 00062 // </synopsis> 00063 00064 // <motivation> 00065 // </motivation> 00066 // <todo asof="$DATE:$"> 00067 //# A List of bugs, limitations, extensions or planned refinements. 00068 // </todo> 00069 00070 00071 // <group name=MSPolnGramFunctions> 00072 00073 // The top level interface to the parser. 00074 int msPolnGramParseCommand (const MeasurementSet *ms, const String& command, 00075 TableExprNode& node, 00076 Vector<Int>& selectedDDIDs, 00077 OrderedMap<Int, Vector<Int> >& selectedPolnMap, 00078 OrderedMap<Int, Vector<Vector<Int> > >& selectedSetupMap 00079 ); 00080 00081 // The error handler. 00082 // It throws an exception with the current token. 00083 void MSPolnGramerror (char*); 00084 00085 // Give the table expression node. 00086 const TableExprNode *msPolnGramParseNode(); 00087 void msPolnGramParseDeleteNode(); 00088 00089 // Give the current position in the string. 00090 // This can be used when parse errors occur. 00091 int& msPolnGramPosition(); 00092 00093 // </group> 00094 00095 } //# NAMESPACE CASACORE - END 00096 00097 #endif