00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _ATDATETIMEORDERIVED_HPP
00015 #define _ATDATETIMEORDERIVED_HPP
00016
00017 #include <xercesc/util/XMLString.hpp>
00018 #include <xqilla/items/DateOrTimeType.hpp>
00019
00020 #include <xqilla/framework/XQillaExport.hpp>
00021 #include <xqilla/items/ATDecimalOrDerived.hpp>
00022 #include <xqilla/items/ATDurationOrDerived.hpp>
00023 #include <xqilla/items/Timezone.hpp>
00024
00025 class XQILLA_API ATDateTimeOrDerived : public DateOrTimeType
00026 {
00027 public:
00028 typedef RefCountPointer<const ATDateTimeOrDerived> Ptr;
00029
00030
00031
00032 virtual const XMLCh* getPrimitiveTypeName() const = 0;
00033
00034
00035 virtual const XMLCh* getTypeURI() const = 0;
00036
00037
00038 virtual const XMLCh* getTypeName() const = 0;
00039
00040
00041 virtual const XMLCh* asString(const DynamicContext* context) const = 0;
00042
00043
00044
00045 virtual bool equals(const AnyAtomicType::Ptr &target, const DynamicContext* context) const = 0;
00046
00049 virtual int compare(const ATDateTimeOrDerived::Ptr &other, const DynamicContext *context) const = 0;
00050
00054 virtual ATDecimalOrDerived::Ptr getYears(const DynamicContext *context) const = 0;
00055
00059 virtual ATDecimalOrDerived::Ptr getMonths(const DynamicContext *context) const = 0;
00060
00064 virtual ATDecimalOrDerived::Ptr getDays(const DynamicContext *context) const = 0;
00065
00069 virtual ATDecimalOrDerived::Ptr getHours(const DynamicContext *context) const = 0;
00070
00074 virtual ATDecimalOrDerived::Ptr getMinutes(const DynamicContext *context) const = 0;
00075
00079 virtual ATDecimalOrDerived::Ptr getSeconds(const DynamicContext *context) const = 0;
00080
00084 virtual const Timezone::Ptr &getTimezone() const = 0;
00085
00089 virtual bool hasTimezone() const = 0;
00090
00095 virtual ATDateTimeOrDerived::Ptr setTimezone(const Timezone::Ptr &timezone, const DynamicContext* context) const = 0;
00096
00100 virtual ATDateTimeOrDerived::Ptr addTimezone(const ATDurationOrDerived::Ptr &timezone, const DynamicContext* context) const = 0;
00101
00105 virtual ATDateTimeOrDerived::Ptr addYearMonthDuration(const ATDurationOrDerived::Ptr &yearMonth, const DynamicContext* context) const = 0;
00106
00110 virtual ATDateTimeOrDerived::Ptr addDayTimeDuration(const ATDurationOrDerived::Ptr &dayTime, const DynamicContext* context) const = 0;
00111
00115 virtual ATDateTimeOrDerived::Ptr subtractYearMonthDuration(const ATDurationOrDerived::Ptr &yearMonth, const DynamicContext* context) const = 0;
00116
00120 virtual ATDateTimeOrDerived::Ptr subtractDayTimeDuration(const ATDurationOrDerived::Ptr &dayTime, const DynamicContext* context) const = 0;
00121
00126 virtual ATDurationOrDerived::Ptr subtractDateTimeAsDayTimeDuration(const ATDateTimeOrDerived::Ptr &date, const DynamicContext* context) const = 0;
00127
00132 virtual ATDurationOrDerived::Ptr subtractDateTimeAsYearMonthDuration(const ATDateTimeOrDerived::Ptr &date, const DynamicContext* context) const = 0;
00133
00134
00135 virtual AnyAtomicType::AtomicObjectType getPrimitiveTypeIndex() const = 0;
00136 };
00137
00138 #endif // _ATDATETIMEORDERIVED_HPP