SourceForge.net Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

DynamicContext.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2008
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2008
00005  *     Oracle. All rights reserved.
00006  *
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  *
00011  *     http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  *
00019  * $Id: DynamicContext.hpp 603 2008-08-18 23:40:47Z jpcs $
00020  */
00021 
00022 #ifndef _DYNAMICCONTEXT_HPP
00023 #define _DYNAMICCONTEXT_HPP
00024 
00025 #include <xqilla/context/StaticContext.hpp>
00026 #include <xqilla/items/ATDurationOrDerived.hpp>
00027 
00028 class Sequence;
00029 class Item;
00030 class URIResolver;
00031 class VariableStore;
00032 class SequenceBuilder;
00033 class UpdateFactory;
00034 class RegexGroupStore;
00035 class DebugListener;
00036 class StackFrame;
00037 
00039 class XQILLA_API DynamicContext : public StaticContext
00040 {
00041 public:
00042   virtual ~DynamicContext() {};
00043 
00044   virtual DynamicContext *createModuleDynamicContext(const DynamicContext* moduleCtx, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00045                                                      XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager) const = 0;
00046 
00048   virtual void clearDynamicContext() = 0;
00049 
00051   virtual Item::Ptr getContextItem() const = 0;
00053   virtual void setContextItem(const Item::Ptr &item) = 0;
00054 
00056   virtual size_t getContextPosition() const = 0;
00058   virtual void setContextPosition(size_t pos) = 0;
00059 
00061   virtual size_t getContextSize() const = 0;
00063   virtual void setContextSize(size_t size) = 0;
00064   
00066   virtual const VariableStore* getVariableStore() const = 0;
00068   virtual void setVariableStore(const VariableStore *store) = 0;
00070   virtual const VariableStore* getGlobalVariableStore() const = 0;
00072   virtual void setGlobalVariableStore(const VariableStore *store) = 0;
00074   virtual void setExternalVariable(const XMLCh *namespaceURI, const XMLCh *name, const Sequence &value) = 0;
00076   virtual void setExternalVariable(const XMLCh *qname, const Sequence &value) = 0;
00077 
00079   virtual const RegexGroupStore* getRegexGroupStore() const = 0;
00081   virtual void setRegexGroupStore(const RegexGroupStore *store) = 0;
00082 
00084   virtual time_t getCurrentTime() const = 0;
00086   virtual void setCurrentTime(time_t newTime) = 0;
00087 
00089   virtual ATDurationOrDerived::Ptr getImplicitTimezone() const = 0;
00091   virtual void setImplicitTimezone(const ATDurationOrDerived::Ptr &timezoneAsDuration) = 0;
00092 
00094   //  XQilla context specific accessors  //
00096 
00109   virtual void registerURIResolver(URIResolver *resolver, bool adopt) = 0;
00111   virtual URIResolver *getDefaultURIResolver() const = 0;
00113   virtual void setDefaultURIResolver(URIResolver *resolver, bool adopt) = 0;
00114 
00116   virtual void setDebugListener(DebugListener *listener) = 0;
00118   virtual DebugListener *getDebugListener() const = 0;
00119 
00121   virtual void setStackFrame(const StackFrame *frame) = 0;
00123   virtual const StackFrame *getStackFrame() const = 0;
00124 
00126   virtual Node::Ptr parseDocument(XERCES_CPP_NAMESPACE_QUALIFIER InputSource &srcToUse,
00127                                   const LocationInfo *location = 0, const QueryPathNode *projection = 0) = 0;
00130   virtual Sequence resolveDocument(const XMLCh* uri, const LocationInfo *location = 0,
00131                                    const QueryPathNode *projection = 0) = 0;
00134   virtual Sequence resolveCollection(const XMLCh* uri, const LocationInfo *location = 0,
00135                                      const QueryPathNode *projection = 0) = 0;
00137   virtual Sequence resolveDefaultCollection(const QueryPathNode *projection = 0) = 0;
00138 
00141   virtual bool putDocument(const Node::Ptr &document, const XMLCh *uri) = 0;
00142 
00145   virtual SequenceBuilder *createSequenceBuilder() const = 0;
00146 
00149   virtual UpdateFactory *createUpdateFactory() const = 0;
00150 
00152   virtual void testInterrupt() const = 0;
00153 };
00154 
00155 #endif

Generated on Fri Sep 25 06:55:26 2009 for XQilla Simple API by  doxygen 1.3.9.1