secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/util/XMLFloat.hpp
changeset 0 ba25891c3a9e
child 1 c42dffbd5b4f
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 /*
       
    18  * Licensed to the Apache Software Foundation (ASF) under one or more
       
    19  * contributor license agreements.  See the NOTICE file distributed with
       
    20  * this work for additional information regarding copyright ownership.
       
    21  * The ASF licenses this file to You under the Apache License, Version 2.0
       
    22  * (the "License"); you may not use this file except in compliance with
       
    23  * the License.  You may obtain a copy of the License at
       
    24  * 
       
    25  *      http://www.apache.org/licenses/LICENSE-2.0
       
    26  * 
       
    27  * Unless required by applicable law or agreed to in writing, software
       
    28  * distributed under the License is distributed on an "AS IS" BASIS,
       
    29  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    30  * See the License for the specific language governing permissions and
       
    31  * limitations under the License.
       
    32  */
       
    33 
       
    34 /*
       
    35  * $Id: XMLFloat.hpp 568078 2007-08-21 11:43:25Z amassari $
       
    36  */
       
    37 
       
    38 #ifndef XML_FLOAT_HPP
       
    39 #define XML_FLOAT_HPP
       
    40 
       
    41 #include <xercesc/util/XMLAbstractDoubleFloat.hpp>
       
    42 
       
    43 XERCES_CPP_NAMESPACE_BEGIN
       
    44 
       
    45 class XMLUTIL_EXPORT XMLFloat : public XMLAbstractDoubleFloat
       
    46 {
       
    47 public:
       
    48 
       
    49 	/**
       
    50 	 * Constructs a newly allocated <code>XMLFloat</code> object that
       
    51 	 * represents the value represented by the string.
       
    52 	 *
       
    53 	 * @param      strValue the <code>String</code> to be converted to an
       
    54 	 *                      <code>XMLFloat</code>.
       
    55          * @param manager    Pointer to the memory manager to be used to
       
    56          *                   allocate objects.
       
    57 	 * @exception  NumberFormatException  if the <code>String</code> does not
       
    58 	 *               contain a parsable XMLFloat.
       
    59 	 */
       
    60 
       
    61     XMLFloat(const XMLCh* const strValue,
       
    62              MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
       
    63 
       
    64     ~XMLFloat();
       
    65 
       
    66 	/**
       
    67 	 * Compares the two specified XMLFloat objects.
       
    68 	 * The result is <code>true</code> if and only if the argument is not
       
    69 	 * <code>null</code> and that contains the same <code>int</code> value.
       
    70 	 *
       
    71 	 * @param   lValue the object to compare with.
       
    72 	 * @param   rValue the object to compare against.
       
    73 	 * @return  <code>true</code> if the objects are the same;
       
    74 	 *          <code>false</code> otherwise.
       
    75 	 */
       
    76 
       
    77     inline static int            compareValues(const XMLFloat* const lValue
       
    78                                              , const XMLFloat* const rValue);
       
    79 
       
    80     /***
       
    81      * Support for Serialization/De-serialization
       
    82      ***/
       
    83     DECL_XSERIALIZABLE(XMLFloat)
       
    84 
       
    85     XMLFloat(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
       
    86 
       
    87 protected:
       
    88 
       
    89     virtual void          checkBoundary(char* const strValue);
       
    90 
       
    91 private:
       
    92     //
       
    93     // Unimplemented
       
    94     //
       
    95     // copy ctor
       
    96     // assignment ctor
       
    97     //
       
    98     XMLFloat(const XMLFloat& toCopy);
       
    99     XMLFloat& operator=(const XMLFloat& toAssign);
       
   100 
       
   101 };
       
   102 
       
   103 inline int XMLFloat::compareValues(const XMLFloat* const lValue
       
   104                                  , const XMLFloat* const rValue)
       
   105 {
       
   106     return XMLAbstractDoubleFloat::compareValues((const XMLAbstractDoubleFloat* const) lValue,
       
   107                                                  (const XMLAbstractDoubleFloat* const) rValue 
       
   108                                                  , ((XMLAbstractDoubleFloat*)lValue)->getMemoryManager());
       
   109 }
       
   110 
       
   111 XERCES_CPP_NAMESPACE_END
       
   112 
       
   113 #endif