Views
Data Access Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Friends
IliValue Class Reference

User interface class. More...

#include <ilviews/dataccess/value.h>

Inherited by IliCBValue.

Public Member Functions

 IliValue ()
 This constructor creates a null value, with an initial type of IliNullType.
 
 IliValue (const char *val)
 Constructor from string. More...
 
 IliValue (const IliBinary &val)
 Constructor from binary value. More...
 
 IliValue (const IliDatatype *type)
 This constructor initializes a null value, with an initial type. More...
 
 IliValue (const IliDate &val)
 Constructor from date value. More...
 
 IliValue (const IliDecimal &val)
 Constructor from IliDecimal value. More...
 
 IliValue (const IliTable *val)
 Constructor from table. More...
 
 IliValue (const IliTime &val)
 Constructor from time value. More...
 
 IliValue (const IliValue &val)
 Copy constructor. More...
 
 IliValue (IlAny val)
 Constructor from any. More...
 
 IliValue (IlDouble val)
 Constructor from double value. More...
 
 IliValue (IlFloat val)
 Constructor from float value. More...
 
 IliValue (IliByte val)
 Constructor from IliByte. More...
 
 IliValue (IlInt val)
 Constructor from integer value. More...
 
IlAny asAny (IlAny nvl=0) const
 Returns an any value. More...
 
IliBinary asBinary (const IliBinary &nvl=IliBinary::GetDefault()) const
 Returns a binary value. More...
 
IlBoolean asBoolean (IlBoolean nvl=IlFalse) const
 Returns a Boolean value. More...
 
IliByte asByte (IliByte nvl=0) const
 Returns a byte value. More...
 
IliDate asDate (const IliDate &nvl=IliDate::GetDefault()) const
 Returns a date value. More...
 
IliDecimal asDecimal () const
 Returns a decimal value. More...
 
IliDecimal asDecimal (const IliDecimal &nvl) const
 Returns a decimal value. More...
 
IlDouble asDouble (IlDouble nvl=0.0) const
 Returns a double value. More...
 
IlFloat asFloat (IlFloat nvl=0.0) const
 Returns a float value. More...
 
IlInt asInteger (IlInt nvl=0) const
 Returns an integer value. More...
 
const char * asString (const char *nvl=0) const
 Returns a string value. More...
 
const IliTableasTable (const IliTable *nvl=0) const
 Returns a table value. More...
 
IliTime asTime (const IliTime &nvl=IliTime::GetDefault()) const
 Returns a time value. More...
 
int compare (const IliValue &val) const
 Compares two values. More...
 
void format (IliString &dest, const char *fmt=0) const
 Returns a formatted string. More...
 
void format (IliString &dest, const IliFormat &fmt) const
 Returns a formatted string. More...
 
void format (IliString &dest, const IliFormat &fmt, const IliInputMask &mask) const
 Returns a formatted string by a mask. More...
 
const char * getFormatted (const char *fmt=0) const
 Returns a formatted string. More...
 
const char * getFormatted (const IliFormat &fmt) const
 Returns a formatted string. More...
 
const char * getFormatted (const IliFormat &fmt, const IliInputMask &mask) const
 Returns a formatted string. More...
 
const IliDatatypegetType () const
 Returns data type. More...
 
IlBoolean import (const IliValue &val)
 Imports an IliValue value. More...
 
IlBoolean importAny (IlAny val)
 Imports an any value. More...
 
IlBoolean importBinary (const IliBinary &val)
 Imports a binary value. More...
 
IlBoolean importBoolean (IlBoolean val)
 Imports a Boolean value. More...
 
IlBoolean importByte (IliByte val)
 Imports a byte value. More...
 
IlBoolean importDate (const IliDate &val)
 Imports a date value. More...
 
IlBoolean importDecimal (const IliDecimal &val)
 Imports a decimal value. More...
 
IlBoolean importDouble (IlDouble val)
 Imports a double value. More...
 
IlBoolean importFloat (IlFloat val)
 Imports a float value. More...
 
