80 bool conversionOk =
false;
81 const xsDecimal num = strNumericTrimmed.toDouble(&conversionOk);
117 static_cast<void>(
qdtoa(value, 0, 0, &decimalPoint, &sign, 0, &result));
130 valueAsString += qret.
left(decimalPoint);
132 if (qret.
size() <= decimalPoint)
135 valueAsString += qret.
mid(decimalPoint);
142 for(
int d = decimalPoint;
d < 0;
d++)
145 valueAsString += qret;
148 return valueAsString;
180 "It makes no sense to call this function, see Numeric::toUnsignedInteger().");
230 "It makes no sense to call this function, see Numeric::isSigned().");
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Base template class for Float and Double classes.
QExplicitlySharedDataPointer< AtomicValue > Ptr
bool evaluateEBV(const QExplicitlySharedDataPointer< DynamicContext > &) const
#define QT_END_NAMESPACE
This macro expands to.
static AtomicValue::Ptr fromLexical(const QString &strNumeric)
virtual QString stringValue() const
virtual bool isNaN() const
static AtomicValue::Ptr createError(const QString &description=QString(), const ReportContext::ErrorCode=ReportContext::FORG0001)
virtual Numeric::Ptr floor() const
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
virtual bool isSigned() const
Returns true if this value is signed. If false is returned, the value is unsigned.
virtual qulonglong toUnsignedInteger() const
virtual xsInteger toInteger() const
virtual Item toNegated() const
T * data() const
Returns a pointer to the shared data object.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
int size() const
Returns the number of characters in this string.
virtual xsDouble toDouble() const
The namespace for the internal API of QtXmlPatterns.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
virtual Numeric::Ptr ceiling() const
virtual ItemType::Ptr type() const
static Decimal::Ptr fromValue(const xsDecimal num)
virtual Numeric::Ptr abs() const
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
#define Q_ASSERT_X(cond, where, what)
Represents an item in the XPath 2.0 Data Model.
static bool isEqual(const xsDouble a, const xsDouble b)
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
virtual xsDecimal toDecimal() const
virtual xsFloat toFloat() const
virtual Numeric::Ptr round() const
static const AtomicType::Ptr xsDecimal
virtual bool isInf() const
Decimal(const xsDecimal num)
static xsDouble roundFloat(const xsDouble val)
Implements fn:round() for types implemented with floating point.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QExplicitlySharedDataPointer< Numeric > Ptr
static QString toString(const xsDecimal value)
virtual Numeric::Ptr roundHalfToEven(const xsInteger scale) const