Represents the special none
type.
More...
#include <qnonetype_p.h>
◆ Ptr
◆ NoneType()
◆ atomizedType()
This can be thought to be a weird function for this type(none). There is no atomized type for none, perhaps the best from a conceptual perspective would be to return null
.
This function returns BuiltinTypes::xsAnyAtomicType because the generic type checking code inserts an Atomizer in the AST when an error() function(or other node which has type none) is part of an operator expression(value/general comparison, arithmetics). The Atomizer returns the atomizedType() of its child, and by here returning xsAnyAtomicType, static operator lookup is postponed to runtime. Subsequently, expressions like error() works properly with other XPath expressions.
Implements QPatternist::ItemType.
Definition at line 94 of file qnonetype.cpp.
static const AtomicType::Ptr xsAnyAtomicType
◆ cardinality()
◆ displayName()
- Returns
- always "none". That is, no namespace prefix
Implements QPatternist::ItemType.
Definition at line 69 of file qnonetype.cpp.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
◆ isAtomicType()
bool NoneType::isAtomicType |
( |
| ) |
const |
|
virtual |
◆ isNodeType()
bool NoneType::isNodeType |
( |
| ) |
const |
|
virtual |
◆ itemMatches()
bool NoneType::itemMatches |
( |
const Item & |
item | ) |
const |
|
virtual |
◆ itemType()
- Note
- The semantical meaning of this type's item type can surely be discussed. The function is provided due to it being mandated by the SequenceType base class.
- Returns
- always 'this' since NoneType is also an ItemType
Implements QPatternist::SequenceType.
Definition at line 79 of file qnonetype.cpp.
QExplicitlySharedDataPointer< ItemType > Ptr
◆ operator|()
- Returns
- always
other
. The none type can be thought as disappearing when attempting to find the union of it and another type.
Reimplemented from QPatternist::ItemType.
Definition at line 64 of file qnonetype.cpp.
◆ xdtSuperType()
◆ xdtTypeMatches()
bool NoneType::xdtTypeMatches |
( |
const ItemType::Ptr & |
other | ) |
const |
|
virtual |
Returns true
if other
matches this type. That is, if other
is equal to this type or a subtype of this type.
For instance this statements evaluates to true:
but this evaluates to false:
- Parameters
-
other | the other ItemType that is to be matched. This is guaranteed by the caller to never be null . |
Implements QPatternist::ItemType.
Definition at line 59 of file qnonetype.cpp.
◆ CommonSequenceTypes
The documentation for this class was generated from the following files: