casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casacore::TaQLStyle Class Reference

Class with static members defining the TaQL style. More...

#include <TaQLStyle.h>

Public Member Functions

 TaQLStyle (uInt origin=1)
 Default style is Glish and no timing/tracing. More...
 
void reset ()
 Reset to the default Glish style and no timing/tracing. More...
 
void set (const String &value)
 Set the style according to the (case-insensitive) value. More...
 
void defineSynonym (const String &synonym, const String &udfLibName)
 Define a UDF library name synonym. More...
 
void defineSynonym (const String &command)
 Set a synonym using a command like 'synonym = udflibname'. More...
 
String findSynonym (const String &synonym) const
 Find the UDF library name belonging to a synonym. More...
 
uInt origin () const
 Get the various style values. More...
 
Bool isEndExcl () const
 
Bool isCOrder () const
 
void setTiming (Bool doTiming)
 Set if timing needs to be done. More...
 
Bool doTiming () const
 Should timing be done? More...
 
void setTracing (Bool doTracing)
 Set if tracing needs to be done. More...
 
Bool doTracing () const
 Should tracing be done? More...
 

Private Attributes

uInt itsOrigin
 
Bool itsEndExcl
 
Bool itsCOrder
 
Bool itsDoTiming
 
Bool itsDoTracing
 
std::map< String, StringitsUDFLibNameMap
 

Detailed Description

Class with static members defining the TaQL style.

Intended use:

Internal

Synopsis

Originally TaQL was developed to use the Glish style of indexing. This meant 1-based indices, axes in Fortran order, and end is inclusive in start:end. On the other hand the Python style is the opposite. In order to let the user choose between styles, one can define the style in a TaQL command. The default style is Glish.

The class is also used to tell the TaQL execution engine if timings or tracing of the various parts of the TaQL command need to be done.

Finally it is possible to define synonyms for UDF library names. For example, 'derivedmscal' is a lot to type, so a synonym 'mscal' (or even 'mc') can be defined for it.

Definition at line 64 of file TaQLStyle.h.

Constructor & Destructor Documentation

casacore::TaQLStyle::TaQLStyle ( uInt  origin = 1)
explicit

Default style is Glish and no timing/tracing.

Member Function Documentation

void casacore::TaQLStyle::defineSynonym ( const String synonym,
const String udfLibName 
)

Define a UDF library name synonym.

The synonym name is always converted to lowercase because TaQL always uses lowercase to lookup functions. The library name kept as is making it possible to use a library containing uppercase characters. If the synonym already exists, it is redefined.

void casacore::TaQLStyle::defineSynonym ( const String command)

Set a synonym using a command like 'synonym = udflibname'.

Bool casacore::TaQLStyle::doTiming ( ) const
inline

Should timing be done?

Definition at line 107 of file TaQLStyle.h.

References itsDoTiming.

Referenced by setTiming().

Bool casacore::TaQLStyle::doTracing ( ) const
inline

Should tracing be done?

Definition at line 115 of file TaQLStyle.h.

References itsDoTracing.

Referenced by setTracing().

String casacore::TaQLStyle::findSynonym ( const String synonym) const

Find the UDF library name belonging to a synonym.

If undefined, the synonym itself is returned.

Bool casacore::TaQLStyle::isCOrder ( ) const
inline

Definition at line 98 of file TaQLStyle.h.

References itsCOrder.

Bool casacore::TaQLStyle::isEndExcl ( ) const
inline

Definition at line 96 of file TaQLStyle.h.

References itsEndExcl.

uInt casacore::TaQLStyle::origin ( ) const
inline

Get the various style values.

Definition at line 94 of file TaQLStyle.h.

References itsOrigin.

void casacore::TaQLStyle::reset ( )

Reset to the default Glish style and no timing/tracing.

void casacore::TaQLStyle::set ( const String value)

Set the style according to the (case-insensitive) value.

Possible values are Glish, Python, Base0, Base1, FortranOrder, Corder, InclEnd, and ExclEnd.

void casacore::TaQLStyle::setTiming ( Bool  doTiming)
inline

Set if timing needs to be done.

Definition at line 103 of file TaQLStyle.h.

References doTiming(), and itsDoTiming.

void casacore::TaQLStyle::setTracing ( Bool  doTracing)
inline

Set if tracing needs to be done.

Definition at line 111 of file TaQLStyle.h.

References doTracing(), and itsDoTracing.

Member Data Documentation

Bool casacore::TaQLStyle::itsCOrder
private

Definition at line 121 of file TaQLStyle.h.

Referenced by isCOrder().

Bool casacore::TaQLStyle::itsDoTiming
private

Definition at line 122 of file TaQLStyle.h.

Referenced by doTiming(), and setTiming().

Bool casacore::TaQLStyle::itsDoTracing
private

Definition at line 123 of file TaQLStyle.h.

Referenced by doTracing(), and setTracing().

Bool casacore::TaQLStyle::itsEndExcl
private

Definition at line 120 of file TaQLStyle.h.

Referenced by isEndExcl().

uInt casacore::TaQLStyle::itsOrigin
private

Definition at line 119 of file TaQLStyle.h.

Referenced by origin().

std::map<String,String> casacore::TaQLStyle::itsUDFLibNameMap
private

Definition at line 124 of file TaQLStyle.h.


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