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

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

#include <MSTimeParse.h>

Inheritance diagram for casa::MSTimeParse:
casa::MSParse

List of all members.

Public Member Functions

 MSTimeParse ()
 Default constructor.
 MSTimeParse (const MeasurementSet *ms, const TableExprNode &otherTens, const Bool honourRowFlags=True)
 Associate the ms and the shorthand.
 MSTimeParse (const MeasurementSet *ms, const TableExprNode &colAsTEN, MSSelectableMainColumn &msMainColInterface, const TableExprNode &otherTEN, const Bool honourRowFlags=True)
 ~MSTimeParse ()
const TableExprNodeselectTime (const MEpoch &time, bool daytime=false)
 ~MSTimeParse() { if (node_p) delete node_p;node_p=0x0; if (otherTens_p) delete otherTens_p;otherTens_p=0x0; };
const TableExprNodeselectTimeGT (const MEpoch &lowboundTime, bool daytime=false)
const TableExprNodeselectTimeLT (const MEpoch &upboundTime, bool daytime=false)
const TableExprNodeselectTimeRange (const MEpoch &lowboundTime, const MEpoch &upboundTime, bool daytime=false)
Matrix< DoubleselectedTimes ()
const TableExprNodeaddCondition (TableExprNode &condition)
void getDefaults ()
Int year0 ()
Int month0 ()
Int day0 ()
Int hour0 ()
Int minute0 ()
Int second0 ()
Int fractionalsec0 ()
Double defaultInteg ()
void accumulateTimeList (const Double t0, const Double t1)

Static Public Member Functions

static void setDefaults (TimeFields &tf, Bool dataOrigin=True)
static void copyDefaults (TimeFields &target, TimeFields &source)
static const MEpochyearTimeConvert (Int year=-1, Int month=-1, Int day=-1, Int hour=-1, Int minute=-1, Int second=-1, Int millisec=-1)
static const MEpochyearTimeConvert (const TimeFields &tf)
static const TableExprNodenode ()
 Get table expression node object.
static void validate (const TimeFields &tf)
static void reset ()
static void cleanup ()
static Double toTAIInSec (const MEpoch &time)

Public Attributes

MVTime firstRowTime
Int defaultYear
Int defaultMonth
Int defaultDay
Int defaultHour
Int defaultMinute
Int defaultSeconds
Int defaultFractionalSec
Double defaultExposure
const String colName
Bool honourRowFlags_p

Static Public Attributes

static TableExprNodenode_p
static TableExprNodeotherTens_p
 private:
static Bool defaultTimeComputed
static MeasurementSetms_p
static MEpochyeartime
static MEpochdaytime
static Matrix< DoubletimeList
static MSTimeParsethisMSTParser
static TableExprNode columnAsTEN_p
static MSSelectableMainColumnmainColumn_p

Detailed Description

Class to hold values from time grammar parser.

Intended use:

Internal

Etymology

MSTimeParse is the class used to parse a time command.

Synopsis

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

Global functions are used to operate on the information. The main function is the global function msTimeCommand. 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 89 of file MSTimeParse.h.


Constructor & Destructor Documentation

Default constructor.

casa::MSTimeParse::MSTimeParse ( const MeasurementSet ms,
const TableExprNode otherTens,
const Bool  honourRowFlags = True 
)

Associate the ms and the shorthand.

casa::MSTimeParse::MSTimeParse ( const MeasurementSet ms,
const TableExprNode colAsTEN,
MSSelectableMainColumn msMainColInterface,
const TableExprNode otherTEN,
const Bool  honourRowFlags = True 
)

Definition at line 102 of file MSTimeParse.h.

References columnAsTEN_p.


Member Function Documentation

void casa::MSTimeParse::accumulateTimeList ( const Double  t0,
const Double  t1 
)
static void casa::MSTimeParse::cleanup ( ) [inline, static]

Definition at line 150 of file MSTimeParse.h.

static void casa::MSTimeParse::copyDefaults ( TimeFields target,
TimeFields source 
) [static]

Definition at line 141 of file MSTimeParse.h.

References defaultDay.

Definition at line 146 of file MSTimeParse.h.

References defaultExposure.

Definition at line 145 of file MSTimeParse.h.

References defaultFractionalSec.

Definition at line 142 of file MSTimeParse.h.

References defaultHour.

Definition at line 143 of file MSTimeParse.h.

References defaultMinute.

Definition at line 140 of file MSTimeParse.h.

References defaultMonth.

static const TableExprNode* casa::MSTimeParse::node ( ) [static]

Get table expression node object.

static void casa::MSTimeParse::reset ( ) [inline, static]

Definition at line 149 of file MSTimeParse.h.

References casa::Matrix< T >::resize(), and timeList.

Definition at line 144 of file MSTimeParse.h.

References defaultSeconds.

Definition at line 119 of file MSTimeParse.h.

References timeList.

const TableExprNode* casa::MSTimeParse::selectTime ( const MEpoch time,
bool  daytime = false 
)

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

const TableExprNode* casa::MSTimeParse::selectTimeGT ( const MEpoch lowboundTime,
bool  daytime = false 
)
const TableExprNode* casa::MSTimeParse::selectTimeLT ( const MEpoch upboundTime,
bool  daytime = false 
)
const TableExprNode* casa::MSTimeParse::selectTimeRange ( const MEpoch lowboundTime,
const MEpoch upboundTime,
bool  daytime = false 
)
static void casa::MSTimeParse::setDefaults ( TimeFields tf,
Bool  dataOrigin = True 
) [static]
static Double casa::MSTimeParse::toTAIInSec ( const MEpoch time) [static]
static void casa::MSTimeParse::validate ( const TimeFields tf) [static]

Definition at line 139 of file MSTimeParse.h.

References defaultYear.

static const MEpoch* casa::MSTimeParse::yearTimeConvert ( Int  year = -1,
Int  month = -1,
Int  day = -1,
Int  hour = -1,
Int  minute = -1,
Int  second = -1,
Int  millisec = -1 
) [static]
static const MEpoch* casa::MSTimeParse::yearTimeConvert ( const TimeFields tf) [static]

Member Data Documentation

Definition at line 165 of file MSTimeParse.h.

Definition at line 170 of file MSTimeParse.h.

Referenced by ~MSTimeParse().

Definition at line 161 of file MSTimeParse.h.

Definition at line 162 of file MSTimeParse.h.

Referenced by day0().

Definition at line 164 of file MSTimeParse.h.

Referenced by defaultInteg().

Definition at line 162 of file MSTimeParse.h.

Referenced by fractionalsec0().

Definition at line 162 of file MSTimeParse.h.

Referenced by hour0().

Definition at line 162 of file MSTimeParse.h.

Referenced by minute0().

Definition at line 162 of file MSTimeParse.h.

Referenced by month0().

Definition at line 162 of file MSTimeParse.h.

Referenced by second0().

Definition at line 156 of file MSTimeParse.h.

Definition at line 162 of file MSTimeParse.h.

Referenced by year0().

Definition at line 157 of file MSTimeParse.h.

Definition at line 166 of file MSTimeParse.h.

Definition at line 171 of file MSTimeParse.h.

Reimplemented from casa::MSParse.

Definition at line 158 of file MSTimeParse.h.

Definition at line 150 of file MSTimeParse.h.

private:

Definition at line 155 of file MSTimeParse.h.

Definition at line 169 of file MSTimeParse.h.

Definition at line 167 of file MSTimeParse.h.

Referenced by reset(), and selectedTimes().

Definition at line 160 of file MSTimeParse.h.


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