Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:27

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_FLOAT_HPP)
0023 #define XERCESC_INCLUDE_GUARD_XML_FLOAT_HPP
0024 
0025 #include <xercesc/util/XMLAbstractDoubleFloat.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 class XMLUTIL_EXPORT XMLFloat : public XMLAbstractDoubleFloat
0030 {
0031 public:
0032 
0033     /**
0034      * Constructs a newly allocated <code>XMLFloat</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>XMLFloat</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 XMLFloat.
0043      */
0044 
0045     XMLFloat(const XMLCh* const strValue,
0046              MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
0047 
0048     ~XMLFloat();
0049 
0050     /**
0051      * Compares the two specified XMLFloat objects.
0052      * The result is <code>true</code> if and only if the argument is not
0053      * <code>null</code> and that contains the same <code>int</code> value.
0054      *
0055      * @param   lValue the object to compare with.
0056      * @param   rValue the object to compare against.
0057      * @return  <code>true</code> if the objects are the same;
0058      *          <code>false</code> otherwise.
0059      */
0060 
0061     inline static int            compareValues(const XMLFloat* const lValue
0062                                              , const XMLFloat* const rValue);
0063 
0064     /***
0065      * Support for Serialization/De-serialization
0066      ***/
0067     DECL_XSERIALIZABLE(XMLFloat)
0068 
0069     XMLFloat(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
0070 
0071 protected:
0072 
0073     virtual void          checkBoundary(char* const strValue);
0074 
0075 private:
0076     //
0077     // Unimplemented
0078     //
0079     // copy ctor
0080     // assignment ctor
0081     //
0082     XMLFloat(const XMLFloat& toCopy);
0083     XMLFloat& operator=(const XMLFloat& toAssign);
0084 
0085 };
0086 
0087 inline int XMLFloat::compareValues(const XMLFloat* const lValue
0088                                  , const XMLFloat* const rValue)
0089 {
0090     return XMLAbstractDoubleFloat::compareValues((const XMLAbstractDoubleFloat*) lValue,
0091                                                  (const XMLAbstractDoubleFloat*) rValue 
0092                                                  , ((XMLAbstractDoubleFloat*)lValue)->getMemoryManager());
0093 }
0094 
0095 XERCES_CPP_NAMESPACE_END
0096 
0097 #endif