ATDateTimeOrDerived.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2006
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2006
00005  *     Progress Software Corporation. All rights reserved.
00006  * Copyright (c) 2004-2006
00007  *     Oracle. All rights reserved.
00008  *
00009  * See the file LICENSE for redistribution information.
00010  *
00011  * $Id: ATDateTimeOrDerived.hpp,v 1.9 2006/11/01 16:37:14 jpcs Exp $
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   /* Get the name of the primitive type (basic type) of this type
00031    * (ie "decimal" for xs:decimal) */
00032   virtual const XMLCh* getPrimitiveTypeName() const = 0;
00033 
00034   /* Get the namespace URI for this type */
00035   virtual const XMLCh* getTypeURI() const = 0;
00036 
00037   /* Get the name of this type  (ie "integer" for xs:integer) */
00038   virtual const XMLCh* getTypeName() const = 0;
00039 
00040   /* returns the XMLCh* (lexical) representation of this type */
00041   virtual const XMLCh* asString(const DynamicContext* context) const = 0;
00042 
00043   /* returns true if the two objects represent the same date,
00044    * false otherwise */
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

Generated on Tue Dec 12 00:18:56 2006 for XQilla Simple API by  doxygen 1.4.6