52 #ifndef Patternist_Cardinality_H 53 #define Patternist_Cardinality_H 55 #include <QtCore/QtGlobal> 189 "A count smaller than 0 makes no sense.");
207 "minimum should never be less than 0.");
209 "minimum cannot be larger than maximum.");
288 else if(other.
m_max == -1)
353 return m_min > 0 && (
m_max == -1 || m_max >= 1);
408 else if(other.
m_max == -1)
435 else if(other.
m_max == -1)
463 "One of the cardinalities are invalid.");
468 if(other.
m_max == -1)
485 "One of the cardinalities are invalid.");
static Cardinality zeroOrMore()
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
bool operator!=(const Cardinality &other) const
Cardinality & operator=(const Cardinality &other)
QString displayName(const CustomizeDisplayName explanation) const
The QString class provides a Unicode character string.
static Cardinality fromExact(const Count count)
bool isExactlyOne() const
Cardinality operator*(const Cardinality &other) const
static Cardinality twoOrMore()
bool operator==(const Cardinality &other) const
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Cardinality & operator+=(const Cardinality &other)
static Cardinality empty()
#define QT_BEGIN_NAMESPACE
This macro expands to.
static Cardinality fromCount(const Count count)
Cardinality operator &(const Cardinality &other) const
static Cardinality oneOrMore()
The namespace for the internal API of QtXmlPatterns.
Cardinality operator+(const Cardinality &other) const
Cardinality operator|(const Cardinality &other) const
#define Q_ASSERT_X(cond, where, what)
static Cardinality zeroOrOne()
bool canMatch(const Cardinality &other) const
Cardinality toWithoutMany() const
Cardinality(const Cardinality &other)
Cardinality & operator|=(const Cardinality &other)
static Cardinality exactlyOne()
Cardinality(const Count min, const Count max)
Represents a cardinality, a possible , often represented by occurrence indicators.
bool isMatch(const Cardinality &other) const
Q_DECLARE_TYPEINFO(QPatternist::Cardinality, Q_MOVABLE_TYPE)
static Cardinality fromRange(const Count minimum, const Count maximum)