173 lines
16 KiB
HTML
173 lines
16 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: XQQuery.hpp Source File</title>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||
|
</head><body>
|
||
|
<!-- Generated by Doxygen 1.4.6 -->
|
||
|
<div class="tabs">
|
||
|
<ul>
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
||
|
<li><a href="classes.html"><span>Classes</span></a></li>
|
||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||
|
</ul></div>
|
||
|
<div class="tabs">
|
||
|
<ul>
|
||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
||
|
</ul></div>
|
||
|
<h1>XQQuery.hpp</h1><a href="XQQuery_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
|
||
|
<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 2001-2006</span>
|
||
|
<a name="l00003"></a>00003 <span class="comment"> * DecisionSoft Limited. All rights reserved.</span>
|
||
|
<a name="l00004"></a>00004 <span class="comment"> * Copyright (c) 2004-2006</span>
|
||
|
<a name="l00005"></a>00005 <span class="comment"> * Progress Software Corporation. All rights reserved.</span>
|
||
|
<a name="l00006"></a>00006 <span class="comment"> * Copyright (c) 2004-2006</span>
|
||
|
<a name="l00007"></a>00007 <span class="comment"> * Oracle. All rights reserved.</span>
|
||
|
<a name="l00008"></a>00008 <span class="comment"> *</span>
|
||
|
<a name="l00009"></a>00009 <span class="comment"> * See the file LICENSE for redistribution information.</span>
|
||
|
<a name="l00010"></a>00010 <span class="comment"> *</span>
|
||
|
<a name="l00011"></a>00011 <span class="comment"> * $Id: XQQuery.hpp,v 1.16 2006/11/01 16:37:17 jpcs Exp $</span>
|
||
|
<a name="l00012"></a>00012 <span class="comment"> */</span>
|
||
|
<a name="l00013"></a>00013
|
||
|
<a name="l00015"></a>00015 <span class="comment">// XQQuery.h: interface for the XQQuery class.</span>
|
||
|
<a name="l00017"></a>00017 <span class="comment"></span>
|
||
|
<a name="l00018"></a>00018 <span class="preprocessor">#if !defined(AFXQ_XQUERY_H__FAA9933A_2F10_49A4_93A2_857E2A8C48E3__INCLUDED_)</span>
|
||
|
<a name="l00019"></a><a class="code" href="XQQuery_8hpp.html#d3156bc0b04b5b668f7678232b477477">00019</a> <span class="preprocessor"></span><span class="preprocessor">#define AFXQ_XQUERY_H__FAA9933A_2F10_49A4_93A2_857E2A8C48E3__INCLUDED_</span>
|
||
|
<a name="l00020"></a>00020 <span class="preprocessor"></span>
|
||
|
<a name="l00021"></a>00021 <span class="preprocessor">#include <xqilla/framework/XQillaExport.hpp></span>
|
||
|
<a name="l00022"></a>00022 <span class="preprocessor">#include <vector></span>
|
||
|
<a name="l00023"></a>00023 <span class="preprocessor">#include <string></span>
|
||
|
<a name="l00024"></a>00024 <span class="preprocessor">#include <<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>></span>
|
||
|
<a name="l00025"></a>00025 <span class="preprocessor">#include <<a class="code" href="InputSource_8hpp.html">xercesc/sax/InputSource.hpp</a>></span>
|
||
|
<a name="l00026"></a>00026 <span class="preprocessor">#include <xqilla/runtime/ResultImpl.hpp></span>
|
||
|
<a name="l00027"></a>00027 <span class="preprocessor">#include <xqilla/runtime/LazySequenceResult.hpp></span>
|
||
|
<a name="l00028"></a>00028 <span class="preprocessor">#include <<a class="code" href="StaticContext_8hpp.html">xqilla/context/StaticContext.hpp</a>></span>
|
||
|
<a name="l00029"></a>00029
|
||
|
<a name="l00030"></a>00030 <span class="keyword">class </span><a class="code" href="classDynamicContext.html">DynamicContext</a>;
|
||
|
<a name="l00031"></a>00031 <span class="keyword">class </span>XQUserFunction;
|
||
|
<a name="l00032"></a>00032 <span class="keyword">class </span>XQGlobalVariable;
|
||
|
<a name="l00033"></a><a class="code" href="XQQuery_8hpp.html#120407438cc6ede3bc7b57aae806741c">00033</a> <span class="keyword">class </span><a class="code" href="classXQQuery.html">XQQuery</a>;
|
||
|
<a name="l00034"></a>00034
|
||
|
<a name="l00035"></a>00035 <span class="keyword">typedef</span> std::vector<XQUserFunction*, XQillaAllocator<XQUserFunction*> > <a class="code" href="XQQuery_8hpp.html#120407438cc6ede3bc7b57aae806741c">UserFunctions</a>;
|
||
|
<a name="l00036"></a><a class="code" href="XQQuery_8hpp.html#9d2d5aa88c009aeb4423578b5665857a">00036</a> <span class="keyword">typedef</span> std::vector<XQGlobalVariable*, XQillaAllocator<XQGlobalVariable*> > <a class="code" href="XQQuery_8hpp.html#9d2d5aa88c009aeb4423578b5665857a">GlobalVariables</a>;
|
||
|
<a name="l00037"></a><a class="code" href="XQQuery_8hpp.html#6bfc1be626a21b5f066df297e669fe9f">00037</a> <span class="keyword">typedef</span> std::vector<XQQuery*, XQillaAllocator<XQQuery*> > <a class="code" href="XQQuery_8hpp.html#6bfc1be626a21b5f066df297e669fe9f">ImportedModules</a>;
|
||
|
<a name="l00038"></a>00038
|
||
|
<a name="l00053"></a><a class="code" href="classXQQuery.html">00053</a> <span class="keyword">class </span>XQILLA_API <a class="code" href="classXQQuery.html">XQQuery</a> : <span class="keyword">public</span> XERCES_CPP_NAMESPACE_QUALIFIER XMemory
|
||
|
<a name="l00054"></a>00054 {
|
||
|
<a name="l00055"></a>00055 <span class="keyword">public</span>:
|
||
|
<a name="l00057"></a>00057 ~<a class="code" href="classXQQuery.html">XQQuery</a>();
|
||
|
<a name="l00058"></a>00058
|
||
|
<a name="l00060"></a>00060 <span class="comment">// @{</span>
|
||
|
<a name="l00061"></a>00061
|
||
|
<a name="l00070"></a>00070 <a class="code" href="classDynamicContext.html">DynamicContext</a> *createDynamicContext(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
|
||
|
<a name="l00071"></a>00071 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager) <span class="keyword">const</span>;
|
||
|
<a name="l00072"></a>00072
|
||
|
<a name="l00085"></a>00085 <a class="code" href="classResult.html">Result</a> execute(<a class="code" href="classDynamicContext.html">DynamicContext</a>* context) <span class="keyword">const</span>;
|
||
|
<a name="l00086"></a>00086
|
||
|
<a name="l00106"></a>00106 <span class="keywordtype">void</span> staticResolution(<a class="code" href="classStaticContext.html">StaticContext</a> *context = 0);
|
||
|
<a name="l00107"></a>00107
|
||
|
<a name="l00120"></a>00120 <span class="keywordtype">void</span> staticTyping(<a class="code" href="classStaticContext.html">StaticContext</a> *context = 0);
|
||
|
<a name="l00121"></a>00121
|
||
|
<a name="l00123"></a>00123
|
||
|
<a name="l00125"></a>00125 <span class="comment">// @{</span>
|
||
|
<a name="l00126"></a>00126
|
||
|
<a name="l00128"></a>00128 <span class="keyword">const</span> XMLCh* getQueryText() <span class="keyword">const</span>;
|
||
|
<a name="l00129"></a>00129
|
||
|
<a name="l00131"></a>00131 std::string getQueryPlan() <span class="keyword">const</span>;
|
||
|
<a name="l00132"></a>00132
|
||
|
<a name="l00134"></a>00134
|
||
|
<a name="l00136"></a>00136 <span class="comment">// @{</span>
|
||
|
<a name="l00137"></a>00137
|
||
|
<a name="l00139"></a>00139 ASTNode* getQueryBody() <span class="keyword">const</span>;
|
||
|
<a name="l00141"></a>00141 <span class="keywordtype">void</span> setQueryBody(ASTNode* query);
|
||
|
<a name="l00142"></a>00142
|
||
|
<a name="l00144"></a>00144 <span class="keywordtype">void</span> addFunction(XQUserFunction* fnDef);
|
||
|
<a name="l00146"></a><a class="code" href="classXQQuery.html#51732e054576e453c196b8bdad1582f5">00146</a> <span class="keyword">const</span> <a class="code" href="XQQuery_8hpp.html#120407438cc6ede3bc7b57aae806741c">UserFunctions</a> &getFunctions()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_userDefFns; }
|
||
|
<a name="l00147"></a>00147
|
||
|
<a name="l00149"></a>00149 <span class="keywordtype">void</span> addVariable(XQGlobalVariable* varDef);
|
||
|
<a name="l00151"></a><a class="code" href="classXQQuery.html#24b830095210a3c4846c82470942fd8a">00151</a> <span class="keyword">const</span> <a class="code" href="XQQuery_8hpp.html#9d2d5aa88c009aeb4423578b5665857a">GlobalVariables</a> &getVariables()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_userDefVars; }
|
||
|
<a name="l00152"></a>00152
|
||
|
<a name="l00154"></a><a class="code" href="classXQQuery.html#80b70ab66101dd2e938c942c466399a7">00154</a> <span class="keyword">const</span> <a class="code" href="XQQuery_8hpp.html#6bfc1be626a21b5f066df297e669fe9f">ImportedModules</a> &getImportedModules()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_importedModules; }
|
||
|
<a name="l00155"></a>00155
|
||
|
<a name="l00157"></a>00157 <span class="keyword">const</span> XMLCh* getFile() <span class="keyword">const</span>;
|
||
|
<a name="l00159"></a>00159 <span class="keywordtype">void</span> setFile(<span class="keyword">const</span> XMLCh* file);
|
||
|
<a name="l00160"></a>00160
|
||
|
<a name="l00161"></a><a class="code" href="classXQQuery.html#3a4c85183980a4802bb42fb20369774b">00161</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; }
|
||
|
<a name="l00162"></a>00162
|
||
|
<a name="l00164"></a>00164
|
||
|
<a name="l00166"></a>00166 <span class="comment">// @{</span>
|
||
|
<a name="l00167"></a>00167
|
||
|
<a name="l00169"></a>00169 <span class="keywordtype">void</span> setIsLibraryModule(<span class="keywordtype">bool</span> bIsModule=<span class="keyword">true</span>);
|
||
|
<a name="l00171"></a>00171 <span class="keywordtype">bool</span> getIsLibraryModule() <span class="keyword">const</span>;
|
||
|
<a name="l00173"></a>00173 <span class="keywordtype">void</span> setModuleTargetNamespace(<span class="keyword">const</span> XMLCh* uri);
|
||
|
<a name="l00175"></a>00175 <span class="keyword">const</span> XMLCh* getModuleTargetNamespace() <span class="keyword">const</span>;
|
||
|
<a name="l00177"></a>00177 <span class="keywordtype">void</span> importModule(<span class="keyword">const</span> XMLCh* szUri, VectorOfStrings* locations, <a class="code" href="classStaticContext.html">StaticContext</a>* context);
|
||
|
<a name="l00178"></a>00178
|
||
|
<a name="l00180"></a>00180
|
||
|
<a name="l00181"></a>00181 <span class="keyword">private</span>:
|
||
|
<a name="l00182"></a>00182 <span class="keywordtype">void</span> importModuleImpl(<span class="keyword">const</span> XMLCh* szUri, XERCES_CPP_NAMESPACE_QUALIFIER InputSource* location, <a class="code" href="classStaticContext.html">StaticContext</a>* context);
|
||
|
<a name="l00183"></a>00183
|
||
|
<a name="l00185"></a>00185 <span class="keyword">class </span>QueryResult : <span class="keyword">public</span> ResultImpl
|
||
|
<a name="l00186"></a>00186 {
|
||
|
<a name="l00187"></a>00187 <span class="keyword">public</span>:
|
||
|
<a name="l00188"></a>00188 QueryResult(<span class="keyword">const</span> <a class="code" href="classXQQuery.html">XQQuery</a> *query);
|
||
|
<a name="l00189"></a>00189
|
||
|
<a name="l00190"></a>00190 <a class="code" href="classRefCountPointer.html">Item::Ptr</a> next(<a class="code" href="classDynamicContext.html">DynamicContext</a> *context);
|
||
|
<a name="l00191"></a>00191 std::string asString(<a class="code" href="classDynamicContext.html">DynamicContext</a> *context, <span class="keywordtype">int</span> indent) <span class="keyword">const</span>;
|
||
|
<a name="l00192"></a>00192
|
||
|
<a name="l00193"></a>00193 <span class="keyword">private</span>:
|
||
|
<a name="l00194"></a>00194 <span class="keyword">const</span> <a class="code" href="classXQQuery.html">XQQuery</a> *_query;
|
||
|
<a name="l00195"></a>00195 <a class="code" href="classResult.html">Result</a> _parent;
|
||
|
<a name="l00196"></a>00196 <span class="keywordtype">bool</span> _toDo;
|
||
|
<a name="l00197"></a>00197 };
|
||
|
<a name="l00198"></a>00198
|
||
|
<a name="l00200"></a>00200 <span class="keyword">class </span>DebugResult : <span class="keyword">public</span> LazySequenceResult
|
||
|
<a name="l00201"></a>00201 {
|
||
|
<a name="l00202"></a>00202 <span class="keyword">public</span>:
|
||
|
<a name="l00203"></a>00203 DebugResult(<span class="keyword">const</span> <a class="code" href="classXQQuery.html">XQQuery</a> *query, <a class="code" href="classDynamicContext.html">DynamicContext</a> *context);
|
||
|
<a name="l00204"></a>00204
|
||
|
<a name="l00205"></a>00205 <span class="keywordtype">void</span> getResult(<a class="code" href="classSequence.html">Sequence</a> &toFill, <a class="code" href="classDynamicContext.html">DynamicContext</a> *context) <span class="keyword">const</span>;
|
||
|
<a name="l00206"></a>00206 std::string asString(<a class="code" href="classDynamicContext.html">DynamicContext</a> *context, <span class="keywordtype">int</span> indent) <span class="keyword">const</span>;
|
||
|
<a name="l00207"></a>00207
|
||
|
<a name="l00208"></a>00208 <span class="keyword">private</span>:
|
||
|
<a name="l00209"></a>00209 <span class="keyword">const</span> <a class="code" href="classXQQuery.html">XQQuery</a> *_query;
|
||
|
<a name="l00210"></a>00210 };
|
||
|
<a name="l00211"></a>00211
|
||
|
<a name="l00212"></a>00212 <span class="keyword">private</span>:
|
||
|
<a name="l00214"></a>00214 <a class="code" href="classXQQuery.html">XQQuery</a>(<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>,
|
||
|
<a name="l00215"></a>00215 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
|
||
|
<a name="l00216"></a>00216 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
|
||
|
<a name="l00217"></a>00217
|
||
|
<a name="l00218"></a>00218 <a class="code" href="classXQQuery.html">XQQuery</a>(<span class="keyword">const</span> <a class="code" href="classXQQuery.html">XQQuery</a> &);
|
||
|
<a name="l00219"></a>00219 <a class="code" href="classXQQuery.html">XQQuery</a> &operator=(<span class="keyword">const</span> <a class="code" href="classXQQuery.html">XQQuery</a> &);
|
||
|
<a name="l00220"></a>00220
|
||
|
<a name="l00221"></a>00221 <span class="keyword">private</span>:
|
||
|
<a name="l00223"></a>00223 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* m_memMgr;
|
||
|
<a name="l00224"></a>00224
|
||
|
<a name="l00226"></a>00226 <a class="code" href="classDynamicContext.html">DynamicContext</a> *m_context;
|
||
|
<a name="l00227"></a>00227 <span class="keywordtype">bool</span> m_contextOwned;
|
||
|
<a name="l00228"></a>00228
|
||
|
<a name="l00229"></a>00229 ASTNode* m_query;
|
||
|
<a name="l00230"></a>00230
|
||
|
<a name="l00231"></a>00231 <span class="keywordtype">bool</span> m_bIsLibraryModule;
|
||
|
<a name="l00232"></a>00232 <span class="keyword">const</span> XMLCh* m_szTargetNamespace;
|
||
|
<a name="l00233"></a>00233 <span class="keyword">const</span> XMLCh* m_szQueryText;
|
||
|
<a name="l00234"></a>00234 <span class="keyword">const</span> XMLCh* m_szCurrentFile;
|
||
|
<a name="l00235"></a>00235
|
||
|
<a name="l00236"></a>00236 <a class="code" href="XQQuery_8hpp.html#120407438cc6ede3bc7b57aae806741c">UserFunctions</a> m_userDefFns;
|
||
|
<a name="l00237"></a>00237 <a class="code" href="XQQuery_8hpp.html#9d2d5aa88c009aeb4423578b5665857a">GlobalVariables</a> m_userDefVars;
|
||
|
<a name="l00238"></a>00238 <a class="code" href="XQQuery_8hpp.html#6bfc1be626a21b5f066df297e669fe9f">ImportedModules</a> m_importedModules;
|
||
|
<a name="l00239"></a>00239
|
||
|
<a name="l00240"></a><a class="code" href="classXQQuery.html#88a4d20f5007ef053c45a8bacf5b8008">00240</a> <span class="keyword">friend</span> <span class="keyword">class </span>QueryResult;
|
||
|
<a name="l00241"></a><a class="code" href="classXQQuery.html#93d663763a1cfa8a1e81cfca86459ba1">00241</a> <span class="keyword">friend</span> <span class="keyword">class </span>DebugResult;
|
||
|
<a name="l00242"></a><a class="code" href="classXQQuery.html#714edbeddd5c2a4c2d9120c7d2e6922c">00242</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classXQilla.html">XQilla</a>;
|
||
|
<a name="l00243"></a>00243 };
|
||
|
<a name="l00244"></a>00244
|
||
|
<a name="l00245"></a>00245 <span class="preprocessor">#endif // !defined(AFXQ_XQUERY_H__FAA9933A_2F10_49A4_93A2_857E2A8C48E3__INCLUDED_)</span>
|
||
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Dec 12 00:18:56 2006 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.4.6 </small></address>
|
||
|
</body>
|
||
|
</html>
|