99 , m_reflection(reflection)
122 return mather->
calculate(op1, op, op2, context);
172 const bool issueError,
200 (static_cast<const AtomicType *>(t1.data())->mathematicianLocator());
207 context->error(QtXmlPatterns::tr(
208 "Operator %1 cannot be used on type %2.")
216 (static_cast<const AtomicType *>(t2.data())->
accept(locator, op, reflection));
224 context->error(QtXmlPatterns::tr(
"Operator %1 cannot be used on " 225 "atomic values of type %2 and %3.")
243 if(st1->cardinality().allowsEmpty() ||
244 st2->cardinality().allowsEmpty())
339 returnType = t1 | t2;
347 return makeGenericSequenceType(returnType, card);
360 return visitor->visit(
this);
virtual bool compatModeEnabled() const =0
static const AtomicType::Ptr xsDayTimeDuration
#define QT_END_NAMESPACE
This macro expands to.
QString formatKeyword(const QString &keyword)
static const AtomicType::Ptr xsDuration
const SourceLocationReflection *const m_reflection
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
static Expression::Ptr create(const Expression *const replacementFor, const StaticContext::Ptr &context)
Creates an EmptySequence that is a replacement for replacementFor.
static const AtomicType::Ptr xsYearMonthDuration
static const AtomicType::Ptr xsString
virtual const SourceLocationReflection * actualReflection() const
Returns this.
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static const AtomicType::Ptr xsDateTime
static QString displayName(const AtomicMathematician::Operator op)
The namespace for the internal API of QtXmlPatterns.
static const AtomicType::Ptr xsDouble
QExplicitlySharedDataPointer< AtomicMathematician > Ptr
ArithmeticExpression(const Expression::Ptr &operand1, const AtomicMathematician::Operator op, const Expression::Ptr &operand2)
virtual SequenceType::List expectedOperandTypes() const
static const AtomicType::Ptr xsUntypedAtomic
Houses an AtomicValue, making it available as an Expression.
QExplicitlySharedDataPointer< Expression > Ptr
A smart pointer wrapping mutable Expression instances.
static AtomicMathematician::Ptr fetchMathematician(Expression::Ptr &t1, Expression::Ptr &t2, const AtomicMathematician::Operator op, const bool issueError, const ReportContext::Ptr &context, const SourceLocationReflection *const reflection, const ReportContext::ErrorCode code=ReportContext::XPTY0004, const bool isCompat=false)
virtual SequenceType::Ptr staticType() const =0
static const EmptySequenceType::Ptr Empty
static Cardinality zeroOrOne()
DelegatingReflectionExpression(const Item &item, const SourceLocationReflection *const reflection)
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
Represents an item in the XPath 2.0 Data Model.
static const AtomicType::Ptr xsFloat
AtomicMathematician::Ptr m_mather
Contains class Numeric. This file was originally called qnumeric_p.h, but various build systems canno...
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
static const AtomicType::Ptr numeric
static const AtomicType::Ptr xsInteger
static Cardinality exactlyOne()
Casts every item in a sequence obtained from evaluating an Expression, to a requested atomic type...
static const AtomicType::Ptr xsTime
Expression::Ptr m_operand1
virtual SequenceType::Ptr staticType() const
static const AtomicType::Ptr xsDecimal
static const AtomicType::Ptr xsAnyAtomicType
Represents a cardinality, a possible , often represented by occurrence indicators.
virtual ItemType::Ptr itemType() const =0
Expression::Ptr m_operand2
static const AtomicType::Ptr xsDate
virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const
static const SequenceType::Ptr ZeroOrOneAtomicType
virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
static Item flexiblyCalculate(const Item &op1, const AtomicMathematician::Operator op, const Item &op2, const AtomicMathematician::Ptr &mather, const DynamicContext::Ptr &context, const SourceLocationReflection *const reflection, const ReportContext::ErrorCode code=ReportContext::XPTY0004, const bool isCompat=false)
virtual Item calculate(const Item &operand1, const Operator op, const Item &operand2, const QExplicitlySharedDataPointer< DynamicContext > &context) const =0
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
const AtomicMathematician::Operator m_op
The QList class is a template class that provides lists.
Base class for all instances that represents something at a certain location.
Base class for expressions that has exactly two operands.