| API Docs for SAX and DOM |

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XMLNumber.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 2001-2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Id: XMLNumber.hpp,v 1.14 2004/09/08 13:56:24 peiyongz Exp $
    00019  * $Log: XMLNumber.hpp,v $
    00020  * Revision 1.14  2004/09/08 13:56:24  peiyongz
    00021  * Apache License Version 2.0
    00022  *
    00023  * Revision 1.13  2004/01/29 11:48:47  cargilld
    00024  * Code cleanup changes to get rid of various compiler diagnostic messages.
    00025  *
    00026  * Revision 1.12  2004/01/13 19:50:56  peiyongz
    00027  * remove parseContent()
    00028  *
    00029  * Revision 1.10  2003/10/17 21:10:55  peiyongz
    00030  * loadNumber() added
    00031  *
    00032  * Revision 1.9  2003/10/02 19:18:12  peiyongz
    00033  * enum NumberType
    00034  *
    00035  * Revision 1.8  2003/09/23 18:16:07  peiyongz
    00036  * Inplementation for Serialization/Deserialization
    00037  *
    00038  * Revision 1.7  2003/05/15 19:07:46  knoaman
    00039  * Partial implementation of the configurable memory manager.
    00040  *
    00041  * Revision 1.6  2003/05/09 15:13:46  peiyongz
    00042  * Deprecated toString() in XMLNumber family
    00043  *
    00044  * Revision 1.5  2003/03/10 20:55:58  peiyongz
    00045  * Schema Errata E2-40 double/float
    00046  *
    00047  * Revision 1.4  2003/02/02 23:54:43  peiyongz
    00048  * getFormattedString() added to return original and converted value.
    00049  *
    00050  * Revision 1.3  2003/01/30 21:55:22  tng
    00051  * Performance: create getRawData which is similar to toString but return the internal data directly, user is not required to delete the returned memory.
    00052  *
    00053  * Revision 1.2  2002/11/04 15:22:05  tng
    00054  * C++ Namespace Support.
    00055  *
    00056  * Revision 1.1.1.1  2002/02/01 22:22:15  peiyongz
    00057  * sane_include
    00058  *
    00059  * Revision 1.2  2001/10/09 21:28:28  peiyongz
    00060  * explicit ctor/dtor defined.
    00061  *
    00062  * Revision 1.1  2001/09/27 14:54:03  peiyongz
    00063  * DTV Reorganization: new class
    00064  *
    00065  */
    00066
    00067 #ifndef XMLNUMBER_HPP
    00068 #define XMLNUMBER_HPP
    00069
    00070 #include <xercesc/internal/XSerializable.hpp>
    00071 #include <xercesc/util/XMemory.hpp>
    00072
    00073 XERCES_CPP_NAMESPACE_BEGIN
    00074
    00075 class  XMLNumber : public XSerializable, public XMemory
    00076 {
    00077 public:
    00078
    00079     enum
    00080     {
    00081         LESS_THAN     = -1,
    00082         EQUAL         = 0,
    00083         GREATER_THAN  = 1,
    00084         INDETERMINATE = 2
    00085     };
    00086
    00087     enum NumberType {
    00088         Float,
    00089         Double,
    00090         BigDecimal,
    00091         DateTime,
    00092         UnKnown
    00093     };
    00094
    00095     virtual ~XMLNumber();
    00096
    00105     virtual XMLCh*     toString() const = 0;
    00106
    00114     virtual XMLCh*     getRawData() const = 0;
    00115
    00123     virtual const XMLCh*     getFormattedString() const = 0;
    00124
    00133     virtual int        getSign() const = 0;
    00134
    00135     /***
    00136      * Support for Serialization/De-serialization
    00137      ***/
    00138     DECL_XSERIALIZABLE(XMLNumber)
    00139
    00140     static XMLNumber*          loadNumber(XMLNumber::NumberType   numType
    00141                                         , XSerializeEngine&       serEng);
    00142
    00143 protected:
    00144
    00145     XMLNumber();
    00146
    00147 private:
    00148     // -----------------------------------------------------------------------
    00149     //  Unimplemented constructors and operators
    00150     // -----------------------------------------------------------------------
    00151     XMLNumber(const XMLNumber&);
    00152     XMLNumber& operator=(const XMLNumber&);
    00153 };
    00154
    00155 XERCES_CPP_NAMESPACE_END
    00156
    00157 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.