SourceForge.net Logo
Public Types | Public Member Functions | Friends | List of all members
XQilla Class Reference

Provides factory methods for creating XQQuery and DynamicContext objects. More...

#include <XQilla.hpp>

Inheritance diagram for XQilla:
Inheritance graph
[legend]

Public Types

enum  Flags {
  NO_STATIC_RESOLUTION = 0x1, NO_ADOPT_CONTEXT = 0x2, DEBUG_QUERY = 0x4, NO_OPTIMIZATION = 0x8,
  NO_DEFAULT_MODULES = 0x10
}
 Flags used by the XQilla methods. These are used by bitwise OR-ing (|) their values together. More...
 
enum  Language {
  XQUERY = 0x00, XPATH2 = 0x01, FULLTEXT = 0x02, UPDATE = 0x04,
  EXTENSIONS = 0x08, XSLT2 = 0x10, VERSION3 = 0x20, XQUERY_FULLTEXT = (XQUERY | FULLTEXT),
  XQUERY_UPDATE = (XQUERY | UPDATE), XQUERY_FULLTEXT_UPDATE = (XQUERY | FULLTEXT | UPDATE), XPATH2_FULLTEXT = (XPATH2 | FULLTEXT), XSLT2_FULLTEXT = (XSLT2 | FULLTEXT),
  XQUERY3 = (XQUERY | VERSION3), XQUERY3_FULLTEXT = (XQUERY | VERSION3 | FULLTEXT), XQUERY3_UPDATE = (XQUERY | VERSION3 | UPDATE), XQUERY3_FULLTEXT_UPDATE = (XQUERY | VERSION3 | FULLTEXT | UPDATE),
  XPATH3 = (XPATH2 | VERSION3), XPATH3_FULLTEXT = (XPATH2 | VERSION3 | FULLTEXT), XSLT3 = (XSLT2 | VERSION3), XSLT3_FULLTEXT = (XSLT2 | VERSION3 | FULLTEXT)
}
 Enumeration used to select a language to parse. More...
 

Public Member Functions

 XQilla (xercesc::MemoryManager *memMgr=0)
 Constructs the object. More...
 
 ~XQilla ()
 Destructs the object. More...
 
- Public Member Functions inherited from xercesc::XMemory
void * operator new (size_t size)
 This method overrides operator new. More...
 
void * operator new (size_t size, MemoryManager *memMgr)
 This method defines a custom operator new, that will use the provided memory manager to perform the allocation. More...
 
void * operator new (size_t size, void *ptr)
 This method overrides placement operator new. More...
 
void operator delete (void *p)
 This method overrides operator delete. More...
 
void operator delete (void *p, MemoryManager *memMgr)
 This method provides a matching delete for the custom operator new. More...
 
void operator delete (void *p, void *ptr)
 This method provides a matching delete for the placement new. More...
 

Static Public Member Functions

Parsing Methods
static XQQueryparse (const XMLCh *query, DynamicContext *context=0, const XMLCh *queryFile=NULL, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager, XQQuery *result=0)
 Parse the expression contained in the given query string. More...
 
static XQQueryparse (const xercesc::InputSource &querySrc, DynamicContext *context=0, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager, XQQuery *result=0)
 Parse the expression from the given InputSource. More...
 
static XQQueryparseFromURI (const XMLCh *queryFile, DynamicContext *context=0, unsigned int flags=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager, XQQuery *result=0)
 Parse the expression residing at the given URL. More...
 
Factory Methods
static DynamicContextcreateContext (Language language=XQUERY, XQillaConfiguration *conf=0, xercesc::MemoryManager *memMgr=xercesc::XMLPlatformUtils::fgMemoryManager)
 Creates a context suitable for parsing an expression with. More...
 

Friends

void CompileDelayedModule::compile (const XMLCh *queryFile)
 

Additional Inherited Members

- Protected Member Functions inherited from xercesc::XMemory
 XMemory ()
 Protected default constructor. More...
 

Detailed Description

Provides factory methods for creating XQQuery and DynamicContext objects.

This class calls XQillaPlatformUtils::initialize() when it is constructed, and XQillaPlatformUtils::terminate() when it destructs, so there is no need to seperately initialize or terminate either Xerces or XQilla.

Examples:
simple-basic.cpp, and simple-context-item.cpp.

