KJS::Value Class Reference
#include <value.h>
Inheritance diagram for KJS::Value:
Public Member Functions | |
| Value (ValueImp *v) | |
| Value (const Value &v) | |
| Value & | operator= (const Value &v) |
| bool | isValid () const |
| bool | isNull () const |
| ValueImp * | imp () const |
| Type | type () const |
| bool | isA (Type t) const |
| Value | toPrimitive (ExecState *exec, Type preferredType=UnspecifiedType) const |
| bool | toBoolean (ExecState *exec) const |
| double | toNumber (ExecState *exec) const |
| int | toInteger (ExecState *exec) const |
| int | toInt32 (ExecState *exec) const |
| unsigned int | toUInt32 (ExecState *exec) const |
| unsigned short | toUInt16 (ExecState *exec) const |
| UString | toString (ExecState *exec) const |
| Object | toObject (ExecState *exec) const |
| bool | toUInt32 (unsigned &i) const |
Protected Attributes | |
| ValueImp * | rep |
Detailed Description
Value objects are act as wrappers ("smart pointers") around ValueImp objects and their descendents.
Instead of using ValueImps (and derivatives) during normal program execution, you should use a Value-derived class.
Value maintains a pointer to a ValueImp object and uses a reference counting scheme to ensure that the ValueImp object is not deleted or garbage collected.
Note: The conversion operations all return values of various types - if an error occurs during conversion, an error object will instead be returned (where possible), and the execution state's exception will be set appropriately.
Member Function Documentation
| bool KJS::Value::isA | ( | Type | t | ) | const [inline] |
| bool KJS::Value::isNull | ( | ) | const [inline] |
- Deprecated:
- Use !isValid() instead.
| bool KJS::Value::isValid | ( | ) | const [inline] |
| bool KJS::Value::toBoolean | ( | ExecState * | exec | ) | const [inline] |
| int KJS::Value::toInt32 | ( | ExecState * | exec | ) | const [inline] |
| int KJS::Value::toInteger | ( | ExecState * | exec | ) | const [inline] |
| double KJS::Value::toNumber | ( | ExecState * | exec | ) | const [inline] |
| unsigned short KJS::Value::toUInt16 | ( | ExecState * | exec | ) | const [inline] |
| unsigned int KJS::Value::toUInt32 | ( | ExecState * | exec | ) | const [inline] |
| bool KJS::Value::toUInt32 | ( | unsigned & | i | ) | const [inline] |
| Type KJS::Value::type | ( | ) | const [inline] |
The documentation for this class was generated from the following files:

