Qt 4.8
|
Houses a sequence of atomic values, making it available as an Expression. More...
#include <qliteralsequence_p.h>
Public Functions | |
virtual ExpressionVisitorResult::Ptr | accept (const ExpressionVisitor::Ptr &visitor) const |
virtual Item::Iterator::Ptr | evaluateSequence (const DynamicContext::Ptr &context) const |
virtual ID | id () const |
LiteralSequence (const Item::List &list) | |
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 QString | description () const |
virtual bool | evaluateEBV (const DynamicContext::Ptr &context) const |
virtual Item | evaluateSingleton (const DynamicContext::Ptr &context) const |
virtual void | evaluateToSequenceReceiver (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::List | m_list |
Houses a sequence of atomic values, 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
. It is not guaranteed that consecutive atomic values are represented in a LiteralSequence.
Definition at line 75 of file qliteralsequence_p.h.
LiteralSequence::LiteralSequence | ( | const Item::List & | list | ) |
Creates a LiteralSequence that represents item
.
list | the list of item. No entry may be null . The list must at least be two entries large. |
Definition at line 52 of file qliteralsequence.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 77 of file qliteralsequence.cpp.
|
virtual |
Evaluate this Expression by iterating over it. This is a central function for evaluating expressions.
Expressions must always always return a valid QAbstractXmlForwardIterator and may never return 0. If an empty result is of interest to be returned, the EmptyIterator should be returned.
The default implementation returns a SingletonIterator over the item returned from evaluateSingleton().
Reimplemented from QPatternist::Expression.
Definition at line 57 of file qliteralsequence.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 82 of file qliteralsequence.cpp.
|
virtual |
The default implementation returns 0. Override and let the function return a different value, if that's of interest.
An important decision when re-implementing properties() is whether to OR in the properties() of ones operands. For instance, if an operand has RequiresFocus set, that flag nost likely applies to the apparent as well, since it depends on its operand.
Reimplemented from QPatternist::Expression.
Definition at line 87 of file qliteralsequence.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 62 of file qliteralsequence.cpp.
|
private |
Definition at line 96 of file qliteralsequence_p.h.
Referenced by evaluateSequence(), and staticType().