casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes
casa::MSObservationParse Class Reference

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

#include <MSObservationParse.h>

Inheritance diagram for casa::MSObservationParse:
casa::MSParse

List of all members.

Public Member Functions

 MSObservationParse ()
 Default constructor.
 MSObservationParse (const MeasurementSet *ms, const MSObservation &obsSubtable, const TableExprNode &colAsTEN)
 Associate the ms and the shorthand.
 ~MSObservationParse ()
const TableExprNodeselectRangeGTAndLT (const Int &n0, const Int &n1)
const TableExprNodeselectRangeGEAndLE (const Int &n0, const Int &n1)
const TableExprNodeselectObservationIds (const Vector< Int > &scanids)
const TableExprNodeselectObservationIds ()
const TableExprNodeselectObservationIdsGT (const Vector< Int > &scanids)
const TableExprNodeselectObservationIdsLT (const Vector< Int > &scanids)
const TableExprNodeselectObservationIdsGTEQ (const Vector< Int > &scanids)
const TableExprNodeselectObservationIdsLTEQ (const Vector< Int > &scanids)
std::vector< Int > & accumulateIDs (const Int id0, const Int id1=-1)
const TableExprNode node ()
 Get table expression node object.
Vector< IntselectedIDs ()
void reset ()
void cleanup ()
void setMaxObs (const Int &n)

Static Public Attributes

static MSObservationParsethisMSObsParser

Private Member Functions

void appendToIDList (const Vector< Int > &v)

Private Attributes

TableExprNode node_p
Vector< IntidList
Vector< IntobsIDList_p
std::vector< IntparsedIDList_p
const String colName
Int maxObs_p

Static Private Attributes

static TableExprNode columnAsTEN_p

Detailed Description

Class to hold values from scan grammar parser.

Intended use:

Internal

Etymology

MSObservationParse is the class used to parse a scan command.

Synopsis

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

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 86 of file MSObservationParse.h.


Constructor & Destructor Documentation

Default constructor.

casa::MSObservationParse::MSObservationParse ( const MeasurementSet ms,
const MSObservation obsSubtable,
const TableExprNode colAsTEN 
)

Associate the ms and the shorthand.

Definition at line 96 of file MSObservationParse.h.

References columnAsTEN_p.


Member Function Documentation

std::vector<Int>& casa::MSObservationParse::accumulateIDs ( const Int  id0,
const Int  id1 = -1 
)
void casa::MSObservationParse::appendToIDList ( const Vector< Int > &  v) [private]

Definition at line 114 of file MSObservationParse.h.

Get table expression node object.

Definition at line 113 of file MSObservationParse.h.

References idList, and casa::Vector< T >::resize().

Definition at line 101 of file MSObservationParse.h.

References parsedIDList_p, and selectObservationIds().

Referenced by selectObservationIds().

const TableExprNode* casa::MSObservationParse::selectRangeGEAndLE ( const Int n0,
const Int n1 
)
const TableExprNode* casa::MSObservationParse::selectRangeGTAndLT ( const Int n0,
const Int n1 
)
void casa::MSObservationParse::setMaxObs ( const Int n) [inline]

Definition at line 116 of file MSObservationParse.h.


Member Data Documentation

Definition at line 124 of file MSObservationParse.h.

Definition at line 127 of file MSObservationParse.h.

Referenced by ~MSObservationParse().

Definition at line 122 of file MSObservationParse.h.

Referenced by reset().

Definition at line 126 of file MSObservationParse.h.

Definition at line 121 of file MSObservationParse.h.

Definition at line 122 of file MSObservationParse.h.

Definition at line 123 of file MSObservationParse.h.

Referenced by selectObservationIds().

Definition at line 116 of file MSObservationParse.h.


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