00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _DYNAMICCONTEXT_HPP
00015 #define _DYNAMICCONTEXT_HPP
00016
00017 #include <xqilla/context/StaticContext.hpp>
00018 #include <xqilla/items/ATDurationOrDerived.hpp>
00019
00020 class Sequence;
00021 class Item;
00022 class URIResolver;
00023 class VariableStore;
00024 class SequenceBuilder;
00025 class UpdateFactory;
00026
00028 class XQILLA_API DynamicContext : public StaticContext
00029 {
00030 public:
00031 virtual ~DynamicContext() {};
00032
00033 virtual DynamicContext *createModuleDynamicContext(const DynamicContext* moduleCtx, XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00034 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager) const = 0;
00035
00037 virtual void clearDynamicContext() = 0;
00038
00040 virtual Item::Ptr getContextItem() const = 0;
00042 virtual void setContextItem(const Item::Ptr &item) = 0;
00043
00045 virtual unsigned int getContextPosition() const = 0;
00047 virtual void setContextPosition(unsigned int pos) = 0;
00048
00050 virtual unsigned int getContextSize() const = 0;
00052 virtual void setContextSize(unsigned int size) = 0;
00053
00055 virtual const VariableStore* getVariableStore() const = 0;
00057 virtual void setVariableStore(const VariableStore *store) = 0;
00059 virtual const VariableStore* getGlobalVariableStore() const = 0;
00061 virtual void setGlobalVariableStore(const VariableStore *store) = 0;
00063 virtual void setExternalVariable(const XMLCh *namespaceURI, const XMLCh *name, const Sequence &value) = 0;
00065 virtual void setExternalVariable(const XMLCh *qname, const Sequence &value) = 0;
00066
00068 virtual time_t getCurrentTime() const = 0;
00070 virtual void setCurrentTime(time_t newTime) = 0;
00071
00073 virtual ATDurationOrDerived::Ptr getImplicitTimezone() const = 0;
00075 virtual void setImplicitTimezone(const ATDurationOrDerived::Ptr &timezoneAsDuration) = 0;
00076
00089 virtual void registerURIResolver(URIResolver *resolver, bool adopt) = 0;
00091 virtual URIResolver *getDefaultURIResolver() const = 0;
00093 virtual void setDefaultURIResolver(URIResolver *resolver, bool adopt) = 0;
00094
00095
00096
00097 virtual Sequence resolveDocument(const XMLCh* uri, const LocationInfo *location) = 0;
00098
00099
00100 virtual Sequence resolveCollection(const XMLCh* uri, const LocationInfo *location) = 0;
00101 virtual Sequence resolveDefaultCollection() = 0;
00102
00105 virtual SequenceBuilder *createSequenceBuilder() const = 0;
00106
00109 virtual UpdateFactory *createUpdateFactory() const = 0;
00110
00112 virtual void testInterrupt() const = 0;
00113 };
00114
00115 #endif