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

Class to hold values from field grammar parser. More...

#include <MSFieldParse.h>

Inheritance diagram for casacore::MSFieldParse:
casacore::MSParse

Public Member Functions

 MSFieldParse ()
 Default constructor. More...
 
 MSFieldParse (const MeasurementSet *ms)
 
 MSFieldParse (const MSField &fieldSubTable, const TableExprNode &columnAsTEN)
 
 ~MSFieldParse ()
 
const TableExprNodeselectFieldIds (const Vector< Int > &fieldIds)
 
MSFieldsubTable ()
 
- Public Member Functions inherited from casacore::MSParse
 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 Member Functions

static const TableExprNodenode ()
 Get table expression node object. More...
 
static Vector< IntselectedIDs ()
 
static void reset ()
 
static void cleanup ()
 

Static Public Attributes

static MSFieldParsethisMSFParser
 
- Static Public Attributes inherited from casacore::MSParse
static MeasurementSetms_p
 
static MSSelectableTablemsInterface_p
 

Private Attributes

const String colName
 
MSField msFieldSubTable_p
 

Static Private Attributes

static TableExprNodenode_p
 
static Vector< IntidList
 
static TableExprNode columnAsTEN_p
 

Detailed Description

Class to hold values from field grammar parser.

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.

Intended use:

Internal

Etymology

MSFieldParse is the class used to parse a field command.

Synopsis

MSFieldParse is used by the parser of field sub-expression statements. The parser is written in Bison and Flex in files MSFieldGram.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 MSFieldParse only contains information about a table used in the table command. Global variables (like a list and a vector) are used in MSFieldParse.cc to hold further information.

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

Definition at line 85 of file MSFieldParse.h.

Constructor & Destructor Documentation

casacore::MSFieldParse::MSFieldParse ( )

Default constructor.

casacore::MSFieldParse::MSFieldParse ( const MeasurementSet ms)
casacore::MSFieldParse::MSFieldParse ( const MSField fieldSubTable,
const TableExprNode columnAsTEN 
)
casacore::MSFieldParse::~MSFieldParse ( )
inline

Definition at line 93 of file MSFieldParse.h.

References columnAsTEN_p.

Member Function Documentation

static void casacore::MSFieldParse::cleanup ( )
inlinestatic

Definition at line 102 of file MSFieldParse.h.

References node_p.

static const TableExprNode* casacore::MSFieldParse::node ( )
static

Get table expression node object.

static void casacore::MSFieldParse::reset ( )
static
static Vector<Int> casacore::MSFieldParse::selectedIDs ( )
inlinestatic

Definition at line 100 of file MSFieldParse.h.

References idList.

const TableExprNode* casacore::MSFieldParse::selectFieldIds ( const Vector< Int > &  fieldIds)
MSField& casacore::MSFieldParse::subTable ( )
inline

Definition at line 104 of file MSFieldParse.h.

References msFieldSubTable_p.

Member Data Documentation

const String casacore::MSFieldParse::colName
private

Definition at line 107 of file MSFieldParse.h.

TableExprNode casacore::MSFieldParse::columnAsTEN_p
staticprivate

Definition at line 110 of file MSFieldParse.h.

Referenced by ~MSFieldParse().

Vector<Int> casacore::MSFieldParse::idList
staticprivate

Definition at line 108 of file MSFieldParse.h.

Referenced by selectedIDs().

MSField casacore::MSFieldParse::msFieldSubTable_p
private

Definition at line 109 of file MSFieldParse.h.

Referenced by subTable().

TableExprNode* casacore::MSFieldParse::node_p
staticprivate

Definition at line 106 of file MSFieldParse.h.

Referenced by cleanup().

MSFieldParse* casacore::MSFieldParse::thisMSFParser
static

Definition at line 99 of file MSFieldParse.h.


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