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: ATBooleanOrDerived.hpp,v 1.8 2006/11/01 16:37:14 jpcs Exp $ 00012 */ 00013 00014 #ifndef _ATBOOLEANORDERIVED_HPP 00015 #define _ATBOOLEANORDERIVED_HPP 00016 00017 #include <xercesc/util/XercesDefs.hpp> 00018 #include <xqilla/items/AnyAtomicType.hpp> 00019 00020 #include <xqilla/framework/XQillaExport.hpp> 00021 00022 class XPath2MemoryManager; 00023 00024 class XQILLA_API ATBooleanOrDerived : public AnyAtomicType 00025 { 00026 public: 00027 typedef RefCountPointer<const ATBooleanOrDerived> Ptr; 00028 00029 /* Get the name of the primitive type (basic type) of this type 00030 * (ie "decimal" for xs:decimal) */ 00031 virtual const XMLCh* getPrimitiveTypeName() const = 0; 00032 00033 /* Get the namespace URI for this type */ 00034 virtual const XMLCh* getTypeURI() const = 0; 00035 00036 /* Get the name of this type (ie "integer" for xs:integer) */ 00037 virtual const XMLCh* getTypeName() const = 0; 00038 00039 /* returns the XMLCh* (canonical) representation of this type */ 00040 virtual const XMLCh* asString(const DynamicContext* context) const = 0; 00041 00042 /* returns true if the two objects have the same boolean value 00043 * false otherwise */ 00044 virtual bool equals(const AnyAtomicType::Ptr &target, const DynamicContext* context) const = 0; 00045 00048 virtual int compare(const ATBooleanOrDerived::Ptr &other, const DynamicContext *context) const = 0; 00049 00050 /* returns true if boolean value evaluates to true 00051 * false otherwise */ 00052 virtual bool isTrue() const = 0; 00053 00054 /* returns false if boolean value evaluates to true 00055 * true otherwise */ 00056 virtual bool isFalse() const = 0; 00057 00058 virtual AnyAtomicType::AtomicObjectType getPrimitiveTypeIndex() const = 0; 00059 }; 00060 00061 #endif // _ATBOOLEANORDERIVED_HPP