Qt 4.8
|
Represents an item in the XPath 2.0 Data Model. More...
#include <qitem_p.h>
Public Types | |
typedef QPatternist::EmptyIterator< Item > | EmptyIterator |
typedef QAbstractXmlForwardIterator< Item > | Iterator |
typedef QList< Item > | List |
typedef QPatternist::SingletonIterator< Item > | SingletonIterator |
typedef QVector< Item > | Vector |
Public Functions | |
template<typename TCastTarget > | |
TCastTarget * | as () const |
const AtomicValue * | asAtomicValue () const |
const QXmlNodeModelIndex & | asNode () const |
bool | isAtomicValue () const |
Determines whether this item is an atomic value, or a node. More... | |
bool | isNode () const |
Determines whether this item is an atomic value, or a node. More... | |
bool | isNull () const |
Item () | |
Item (const QXmlNodeModelIndex &n) | |
Item (const Item &other) | |
Item (const AtomicValue::Ptr &a) | |
Item (const AtomicValue *const a) | |
operator bool () const | |
Item & | operator= (const Item &other) |
void | reset () |
Item::Iterator::Ptr | sequencedTypedValue () const |
Returns the typed value of this item. More... | |
QString | stringValue () const |
Returns the string value of this Item. More... | |
QExplicitlySharedDataPointer< ItemType > | type () const |
Returns the ItemType this Item is of. More... | |
~Item () | |
Static Public Functions | |
static Item | fromPublic (const QXmlItem &i) |
static QXmlItem | toPublic (const Item &i) |
Properties | |
union { | |
const AtomicValue * atomicValue | |
NodeIndexStorage node | |
}; | |
Friends | |
class | ::QXmlItem |
Represents an item in the XPath 2.0 Data Model.
There exists two types of items: nodes and atomic values.
The XQuery 1.0 and XPath 2.0 Data Model and XML Path Language (XPath) 2.0 specification makes a very strong distinction between a sequence of items and an atomized sequence.
typedef QList<Item> QPatternist::Item::List |
typedef QVector<Item> QPatternist::Item::Vector |
|
inline |
|
inline |
Definition at line 213 of file qitem_p.h.
|
inline |
Definition at line 217 of file qitem_p.h.
|
inline |
Definition at line 225 of file qitem_p.h.
|
inline |
Definition at line 238 of file qitem_p.h.
|
inline |
Definition at line 252 of file qitem_p.h.
|
inline |
Definition at line 278 of file qitem_p.h.
Referenced by QPatternist::ComparingAggregator< oper, result >::applyNumericPromotion(), QPatternist::DecimalMathematician::calculate(), QPatternist::IntegerMathematician::calculate(), QPatternist::DurationNumericMathematician::calculate(), QPatternist::DurationDurationMathematician::calculate(), QPatternist::DateTimeDurationMathematician::calculate(), QPatternist::AbstractDateTimeMathematician::calculate(), QPatternist::HexBinaryToBase64BinaryCaster::castFrom(), QPatternist::Base64BinaryToHexBinaryCaster::castFrom(), QPatternist::NumericToBooleanCaster::castFrom(), QPatternist::BooleanToDecimalCaster::castFrom(), QPatternist::BooleanToIntegerCaster::castFrom(), QPatternist::AbstractDateTimeToGYearCaster::castFrom(), QPatternist::AbstractDateTimeToGYearMonthCaster::castFrom(), QPatternist::AbstractDateTimeToGMonthCaster::castFrom(), QPatternist::AbstractDateTimeToGMonthDayCaster::castFrom(), QPatternist::AbstractDateTimeToGDayCaster::castFrom(), QPatternist::AbstractDateTimeToDateTimeCaster::castFrom(), QPatternist::AbstractDateTimeToDateCaster::castFrom(), QPatternist::AbstractDateTimeToTimeCaster::castFrom(), QPatternist::AbstractDurationToDurationCaster::castFrom(), QPatternist::AbstractDurationToDayTimeDurationCaster::castFrom(), QPatternist::AbstractDurationToYearMonthDurationCaster::castFrom(), QPatternist::CastAs::castToQName(), QPatternist::BooleanComparator::compare(), QPatternist::AbstractFloatComparator::compare(), QPatternist::DecimalComparator::compare(), QPatternist::IntegerComparator::compare(), QPatternist::AbstractDateTimeComparator::compare(), QPatternist::AbstractDurationComparator::compare(), QPatternist::BinaryDataComparator::equals(), QPatternist::BooleanComparator::equals(), QPatternist::AbstractFloatComparator::equals(), QPatternist::DecimalComparator::equals(), QPatternist::IntegerComparator::equals(), QPatternist::QNameComparator::equals(), QPatternist::AbstractDateTimeComparator::equals(), QPatternist::AbstractDurationComparator::equals(), QPatternist::Boolean::evaluateEBV(), QPatternist::CastableAs::evaluateEBV(), QPatternist::InsertBeforeFN::evaluateSequence(), QPatternist::RemoveFN::evaluateSequence(), QPatternist::SubsequenceFN::evaluateSequence(), QPatternist::FunctionAvailableFN::evaluateSingleton(), QPatternist::ErrorFN::evaluateSingleton(), QPatternist::AdjustTimezone::evaluateSingleton(), QPatternist::UnaryExpression::evaluateSingleton(), QPatternist::PrefixFromQNameFN::evaluateSingleton(), QPatternist::SubstringFN::evaluateSingleton(), QPatternist::LocalNameFromQNameFN::evaluateSingleton(), QPatternist::NumberFN::evaluateSingleton(), QPatternist::NamespaceURIFromQNameFN::evaluateSingleton(), QPatternist::RoundHalfToEvenFN::evaluateSingleton(), QPatternist::RemoveFN::evaluateSingleton(), qLess< Item::List >::isNaN(), QPatternist::OrderBy::mapToSequence(), and qLess< Item::List >::operator()().
|
inline |
Definition at line 373 of file qitem_p.h.
Referenced by fromPublic(), QAbstractXmlReceiver::item(), and QXmlItem::QXmlItem().
|
inline |
Definition at line 379 of file qitem_p.h.
Referenced by QPatternist::AxisStep::evaluateSequence(), QPatternist::UnparsedEntityPublicIDFN::evaluateSingleton(), QPatternist::UnparsedEntityURIFN::evaluateSingleton(), QPatternist::GenerateIDFN::evaluateSingleton(), QPatternist::AxisStep::evaluateSingleton(), QPatternist::ParentNodeAxis::evaluateSingleton(), QPatternist::LangFN::evaluateSingleton(), QPatternist::RootFN::evaluateSingleton(), QPatternist::BuiltinNodeType< kind >::itemMatches(), QPatternist::XSLTNodeTest::itemMatches(), QPatternist::LocalNameTest::itemMatches(), QPatternist::NamespaceNameTest::itemMatches(), QPatternist::QNameTest::itemMatches(), QPatternist::NodeSortExpression::lessThanUsingNodeModel(), QPatternist::ExceptIterator::next(), QPatternist::UnionIterator::next(), QPatternist::IntersectIterator::next(), QPatternist::DeduplicateIterator::next(), QPatternist::XSLTSimpleContentConstructor::processItem(), QAbstractXmlReceiver::sendAsNode(), QPatternist::QAbstractXmlReceiver::sendAsNode(), and sequencedTypedValue().
Definition at line 408 of file qitem_p.h.
Referenced by QXmlQueryPrivate::dynamicContext(), QXmlItem::isNode(), and QPatternist::VariableLoader::itemForName().
|
inline |
Determines whether this item is an atomic value, or a node.
If this Item is null
, false
is returned.
true
if it is an atomic value, otherwise false
. Definition at line 335 of file qitem_p.h.
Referenced by QPatternist::Path::evaluateSequence(), fromPublic(), QPatternist::Literal::id(), QPatternist::CastingPlatform< UntypedAtomicConverter, true >::issueCastError(), QXmlFormatter::item(), QXmlSerializer::item(), QPatternist::AccelTreeBuilder< true >::item(), QPatternist::Literal::Literal(), QPatternist::ArgumentConverter::mapToSequence(), QPatternist::PullBridge::next(), operator=(), and sequencedTypedValue().
|
inline |
Determines whether this item is an atomic value, or a node.
If this Item is null
, false is returned.
true
if this item is a node, otherwise false
. Definition at line 349 of file qitem_p.h.
Referenced by QPatternist::Boolean::evaluateEBV(), QXmlItem::isNode(), QAbstractXmlReceiver::item(), QXmlSerializer::item(), QPatternist::DocumentContentValidator::item(), QPatternist::OutputValidator::item(), QPatternist::NumericType::itemMatches(), QPatternist::AnyNodeType::itemMatches(), QPatternist::BuiltinNodeType< kind >::itemMatches(), QPatternist::XSLTNodeTest::itemMatches(), QPatternist::NamespaceNameTest::itemMatches(), QPatternist::QNameTest::itemMatches(), QPatternist::LocalNameTest::itemMatches(), QPatternist::EBVType::itemMatches(), QPatternist::AtomicType::itemMatches(), QPatternist::NodeSortExpression::lessThanUsingNodeModel(), QPatternist::PullBridge::next(), QPatternist::XSLTSimpleContentConstructor::processItem(), QAbstractXmlReceiver::sendAsNode(), and QPatternist::QAbstractXmlReceiver::sendAsNode().
|
inline |
Definition at line 394 of file qitem_p.h.
|
inline |
Definition at line 389 of file qitem_p.h.
Definition at line 258 of file qitem_p.h.
|
inline |
Definition at line 399 of file qitem_p.h.
Referenced by QPatternist::UnionIterator::next(), QPatternist::ToCodepointsIterator::next(), QPatternist::SubsequenceIterator::next(), QPatternist::RemovalIterator::next(), QPatternist::InsertionIterator::next(), QPatternist::IndexOfIterator::next(), QPatternist::DistinctIterator::next(), and QPatternist::RangeIterator::next().
Item::Iterator::Ptr Item::sequencedTypedValue | ( | ) | const |
Returns the typed value of this item.
Conceptually, this functions corresponds to the dm:typed-value
accessor. Here are examples of what the typed value of an Item is:
xs:string
xs:dateTime
instances.Definition at line 50 of file qitem.cpp.
Referenced by QPatternist::ArgumentConverter::mapToSequence(), QPatternist::Atomizer::mapToSequence(), and QPatternist::XSLTSimpleContentConstructor::processItem().
|
inline |
Returns the string value of this Item.
In the case of a node, it is the node value corresponding to the particular node type. For atomic values, it is equivalent to the value cast as xs:string
.
Conceptually, this functions corresponds to the dm:string-value
accessor.
Definition at line 302 of file qitem_p.h.
Referenced by QPatternist::ToStringCaster< DerivedType >::castFrom(), QPatternist::StringToAbstractFloatCaster< isDouble >::castFrom(), QPatternist::ToUntypedAtomicCaster::castFrom(), QPatternist::ToAnyURICaster::castFrom(), QPatternist::StringToBase64BinaryCaster::castFrom(), QPatternist::StringToHexBinaryCaster::castFrom(), QPatternist::StringToBooleanCaster::castFrom(), QPatternist::StringToDecimalCaster::castFrom(), QPatternist::StringToIntegerCaster::castFrom(), QPatternist::StringToGYearCaster::castFrom(), QPatternist::StringToGDayCaster::castFrom(), QPatternist::StringToGMonthCaster::castFrom(), QPatternist::StringToGYearMonthCaster::castFrom(), QPatternist::StringToGMonthDayCaster::castFrom(), QPatternist::StringToDateTimeCaster::castFrom(), QPatternist::StringToTimeCaster::castFrom(), QPatternist::StringToDateCaster::castFrom(), QPatternist::StringToDurationCaster::castFrom(), QPatternist::StringToDayTimeDurationCaster::castFrom(), QPatternist::StringToYearMonthDurationCaster::castFrom(), QPatternist::StringToDerivedIntegerCaster< type >::castFrom(), QPatternist::AnyToDerivedStringCaster< type >::castFrom(), QPatternist::StringComparator::compare(), QPatternist::CaseInsensitiveStringComparator::compare(), QPatternist::PatternPlatform::compress(), QPatternist::Literal::description(), QPatternist::NormalizeUnicodeFN::determineNormalizationForm(), QPatternist::StringComparator::equals(), QPatternist::CaseInsensitiveStringComparator::equals(), QPatternist::ResolveURIFN::evaluateSingleton(), QPatternist::SystemPropertyFN::evaluateSingleton(), QPatternist::FunctionAvailableFN::evaluateSingleton(), QPatternist::TypeAvailableFN::evaluateSingleton(), QPatternist::NCNameConstructor::evaluateSingleton(), QPatternist::QNameConstructor::evaluateSingleton(), QPatternist::ErrorFN::evaluateSingleton(), QPatternist::QNameFN::evaluateSingleton(), QPatternist::ConcatFN::evaluateSingleton(), QPatternist::TranslateFN::evaluateSingleton(), QPatternist::CastingPlatform< UntypedAtomicConverter, true >::issueCastError(), QXmlFormatter::item(), QXmlSerializer::item(), QPatternist::AccelTreeBuilder< true >::item(), QPatternist::TraceCallback::mapToItem(), QPatternist::ReplaceFN::parseReplacement(), QPatternist::PatternPlatform::pattern(), QPatternist::XSLTSimpleContentConstructor::processItem(), QPatternist::AttributeConstructor::processValue(), QAbstractXmlReceiver::sendAsNode(), QPatternist::QAbstractXmlReceiver::sendAsNode(), QPatternist::DocFN::typeCheck(), and QPatternist::ItemVerifier::verifyItem().
Definition at line 417 of file qitem_p.h.
Referenced by QXmlResultItems::next().
|
inline |
Returns the ItemType this Item is of.
For example, if this Item is an XML node, more specifically a text node, text()
is returned. That is, BuiltinTypes::text. However, if this Item is an atomic value of type xs:long
that is what's returned, BuiltinTypes::xsLong.
Definition at line 365 of file qitem_p.h.
Referenced by QPatternist::ComparingAggregator< oper, result >::applyNumericPromotion(), QPatternist::CastingPlatform< UntypedAtomicConverter, true >::cast(), QPatternist::NumericToDecimalCaster< IsInteger >::castFrom(), QPatternist::NumericToDerivedIntegerCaster< type >::castFrom(), QPatternist::ComparisonPlatform< IndexOfIterator, false >::detailedFlexibleCompare(), QPatternist::ComparisonPlatform< IndexOfIterator, false >::flexibleCompare(), QPatternist::Literal::id(), qLess< Item::List >::isNaN(), QPatternist::CastingPlatform< UntypedAtomicConverter, true >::issueCastError(), QPatternist::AtomicType::itemMatches(), QPatternist::ArgumentConverter::mapToSequence(), and QPatternist::Literal::staticType().
union { ... } |
const AtomicValue* QPatternist::Item::atomicValue |
Definition at line 426 of file qitem_p.h.
Referenced by operator=(), and sequencedTypedValue().
NodeIndexStorage QPatternist::Item::node |
Definition at line 425 of file qitem_p.h.
Referenced by operator=().