ATStringOrDerived.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: ATStringOrDerived.hpp,v 1.7 2006/11/01 16:37:14 jpcs Exp $
00012  */
00013 
00014 #ifndef _ATSTRINGORDERIVED_HPP
00015 #define _ATSTRINGORDERIVED_HPP
00016 
00017 #include <xercesc/util/XercesDefs.hpp>
00018 #include <xqilla/framework/XQillaExport.hpp>
00019 #include <xqilla/items/AnyAtomicType.hpp>
00020 #include <xqilla/items/Numeric.hpp>
00021 
00022 class Collation;
00023 class Result;
00024 class DynamicContext;
00025 
00026 class XQILLA_API ATStringOrDerived : public AnyAtomicType
00027 {
00028 public:
00029   typedef RefCountPointer<const ATStringOrDerived> Ptr;
00030 
00031   /* Get the name of the primitive type (basic type) of this type
00032    * (ie "decimal" for xs:decimal) */
00033   virtual const XMLCh* getPrimitiveTypeName() const = 0;
00034 
00035   /* Get the namespace URI for this type */
00036   virtual const XMLCh* getTypeURI() const = 0;
00037 
00038   /* Get the name of this type  (ie "integer" for xs:integer) */
00039   virtual const XMLCh* getTypeName() const = 0;
00040 
00041   /* returns the XMLCh* (canonical) representation of this type */
00042   virtual const XMLCh* asString(const DynamicContext* context) const = 0;
00043 
00044   /* returns this string as a set of codepoints */
00045   virtual Result asCodepoints(const DynamicContext* context) const = 0;
00046 
00047   /* returns the length of this string */
00048   virtual unsigned int getLength() const = 0;
00049 
00050   /* returns the substring starting at startingLoc of given length */
00051   virtual ATStringOrDerived::Ptr substring(const Numeric::Ptr &startingLoc, const Numeric::Ptr &length, const DynamicContext* context) const = 0;
00052 
00053   /* returns the substring that occurs after the first occurence of pattern */
00054   virtual ATStringOrDerived::Ptr substringAfter(const ATStringOrDerived::Ptr &pattern, Collation* collation, const DynamicContext* context) const = 0;
00055 
00056   /* returns the substring that occurs before the first occurence of pattern */
00057   virtual ATStringOrDerived::Ptr substringBefore(const ATStringOrDerived::Ptr &pattern, Collation* collation, const DynamicContext* context) const = 0;
00058 
00059   /* returns true if the two objects' URI are equal (string comparison)
00060    * false otherwise */
00061   virtual bool equals(const AnyAtomicType::Ptr &target, const DynamicContext* context) const = 0;
00062 
00063   virtual AnyAtomicType::AtomicObjectType getPrimitiveTypeIndex() const = 0;
00064 };
00065 
00066 #endif //  _ATSTRINGORDERIVED_HPP

Generated on Mon Feb 12 16:52:06 2007 for XQilla Simple API by  doxygen 1.4.6