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
casa::MSArrayParse Class Reference

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

#include <MSArrayParse.h>

Inheritance diagram for casa::MSArrayParse:
casa::MSParse

List of all members.

Public Member Functions

 MSArrayParse ()
 Default constructor.
 MSArrayParse (const MeasurementSet *ms)
 Associate the ms and the shorthand.
const TableExprNodeselectRangeGTAndLT (const Int &n0, const Int &n1)
 ~MSArrayParse() {if (node_p) delete node_p;node_p=0x0;};
const TableExprNodeselectRangeGEAndLE (const Int &n0, const Int &n1)
const TableExprNodeselectArrayIds (const Vector< Int > &arrayids)
const TableExprNodeselectArrayIds ()
const TableExprNodeselectArrayIdsGT (const Vector< Int > &arrayids)
const TableExprNodeselectArrayIdsLT (const Vector< Int > &arrayids)
const TableExprNodeselectArrayIdsGTEQ (const Vector< Int > &arrayids)
const TableExprNodeselectArrayIdsLTEQ (const Vector< Int > &arrayids)
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 setMaxArray (const Int &n)

Static Public Attributes

static MSArrayParsethisMSAParser

Private Member Functions

void appendToIDList (const Vector< Int > &v)

Private Attributes

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

Detailed Description

Class to hold values from array grammar parser.

Intended use:

Internal

Etymology

MSArrayParse is the class used to parse a array command.

Synopsis

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

Global functions are used to operate on the information. The main function is the global function msArrayCommand. 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 MSArrayParse.h.


Constructor & Destructor Documentation

Default constructor.

Associate the ms and the shorthand.


Member Function Documentation

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

Definition at line 113 of file MSArrayParse.h.

Get table expression node object.

void casa::MSArrayParse::reset ( ) [inline]

Definition at line 112 of file MSArrayParse.h.

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

Definition at line 101 of file MSArrayParse.h.

References parsedIDList_p, and selectArrayIds().

Referenced by selectArrayIds().

Definition at line 111 of file MSArrayParse.h.

References idList.

const TableExprNode* casa::MSArrayParse::selectRangeGEAndLE ( const Int n0,
const Int n1 
)
const TableExprNode* casa::MSArrayParse::selectRangeGTAndLT ( const Int n0,
const Int n1 
)

~MSArrayParse() {if (node_p) delete node_p;node_p=0x0;};

void casa::MSArrayParse::setMaxArray ( const Int n) [inline]

Definition at line 115 of file MSArrayParse.h.


Member Data Documentation

Definition at line 123 of file MSArrayParse.h.

Definition at line 121 of file MSArrayParse.h.

Referenced by reset(), and selectedIDs().

Definition at line 125 of file MSArrayParse.h.

Definition at line 120 of file MSArrayParse.h.

std::vector<Int> casa::MSArrayParse::parsedIDList_p [private]

Definition at line 122 of file MSArrayParse.h.

Referenced by reset(), and selectArrayIds().

Definition at line 115 of file MSArrayParse.h.


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