Qt 4.8
|
Implements the value instance of the xs:decimal
type.
More...
#include <qdecimal_p.h>
Public Functions | |
virtual Numeric::Ptr | abs () const |
virtual Numeric::Ptr | ceiling () const |
bool | evaluateEBV (const QExplicitlySharedDataPointer< DynamicContext > &) const |
virtual Numeric::Ptr | floor () const |
virtual bool | isInf () const |
virtual bool | isNaN () const |
virtual bool | isSigned () const |
Returns true if this value is signed. If false is returned, the value is unsigned. More... | |
virtual Numeric::Ptr | round () const |
virtual Numeric::Ptr | roundHalfToEven (const xsInteger scale) const |
virtual QString | stringValue () const |
virtual xsDecimal | toDecimal () const |
virtual xsDouble | toDouble () const |
virtual xsFloat | toFloat () const |
virtual xsInteger | toInteger () const |
virtual Item | toNegated () const |
virtual qulonglong | toUnsignedInteger () const |
virtual ItemType::Ptr | type () const |
Public Functions inherited from QPatternist::AtomicValue | |
virtual bool | hasError () const |
virtual | ~AtomicValue () |
Public Functions inherited from QSharedData | |
QSharedData () | |
Constructs a QSharedData object with a reference count of 0. More... | |
QSharedData (const QSharedData &) | |
Constructs a QSharedData object with reference count 0. More... | |
Public Functions inherited from QPatternist::CppCastingHelper< AtomicValue > | |
const TCastTarget * | as () const |
TCastTarget * | as () |
Static Public Functions | |
static AtomicValue::Ptr | fromLexical (const QString &strNumeric) |
static Decimal::Ptr | fromValue (const xsDecimal num) |
static QString | toString (const xsDecimal value) |
Static Public Functions inherited from QPatternist::Numeric | |
static AtomicValue::Ptr | fromLexical (const QString &number) |
Static Public Functions inherited from QPatternist::AtomicValue | |
static ItemType::Ptr | qtToXDMType (const QXmlItem &item) |
static QVariant | toQt (const AtomicValue *const value) |
static QVariant | toQt (const AtomicValue::Ptr &value) |
static Item | toXDM (const QVariant &value) |
Protected Functions | |
Decimal (const xsDecimal num) | |
Protected Functions inherited from QPatternist::AtomicValue | |
AtomicValue () | |
Protected Functions inherited from QPatternist::CppCastingHelper< AtomicValue > | |
CppCastingHelper () | |
Properties | |
const xsDecimal | m_value |
Additional Inherited Members | |
Public Types inherited from QPatternist::Numeric | |
typedef QExplicitlySharedDataPointer< Numeric > | Ptr |
Public Types inherited from QPatternist::AtomicValue | |
typedef QList< AtomicValue::Ptr > | List |
typedef QExplicitlySharedDataPointer< AtomicValue > | Ptr |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Static Protected Functions inherited from QPatternist::Numeric | |
static xsDouble | roundFloat (const xsDouble val) |
Implements fn:round() for types implemented with floating point. More... | |
Implements the value instance of the xs:decimal
type.
Definition at line 76 of file qdecimal_p.h.
|
protected |
Definition at line 55 of file qdecimal.cpp.
Referenced by abs(), ceiling(), floor(), fromLexical(), fromValue(), and round().
|
virtual |
Performs the algorithm specified for the function fn:abs on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 204 of file qdecimal.cpp.
|
virtual |
Performs the algorithm specified for the function fn:ceiling on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 199 of file qdecimal.cpp.
|
virtual |
Gets the Effective Boolean Value of this number.
false
if the number is 0 or NaN
, otherwise true
. Reimplemented from QPatternist::AtomicValue.
Definition at line 89 of file qdecimal.cpp.
|
virtual |
Performs the algorithm specified for the function fn:floor on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 194 of file qdecimal.cpp.
Referenced by toString().
|
static |
Creates a Decimal from the lexical representation of xs:decimal
stored in strNumeric
.
A possible optimization is to create an Integer if the string ends with ".0". But this is not conformant. For example, the user writes N.0 which according to the specification is an xs:decimal, but where the expression is, is an xs:integer is required. That would pass with such an optimization.
Definition at line 64 of file qdecimal.cpp.
Referenced by QPatternist::StringToDecimalCaster::castFrom(), QPatternist::Numeric::fromLexical(), QPatternist::XSLTTokenizer::handleXSLTVersion(), and QPatternist::yyparse().
|
static |
Definition at line 59 of file qdecimal.cpp.
Referenced by QPatternist::DecimalMathematician::calculate(), QPatternist::IntegerMathematician::calculate(), QPatternist::DurationDurationMathematician::calculate(), QPatternist::NumericToDecimalCaster< IsInteger >::castFrom(), and toNegated().
|
virtual |
false
, xs:decimal doesn't have infinity in its value space. Implements QPatternist::Numeric.
Definition at line 214 of file qdecimal.cpp.
|
virtual |
false
, xs:decimal doesn't have not-a-number in its value space. Implements QPatternist::Numeric.
Definition at line 209 of file qdecimal.cpp.
|
virtual |
Returns true
if this value is signed. If false
is returned, the value is unsigned.
For float and decimal values, xs:double
, xs:float
and xs:decimal
, the code asserts and behavior is undefined.
Implements QPatternist::Numeric.
Definition at line 227 of file qdecimal.cpp.
|
virtual |
Performs the algorithm specified for the function fn:round on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 184 of file qdecimal.cpp.
|
virtual |
Performs rounding as defined for the fn:round-half-to-even on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 189 of file qdecimal.cpp.
|
virtual |
Implements QPatternist::AtomicValue.
Definition at line 94 of file qdecimal.cpp.
|
virtual |
Implements QPatternist::Numeric.
Definition at line 172 of file qdecimal.cpp.
|
virtual |
Implements QPatternist::Numeric.
Definition at line 157 of file qdecimal.cpp.
Referenced by QPatternist::XsdTypeChecker::checkConstrainingFacetsDecimal().
|
virtual |
Implements QPatternist::Numeric.
Definition at line 167 of file qdecimal.cpp.
|
virtual |
Implements QPatternist::Numeric.
Definition at line 162 of file qdecimal.cpp.
|
virtual |
Unary minus.
Implements QPatternist::Numeric.
Definition at line 219 of file qdecimal.cpp.
Converts value
into a canonical string representation for xs:decimal
. This function is used internally by various classes. Users probably wants to call stringValue() which in turn calls this function.
Definition at line 99 of file qdecimal.cpp.
Referenced by stringValue(), and QPatternist::AbstractFloat< isDouble >::stringValue().
|
virtual |
Implements QPatternist::Numeric.
Definition at line 177 of file qdecimal.cpp.
|
virtual |
Implements QPatternist::AtomicValue.
Definition at line 152 of file qdecimal.cpp.
|
private |
Definition at line 148 of file qdecimal_p.h.
Referenced by abs(), ceiling(), evaluateEBV(), floor(), round(), stringValue(), toDecimal(), toDouble(), toFloat(), toInteger(), and toNegated().