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/OS/Mutex.h> 43 class TaQLNodeVisitor;
45 class TaQLConstNodeRep;
46 class TaQLRegexNodeRep;
47 class TaQLMultiNodeRep;
48 class TaQLQueryNodeRep;
98 {
if (
this != &that) {
135 void show (std::ostream& os)
const 182 void setIsTableName();
183 const String& getString()
const;
204 const String& getString()
const;
205 Bool caseInsensitive()
const;
231 void setIsSetOrArray();
232 void setPPFix (
const String& prefix,
const String& postfix);
233 void setSeparator (
const String& sep);
234 void setSeparator (
uInt incr,
const String& sep);
259 void setFromExecute();
Raw TaQL parse tree node defining a selection command.
TaQLMultiNodeRep * itsNRep
void save(AipsIO &aio) const
Save and restore the entire tree.
const TaQLMultiNodeRep * getMultiRep() const
const TaQLNodeRep * getRep() const
Get read access to the letter.
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)
static TaQLNode parse(const String &command)
Parse a TaQL command and return the result.
AipsIO is the object persistency mechanism of Casacore.
const TaQLStyle & style() const
Get the TaQL style.
char nodeType() const
Get the node type of the derived class.
static void unlink(TaQLNodeRep *rep)
Decrement the reference count.
const TaQLStyle & style() const
Get the TaQL style.
char nodeType() const
Return the type of 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.
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.
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.
Class with static members defining the TaQL style.
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.
TaQLNodeResult visit(TaQLNodeVisitor &visitor) const
Let the visitor visit the node.
TaQLNode & operator=(const TaQLNode &that)
Assignment (reference semantics).
void saveNode(AipsIO &aio) const
Helper functions for save/restore of tree.
Wrapper around a pthreads mutex.
TaQLRegexNodeRep * itsNRep
virtual void show(std::ostream &os) const =0
Print the object in an ostream.
Envelope class for a node containing a constant value.
Envelope class to hold the result of a visit to the node tree.
Bool isValid() const
Does the envelope contain a letter?
static void clearNodesCreated()
static std::vector< TaQLNode * > theirNodesCreated
A list of objects created by the parser and deleted at the end.
TaQLNode()
Default constructor.
static TaQLNodeRep * link(TaQLNodeRep *rep)
Increment the reference count.
String: the storage and methods of handling collections of characters.
Envelope class for a node in the raw TaQL parse tree.
Class to visit the nodes in the raw TaQL parse tree.
virtual TaQLNodeResult visit(TaQLNodeVisitor &) const =0
Visit a node for tree traversal.
TaQLConstNodeRep * itsNRep
this file contains all the compiler specific defines
Representation of a node in the raw TaQL parse tree.