SourceForge.net Logo
XQilla.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2001, 2008,
3 * DecisionSoft Limited. All rights reserved.
4 * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
5 *
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#ifndef _XQILLA_07637_HPP
21#define _XQILLA_07637_HPP
22
23#include <xqilla/framework/XQillaExport.hpp>
24
28
29class DynamicContext;
32class Optimizer;
33class DelayedFuncFactory;
34class XQQuery;
35
36XERCES_CPP_NAMESPACE_BEGIN
37class InputSource;
38class XMLBuffer;
39XERCES_CPP_NAMESPACE_END
40
42void compile(const XMLCh *queryFile);
43}
44
52class XQILLA_API XQilla : public XERCES_CPP_NAMESPACE_QUALIFIER XMemory
53{
54public:
63
89
96 XQilla(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr = 0);
97
103
105 // @{
106
123 static XQQuery* parse(const XMLCh* query,
124 DynamicContext* context = 0,
125 const XMLCh* queryFile = NULL,
126 unsigned int flags = 0,
127 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
128 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager,
129 XQQuery *result = 0);
130
145 static XQQuery* parse(const XERCES_CPP_NAMESPACE_QUALIFIER InputSource& querySrc,
146 DynamicContext* context = 0,
147 unsigned int flags = 0,
148 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
149 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager,
150 XQQuery *result = 0);
151
166 static XQQuery* parseFromURI(const XMLCh* queryFile,
167 DynamicContext* context = 0,
168 unsigned int flags = 0,
169 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
170 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager,
171 XQQuery *result = 0);
172
174
176 // @{
177
184 XQillaConfiguration *conf = 0,
185 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
186 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
187
189
190private:
191 static bool readQuery(const XMLCh* queryFile,
192 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr,
193 XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer& queryText);
194 static bool readQuery(const XERCES_CPP_NAMESPACE_QUALIFIER InputSource& querySrc,
195 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr,
196 XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer& queryText);
197 static Optimizer *createOptimizer(DynamicContext *context, unsigned int flags);
198
199 static void compileDelayedModule(const XMLCh* queryFile, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
200 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
201
202 friend void CompileDelayedModule::compile(const XMLCh *queryFile);
203 friend class DelayedFuncFactory;
204};
205
206#endif
The execution time dynamic context interface.
Definition DynamicContext.hpp:39
Definition XPath2MemoryManager.hpp:46
Encapsulates a query expression.
Definition XQQuery.hpp:76
Definition XQillaConfiguration.hpp:39
static DynamicContext * createContext(Language language=XQUERY, XQillaConfiguration *conf=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager)
Creates a context suitable for parsing an expression with.
~XQilla()
Destructs the object.
static XQQuery * parse(const XMLCh *query, DynamicContext *context=0, const XMLCh *queryFile=NULL, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager, XQQuery *result=0)
Parse the expression contained in the given query string.
static XQQuery * parseFromURI(const XMLCh *queryFile, DynamicContext *context=0, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager, XQQuery *result=0)
Parse the expression residing at the given URL.
Flags
Flags used by the XQilla methods. These are used by bitwise OR-ing (|) their values together.
Definition XQilla.hpp:56
@ NO_OPTIMIZATION
Don't perform optimization.
Definition XQilla.hpp:60
@ NO_STATIC_RESOLUTION
Don't perform static resolution or any optimization.
Definition XQilla.hpp:57
@ NO_DEFAULT_MODULES
Don't automatically import the default modules.
Definition XQilla.hpp:61
@ NO_ADOPT_CONTEXT
Don't adopt the context and delete it when the XQQuery is deleted.
Definition XQilla.hpp:58
@ DEBUG_QUERY
Build debugging hooks into the query to enable the use of DebugListener.
Definition XQilla.hpp:59
Language
Enumeration used to select a language to parse.
Definition XQilla.hpp:65
@ XPATH3
Definition XQilla.hpp:84
@ EXTENSIONS
Definition XQilla.hpp:70
@ XQUERY
Definition XQilla.hpp:66
@ XSLT3
Definition XQilla.hpp:86
@ VERSION3
Definition XQilla.hpp:72
@ XQUERY3_FULLTEXT
Definition XQilla.hpp:81
@ XQUERY_UPDATE
Definition XQilla.hpp:75
@ FULLTEXT
Definition XQilla.hpp:68
@ XQUERY_FULLTEXT
Definition XQilla.hpp:74
@ XQUERY3_FULLTEXT_UPDATE
Definition XQilla.hpp:83
@ XSLT3_FULLTEXT
Definition XQilla.hpp:87
@ XQUERY_FULLTEXT_UPDATE
Definition XQilla.hpp:76
@ XPATH2_FULLTEXT
Definition XQilla.hpp:77
@ XSLT2_FULLTEXT
Definition XQilla.hpp:78
@ XQUERY3_UPDATE
Definition XQilla.hpp:82
@ XPATH2
Definition XQilla.hpp:67
@ XQUERY3
Definition XQilla.hpp:80
@ XSLT2
Definition XQilla.hpp:71
@ UPDATE
Definition XQilla.hpp:69
@ XPATH3_FULLTEXT
Definition XQilla.hpp:85
friend class DelayedFuncFactory
Definition XQilla.hpp:203
static XQQuery * parse(const xercesc::InputSource &querySrc, DynamicContext *context=0, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager, XQQuery *result=0)
Parse the expression from the given InputSource.
XQilla(xercesc::MemoryManager *memMgr=0)
Constructs the object.
A single input source for an XML entity.
Definition InputSource.hpp:63
Definition XQilla.hpp:41
void compile(const XMLCh *queryFile)