Main Page   Class Hierarchy   Compound List   File List   Compound Members  

xpath_query.h

00001 //  -*- c++ -*-
00002 
00003 #ifndef XPATH_QUERY_H
00004 #define XPATH_QUERY_H
00005 
00006 #include <xpath/xpath_value.h>
00007 #include <xpath/xpath_context.h>
00008 
00009 namespace DOM {
00010     class Node;
00011 };
00012 
00013 namespace XPath {
00014 
00021 class Query
00022 {
00023 public:
00024     Value *select( const QString &expr, const DOM::Node &context );
00025 
00027     virtual Value *select( const QString &expr, const Context &context );
00028 };
00029 
00033 class QueryState
00034 {
00035 public:
00036     QueryState( const Query &query, const Context &context ) : q(query), ctx(context) {}
00037     ~QueryState() {}
00038 
00039     Query query() const { return q; }
00040     Context context() const { return ctx; }
00041     Value result() const { return res; }
00042 
00043 private:
00044     Query q;
00045     Context ctx;
00046     Value res;
00047 };
00048 
00049 }; // namespace XPath
00050 
00051 #endif // XPATH_QUERY_H
00052 
00053 // Local Variables:
00054 // c-basic-offset: 4
00055 // End:

Generated at Sat Feb 15 02:18:35 2003 for 'KHTML::XPath' by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001