casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
casacore::MSParse Class Reference

Class to hold values from an ms grammar parser. More...

#include <MSParse.h>

Inheritance diagram for casacore::MSParse:
casacore::MSAntennaParse casacore::MSArrayParse casacore::MSCorrParse casacore::MSFeedParse casacore::MSFieldParse casacore::MSObservationParse casacore::MSPolnParse casacore::MSScanParse casacore::MSSpwParse casacore::MSStateParse casacore::MSTimeParse casacore::MSUvDistParse

Public Member Functions

 MSParse ()
 Default constructor for List container class. More...
 
 MSParse (const MSParse &)
 Copy constructor (copy semantics). More...
 
 ~MSParse ()
 
MSParseoperator= (const MSParse &)
 Assignment (copy semantics). More...
 
 MSParse (const MeasurementSet *ms, const String &shorthand)
 Associate the ms and the shorthand. More...
 
 MSParse (const MSSelectableTable *ms, const String &shorthand)
 Associate the ms and the shorthand. More...
 
Bool test (const String &shortHand) const
 Test if shorthand matches. More...
 
Stringshorthand ()
 Get the shorthand. More...
 
MeasurementSetms ()
 Get ms object. More...
 
MSSelectableTablemsInterface ()
 Get ms object. More...
 
void setMS (MeasurementSet *ms)
 
void setMSInterface (MSSelectableTable *msI)
 
void addCondition (TableExprNode &target, TableExprNode &source)
 

Static Public Attributes

static MeasurementSetms_p
 
static MSSelectableTablemsInterface_p
 

Private Attributes

String shorthand_p
 
MSSelectableTabletempMSInterface_p
 The following exists for the period we make the transition from using MS to using MSSelectableTable. More...
 

Friends

AipsIOoperator<< (AipsIO &, const MSParse &)
 Dummy AipsIO routines; they are needed for the List container. More...
 
AipsIOoperator>> (AipsIO &, MSParse &)
 

Detailed Description

Class to hold values from an ms grammar parser.

Intended use:

Internal

Etymology

MSParse is the class used to parse an ms command.

Synopsis

MSParse is used by the parser of an ms sub-expression statements. The parser is written in Bison and Flex in files MSXXXGram.y and.l. The statements in there use the routines in this file to act upon a reduced rule. Since multiple tables can be given (with a shorthand), the table names are stored in a list. The variable names can be qualified by the table name and will be looked up in the appropriate table.

The class MSParse only contains information about an ms used in the ms command. Global variables (like a list and a vector) are used in MSParse.cc to hold further information.

Global functions are used to operate on the information. The main function is the global function msXXXCommand. It executes the given STaQL command and returns the resulting ms. This is, in fact, the only function to be used by a user.

Motivation

It is necessary to be able to give a ms command in ASCII. This can be used in a CLI or in the table browser to get a subset of a table or to sort a table.

Definition at line 93 of file MSParse.h.

Constructor & Destructor Documentation

casacore::MSParse::MSParse ( )

Default constructor for List container class.

casacore::MSParse::MSParse ( const MSParse )

Copy constructor (copy semantics).

casacore::MSParse::~MSParse ( )
casacore::MSParse::MSParse ( const MeasurementSet ms,
const String shorthand 
)

Associate the ms and the shorthand.

casacore::MSParse::MSParse ( const MSSelectableTable ms,
const String shorthand 
)

Associate the ms and the shorthand.

Member Function Documentation

void casacore::MSParse::addCondition ( TableExprNode target,
TableExprNode source 
)
MeasurementSet* casacore::MSParse::ms ( )

Get ms object.

Referenced by setMS().

MSSelectableTable* casacore::MSParse::msInterface ( )

Get ms object.

MSParse& casacore::MSParse::operator= ( const MSParse )

Assignment (copy semantics).

void casacore::MSParse::setMS ( MeasurementSet ms)
inline

Definition at line 129 of file MSParse.h.

References ms(), and ms_p.

void casacore::MSParse::setMSInterface ( MSSelectableTable msI)
inline

Definition at line 130 of file MSParse.h.

References msInterface_p.

String& casacore::MSParse::shorthand ( )

Get the shorthand.

Bool casacore::MSParse::test ( const String shortHand) const

Test if shorthand matches.

Friends And Related Function Documentation

AipsIO& operator<< ( AipsIO ,
const MSParse  
)
friend

Dummy AipsIO routines; they are needed for the List container.

AipsIO& operator>> ( AipsIO ,
MSParse  
)
friend

Member Data Documentation

MeasurementSet* casacore::MSParse::ms_p
static

Definition at line 131 of file MSParse.h.

Referenced by setMS().

MSSelectableTable* casacore::MSParse::msInterface_p
static

Definition at line 132 of file MSParse.h.

Referenced by setMSInterface().

String casacore::MSParse::shorthand_p
private

Definition at line 136 of file MSParse.h.

MSSelectableTable* casacore::MSParse::tempMSInterface_p
private

The following exists for the period we make the transition from using MS to using MSSelectableTable.

Till then, both interfaces have to be supported.

Definition at line 140 of file MSParse.h.


The documentation for this class was generated from the following file: