Xerces-C++ 3.2.5
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
XMLAbstractDoubleFloat Class Referenceabstract

#include <xercesc/util/XMLAbstractDoubleFloat.hpp>

Inheritance diagram for XMLAbstractDoubleFloat:
XMLNumber XMemory XMLDouble XMLFloat

Public Types

enum  LiteralType {
  NegINF , PosINF , NaN , SpecialTypeNum ,
  Normal
}
 
- Public Types inherited from XMLNumber
enum  { LESS_THAN = -1 , EQUAL = 0 , GREATER_THAN = 1 , INDETERMINATE = 2 }
 
enum  NumberType {
  Float , Double , BigDecimal , DateTime ,
  UnKnown
}
 

Public Member Functions

virtual ~XMLAbstractDoubleFloat ()
 
virtual XMLChgetRawData () const
 Return string representation of the decimal value.
 
virtual const XMLChgetFormattedString () const
 Return the original and converted value of the original data.
 
virtual int getSign () const
 Returns the sign of this number.
 
MemoryManagergetMemoryManager () const
 
bool isDataConverted () const
 
bool isDataOverflowed () const
 
double getValue () const
 
LiteralType getType () const
 
- Public Member Functions inherited from XMLNumber
virtual ~XMLNumber ()
 
- Public Member Functions inherited from XMemory
void * operator new (size_t size)
 This method overrides operator new.
 
void * operator new (size_t size, MemoryManager *memMgr)
 This method defines a custom operator new, that will use the provided memory manager to perform the allocation.
 
void * operator new (size_t size, void *ptr)
 This method overrides placement operator new.
 
void operator delete (void *p)
 This method overrides operator delete.
 
void operator delete (void *p, MemoryManager *memMgr)
 This method provides a matching delete for the custom operator new.
 
void operator delete (void *p, void *ptr)
 This method provides a matching delete for the placement new.
 

Static Public Member Functions

static XMLChgetCanonicalRepresentation (const XMLCh *const rawData, MemoryManager *const memMgr=XMLPlatformUtils::fgMemoryManager)
 
static void normalizeDecimalPoint (char *const toNormal)
 
- Static Public Member Functions inherited from XMLNumber
static XMLNumberloadNumber (XMLNumber::NumberType numType, XSerializeEngine &serEng)
 

Protected Member Functions

 XMLAbstractDoubleFloat (MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 
void init (const XMLCh *const strValue)
 
virtual void checkBoundary (char *const strValue)=0
 
void convert (char *const strValue)
 
- Protected Member Functions inherited from XMLNumber
 XMLNumber ()
 
 XMLNumber (const XMLNumber &)
 
- Protected Member Functions inherited from XMemory
 XMemory ()
 Protected default constructor.
 

Static Protected Member Functions

static int compareValues (const XMLAbstractDoubleFloat *const lValue, const XMLAbstractDoubleFloat *const rValue, MemoryManager *const manager)
 Compares this object to the specified object.
 

Protected Attributes

double fValue
 
LiteralType fType
 
bool fDataConverted
 
bool fDataOverflowed
 

Member Enumeration Documentation

◆ LiteralType

Enumerator
NegINF 
PosINF 
NaN 
SpecialTypeNum 
Normal 

Constructor & Destructor Documentation

◆ ~XMLAbstractDoubleFloat()

virtual XMLAbstractDoubleFloat::~XMLAbstractDoubleFloat ( )
virtual

◆ XMLAbstractDoubleFloat()

XMLAbstractDoubleFloat::XMLAbstractDoubleFloat ( MemoryManager *const  manager = XMLPlatformUtils::fgMemoryManager)
protected

Member Function Documentation

◆ checkBoundary()

virtual void XMLAbstractDoubleFloat::checkBoundary ( char *const  strValue)
protectedpure virtual

Implemented in XMLDouble, and XMLFloat.

◆ compareValues()

static int XMLAbstractDoubleFloat::compareValues ( const XMLAbstractDoubleFloat *const  lValue,
const XMLAbstractDoubleFloat *const  rValue,
MemoryManager *const  manager 
)
staticprotected

Compares this object to the specified object.

The result is true if and only if the argument is not null and is an XMLAbstractDoubleFloat object that contains the same int value as this object.

Parameters
lValuethe object to compare with.
rValuethe object to compare against.
managerThe MemoryManager to use to allocate objects
Returns
true if the objects are the same; false otherwise.

Referenced by XMLDouble::compareValues(), and XMLFloat::compareValues().

◆ convert()

void XMLAbstractDoubleFloat::convert ( char *const  strValue)
protected

◆ getCanonicalRepresentation()

static XMLCh * XMLAbstractDoubleFloat::getCanonicalRepresentation ( const XMLCh *const  rawData,
MemoryManager *const  memMgr = XMLPlatformUtils::fgMemoryManager 
)
static

◆ getFormattedString()

virtual const XMLCh * XMLAbstractDoubleFloat::getFormattedString ( ) const
virtual

Return the original and converted value of the original data.

(applicable to double/float)

The internal buffer is returned directly, user is not required to delete the returned buffer

Implements XMLNumber.

◆ getMemoryManager()

MemoryManager * XMLAbstractDoubleFloat::getMemoryManager ( ) const

◆ getRawData()

virtual XMLCh * XMLAbstractDoubleFloat::getRawData ( ) const
virtual

Return string representation of the decimal value.

A decimal point will be included as necessary. Similar to toString above, but the internal buffer is returned directly, user is not required to delete the returned buffer

Implements XMLNumber.

◆ getSign()

virtual int XMLAbstractDoubleFloat::getSign ( ) const
virtual

Returns the sign of this number.

-1 negative 0 zero 1 positive

Implements XMLNumber.

◆ getType()

XMLAbstractDoubleFloat::LiteralType XMLAbstractDoubleFloat::getType ( ) const

References fType.

◆ getValue()

double XMLAbstractDoubleFloat::getValue ( ) const

References fValue.

◆ init()

void XMLAbstractDoubleFloat::init ( const XMLCh *const  strValue)
protected

◆ isDataConverted()

bool XMLAbstractDoubleFloat::isDataConverted ( ) const

References fDataConverted.

◆ isDataOverflowed()

bool XMLAbstractDoubleFloat::isDataOverflowed ( ) const

References fDataOverflowed.

◆ normalizeDecimalPoint()

static void XMLAbstractDoubleFloat::normalizeDecimalPoint ( char *const  toNormal)
static

Member Data Documentation

◆ fDataConverted

bool XMLAbstractDoubleFloat::fDataConverted
protected

Referenced by isDataConverted().

◆ fDataOverflowed

bool XMLAbstractDoubleFloat::fDataOverflowed
protected

Referenced by isDataOverflowed().

◆ fType

LiteralType XMLAbstractDoubleFloat::fType
protected

Referenced by getType().

◆ fValue

double XMLAbstractDoubleFloat::fValue
protected

Referenced by getValue().


The documentation for this class was generated from the following file: