Xalan-C++ API Reference 1.12.0
xalanc::DoubleSupport Class Reference

#include <xalanc/PlatformSupport/DoubleSupport.hpp>

Classes

struct  addFunction
struct  divideFunction
struct  equalFunction
struct  greaterThanFunction
struct  greaterThanOrEqualFunction
struct  lessThanFunction
struct  lessThanOrEqualFunction
struct  modulusFunction
struct  multiplyFunction
struct  negativeFunction
struct  notEqualFunction
union  NumberUnion
struct  subtractFunction

Static Public Member Functions

static void initialize ()
 Perform static initialization.
static void terminate ()
 Perform static shut down.
static bool isNaN (double theNumber)
 Determine if target is not a number.
static bool isPositiveInfinity (double theNumber)
 Determine if target is positive infinity.
static bool isNegativeInfinity (double theNumber)
 Determine if target is negative infinity.
static bool isPositiveZero (double theNumber)
 Determine if target is positive 0.
static bool isNegativeZero (double theNumber)
 Determine if target is negative 0.
static double getNaN ()
 Double value that represents "not a number".
static double getPositiveInfinity ()
 Double value that represents positive infinity.
static double getNegativeInfinity ()
 Double value that represents negative infinity.
static bool equal (double theLHS, double theRHS)
 Compare two double values, taking into account the fact that we must support IEEE 754.
static bool notEqual (double theLHS, double theRHS)
 Compare two double values, taking into account the fact that we must support IEEE 754.
static bool lessThan (double theLHS, double theRHS)
 Compare two double values, taking into account the fact that we must support IEEE 754.
static bool lessThanOrEqual (double theLHS, double theRHS)
 Compare two double values, taking into account the fact that we must support IEEE 754.
static bool greaterThan (double theLHS, double theRHS)
 Compare two double values, taking into account the fact that we must support IEEE 754.
static bool greaterThanOrEqual (double theLHS, double theRHS)
 Compare two double values, taking into account the fact that we must support IEEE 754.
static double add (double theLHS, double theRHS)
 Add two double values, taking into account the fact that we must support IEEE 754.
static double subtract (double theLHS, double theRHS)
 Subtract two double values, taking into account the fact that we must support IEEE 754.
static double multiply (double theLHS, double theRHS)
 Multiply two double values, taking into account the fact that we must support IEEE 754.
static double divide (double theLHS, double theRHS)
 Divide two double values, taking into account the fact that we must support IEEE 754.
static double modulus (double theLHS, double theRHS)
 Determine the modulus two double values, taking into account the fact that we must support IEEE 754.
static double negative (double theDouble)
 Determine the negative of a double value, taking into account the fact that we must support IEEE 754.
static double abs (double theDouble)
 Return the absolute value of theDouble.
static bool isValid (const XalanDOMString &theString)
 Determine whether or not a string contains a valid floating point number.
static bool isValid (const XalanDOMChar *theString)
 Determine whether or not a string contains a valid floating point number.
static double toDouble (const XalanDOMString &theString, MemoryManager &theManager)
 Convert a string to a double value.
static double toDouble (const XalanDOMChar *theString, MemoryManager &theManager)
 Convert a string to a double value.
static double round (double theValue)
 Round a number according to the XPath rules.
static double ceiling (double theValue)
 Returns the ceiling of a number according to the XPath rules.
static double floor (double theValue)
 Returns the floor of a number according to the XPath rules.

Detailed Description

Definition at line 54 of file DoubleSupport.hpp.

Member Function Documentation

◆ abs()

double xalanc::DoubleSupport::abs ( double theDouble)
static

Return the absolute value of theDouble.

If theDouble is NaN, NaN is returned

Parameters
theDoublea number to fabs
Returns
the result of the fabs

◆ add()

double xalanc::DoubleSupport::add ( double theLHS,
double theRHS )
static

Add two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to add
theRHSa number to add
Returns
the result of the addition

Referenced by xalanc::DoubleSupport::addFunction::operator()().

◆ ceiling()

double xalanc::DoubleSupport::ceiling ( double theValue)
inlinestatic

Returns the ceiling of a number according to the XPath rules.

Parameters
theValueThe value to round.
Returns
The result of the rounding

Definition at line 548 of file DoubleSupport.hpp.

Referenced by xalanc::XPath::functionCeiling().

◆ divide()

double xalanc::DoubleSupport::divide ( double theLHS,
double theRHS )
static

Divide two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to divide
theRHSa number to divide
Returns
the result of the division

Referenced by xalanc::DoubleSupport::divideFunction::operator()().

◆ equal()

bool xalanc::DoubleSupport::equal ( double theLHS,
double theRHS )
static

Compare two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to compare
theRHSa number to compare
Returns
the result of the compare

Referenced by xalanc::XObject::boolean(), notEqual(), and xalanc::DoubleSupport::equalFunction::operator()().

◆ floor()

double xalanc::DoubleSupport::floor ( double theValue)
inlinestatic

Returns the floor of a number according to the XPath rules.

Parameters
theValueThe value to round.
Returns
The result of the rounding

Definition at line 561 of file DoubleSupport.hpp.

Referenced by xalanc::XPath::functionFloor().

◆ getNaN()

double xalanc::DoubleSupport::getNaN ( )
inlinestatic

Double value that represents "not a number".

Returns
"not a number" value

Definition at line 155 of file DoubleSupport.hpp.

◆ getNegativeInfinity()

double xalanc::DoubleSupport::getNegativeInfinity ( )
inlinestatic

Double value that represents negative infinity.

Returns
negative infinity value

Definition at line 177 of file DoubleSupport.hpp.

Referenced by xalanc::XPath::getMatchScoreValue().

◆ getPositiveInfinity()

double xalanc::DoubleSupport::getPositiveInfinity ( )
inlinestatic

Double value that represents positive infinity.

Returns
positive infinity value

Definition at line 166 of file DoubleSupport.hpp.

◆ greaterThan()

bool xalanc::DoubleSupport::greaterThan ( double theLHS,
double theRHS )
static

Compare two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to compare
theRHSa number to compare
Returns
the result of the compare

Referenced by xalanc::DoubleSupport::greaterThanFunction::operator()().

◆ greaterThanOrEqual()

bool xalanc::DoubleSupport::greaterThanOrEqual ( double theLHS,
double theRHS )
static

Compare two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to compare
theRHSa number to compare
Returns
the result of the compare

Referenced by xalanc::DoubleSupport::greaterThanOrEqualFunction::operator()().

◆ initialize()

void xalanc::DoubleSupport::initialize ( )
static

Perform static initialization.

See class PlatformSupportInit.

◆ isNaN()

bool xalanc::DoubleSupport::isNaN ( double theNumber)
inlinestatic

Determine if target is not a number.

Parameters
theNumbertarget number
Returns
true if target represents the "not a number" value

Definition at line 83 of file DoubleSupport.hpp.

Referenced by xalanc::XObject::boolean().

◆ isNegativeInfinity()

bool xalanc::DoubleSupport::isNegativeInfinity ( double theNumber)
inlinestatic

Determine if target is negative infinity.

Parameters
theNumbertarget number
Returns
true if target represents the value for negative infinity

Definition at line 115 of file DoubleSupport.hpp.

◆ isNegativeZero()

bool xalanc::DoubleSupport::isNegativeZero ( double theNumber)
inlinestatic

Determine if target is negative 0.

Parameters
theNumbertarget number
Returns
true if target represents the value for negative 0

Definition at line 139 of file DoubleSupport.hpp.

◆ isPositiveInfinity()

bool xalanc::DoubleSupport::isPositiveInfinity ( double theNumber)
inlinestatic

Determine if target is positive infinity.

Parameters
theNumbertarget number
Returns
true if target represents the value for positive infinity

Definition at line 103 of file DoubleSupport.hpp.

◆ isPositiveZero()

bool xalanc::DoubleSupport::isPositiveZero ( double theNumber)
inlinestatic

Determine if target is positive 0.

