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