IlBoolean importInteger (IlInt val)
 Imports an integer value. More...
 
IlBoolean importString (const char *val, IlUInt len=IliNTS)
 Imports a string value. More...
 
IlBoolean importTable (const IliTable *val)
 Imports a table value. More...
 
IlBoolean importTime (const IliTime &val)
 Imports a time value. More...
 
IlBoolean isModified () const
 Returns modified state. More...
 
IlBoolean isNull () const
 Returns IlTrue if the value is null. More...
 
 operator const char * () const
 Returns a string value. More...
 
 operator const IliTable * () const
 Returns an IliTable value. More...
 
 operator IlAny () const
 Returns an IlAny value. More...
 
 operator IlDouble () const
 Returns a double value. More...
 
 operator IlFloat () const
 Returns a float value. More...
 
 operator IliBinary () const
 Returns an IliBinary value. More...
 
 operator IliByte () const
 Returns an IliByte value. More...
 
 operator IliDate () const
 Returns an IliDate value. More...
 
 operator IliDecimal () const
 Returns an IliDecimal value. More...
 
 operator IlInt () const
 Returns an integer value. More...
 
 operator IliTime () const
 Returns an IliTime value. More...
 
int operator!= (const IliValue &val) const
 Operator !=. More...
 
int operator< (const IliValue &val) const
 Operator <. More...
 
int operator<= (const IliValue &val) const
 Operator <=. More...
 
IliValueoperator= (const char *val)
 Assigns a string. More...
 
IliValueoperator= (const IliBinary &val)
 Assigns an IliBinary. More...
 
IliValueoperator= (const IliDate &val)
 Assigns an IliDate. More...
 
IliValueoperator= (const IliDecimal &val)
 Assigns an IliDecimal. More...
 
IliValueoperator= (const IliTable *val)
 Assigns an IliTable. More...
 
IliValueoperator= (const IliTime &val)
 Assigns an IliTime. More...
 
IliValueoperator= (const IliValue &val)
 Assigns an IliValue. More...
 
IliValueoperator= (IlAny val)
 Assigns an IlAny. More...
 
IliValueoperator= (IlDouble val)
 Assigns a double. More...
 
IliValueoperator= (IlFloat val)
 Assigns a float. More...
 
IliValueoperator= (IliByte val)
 Assigns an IliByte. More...
 
IliValueoperator= (IlInt val)
 Assigns an integer. More...
 
int operator== (const IliValue &val) const
 Operator ==. More...
 
int operator> (const IliValue &val) const
 Operator > More...
 
int operator>= (const IliValue &val) const
 Operator >=. More...
 
void read (IL_STDPREF istream &input)
 Reads from input stream. More...
 
void setModified (IlBoolean modified)
 Sets modified state. More...
 
void setNull (const IliDatatype *type=0)
 Sets null. More...
 
void write (IL_STDPREF ostream &output) const
 Writes to output stream. More...
 

Friends

class IliDatatype
 

Detailed Description

User interface class.

Library: dataccess

The purpose of the IliValue class is to support polymorphism for the most primitive data types, such as character string, integer, and float. An IliValue object can hold a value belonging to any of these primitive types. Moreover, the type of this value can be changed dynamically. The IliDatatype class is used to represent the dynamic type of an IliValue object.

About Comparison These operators and the member function described in this section compare two values according to the following rules:

If both types differ:

When both types are equal or numeric:

See also
IliDatatype, IliDate, IliFormat, IliString, IliBinary, IliByte, IliNTS

Constructor & Destructor Documentation

◆ IliValue() [1/13]

IliValue::IliValue ( const IliDatatype type)

This constructor initializes a null value, with an initial type.

Parameters
typeThe data type.

◆ IliValue() [2/13]

IliValue::IliValue ( const IliValue val)

Copy constructor.

This is the copy constructor of class IliValue.

Parameters
valThe value.

◆ IliValue() [3/13]

IliValue::IliValue ( const char *  val)

Constructor from string.

This constructor creates a value of type IliStringType, initialized with a copy of str. If str is NULL or empty, the constructed value will be null.

Parameters
valThe string value.

◆ IliValue() [4/13]

IliValue::IliValue ( IliByte  val)

Constructor from IliByte.

This constructor creates a value of type IliByteType, initialized with byte.

Parameters
valThe IliByte value.

◆ IliValue() [5/13]

IliValue::IliValue ( IlInt  val)

Constructor from integer value.

This constructor creates a value of type IliIntegerType, initialized with i.

Parameters
valThe integer value.

◆ IliValue() [6/13]

IliValue::IliValue ( IlFloat  val)

Constructor from float value.

This constructor creates a value of type IliFloatType, initialized with f.

Parameters
valThe float value.

◆ IliValue() [7/13]

IliValue::IliValue ( IlDouble  val)

Constructor from double value.

This constructor creates a value of type IliDoubleType, initialized with d.

Parameters
valThe double value.

◆ IliValue() [8/13]

IliValue::IliValue ( const IliDecimal val)

Constructor from IliDecimal value.

This constructor creates a value of type IliDecimalType, initialized with dec.

Parameters
valThe IliDecimal value.

◆ IliValue() [9/13]

IliValue::IliValue ( const IliDate val)

Constructor from date value.

This constructor creates a value of type IliDateType, initialized with a copy of date.

Parameters
valThe date value

◆ IliValue() [10/13]

IliValue::IliValue ( const IliTime val)

Constructor from time value.

This constructor creates a value of type IliTimeType, initialized with a copy of time.

Parameters
valThe time value.

◆ IliValue() [11/13]

IliValue::IliValue ( const IliBinary val)

Constructor from binary value.

This constructor creates a value of type IliBinaryType, initialized with a copy of binary.

Parameters
valThe binary value.

◆ IliValue() [12/13]

IliValue::IliValue ( const IliTable val)

Constructor from table.

This constructor creates a value of structured type, initialized with a copy of tbl.

Parameters
valThe table

◆ IliValue() [13/13]

IliValue::IliValue ( IlAny  val)

Constructor from any.

This constructor creates a value of type IliAnyType, initialized with any.

Parameters
valThe any value.

Member Function Documentation

◆ asAny()

IlAny IliValue::asAny ( IlAny  nvl = 0) const

Returns an any value.

Parameters
nvlThe default value.
Returns
The nvl parameter if the IliValue object is null, or if its type is not IliAnyType. Otherwise, the pointer value is returned.

◆ asBinary()

IliBinary IliValue::asBinary ( const IliBinary nvl = IliBinary::GetDefault()) const

Returns a binary value.

Parameters
nvlThe default value.
Returns
A default IliBinary object if the IliValue object is null, or if its type is not IliBinaryType. Otherwise, the binary value is returned.

◆ asBoolean()

IlBoolean IliValue::asBoolean ( IlBoolean  nvl = IlFalse) const

Returns a Boolean value.

Parameters
nvlThe default value.
Returns
  • If the IliValue object is null, the nvl parameter is returned;
  • If the type of the IliValue object is numeric, the numeric value is returned;
  • If the type of the IliValue object is IliStringType, and if the character string value represents a number, that number is returned. In this case the application settings concerning the decimal point character are used to determine whether the character string represents a number.
  • Otherwise, the nvl parameter is returned.

◆ asByte()

IliByte IliValue::asByte ( IliByte  nvl = 0) const

Returns a byte value.

Parameters
nvlThe default value.
Returns
  • If the IliValue object is null, the nvl parameter is returned;
  • If the type of the IliValue object is numeric, the numeric value is returned;
  • If the type of the IliValue object is IliStringType, and if the character string value represents a number, that number is returned. In this case the application settings concerning the decimal point character are used to determine whether the character string represents a number.
  • Otherwise, the nvl parameter is returned.

◆ asDate()

IliDate IliValue::asDate ( const IliDate nvl = IliDate::GetDefault()) const

Returns a date value.

Parameters
nvlThe default value.
Returns
The nvl parameter if the IliValue object is null. Otherwise, if the type of the IliValue object is IliDateType, the date value is returned.

However, if the type is IliStringType, and if the character string value represents a date (according to the application settings concerning the date and time separators, the month-day default order, and the current language), this date is returned. Otherwise, the nvl parameter is returned.

◆ asDecimal() [1/2]

IliDecimal IliValue::asDecimal ( ) const

Returns a decimal value.

Returns
  • If the IliValue object is null, a null numeric is returned;
  • If the type of the IliValue object is numeric, the numeric value is returned;
  • If the type of the IliValue object is IliStringType, and if the character string value represents a number, that number is returned. In this case the application settings concerning the decimal point character are used to determine whether the character string represents a number.
  • Otherwise, a null numeric is returned.

◆ asDecimal() [2/2]

IliDecimal IliValue::asDecimal ( const IliDecimal nvl) const

Returns a decimal value.

Parameters
nvlThe default value.
Returns
  • If the IliValue object is null, the nvl parameter is returned;
  • If the type of the IliValue object is numeric, the numeric value is returned;
  • If the type of the IliValue object is IliStringType, and if the character string value represents a number, that number is returned. In this case the application settings concerning the decimal point character are used to determine whether the character string represents a number.
  • Otherwise, the nvl parameter is returned.

◆ asDouble()

IlDouble IliValue::asDouble ( IlDouble  nvl = 0.0) const

Returns a double value.

Parameters
nvlThe default value.
Returns
  • If the IliValue object is null, the nvl parameter is returned;
  • If the type of the IliValue object is numeric, the numeric value is returned;
  • If the type of the IliValue object is IliStringType, and if the character string value represents a number, that number is returned. In this case the application settings concerning the decimal point character are used to determine whether the character string represents a number.
  • Otherwise, the nvl parameter is returned.

◆ asFloat()

IlFloat IliValue::asFloat ( IlFloat  nvl = 0.0) const

Returns a float value.

Parameters
nvlThe default value.
Returns
  • If the IliValue object is null, the nvl parameter is returned;
  • If the type of the IliValue object is numeric, the numeric value is returned;
  • If the type of the IliValue object is IliStringType, and if the character string value represents a number, that number is returned. In this case the application settings concerning the decimal point character are used to determine whether the character string represents a number.
  • Otherwise, the nvl parameter is returned.

◆ asInteger()

IlInt IliValue::asInteger ( IlInt  nvl = 0) const

Returns an integer value.

Parameters
nvlThe default value.
Returns
  • If the IliValue object is null, the nvl parameter is returned;
  • If the type of the IliValue object is numeric, the numeric value is returned;
  • If the type of the IliValue object is IliStringType, and if the character string value represents a number, that number is returned. In this case the application settings concerning the decimal point character are used to determine whether the character string represents a number.
  • Otherwise, the nvl parameter is returned.

◆ asString()

const char* IliValue::asString ( const char *  nvl = 0) const

Returns a string value.

Parameters
nvlThe default value.
Returns
A pointer to its character string value, provided that the IliValue object is not null, and that its type is IliStringType. Otherwise, this cast operator returns the nvl parameter.

◆ asTable()

const IliTable* IliValue::asTable ( const IliTable nvl = 0) const

Returns a table value.

Parameters
nvlThe default value.
Returns
The nvl parameter if the IliValue object is null or if its type is not a structured type, is returned. Otherwise, the table value is returned.

◆ asTime()

IliTime IliValue::asTime ( const IliTime nvl = IliTime::GetDefault()) const

Returns a time value.

Parameters
nvlThe default value.
Returns
The nvl parameter if the IliValue object is null, this member function returns the nvl parameter. Otherwise, if the type of the IliValue object is IliTimeType, the time value is returned.

However, if the type is IliStringType, and if the character string value represents a time (according to the application settings concerning time separators), this time is returned. Otherwise, the nvl parameter is returned.

◆ compare()

int IliValue::compare ( const IliValue val) const

Compares two values.

Parameters
valThe second value.
Returns
+1 if this object is greater than the other object or if both values are not comparable 0 if both objects are equal, and -1 if this object is less than the other object. For an explanation on how the comparison is carried out, see the description of the comparison operators above.

◆ format() [1/3]

void IliValue::format ( IliString dest,
const char *  fmt = 0 
) const

Returns a formatted string.

Parameters
destContains the formatted string.
fmtThe format definition.
Returns
The character string representation of the value according to the fmt format definition. The return value should be used as soon as possible, since it belongs to a static buffer. It may be overwritten without warning, the next time this member function is called.

◆ format() [2/3]

void IliValue::format ( IliString dest,
const IliFormat fmt 
) const

Returns a formatted string.

Parameters
destContains the formatted string.
fmtThe format.
Returns
The character string representation of the value according to the fmt format. The return value should be used as soon as possible, since it belongs to a static buffer. It may be overwritten without warning, the next time this member function is called.

◆ format() [3/3]

void IliValue::format ( IliString dest,
const IliFormat fmt,
const IliInputMask mask 
) const

Returns a formatted string by a mask.

Appends the representation of the value to the dest string. If the mask parameter is not the null input mask, then it is used to do the formatting (and the mask parameter is not used.) Otherwise, the fmt parameter is used to do the formatting.

Parameters
destContains the formatted string.
fmtThe format.
maskThe mask.

◆ getFormatted() [1/3]

const char* IliValue::getFormatted ( const char *  fmt = 0) const

Returns a formatted string.

Parameters
fmtThe format definition.
Returns
The character string representation of the value according to the fmt format definition. The return value should be used as soon as possible since it belongs to a static buffer. It may be overwritten without warning, the next time this member function is called.

◆ getFormatted() [2/3]

const char* IliValue::getFormatted ( const IliFormat fmt) const

Returns a formatted string.

Parameters
fmtThe format.
Returns
The character string representation of the value according to the fmt format definition. The return value should be used as soon as possible, since it belongs to a static buffer. It may be overwritten without warning, the next time this member function is called.

◆ getFormatted() [3/3]

const char* IliValue::getFormatted ( const IliFormat fmt,
const IliInputMask mask 
) const

Returns a formatted string.

Parameters
fmtThe format.
maskThe mask.
Returns
The character string representation of the value according to the mask parameter if it is not the null input mask. Otherwise, it returns the character string representation of the value according to the fmt parameter. The return value should be used as soon as possible, since it belongs to a static buffer.

◆ getType()

const IliDatatype * IliValue::getType ( ) const

Returns data type.

Returns
The dynamic of the IliValue object.

◆ import()

IlBoolean IliValue::import ( const IliValue val)

Imports an IliValue value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importAny()

IlBoolean IliValue::importAny ( IlAny  val)

Imports an any value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importBinary()

IlBoolean IliValue::importBinary ( const IliBinary val)

Imports a binary value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importBoolean()

IlBoolean IliValue::importBoolean ( IlBoolean  val)

Imports a Boolean value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importByte()

IlBoolean IliValue::importByte ( IliByte  val)

Imports a byte value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importDate()

IlBoolean IliValue::importDate ( const IliDate val)

Imports a date value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importDecimal()

IlBoolean IliValue::importDecimal ( const IliDecimal val)

Imports a decimal value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importDouble()

IlBoolean IliValue::importDouble ( IlDouble  val)

Imports a double value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importFloat()

IlBoolean IliValue::importFloat ( IlFloat  val)

Imports a float value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importInteger()

IlBoolean IliValue::importInteger ( IlInt  val)

Imports an integer value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importString()

IlBoolean IliValue::importString ( const char *  val,
IlUInt  len = IliNTS 
)

Imports a string value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
lenThe maximum length.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importTable()

IlBoolean IliValue::importTable ( const IliTable val)

Imports a table value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ importTime()

IlBoolean IliValue::importTime ( const IliTime val)

Imports a time value.

The conversion member function is similar to the assignment operator, except that they do not change the type of the IliValue object. Instead, they attempt to convert their parameter to the current type of the IliValue object.

Parameters
valThe imported value.
Returns
IlTrue if the conversion succeeded. The modified property of the IliValue object will also be set to IlTrue if successful.

◆ isModified()

IlBoolean IliValue::isModified ( ) const

Returns modified state.

Returns
IlTrue if the value has been modified, since the last time the setModified member function was called with an IlFalse parameter.

◆ isNull()

IlBoolean IliValue::isNull ( ) const

Returns IlTrue if the value is null.

Returns
IlTrue if the value is null.

◆ operator const char *()

IliValue::operator const char * ( ) const

Returns a string value.

Returns
A pointer to its character string value, provided the IliValue object is not null and that its type is IliStringType. Otherwise, this cast operator returns null.

◆ operator const IliTable *()

IliValue::operator const IliTable * ( ) const

Returns an IliTable value.

Returns
NULL if the IliValue object is null or if its type is not a structured type. Otherwise, the table value is returned.

◆ operator IlAny()

IliValue::operator IlAny ( ) const

Returns an IlAny value.

Returns
0 if the IliValue object is null or if its type is not IliAnyType. Otherwise, the pointer value is returned.

◆ operator IlDouble()

IliValue::operator IlDouble ( ) const

Returns a double value.

Returns
0 if the object is null. If the object type is numeric, the numeric value is returned. If the object type is IliStringType and if the string value represents a number, that number is returned. In this case, the application settings concerning the decimal point character are used to determine whether the string represents a number. Otherwise, 0 is returned.

◆ operator IlFloat()

IliValue::operator IlFloat ( ) const

Returns a float value.

Returns
0 if the object is null. If the object type is numeric, the numeric value is returned. If the object type is IliStringType and if the string value represents a number, that number is returned. In this case, the application settings concerning the decimal point character are used to determine whether the string represents a number. Otherwise, 0 is returned.

◆ operator IliBinary()

IliValue::operator IliBinary ( ) const

Returns an IliBinary value.

Returns
A default IliBinary object if the IliValue object is null or if its type is not IliBinaryType. Otherwise, the binary value is returned.

◆ operator IliByte()

IliValue::operator IliByte ( ) const

Returns an IliByte value.

Returns
0 if the object is null. If the object type is numeric, the numeric value is returned. If the object type is IliStringType and if the string value represents a number, that number is returned. In this case, the application settings concerning the decimal point character are used to determine whether the string represents a number. Otherwise, 0 is returned.

◆ operator IliDate()

IliValue::operator IliDate ( ) const

Returns an IliDate value.

Returns
A default date object if the IliValue object is null. Otherwise, if the type of the IliValue object is IliDateType, the date value is returned.

However, if the type is IliStringType and if the character string value represents a date (according to the application settings concerning the date and time separators, the month-day default order, and the current language) then this date is returned. Otherwise, a default date object is returned.

◆ operator IliDecimal()

IliValue::operator IliDecimal ( ) const

Returns an IliDecimal value.

Returns
0 if the object is null. If the object type is numeric, the numeric value is returned. If the object type is IliStringType and if the string value represents a number, that number is returned. In this case, the application settings concerning the decimal point character are used to determine whether the string represents a number. Otherwise, 0 is returned.

◆ operator IlInt()

IliValue::operator IlInt ( ) const

Returns an integer value.

Returns
0 if the object is null. If the object type is numeric, the numeric value is returned. If the object type is IliStringType and if the string value represents a number, that number is returned. In this case, the application settings concerning the decimal point character are used to determine whether the string represents a number. Otherwise, 0 is returned.

◆ operator IliTime()

IliValue::operator IliTime ( ) const

Returns an IliTime value.

Returns
A default time object if the IliValue object is null. Otherwise, if the type of the IliValue object is IliTimeType, the time value is returned.

However, if the type is IliStringType and if the character string value represents a time (according to the application settings concerning the time separators) then this time is returned. Otherwise, a default time object is returned.

