This class allows you to display numbers in an internationalized context. More...
#include <ildblink/ilinum.h>
Public Member Functions | |
IldNumeric (IlEnvironment *env) | |
Initializes a new IldNumeric instance. More... | |
IldNumeric (IlEnvironment *env, const char *value) | |
Build an initialized IldNumeric instance. More... | |
IldNumeric (IlEnvironment *env, double value) | |
Initializes a new IldNumeric instance. More... | |
IldNumeric (IlEnvironment *env, long value) | |
Initializes a new IldNumeric instance. More... | |
const IlEnvironment * | getEnvironment () const |
Gets the object reference environment. More... | |
IlBoolean | isBad () const |
Indicates if the last function called for this object failed. More... | |
IlBoolean | set (const char *value) |
Assigns a new value for the instance. More... | |
IlBoolean | set (double value) |
Assigns a new value for the instance. More... | |
IlBoolean | set (long value) |
Assigns a new value for the instance. More... | |
const IlEnvironment * | setEnvironment (IlEnvironment *env) |
Sets 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 | ) |
Initializes a new 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 | ||
) |
Initializes a new IldNumeric
instance.
env | A const reference to the environment. |
value | The initial value as a long . |
IldNumeric::IldNumeric | ( | IlEnvironment * | env, |
double | value | ||
) |
Initializes a new IldNumeric
instance.
env | A const reference to the environment. |
value | The initial value as a double . |
const IlEnvironment* IldNumeric::getEnvironment | ( | ) | const |
Gets the object reference environment.
IlBoolean IldNumeric::isBad | ( | ) | const |
Indicates if the last function called for this object failed.
IlBoolean IldNumeric::set | ( | const char * | value | ) |
Assigns 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 | ( | double | value | ) |
Assigns 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
.
IldNumeric(IlEnvironment*, double)
. IlBoolean IldNumeric::set | ( | long | value | ) |
Assigns 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
.
IldNumeric(IlEnvironment*, long)
. const IlEnvironment* IldNumeric::setEnvironment | ( | IlEnvironment * | env | ) |
Sets the object reference environment.