58 return QtXmlPatterns::tr(
"Required cardinality is %1; got cardinality %2.")
69 if(requiredCard.
isMatch(opCard))
71 else if(requiredCard.
canMatch(opCard))
95 "It makes no sense to use CardinalityVerifier for cardinality zero-or-more.");
101 const Item next(
it->next());
105 const Item next2(
it->next());
132 return makeSingletonIterator(next);
152 const Item item(
it->next());
216 return visitor->visit(
this);
static Cardinality zeroOrMore()
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
virtual bool compatModeEnabled() const =0
virtual SequenceType::Ptr staticType() const
#define QT_END_NAMESPACE
This macro expands to.
static const SequenceType::Ptr ZeroOrMoreItems
#define it(className, varName)
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
QAbstractXmlForwardIterator< T >::Ptr makeListIterator(const QList< T > &list)
The QString class provides a Unicode character string.
static const EmptyIterator< Item >::Ptr emptyIterator
static QString wrongCardinality(const Cardinality &req, const Cardinality &got=Cardinality::empty())
static Cardinality twoOrMore()
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< Item > > Ptr
A smart pointer wrapping an instance of a QAbstractXmlForwardIterator subclass.
static Expression::Ptr verifyCardinality(const Expression::Ptr &operand, const Cardinality &card, const StaticContext::Ptr &context, const ReportContext::ErrorCode code=ReportContext::XPTY0004)
virtual const SourceLocationReflection * actualReflection() const
Returns this.
void append(const T &t)
Inserts value at the end of the list.
T * data() const
Returns a pointer to the shared data object.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void error(const QString &message, const ReportContext::ErrorCode errorCode, const QSourceLocation &sourceLocation)
virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const
The namespace for the internal API of QtXmlPatterns.
virtual Cardinality cardinality() const =0
Conceptually inserts one QAbstractXmlForwardIterator into another, make two QAbstractXmlForwardIterat...
virtual SequenceType::Ptr staticType() const =0
virtual SequenceType::List expectedOperandTypes() const
#define Q_ASSERT_X(cond, where, what)
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
bool canMatch(const Cardinality &other) const
Represents an item in the XPath 2.0 Data Model.
Expression::Ptr m_operand
CardinalityVerifier(const Expression::Ptr &operand, const Cardinality &card, const ReportContext::ErrorCode code)
virtual Item evaluateSingleton(const DynamicContext::Ptr &) const
const Cardinality m_reqCard
Represents a cardinality, a possible , often represented by occurrence indicators.
const ReportContext::ErrorCode m_errorCode
virtual ItemType::Ptr itemType() const =0
bool isMatch(const Cardinality &other) const
virtual const SourceLocationReflection * actualReflection() const
Returns this.
static Expression::Ptr createFirstItem(const Expression::Ptr &sourceExpression)
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
Base class for all instances that represents something at a certain location.
virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const
Base class for expressions that has exactly one operand.