|
||||
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_XMLNUMBER_HPP) 0023 #define XERCESC_INCLUDE_GUARD_XMLNUMBER_HPP 0024 0025 #include <xercesc/internal/XSerializable.hpp> 0026 #include <xercesc/util/XMemory.hpp> 0027 0028 XERCES_CPP_NAMESPACE_BEGIN 0029 0030 class XMLUTIL_EXPORT XMLNumber : public XSerializable, public XMemory 0031 { 0032 public: 0033 0034 enum 0035 { 0036 LESS_THAN = -1, 0037 EQUAL = 0, 0038 GREATER_THAN = 1, 0039 INDETERMINATE = 2 0040 }; 0041 0042 enum NumberType { 0043 Float, 0044 Double, 0045 BigDecimal, 0046 DateTime, 0047 UnKnown 0048 }; 0049 0050 virtual ~XMLNumber(); 0051 0052 /** 0053 * Return string representation of the decimal value. 0054 * A decimal point will be included as necessary. 0055 * Similar to toString above, but the internal buffer is 0056 * returned directly, user is not required to delete 0057 * the returned buffer 0058 */ 0059 virtual XMLCh* getRawData() const = 0; 0060 0061 /** 0062 * Return the original and converted value of the original data. 0063 * (applicable to double/float) 0064 * 0065 * The internal buffer is returned directly, user is not required 0066 * to delete the returned buffer 0067 */ 0068 virtual const XMLCh* getFormattedString() const = 0; 0069 0070 /** 0071 * Returns the sign of this number 0072 * 0073 * -1 negative 0074 * 0 zero 0075 * 1 positive 0076 * 0077 */ 0078 virtual int getSign() const = 0; 0079 0080 /*** 0081 * Support for Serialization/De-serialization 0082 ***/ 0083 DECL_XSERIALIZABLE(XMLNumber) 0084 0085 static XMLNumber* loadNumber(XMLNumber::NumberType numType 0086 , XSerializeEngine& serEng); 0087 0088 protected: 0089 0090 XMLNumber(); 0091 XMLNumber(const XMLNumber&); 0092 0093 private: 0094 // ----------------------------------------------------------------------- 0095 // Unimplemented operators 0096 // ----------------------------------------------------------------------- 0097 XMLNumber& operator=(const XMLNumber&); 0098 }; 0099 0100 XERCES_CPP_NAMESPACE_END 0101 0102 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |