XQilla.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2006
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2006
00005  *     Progress Software Corporation. All rights reserved.
00006  * Copyright (c) 2004-2006
00007  *     Oracle. All rights reserved.
00008  *
00009  * See the file LICENSE for redistribution information.
00010  *
00011  * $Id: XQilla.hpp,v 1.8.2.1 2006/12/08 15:19:12 jpcs Exp $
00012  */
00013 
00014 #ifndef _XQILLA_07637_HPP
00015 #define _XQILLA_07637_HPP
00016 
00017 #include <xqilla/framework/XQillaExport.hpp>
00018 
00019 #include <xercesc/framework/MemoryManager.hpp>
00020 #include <xercesc/util/PlatformUtils.hpp>
00021 #include <xercesc/util/XMemory.hpp>
00022 
00023 class DynamicContext;
00024 class XQQuery;
00025 class XPath2MemoryManager;
00026 
00027 XERCES_CPP_NAMESPACE_BEGIN
00028 class InputSource;
00029 class XMLBuffer;
00030 XERCES_CPP_NAMESPACE_END
00031 
00039 class XQILLA_API XQilla : public XERCES_CPP_NAMESPACE_QUALIFIER XMemory
00040 {
00041 public:
00043   enum Flags {
00044     NO_STATIC_RESOLUTION = 0x1, 
00045     NO_ADOPT_CONTEXT = 0x2 
00046   };
00047 
00049   enum Language {
00050     XQUERY,          
00051     XPATH2,          
00052     XQUERY_FULLTEXT, 
00053     XPATH2_FULLTEXT  
00054   };
00055                                                                                                                                                               
00062   XQilla(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr = 0);
00063 
00068   ~XQilla();
00069 
00071   // @{
00072 
00090   static XQQuery* parse(const XMLCh* query,
00091                         Language language = XQUERY,
00092                         DynamicContext* context = 0,
00093                         const XMLCh* queryFile = NULL,
00094                         unsigned int flags = 0,
00095                         XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00096                         XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00097 
00113   static XQQuery* parse(const XERCES_CPP_NAMESPACE_QUALIFIER InputSource& querySrc,
00114                         Language language = XQUERY,
00115                         DynamicContext* context = 0,
00116                         unsigned int flags = 0,
00117                         XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00118                         XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00119 
00135   static XQQuery* parseFromURI(const XMLCh* queryFile,
00136                                Language language = XQUERY,
00137                                DynamicContext* context = 0,
00138                                unsigned int flags = 0,
00139                                XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00140                                XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00141 
00143 
00145   // @{
00146 
00152   static DynamicContext *createContext(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00153                                        XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00154 
00156 
00157 private:
00158   static bool readQuery(const XMLCh* queryFile, 
00159                         XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr, 
00160                         XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer& queryText);
00161   static bool readQuery(const XERCES_CPP_NAMESPACE_QUALIFIER InputSource& querySrc, 
00162                         XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr, 
00163                         XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer& queryText);
00164 };
00165 
00166 #endif

Generated on Tue Dec 12 00:18:56 2006 for XQilla Simple API by  doxygen 1.4.6