Go to the documentation of this file.
20 #ifndef _STATICANALYSIS_HPP
21 #define _STATICANALYSIS_HPP
25 #include <xqilla/framework/XQillaExport.hpp>
38 static const int HASH_SIZE = 13;
43 VarEntry() : uri(0), name(0), hash(0), prev(0) {}
44 void set(
const XMLCh *u,
const XMLCh *n);
45 void set(
const XMLCh *u,
const XMLCh *n,
size_t h);
47 const XMLCh *
uri, *name;
134 bool _contextPosition;
137 bool _implicitTimezone;
138 bool _availableDocuments;
139 bool _availableCollections;
140 bool _forceNoFolding;
143 bool _possiblyUpdating;
145 unsigned int _properties;
148 VarEntry *_dynamicVariables[HASH_SIZE];
void setProperties(unsigned int props)
bool isNoFoldingForced() const
void availableCollectionsUsed(bool value)
VarEntry()
Definition: StaticAnalysis.hpp:43
bool isContextPositionUsed() const
void currentTimeUsed(bool value)
StaticAnalysis(const StaticAnalysis &o, XPath2MemoryManager *memMgr)
bool isVariableUsed() const
bool isContextSizeUsed() const
void set(const XMLCh *u, const XMLCh *n, size_t h)
size_t hash
Definition: StaticAnalysis.hpp:48
void forceNoFolding(bool value)
Overrides all the other flags, and never allows this sub-expression to be constant folded.
void set(const XMLCh *u, const XMLCh *n)
void creative(bool value)
void updating(bool value)
bool areDocsOrCollectionsUsed() const
const XMLCh * uri
Definition: StaticAnalysis.hpp:47
Properties
Properties that allow optimisation regarding sorting or not.
Definition: StaticAnalysis.hpp:110
StaticType & getStaticType()
void implicitTimezoneUsed(bool value)
void variableUsed(const XMLCh *namespaceURI, const XMLCh *name)
Definition: XPath2MemoryManager.hpp:46
bool removeVariable(const XMLCh *namespaceURI, const XMLCh *name)
VarEntry ** variablesUsed() const
Definition: StaticAnalysis.hpp:41
unsigned int getProperties() const
void possiblyUpdating(bool value)
VarEntry * prev
Definition: StaticAnalysis.hpp:49
StaticAnalysis(XPath2MemoryManager *memMgr)
Class that represents the static type of an expression.
Definition: StaticType.hpp:33
bool isUsed() const
Returns true if flags are set, or variables have been used.
void clear()
Clears all the information in this StaticAnalysis.
void contextItemUsed(bool value)
std::string toString() const
bool isPossiblyUpdating() const
void contextPositionUsed(bool value)
void addExceptContextFlags(const StaticAnalysis &o)
void addExceptVariable(const XMLCh *namespaceURI, const XMLCh *name, const StaticAnalysis &o)
const StaticType & getStaticType() const
bool isContextItemUsed() const
void contextSizeUsed(bool value)
void copy(const StaticAnalysis &o)
bool isUsedExceptContextFlags() const
void availableDocumentsUsed(bool value)
bool isVariableUsed(const XMLCh *namespaceURI, const XMLCh *name) const
bool areContextFlagsUsed() const
Returns true if any of the context item flags have been used.
void add(const StaticAnalysis &o)
Sets the members of this StaticAnalysis from the given StaticAnalysis.
Records access to various parts of the context during static resolution.
Definition: StaticAnalysis.hpp:36