casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MSPolnGram.h
Go to the documentation of this file.
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: MSPolnGram.h 20749 2009-09-30 14:24:05Z gervandiepen $
00027 
00028 #ifndef MS_MSPOLNGRAM_H
00029 #define MS_MSPOLNGRAM_H
00030 
00031 
00032 //# Includes
00033 #include <casa/BasicSL/String.h>
00034 #include <ms/MeasurementSets/MSDataDescIndex.h>
00035 #include <ms/MeasurementSets/MSPolIndex.h>
00036 #include <casa/Containers/OrderedMap.h>
00037 
00038 namespace casa { //# NAMESPACE CASA - BEGIN
00039   
00040   //# Forward Declarations
00041   class MeasurementSet;
00042   class TableExprNode;
00043   
00044   // <summary>
00045   // Global functions to drive the MSPolnParse class.  These, for
00046   // Polarization selection, need not be global functions, but are
00047   // done this way to keep the interface uniform for the various
00048   // selection expressions.
00049   // </summary>
00050   
00051   // <use visibility=local>
00052   
00053   // <reviewed reviewer="" date="" tests="">
00054   // </reviewed>
00055   
00056   // <prerequisite>
00057   //# Classes you should understand before using this one.
00058   // </prerequisite>
00059   
00060   // <synopsis> 
00061   // </synopsis> 
00062   
00063   // <motivation>
00064   // </motivation>
00065   // <todo asof="$DATE:$">
00066   //# A List of bugs, limitations, extensions or planned refinements.
00067   // </todo>
00068   
00069   
00070   // <group name=MSPolnGramFunctions>
00071   
00072   // The top level interface to the parser.
00073   int msPolnGramParseCommand (const MeasurementSet *ms, const String& command,
00074                               TableExprNode& node,
00075                               Vector<Int>& selectedDDIDs, 
00076                               OrderedMap<Int, Vector<Int> >& selectedPolnMap,
00077                               OrderedMap<Int, Vector<Vector<Int> > >& selectedSetupMap
00078                               );
00079   
00080   // The error handler.
00081   // It throws an exception with the current token.
00082   void MSPolnGramerror (char*);
00083   
00084   // Give the table expression node.
00085   const TableExprNode *msPolnGramParseNode();
00086   const void msPolnGramParseDeleteNode();
00087   
00088   // Give the current position in the string.
00089   // This can be used when parse errors occur.
00090   int& msPolnGramPosition();
00091   
00092   // </group>
00093   
00094 } //# NAMESPACE CASA - END
00095 
00096 #endif