Qt 4.8
|
Represents instances of derived xs:integer
types, such as xs:byte
.
More...
#include <qderivedinteger_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) const |
StorageType | storedValue () 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 NamePool::Ptr &np, const QString &strNumeric) |
static AtomicValue::Ptr | fromValue (const NamePool::Ptr &np, const TemporaryStorageType num) |
static AtomicValue::Ptr | fromValueUnchecked (const TemporaryStorageType num) |
static ItemType::Ptr | itemType () |
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) |
Private Types | |
typedef DerivedIntegerDetails< DerivedType >::StorageType | StorageType |
typedef DerivedIntegerDetails< DerivedType >::TemporaryStorageType | TemporaryStorageType |
Private Functions | |
DerivedInteger (const StorageType num) | |
Static Private Functions | |
template<typename A , typename B > | |
static bool | largerOrEqual (const A &a, const B &b) |
template<typename A , typename B > | |
static bool | lessThan (const A &a, const B &b) |
Properties | |
const StorageType | m_value |
Static Private Attributes | |
static const DerivedIntegerLimitsUsage | limitsUsage = DerivedIntegerDetails<DerivedType>::limitsUsage |
static const StorageType | maxInclusive = DerivedIntegerDetails<DerivedType>::maxInclusive |
static const StorageType | minInclusive = DerivedIntegerDetails<DerivedType>::minInclusive |
Related Functions | |
(Note that these are not member functions.) | |
enum | DerivedIntegerLimitsUsage |
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 |
Protected Functions inherited from QPatternist::AtomicValue | |
AtomicValue () | |
Protected Functions inherited from QPatternist::CppCastingHelper< AtomicValue > | |
CppCastingHelper () | |
Static Protected Functions inherited from QPatternist::Numeric | |
static xsDouble | roundFloat (const xsDouble val) |
Implements fn:round() for types implemented with floating point. More... | |
Represents instances of derived xs:integer
types, such as xs:byte
.
Definition at line 83 of file qderivedinteger_p.h.
|
private |
Definition at line 332 of file qderivedinteger_p.h.
|
private |
Definition at line 333 of file qderivedinteger_p.h.
|
inlineprivate |
Definition at line 341 of file qderivedinteger_p.h.
|
inlinevirtual |
Performs the algorithm specified for the function fn:abs on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 533 of file qderivedinteger_p.h.
|
inlinevirtual |
Performs the algorithm specified for the function fn:ceiling on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 528 of file qderivedinteger_p.h.
|
inlinevirtual |
Determines the Effective Boolean Value of this number.
false
if the number is 0, otherwise true
. Reimplemented from QPatternist::AtomicValue.
Definition at line 477 of file qderivedinteger_p.h.
|
inlinevirtual |
Performs the algorithm specified for the function fn:floor on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 523 of file qderivedinteger_p.h.
|
inlinestatic |
Constructs an instance from the lexical representation strNumeric
.
Definition at line 430 of file qderivedinteger_p.h.
Referenced by QPatternist::StringToDerivedIntegerCaster< type >::castFrom(), QPatternist::XsdSchemaParser::parseFractionDigitsFacet(), QPatternist::XsdSchemaParser::parseLengthFacet(), QPatternist::XsdSchemaParser::parseMaxLengthFacet(), QPatternist::XsdSchemaParser::parseMinLengthFacet(), QPatternist::XsdSchemaParser::parseMinMaxConstraint(), and QPatternist::XsdSchemaParser::parseTotalDigitsFacet().
|
inlinestatic |
Definition at line 392 of file qderivedinteger_p.h.
Referenced by QPatternist::BooleanToDerivedIntegerCaster< type >::castFrom().
|
inlinestatic |
Definition at line 421 of file qderivedinteger_p.h.
Referenced by QPatternist::AtomicValue::toXDM().
|
inlinevirtual |
false
, xs:DerivedInteger
doesn't have infinity in its value space. Implements QPatternist::Numeric.
Definition at line 558 of file qderivedinteger_p.h.
|
inlinevirtual |
false
, xs:DerivedInteger
doesn't have not-a-number in its value space. Implements QPatternist::Numeric.
Definition at line 549 of file qderivedinteger_p.h.
|
inlinevirtual |
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 568 of file qderivedinteger_p.h.
|
inlinestatic |
Definition at line 370 of file qderivedinteger_p.h.
Referenced by QPatternist::NumericToDerivedIntegerCaster< type >::castFrom().
|
inlinestaticprivate |
This function exists for the same reason that lessThan() do.
Definition at line 363 of file qderivedinteger_p.h.
|
inlinestaticprivate |
By refactoring out the simple comparison below into a template function, we avoid the warning "warning: comparison of unsigned expression < 0 is always false" with gcc when the class is instantiated with TypeUnsignedLong. The warning is a false positive since we check wehther LimitUpwards is set before instantiating.
This template function exists for no other reason.
Definition at line 354 of file qderivedinteger_p.h.
|
inlinevirtual |
Performs the algorithm specified for the function fn:round on this Numeric, and whose result is returned.
Implements QPatternist::Numeric.
Definition at line 512 of file qderivedinteger_p.h.
|
inlinevirtual |
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 518 of file qderivedinteger_p.h.
|
inline |
Definition at line 467 of file qderivedinteger_p.h.
Referenced by QPatternist::XsdSchemaParser::parseMinMaxConstraint(), and QPatternist::AtomicValue::toQt().
|
inlinevirtual |
Implements QPatternist::AtomicValue.
Definition at line 482 of file qderivedinteger_p.h.
|
inlinevirtual |
Implements QPatternist::Numeric.
Definition at line 507 of file qderivedinteger_p.h.
|
inlinevirtual |
Implements QPatternist::Numeric.
Definition at line 492 of file qderivedinteger_p.h.
|
inlinevirtual |
Implements QPatternist::Numeric.
Definition at line 502 of file qderivedinteger_p.h.
|
inlinevirtual |
Implements QPatternist::Numeric.
Definition at line 497 of file qderivedinteger_p.h.
|
inlinevirtual |
Unary minus.
Implements QPatternist::Numeric.
Definition at line 563 of file qderivedinteger_p.h.
|
inlinevirtual |
Implements QPatternist::Numeric.
Definition at line 592 of file qderivedinteger_p.h.
|
inlinevirtual |
Implements QPatternist::AtomicValue.
Definition at line 487 of file qderivedinteger_p.h.
|
related |
Definition at line 69 of file qderivedinteger_p.h.
|
staticprivate |
Definition at line 337 of file qderivedinteger_p.h.
|
private |
Definition at line 339 of file qderivedinteger_p.h.
|
staticprivate |
Definition at line 335 of file qderivedinteger_p.h.
|
staticprivate |
Definition at line 336 of file qderivedinteger_p.h.