XQuilla/docs/simple-api/StaticContext_8hpp-source.html
2020-02-17 22:19:08 +01:00

209 lines
22 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.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="examples.html">Examples</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">include</a>&nbsp;/&nbsp;<a class="el" href="dir_000001.html">xqilla</a>&nbsp;/&nbsp;<a class="el" href="dir_000003.html">context</a></div>
<h1>StaticContext.hpp</h1><a href="StaticContext_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: StaticContext.hpp 659 2008-10-06 00:11:22Z jpcs $</span>
00020 <span class="comment"> */</span>
00021
00022 <span class="preprocessor">#ifndef _STATICCONTEXT_HPP</span>
00023 <span class="preprocessor"></span><span class="preprocessor">#define _STATICCONTEXT_HPP</span>
00024 <span class="preprocessor"></span>
00025 <span class="preprocessor">#include &lt;xqilla/framework/XQillaExport.hpp&gt;</span>
00026 <span class="preprocessor">#include &lt;<a class="code" href="XQilla_8hpp.html">xqilla/simple-api/XQilla.hpp</a>&gt;</span>
00027 <span class="preprocessor">#include &lt;time.h&gt;</span>
00028 <span class="preprocessor">#include &lt;<a class="code" href="DocumentCache_8hpp.html">xqilla/schema/DocumentCache.hpp</a>&gt;</span>
00029 <span class="preprocessor">#include &lt;<a class="code" href="PlatformUtils_8hpp.html">xercesc/util/PlatformUtils.hpp</a>&gt;</span>
00030 <span class="preprocessor">#include &lt;<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>&gt;</span>
00031
00032 <span class="keyword">class </span><a class="code" href="classDynamicContext.html">DynamicContext</a>;
00033 <span class="keyword">class </span><a class="code" href="classXPath2MemoryManager.html">XPath2MemoryManager</a>;
00034 <span class="keyword">class </span>FuncFactory;
00035 <span class="keyword">class </span>DatatypeFactory;
00036 <span class="keyword">class </span><a class="code" href="classCollation.html">Collation</a>;
00037 <span class="keyword">class </span><a class="code" href="classVariableTypeStore.html">VariableTypeStore</a>;
00038 <span class="keyword">class </span><a class="code" href="classItemFactory.html">ItemFactory</a>;
00039 <span class="keyword">class </span><a class="code" href="classStaticType.html">StaticType</a>;
00040 <span class="keyword">class </span><a class="code" href="classModuleResolver.html">ModuleResolver</a>;
00041 <span class="keyword">class </span><a class="code" href="classExternalFunctionResolver.html">ExternalFunctionResolver</a>;
00042 <span class="keyword">class </span><a class="code" href="classMessageListener.html">MessageListener</a>;
00043 <span class="keyword">class </span><a class="code" href="classExternalFunction.html">ExternalFunction</a>;
00044 <span class="keyword">class </span><a class="code" href="classXQillaConfiguration.html">XQillaConfiguration</a>;
00045 <span class="keyword">class </span>XQUserFunction;
00046 <span class="keyword">class </span>XQillaNSResolver;
00047
00048 <span class="comment">// Copied from ASTNode.hpp</span>
<a name="l00049"></a><a class="code" href="StaticContext_8hpp.html#a0">00049</a> <span class="keyword">typedef</span> std::vector&lt;ASTNode*,XQillaAllocator&lt;ASTNode*&gt; &gt; VectorOfASTNodes;
<a name="l00050"></a><a class="code" href="StaticContext_8hpp.html#a1">00050</a> <span class="keyword">typedef</span> std::vector&lt;XQUserFunction*, XQillaAllocator&lt;XQUserFunction*&gt; &gt; UserFunctions;
00051
00052 XERCES_CPP_NAMESPACE_BEGIN
00053 <span class="keyword">class </span>DOMDocument;
00054 <span class="keyword">class </span>DOMXPathNSResolver;
00055 <span class="keyword">class </span>XMLEntityResolver;
00056 XERCES_CPP_NAMESPACE_END
00057
<a name="l00059"></a><a class="code" href="classStaticContext.html">00059</a> <span class="keyword">class </span>XQILLA_API StaticContext : <span class="keyword">public</span> XERCES_CPP_NAMESPACE_QUALIFIER XMemory
00060 {
00061 <span class="keyword">public</span>:
<a name="l00062"></a><a class="code" href="classStaticContext.html#w6">00062</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
00063 ORDERING_ORDERED,
00064 ORDERING_UNORDERED
00065 } NodeSetOrdering;
00066
<a name="l00067"></a><a class="code" href="classStaticContext.html#w7">00067</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
00068 CONSTRUCTION_MODE_PRESERVE,
00069 CONSTRUCTION_MODE_STRIP
00070 } ConstructionMode;
00071
<a name="l00072"></a><a class="code" href="classStaticContext.html#w8">00072</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
00073 FLWOR_ORDER_EMPTY_GREATEST,
00074 FLWOR_ORDER_EMPTY_LEAST
00075 } FLWOROrderingMode;
00076
<a name="l00077"></a><a class="code" href="classStaticContext.html#a0">00077</a> <span class="keyword">virtual</span> ~StaticContext() {};
00078
00079 <span class="keyword">virtual</span> <a class="code" href="classDynamicContext.html">DynamicContext</a> *createModuleContext(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00080 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager) <span class="keyword">const </span>= 0;
00081 <span class="keyword">virtual</span> <a class="code" href="classDynamicContext.html">DynamicContext</a> *createDynamicContext(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00082 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager) <span class="keyword">const </span>= 0;
00083
00084 <span class="keyword">virtual</span> <a class="code" href="classDynamicContext.html">DynamicContext</a> *createDebugQueryContext(<span class="keyword">const</span> <a class="code" href="classRefCountPointer.html">Item::Ptr</a> &amp;contextItem,
00085 size_t contextPosition,
00086 size_t contextSize,
00087 <span class="keyword">const</span> <a class="code" href="classVariableStore.html">VariableStore</a> *variables,
00088 <span class="keyword">const</span> XERCES_CPP_NAMESPACE_QUALIFIER DOMXPathNSResolver *nsResolver,
00089 <span class="keyword">const</span> XMLCh *defaultElementNS,
00090 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00091 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager) <span class="keyword">const </span>= 0;
00092
00094 <span class="keyword">virtual</span> <a class="code" href="classXQillaConfiguration.html">XQillaConfiguration</a> *getConfiguration() <span class="keyword">const </span>= 0;
00095
00098 <span class="keyword">virtual</span> XQilla::Language getLanguage() <span class="keyword">const </span>= 0;
00099
00101 <span class="keyword">virtual</span> <a class="code" href="classItemFactory.html">ItemFactory</a> *getItemFactory() <span class="keyword">const </span>= 0;
00103 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setItemFactory(<a class="code" href="classItemFactory.html">ItemFactory</a> *factory) = 0;
00104
00106 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classStaticType.html">StaticType</a> &amp;getContextItemType() <span class="keyword">const </span>= 0;
00108 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setContextItemType(<span class="keyword">const</span> <a class="code" href="classStaticType.html">StaticType</a> &amp;st) = 0;
00109
00111 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getXPath1CompatibilityMode() <span class="keyword">const </span>= 0;
00113 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setXPath1CompatibilityMode(<span class="keywordtype">bool</span> newMode) = 0;
00114
00116 <span class="keyword">virtual</span> <span class="keyword">const</span> XERCES_CPP_NAMESPACE_QUALIFIER DOMXPathNSResolver* getNSResolver() <span class="keyword">const </span>= 0;
00119 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getUriBoundToPrefix(<span class="keyword">const</span> XMLCh* prefix, <span class="keyword">const</span> <a class="code" href="classLocationInfo.html">LocationInfo</a> *location = 0) <span class="keyword">const </span>= 0;
00122 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getPrefixBoundToUri(<span class="keyword">const</span> XMLCh* uri) <span class="keyword">const </span>= 0;
00124 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setNSResolver(<span class="keyword">const</span> XERCES_CPP_NAMESPACE_QUALIFIER DOMXPathNSResolver* resolver) = 0;
00126 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setNamespaceBinding(<span class="keyword">const</span> XMLCh* prefix, <span class="keyword">const</span> XMLCh* uri) = 0;
00127
00129 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getDefaultElementAndTypeNS() <span class="keyword">const </span>= 0;
00131 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setDefaultElementAndTypeNS(<span class="keyword">const</span> XMLCh* newNS) = 0;
00132
00134 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getDefaultFuncNS() <span class="keyword">const </span>= 0;
00136 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setDefaultFuncNS(<span class="keyword">const</span> XMLCh* newNS) = 0;
00137
00139 <span class="keyword">virtual</span> <a class="code" href="classDocumentCache.html">DocumentCache</a>* getDocumentCache() <span class="keyword">const </span>= 0;
00141 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setDocumentCache(<a class="code" href="classDocumentCache.html">DocumentCache</a>* docCache) = 0;
00142
00151 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isTypeOrDerivedFromType(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> uri, <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> typeName, <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> uriToCheck, <span class="keyword">const</span> XMLCh* <span class="keyword">const</span> typeNameToCheck) <span class="keyword">const </span>= 0;
00157 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setXMLEntityResolver(XERCES_CPP_NAMESPACE_QUALIFIER XMLEntityResolver* <span class="keyword">const</span> handler) = 0;
00159 <span class="keyword">virtual</span> XERCES_CPP_NAMESPACE_QUALIFIER XMLEntityResolver* getXMLEntityResolver() <span class="keyword">const </span>= 0;
00160
00162 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setModuleResolver(<a class="code" href="classModuleResolver.html">ModuleResolver</a> *resolver) = 0;
00164 <span class="keyword">virtual</span> <a class="code" href="classModuleResolver.html">ModuleResolver</a> *getModuleResolver() <span class="keyword">const </span>= 0;
00165 <span class="comment">/* Retrieve a list of locations for the given module URI */</span>
00166 <span class="keyword">virtual</span> <a class="code" href="DocumentCache_8hpp.html#a0">VectorOfStrings</a>* resolveModuleURI(<span class="keyword">const</span> XMLCh* uri) <span class="keyword">const </span>= 0;
00167
00169 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addSchemaLocation(<span class="keyword">const</span> XMLCh* uri, VectorOfStrings* locations, <span class="keyword">const</span> <a class="code" href="classLocationInfo.html">LocationInfo</a> *location = 0) = 0;
00170
00172 <span class="keyword">virtual</span> <a class="code" href="classVariableTypeStore.html">VariableTypeStore</a>* getVariableTypeStore() = 0;
00173
00175 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addTemplate(XQUserFunction *tp) = 0;
00177 <span class="keyword">virtual</span> <span class="keyword">const</span> XQUserFunction *lookUpNamedTemplate(<span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *name) <span class="keyword">const </span>= 0;
00179 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="StaticContext_8hpp.html#a1">UserFunctions</a> &amp;getTemplateRules() <span class="keyword">const </span>= 0;
00180
00182 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addCustomFunction(FuncFactory *func) = 0;
00184 <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeCustomFunction(FuncFactory *func) = 0;
00186 <span class="keyword">virtual</span> ASTNode *lookUpFunction(<span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *name, <span class="keyword">const</span> VectorOfASTNodes &amp;v) <span class="keyword">const </span>= 0;
00187
00189 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setExternalFunctionResolver(<a class="code" href="classExternalFunctionResolver.html">ExternalFunctionResolver</a> *resolver) = 0;
00191 <span class="keyword">virtual</span> <a class="code" href="classExternalFunctionResolver.html">ExternalFunctionResolver</a> *getExternalFunctionResolver() <span class="keyword">const </span>= 0;
00193 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addExternalFunction(<span class="keyword">const</span> <a class="code" href="classExternalFunction.html">ExternalFunction</a> *func) = 0;
00195 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classExternalFunction.html">ExternalFunction</a> *lookUpExternalFunction(<span class="keyword">const</span> XMLCh *uri, <span class="keyword">const</span> XMLCh *name, size_t numArgs) <span class="keyword">const </span>= 0;
00196
00198 <span class="keyword">virtual</span> <a class="code" href="classCollation.html">Collation</a>* getCollation(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> URI, <span class="keyword">const</span> <a class="code" href="classLocationInfo.html">LocationInfo</a> *location = 0) <span class="keyword">const </span>= 0;
00200 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addCollation(<a class="code" href="classCollation.html">Collation</a>* collation) = 0;
00201
00203 <span class="keyword">virtual</span> <a class="code" href="classCollation.html">Collation</a>* getDefaultCollation(<span class="keyword">const</span> <a class="code" href="classLocationInfo.html">LocationInfo</a> *location = 0) <span class="keyword">const </span>= 0;
00205 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setDefaultCollation(<span class="keyword">const</span> XMLCh* <span class="keyword">const</span> URI) = 0;
00206
00208 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getBaseURI() <span class="keyword">const </span>= 0;
00210 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setBaseURI(<span class="keyword">const</span> XMLCh* newURI) = 0;
00211
00213 <span class="keyword">virtual</span> NodeSetOrdering getNodeSetOrdering() <span class="keyword">const </span>= 0;
00215 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setNodeSetOrdering(NodeSetOrdering newOrder) = 0;
00216
00218 <span class="keyword">virtual</span> ConstructionMode getConstructionMode() <span class="keyword">const </span>= 0;
00220 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setConstructionMode(ConstructionMode newMode) = 0;
00221
00223 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPreserveBoundarySpace(<span class="keywordtype">bool</span> value) = 0;
00225 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getPreserveBoundarySpace() <span class="keyword">const </span>= 0;
00226
00228 <span class="keyword">virtual</span> FLWOROrderingMode getDefaultFLWOROrderingMode() <span class="keyword">const </span>= 0;
00230 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setDefaultFLWOROrderingMode(FLWOROrderingMode newMode) = 0;
00231
00233 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setInheritNamespaces(<span class="keywordtype">bool</span> value) = 0;
00235 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getInheritNamespaces() <span class="keyword">const </span>= 0;
00236
00238 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPreserveNamespaces(<span class="keywordtype">bool</span> value) = 0;
00240 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getPreserveNamespaces() <span class="keyword">const </span>= 0;
00241
00243 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setRevalidationMode(DocumentCache::ValidationMode mode) = 0;
00245 <span class="keyword">virtual</span> DocumentCache::ValidationMode getRevalidationMode() <span class="keyword">const </span>= 0;
00246
00248 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setMessageListener(<a class="code" href="classMessageListener.html">MessageListener</a> *listener) = 0;
00250 <span class="keyword">virtual</span> <a class="code" href="classMessageListener.html">MessageListener</a> *getMessageListener() <span class="keyword">const </span>= 0;
00251
00253 <span class="comment">// XQilla context specific accessors //</span>
00255 <span class="comment"></span>
00269 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getProjection() <span class="keyword">const </span>= 0;
00286 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setProjection(<span class="keywordtype">bool</span> enabled) = 0;
00287
00288 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getDoLintWarnings() <span class="keyword">const </span>= 0;
00289 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setDoLintWarnings(<span class="keywordtype">bool</span> enabled) = 0;
00290
00292 <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh *allocateTempVarName(<span class="keyword">const</span> XMLCh *prefix = 0) = 0;
00293
00295 <span class="keyword">virtual</span> <a class="code" href="classXPath2MemoryManager.html">XPath2MemoryManager</a>* getMemoryManager() <span class="keyword">const </span>= 0;
00297 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setMemoryManager(<a class="code" href="classXPath2MemoryManager.html">XPath2MemoryManager</a>* memMgr) = 0;
00298 };
00299
00300 <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&nbsp;
<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>