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. | |
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 |
Class with static members defining the TaQL style.
Internal
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.
casacore::TaQLStyle::TaQLStyle | ( | uInt | origin = 1 |
) | [explicit] |
Default style is Glish and no timing/tracing.
void casacore::TaQLStyle::defineSynonym | ( | const String & | command | ) |
Set a synonym using a command like 'synonym = 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.
Bool casacore::TaQLStyle::doTiming | ( | ) | const [inline] |
Bool casacore::TaQLStyle::doTracing | ( | ) | const [inline] |
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] |
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] |
void casacore::TaQLStyle::setTracing | ( | Bool | doTracing | ) | [inline] |
Set if tracing needs to be done.
Definition at line 111 of file TaQLStyle.h.
References itsDoTracing.
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.