Qt 4.8
Public Types | Public Functions | Properties | List of all members
QPatternist::GenericStaticContext Class Reference

Provides setters and getters for the properties defined in StaticContext. More...

#include <qgenericstaticcontext_p.h>

Inheritance diagram for QPatternist::GenericStaticContext:
QPatternist::StaticContext QPatternist::ReportContext QSharedData

Public Types

typedef QExplicitlySharedDataPointer< GenericStaticContextPtr
 
- Public Types inherited from QPatternist::StaticContext
enum  BoundarySpacePolicy { BSPPreserve, BSPStrip }
 
enum  ConstructionMode { CMPreserve, CMStrip }
 
enum  InheritMode { Inherit, NoInherit }
 
enum  OrderingEmptySequence { Greatest, Least }
 
enum  OrderingMode { Ordered, Unordered }
 
enum  PreserveMode { Preserve, NoPreserve }
 
typedef QExplicitlySharedDataPointer< StaticContextPtr
 
- Public Types inherited from QPatternist::ReportContext
enum  ErrorCode {
  XSDError, XPST0001, XPDY0002, XPST0003,
  XPTY0004, XPST0005, XPTY0006, XPTY0007,
  XPST0008, XQST0009, XPST0010, XQST0012,
  XQST0013, XQST0014, XQST0015, XQST0016,
  XPST0017, XPTY0018, XPTY0019, XPTY0020,
  XPDY0021, XQST0022, XQTY0023, XQTY0024,
  XQDY0025, XQDY0026, XQDY0027, XQTY0028,
  XQDY0029, XQTY0030, XQST0031, XQST0032,
  XQST0033, XQST0034, XQST0035, XQST0036,
  XQST0037, XQST0038, XQST0039, XQST0040,
  XQDY0041, XQST0042, XQST0043, XQDY0044,
  XQST0045, XQST0046, XQST0047, XQST0048,
  XQST0049, XPDY0050, XPST0051, XQDY0052,
  XQST0053, XQST0054, XQST0055, XQST0056,
  XQST0057, XQST0058, XQST0059, XQST0060,
  XQDY0061, XQDY0062, XQST0063, XQDY0064,
  XQST0065, XQST0066, XQST0067, XQST0068,
  XQST0069, XQST0070, XQST0071, XQDY0072,
  XQST0073, XQDY0074, XQST0075, XQST0076,
  XQST0077, XQST0078, XQST0079, XPST0080,
  XPST0081, XQST0082, XPST0083, XQDY0084,
  XQST0085, XQTY0086, XQST0087, XQST0088,
  XQST0089, XQST0090, XQDY0091, XQDY0092,
  XQST0093, FOER0000, FOAR0001, FOAR0002,
  FOCA0001, FOCA0002, FOCA0003, FOCA0005,
  FOCA0006, FOCH0001, FOCH0002, FOCH0003,
  FOCH0004, FODC0001, FODC0002, FODC0003,
  FODC0004, FODC0005, FODT0001, FODT0002,
  FODT0003, FONS0004, FONS0005, FORG0001,
  FORG0002, FORG0003, FORG0004, FORG0005,
  FORG0006, FORG0008, FORG0009, FORX0001,
  FORX0002, FORX0003, FORX0004, FOTY0012,
  SENR0001, SERE0003, SEPM0004, SERE0005,
  SERE0006, SESU0007, SERE0008, SEPM0009,
  SEPM0010, SESU0011, SERE0012, SESU0013,
  SERE0014, SERE0015, SEPM0016, XTSE0010,
  XTSE0020, XTSE0080, XTSE0090, XTSE0110,
  XTSE0120, XTSE0125, XTSE0130, XTSE0150,
  XTSE0165, XTSE0170, XTSE0180, XTSE0190,
  XTSE0200, XTSE0210, XTSE0215, XTSE0220,
  XTSE0260, XTSE0265, XTSE0280, XTSE0340,
  XTSE0350, XTSE0370, XTSE0500, XTSE0530,
  XTSE0550, XTSE0580, XTSE0620, XTSE0630,
  XTSE0650, XTSE0660, XTSE0670, XTSE0680,
  XTSE0690, XTSE0710, XTSE0720, XTSE0740,
  XTSE0760, XTSE0770, XTSE0805, XTSE0808,
  XTSE0809, XTSE0810, XTSE0812, XTSE0840,
  XTSE0870, XTSE0880, XTSE0910, XTSE0940,
  XTTE0950, XTSE0975, XTSE1015, XTSE1017,
  XTSE1040, XTSE1060, XTSE1070, XTSE1080,
  XTSE1090, XTSE1130, XTSE1205, XTSE1210,
  XTSE1220, XTSE1290, XTSE1295, XTSE1300,
  XTSE1430, XTSE1505, XTSE1520, XTSE1530,
  XTSE1560, XTSE1570, XTSE1580, XTSE1590,
  XTSE1600, XTSE1650, XTSE1660, XTTE0505,
  XTTE0510, XTTE0520, XTTE0570, XTTE0590,
  XTTE0600, XTTE0780, XTTE0790, XTTE0990,
  XTTE1000, XTTE1020, XTTE1100, XTTE1120,
  XTTE1510, XTTE1512, XTTE1515, XTTE1540,
  XTTE1545, XTTE1550, XTTE1555, XTDE0030,
  XTDE0040, XTDE0045, XTDE0047, XTDE0050,
  XTDE0060, XTDE0160, XTRE0270, XTDE0290,
  XTDE0410, XTDE0420, XTDE0430, XTDE0440,
  XTDE0485, XTRE0540, XTDE0560, XTDE0610,
  XTDE0640, XTDE0700, XTRE0795, XTDE0820,
  XTDE0830, XTDE0835, XTDE0850, XTDE0855,
  XTDE0860, XTDE0865, XTDE0890, XTDE0905,
  XTDE0920, XTDE0925, XTDE0930, XTDE0980,
  XTDE1030, XTDE1035, XTDE1110, XTDE1140,
  XTDE1145, XTDE1150, XTRE1160, XTDE1170,
  XTDE1190, XTDE1200, XTDE1260, XTDE1270,
  XTDE1280, XTDE1310, XTDE1340, XTDE1350,
  XTDE1360, XTDE1370, XTDE1380, XTDE1390,
  XTMM9000, XTDE1400, XTDE1420, XTDE1425,
  XTDE1428, XTDE1440, XTDE1450, XTDE1460,
  XTDE1480, XTDE1490, XTRE1495, XTRE1500,
  XTRE1620, XTRE1630, XTDE1665
}
 
typedef QHash< const SourceLocationReflection *, QSourceLocationLocationHash
 
typedef QExplicitlySharedDataPointer< ReportContextPtr
 

Public Functions

virtual void addLocation (const SourceLocationReflection *const reflection, const QSourceLocation &location)
 Adds location for reflection. More...
 
virtual VariableSlotID allocateRangeSlot ()
 
virtual QUrl baseURI () const
 
virtual BoundarySpacePolicy boundarySpacePolicy () const
 
virtual bool compatModeEnabled () const
 
virtual ConstructionMode constructionMode () const
 
virtual ItemType::Ptr contextItemType () const
 The static type of the context item. More...
 
virtual StaticContext::Ptr copy () const
 
virtual ItemType::Ptr currentItemType () const
 The static type of the current item, as returned by fn:current(). More...
 
virtual VariableSlotID currentRangeSlot () const
 
virtual QUrl defaultCollation () const
 
virtual QString defaultElementNamespace () const
 
virtual QString defaultFunctionNamespace () const
 
virtual DynamicContext::Ptr dynamicContext () const
 
virtual ExternalVariableLoader::Ptr externalVariableLoader () const
 
virtual FunctionFactory::Ptr functionSignatures () const
 
 GenericStaticContext (const NamePool::Ptr &np, QAbstractMessageHandler *const errorHandler, const QUrl &aBaseURI, const FunctionFactory::Ptr &factory, const QXmlQuery::QueryLanguage lang)
 
virtual InheritMode inheritMode () const
 
virtual QSourceLocation locationFor (const SourceLocationReflection *const reflection) const
 Returns the source location applying for reflection. More...
 
virtual QAbstractMessageHandlermessageHandler () const
 
virtual NamePool::Ptr namePool () const
 
virtual NamespaceResolver::Ptr namespaceBindings () const
 
virtual OrderingEmptySequence orderingEmptySequence () const
 
virtual OrderingMode orderingMode () const
 
virtual PreserveMode preserveMode () const
 
virtual ResourceLoader::Ptr resourceLoader () const
 
