KJS
KJS::JSValue Class Reference
#include <value.h>

Detailed Description
JSValue is the base type for all primitives (Undefined, Null, Boolean, String, Number) and objects in ECMAScript.Note: you should never inherit from JSValue as it is for primitive types only (all of which are provided internally by KJS). Instead, inherit from JSObject.
Definition at line 57 of file value.h.
Public Member Functions | |
| JSType | type () const |
| bool | isUndefined () const |
| bool | isNull () const |
| bool | isUndefinedOrNull () const |
| bool | isBoolean () const |
| bool | isNumber () const |
| bool | isString () const |
| bool | isObject () const |
| bool | isObject (const ClassInfo *) const |
| bool | getBoolean (bool &) const |
| bool | getBoolean () const |
| bool | getNumber (double &) const |
| double | getNumber () const |
| bool | getString (UString &) const |
| UString | getString () const |
| JSObject * | getObject () |
| const JSObject * | getObject () const |
| bool | getUInt32 (uint32_t &) const |
| bool | getTruncatedInt32 (int32_t &) const |
| bool | getTruncatedUInt32 (uint32_t &) const |
| JSValue * | toPrimitive (ExecState *exec, JSType preferredType=UnspecifiedType) const |
| bool | getPrimitiveNumber (ExecState *exec, double &number, JSValue *&value) |
| bool | toBoolean (ExecState *exec) const |
| double | toNumber (ExecState *exec) const |
| JSValue * | toJSNumber (ExecState *) const |
| UString | toString (ExecState *exec) const |
| JSObject * | toObject (ExecState *exec) const |
| double | toInteger (ExecState *) const |
| double | toIntegerPreserveNaN (ExecState *) const |
| int32_t | toInt32 (ExecState *) const |
| int32_t | toInt32 (ExecState *, bool &ok) const |
| uint32_t | toUInt32 (ExecState *) const |
| uint32_t | toUInt32 (ExecState *, bool &ok) const |
| uint16_t | toUInt16 (ExecState *exec) const |
| float | toFloat (ExecState *) const |
| void | mark () |
| bool | marked () const |
Static Public Member Functions | |
| static int32_t | toInt32 (double) |
| static int32_t | toUInt32 (double) |
| static int32_t | toInt32SlowCase (double, bool &ok) |
| static uint32_t | toUInt32SlowCase (double, bool &ok) |
Friends | |
| class | JSCell |
| class | Collector |
Member Function Documentation
| JSType KJS::JSValue::type | ( | ) | const [inline] |
Reimplemented in KJS::StringImp, KJS::NumberImp, KJS::GetterSetterImp, KJS::JSObject, and KJS::JSCell.
| bool KJS::JSValue::isNumber | ( | ) | const [inline] |
| bool KJS::JSValue::isString | ( | ) | const [inline] |
| bool KJS::JSValue::isObject | ( | ) | const [inline] |
| double KJS::JSValue::getNumber | ( | ) | const [inline] |
| UString KJS::JSValue::getString | ( | ) | const [inline] |
| JSObject * KJS::JSValue::getObject | ( | ) | [inline] |
| const JSObject * KJS::JSValue::getObject | ( | ) | const [inline] |
| ALWAYS_INLINE bool KJS::JSValue::getUInt32 | ( | uint32_t & | v | ) | const |
| ALWAYS_INLINE bool KJS::JSValue::getTruncatedInt32 | ( | int32_t & | v | ) | const |
| bool KJS::JSValue::getTruncatedUInt32 | ( | uint32_t & | v | ) | const [inline] |
| JSValue * KJS::JSValue::toPrimitive | ( | ExecState * | exec, | |
| JSType | preferredType = UnspecifiedType | |||
| ) | const [inline] |
Reimplemented in KJS::StringImp, KJS::NumberImp, KJS::GetterSetterImp, KJS::JSObject, and KJS::JSCell.
| bool KJS::JSValue::getPrimitiveNumber | ( | ExecState * | exec, | |
| double & | number, | |||
| JSValue *& | value | |||
| ) | [inline] |
Reimplemented in KJS::StringImp, KJS::NumberImp, KJS::GetterSetterImp, KJS::JSObject, and KJS::JSCell.
Reimplemented in KJS::StringImp, KJS::NumberImp, KJS::GetterSetterImp, KJS::JSObject, and KJS::JSCell.
Reimplemented in KJS::StringImp, KJS::NumberImp, KJS::GetterSetterImp, KJS::JSObject, and KJS::JSCell.
Reimplemented in KJS::StringImp, KJS::NumberImp, KJS::GetterSetterImp, KJS::JSObject, and KJS::JSCell.
Reimplemented in KJS::StringImp, KJS::NumberImp, KJS::GetterSetterImp, KJS::JSObject, and KJS::JSCell.
| ALWAYS_INLINE int32_t KJS::JSValue::toInt32 | ( | ExecState * | exec | ) | const |
| uint32_t KJS::JSValue::toUInt32 | ( | ExecState * | exec | ) | const [inline] |
| uint16_t KJS::JSValue::toUInt16 | ( | ExecState * | exec | ) | const |
| int32_t KJS::JSValue::toInt32 | ( | double | val | ) | [inline, static] |
| int32_t KJS::JSValue::toUInt32 | ( | double | val | ) | [inline, static] |
| void KJS::JSValue::mark | ( | ) | [inline] |
Reimplemented in KJS::ArrayInstance, KJS::NativeErrorImp, KJS::Arguments, KJS::ActivationImp, KJS::JSWrapperObject, KJS::GetterSetterImp, KJS::JSObject, KJS::FunctionImp, and KJS::JSCell.
| bool KJS::JSValue::marked | ( | ) | const [inline] |
Friends And Related Function Documentation
friend class Collector [friend] |
The documentation for this class was generated from the following files:
KDE 4.0 API Reference