# XQilla Simple API Documentation

# DynamicContext Class Reference

The execution time dynamic context interface. More...

`#include <DynamicContext.hpp>`

Inheritance diagram for DynamicContext:
[legend]

List of all members.

## Public Member Functions

virtual | ~DynamicContext ()
virtual DynamicContext * | createModuleDynamicContext (const DynamicContext *moduleCtx, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager) const =0
virtual void | clearDynamicContext ()=0
| Resets the dynamic context, as if it had never been used.
virtual Item::Ptr | getContextItem () const =0
| Get the context Item.
virtual void | setContextItem (const Item::Ptr &item)=0
| Set the context item to item.
virtual size_t | getContextPosition () const =0
| Get the context position.
virtual void | setContextPosition (size_t pos)=0
| Set the context position.
virtual size_t | getContextSize () const =0
| Get the context size.
virtual void | setContextSize (size_t size)=0
| Set the context size.
virtual const VariableStore * | getVariableStore () const =0
| get the variable store
virtual void | setVariableStore (const VariableStore *store)=0
| set the variable store
virtual const VariableStore * | getGlobalVariableStore () const =0
| get the variable store for globally scoped variables
virtual void | setGlobalVariableStore (const VariableStore *store)=0
| set the variable store for globally scoped variables
virtual void | setExternalVariable (const XMLCh *namespaceURI, const XMLCh *name, const Result &value)=0
| set the value of an external global variable with the given uri/localname pair
virtual void | setExternalVariable (const XMLCh *qname, const Result &value)=0
| set the value of an external global variable with the given QName
virtual const RegexGroupStore * | getRegexGroupStore () const =0
| get the regex group store
virtual void | setRegexGroupStore (const RegexGroupStore *store)=0
| set the regex group store
virtual time_t | getCurrentTime () const =0
| Return the current time.
virtual void | setCurrentTime (time_t newTime)=0
| Set the current time.
virtual ATDurationOrDerived::Ptr | getImplicitTimezone () const =0
| Return the implicit timezone for this system.
virtual void | setImplicitTimezone (const ATDurationOrDerived::Ptr &timezoneAsDuration)=0
| Set the implicit timezone.
virtual void | registerURIResolver (URIResolver *resolver, bool adopt)=0
| Register a callback object for resolving URIs.
virtual URIResolver * | getDefaultURIResolver () const =0
| Returns the default URIResolver.
virtual void | setDefaultURIResolver (URIResolver *resolver, bool adopt)=0
| Sets the default URIResolver.
virtual void | setDebugListener (DebugListener *listener)=0
| Set the listener for debug messages.
virtual DebugListener * | getDebugListener () const =0
| Gets the listener for debug messages.
virtual void | setStackFrame (const StackFrame *frame)=0
| Sets the current stack frame whilst debugging.
virtual const StackFrame * | getStackFrame () const =0
| Gets the listener for debug messages.
virtual Node::Ptr | parseDocument (xercesc::InputSource &srcToUse, const LocationInfo *location=0, const QueryPathNode *projection=0)=0
| Parse an XML document from the provided InputSource.
virtual Sequence | resolveDocument (const XMLCh *uri, const LocationInfo *location=0, const QueryPathNode *projection=0)=0
| Resolve the given uri (and baseUri) to an XML document.
virtual Sequence | resolveCollection (const XMLCh *uri, const LocationInfo *location=0, const QueryPathNode *projection=0)=0
| Resolve the given uri (and baseUri) to a sequence of Node objects.
virtual Sequence | resolveDefaultCollection (const QueryPathNode *projection=0)=0
| Resolve the default collection to a sequence of Node objects.
virtual bool | putDocument (const Node::Ptr &document, const XMLCh *uri)=0
| Attempts to put the document specified to the given URI by calling the registered URIResolver objects.
virtual SequenceBuilder * | createSequenceBuilder () const =0
| Create a new SequenceBuilder, which is used to turn a stream of events into a Sequence.
virtual UpdateFactory * | createUpdateFactory () const =0
| Creates a new UpdateFactory, used for performing updates.
virtual void | testInterrupt () const =0
| Test if the query should be interrupted, and throw if so.

## Detailed Description

The execution time dynamic context interface.

## Constructor & Destructor Documentation

virtual DynamicContext::~DynamicContext | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual void DynamicContext::clearDynamicContext | ( |  | ) | `[pure virtual]`

Resets the dynamic context, as if it had never been used.

virtual DynamicContext* DynamicContext::createModuleDynamicContext | ( | const DynamicContext * | moduleCtx,
|  | xercesc::MemoryManager * | memMgr = `xercesc::XMLPlatformUtils::fgMemoryManager` |
| ) |  |  | const`[pure virtual]`

virtual SequenceBuilder* DynamicContext::createSequenceBuilder | ( |  | ) | const`[pure virtual]`

Create a new SequenceBuilder, which is used to turn a stream of events into a Sequence.

virtual UpdateFactory* DynamicContext::createUpdateFactory | ( |  | ) | const`[pure virtual]`

Creates a new UpdateFactory, used for performing updates.

Caller owns the returned object, and should delete it

virtual Item::Ptr DynamicContext::getContextItem | ( |  | ) | const`[pure virtual]`

Get the context Item.

virtual size_t DynamicContext::getContextPosition | ( |  | ) | const`[pure virtual]`

Get the context position.

virtual size_t DynamicContext::getContextSize | ( |  | ) | const`[pure virtual]`

Get the context size.

virtual time_t DynamicContext::getCurrentTime | ( |  | ) | const`[pure virtual]`

Return the current time.

virtual DebugListener* DynamicContext::getDebugListener | ( |  | ) | const`[pure virtual]`

