| API Docs for SAX and DOM |

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

# 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 191054 2005-06-17 02:56:35Z jberry $
    00019  */
    00020
    00021 #ifndef XMLNUMBER_HPP
    00022 #define XMLNUMBER_HPP
    00023
    00024 #include <xercesc/internal/XSerializable.hpp>
    00025 #include <xercesc/util/XMemory.hpp>
    00026
    00027 XERCES_CPP_NAMESPACE_BEGIN
    00028
    00029 class  XMLNumber : public XSerializable, public XMemory
    00030 {
    00031 public:
    00032
    00033     enum
    00034     {
    00035         LESS_THAN     = -1,
    00036         EQUAL         = 0,
    00037         GREATER_THAN  = 1,
    00038         INDETERMINATE = 2
    00039     };
    00040
    00041     enum NumberType {
    00042         Float,
    00043         Double,
    00044         BigDecimal,
    00045         DateTime,
    00046         UnKnown
    00047     };
    00048
    00049     virtual ~XMLNumber();
    00050
    00059     virtual XMLCh*     toString() const = 0;
    00060
    00068     virtual XMLCh*     getRawData() const = 0;
    00069
    00077     virtual const XMLCh*     getFormattedString() const = 0;
    00078
    00087     virtual int        getSign() const = 0;
    00088
    00089     /***
    00090      * Support for Serialization/De-serialization
    00091      ***/
    00092     DECL_XSERIALIZABLE(XMLNumber)
    00093
    00094     static XMLNumber*          loadNumber(XMLNumber::NumberType   numType
    00095                                         , XSerializeEngine&       serEng);
    00096
    00097 protected:
    00098
    00099     XMLNumber();
    00100     XMLNumber(const XMLNumber&);
    00101
    00102 private:
    00103     // -----------------------------------------------------------------------
    00104     //  Unimplemented operators
    00105     // -----------------------------------------------------------------------
    00106     XMLNumber& operator=(const XMLNumber&);
    00107 };
    00108
    00109 XERCES_CPP_NAMESPACE_END
    00110
    00111 #endif

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