Loading...
Searching...
No Matches
casacore::TaQLStyle Class Reference
tables package (libcasa_tables) » TaQL_module » TaQL_module_internal_classes

More...

`#include <TaQLStyle.h>`

## Public Member Functions

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

## Private Attributes

uInt | itsOrigin
Bool | itsEndExcl
Bool | itsCOrder
Bool | itsDoTiming
Bool | itsDoTracing
std::map< String, String > | itsUDFLibNameMap

## 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 62 of file TaQLStyle.h.

## Constructor & Destructor Documentation

## TaQLStyle()

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

explicit

Default style is Glish and no timing/tracing.

References origin().

## Member Function Documentation

## defineSynonym() [1/2]

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

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

## defineSynonym() [2/2]

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.

## doTiming()

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

inline

Should timing be done?

Definition at line 105 of file TaQLStyle.h.

References itsDoTiming.

Referenced by setTiming().

## doTracing()

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

inline

Should tracing be done?

Definition at line 113 of file TaQLStyle.h.

References itsDoTracing.

Referenced by setTracing().

## findSynonym()

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

Find the UDF library name belonging to a synonym.

If undefined, the synonym itself is returned.

## isCOrder()

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

inline

Definition at line 96 of file TaQLStyle.h.

References itsCOrder.

## isEndExcl()

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

inline

Definition at line 94 of file TaQLStyle.h.

References itsEndExcl.

## origin()

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

inline

Get the various style values.

Definition at line 92 of file TaQLStyle.h.

References itsOrigin.

Referenced by TaQLStyle().

## reset()

void casacore::TaQLStyle::reset | ( |  | ) |

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

## set()

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.

References casacore::NewDelAllocator< T >::value.

## setTiming()

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

inline

Set if timing needs to be done.

Definition at line 101 of file TaQLStyle.h.

References doTiming(), and itsDoTiming.

## setTracing()

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

inline

Set if tracing needs to be done.

Definition at line 109 of file TaQLStyle.h.

References doTracing(), and itsDoTracing.

## Member Data Documentation

## itsCOrder

Bool casacore::TaQLStyle::itsCOrder

private

Definition at line 119 of file TaQLStyle.h.

Referenced by isCOrder().

## itsDoTiming

Bool casacore::TaQLStyle::itsDoTiming

private

Definition at line 120 of file TaQLStyle.h.

Referenced by doTiming(), and setTiming().

## itsDoTracing

Bool casacore::TaQLStyle::itsDoTracing

private

Definition at line 121 of file TaQLStyle.h.

Referenced by doTracing(), and setTracing().

## itsEndExcl

Bool casacore::TaQLStyle::itsEndExcl

private

Definition at line 118 of file TaQLStyle.h.

Referenced by isEndExcl().

## itsOrigin

uInt casacore::TaQLStyle::itsOrigin

private

Definition at line 117 of file TaQLStyle.h.

Referenced by origin().

## itsUDFLibNameMap

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

private

Definition at line 122 of file TaQLStyle.h.

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

- tables/TaQL/TaQLStyle.h