00001
00002
00003
00004 #ifndef XPATH_NODE_H
00005 #define XPATH_NODE_H
00006
00007 #include <qvaluelist.h>
00008 #include <dom/dom_node.h>
00009
00010 namespace XPath {
00011
00012 class QueryState;
00013 class Value;
00014
00018 class XPathNode
00019 {
00020 public:
00021 enum NodeType {
00022 NullNode, AxisNode, BinaryOpNode, FunctionCallNode, LiteralNode,
00023 LocationPathNode, NodeTestNode, UnaryOpNode, VariableRefNode
00024 };
00025
00026 XPathNode();
00027 XPathNode( const XPathNode &node );
00028 XPathNode( XPathNode::NodeType nodeType );
00029 virtual ~XPathNode();
00030
00032 XPathNode::NodeType nodeType() const { return type; }
00033
00039 virtual Value *evaluate( QueryState *state );
00040
00042 virtual QString qstring() const;
00043
00044 private:
00045 NodeType type;
00046 };
00047
00048 };
00049
00050 #endif // XPATH_NODE_H
00051
00052
00053
00054