TaQLNodeVisitor.h
Classes
- TaQLNodeVisitor -- Class to visit the nodes in the raw TaQL parse tree. (full description)
Interface
- Public Members
- virtual ~TaQLNodeVisitor()
- virtual TaQLNodeResult visitConstNode (const TaQLConstNodeRep& node) = 0
- virtual TaQLNodeResult visitUnaryNode (const TaQLUnaryNodeRep& node) = 0
- virtual TaQLNodeResult visitBinaryNode (const TaQLBinaryNodeRep& node) = 0
- virtual TaQLNodeResult visitMultiNode (const TaQLMultiNodeRep& node) = 0
- virtual TaQLNodeResult visitFuncNode (const TaQLFuncNodeRep& node) = 0
- virtual TaQLNodeResult visitRangeNode (const TaQLRangeNodeRep& node) = 0
- virtual TaQLNodeResult visitIndexNode (const TaQLIndexNodeRep& node) = 0
- virtual TaQLNodeResult visitKeyColNode (const TaQLKeyColNodeRep& node) = 0
- virtual TaQLNodeResult visitTableNode (const TaQLTableNodeRep& node) = 0
- virtual TaQLNodeResult visitColNode (const TaQLColNodeRep& node) = 0
- virtual TaQLNodeResult visitColumnsNode (const TaQLColumnsNodeRep& node) = 0
- virtual TaQLNodeResult visitJoinNode (const TaQLJoinNodeRep& node) = 0
- virtual TaQLNodeResult visitSortKeyNode (const TaQLSortKeyNodeRep& node) = 0
- virtual TaQLNodeResult visitSortNode (const TaQLSortNodeRep& node) = 0
- virtual TaQLNodeResult visitLimitOffNode (const TaQLLimitOffNodeRep& node) = 0
- virtual TaQLNodeResult visitGivingNode (const TaQLGivingNodeRep& node) = 0
- virtual TaQLNodeResult visitUpdExprNode (const TaQLUpdExprNodeRep& node) = 0
- virtual TaQLNodeResult visitSelectNode (const TaQLSelectNodeRep& node) = 0
- virtual TaQLNodeResult visitUpdateNode (const TaQLUpdateNodeRep& node) = 0
- virtual TaQLNodeResult visitInsertNode (const TaQLInsertNodeRep& node) = 0
- virtual TaQLNodeResult visitDeleteNode (const TaQLDeleteNodeRep& node) = 0
- virtual TaQLNodeResult visitCalcNode (const TaQLCalcNodeRep& node) = 0
- virtual TaQLNodeResult visitCreTabNode (const TaQLCreTabNodeRep& node) = 0
- virtual TaQLNodeResult visitColSpecNode (const TaQLColSpecNodeRep& node) = 0
- virtual TaQLNodeResult visitRecFldNode (const TaQLRecFldNodeRep& node) = 0
- Protected Members
- TaQLNodeResult visitNode (const TaQLNode& node)
Review Status
- Programs:
- Tests:
Prerequisite
Synopsis
TaQLNodeVisitor is the abstract base class for classes that want to
visit a TaQLNode tree, i.e. traverse the tree.
Each visit results in a TaQLNodeResult object which acts as the basis
for the actual result object.
A specialization of TaQLNodeVisitor (e.g. class
TaQLNodeHandler needs to implement
the various visitXXNode functions. A visit function will process a node
which usually means visiting its children, etc..
Motivation
The visitor design pattern separates the tree from the way it is processed.
In this way any handler can be created. For instance, a query optimizer
could be a future other handler.
Member Description
Define the functions to visit each node type.
A convenience function to visit the given node using this visitor.