#include <Item.h>
Inheritance diagram for Patternist::Item:


Public Types | |
| typedef EmptyIterator< Item::Ptr > | EmptyIterator |
| typedef Iterator< Item::Ptr > | Iterator |
| typedef QList< Item::Ptr > | List |
| typedef ListIterator< Item::Ptr > | ListIterator |
| typedef PlainSharedPtr< Item > | Ptr |
|
typedef SingletonIterator< Item::Ptr > | SingletonIterator |
| typedef QVector< Item::Ptr > | Vector |
Public Member Functions | |
| virtual bool | isAtomicValue () const=0 |
| Determines whether this item is an atomic value, or a node. | |
| virtual bool | isNode () const=0 |
| Determines whether this item is an atomic value, or a node. | |
| Item () | |
| virtual QString | stringValue () const=0 |
| Returns the string value of this Item. | |
| virtual PlainSharedPtr< ItemType > | type () const=0 |
| Returns the ItemType this Item is of. | |
| virtual Item::Iterator::Ptr | typedValue () const=0 |
| Returns the typed value of this item. | |
| virtual | ~Item () |
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.
Definition at line 50 of file Item.h.
| typedef QList<Item::Ptr> Patternist::Item::List |
| typedef PlainSharedPtr<Item> Patternist::Item::Ptr |
A smart pointer wrapping an Item instance.
Reimplemented in Patternist::AbstractDateTime, Patternist::AbstractDuration, Patternist::AnyURI, Patternist::AtomicValue, Patternist::Base64Binary, Patternist::Boolean, Patternist::Date, Patternist::DateTime, Patternist::DayTimeDuration, Patternist::Duration, Patternist::GDay, Patternist::GMonth, Patternist::GMonthDay, Patternist::GYear, Patternist::GYearMonth, Patternist::HexBinary, Patternist::Integer, Patternist::Node, Patternist::Numeric, Patternist::QNameValue, Patternist::String, Patternist::Time, Patternist::ValidationError, and Patternist::YearMonthDuration.
| typedef QVector<Item::Ptr> Patternist::Item::Vector |
| virtual bool Patternist::Item::isAtomicValue | ( | ) | const [pure virtual] |
Determines whether this item is an atomic value, or a node.
true if it is an atomic value, otherwise false. Implemented in Patternist::AtomicValue, and Patternist::Node.
| virtual bool Patternist::Item::isNode | ( | ) | const [pure virtual] |
Determines whether this item is an atomic value, or a node.
This returns the opposite of isAtomicValue, and is provided for readability.
true if this item is a node, otherwise false. Implemented in Patternist::AtomicValue, and Patternist::Node.
| virtual QString Patternist::Item::stringValue | ( | ) | const [pure virtual] |
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.
Implemented in Patternist::AccelNode, Patternist::DelegateQDomNode, Patternist::AbstractFloat< isDouble >, Patternist::Base64Binary, Patternist::Boolean, Patternist::Date, Patternist::DateTime, Patternist::DayTimeDuration, Patternist::Decimal, Patternist::DerivedInteger< DerivedType >, Patternist::DerivedString< DerivedType >, Patternist::Duration, Patternist::GDay, Patternist::GMonth, Patternist::GMonthDay, Patternist::GYear, Patternist::GYearMonth, Patternist::HexBinary, Patternist::Integer, Patternist::QNameValue, Patternist::String, Patternist::Time, Patternist::ValidationError, and Patternist::YearMonthDuration.
| virtual PlainSharedPtr<ItemType> Patternist::Item::type | ( | ) | const [pure virtual] |
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.
Implemented in Patternist::AccelNode, Patternist::DelegateQDomNode, Patternist::AbstractFloat< isDouble >, Patternist::AnyURI, Patternist::Base64Binary, Patternist::Boolean, Patternist::Date, Patternist::DateTime, Patternist::DayTimeDuration, Patternist::Decimal, Patternist::DerivedInteger< DerivedType >, Patternist::DerivedString< DerivedType >, Patternist::Duration, Patternist::GDay, Patternist::GMonth, Patternist::GMonthDay, Patternist::GYear, Patternist::GYearMonth, Patternist::HexBinary, Patternist::Integer, Patternist::QNameValue, Patternist::String, Patternist::Time, Patternist::UntypedAtomic, Patternist::ValidationError, and Patternist::YearMonthDuration.
Referenced by Patternist::AtomicValue::evaluateEBV().
Here is the caller graph for this function:

| virtual Item::Iterator::Ptr Patternist::Item::typedValue | ( | ) | const [pure virtual] |
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.
Implemented in Patternist::AccelNode, Patternist::DelegateQDomNode, and Patternist::AtomicValue.
1.5.1