SourceForge.net Logo

DynamicContext.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2006
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2006
00005  *     Progress Software Corporation. All rights reserved.
00006  * Copyright (c) 2004-2006
00007  *     Oracle. All rights reserved.
00008  *
00009  * See the file LICENSE for redistribution information.
00010  *
00011  * $Id: DynamicContext.hpp,v 1.19 2007/08/29 17:17:08 jpcs Exp $
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   /* Resolve the given uri (and baseUri) to a DOMDocument. If the uri
00096      is relative, the base uri is obtained from the context. */
00097   virtual Sequence resolveDocument(const XMLCh* uri, const LocationInfo *location) = 0;
00098   /* Resolve the given uri (and baseUri) to a ist of DOMNode objects. If the uri
00099      is relative, the base uri is obtained from the context. */
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

Generated on Fri Aug 31 14:37:35 2007 for XQilla Simple API by  doxygen 1.5.1