casacore
Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members

More...

#include <MSParse.h>

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

◆ MSParse() [1/4]

casacore::MSParse::MSParse ( )

Default constructor for List container class.

◆ MSParse() [2/4]

casacore::MSParse::MSParse ( const MSParse )

Copy constructor (copy semantics).

◆ ~MSParse()

casacore::MSParse::~MSParse ( )

◆ MSParse() [3/4]

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

Associate the ms and the shorthand.

◆ MSParse() [4/4]

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

Associate the ms and the shorthand.

Member Function Documentation

◆ addCondition()

void casacore::MSParse::addCondition ( TableExprNode target,
TableExprNode source 
)

◆ ms()

MeasurementSet* casacore::MSParse::ms ( )

Get ms object.

Referenced by setMS().

◆ msInterface()

MSSelectableTable* casacore::MSParse::msInterface ( )

Get ms object.

◆ operator=()

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

Assignment (copy semantics).

◆ setMS()

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

Definition at line 129 of file MSParse.h.

References ms(), and ms_p.

◆ setMSInterface()

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

Definition at line 130 of file MSParse.h.

References msInterface_p.

◆ shorthand()

String& casacore::MSParse::shorthand ( )

Get the shorthand.

◆ test()

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

Test if shorthand matches.

Friends And Related Function Documentation

◆ operator<<

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

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

◆ operator>>

AipsIO& operator>> ( AipsIO ,
MSParse  
)
friend

Member Data Documentation

◆ ms_p

MeasurementSet* casacore::MSParse::ms_p
static

Definition at line 131 of file MSParse.h.

Referenced by setMS().

◆ msInterface_p

MSSelectableTable* casacore::MSParse::msInterface_p
static

Definition at line 132 of file MSParse.h.

Referenced by setMSInterface().

◆ shorthand_p

String casacore::MSParse::shorthand_p
private

Definition at line 136 of file MSParse.h.

◆ tempMSInterface_p

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: