|
|
UChar represents a 16 bit Unicode character. It's internal data representation is compatible to XChar2b and QChar. It's therefore possible to exchange data with X and Qt with shallow copies.
The Global object represents the global namespace. It holds the native objects like String and functions like eval().
It also serves as a container for variables created by the user, i.e. the statement
var i = 2; |
will basically perform a Global::current().put("i", Number(2)); operation.
List is a native ECMAScript type. List values are only used for intermediate results of expression evaluation and cannot be stored as properties of objects.
The list is explicitly shared. Note that while copy() returns a deep copy of the list the referenced objects are still shared.
enum |
Types of classes derived from KJSO
enum |
Property attributes.
enum |
Types of classes derived from Object.
enum |
Completion types.
enum |
Error codes.
extern const double |
extern const double |
Number is a handle for a number value. KJSO::toPrimitive(), KJSO::toBoolean(), KJSO::toNumber(), KJSO::toString() and KJSO::toString() are re-implemented internally according to the specification.
Example usage:
Number a(2), b(3.0), c; // c defaults to 0.0 c = a.value() * b.value(); // c will be 6.0 now String s = c.toString(); // s holds "6" |
Note the following implementation detail: Internally, the value is stored as a double and will be casted from and to other types when needed. This won't be noticable within a certain range of values but might produce unpredictable results when crossing these limits. In case this turns out to be a real problem for an application we might have to extend this class to behave more intelligently.
Completion objects are used to convey the return status and value from functions.
See FunctionImp::execute()
See also: FunctionImp
enum |
enum |
bool |
Returns: True if d is not a number (platform support required).
bool |
Returns: True if d is infinite (platform support required).
bool |
int |
This operator performs an abstract relational comparision of the two arguments that can be of arbitrary type. If possible, conversions to the string or number type will take place before the comparison.
Returns: 1 if v1 is "less-than" v2, 0 if the relation is "greater-than-or- equal". -1 if the result is undefined.
double |
double |
KJSO |
Additive operator. Either performs an addition or substraction of v1 and v2.
Parameters:
oper | '+' or '-' for an addition or substraction, respectively. |
Returns: The result of the operation.
KJSO |
Multiplicative operator. Either multiplies/divides v1 and v2 or calculates the remainder from an division.
Parameters:
oper | '*', '/' or '%' for a multiplication, division or modulo operation. |
Returns: The result of the operation.
UCharReference is the dynamic counterpart of UChar. It's used when characters retrieved via index from a UString are used in an assignment expression (and therefore can't be treated as being const):
UString s("hello world"); s[0] = 'H'; |
If that sounds confusing your best bet is to simply forget about the existance of this class and treat is as being identical to UChar.
bool |
bool |
bool |
bool |
bool |
bool |
UString |
Generated by: marc@yogi on Tue Mar 27 13:09:05 2001, using kdoc 2.0a48. |