casa
5.7.0-16
|
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, 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.
|
explicit |
Default style is Glish and no timing/tracing.
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'.
|
inline |
Should timing be done?
Definition at line 107 of file TaQLStyle.h.
References itsDoTiming.
Referenced by setTiming().
|
inline |
Should tracing be done?
Definition at line 115 of file TaQLStyle.h.
References itsDoTracing.
Referenced by setTracing().
Find the UDF library name belonging to a synonym.
If undefined, the synonym itself is returned.
|
inline |
Definition at line 98 of file TaQLStyle.h.
References itsCOrder.
|
inline |
Definition at line 96 of file TaQLStyle.h.
References itsEndExcl.
|
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.
|
inline |
Set if timing needs to be done.
Definition at line 103 of file TaQLStyle.h.
References doTiming(), and itsDoTiming.
|
inline |
Set if tracing needs to be done.
Definition at line 111 of file TaQLStyle.h.
References doTracing(), and itsDoTracing.
|
private |
Definition at line 121 of file TaQLStyle.h.
Referenced by isCOrder().
|
private |
Definition at line 122 of file TaQLStyle.h.
Referenced by doTiming(), and setTiming().
|
private |
Definition at line 123 of file TaQLStyle.h.
Referenced by doTracing(), and setTracing().
|
private |
Definition at line 120 of file TaQLStyle.h.
Referenced by isEndExcl().
|
private |
Definition at line 119 of file TaQLStyle.h.
Referenced by origin().
Definition at line 124 of file TaQLStyle.h.