virtual SchemaTypeFactory::Ptr schemaDefinitions () const
 
virtual void setBaseURI (const QUrl &uri)
 
virtual void setBoundarySpacePolicy (const BoundarySpacePolicy policy)
 
virtual void setCompatModeEnabled (const bool newVal)
 
virtual void setConstructionMode (const ConstructionMode mode)
 
void setContextItemType (const ItemType::Ptr &type)
 
virtual void setDefaultCollation (const QUrl &uri)
 
virtual void setDefaultElementNamespace (const QString &ns)
 
virtual void setDefaultFunctionNamespace (const QString &ns)
 
void setExternalVariableLoader (const ExternalVariableLoader::Ptr &loader)
 
virtual void setInheritMode (const InheritMode mode)
 
virtual void setNamespaceBindings (const NamespaceResolver::Ptr &)
 
virtual void setOrderingEmptySequence (const OrderingEmptySequence ordering)
 
virtual void setOrderingMode (const OrderingMode mode)
 
virtual void setPreserveMode (const PreserveMode mode)
 
void setResourceLoader (const ResourceLoader::Ptr &loader)
 
virtual LocationHash sourceLocations () const
 Returns a hash of the contained locations. More...
 
virtual QAbstractUriResolveruriResolver () const
 The URI resolver in use. More...
 
- Public Functions inherited from QPatternist::StaticContext
virtual void setBoundarySpacePolicy (const BoundarySpacePolicy policy)=0
 
virtual void setConstructionMode (const ConstructionMode mode)=0
 
virtual void setInheritMode (const InheritMode mode)=0
 
virtual void setOrderingEmptySequence (const OrderingEmptySequence ordering)=0
 
virtual void setOrderingMode (const OrderingMode mode)=0
 
virtual void setPreserveMode (const PreserveMode mode)=0
 
 StaticContext ()
 
void wrapExpressionWith (const SourceLocationReflection *const existingNode, const QExplicitlySharedDataPointer< Expression > &newNode)
 Ensures source locations are handled in such a manner that existingNode wraps newNode. More...
 
virtual ~StaticContext ()
 
- Public Functions inherited from QPatternist::ReportContext
void error (const QString &message, const ReportContext::ErrorCode errorCode, const QSourceLocation &sourceLocation)
 
void error (const QString &message, const ReportContext::ErrorCode errorCode, const SourceLocationReflection *const reflection)
 
void error (const QString &message, const QXmlName qName, const SourceLocationReflection *const r)
 
 ReportContext ()
 Default constructors. More...
 
QUrl resolveURI (const QUrl &relative, const QUrl &baseURI) const
 
void warning (const QString &message, const QSourceLocation &sourceLocation=QSourceLocation())
 
virtual ~ReportContext ()
 
- Public Functions inherited from QSharedData
 QSharedData ()
 Constructs a QSharedData object with a reference count of 0. More...
 
 QSharedData (const QSharedData &)
 Constructs a QSharedData object with reference count 0. More...
 

Properties

QUrl m_baseURI
 
BoundarySpacePolicy m_boundarySpacePolicy
 
bool m_compatModeEnabled
 
ConstructionMode m_constructionMode
 
ItemType::Ptr m_contextItemType
 
QUrl m_defaultCollation
 
QString m_defaultElementNamespace
 
QString m_defaultFunctionNamespace
 
ExternalVariableLoader::Ptr m_externalVariableLoader
 
FunctionFactory::Ptr m_functionFactory
 
InheritMode m_inheritMode
 
LocationHash m_locations
 
QAbstractMessageHandlerm_messageHandler
 
const NamePool::Ptr m_namePool
 
NamespaceResolver::Ptr m_namespaceResolver
 
OrderingEmptySequence m_orderingEmptySequence
 
OrderingMode m_orderingMode
 
PreserveMode m_preserveMode
 
QXmlQuery::QueryLanguage m_queryLanguage
 
VariableSlotID m_rangeSlot
 
ResourceLoader::Ptr m_resourceLoader
 
QAbstractUriResolverm_uriResolver
 

Additional Inherited Members

- Static Public Functions inherited from QPatternist::ReportContext
static QString codeFromURI (const QString &typeURI, QString &uri)
 
