Rogue Wave DBLink API Reference Guide |
Rogue Wave DBLink Documentation Home |
This class allows you to display numbers in an internationalized context. More...
#include <ildblink/ilinum.h>
Public Member Functions | |
IldNumeric (IlEnvironment *env) | |
Build an IldNumeric instance. More... | |
IldNumeric (IlEnvironment *env, const char *value) | |
Build an initialized IldNumeric instance. More... | |
IldNumeric (IlEnvironment *env, long value) | |
Build an initialized IldNumeric instance. More... | |
IldNumeric (IlEnvironment *env, double value) | |
Build an initialized IldNumeric instance. More... | |
void | get (UnicodeString &ustr) |
Get the value in a unicode string. More... | |
const IlEnvironment * | getEnvironment () const |
Get the object reference environment. More... | |
IlBoolean | isBad () const |
Tell if the last function called for this object failed. More... | |
IlBoolean | set (const char *value) |
Assign a new value for the instance. More... | |
IlBoolean | set (long value) |
Assign a new value for the instance. More... | |
IlBoolean | set (double value) |
Assign a new value for the instance. More... | |
const IlEnvironment * | setEnvironment (IlEnvironment *env) |
Set the object reference environment. More... | |
Public Member Functions inherited from IlNumeric | |
IlNumeric () | |
Builds an IlNumeric instance. More... | |
IlNumeric (const char *value) | |
Builds an IlNumeric instance and initializes it. More... | |
IlNumeric (long value) | |
Builds an IlNumeric instance an initializes it. More... | |
IlNumeric | abs () const |
void | get (char *buffer, IlInt len) const |
IlShort | getPrecision () const |
IlShort | getScale () const |
IlBoolean | isInteger () const |
IlBoolean | isNegative () const |
IlBoolean | isReal () const |
void | negate () |
operator double () const | |
operator long () const | |
IlNumeric | operator* (const IlNumeric &) |
IlNumeric | operator+ (const IlNumeric &) |
IlNumeric | operator+ (long) |
IlNumeric | operator- (const IlNumeric &) |
IlBoolean | operator< (const IlNumeric &n) const |
IlBoolean | operator<= (const IlNumeric &n) const |
IlBoolean | operator== (const IlNumeric &n) const |
IlBoolean | operator> (const IlNumeric &n) const |
IlBoolean | operator>= (const IlNumeric &n) const |
IlBoolean | set (const char *value) |
IlBoolean | set (long value) |
IlNumeric & | setScale (IlShort scale) |
This class allows you to display numbers in an internationalized context.
Library: dbkernel
This class is a container to store numbers (integers, reals, and big numerics) and to display them based on the active locale.
It will use the attached environment description to find the current locale and use it to format the numbers accordingly.
IlNumeric
class, the formating will not work as the underlying ICU libraries do not support the bignums. IldNumeric::IldNumeric | ( | IlEnvironment * | env | ) |
Build an IldNumeric
instance.
env | The environment of reference. |
This constructor creates and returns an instance of IldNumeric
and initializes it to the value 0 (zero).
IldNumeric::IldNumeric | ( | IlEnvironment * | env, |
const char * | value | ||
) |
Build an initialized IldNumeric
instance.
env | A const reference to the environment. |
value | A const reference to a char* . |
This constructor creates and returns an instance of IldNumeric
and initializes it with the contents of value. This value must conform to the format: [-|+]{digit}*[.[{digit}*]] | [-|+]{digit}+[.[{digit}*]][{E|e} [-|+]{digit}+] The input string size is limited by the maximum length IL_MAX_NUM_LEN
.
IldNumeric::IldNumeric | ( | IlEnvironment * | env, |
long | value | ||
) |
Build an initialized IldNumeric
instance.
env | A const reference to the environment. |
value | The initial value as a long . |
This constructor creates and returns an instance of IldNumeric
and initializes it with the integer contained in value.
IldNumeric::IldNumeric | ( | IlEnvironment * | env, |
double | value | ||
) |
Build an initialized IldNumeric
instance.
env | A const reference to the environment. |
value | The initial value as a double . |
This constructor creates and returns an instance of IldNumeric
and initializes it with the real number contained in value.
void IldNumeric::get | ( | UnicodeString & | ustr | ) |
Get the value in a unicode string.
ustr | A reference to a UnicodeString |
On output, ustr will be filled with the formatted number, represented by the instance, according to the locale of the environment. If the environment was not set in the instance, the format will be those used by the constructor.
const IlEnvironment* IldNumeric::getEnvironment | ( | ) | const |
Get the object reference environment.
IlBoolean IldNumeric::isBad | ( | ) | const |
Tell if the last function called for this object failed.
IlBoolean IldNumeric::set | ( | const char * | value | ) |
Assign a new value for the instance.
value | The new value to set. |
This function assigns value as the value of the invoking instance of IldNumeric
. The input string must conform to the same format as the one given in the constructor.
IlBoolean IldNumeric::set | ( | long | value | ) |
Assign a new value for the instance.
value | The new value to set. |
This function assigns value as the value of the invoking instance of IldNumeric
.
IlBoolean IldNumeric::set | ( | double | value | ) |
Assign a new value for the instance.
value | The new value to set. |
This function assigns value as the value of the invoking instance of IldNumeric
.
const IlEnvironment* IldNumeric::setEnvironment | ( | IlEnvironment * | env | ) |
Set the object reference environment.
© Copyright 2014, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.