52 #ifndef Patternist_AtomicCasters_H 53 #define Patternist_AtomicCasters_H 85 template<TypeOfDerivedString DerivedType>
214 template <const
bool IsInteger>
223 return QtXmlPatterns::tr(
"When casting to %1 from %2, the source value cannot be %3.");
230 const Numeric *
const num = from.template as<Numeric>();
234 if(num->isInf() || num->isNaN())
619 template<TypeOfDerivedInteger type>
637 template<TypeOfDerivedInteger type>
655 template<TypeOfDerivedString type>
673 template<TypeOfDerivedInteger type>
682 const Numeric *
const num = from.template as<Numeric>();
686 if(num->isInf() || num->isNaN())
Casts an xs:string instance to a derived type of xs:integer.
Casts an AbstractDuration instance to Duration.
Casts a value of type xs:boolean to xs:decimal.
#define QT_END_NAMESPACE
This macro expands to.
virtual Item castFrom(const Item &from, const QExplicitlySharedDataPointer< DynamicContext > &context) const
Casts a numeric value, such as xs:double or xs:decimal, to xs:integer or xs:decimal, depending on IsInteger.
static AtomicValue::Ptr fromValue(const NamePool::Ptr &np, const TemporaryStorageType num)
virtual Item castFrom(const Item &from, const QExplicitlySharedDataPointer< DynamicContext > &context) const
virtual Item castFrom(const Item &from, const QExplicitlySharedDataPointer< DynamicContext > &context) const
Casts any numeric instance to a derived type of xs:integer.
Casts a xs:date or xs:dateTime atomic value to xs:gDay.
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)
Item toItem(const QExplicitlySharedDataPointer< T > atomicValue)
Casts an AbstractDateTime instance to SchemaTime.
Casts a xs:string or xs:untypedAtomic atomic value to xs:base64Binary.
Casts an xs:boolean instance to a derived type of xs:integer.
The QString class provides a Unicode character string.
Casts an AbstractDateTime instance to DateTime.
Casts a xs:date or xs:dateTime atomic value to xs:gMonth.
static Item fromValue(const xsInteger num)
Casts a xs:date or xs:dateTime atomic value to xs:gYear.
virtual Item castFrom(const Item &from, const QExplicitlySharedDataPointer< DynamicContext > &context) const
Casts any atomic value to xs:untypedAtomic.
virtual Item castFrom(const Item &from, const QExplicitlySharedDataPointer< DynamicContext > &context) const
Casts an AbstractDateTime instance to SchemaTime.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QString errorMessage()
Casts an xs:boolean instance to a derived type of xs:integer.
Casts a value of type xs:boolean to xs:integer.
The namespace for the internal API of QtXmlPatterns.
static const AtomicType::Ptr xsDouble
QString stringValue() const
Returns the string value of this Item.
Casts any atomic value to xs:string.
Casts a xs:string or xs:untypedAtomic atomic value to xs:dateTime.
QExplicitlySharedDataPointer< ItemType > type() const
Returns the ItemType this Item is of.
static Decimal::Ptr fromValue(const xsDecimal num)
static QString formatData(const QString &data)
Casts a xs:string or xs:untypedAtomic atomic value to xs:hexBinary.
Casts a value to itself. Essentially, this AtomicCaster does nothing.
AtomicCaster is an abstract base class for classes that performs casting between two atomic values of...
Represents an item in the XPath 2.0 Data Model.
Casts a xs:date or xs:dateTime atomic value to xs:gYearMonth.
Casts a xs:string or xs:untypedAtomic atomic value to xs:gYear.
Base class for all numeric values.
Casts a xs:string or xs:untypedAtomic atomic value to xs:dayTimeDuration.
Casts a xs:string or xs:untypedAtomic atomic value to xs:duration.
Casts any numeric value to xs:boolean.
Casts a xs:string or xs:untypedAtomic atomic value to xs:gYearMonth.
Casts any string value, xs:string or xs:untypedAtomic, to xs:boolean.
Casts a xs:string or xs:untypedAtomic atomic value to xs:gDay.
Casts an AbstractDuration instance to DayTimeDuration.
static const AtomicType::Ptr xsFloat
Casts an AbstractDuration instance to YearMonthDuration.
Casts a xs:string or xs:untypedAtomic atomic value to xs:date.
Casts a xs:date or xs:dateTime atomic value to xs:gMonthDay.
Casts a string value, xs:string or xs:untypedAtomic, to xs:integer.
Casts a xs:string or xs:untypedAtomic atomic value to xs:gYearMonth.
Casts a xs:string or xs:untypedAtomic atomic value to xs:gMonth.
static const AtomicType::Ptr xsInteger
virtual Item castFrom(const Item &from, const QExplicitlySharedDataPointer< DynamicContext > &context) const
Casts a xs:string or xs:untypedAtomic atomic value to xs:time.
Casts a xs:string or xs:untypedAtomic atomic value to xs:yearMonthDuration.
static const AtomicType::Ptr xsDecimal
Casts a xs:hexBinary atomic value to xs:base64Binary.
Casts a xs:base64Binary atomic value to xs:hexBinary.
Represents instances of derived xs:integer types, such as xs:byte.
Casts a string value, xs:string or xs:untypedAtomic, to xs:decimal.
Casts a string value to xs:anyURI.
static ItemType::Ptr itemType()
static AtomicValue::Ptr fromLexical(const NamePool::Ptr &np, const QString &lexical)