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>
45 class TaQLNodeVisitor;
47 class TaQLConstNodeRep;
48 class TaQLRegexNodeRep;
49 class TaQLMultiNodeRep;
50 class TaQLQueryNodeRep;
100 {
if (
this != &that) {
108 {
return itsRep->style(); }
125 {
return itsRep->nodeType(); }
137 void show (std::ostream& os)
const
String: the storage and methods of handling collections of characters.
Envelope class for a node containing a constant value.
TaQLConstNode(TaQLConstNodeRep *rep)
const String & getString() const
TaQLConstNodeRep * itsNRep
Raw TaQL parse tree node defining a list of nodes.
Envelope class for a node containing a list of nodes.
TaQLMultiNode(TaQLMultiNodeRep *rep)
TaQLMultiNodeRep * itsNRep
const TaQLMultiNodeRep * getMultiRep() const
void add(const TaQLNode &node)
void setSeparator(const String &sep)
void setPPFix(const String &prefix, const String &postfix)
TaQLMultiNode(Bool isSetOrArray)
void setSeparator(uInt incr, const String &sep)
void add(TaQLNodeRep *noderep)
Envelope class to hold the result of a visit to the node tree.
TaQLNode(TaQLNodeRep *rep)
Construct for given letter.
static TaQLNode restore(AipsIO &aio)
void save(AipsIO &aio) const
Save and restore the entire parse tree.
std::shared_ptr< TaQLNodeRep > itsRep
static TaQLNode theirNode
The object getting the final tree.
static std::mutex theirMutex
Use a mutex to guard the statics.
TaQLNode()
Default constructor.
~TaQLNode()
Destructor deletes the letter if no more references.
const TaQLNodeRep * getRep() const
Get read access to the letter.
const TaQLStyle & style() const
Get the TaQL style.
static std::vector< TaQLNode * > theirNodesCreated
A list of objects created by the parser and deleted at the end.
static TaQLMultiNode restoreMultiNode(AipsIO &aio)
Bool isValid() const
Does the envelope contain a letter?
static TaQLNode restoreNode(AipsIO &aio)
static TaQLNode parse(const String &command)
Parse a TaQL command and return the result.
void show(std::ostream &os) const
Print the node (recursively) in the given stream.
TaQLNodeResult visit(TaQLNodeVisitor &visitor) const
Let the visitor visit the node.
static void clearNodesCreated()
Delete all nodes that were created by the parser.
TaQLNode(const TaQLNode &that)
Copy constructor (reference semantics).
void saveNode(AipsIO &aio) const
Helper functions for save/restore of tree.
char nodeType() const
Return the type of letter.
static TaQLStyle theirStyle
Keep the TaQL style to use.
TaQLNode & operator=(const TaQLNode &that)
Assignment (reference semantics).
Raw TaQL parse tree node defining a selection command.
Envelope class for a node containing a selection command.
TaQLQueryNode(TaQLQueryNodeRep *rep)
TaQLQueryNodeRep * itsNRep
Raw TaQL parse tree node defining a constant regex value.
Envelope class for a node containing a constant regex value.
TaQLRegexNode(TaQLRegexNodeRep *rep)
TaQLRegexNodeRep * itsNRep
Bool caseInsensitive() const
const String & getString() const
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.