Member Enumeration Documentation

Flags used by the XQilla methods. These are used by bitwise OR-ing (|) their values together.

Enumerator
NO_STATIC_RESOLUTION 

Don't perform static resolution or any optimization.

NO_ADOPT_CONTEXT 

Don't adopt the context and delete it when the XQQuery is deleted.

DEBUG_QUERY 

Build debugging hooks into the query to enable the use of DebugListener.

NO_OPTIMIZATION 

Don't perform optimization.

NO_DEFAULT_MODULES 

Don't automatically import the default modules.

Enumeration used to select a language to parse.

Enumerator
XQUERY 
XPATH2 
FULLTEXT 
UPDATE 
EXTENSIONS 
XSLT2 
VERSION3 
XQUERY_FULLTEXT 
XQUERY_UPDATE 
XQUERY_FULLTEXT_UPDATE 
XPATH2_FULLTEXT 
XSLT2_FULLTEXT 
XQUERY3 
XQUERY3_FULLTEXT 
XQUERY3_UPDATE 
XQUERY3_FULLTEXT_UPDATE 
XPATH3 
XPATH3_FULLTEXT 
XSLT3 
XSLT3_FULLTEXT 

Constructor & Destructor Documentation

XQilla::XQilla ( xercesc::MemoryManager memMgr = 0)

Constructs the object.

In the process, XQillaPlatformUtils::initialize() is called to initialize XQilla and Xerces.

Parameters
memMgrIf provided, this is the MemoryManager used to initialize Xerces.
XQilla::~XQilla ( )

Destructs the object.

In the process, XQillaPlatformUtils::terminate() is called to terminate XQilla and Xerces.

Member Function Documentation

static DynamicContext* XQilla::createContext ( Language  language = XQUERY,
XQillaConfiguration conf = 0,
xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager 
)
static

Creates a context suitable for parsing an expression with.

Parameters
memMgrThe memory manager used to create the DynamicContext.
Returns
An implementation of DynamicContext
static XQQuery* XQilla::parse ( const XMLCh *  query,
DynamicContext context = 0,
const XMLCh *  queryFile = NULL,
unsigned int  flags = 0,
xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager,
XQQuery result = 0 
)
static

Parse the expression contained in the given query string.

Parameters
queryA string containing the expression to parse.
contextIf specified, the context to use for parsing this expression. A default context is used if this parameter is 0.
queryFileThe name of the file that query originates in. This is passed back to the user in an XQException if an error occurs.
flagsA bitwise OR of the Flags constants, that control aspects of how the XQQuery object is created.
memMgrIf specified, the memory manager used to create the XQQuery object.
Returns
The object that represents the parsed expression.
Exceptions
XQExceptionIf a parse error occurs.
Examples:
simple-basic.cpp, and simple-context-item.cpp.
static XQQuery* XQilla::parse ( const xercesc::InputSource querySrc,
DynamicContext context = 0,
unsigned int  flags = 0,
xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager,
XQQuery result = 0 
)
static

Parse the expression from the given InputSource.

Parameters
querySrcAn InputSource which the expression will be parsed from.
contextIf specified, the context to use for parsing this expression. A default context is used if this parameter is 0.
flagsA bitwise OR of the Flags constants, that control aspects of how the XQQuery object is created.
memMgrIf specified, the memory manager used to create the XQQuery object.
Returns
The object that represents the parsed expression.
Exceptions
XQExceptionIf a parse error occurs.
static XQQuery* XQilla::parseFromURI ( const XMLCh *  queryFile,
DynamicContext context = 0,
unsigned int  flags = 0,
xercesc::MemoryManager memMgr = xercesc::XMLPlatformUtils::fgMemoryManager,
XQQuery result = 0 
)
static

Parse the expression residing at the given URL.

Parameters
queryFileThe URL of the expression to parse.
contextIf specified, the context to use for parsing this expression. A default context is used if this parameter is 0.
flagsA bitwise OR of the Flags constants, that control aspects of how the XQQuery object is created.
memMgrIf specified, the memory manager used to create the XQQuery object.
Returns
The object that represents the parsed expression.
Exceptions
XQExceptionIf a parse error occurs.

Friends And Related Function Documentation

void CompileDelayedModule::compile ( const XMLCh *  queryFile)
friend

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