164 lines
13 KiB
HTML
164 lines
13 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>XQilla Simple API Documentation</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<a style="float:right;" href="http://sourceforge.net/projects/xqilla"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=152021&type=2" border="0" alt="SourceForge.net Logo" /></a>
|
|
<!-- Generated by Doxygen 1.3.9.1 -->
|
|
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="examples.html">Examples</a></div>
|
|
<div class="nav">
|
|
<a class="el" href="dir_000000.html">include</a> / <a class="el" href="dir_000001.html">xqilla</a> / <a class="el" href="dir_000021.html">simple-api</a></div>
|
|
<h1>XQQuery.hpp</h1><a href="XQQuery_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
|
|
00002 <span class="comment"> * Copyright (c) 2001-2008</span>
|
|
00003 <span class="comment"> * DecisionSoft Limited. All rights reserved.</span>
|
|
00004 <span class="comment"> * Copyright (c) 2004-2008</span>
|
|
00005 <span class="comment"> * Oracle. All rights reserved.</span>
|
|
00006 <span class="comment"> *</span>
|
|
00007 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
|
|
00008 <span class="comment"> * you may not use this file except in compliance with the License.</span>
|
|
00009 <span class="comment"> * You may obtain a copy of the License at</span>
|
|
00010 <span class="comment"> *</span>
|
|
00011 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span>
|
|
00012 <span class="comment"> *</span>
|
|
00013 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
|
|
00014 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
|
|
00015 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
|
|
00016 <span class="comment"> * See the License for the specific language governing permissions and</span>
|
|
00017 <span class="comment"> * limitations under the License.</span>
|
|
00018 <span class="comment"> *</span>
|
|
00019 <span class="comment"> * $Id: XQQuery.hpp 690 2008-11-28 17:42:43Z jpcs $</span>
|
|
00020 <span class="comment"> */</span>
|
|
00021
|
|
00022 <span class="preprocessor">#ifndef XQQUERY_HPP</span>
|
|
00023 <span class="preprocessor"></span><span class="preprocessor">#define XQQUERY_HPP</span>
|
|
00024 <span class="preprocessor"></span>
|
|
00025 <span class="preprocessor">#include <xqilla/framework/XQillaExport.hpp></span>
|
|
00026 <span class="preprocessor">#include <vector></span>
|
|
00027 <span class="preprocessor">#include <string></span>
|
|
00028 <span class="preprocessor">#include <<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>></span>
|
|
00029 <span class="preprocessor">#include <<a class="code" href="InputSource_8hpp.html">xercesc/sax/InputSource.hpp</a>></span>
|
|
00030 <span class="preprocessor">#include <<a class="code" href="ResultImpl_8hpp.html">xqilla/runtime/ResultImpl.hpp</a>></span>
|
|
00031 <span class="preprocessor">#include <xqilla/runtime/LazySequenceResult.hpp></span>
|
|
00032 <span class="preprocessor">#include <<a class="code" href="StaticContext_8hpp.html">xqilla/context/StaticContext.hpp</a>></span>
|
|
00033
|
|
00034 <span class="keyword">class </span><a class="code" href="classDynamicContext.html">DynamicContext</a>;
|
|
00035 <span class="keyword">class </span>XQUserFunction;
|
|
00036 <span class="keyword">class </span>XQGlobalVariable;
|
|
00037 <span class="keyword">class </span>XQUserFunctionInstance;
|
|
00038 <span class="keyword">class </span><a class="code" href="classXQQuery.html">XQQuery</a>;
|
|
00039
|
|
<a name="l00040"></a><a class="code" href="XQQuery_8hpp.html#a0">00040</a> <span class="keyword">typedef</span> std::vector<XQGlobalVariable*, XQillaAllocator<XQGlobalVariable*> > GlobalVariables;
|
|
<a name="l00041"></a><a class="code" href="XQQuery_8hpp.html#a1">00041</a> <span class="keyword">typedef</span> std::vector<XQQuery*, XQillaAllocator<XQQuery*> > ImportedModules;
|
|
00042
|
|
<a name="l00057"></a><a class="code" href="classXQQuery.html">00057</a> <span class="keyword">class </span>XQILLA_API XQQuery : <span class="keyword">public</span> XERCES_CPP_NAMESPACE_QUALIFIER XMemory
|
|
00058 {
|
|
00059 <span class="keyword">public</span>:
|
|
00061 ~XQQuery();
|
|
00062
|
|
00064 <span class="comment">// @{</span>
|
|
00065
|
|
00074 <a class="code" href="classDynamicContext.html">DynamicContext</a> *createDynamicContext(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
|
|
00075 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager) <span class="keyword">const</span>;
|
|
00076
|
|
00090 <a class="code" href="classResult.html">Result</a> execute(<a class="code" href="classDynamicContext.html">DynamicContext</a>* context) <span class="keyword">const</span>;
|
|
00091
|
|
00106 <a class="code" href="classResult.html">Result</a> execute(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">Item::Ptr</a> &contextItem, <a class="code" href="classDynamicContext.html">DynamicContext</a> *context) <span class="keyword">const</span>;
|
|
00107
|
|
00123 <a class="code" href="classResult.html">Result</a> execute(<span class="keyword">const</span> XMLCh *templateQName, <a class="code" href="classDynamicContext.html">DynamicContext</a> *context) <span class="keyword">const</span>;
|
|
00124
|
|
00135 <span class="keywordtype">void</span> execute(<a class="code" href="classEventHandler.html">EventHandler</a> *events, <a class="code" href="classDynamicContext.html">DynamicContext</a>* context) <span class="keyword">const</span>;
|
|
00136
|
|
00148 <span class="keywordtype">void</span> execute(<a class="code" href="classEventHandler.html">EventHandler</a> *events, <span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">Item::Ptr</a> &contextItem, <a class="code" href="classDynamicContext.html">DynamicContext</a> *context) <span class="keyword">const</span>;
|
|
00149
|
|
00162 <span class="keywordtype">void</span> execute(<a class="code" href="classEventHandler.html">EventHandler</a> *events, <span class="keyword">const</span> XMLCh *templateQName, <a class="code" href="classDynamicContext.html">DynamicContext</a> *context) <span class="keyword">const</span>;
|
|
00163
|
|
00183 <span class="keywordtype">void</span> staticResolution(<a class="code" href="classStaticContext.html">StaticContext</a> *context = 0);
|
|
00184
|
|
00197 <span class="keywordtype">void</span> staticTyping(<a class="code" href="classStaticContext.html">StaticContext</a> *context = 0, StaticTyper *styper = 0);
|
|
00198
|
|
00200
|
|
00202 <span class="comment">// @{</span>
|
|
00203
|
|
00205 <span class="keyword">const</span> XMLCh* getQueryText() <span class="keyword">const</span>;
|
|
00206
|
|
00208 std::string getQueryPlan() <span class="keyword">const</span>;
|
|
00209
|
|
00211
|
|
00213 <span class="comment">// @{</span>
|
|
00214
|
|
00216 ASTNode* getQueryBody() <span class="keyword">const</span>;
|
|
00218 <span class="keywordtype">void</span> setQueryBody(ASTNode* query);
|
|
00219
|
|
00221 <span class="keywordtype">void</span> addFunction(XQUserFunction* fnDef);
|
|
<a name="l00223"></a><a class="code" href="classXQQuery.html#z9_3">00223</a> <span class="keyword">const</span> <a class="code" href="StaticContext_8hpp.html#a1">UserFunctions</a> &getFunctions()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_userDefFns; }
|
|
00224
|
|
00226 <span class="keywordtype">void</span> addVariable(XQGlobalVariable* varDef);
|
|
<a name="l00228"></a><a class="code" href="classXQQuery.html#z9_5">00228</a> <span class="keyword">const</span> <a class="code" href="XQQuery_8hpp.html#a0">GlobalVariables</a> &getVariables()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_userDefVars; }
|
|
00229
|
|
<a name="l00231"></a><a class="code" href="classXQQuery.html#z9_6">00231</a> <span class="keyword">const</span> <a class="code" href="XQQuery_8hpp.html#a1">ImportedModules</a> &getImportedModules()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_importedModules; }
|
|
00232
|
|
00234 <span class="keyword">const</span> XMLCh* getFile() <span class="keyword">const</span>;
|
|
00236 <span class="keywordtype">void</span> setFile(<span class="keyword">const</span> XMLCh* file);
|
|
00237
|
|
<a name="l00238"></a><a class="code" href="classXQQuery.html#z9_9">00238</a> <span class="keyword">const</span> <a class="code" href="classDynamicContext.html">DynamicContext</a> *getStaticContext()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_context; }
|
|
00239
|
|
00241
|
|
00243 <span class="comment">// @{</span>
|
|
00244
|
|
00246 <span class="keywordtype">void</span> setIsLibraryModule(<span class="keywordtype">bool</span> bIsModule=<span class="keyword">true</span>);
|
|
00248 <span class="keywordtype">bool</span> getIsLibraryModule() <span class="keyword">const</span>;
|
|
00250 <span class="keywordtype">void</span> setModuleTargetNamespace(<span class="keyword">const</span> XMLCh* uri);
|
|
00252 <span class="keyword">const</span> XMLCh* getModuleTargetNamespace() <span class="keyword">const</span>;
|
|
00254 <span class="keywordtype">void</span> importModule(<span class="keyword">const</span> XMLCh* szUri, VectorOfStrings* locations, <a class="code" href="classStaticContext.html">StaticContext</a>* context, <span class="keyword">const</span> <a class="code" href="classLocationInfo.html">LocationInfo</a> *location);
|
|
00255
|
|
00257
|
|
00258 <span class="keyword">private</span>:
|
|
00260 <span class="keyword">class </span>QueryResult : <span class="keyword">public</span> <a class="code" href="classResultImpl.html">ResultImpl</a>
|
|
00261 {
|
|
00262 <span class="keyword">public</span>:
|
|
00263 QueryResult(<span class="keyword">const</span> XQQuery *query);
|
|
00264
|
|
00265 <a class="code" href="classRefCountPointer.html">Item::Ptr</a> nextOrTail(<a class="code" href="classResult.html">Result</a> &tail, <a class="code" href="classDynamicContext.html">DynamicContext</a> *context);
|
|
00266
|
|
00267 <span class="keyword">private</span>:
|
|
00268 <span class="keyword">const</span> XQQuery *_query;
|
|
00269 };
|
|
00270
|
|
00271 <span class="keyword">private</span>:
|
|
00273 XQQuery(<span class="keyword">const</span> XMLCh* queryText, <a class="code" href="classDynamicContext.html">DynamicContext</a> *context, <span class="keywordtype">bool</span> contextOwned = <span class="keyword">false</span>,
|
|
00274 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
|
|
00275 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
|
|
00276
|
|
00277 XQQuery(<span class="keyword">const</span> XQQuery &);
|
|
00278 XQQuery &operator=(<span class="keyword">const</span> XQQuery &);
|
|
00279
|
|
00280 <span class="keywordtype">void</span> executeProlog(<a class="code" href="classDynamicContext.html">DynamicContext</a> *context) <span class="keyword">const</span>;
|
|
00281
|
|
00282 <span class="keyword">private</span>:
|
|
00284 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* m_memMgr;
|
|
00285
|
|
00287 <a class="code" href="classDynamicContext.html">DynamicContext</a> *m_context;
|
|
00288 <span class="keywordtype">bool</span> m_contextOwned;
|
|
00289
|
|
00290 ASTNode* m_query;
|
|
00291
|
|
00292 <span class="keywordtype">bool</span> m_bIsLibraryModule;
|
|
00293 <span class="keyword">const</span> XMLCh* m_szTargetNamespace;
|
|
00294 <span class="keyword">const</span> XMLCh* m_szQueryText;
|
|
00295 <span class="keyword">const</span> XMLCh* m_szCurrentFile;
|
|
00296
|
|
00297 <a class="code" href="StaticContext_8hpp.html#a1">UserFunctions</a> m_userDefFns;
|
|
00298 <a class="code" href="XQQuery_8hpp.html#a0">GlobalVariables</a> m_userDefVars;
|
|
00299 <a class="code" href="XQQuery_8hpp.html#a1">ImportedModules</a> m_importedModules;
|
|
00300
|
|
<a name="l00301"></a><a class="code" href="classXQQuery.html#n0">00301</a> <span class="keyword">friend</span> <span class="keyword">class </span>QueryResult;
|
|
<a name="l00302"></a><a class="code" href="classXQQuery.html#n1">00302</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classXQilla.html">XQilla</a>;
|
|
00303 };
|
|
00304
|
|
00305 <span class="preprocessor">#endif</span>
|
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Sep 25 06:55:26 2009 for XQilla Simple API by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
|
|
</body>
|
|
</html>
|