xs:dateTime type.
More...
#include <DateTime.h>
Inheritance diagram for Patternist::DateTime:


Public Types | |
| typedef AtomicValue::Ptr | Ptr |
Public Member Functions | |
| virtual Item::Ptr | fromValue (const KDateTime &dt) const |
| virtual QString | stringValue () const |
| Returns the string value of this Item. | |
| virtual ItemType::Ptr | type () const |
| Returns the ItemType this Item is of. | |
Static Public Member Functions | |
| static DateTime::Ptr | fromDateTime (const KDateTime &dt) |
| static DateTime::Ptr | fromLexical (const QString &string) |
Protected Member Functions | |
| DateTime (const KDateTime &dateTime) | |
Friends | |
| class | CommonValues |
xs:dateTime type.
Definition at line 28 of file DateTime.h.
A smart pointer wrapping AtomicValue instances.
Reimplemented from Patternist::AbstractDateTime.
Definition at line 31 of file DateTime.h.
| DateTime::Ptr DateTime::fromLexical | ( | const QString & | string | ) | [static] |
Creates an instance from the lexical representation string.
Definition at line 25 of file DateTime.cpp.
References Patternist::AbstractDateTime::create(), and DateTime().
Referenced by Patternist::StringToDateTimeCaster::castFrom().
Here is the call graph for this function:

Here is the caller graph for this function:

A factory function for creating instances that are of the dynamic type of this class, that represents dt.
The default implementation performs an assert() call. This function is not pure virtual because all sub-classes do not use it.
Reimplemented from Patternist::AbstractDateTime.
Definition at line 69 of file DateTime.cpp.
References fromDateTime(), and KDateTime::isValid().
Here is the call graph for this function:

| QString DateTime::stringValue | ( | ) | const [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.
Implements Patternist::Item.
Definition at line 75 of file DateTime.cpp.
References Patternist::AbstractDateTime::dateToString(), Patternist::AbstractDateTime::timeToString(), and Patternist::AbstractDateTime::zoneOffsetToString().
Here is the call graph for this function:

| ItemType::Ptr DateTime::type | ( | ) | const [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.
Implements Patternist::Item.
Definition at line 80 of file DateTime.cpp.
References Patternist::BuiltinTypes::xsDateTime.
1.5.1