Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:15

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  * 
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  * 
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_XML_DOUBLE_HPP)
0023 #define XERCESC_INCLUDE_GUARD_XML_DOUBLE_HPP
0024 
0025 #include <xercesc/util/XMLAbstractDoubleFloat.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 class XMLUTIL_EXPORT XMLDouble : public XMLAbstractDoubleFloat
0030 {
0031 public:
0032 
0033     /**
0034      * Constructs a newly allocated <code>XMLDouble</code> object that
0035      * represents the value represented by the string.
0036      *
0037      * @param      strValue the <code>String</code> to be converted to an
0038      *                 <code>XMLDouble</code>.
0039          * @param manager    Pointer to the memory manager to be used to
0040          *                   allocate objects.
0041      * @exception  NumberFormatException  if the <code>String</code> does not
0042      *               contain a parsable XMLDouble.
0043      */
0044 
0045     XMLDouble(const XMLCh* const strValue,
0046               MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
0047 
0048     ~XMLDouble();
0049 
0050     /**
0051      * Compares this object to the specified object.
0052      * The result is <code>true</code> if and only if the argument is not
0053      * <code>null</code> and is an <code>XMLDouble</code> object that contains
0054      * the same <code>int</code> value as this object.
0055      *
0056      * @param   lValue the object to compare with.
0057      * @param   rValue the object to compare against.
0058      * @return  <code>true</code> if the objects are the same;
0059      *          <code>false</code> otherwise.
0060      */
0061 
0062     inline static int            compareValues(const XMLDouble* const lValue
0063                                              , const XMLDouble* const rValue);
0064 
0065     /***
0066      * Support for Serialization/De-serialization
0067      ***/
0068     DECL_XSERIALIZABLE(XMLDouble)
0069 
0070     XMLDouble(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
0071 
0072 protected:
0073 
0074     virtual void          checkBoundary(char* const strValue);
0075 
0076 private:
0077     //
0078     // Unimplemented
0079     //
0080     // copy ctor
0081     // assignment ctor
0082     //
0083      XMLDouble(const XMLDouble& toCopy);
0084      XMLDouble& operator=(const XMLDouble& toAssign);
0085 
0086 };
0087 
0088 inline int XMLDouble::compareValues(const XMLDouble* const lValue
0089                                   , const XMLDouble* const rValue)
0090 {
0091     return XMLAbstractDoubleFloat::compareValues((const XMLAbstractDoubleFloat*) lValue,
0092                                                  (const XMLAbstractDoubleFloat*) rValue 
0093                                                  , ((XMLAbstractDoubleFloat*)lValue)->getMemoryManager());
0094 }
0095 
0096 XERCES_CPP_NAMESPACE_END
0097 
0098 #endif
0099