Patternist::Time Class Reference
[XQuery/XPath Data Model]

Implements the value instance of the xs:time type. More...

#include <Time.h>

Inheritance diagram for Patternist::Time:

Inheritance graph
[legend]
Collaboration diagram for Patternist::Time:

Collaboration graph
[legend]
List of all members.

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 Time::Ptr fromDateTime (const KDateTime &dt)
static Time::Ptr fromLexical (const QString &string)

Protected Member Functions

 Time (const KDateTime &dateTime)

Friends

class CommonValues

Detailed Description

Implements the value instance of the xs:time type.

Author:
Frans Englich <frans.englich@telia.com>

Definition at line 28 of file Time.h.


Member Typedef Documentation

typedef AtomicValue::Ptr Patternist::Time::Ptr

A smart pointer wrapping AtomicValue instances.

Reimplemented from Patternist::AbstractDateTime.

Definition at line 31 of file Time.h.


Member Function Documentation

Time::Ptr Time::fromLexical ( const QString &  string  )  [static]

Creates an instance from the lexical representation string.

Definition at line 25 of file Time.cpp.

References Patternist::AbstractDateTime::create(), and Time().

Referenced by Patternist::StringToTimeCaster::castFrom().

Here is the call graph for this function:

Here is the caller graph for this function:

Item::Ptr Time::fromValue ( const KDateTime dt  )  const [virtual]

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 70 of file Time.cpp.

References fromDateTime(), and KDateTime::isValid().

Here is the call graph for this function:

QString Time::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.

See also:
XQuery 1.0 and XPath 2.0 Data Model, 5.13 string-value Accessor
Returns:
the string value.

Implements Patternist::Item.

Definition at line 76 of file Time.cpp.

References Patternist::AbstractDateTime::timeToString(), and Patternist::AbstractDateTime::zoneOffsetToString().

Here is the call graph for this function:

ItemType::Ptr Time::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.

Returns:
the type of this Item.

Implements Patternist::Item.

Definition at line 81 of file Time.cpp.

References Patternist::BuiltinTypes::xsTime.


The documentation for this class was generated from the following files:
Generated on Thu Feb 8 14:54:35 2007 for Patternist by  doxygen 1.5.1