Xerces-C++: XMLBigInteger Class Reference

Xerces-C++ 3.2.3

Public Member Functions | Static Public Member Functions | List of all members
XMLBigInteger Class Reference
Inheritance diagram for XMLBigInteger:

## Public Member Functions
| XMLBigInteger (const XMLCh *const strValue, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| Constructs a newly allocated `XMLBigInteger` object that represents the value represented by the string. More...
| ~XMLBigInteger ()
| XMLBigInteger (const XMLBigInteger &toCopy)
void | multiply (const unsigned int byteToShift)
void | divide (const unsigned int byteToShift)
unsigned int | getTotalDigit () const
XMLCh * | getRawData () const
| Return a copy of the fMagnitude. More...
bool | operator== (const XMLBigInteger &toCompare) const
| Compares this object to the specified object. More...
int | getSign () const
| Returns the signum function of this number (i.e., -1, 0 or 1 as the value of this number is negative, zero or positive). More...
int | intValue () const
Public Member Functions inherited from XMemory
void * | operator new (size_t size)
| This method overrides operator new. More...
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. More...
void * | operator new (size_t size, void *ptr)
| This method overrides placement operator new. More...
void | operator delete (void *p)
| This method overrides operator delete. More...
void | operator delete (void *p, MemoryManager *memMgr)
| This method provides a matching delete for the custom operator new. More...
void | operator delete (void *p, void *ptr)
| This method provides a matching delete for the placement new. More...

## Static Public Member Functions
static XMLCh * | getCanonicalRepresentation (const XMLCh *const rawData, MemoryManager *const memMgr=XMLPlatformUtils::fgMemoryManager, bool isNonPositiveInteger=false)
static void | parseBigInteger (const XMLCh *const toConvert, XMLCh *const retBuffer, int &signValue, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
static int | compareValues (const XMLBigInteger *const lValue, const XMLBigInteger *const rValue, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
static int | compareValues (const XMLCh *const lString, const int &lSign, const XMLCh *const rString, const int &rSign, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)

## Additional Inherited Members
Protected Member Functions inherited from XMemory
| XMemory ()
| Protected default constructor. More...

## Constructor & Destructor Documentation

## ◆ XMLBigInteger() [1/2]

XMLBigInteger::XMLBigInteger | ( | const XMLCh *const | strValue,
|  | MemoryManager *const | manager = `XMLPlatformUtils::fgMemoryManager`
| ) |  |

Constructs a newly allocated `XMLBigInteger` object that represents the value represented by the string.

The string is converted to an int value as if by the `valueOf` method.

Parameters

  strValue | the `String` to be converted to an `XMLBigInteger`.
  manager | Pointer to the memory manager to be used to allocate objects.

Exceptions

  NumberFormatException | if the `String` does not contain a parsable XMLBigInteger.

## ◆ ~XMLBigInteger()

XMLBigInteger::~XMLBigInteger | ( |  | ) |

## ◆ XMLBigInteger() [2/2]

XMLBigInteger::XMLBigInteger | ( | const XMLBigInteger & | toCopy | ) |

## Member Function Documentation

## ◆ compareValues() [1/2]

static int XMLBigInteger::compareValues | ( | const XMLBigInteger *const | lValue,
|  | const XMLBigInteger *const | rValue,
|  | MemoryManager *const | manager = `XMLPlatformUtils::fgMemoryManager`
| ) |  |
| static

Referenced by operator==().

## ◆ compareValues() [2/2]

static int XMLBigInteger::compareValues | ( | const XMLCh *const | lString,
|  | const int & | lSign,
|  | const XMLCh *const | rString,
|  | const int & | rSign,
|  | MemoryManager *const | manager = `XMLPlatformUtils::fgMemoryManager`
| ) |  |
| static

## ◆ divide()

void XMLBigInteger::divide | ( | const unsigned int | byteToShift | ) |

## ◆ getCanonicalRepresentation()

static XMLCh* XMLBigInteger::getCanonicalRepresentation | ( | const XMLCh *const | rawData,
|  | MemoryManager *const | memMgr = `XMLPlatformUtils::fgMemoryManager`,
|  | bool | isNonPositiveInteger = `false`
| ) |  |
| static

## ◆ getRawData()

XMLCh * XMLBigInteger::getRawData | ( |  | ) | const

Return a copy of the fMagnitude.

This is similar to toString, except the internal buffer is returned directly Caller is not required to delete the returned memory.

## ◆ getSign()

int XMLBigInteger::getSign | ( |  | ) | const

Returns the signum function of this number (i.e., -1, 0 or 1 as the value of this number is negative, zero or positive).

Referenced by getTotalDigit().

## ◆ getTotalDigit()

unsigned int XMLBigInteger::getTotalDigit | ( |  | ) | const

References getSign(), and XMLString::stringLen().

## ◆ intValue()

int XMLBigInteger::intValue | ( |  | ) | const

## ◆ multiply()

void XMLBigInteger::multiply | ( | const unsigned int | byteToShift | ) |

## ◆ operator==()

bool XMLBigInteger::operator== | ( | const XMLBigInteger & | toCompare | ) | const

Compares this object to the specified object.

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

Parameters

  toCompare | the object to compare with.

Returns
  `true` if the objects are the same; `false` otherwise.

References compareValues().

## ◆ parseBigInteger()

static void XMLBigInteger::parseBigInteger | ( | const XMLCh *const | toConvert,
|  | XMLCh *const | retBuffer,
|  | int & | signValue,
|  | MemoryManager *const | manager = `XMLPlatformUtils::fgMemoryManager`
| ) |  |
| static

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

- XMLBigInteger.hpp