static QString codeToString (const ReportContext::ErrorCode errorCode)
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Provides setters and getters for the properties defined in StaticContext.

Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 73 of file qgenericstaticcontext_p.h.

Typedefs

◆ Ptr

Definition at line 76 of file qgenericstaticcontext_p.h.

Constructors and Destructors

◆ GenericStaticContext()

GenericStaticContext::GenericStaticContext ( const NamePool::Ptr np,
QAbstractMessageHandler *const  errorHandler,
const QUrl aBaseURI,
const FunctionFactory::Ptr factory,
const QXmlQuery::QueryLanguage  lang 
)

Constructs a GenericStaticContext. The components are initialized as per the recommended default values in XQuery 1.0. Default order for empty sequences, orderingEmptySequence(), is initialized to Greatest.

See also
XQuery 1.0: An XML Query Language, C.1 Static Context Components
Parameters
errorHandlerthe error handler. May be null.
npthe NamePool. May not be null.
aBaseURIthe base URI in the static context. Must be absolute and valid.

Definition at line 55 of file qgenericstaticcontext.cpp.

Referenced by copy().

61  , m_functionFactory(factory)
66  , m_baseURI(aBaseURI)
73  , m_namePool(np)
74  , m_uriResolver(0)
75  , m_queryLanguage(lang)
76  , m_rangeSlot(-1)
77  , m_compatModeEnabled(false)
78 {
79  /* We'll easily have at least this many AST nodes, that we need
80  * to track locations for. */
81  m_locations.reserve(30);
82 
83  Q_ASSERT(np);
85 }
QAbstractMessageHandler * m_messageHandler
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
Definition: qurl.cpp:5880
void reserve(int size)
Ensures that the QHash&#39;s internal hash table consists of at least size buckets.
Definition: qhash.h:846
const QLatin1String XFN("http://www.w3.org/2005/xpath-functions")
static NamespaceResolver::Ptr defaultXSLTBindings()
static NamespaceResolver::Ptr defaultXQueryBindings()
static QUrl fromEncoded(const QByteArray &url)
Parses input and returns the corresponding QUrl.
Definition: qurl.cpp:5964
QImageIOHandler * handler

Functions

◆ addLocation()

void GenericStaticContext::addLocation ( const SourceLocationReflection *const  reflection,
const QSourceLocation location 
)
virtual

Adds location for reflection.

Implements QPatternist::StaticContext.

Definition at line 303 of file qgenericstaticcontext.cpp.

305 {
306  Q_ASSERT(!location.isNull());
307  Q_ASSERT_X(reflection, Q_FUNC_INFO,
308  "The reflection cannot be zero.");
309  m_locations.insert(reflection, location);
310 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition: qhash.h:753
bool isNull() const
Returns true if this QSourceLocation doesn&#39;t identify anything.
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
#define Q_FUNC_INFO
Definition: qglobal.h:1871

◆ allocateRangeSlot()

VariableSlotID GenericStaticContext::allocateRangeSlot ( )
virtual

Implements QPatternist::StaticContext.

Definition at line 332 of file qgenericstaticcontext.cpp.

333 {
334  ++m_rangeSlot;
335  return m_rangeSlot;
336 }

◆ baseURI()

QUrl GenericStaticContext::baseURI ( ) const
virtual

The base URI of the context. Typically, this is the base URI if of the element that contained the expression.

The base URI is in this implementation is never undefined, but is always valid.

Implements QPatternist::StaticContext.

Definition at line 110 of file qgenericstaticcontext.cpp.

111 {
113  "The static base-uri must be absolute. This error is most likely caused by misuing the API.");
114  return m_baseURI;
115 }
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
Definition: qurl.cpp:5880
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
#define Q_FUNC_INFO
Definition: qglobal.h:1871

◆ boundarySpacePolicy()

StaticContext::BoundarySpacePolicy GenericStaticContext::boundarySpacePolicy ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 154 of file qgenericstaticcontext.cpp.

155 {
156  return m_boundarySpacePolicy;
157 }

◆ compatModeEnabled()

bool GenericStaticContext::compatModeEnabled ( ) const
virtual

◆ constructionMode()

StaticContext::ConstructionMode GenericStaticContext::constructionMode ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 165 of file qgenericstaticcontext.cpp.

166 {
167  return m_constructionMode;
168 }

◆ contextItemType()

ItemType::Ptr GenericStaticContext::contextItemType ( ) const
virtual

The static type of the context item.

Different StaticContext instances are used for different nodes in the AST to properly reflect the type of the focus. If the focus is undefined, this function must return null.

See also
XQuery 1.0: An XML Query Language, Definition: Context item static type

Implements QPatternist::StaticContext.

Definition at line 241 of file qgenericstaticcontext.cpp.

Referenced by currentItemType().

242 {
243  return m_contextItemType;
244 }

◆ copy()

StaticContext::Ptr GenericStaticContext::copy ( ) const
virtual

Copies this StaticContext and returns the copy.

The copy and original must not be independent. Since the StaticContext is modified during the compilation process, the copy must be independent from the original to the degree that is required for the subclass in question.

Implements QPatternist::StaticContext.

Definition at line 256 of file qgenericstaticcontext.cpp.

257 {
260 
261  retval->setNamespaceBindings(newSolver);
268  retval->setInheritMode(m_inheritMode);
273  retval->m_locations = m_locations;
274 
275  return StaticContext::Ptr(retval);
276 }
void setResourceLoader(const ResourceLoader::Ptr &loader)
void setExternalVariableLoader(const ExternalVariableLoader::Ptr &loader)
virtual void setInheritMode(const InheritMode mode)
QAbstractMessageHandler * m_messageHandler
virtual void setPreserveMode(const PreserveMode mode)
virtual void setOrderingEmptySequence(const OrderingEmptySequence ordering)
void setContextItemType(const ItemType::Ptr &type)
ExternalVariableLoader::Ptr m_externalVariableLoader
GenericStaticContext(const NamePool::Ptr &np, QAbstractMessageHandler *const errorHandler, const QUrl &aBaseURI, const FunctionFactory::Ptr &factory, const QXmlQuery::QueryLanguage lang)
virtual void setConstructionMode(const ConstructionMode mode)
virtual void setDefaultCollation(const QUrl &uri)
virtual void setBoundarySpacePolicy(const BoundarySpacePolicy policy)
virtual void setNamespaceBindings(const NamespaceResolver::Ptr &)
Generic namespace resolver which resolves lookups against entries in a QHash.
virtual Bindings bindings() const =0
QExplicitlySharedDataPointer< StaticContext > Ptr
virtual void setOrderingMode(const OrderingMode mode)
virtual void setDefaultFunctionNamespace(const QString &ns)
Provides setters and getters for the properties defined in StaticContext.

◆ currentItemType()

ItemType::Ptr GenericStaticContext::currentItemType ( ) const
virtual

The static type of the current item, as returned by fn:current().

Implements QPatternist::StaticContext.

Definition at line 246 of file qgenericstaticcontext.cpp.

247 {
248  return contextItemType();
249 }
virtual ItemType::Ptr contextItemType() const
The static type of the context item.

◆ currentRangeSlot()

VariableSlotID GenericStaticContext::currentRangeSlot ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 327 of file qgenericstaticcontext.cpp.

328 {
329  return m_rangeSlot;
330 }

◆ defaultCollation()

QUrl GenericStaticContext::defaultCollation ( ) const
virtual
Returns
always the Unicode codepoint collation URI

Implements QPatternist::StaticContext.

Definition at line 133 of file qgenericstaticcontext.cpp.

◆ defaultElementNamespace()

QString GenericStaticContext::defaultElementNamespace ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 209 of file qgenericstaticcontext.cpp.

◆ defaultFunctionNamespace()

QString GenericStaticContext::defaultFunctionNamespace ( ) const
virtual
Returns
always the standard function namespace defined in XQuery 1.0 and XPath 2.0 Functions and Operators

Implements QPatternist::StaticContext.

Definition at line 198 of file qgenericstaticcontext.cpp.

◆ dynamicContext()

DynamicContext::Ptr GenericStaticContext::dynamicContext ( ) const
virtual

Returns a DynamicContext used for evaluation at compile time.

Implements QPatternist::StaticContext.

Definition at line 97 of file qgenericstaticcontext.cpp.

98 {
100  // TODO we have many bugs here..
101  context->setResourceLoader(m_resourceLoader);
102  return context;
103 }
A DynamicContext supplying basic information that always is used.
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
Definition: qshareddata.h:136
QAbstractMessageHandler * m_messageHandler
virtual LocationHash sourceLocations() const
Returns a hash of the contained locations.

◆ externalVariableLoader()

ExternalVariableLoader::Ptr GenericStaticContext::externalVariableLoader ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 288 of file qgenericstaticcontext.cpp.

289 {
291 }
ExternalVariableLoader::Ptr m_externalVariableLoader

◆ functionSignatures()

FunctionFactory::Ptr GenericStaticContext::functionSignatures ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 92 of file qgenericstaticcontext.cpp.

93 {
94  return m_functionFactory;
95 }

◆ inheritMode()

StaticContext::InheritMode GenericStaticContext::inheritMode ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 219 of file qgenericstaticcontext.cpp.

220 {
221  return m_inheritMode;
222 }

◆ locationFor()

QSourceLocation GenericStaticContext::locationFor ( const SourceLocationReflection *const  reflection) const
virtual

Returns the source location applying for reflection.

Implements QPatternist::ReportContext.

Definition at line 317 of file qgenericstaticcontext.cpp.

318 {
319  return m_locations.value(reflection->actualReflection());
320 }
virtual const SourceLocationReflection * actualReflection() const =0
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606

◆ messageHandler()

QAbstractMessageHandler * GenericStaticContext::messageHandler ( ) const
virtual
Returns
the QAbstractMessageHandler which functions such as warning() and error() should submit messages to. This function may never return null; a valid QAbstractMessageHandler pointer must always be returned.

Implements QPatternist::ReportContext.

Definition at line 138 of file qgenericstaticcontext.cpp.

139 {
140  return m_messageHandler;
141 }
QAbstractMessageHandler * m_messageHandler

◆ namePool()

NamePool::Ptr GenericStaticContext::namePool ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 298 of file qgenericstaticcontext.cpp.

299 {
300  return m_namePool;
301 }

◆ namespaceBindings()

NamespaceResolver::Ptr GenericStaticContext::namespaceBindings ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 87 of file qgenericstaticcontext.cpp.

88 {
89  return m_namespaceResolver;
90 }

◆ orderingEmptySequence()

StaticContext::OrderingEmptySequence GenericStaticContext::orderingEmptySequence ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 187 of file qgenericstaticcontext.cpp.

188 {
190 }

◆ orderingMode()

StaticContext::OrderingMode GenericStaticContext::orderingMode ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 176 of file qgenericstaticcontext.cpp.

177 {
178  return m_orderingMode;
179 }

◆ preserveMode()

StaticContext::PreserveMode GenericStaticContext::preserveMode ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 230 of file qgenericstaticcontext.cpp.

231 {
232  return m_preserveMode;
233 }

◆ resourceLoader()

ResourceLoader::Ptr GenericStaticContext::resourceLoader ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 278 of file qgenericstaticcontext.cpp.

279 {
280  return m_resourceLoader;
281 }

◆ schemaDefinitions()

SchemaTypeFactory::Ptr GenericStaticContext::schemaDefinitions ( ) const
virtual

Implements QPatternist::StaticContext.

Definition at line 105 of file qgenericstaticcontext.cpp.

106 {
108 }
static SchemaTypeFactory::Ptr self(const NamePool::Ptr &np)

◆ setBaseURI()

void GenericStaticContext::setBaseURI ( const QUrl uri)
virtual

Implements QPatternist::StaticContext.

Definition at line 117 of file qgenericstaticcontext.cpp.

