00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
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