ATTimeOrDerived.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: ATTimeOrDerived.hpp,v 1.9 2006/11/01 16:37:14 jpcs Exp $
00012  */
00013 
00014 #ifndef _ATTIMEORDERIVED_HPP
00015 #define _ATTIMEORDERIVED_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 ATTimeOrDerived : public DateOrTimeType
00026 {
00027 public:
00028   typedef RefCountPointer<const ATTimeOrDerived> 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 time,
00044    * false otherwise */
00045   virtual bool equals(const AnyAtomicType::Ptr &target, const DynamicContext* context) const = 0;
00046 
00049   virtual int compare(const ATTimeOrDerived::Ptr &other, const DynamicContext *context) const = 0;
00050  
00054   virtual ATDecimalOrDerived::Ptr getHours(const DynamicContext *context) const = 0;
00055 
00059   virtual ATDecimalOrDerived::Ptr getMinutes(const DynamicContext *context) const = 0;
00060 
00064   virtual ATDecimalOrDerived::Ptr getSeconds(const DynamicContext *context) const = 0;
00065 
00069   virtual const Timezone::Ptr &getTimezone() const = 0;
00070 
00074   virtual bool hasTimezone() const = 0;
00075 
00080   virtual ATTimeOrDerived::Ptr setTimezone(const Timezone::Ptr &timezone, const DynamicContext* context) const = 0;
00081 
00085   virtual ATTimeOrDerived::Ptr addTimezone(const ATDurationOrDerived::Ptr &timezone,
00086                                            const DynamicContext* context) const = 0;
00087 
00091   virtual ATTimeOrDerived::Ptr addDayTimeDuration(const ATDurationOrDerived::Ptr &dayTime,
00092                                                   const DynamicContext* context) const = 0;
00093   
00097   virtual ATTimeOrDerived::Ptr subtractDayTimeDuration(const ATDurationOrDerived::Ptr &dayTime,
00098                                                        const DynamicContext* context) const = 0;
00099 
00104   virtual ATDurationOrDerived::Ptr subtractTime(const ATTimeOrDerived::Ptr &time, const DynamicContext* context) const = 0;
00105 
00106   virtual AnyAtomicType::AtomicObjectType getPrimitiveTypeIndex() const = 0;
00107 };
00108 
00109 #endif //  _ATTIMEORDERIVED_HPP

Generated on Fri Jan 19 15:30:52 2007 for XQilla Simple API by  doxygen 1.4.6