118 {
119  Q_ASSERT(!uri.isRelative());
120  m_baseURI = uri;
121 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
Definition: qurl.cpp:5880

◆ setBoundarySpacePolicy()

void GenericStaticContext::setBoundarySpacePolicy ( const BoundarySpacePolicy  policy)
virtual

Definition at line 159 of file qgenericstaticcontext.cpp.

Referenced by copy().

◆ setCompatModeEnabled()

void GenericStaticContext::setCompatModeEnabled ( const bool  newVal)
virtual

Implements QPatternist::StaticContext.

Definition at line 128 of file qgenericstaticcontext.cpp.

129 {
130  m_compatModeEnabled = newVal;
131 }

◆ setConstructionMode()

void GenericStaticContext::setConstructionMode ( const ConstructionMode  mode)
virtual

Definition at line 170 of file qgenericstaticcontext.cpp.

Referenced by copy().

◆ setContextItemType()

void GenericStaticContext::setContextItemType ( const ItemType::Ptr type)

Definition at line 251 of file qgenericstaticcontext.cpp.

Referenced by copy().

252 {
254 }
int type
Definition: qmetatype.cpp:239

◆ setDefaultCollation()

void GenericStaticContext::setDefaultCollation ( const QUrl uri)
virtual

Implements QPatternist::StaticContext.

Definition at line 143 of file qgenericstaticcontext.cpp.

Referenced by copy().

◆ setDefaultElementNamespace()

void GenericStaticContext::setDefaultElementNamespace ( const QString ns)
virtual

Implements QPatternist::StaticContext.

Definition at line 214 of file qgenericstaticcontext.cpp.

◆ setDefaultFunctionNamespace()

void GenericStaticContext::setDefaultFunctionNamespace ( const QString ns)
virtual

Implements QPatternist::StaticContext.

Definition at line 203 of file qgenericstaticcontext.cpp.

Referenced by copy().

◆ setExternalVariableLoader()

void GenericStaticContext::setExternalVariableLoader ( const ExternalVariableLoader::Ptr loader)

Definition at line 293 of file qgenericstaticcontext.cpp.

Referenced by copy().

294 {
295  m_externalVariableLoader = loader;
296 }
ExternalVariableLoader::Ptr m_externalVariableLoader

◆ setInheritMode()

void GenericStaticContext::setInheritMode ( const InheritMode  mode)
virtual

Definition at line 224 of file qgenericstaticcontext.cpp.

Referenced by copy().

◆ setNamespaceBindings()

void GenericStaticContext::setNamespaceBindings ( const NamespaceResolver::Ptr resolver)
virtual

Implements QPatternist::StaticContext.

Definition at line 148 of file qgenericstaticcontext.cpp.

Referenced by copy().

149 {
150  Q_ASSERT(resolver);
151  m_namespaceResolver = resolver;
152 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823

◆ setOrderingEmptySequence()

void GenericStaticContext::setOrderingEmptySequence ( const OrderingEmptySequence  ordering)
virtual

Definition at line 192 of file qgenericstaticcontext.cpp.

Referenced by copy().

193 {
194  Q_ASSERT(ordering == Greatest || ordering == Least);
195  m_orderingEmptySequence = ordering;
196 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823

◆ setOrderingMode()

void GenericStaticContext::setOrderingMode ( const OrderingMode  mode)
virtual

Definition at line 181 of file qgenericstaticcontext.cpp.

Referenced by copy().

◆ setPreserveMode()

void GenericStaticContext::setPreserveMode ( const PreserveMode  mode)
virtual

Definition at line 235 of file qgenericstaticcontext.cpp.

Referenced by copy().

◆ setResourceLoader()

void GenericStaticContext::setResourceLoader ( const ResourceLoader::Ptr loader)

Definition at line 283 of file qgenericstaticcontext.cpp.

Referenced by copy().

284 {
285  m_resourceLoader = loader;
286 }

◆ sourceLocations()

StaticContext::LocationHash GenericStaticContext::sourceLocations ( ) const
virtual

Returns a hash of the contained locations.

The key is the address for the expression, and the value is its location. Note that the key cannot be dereferenced, there's no guarantee the Expression is in scope. The key is merely an identifier.

Implements QPatternist::StaticContext.

Definition at line 312 of file qgenericstaticcontext.cpp.

Referenced by dynamicContext().

313 {
314  return m_locations;
315 }

◆ uriResolver()

QAbstractUriResolver * GenericStaticContext::uriResolver ( ) const
virtual

The URI resolver in use.

If no URI resolver is in use, a null pointer is returned.

Note
You should probably use resolveURI(), which handles the case of when uriResolver() is null.

Implements QPatternist::ReportContext.

Definition at line 322 of file qgenericstaticcontext.cpp.

323 {
324  return m_uriResolver;
325 }

Properties

◆ m_baseURI

QUrl QPatternist::GenericStaticContext::m_baseURI
private

Definition at line 178 of file qgenericstaticcontext_p.h.

Referenced by baseURI(), copy(), GenericStaticContext(), and setBaseURI().

◆ m_boundarySpacePolicy

BoundarySpacePolicy QPatternist::GenericStaticContext::m_boundarySpacePolicy
private

Definition at line 170 of file qgenericstaticcontext_p.h.

Referenced by boundarySpacePolicy(), copy(), and setBoundarySpacePolicy().

◆ m_compatModeEnabled

bool QPatternist::GenericStaticContext::m_compatModeEnabled
private

Definition at line 191 of file qgenericstaticcontext_p.h.

Referenced by compatModeEnabled(), and setCompatModeEnabled().

◆ m_constructionMode

ConstructionMode QPatternist::GenericStaticContext::m_constructionMode
private

Definition at line 171 of file qgenericstaticcontext_p.h.

Referenced by constructionMode(), copy(), and setConstructionMode().

◆ m_contextItemType

ItemType::Ptr QPatternist::GenericStaticContext::m_contextItemType
private

Definition at line 186 of file qgenericstaticcontext_p.h.

Referenced by contextItemType(), copy(), and setContextItemType().

◆ m_defaultCollation

QUrl QPatternist::GenericStaticContext::m_defaultCollation
private

Definition at line 177 of file qgenericstaticcontext_p.h.

Referenced by copy(), defaultCollation(), and setDefaultCollation().

◆ m_defaultElementNamespace

QString QPatternist::GenericStaticContext::m_defaultElementNamespace
private

◆ m_defaultFunctionNamespace

QString QPatternist::GenericStaticContext::m_defaultFunctionNamespace
private

◆ m_externalVariableLoader

ExternalVariableLoader::Ptr QPatternist::GenericStaticContext::m_externalVariableLoader
private

◆ m_functionFactory

FunctionFactory::Ptr QPatternist::GenericStaticContext::m_functionFactory
private

Definition at line 172 of file qgenericstaticcontext_p.h.

Referenced by copy(), and functionSignatures().

◆ m_inheritMode

InheritMode QPatternist::GenericStaticContext::m_inheritMode
private

Definition at line 181 of file qgenericstaticcontext_p.h.

Referenced by copy(), inheritMode(), and setInheritMode().

◆ m_locations

LocationHash QPatternist::GenericStaticContext::m_locations
private

◆ m_messageHandler

QAbstractMessageHandler* QPatternist::GenericStaticContext::m_messageHandler
private

Definition at line 179 of file qgenericstaticcontext_p.h.

Referenced by copy(), dynamicContext(), and messageHandler().

◆ m_namePool

const NamePool::Ptr QPatternist::GenericStaticContext::m_namePool
private

Definition at line 185 of file qgenericstaticcontext_p.h.

Referenced by copy(), dynamicContext(), namePool(), and schemaDefinitions().

◆ m_namespaceResolver

NamespaceResolver::Ptr QPatternist::GenericStaticContext::m_namespaceResolver
private

Definition at line 182 of file qgenericstaticcontext_p.h.

Referenced by copy(), namespaceBindings(), and setNamespaceBindings().

◆ m_orderingEmptySequence

OrderingEmptySequence QPatternist::GenericStaticContext::m_orderingEmptySequence
private

◆ m_orderingMode

OrderingMode QPatternist::GenericStaticContext::m_orderingMode
private

Definition at line 176 of file qgenericstaticcontext_p.h.

Referenced by copy(), orderingMode(), and setOrderingMode().

◆ m_preserveMode

PreserveMode QPatternist::GenericStaticContext::m_preserveMode
private

Definition at line 180 of file qgenericstaticcontext_p.h.

Referenced by copy(), preserveMode(), and setPreserveMode().

◆ m_queryLanguage

QXmlQuery::QueryLanguage QPatternist::GenericStaticContext::m_queryLanguage
private

Definition at line 189 of file qgenericstaticcontext_p.h.

Referenced by copy().

◆ m_rangeSlot

VariableSlotID QPatternist::GenericStaticContext::m_rangeSlot
private

Definition at line 190 of file qgenericstaticcontext_p.h.

Referenced by allocateRangeSlot(), and currentRangeSlot().

◆ m_resourceLoader

ResourceLoader::Ptr QPatternist::GenericStaticContext::m_resourceLoader
private

Definition at line 184 of file qgenericstaticcontext_p.h.

Referenced by copy(), dynamicContext(), resourceLoader(), and setResourceLoader().

◆ m_uriResolver

QAbstractUriResolver* QPatternist::GenericStaticContext::m_uriResolver
private

Definition at line 188 of file qgenericstaticcontext_p.h.

Referenced by uriResolver().


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