Gets the listener for debug messages.

virtual URIResolver* DynamicContext::getDefaultURIResolver | ( |  | ) | const`[pure virtual]`

Returns the default URIResolver.

virtual const VariableStore* DynamicContext::getGlobalVariableStore | ( |  | ) | const`[pure virtual]`

get the variable store for globally scoped variables

virtual ATDurationOrDerived::Ptr DynamicContext::getImplicitTimezone | ( |  | ) | const`[pure virtual]`

Return the implicit timezone for this system.

virtual const RegexGroupStore* DynamicContext::getRegexGroupStore | ( |  | ) | const`[pure virtual]`

get the regex group store

Referenced by AutoRegexGroupStoreReset::AutoRegexGroupStoreReset().

virtual const StackFrame* DynamicContext::getStackFrame | ( |  | ) | const`[pure virtual]`

Gets the listener for debug messages.

Referenced by AutoStackFrameReset::AutoStackFrameReset().

virtual const VariableStore* DynamicContext::getVariableStore | ( |  | ) | const`[pure virtual]`

get the variable store

Referenced by AutoVariableStoreReset::AutoVariableStoreReset().

virtual Node::Ptr DynamicContext::parseDocument | ( | xercesc::InputSource & | srcToUse,
|  | const LocationInfo * | location = `0`,
|  | const QueryPathNode * | projection = `0` |
| ) |  |  | `[pure virtual]`

Parse an XML document from the provided InputSource.

virtual bool DynamicContext::putDocument | ( | const Node::Ptr & | document,
|  | const XMLCh * | uri |
| ) |  |  | `[pure virtual]`

Attempts to put the document specified to the given URI by calling the registered URIResolver objects.

Returns whether the operation was successful.

virtual void DynamicContext::registerURIResolver | ( | URIResolver * | resolver,
|  | bool | adopt |
| ) |  |  | `[pure virtual]`

Register a callback object for resolving URIs.

Multiple URIResolver objects can be registered with the DynamicContext at the same time. The most recently added URIResolver will be called first, and if it returns false, subsequent ones will be called - ending in a call to the fallback routines.

If "adopt" is false, the DynamicContext will not adopt this object, making the user responsible for making sure that the URIResolver object's lifespan matches or exceeds the life of the DynamicContext.

virtual Sequence DynamicContext::resolveCollection | ( | const XMLCh * | uri,
|  | const LocationInfo * | location = `0`,
|  | const QueryPathNode * | projection = `0` |
| ) |  |  | `[pure virtual]`

Resolve the given uri (and baseUri) to a sequence of Node objects.

If the uri is relative, the base uri is obtained from the context.

virtual Sequence DynamicContext::resolveDefaultCollection | ( | const QueryPathNode * | projection = `0` | ) | `[pure virtual]`

Resolve the default collection to a sequence of Node objects.

virtual Sequence DynamicContext::resolveDocument | ( | const XMLCh * | uri,
|  | const LocationInfo * | location = `0`,
|  | const QueryPathNode * | projection = `0` |
| ) |  |  | `[pure virtual]`

Resolve the given uri (and baseUri) to an XML document.

If the uri is relative, the base uri is obtained from the context.

virtual void DynamicContext::setContextItem | ( | const Item::Ptr & | item | ) | `[pure virtual]`

Set the context item to item.

Referenced by AutoContextInfoReset::AutoContextInfoReset().

virtual void DynamicContext::setContextPosition | ( | size_t | pos | ) | `[pure virtual]`

Set the context position.

Referenced by AutoContextInfoReset::AutoContextInfoReset().

virtual void DynamicContext::setContextSize | ( | size_t | size | ) | `[pure virtual]`

Set the context size.

Referenced by AutoContextInfoReset::AutoContextInfoReset().

virtual void DynamicContext::setCurrentTime | ( | time_t | newTime | ) | `[pure virtual]`

Set the current time.

virtual void DynamicContext::setDebugListener | ( | DebugListener * | listener | ) | `[pure virtual]`

Set the listener for debug messages.

virtual void DynamicContext::setDefaultURIResolver | ( | URIResolver * | resolver,
|  | bool | adopt |
| ) |  |  | `[pure virtual]`

Sets the default URIResolver.

virtual void DynamicContext::setExternalVariable | ( | const XMLCh * | qname,
|  | const Result & | value |
| ) |  |  | `[pure virtual]`

set the value of an external global variable with the given QName

virtual void DynamicContext::setExternalVariable | ( | const XMLCh * | namespaceURI,
|  | const XMLCh * | name,
|  | const Result & | value |
| ) |  |  | `[pure virtual]`

set the value of an external global variable with the given uri/localname pair

virtual void DynamicContext::setGlobalVariableStore | ( | const VariableStore * | store | ) | `[pure virtual]`

set the variable store for globally scoped variables

virtual void DynamicContext::setImplicitTimezone | ( | const ATDurationOrDerived::Ptr & | timezoneAsDuration | ) | `[pure virtual]`

Set the implicit timezone.

virtual void DynamicContext::setRegexGroupStore | ( | const RegexGroupStore * | store | ) | `[pure virtual]`

set the regex group store

virtual void DynamicContext::setStackFrame | ( | const StackFrame * | frame | ) | `[pure virtual]`

Sets the current stack frame whilst debugging.

virtual void DynamicContext::setVariableStore | ( | const VariableStore * | store | ) | `[pure virtual]`

set the variable store

virtual void DynamicContext::testInterrupt | ( |  | ) | const`[pure virtual]`

Test if the query should be interrupted, and throw if so.

The documentation for this class was generated from the following file:

- DynamicContext.hpp