79 context->
error(QtXmlPatterns::tr(
"A value of type %1 cannot have an " 80 "Effective Boolean Value.")
95 "Internal error, a null pointer cannot be passed.");
135 "QVariants sent to Patternist must be valid.");
175 if (value.
userType() == qMetaTypeId<float>())
183 "QVariants of type %1 are not supported in " 184 "Patternist, see the documentation")
205 switch(
int(v.type()))
The QVariant class acts like a union for the most common Qt data types.
static const AtomicType::Ptr xsBase64Binary
QExplicitlySharedDataPointer< AtomicValue > Ptr
virtual NamePool::Ptr namePool() const =0
#define QT_END_NAMESPACE
This macro expands to.
Base class for classes implementing values related to time, date or both.
QString toString(FormattingOptions options=None) const
Returns the human-displayable string representation of the URL.
static QVariant toQt(const AtomicValue *const value)
virtual bool hasError() const
static Date::Ptr fromDateTime(const QDateTime &date)
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
Due to strong interdependencies, this file contains the definitions for the classes Item...
The QXmlItem class contains either an XML node or an atomic value.
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
QDateTime toDateTime() const
Returns the variant as a QDateTime if the variant has type() DateTime , Date , or String ; otherwise ...
StorageType storedValue() const
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool toBool() const
Returns the variant as a bool if the variant has type() Bool.
static DateTime::Ptr fromDateTime(const QDateTime &dt)
Contains class DateTime. This file was originally called qdatetime_p.h, but various build systems can...
static Item fromValue(const xsInteger num)
static AtomicString::Ptr fromValue(const QString &value)
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QS...
static const AtomicType::Ptr xsString
The QTime class provides clock time functions.
#define QT_BEGIN_NAMESPACE
This macro expands to.
qlonglong toLongLong(bool *ok=0) const
Returns the variant as a long long int if the variant has type() LongLong , Bool , ByteArray , Char , Double , Int , String , UInt , or ULongLong ; otherwise returns 0.
const TCastTarget * as() const
void error(const QString &message, const ReportContext::ErrorCode errorCode, const QSourceLocation &sourceLocation)
bool isNode() const
Returns true if this item is a Node.
virtual bool evaluateEBV(const QExplicitlySharedDataPointer< DynamicContext > &context) const
Base class for all classes representing atomic values.
static const AtomicType::Ptr xsDateTime
The namespace for the internal API of QtXmlPatterns.
virtual ItemType::Ptr type() const =0
qulonglong toULongLong(bool *ok=0) const
Returns the variant as as an unsigned long long int if the variant has type() ULongLong ...
static const AtomicType::Ptr xsDouble
The QSourceLocation class identifies a location in a resource by URI, line, and column.
virtual QString stringValue() const =0
QVariant toAtomicValue() const
If this QXmlItem represents an atomic value, it is converted to an appropriate QVariant and returned...
const QDateTime & toDateTime() const
static Boolean::Ptr fromValue(const bool value)
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
const char * typeName() const
Returns the name of the type stored in the variant.
QUrl toUrl() const
Returns the variant as a QUrl if the variant has type() Url ; otherwise returns an invalid QUrl...
static const AnyNodeType::Ptr node
QDateTime toUTC() const
Returns a datetime containing the date and time information in this datetime, but specified using the...
static const AtomicType::Ptr xsUntypedAtomic
Implements the value instance of the xs:boolean type.
QDate date() const
Returns the date part of the datetime.
QExplicitlySharedDataPointer< ItemType > Ptr
QDate toDate() const
Returns the variant as a QDate if the variant has type() Date , DateTime , or String ; otherwise retu...
#define Q_ASSERT_X(cond, where, what)
int userType() const
Returns the storage type of the value stored in the variant.
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
The QDateTime class provides date and time functions.
Represents an item in the XPath 2.0 Data Model.
static const AtomicType::Ptr xsQName
Base class for all numeric values.
virtual xsInteger toInteger() const =0
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
bool isAtomicValue() const
Returns true if this item is an atomic value.
static const AtomicType::Ptr xsFloat
Implements the value instance of the xs:QName type.
virtual xsDouble toDouble() const =0
static Numeric::Ptr fromValue(const xsDouble num)
float toFloat(bool *ok=0) const
Returns the variant as a float if the variant has type() Double , QMetaType::Float ...
static SchemaTime::Ptr fromDateTime(const QDateTime &dt)
static const AtomicType::Ptr xsInteger
double toDouble(bool *ok=0) const
Returns the variant as a double if the variant has type() Double , QMetaType::Float ...
static HexBinary::Ptr fromValue(const QByteArray &data)
const QByteArray & asByteArray() const
static const AtomicType::Ptr xsDecimal
static AtomicValue::Ptr fromValueUnchecked(const TemporaryStorageType num)
static const AtomicType::Ptr xsBoolean
Represents instances of derived xs:integer types, such as xs:byte.
static const AtomicType::Ptr xsDate
T value() const
Returns the stored value converted to the template type T.
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
static ItemType::Ptr qtToXDMType(const QXmlItem &item)
Implements the value instance of the xs:base64Binary type.
#define qPrintable(string)
static Item toXDM(const QVariant &value)
static const AtomicType::Ptr xsHexBinary
static const AtomicType::Ptr xsUnsignedLong
static const AtomicType::Ptr xsAnyURI
bool isNull() const
Returns true if this QXmlItem is neither a node nor an atomic value.