Loading...
Searching...
No Matches
casacore::MSArrayParse Class Reference
ms package (libcasa_ms) » MSSel_module » MSSel_module_internal_classes

More...

`#include <MSArrayParse.h>`

## Public Member Functions

| MSArrayParse ()
| Default constructor.
| MSArrayParse (const MeasurementSet *ms)
| Associate the ms and the shorthand.
const TableExprNode * | selectRangeGTAndLT (const Int &n0, const Int &n1)
| ~MSArrayParse() {if (node_p) delete node_p;node_p=0x0;}
const TableExprNode * | selectRangeGEAndLE (const Int &n0, const Int &n1)
const TableExprNode * | selectArrayIds (const Vector< Int > &arrayids)
const TableExprNode * | selectArrayIds ()
const TableExprNode * | selectArrayIdsGT (const Vector< Int > &arrayids)
const TableExprNode * | selectArrayIdsLT (const Vector< Int > &arrayids)
const TableExprNode * | selectArrayIdsGTEQ (const Vector< Int > &arrayids)
const TableExprNode * | selectArrayIdsLTEQ (const Vector< Int > &arrayids)
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 | setMaxArray (const Int &n)
Public Member Functions inherited from casacore::MSParse
| MSParse ()
| Default constructor for List container class.
| MSParse (const MSParse &)
| Copy constructor (copy semantics).
| ~MSParse ()
MSParse & | operator= (const MSParse &)
| Assignment (copy semantics).
| MSParse (const MeasurementSet *ms, const String &shorthand)
| Associate the ms and the shorthand.
| MSParse (const MSSelectableTable *ms, const String &shorthand)
| Associate the ms and the shorthand.
Bool | test (const String &shortHand) const
| Test if shorthand matches.
String & | shorthand ()
| Get the shorthand.
MeasurementSet * | ms ()
| Get ms object.
MSSelectableTable * | msInterface ()
| Get ms object.
void | setMS (MeasurementSet *ms)
void | setMSInterface (MSSelectableTable *msI)
void | addCondition (TableExprNode &target, TableExprNode &source)

## Static Public Attributes

static MSArrayParse * | thisMSAParser
Static Public Attributes inherited from casacore::MSParse
static MeasurementSet * | ms_p
static MSSelectableTable * | msInterface_p

## 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 | 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 85 of file MSArrayParse.h.

## Constructor & Destructor Documentation

## MSArrayParse() [1/2]

casacore::MSArrayParse::MSArrayParse | ( |  | ) |

Default constructor.

## MSArrayParse() [2/2]

casacore::MSArrayParse::MSArrayParse | ( | const MeasurementSet * | ms | ) |

Associate the ms and the shorthand.

References casacore::MSParse::ms().

## Member Function Documentation

## accumulateIDs()

std::vector< Int > & casacore::MSArrayParse::accumulateIDs | ( | const Int | id0,
|  | const Int | id1 = -1 )

## appendToIDList()

void casacore::MSArrayParse::appendToIDList | ( | const Vector< Int > & | v | ) |

private

## cleanup()

void casacore::MSArrayParse::cleanup | ( |  | ) |

inline

Definition at line 112 of file MSArrayParse.h.

## node()

const TableExprNode casacore::MSArrayParse::node | ( |  | ) |

Get table expression node object.

## reset()

void casacore::MSArrayParse::reset | ( |  | ) |

inline

Definition at line 111 of file MSArrayParse.h.

References idList, and parsedIDList_p.

## selectArrayIds() [1/2]

const TableExprNode * casacore::MSArrayParse::selectArrayIds | ( |  | ) |

inline

Definition at line 100 of file MSArrayParse.h.

References parsedIDList_p, and selectArrayIds().

Referenced by selectArrayIds().

## selectArrayIds() [2/2]

const TableExprNode * casacore::MSArrayParse::selectArrayIds | ( | const Vector< Int > & | arrayids | ) |

## selectArrayIdsGT()

const TableExprNode * casacore::MSArrayParse::selectArrayIdsGT | ( | const Vector< Int > & | arrayids | ) |

## selectArrayIdsGTEQ()

const TableExprNode * casacore::MSArrayParse::selectArrayIdsGTEQ | ( | const Vector< Int > & | arrayids | ) |

## selectArrayIdsLT()

const TableExprNode * casacore::MSArrayParse::selectArrayIdsLT | ( | const Vector< Int > & | arrayids | ) |

## selectArrayIdsLTEQ()

const TableExprNode * casacore::MSArrayParse::selectArrayIdsLTEQ | ( | const Vector< Int > & | arrayids | ) |

## selectedIDs()

Vector< Int > casacore::MSArrayParse::selectedIDs | ( |  | ) |

inline

Definition at line 110 of file MSArrayParse.h.

References idList.

## selectRangeGEAndLE()

const TableExprNode * casacore::MSArrayParse::selectRangeGEAndLE | ( | const Int & | n0,
|  | const Int & | n1 )

## selectRangeGTAndLT()

const TableExprNode * casacore::MSArrayParse::selectRangeGTAndLT | ( | const Int & | n0,
|  | const Int & | n1 )

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

## setMaxArray()

void casacore::MSArrayParse::setMaxArray | ( | const Int & | n | ) |

inline

Definition at line 114 of file MSArrayParse.h.

References maxArrays_p.

## Member Data Documentation

## colName

const String casacore::MSArrayParse::colName

private

Definition at line 122 of file MSArrayParse.h.

## idList

Vector<Int> casacore::MSArrayParse::idList

private

Definition at line 120 of file MSArrayParse.h.

Referenced by reset(), and selectedIDs().

## maxArrays_p

Int casacore::MSArrayParse::maxArrays_p

private

Definition at line 124 of file MSArrayParse.h.

Referenced by setMaxArray().

## node_p

TableExprNode casacore::MSArrayParse::node_p

private

Definition at line 119 of file MSArrayParse.h.

## parsedIDList_p

std::vector<Int> casacore::MSArrayParse::parsedIDList_p

private

Definition at line 121 of file MSArrayParse.h.

Referenced by reset(), and selectArrayIds().

## thisMSAParser

MSArrayParse* casacore::MSArrayParse::thisMSAParser

static

Definition at line 116 of file MSArrayParse.h.

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

- ms/MSSel/MSArrayParse.h