XQuilla/docs/simple-api/classXQQuery.html
2020-02-17 22:12:51 +01:00

703 lines
36 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&amp;type=2" border="0" alt="SourceForge.net Logo" /></a>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<h1>XQQuery Class Reference</h1><!-- doxytag: class="XQQuery" --><!-- doxytag: inherits="xercesc::XMemory" -->Encapsulates a query expression.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="XQQuery_8hpp-source.html">XQQuery.hpp</a>&gt;</code>
<p>
Inheritance diagram for XQQuery:<p><center><img src="classXQQuery__inherit__graph.png" border="0" usemap="#XQQuery__inherit__map" alt="Inheritance graph"></center>
<map name="XQQuery__inherit__map">
<area href="classxercesc_1_1XMemory.html" shape="rect" coords="5,7,152,31" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classXQQuery-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#558d8ab3c8ef625b17229d72c1b80cd9">~XQQuery</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <a href="#558d8ab3c8ef625b17229d72c1b80cd9"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Runtime Methods</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classDynamicContext.html">DynamicContext</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#68f71c65e73908cedd38de97beb77700">createDynamicContext</a> (<a class="el" href="classxercesc_1_1MemoryManager.html">xercesc::MemoryManager</a> *memMgr=<a class="el" href="classxercesc_1_1XMLPlatformUtils.html#2521473ea52894e9313573d330a264b4">xercesc::XMLPlatformUtils::fgMemoryManager</a>) const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classDynamicContext.html">DynamicContext</a> based on the static context used to parse this query. <a href="#68f71c65e73908cedd38de97beb77700"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classResult.html">Result</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#ffbf99765f1a17407bda19016f5c11c1">execute</a> (<a class="el" href="classDynamicContext.html">DynamicContext</a> *context) const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes the query using the given <a class="el" href="classDynamicContext.html">DynamicContext</a>, returning a lazy iterator over the results. <a href="#ffbf99765f1a17407bda19016f5c11c1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#90fe8c26e427c3c528217ae0c52ddb3f">execute</a> (<a class="el" href="classEventHandler.html">EventHandler</a> *events, <a class="el" href="classDynamicContext.html">DynamicContext</a> *context) const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes the query using the given <a class="el" href="classDynamicContext.html">DynamicContext</a>, sending the output of the query to the given <a class="el" href="classEventHandler.html">EventHandler</a>. <a href="#90fe8c26e427c3c528217ae0c52ddb3f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#ebb1ab3434751cf96b4f10aabfd48bdd">staticResolution</a> (<a class="el" href="classStaticContext.html">StaticContext</a> *context=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform static resolution on the query. <a href="#ebb1ab3434751cf96b4f10aabfd48bdd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#be1fdd354e3dd08c3b79c5cea0146b29">staticTyping</a> (<a class="el" href="classStaticContext.html">StaticContext</a> *context=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform type calculation and related optimizations. <a href="#be1fdd354e3dd08c3b79c5cea0146b29"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Query Information</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#bbfa213cdaec0985d712c0a0ec49cd7a">getQueryText</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the expression that was parsed to create this <a class="el" href="classXQQuery.html">XQQuery</a> object. <a href="#bbfa213cdaec0985d712c0a0ec49cd7a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#1fbf4b07ef2399f0db123cbb60e865de">getQueryPlan</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the query plan as XML. This is designed for debug and informative purposes only. <a href="#1fbf4b07ef2399f0db123cbb60e865de"></a><br></td></tr>
<tr><td colspan="2"><div class="groupHeader">Getters and Setters</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ASTNode *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#a508a6024d1b0b09d5f9a4f81f08f74e">getQueryBody</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the query body as an ASTNode. <a href="#a508a6024d1b0b09d5f9a4f81f08f74e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#23208ecb2a66ea1437e8185dc90fc45b">setQueryBody</a> (ASTNode *query)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the query body to an ASTNode. <a href="#23208ecb2a66ea1437e8185dc90fc45b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#b876c486d751acb92e6ee62d78c3175a">addFunction</a> (XQUserFunction *fnDef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds an XQUserFunction to the query. <a href="#b876c486d751acb92e6ee62d78c3175a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="XQQuery_8hpp.html#120407438cc6ede3bc7b57aae806741c">UserFunctions</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#b2f02aae9a68cb9d73006297d6a87fb8">getFunctions</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a vector of all XQUserFunction objects from the query. <a href="#b2f02aae9a68cb9d73006297d6a87fb8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#b11bb071fc6a34cc41a09d7a8f7922bb">addVariable</a> (XQGlobalVariable *varDef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a XQGlobalVariable to the query. <a href="#b11bb071fc6a34cc41a09d7a8f7922bb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="XQQuery_8hpp.html#9d2d5aa88c009aeb4423578b5665857a">GlobalVariables</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#50e591d0d38e627b5af9639fb2c5e637">getVariables</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a vector of all XQGlobalVariable objects from the query. <a href="#50e591d0d38e627b5af9639fb2c5e637"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="XQQuery_8hpp.html#6bfc1be626a21b5f066df297e669fe9f">ImportedModules</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#25efa228ae8c010dc45253036a23bf75">getImportedModules</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a vector of all XQGlobalVariable objects from the query. <a href="#25efa228ae8c010dc45253036a23bf75"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#12d873ad2c2ae1c1312b3fd3cdb4896a">getFile</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the name of the file that this query was parsed from. <a href="#12d873ad2c2ae1c1312b3fd3cdb4896a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#a4526a237851b8c144b06010486dc646">setFile</a> (const XMLCh *file)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the name of the file that this query was parsed from. <a href="#a4526a237851b8c144b06010486dc646"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classDynamicContext.html">DynamicContext</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#07159e0013722c33ae6c38a2e2ae99e4">getStaticContext</a> () const</td></tr>
<tr><td colspan="2"><div class="groupHeader">Module Methods</div></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#be331cfc9433f276b52d9b76290eb456">setIsLibraryModule</a> (bool bIsModule=true)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets whether this query is a module or not. <a href="#be331cfc9433f276b52d9b76290eb456"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#6868b645bc04ae7507043ad2eb43e3ae">getIsLibraryModule</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether this query is a module or not. <a href="#6868b645bc04ae7507043ad2eb43e3ae"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#9ac6a0983cc3f7352b9a1f0d87bfaf6d">setModuleTargetNamespace</a> (const XMLCh *uri)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the module target namespace for this query. <a href="#9ac6a0983cc3f7352b9a1f0d87bfaf6d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const XMLCh *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#260968e5b682fa76f885591c27961706">getModuleTargetNamespace</a> () const</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the module taget namespace for this query. <a href="#260968e5b682fa76f885591c27961706"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXQQuery.html#9510ef9d81445feec067395efac4dd33">importModule</a> (const XMLCh *szUri, VectorOfStrings *locations, <a class="el" href="classStaticContext.html">StaticContext</a> *context, const LocationInfo *location)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a module import from the given target namespace and locations. <a href="#9510ef9d81445feec067395efac4dd33"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>QueryResult</b></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Top level lazy result iterator. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Encapsulates a query expression.
<p>
<a class="el" href="classXQQuery.html">XQQuery</a> objects are thread safe, and can be executed from multiple threads at the same time - provided a <a class="el" href="classDynamicContext.html">DynamicContext</a> is used per thread.<p>
Instances of this class can be created by using the parsing methods on the <a class="el" href="classXQilla.html">XQilla</a> object.<p>
This class is dependant on the <a class="el" href="classDynamicContext.html">DynamicContext</a> that was used to create it. This context must not be deleted before the <a class="el" href="classXQQuery.html">XQQuery</a> object. Normally this is acheived by the <a class="el" href="classXQQuery.html">XQQuery</a> adopting the <a class="el" href="classDynamicContext.html">DynamicContext</a> and deleting it when it is deleted. However, this behaviour can be disabled by using the <a class="el" href="classXQilla.html#7fbc185e109c8ce3da425054685e8ba199bed3057d85109e34e9f536c30dc514">XQilla::NO_ADOPT_CONTEXT</a> flag when creating the <a class="el" href="classXQQuery.html">XQQuery</a>.
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="558d8ab3c8ef625b17229d72c1b80cd9"></a><!-- doxytag: member="XQQuery::~XQQuery" ref="558d8ab3c8ef625b17229d72c1b80cd9" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">XQQuery::~XQQuery </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Destructor.
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="68f71c65e73908cedd38de97beb77700"></a><!-- doxytag: member="XQQuery::createDynamicContext" ref="68f71c65e73908cedd38de97beb77700" args="(xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classDynamicContext.html">DynamicContext</a>* XQQuery::createDynamicContext </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classxercesc_1_1MemoryManager.html">xercesc::MemoryManager</a> *&nbsp;</td>
<td class="paramname"> <em>memMgr</em> = <code><a class="el" href="classxercesc_1_1XMLPlatformUtils.html#2521473ea52894e9313573d330a264b4">xercesc::XMLPlatformUtils::fgMemoryManager</a></code> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a <a class="el" href="classDynamicContext.html">DynamicContext</a> based on the static context used to parse this query.
<p>
This <a class="el" href="classDynamicContext.html">DynamicContext</a> will be suitable for using to call <a class="el" href="classXQQuery.html#ffbf99765f1a17407bda19016f5c11c1">execute()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>memMgr</em>&nbsp;</td><td>The memory manager used to create the <a class="el" href="classDynamicContext.html">DynamicContext</a>.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>An implementation of <a class="el" href="classDynamicContext.html">DynamicContext</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="ffbf99765f1a17407bda19016f5c11c1"></a><!-- doxytag: member="XQQuery::execute" ref="ffbf99765f1a17407bda19016f5c11c1" args="(DynamicContext *context) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classResult.html">Result</a> XQQuery::execute </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classDynamicContext.html">DynamicContext</a> *&nbsp;</td>
<td class="paramname"> <em>context</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Executes the query using the given <a class="el" href="classDynamicContext.html">DynamicContext</a>, returning a lazy iterator over the results.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>The <a class="el" href="classDynamicContext.html">DynamicContext</a> to use to execute the query. This contains runtime values for variables, the value of the context item, and other relevent information.</td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The <a class="el" href="classResult.html">Result</a> object - a lazy iterator over the query results.</dd></dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXQException.html">XQException</a></em>&nbsp;</td><td>If a runtime error occurs </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="90fe8c26e427c3c528217ae0c52ddb3f"></a><!-- doxytag: member="XQQuery::execute" ref="90fe8c26e427c3c528217ae0c52ddb3f" args="(EventHandler *events, DynamicContext *context) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::execute </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classEventHandler.html">EventHandler</a> *&nbsp;</td>
<td class="paramname"> <em>events</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classDynamicContext.html">DynamicContext</a> *&nbsp;</td>
<td class="paramname"> <em>context</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Executes the query using the given <a class="el" href="classDynamicContext.html">DynamicContext</a>, sending the output of the query to the given <a class="el" href="classEventHandler.html">EventHandler</a>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>The <a class="el" href="classDynamicContext.html">DynamicContext</a> to use to execute the query. This contains runtime values for variables, the value of the context item, and other relevent information.</td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXQException.html">XQException</a></em>&nbsp;</td><td>If a runtime error occurs </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="ebb1ab3434751cf96b4f10aabfd48bdd"></a><!-- doxytag: member="XQQuery::staticResolution" ref="ebb1ab3434751cf96b4f10aabfd48bdd" args="(StaticContext *context=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::staticResolution </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classStaticContext.html">StaticContext</a> *&nbsp;</td>
<td class="paramname"> <em>context</em> = <code>0</code> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform static resolution on the query.
<p>
This operation is not thread safe, and should only be performed once.<p>
Static reolution resolves prefixes to namespace URIs, variable names to variables, function names to functions, and performs some basic query optimisation.<p>
Normally this is done as part of parsing the query expression. However, if the <a class="el" href="classXQilla.html#7fbc185e109c8ce3da425054685e8ba13629b3bfdf036418daad522664441e9d">XQilla::NO_STATIC_RESOLUTION</a> flag was specified when the query was parsed, this method will have to be called to perform this step manually.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>If specified, the <a class="el" href="classStaticContext.html">StaticContext</a> to use to statically resolve this object. By default, the context used to parse the query is used. This should not need to be changed under normal usage.</td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXQException.html">XQException</a></em>&nbsp;</td><td>If a static resolution time error occurs </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="be1fdd354e3dd08c3b79c5cea0146b29"></a><!-- doxytag: member="XQQuery::staticTyping" ref="be1fdd354e3dd08c3b79c5cea0146b29" args="(StaticContext *context=0)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::staticTyping </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classStaticContext.html">StaticContext</a> *&nbsp;</td>
<td class="paramname"> <em>context</em> = <code>0</code> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform type calculation and related optimizations.
<p>
This operation is safe to call multiple times.<p>
Normally this step is done as part of static resolution.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>If specified, the <a class="el" href="classStaticContext.html">StaticContext</a> to use to statically resolve this object. By default, the context used to parse the query is used. This should not need to be changed under normal usage.</td></tr>
</table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXQException.html">XQException</a></em>&nbsp;</td><td>If a static resolution time error occurs </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="bbfa213cdaec0985d712c0a0ec49cd7a"></a><!-- doxytag: member="XQQuery::getQueryText" ref="bbfa213cdaec0985d712c0a0ec49cd7a" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const XMLCh* XQQuery::getQueryText </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the expression that was parsed to create this <a class="el" href="classXQQuery.html">XQQuery</a> object.
<p>
</div>
</div><p>
<a class="anchor" name="1fbf4b07ef2399f0db123cbb60e865de"></a><!-- doxytag: member="XQQuery::getQueryPlan" ref="1fbf4b07ef2399f0db123cbb60e865de" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string XQQuery::getQueryPlan </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the query plan as XML. This is designed for debug and informative purposes only.
<p>
</div>
</div><p>
<a class="anchor" name="a508a6024d1b0b09d5f9a4f81f08f74e"></a><!-- doxytag: member="XQQuery::getQueryBody" ref="a508a6024d1b0b09d5f9a4f81f08f74e" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ASTNode* XQQuery::getQueryBody </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the query body as an ASTNode.
<p>
</div>
</div><p>
<a class="anchor" name="23208ecb2a66ea1437e8185dc90fc45b"></a><!-- doxytag: member="XQQuery::setQueryBody" ref="23208ecb2a66ea1437e8185dc90fc45b" args="(ASTNode *query)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::setQueryBody </td>
<td>(</td>
<td class="paramtype">ASTNode *&nbsp;</td>
<td class="paramname"> <em>query</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the query body to an ASTNode.
<p>
</div>
</div><p>
<a class="anchor" name="b876c486d751acb92e6ee62d78c3175a"></a><!-- doxytag: member="XQQuery::addFunction" ref="b876c486d751acb92e6ee62d78c3175a" args="(XQUserFunction *fnDef)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::addFunction </td>
<td>(</td>
<td class="paramtype">XQUserFunction *&nbsp;</td>
<td class="paramname"> <em>fnDef</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds an XQUserFunction to the query.
<p>
</div>
</div><p>
<a class="anchor" name="b2f02aae9a68cb9d73006297d6a87fb8"></a><!-- doxytag: member="XQQuery::getFunctions" ref="b2f02aae9a68cb9d73006297d6a87fb8" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="XQQuery_8hpp.html#120407438cc6ede3bc7b57aae806741c">UserFunctions</a>&amp; XQQuery::getFunctions </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns a vector of all XQUserFunction objects from the query.
<p>
</div>
</div><p>
<a class="anchor" name="b11bb071fc6a34cc41a09d7a8f7922bb"></a><!-- doxytag: member="XQQuery::addVariable" ref="b11bb071fc6a34cc41a09d7a8f7922bb" args="(XQGlobalVariable *varDef)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::addVariable </td>
<td>(</td>
<td class="paramtype">XQGlobalVariable *&nbsp;</td>
<td class="paramname"> <em>varDef</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds a XQGlobalVariable to the query.
<p>
</div>
</div><p>
<a class="anchor" name="50e591d0d38e627b5af9639fb2c5e637"></a><!-- doxytag: member="XQQuery::getVariables" ref="50e591d0d38e627b5af9639fb2c5e637" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="XQQuery_8hpp.html#9d2d5aa88c009aeb4423578b5665857a">GlobalVariables</a>&amp; XQQuery::getVariables </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns a vector of all XQGlobalVariable objects from the query.
<p>
</div>
</div><p>
<a class="anchor" name="25efa228ae8c010dc45253036a23bf75"></a><!-- doxytag: member="XQQuery::getImportedModules" ref="25efa228ae8c010dc45253036a23bf75" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="XQQuery_8hpp.html#6bfc1be626a21b5f066df297e669fe9f">ImportedModules</a>&amp; XQQuery::getImportedModules </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns a vector of all XQGlobalVariable objects from the query.
<p>
</div>
</div><p>
<a class="anchor" name="12d873ad2c2ae1c1312b3fd3cdb4896a"></a><!-- doxytag: member="XQQuery::getFile" ref="12d873ad2c2ae1c1312b3fd3cdb4896a" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const XMLCh* XQQuery::getFile </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the name of the file that this query was parsed from.
<p>
</div>
</div><p>
<a class="anchor" name="a4526a237851b8c144b06010486dc646"></a><!-- doxytag: member="XQQuery::setFile" ref="a4526a237851b8c144b06010486dc646" args="(const XMLCh *file)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::setFile </td>
<td>(</td>
<td class="paramtype">const XMLCh *&nbsp;</td>
<td class="paramname"> <em>file</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the name of the file that this query was parsed from.
<p>
</div>
</div><p>
<a class="anchor" name="07159e0013722c33ae6c38a2e2ae99e4"></a><!-- doxytag: member="XQQuery::getStaticContext" ref="07159e0013722c33ae6c38a2e2ae99e4" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classDynamicContext.html">DynamicContext</a>* XQQuery::getStaticContext </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="be331cfc9433f276b52d9b76290eb456"></a><!-- doxytag: member="XQQuery::setIsLibraryModule" ref="be331cfc9433f276b52d9b76290eb456" args="(bool bIsModule=true)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::setIsLibraryModule </td>
<td>(</td>
<td class="paramtype">bool&nbsp;</td>
<td class="paramname"> <em>bIsModule</em> = <code>true</code> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets whether this query is a module or not.
<p>
</div>
</div><p>
<a class="anchor" name="6868b645bc04ae7507043ad2eb43e3ae"></a><!-- doxytag: member="XQQuery::getIsLibraryModule" ref="6868b645bc04ae7507043ad2eb43e3ae" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool XQQuery::getIsLibraryModule </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns whether this query is a module or not.
<p>
</div>
</div><p>
<a class="anchor" name="9ac6a0983cc3f7352b9a1f0d87bfaf6d"></a><!-- doxytag: member="XQQuery::setModuleTargetNamespace" ref="9ac6a0983cc3f7352b9a1f0d87bfaf6d" args="(const XMLCh *uri)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::setModuleTargetNamespace </td>
<td>(</td>
<td class="paramtype">const XMLCh *&nbsp;</td>
<td class="paramname"> <em>uri</em> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the module target namespace for this query.
<p>
</div>
</div><p>
<a class="anchor" name="260968e5b682fa76f885591c27961706"></a><!-- doxytag: member="XQQuery::getModuleTargetNamespace" ref="260968e5b682fa76f885591c27961706" args="() const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const XMLCh* XQQuery::getModuleTargetNamespace </td>
<td>(</td>
<td class="paramname"> </td>
<td>&nbsp;)&nbsp;</td>
<td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets the module taget namespace for this query.
<p>
</div>
</div><p>
<a class="anchor" name="9510ef9d81445feec067395efac4dd33"></a><!-- doxytag: member="XQQuery::importModule" ref="9510ef9d81445feec067395efac4dd33" args="(const XMLCh *szUri, VectorOfStrings *locations, StaticContext *context, const LocationInfo *location)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void XQQuery::importModule </td>
<td>(</td>
<td class="paramtype">const XMLCh *&nbsp;</td>
<td class="paramname"> <em>szUri</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">VectorOfStrings *&nbsp;</td>
<td class="paramname"> <em>locations</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classStaticContext.html">StaticContext</a> *&nbsp;</td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const LocationInfo *&nbsp;</td>
<td class="paramname"> <em>location</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Performs a module import from the given target namespace and locations.
<p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="XQQuery_8hpp-source.html">XQQuery.hpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Wed Dec 12 20:17:00 2007 for XQilla Simple API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>