Go to the documentation of this file.
28 #ifndef TABLES_TAQLNODE_H
29 #define TABLES_TAQLNODE_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/TaQL/TaQLNodeRep.h>
34 #include <casacore/tables/TaQL/TaQLStyle.h>
35 #include <casacore/casa/Utilities/CountedPtr.h>
36 #include <casacore/casa/OS/Mutex.h>
44 class TaQLNodeVisitor;
46 class TaQLConstNodeRep;
47 class TaQLRegexNodeRep;
48 class TaQLMultiNodeRep;
49 class TaQLQueryNodeRep;
99 {
if (
this != &that) {
107 {
return itsRep->style(); }
123 {
return itsRep->nodeType(); }
135 void show (std::ostream& os)
const
const TaQLStyle & style() const
Get the TaQL style.
TaQLConstNodeRep * itsNRep
TaQLQueryNodeRep * itsNRep
void add(const TaQLNode &node)
AipsIO is the object persistency mechanism of Casacore
Raw TaQL parse tree node defining a constant regex value.
TaQLNode(TaQLNodeRep *rep)
Construct for given letter.
TaQLQueryNode(TaQLQueryNodeRep *rep)
void add(TaQLNodeRep *noderep)
TaQLNodeResult visit(TaQLNodeVisitor &visitor) const
Let the visitor visit the node.
TaQLMultiNodeRep * itsNRep
Referenced counted pointer for constant data.
static TaQLNode theirNode
The object getting the final tree.
static TaQLNode restore(AipsIO &aio)
TaQLMultiNode(TaQLMultiNodeRep *rep)
TaQLRegexNodeRep * itsNRep
void setPPFix(const String &prefix, const String &postfix)
Bool isValid() const
Does the envelope contain a letter?
void saveNode(AipsIO &aio) const
Helper functions for save/restore of tree.
Envelope class for a node containing a constant value.
TaQLRegexNode(TaQLRegexNodeRep *rep)
Envelope class for a node in the raw TaQL parse tree.
TaQLNode & operator=(const TaQLNode &that)
Assignment (reference semantics).
Envelope class to hold the result of a visit to the node tree.
TaQLConstNode(TaQLConstNodeRep *rep)
char nodeType() const
Return the type of letter.
const TaQLNodeRep * getRep() const
Get read access to the letter.
const String & getString() const
const TaQLMultiNodeRep * getMultiRep() const
~TaQLNode()
Destructor deletes the letter if no more references.
static TaQLNode restoreNode(AipsIO &aio)
const String & getString() const
Raw TaQL parse tree node defining a selection command.
Envelope class for a node containing a list of nodes.
static TaQLNode parse(const String &command)
Parse a TaQL command and return the result.
Bool caseInsensitive() const
Envelope class for a node containing a selection command.
Envelope class for a node containing a constant regex value.
static std::vector< TaQLNode * > theirNodesCreated
A list of objects created by the parser and deleted at the end.
static Mutex theirMutex
Use a mutex to guard the statics.
this file contains all the compiler specific defines
Representation of a node in the raw TaQL parse tree.
void show(std::ostream &os) const
Print the node (recursively) in the given stream.
CountedPtr< TaQLNodeRep > itsRep
void setSeparator(const String &sep)
Class with static members defining the TaQL style.
Class to visit the nodes in the raw TaQL parse tree.
Raw TaQL parse tree node defining a constant value.
static TaQLStyle theirStyle
Keep the TaQL style to use.
static void clearNodesCreated()
Delete all nodes that were created by the parser.
String: the storage and methods of handling collections of characters.
Wrapper around a pthreads mutex.
bool Bool
Define the standard types used by Casacore.
TaQLMultiNode(Bool isSetOrArray)
void setSeparator(uInt incr, const String &sep)
TaQLNode()
Default constructor.
static TaQLMultiNode restoreMultiNode(AipsIO &aio)
void save(AipsIO &aio) const
Save and restore the entire tree.
TaQLNode(const TaQLNode &that)
Copy constructor (reference semantics).
Raw TaQL parse tree node defining a list of nodes.