28 #ifndef TABLES_TAQLNODE_H
29 #define TABLES_TAQLNODE_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
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 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 Mutex theirMutex
Use a mutex to guard the statics.
static TaQLNode theirNode
The object getting the final tree.
Envelope class for a node containing a list of nodes.
Referenced counted pointer for constant data.
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).
const String & getString() const
Wrapper around a pthreads mutex.
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 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.
CountedPtr< TaQLNodeRep > itsRep
TaQLConstNodeRep * itsNRep
const TaQLMultiNodeRep * getMultiRep() const
Representation of a node in the raw TaQL parse tree.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.