|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CNumber { public: CNumber(); CNumber(double dblValue); CNumber(int nValue); ~CNumber(); public: int GetInteger(); double GetDouble(); CNumber operator=(CNumber numValue); friend bool operator<(CNumber numValue1, CNumber numValue2); friend bool operator>(CNumber numValue1, CNumber numValue2); friend bool operator<=(CNumber numValue1, CNumber numValue2); friend bool operator>=(CNumber numValue1, CNumber numValue2); friend bool operator==(CNumber numValue1, CNumber numValue2); friend bool operator!=(CNumber numValue1, CNumber numValue2); friend CNumber operator+(CNumber numValue1, CNumber numValue2); friend CNumber operator-(CNumber numValue1, CNumber numValue2); friend CNumber operator*(CNumber numValue1, CNumber numValue2); friend CNumber operator/(CNumber numValue1, CNumber numValue2); friend CNumber operator%(CNumber numValue1, CNumber numValue2); CNumber operator-(); bool IsNaN(); bool IsPositiveZero(); bool IsNegativeZero(); bool IsPositiveInfinity(); bool IsNegativeInfinity(); static CNumber NaN(); static CNumber NegativeZero(); CNumber Floor(); CNumber Ceiling(); CNumber Round(); CString Format(); static bool Parse(const CString &strValue, CNumber &numResult); };
The XPath number.
Constructor/Destructor Summary | |
CNumber
();
����������Constructs the number. |
|
CNumber
(double dblValue);
����������Constructs the number with the specified real initial value. |
|
CNumber
(int nValue);
����������Constructs the number with the specified integer initial value. |
|
~CNumber
();
����������Destroys the number. |
Function Summary | |
int
|
GetInteger
();
����������Returns the integer part of this number. |
double
|
GetDouble
();
����������Returns the real value represented by this number. |
bool
|
IsNaN
();
����������Tests whether this number represents NaN. |
bool
|
IsPositiveZero
();
����������Tests whether this number represents a positive zero. |
bool
|
IsNegativeZero
();
����������Tests whether this number represents a negative zero. |
bool
|
IsPositiveInfinity
();
����������Tests whether this number represents a positive infinity. |
bool
|
IsNegativeInfinity
();
����������Tests whether this number represents a negative infinity. |
CNumber
|
NaN
();
����������Returns the representation of NaN. |
CNumber
|
NegativeZero
();
����������Returns the representation of a negative zero. |
CNumber
|
Floor
();
����������Returns the floor value of this number. |
CNumber
|
Ceiling
();
����������Returns the ceiling value of this number. |
CNumber
|
Round
();
����������Returns the rounded value of this number. |
CString
|
Format
();
����������Returns the string representation of this number. |
bool
|
Parse
(const CString &strValue, CNumber &numResult);
����������Parses the string to obtain a number. |
Constructor/Destructor Detail |
CNumber();
Constructs the number.
CNumber(double dblValue);
Constructs the number with the specified real initial value.
dblValue
- the initial valueCNumber(int nValue);
Constructs the number with the specified integer initial value.
nValue
- the initial value~CNumber();
Destroys the number.
Function Detail |
int GetInteger();
Returns the integer part of this number.
double GetDouble();
Returns the real value represented by this number.
bool IsNaN();
Tests whether this number represents NaN.
true
if this number represents NaN;
false
otherwisebool IsPositiveZero();
Tests whether this number represents a positive zero.
true
if this number represents a positive zero;
false
otherwisebool IsNegativeZero();
Tests whether this number represents a negative zero.
true
if this number represents a negative zero;
false
otherwisebool IsPositiveInfinity();
Tests whether this number represents a positive infinity.
true
if this number represents a positive infinity,
false
otherwisebool IsNegativeInfinity();
Tests whether this number represents a negative infinity.
true
if this number represents negative infinity;
false
otherwisestatic CNumber NaN();
Returns the representation of NaN.
static CNumber NegativeZero();
Returns the representation of a negative zero.
CNumber Floor();
Returns the floor value of this number.
The floor function is defined in XPath.
CNumber Ceiling();
Returns the ceiling value of this number.
The ceiling function is defined in XPath.
CNumber Round();
Returns the rounded value of this number.
The round function is defined in XPath.
CString Format();
Returns the string representation of this number.
static bool Parse(const CString &strValue, CNumber &numResult);
Parses the string to obtain a number.
The string consists of an optional whitespace followed by an optional
minus sign followed by a character sequence conforming to
XPath
Number
syntax followed by an optional
whitespace.
strValue
- the string to parsenumResult
- on return, the number obtained as the result
of parsing, if parsing was successful;
unspecified if parsing failedtrue
if parsing was successful;
false
if parsing failed
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |