Qt 4.8
|
Houses an AtomicValue, making it available as an Expression. More...
#include <qliteral_p.h>
Public Functions | |
virtual ExpressionVisitorResult::Ptr | accept (const ExpressionVisitor::Ptr &visitor) const |
virtual QString | description () const |
virtual bool | evaluateEBV (const DynamicContext::Ptr &context) const |
virtual Item | evaluateSingleton (const DynamicContext::Ptr &context) const |
void | evaluateToSequenceReceiver (const DynamicContext::Ptr &context) const |
virtual ID | id () const |
Item | item () const |
Literal (const Item &item) | |
virtual Properties | properties () const |
virtual SequenceType::Ptr | staticType () const |
Public Functions inherited from QPatternist::EmptyContainer | |
virtual Expression::List | operands () const |
virtual void | setOperands (const Expression::List &) |
Public Functions inherited from QPatternist::Expression | |
virtual const SourceLocationReflection * | actualReflection () const |
Returns this . More... | |
virtual void | announceFocusType (const ItemType::Ptr &itemType) |
virtual Expression::Ptr | compress (const StaticContext::Ptr &context) |
Properties | deepProperties () const |
Computes the union of properties for this Expression and all its descending children. More... | |
virtual Properties | dependencies () const |
virtual Item::Iterator::Ptr | evaluateSequence (const DynamicContext::Ptr &context) const |
virtual ItemType::Ptr | expectedContextItemType () const |
Expression () | |
bool | has (const Property prop) const |
bool | hasDependency (const Property prop) const |
bool | is (const ID id) const |
bool | isEvaluated () const |
virtual ItemType::Ptr | newFocusType () const |
virtual QList< QExplicitlySharedDataPointer< OptimizationPass > > | optimizationPasses () const |
virtual PatternPriority | patternPriority () const |
const Expression::Ptr & | rewrite (const Expression::Ptr &to, const StaticContext::Ptr &context) const |
Rewrites this Expression to to , and return to . More... | |
virtual Expression::Ptr | typeCheck (const StaticContext::Ptr &context, const SequenceType::Ptr &reqType) |
virtual | ~Expression () |
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... | |
Public Functions inherited from QPatternist::CppCastingHelper< Expression > | |
const TCastTarget * | as () const |
TCastTarget * | as () |
Public Functions inherited from QPatternist::SourceLocationReflection | |
virtual QSourceLocation | sourceLocation () const |
SourceLocationReflection () | |
virtual | ~SourceLocationReflection () |
Properties | |
const Item | m_item |
Related Functions | |
(Note that these are not member functions.) | |
Expression::Ptr | wrapLiteral (const Item &item, const StaticContext::Ptr &context, const SourceLocationReflection *const r) |
Creates a Literal that wraps item , and returns it. More... | |
Houses an AtomicValue, making it available as an Expression.
This is not only literals that can be created via the XQuery syntax(strings and numbers), but all other atomic values, such as xs:date
or xs:time
.
Definition at line 74 of file qliteral_p.h.
Literal::Literal | ( | const Item & | item | ) |
Creates a Literal that represents item
.
item | must be non-null and cannot be a QXmlNodeModelIndex. |
Definition at line 53 of file qliteral.cpp.
Referenced by wrapLiteral().
|
virtual |
Implements QPatternist::Expression.
Definition at line 79 of file qliteral.cpp.
|
virtual |
Reimplementation of SourceLocationReflection::description().
Reimplemented from QPatternist::Expression.
Definition at line 109 of file qliteral.cpp.
|
virtual |
Determines the Effective Boolean Value of the expression.
The Effective Boolean Value of a value is not necessarily the same as converting the value to a new value of type xs:boolean.
Note that this function cannot return the empty sequence, evaluateSingleton() must be overridden in order to be able to do that.
The default implementation results in a type error. Hence, this function must be overridden if such behavior is not of interest.
Reimplemented from QPatternist::Expression.
Definition at line 64 of file qliteral.cpp.
|
virtual |
|
virtual |
Evaluates this Expression by sending its output to DynamicContext::outputReceiver().
Reimplemented from QPatternist::Expression.
Definition at line 69 of file qliteral.cpp.
|
virtual |
This property, which has no setter, returns an enum value that uniquely identifies this Expression. Patternist makes no use of C++'s dynamic_cast feature, but uses this polymorphic function instead.
Reimplemented from QPatternist::Expression.
Definition at line 84 of file qliteral.cpp.
|
inline |
Declaring the return value of this function a const reference, leads to crashes in patternistview, for a to me unknown reason.
Definition at line 102 of file qliteral_p.h.
Referenced by QPatternist::CastAs::castToQName().
|
virtual |
|
virtual |
Implements QPatternist::Expression.
Definition at line 74 of file qliteral.cpp.
|
related |
Creates a Literal that wraps item
, and returns it.
This simplifies code. Instead of writing:
One can write:
This function is not declared static, because it breaks the build on at least aix-xlc-64.
Definition at line 131 of file qliteral_p.h.
|
private |
Definition at line 108 of file qliteral_p.h.
Referenced by description(), evaluateEBV(), evaluateSingleton(), evaluateToSequenceReceiver(), id(), item(), Literal(), and staticType().