|
|
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.
Value ()
| Value |
explicit Value (ValueImp *v)
| Value |
Value (const Value &v)
| Value |
~Value ()
| ~Value |
[virtual]
Value& operator= (const Value &v)
| operator= |
bool isNull ()
| isNull |
[const]
ValueImp * imp ()
| imp |
[const]
Type type ()
| type |
[const]
Returns the type of value. This is one of UndefinedType, NullType, BooleanType, StringType NumberType, ObjectType, ReferenceType, ListType or CompletionType.
Returns: The type of value
bool isA (Type t)
| isA |
[const]
Checks whether or not the value is of a particular tpye
Parameters:
The | type to compare with |
Returns: true if the value is of the specified type, otherwise false
Value toPrimitive (ExecState *exec,
Type preferredType = UnspecifiedType)
| toPrimitive |
[const]
Performs the ToPrimitive type conversion operation on this value (ECMA 9.1)
bool toBoolean (ExecState *exec)
| toBoolean |
[const]
Performs the ToBoolean type conversion operation on this value (ECMA 9.2)
double toNumber (ExecState *exec)
| toNumber |
[const]
Performs the ToNumber type conversion operation on this value (ECMA 9.3)
int toInteger (ExecState *exec)
| toInteger |
[const]
Performs the ToInteger type conversion operation on this value (ECMA 9.4)
int toInt32 (ExecState *exec)
| toInt32 |
[const]
Performs the ToInt32 type conversion operation on this value (ECMA 9.5)
unsigned int toUInt32 (ExecState *exec)
| toUInt32 |
[const]
Performs the ToUint32 type conversion operation on this value (ECMA 9.6)
unsigned short toUInt16 (ExecState *exec)
| toUInt16 |
[const]
Performs the ToUint16 type conversion operation on this value (ECMA 9.7)
UString toString (ExecState *exec)
| toString |
[const]
Performs the ToString type conversion operation on this value (ECMA 9.8)
Object toObject (ExecState *exec)
| toObject |
[const]
Performs the ToObject type conversion operation on this value (ECMA 9.9)
Value getBase (ExecState *exec)
| getBase |
[const]
Performs the GetBase type conversion operation on this value (ECMA 8.7)
Since references are supposed to have an Object or null as their base, this method is guaranteed to return either Null() or an Object value.
UString getPropertyName (ExecState *exec)
| getPropertyName |
[const]
Performs the GetPropertyName type conversion operation on this value (ECMA 8.7)
Value getValue (ExecState *exec)
| getValue |
[const]
Performs the GetValue type conversion operation on this value (ECMA 8.7.1)
void putValue (ExecState *exec, const Value w)
| putValue |
Performs the PutValue type conversion operation on this value (ECMA 8.7.1)
ValueImp * rep | rep |
[protected]
Generated by: dfaure on faure on Tue Apr 16 08:50:27 2002, using kdoc 2.0a53. |