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 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
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