SourceForge.net Logo

DynamicContext.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2007
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2007
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,v 1.24 2007/11/29 16:53:00 jpcs Exp $
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 
00036 class XQILLA_API DynamicContext : public StaticContext
00037 {
00038 public:
00039   virtual ~DynamicContext() {};
00040 
00041   virtual DynamicContext *createModuleDynamicContext(const DynamicContext* moduleCtx, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00042                                                      XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager) const = 0;
00043 
00045   virtual void clearDynamicContext() = 0;
00046 
00048   virtual Item::Ptr getContextItem() const = 0;
00050   virtual void setContextItem(const Item::Ptr &item) = 0;
00051 
00053   virtual size_t getContextPosition() const = 0;
00055   virtual void setContextPosition(size_t pos) = 0;
00056 
00058   virtual size_t getContextSize() const = 0;
00060   virtual void setContextSize(size_t size) = 0;
00061   
00063   virtual const VariableStore* getVariableStore() const = 0;
00065   virtual void setVariableStore(const VariableStore *store) = 0;
00067   virtual const VariableStore* getGlobalVariableStore() const = 0;
00069   virtual void setGlobalVariableStore(const VariableStore *store) = 0;
00071   virtual void setExternalVariable(const XMLCh *namespaceURI, const XMLCh *name, const Sequence &value) = 0;
00073   virtual void setExternalVariable(const XMLCh *qname, const Sequence &value) = 0;
00074 
00076   virtual time_t getCurrentTime() const = 0;
00078   virtual void setCurrentTime(time_t newTime) = 0;
00079 
00081   virtual ATDurationOrDerived::Ptr getImplicitTimezone() const = 0;
00083   virtual void setImplicitTimezone(const ATDurationOrDerived::Ptr &timezoneAsDuration) = 0;
00084 
00086   //  XQilla context specific accessors  //
00088 
00101   virtual void registerURIResolver(URIResolver *resolver, bool adopt) = 0;
00103   virtual URIResolver *getDefaultURIResolver() const = 0;
00105   virtual void setDefaultURIResolver(URIResolver *resolver, bool adopt) = 0;
00106 
00108   virtual Node::Ptr parseDocument(XERCES_CPP_NAMESPACE_QUALIFIER InputSource &srcToUse,
00109                                   const LocationInfo *location = 0, const QueryPathNode *projection = 0) = 0;
00112   virtual Sequence resolveDocument(const XMLCh* uri, const LocationInfo *location = 0,
00113                                    const QueryPathNode *projection = 0) = 0;
00116   virtual Sequence resolveCollection(const XMLCh* uri, const LocationInfo *location = 0,
00117                                      const QueryPathNode *projection = 0) = 0;
00118   virtual Sequence resolveDefaultCollection(const QueryPathNode *projection = 0) = 0;
00119 
00122   virtual SequenceBuilder *createSequenceBuilder() const = 0;
00123 
00126   virtual UpdateFactory *createUpdateFactory() const = 0;
00127 
00129   virtual void testInterrupt() const = 0;
00130 };
00131 
00132 #endif

Generated on Wed Dec 12 20:16:43 2007 for XQilla Simple API by  doxygen 1.5.1