ATDateOrDerived.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: ATDateOrDerived.hpp,v 1.9 2006/11/01 16:37:14 jpcs Exp $
00012  */
00013 
00014 #ifndef _ATDATEORDERIVED_HPP
00015 #define _ATDATEORDERIVED_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 ATDateOrDerived : public DateOrTimeType
00026 {
00027 public:
00028   typedef RefCountPointer<const ATDateOrDerived> 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 ATDateOrDerived::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 const Timezone::Ptr &getTimezone() const = 0;
00070 
00074   virtual bool hasTimezone() const = 0;
00075 
00080   virtual ATDateOrDerived::Ptr setTimezone(const Timezone::Ptr &timezone, const DynamicContext* context) const = 0;
00081 
00085   virtual ATDateOrDerived::Ptr addTimezone(const ATDurationOrDerived::Ptr &timezone,
00086                                            const DynamicContext* context) const = 0;
00087 
00091   virtual ATDateOrDerived::Ptr addYearMonthDuration(const ATDurationOrDerived::Ptr &yearMonth,
00092                                                     const DynamicContext* context) const = 0;
00093 
00097   virtual ATDateOrDerived::Ptr addDayTimeDuration(const ATDurationOrDerived::Ptr &dayTime,  const DynamicContext* context) const = 0;
00098   
00102   virtual ATDateOrDerived::Ptr subtractYearMonthDuration(const ATDurationOrDerived::Ptr &yearMonth,
00103                                                          const DynamicContext* context) const = 0;
00104 
00108   virtual ATDateOrDerived::Ptr subtractDayTimeDuration(const ATDurationOrDerived::Ptr &dayTime,
00109                                                        const DynamicContext* context) const = 0;
00114   virtual ATDurationOrDerived::Ptr subtractDate(const ATDateOrDerived::Ptr &date,  const DynamicContext* context) const = 0;
00115 
00116   virtual AnyAtomicType::AtomicObjectType getPrimitiveTypeIndex() const = 0;
00117 };
00118 
00119 #endif //  _ATDATEORDERIVED_HPP

Generated on Wed Dec 12 19:13:50 2007 for XQilla Simple API by  doxygen 1.5.1