◆ operator!=()

int IliValue::operator!= ( const IliValue val) const

Operator !=.

Parameters
valThe second value.
Returns
0 if both values are equal and 1 otherwise.

◆ operator<()

int IliValue::operator< ( const IliValue val) const

Operator <.

Parameters
valThe second value.
Returns
1 if the value on the left hand side of the operator is less than the value on the right hand side or if the values are not comparable, and returns 0 otherwise.

◆ operator<=()

int IliValue::operator<= ( const IliValue val) const

Operator <=.

Parameters
valThe second value.
Returns
1 if the value on the left hand side of the operator is less than or equal to the value on the right hand side or if the values cannot be compared, and returns 0 otherwise.

◆ operator=() [1/12]

IliValue & IliValue::operator= ( const char *  val)

Assigns a string.

This operator assigns a new value of string type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [2/12]

IliValue & IliValue::operator= ( const IliBinary val)

Assigns an IliBinary.

This operator assigns a new value of IliBinary type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [3/12]

IliValue & IliValue::operator= ( const IliDate val)

Assigns an IliDate.

This operator assigns a new value of IliDate type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [4/12]

IliValue & IliValue::operator= ( const IliDecimal val)

Assigns an IliDecimal.

This operator assigns a new value of IliDecimal type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [5/12]

IliValue& IliValue::operator= ( const IliTable val)

Assigns an IliTable.

This operator assigns a new value of IliTable type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [6/12]

IliValue & IliValue::operator= ( const IliTime val)

Assigns an IliTime.

This operator assigns a new value of IliTime type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [7/12]

IliValue& IliValue::operator= ( const IliValue val)

Assigns an IliValue.

This operator assigns a new value of IliValue type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [8/12]

IliValue & IliValue::operator= ( IlAny  val)

Assigns an IlAny.

This operator assigns a new value of IlAny type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [9/12]

IliValue & IliValue::operator= ( IlDouble  val)

Assigns a double.

This operator assigns a new value of double type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [10/12]

IliValue & IliValue::operator= ( IlFloat  val)

Assigns a float.

This operator assigns a new value of float type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [11/12]

IliValue & IliValue::operator= ( IliByte  val)

Assigns an IliByte.

This operator assigns a new value of IliByte type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator=() [12/12]

IliValue & IliValue::operator= ( IlInt  val)

Assigns an integer.

This operator assigns a new value of integer type. The modified property of the object is set to IlTrue.

Parameters
valThe value.
Returns
The modified object.

◆ operator==()

int IliValue::operator== ( const IliValue val) const

Operator ==.

Parameters
valThe second value.
Returns
1 if both values are equal and 0 otherwise.

◆ operator>()

int IliValue::operator> ( const IliValue val) const

Operator >

Parameters
valThe second value.
Returns
1 if the value on the left hand side of the operator is greater than the value on the right hand side or if the values cannot be compared, and returns 0 otherwise.

◆ operator>=()

int IliValue::operator>= ( const IliValue val) const

Operator >=.

Parameters
valThe second value.
Returns
1 if the value on the left hand side of the operator is greater than or equal to the value on the right hand side or if the values cannot be compared, and returns 0 otherwise.

◆ read()

void IliValue::read ( IL_STDPREF istream &  input)

Reads from input stream.

Reads the definition of an IliValue object from an input stream.

Parameters
inputThe input stream

◆ setModified()

void IliValue::setModified ( IlBoolean  modified)

Sets modified state.

Sets the modified property of the value to IlTrue.

Parameters
modifiedThe modified state.

◆ setNull()

void IliValue::setNull ( const IliDatatype type = 0)

Sets null.

Changes the dynamic type of the IliValue object to type. The value itself is then set to null, whether the type is NULL or not.

Parameters
typeNew data type.

◆ write()

void IliValue::write ( IL_STDPREF ostream &  output) const

Writes to output stream.

Writes the definition of an IliValue object to an output stream, in a form suitable to be read back by the read member function.

Parameters
outputThe output stream