Parameters
theNumbertarget number
Returns
true if target represents the value for positive 0.

Definition at line 127 of file DoubleSupport.hpp.

◆ isValid() [1/2]

bool xalanc::DoubleSupport::isValid ( const XalanDOMChar * theString)
static

Determine whether or not a string contains a valid floating point number.

Parameters
theStringThe string to check.
Returns
true if the string is valid, false if not.

◆ isValid() [2/2]

bool xalanc::DoubleSupport::isValid ( const XalanDOMString & theString)
static

Determine whether or not a string contains a valid floating point number.

Parameters
theStringThe string to check.
Returns
true if the string is valid, false if not.

◆ lessThan()

bool xalanc::DoubleSupport::lessThan ( double theLHS,
double theRHS )
static

Compare two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to compare
theRHSa number to compare
Returns
the result of the compare

Referenced by xalanc::DoubleSupport::lessThanFunction::operator()().

◆ lessThanOrEqual()

bool xalanc::DoubleSupport::lessThanOrEqual ( double theLHS,
double theRHS )
static

Compare two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to compare
theRHSa number to compare
Returns
the result of the compare

Referenced by xalanc::DoubleSupport::lessThanOrEqualFunction::operator()().

◆ modulus()

double xalanc::DoubleSupport::modulus ( double theLHS,
double theRHS )
static

Determine the modulus two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to divide
theRHSa number to divide
Returns
the result of the modulus

Referenced by xalanc::DoubleSupport::modulusFunction::operator()().

◆ multiply()

double xalanc::DoubleSupport::multiply ( double theLHS,
double theRHS )
static

Multiply two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to multiply
theRHSa number to multiply
Returns
the result of the multiplication

Referenced by xalanc::DoubleSupport::multiplyFunction::operator()().

◆ negative()

double xalanc::DoubleSupport::negative ( double theDouble)
static

Determine the negative of a double value, taking into account the fact that we must support IEEE 754.

Parameters
theDoublea number to negate
Returns
the result of the negation

Referenced by xalanc::DoubleSupport::negativeFunction::operator()().

◆ notEqual()

bool xalanc::DoubleSupport::notEqual ( double theLHS,
double theRHS )
inlinestatic

Compare two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to compare
theRHSa number to compare
Returns
the result of the compare

Definition at line 204 of file DoubleSupport.hpp.

References equal().

Referenced by xalanc::DoubleSupport::notEqualFunction::operator()().

◆ round()

double xalanc::DoubleSupport::round ( double theValue)
static

Round a number according to the XPath rules.

Parameters
theValueThe value to round.
Returns
The result of the rounding

Referenced by xalanc::XPath::functionRound().

◆ subtract()

double xalanc::DoubleSupport::subtract ( double theLHS,
double theRHS )
static

Subtract two double values, taking into account the fact that we must support IEEE 754.

Parameters
theLHSa number to subtract
theRHSa number to subtract
Returns
the result of the subtraction

Referenced by xalanc::DoubleSupport::subtractFunction::operator()().

◆ terminate()

void xalanc::DoubleSupport::terminate ( )
static

Perform static shut down.

See class PlatformSupportInit.

◆ toDouble() [1/2]

double xalanc::DoubleSupport::toDouble ( const XalanDOMChar * theString,
MemoryManager & theManager )
static

Convert a string to a double value.

Returns NaN if the string is not a valid floating point number.

Parameters
theStringThe string to convert.
theManagerThe MemoryManager instance to use.
Returns
The result of the conversion

◆ toDouble() [2/2]

double xalanc::DoubleSupport::toDouble ( const XalanDOMString & theString,
MemoryManager & theManager )
static

Convert a string to a double value.

Returns NaN if the string is not a valid floating point number.

Parameters
theStringThe string to convert.
theManagerThe MemoryManager instance to use.
Returns
The result of the conversion

Referenced by xalanc::XPathExpression::insertToken(), xalanc::XObject::number(), xalanc::XPathExpression::pushToken(), and xalanc::XPathExpression::replaceRelativeToken().


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