52 #ifndef Patternist_DerivedInteger_H 53 #define Patternist_DerivedInteger_H 94 static const StorageType maxInclusive = 127;
95 static const StorageType minInclusive = -128;
96 static const DerivedIntegerLimitsUsage limitsUsage =
LimitBoth;
113 static const StorageType maxInclusive =
Q_INT64_C(2147483647);
114 static const StorageType minInclusive =
Q_INT64_C(-2147483648);
115 static const DerivedIntegerLimitsUsage limitsUsage =
LimitBoth;
132 static const StorageType maxInclusive =
Q_INT64_C(9223372036854775807);
138 static const StorageType minInclusive = -(
Q_INT64_C(9223372036854775807)) - 1;
140 static const DerivedIntegerLimitsUsage limitsUsage =
LimitBoth;
157 static const StorageType maxInclusive = -1;
177 static const StorageType minInclusive = 0;
195 static const StorageType maxInclusive = 0;
215 static const StorageType minInclusive = 1;
233 static const StorageType maxInclusive = 32767;
234 static const StorageType minInclusive = -32768;
235 static const DerivedIntegerLimitsUsage limitsUsage =
LimitBoth;
252 static const StorageType maxInclusive = 255;
253 static const StorageType minInclusive = 0;
254 static const DerivedIntegerLimitsUsage limitsUsage =
LimitBoth;
271 static const StorageType maxInclusive =
Q_UINT64_C(4294967295);
272 static const StorageType minInclusive = 0;
273 static const DerivedIntegerLimitsUsage limitsUsage =
LimitBoth;
290 static const StorageType maxInclusive =
Q_UINT64_C(18446744073709551615);
291 static const StorageType minInclusive = 0;
292 static const DerivedIntegerLimitsUsage limitsUsage =
LimitBoth;
309 static const StorageType maxInclusive = 65535;
310 static const StorageType minInclusive = 0;
311 static const DerivedIntegerLimitsUsage limitsUsage =
LimitBoth;
328 template<TypeOfDerivedInteger DerivedType>
353 template<
typename A,
typename B>
362 template<
typename A,
typename B>
397 const StorageType minimum = minInclusive;
403 "Value %1 of type %2 exceeds maximum (%3).")
412 "Value %1 of type %2 is below minimum (%3).")
432 bool conversionOk =
false;
433 TemporaryStorageType num;
447 conversionOk =
false;
462 return fromValue(np, num);
494 return static_cast<xsDouble>(m_value);
504 return static_cast<xsFloat>(m_value);
606 "It makes no sense to call this function, see Numeric::toUnsignedInteger().");
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
xsInteger TemporaryStorageType
DerivedIntegerDetails< DerivedType >::TemporaryStorageType TemporaryStorageType
QExplicitlySharedDataPointer< AtomicValue > Ptr
qlonglong toLongLong(bool *ok=0, int base=10) const
Returns the string converted to a long long using base base, which is 10 by default and must be betwe...
static const AtomicType::Ptr xsInt
#define QT_END_NAMESPACE
This macro expands to.
qint64 TemporaryStorageType
virtual Numeric::Ptr ceiling() const
const StorageType m_value
static AtomicValue::Ptr fromValue(const NamePool::Ptr &np, const TemporaryStorageType num)
qulonglong toULongLong(bool *ok=0, int base=10) const
Returns the string converted to an unsigned long long using base base, which is 10 by default and mus...
virtual qulonglong toUnsignedInteger() const
static const AtomicType::Ptr xsShort
static const AtomicType::Ptr xsNegativeInteger
static const AtomicType::Ptr xsByte
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
static AtomicValue::Ptr fromLexical(const NamePool::Ptr &np, const QString &strNumeric)
static AtomicValue::Ptr createError(const QString &description=QString(), const ReportContext::ErrorCode=ReportContext::FORG0001)
StorageType storedValue() const
bool evaluateEBV(const QExplicitlySharedDataPointer< DynamicContext > &) const
virtual xsInteger toInteger() const
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
long ASN1_INTEGER_get ASN1_INTEGER * a
virtual Numeric::Ptr round() const
StorageType TemporaryStorageType
The QString class provides a Unicode character string.
DerivedIntegerDetails< DerivedType >::StorageType StorageType
virtual xsDecimal toDecimal() const
StorageType TemporaryStorageType
virtual Numeric::Ptr floor() const
static Item fromValue(const xsInteger num)
static const AtomicType::Ptr xsUnsignedByte
StorageType TemporaryStorageType
qint64 TemporaryStorageType
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool lessThan(const QChar *a, int l, const char *c)
virtual bool isSigned() const
Returns true if this value is signed. If false is returned, the value is unsigned.
DerivedIntegerLimitsUsage
virtual bool isNaN() const
static const AtomicType::Ptr xsUnsignedInt
The namespace for the internal API of QtXmlPatterns.
StorageType TemporaryStorageType
static QString formatData(const QString &data)
DerivedInteger(const StorageType num)
static bool largerOrEqual(const A &a, const B &b)
virtual QString stringValue() const
static const AtomicType::Ptr xsNonNegativeInteger
QExplicitlySharedDataPointer< ItemType > Ptr
StorageType TemporaryStorageType
#define Q_ASSERT_X(cond, where, what)
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
Represents an item in the XPath 2.0 Data Model.
xsInteger TemporaryStorageType
Base class for all numeric values.
static const AtomicType::Ptr xsNonPositiveInteger
virtual Item toNegated() const
xsInteger TemporaryStorageType
virtual xsFloat toFloat() const
virtual ItemType::Ptr type() const
virtual xsDouble toDouble() const
virtual Numeric::Ptr roundHalfToEven(const xsInteger) const
virtual Numeric::Ptr abs() const
qint64 TemporaryStorageType
StorageType TemporaryStorageType
virtual bool isInf() const
static const AtomicType::Ptr xsUnsignedShort
static AtomicValue::Ptr fromValueUnchecked(const TemporaryStorageType num)
static const AtomicType::Ptr xsPositiveInteger
Represents instances of derived xs:integer types, such as xs:byte.
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
static const AtomicType::Ptr xsLong
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static const AtomicType::Ptr xsUnsignedLong
static ItemType::Ptr itemType()
static bool lessThan(const A &a, const B &b)
QExplicitlySharedDataPointer< Numeric > Ptr