casa
$Rev:20696$
|
Class to hold values from scan grammar parser. More...
#include <MSScanParse.h>
Public Member Functions | |
MSScanParse () | |
Default constructor. | |
MSScanParse (const MeasurementSet *ms) | |
Associate the ms and the shorthand. | |
MSScanParse (const MeasurementSet *ms, const TableExprNode &colAsTEN) | |
~MSScanParse () | |
const TableExprNode * | selectRangeGTAndLT (const Int &n0, const Int &n1) |
const TableExprNode * | selectRangeGEAndLE (const Int &n0, const Int &n1) |
const TableExprNode * | selectScanIds (const Vector< Int > &scanids) |
const TableExprNode * | selectScanIds () |
const TableExprNode * | selectScanIdsGT (const Vector< Int > &scanids) |
const TableExprNode * | selectScanIdsLT (const Vector< Int > &scanids) |
const TableExprNode * | selectScanIdsGTEQ (const Vector< Int > &scanids) |
const TableExprNode * | selectScanIdsLTEQ (const Vector< Int > &scanids) |
std::vector< Int > & | accumulateIDs (const Int id0, const Int id1=-1) |
const TableExprNode | node () |
Get table expression node object. | |
Vector< Int > | selectedIDs () |
void | reset () |
void | cleanup () |
void | setMaxScan (const Int &n) |
Static Public Attributes | |
static MSScanParse * | thisMSSParser |
Private Member Functions | |
void | appendToIDList (const Vector< Int > &v) |
Private Attributes | |
TableExprNode | node_p |
Vector< Int > | idList |
std::vector< Int > | parsedIDList_p |
const String | colName |
Int | maxScans_p |
Static Private Attributes | |
static TableExprNode | columnAsTEN_p |
Class to hold values from scan grammar parser.
Internal
MSScanParse is the class used to parse a scan command.
MSScanParse is used by the parser of scan sub-expression statements. The parser is written in Bison and Flex in files MSScanGram.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 MSScanParse only contains information about a table used in the table command. Global variables (like a list and a vector) are used in MSScanParse.cc to hold further information.
Global functions are used to operate on the information. The main function is the global function msScanCommand. It executes the given STaQL command and returns the resulting ms. This is, in fact, the only function to be used by a user.
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 86 of file MSScanParse.h.
Default constructor.
casa::MSScanParse::MSScanParse | ( | const MeasurementSet * | ms | ) |
Associate the ms and the shorthand.
casa::MSScanParse::MSScanParse | ( | const MeasurementSet * | ms, |
const TableExprNode & | colAsTEN | ||
) |
casa::MSScanParse::~MSScanParse | ( | ) | [inline] |
Definition at line 96 of file MSScanParse.h.
References columnAsTEN_p.
std::vector<Int>& casa::MSScanParse::accumulateIDs | ( | const Int | id0, |
const Int | id1 = -1 |
||
) |
void casa::MSScanParse::appendToIDList | ( | const Vector< Int > & | v | ) | [private] |
void casa::MSScanParse::cleanup | ( | ) | [inline] |
Definition at line 113 of file MSScanParse.h.
const TableExprNode casa::MSScanParse::node | ( | ) |
Get table expression node object.
void casa::MSScanParse::reset | ( | ) | [inline] |
Definition at line 112 of file MSScanParse.h.
References idList, parsedIDList_p, and casa::Vector< T >::resize().
Vector<Int> casa::MSScanParse::selectedIDs | ( | ) | [inline] |
Definition at line 111 of file MSScanParse.h.
References idList.
const TableExprNode* casa::MSScanParse::selectRangeGEAndLE | ( | const Int & | n0, |
const Int & | n1 | ||
) |
const TableExprNode* casa::MSScanParse::selectRangeGTAndLT | ( | const Int & | n0, |
const Int & | n1 | ||
) |
const TableExprNode* casa::MSScanParse::selectScanIds | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSScanParse::selectScanIds | ( | ) | [inline] |
Definition at line 101 of file MSScanParse.h.
References parsedIDList_p, and selectScanIds().
Referenced by selectScanIds().
const TableExprNode* casa::MSScanParse::selectScanIdsGT | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSScanParse::selectScanIdsGTEQ | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSScanParse::selectScanIdsLT | ( | const Vector< Int > & | scanids | ) |
const TableExprNode* casa::MSScanParse::selectScanIdsLTEQ | ( | const Vector< Int > & | scanids | ) |
void casa::MSScanParse::setMaxScan | ( | const Int & | n | ) | [inline] |
Definition at line 115 of file MSScanParse.h.
const String casa::MSScanParse::colName [private] |
Definition at line 123 of file MSScanParse.h.
TableExprNode casa::MSScanParse::columnAsTEN_p [static, private] |
Definition at line 126 of file MSScanParse.h.
Referenced by ~MSScanParse().
Vector<Int> casa::MSScanParse::idList [private] |
Definition at line 121 of file MSScanParse.h.
Referenced by reset(), and selectedIDs().
Int casa::MSScanParse::maxScans_p [private] |
Definition at line 125 of file MSScanParse.h.
TableExprNode casa::MSScanParse::node_p [private] |
Definition at line 120 of file MSScanParse.h.
std::vector<Int> casa::MSScanParse::parsedIDList_p [private] |
Definition at line 122 of file MSScanParse.h.
Referenced by reset(), and selectScanIds().
MSScanParse* casa::MSScanParse::thisMSSParser [static] |
Definition at line 115 of file MSScanParse.h.