KJS::JSValue

#include <value.h>

Inherits WTFNoncopyable::Noncopyable.

Inherited by KJS::JSCell.

Public Member Functions

bool getBoolean (bool &) const
 
bool getBoolean () const
 
JSValuegetByIndex (ExecState *exec, unsigned propertyName) const
 
bool getNumber (double &) const
 
double getNumber () const
 
JSObject * getObject ()
 
const JSObject * getObject () const
 
bool getPrimitiveNumber (ExecState *exec, double &number, JSValue *&value)
 
bool getString (UString &) const
 
UString getString () const
 
bool getTruncatedInt32 (int32_t &) const
 
bool getTruncatedUInt32 (uint32_t &) const
 
bool getUInt32 (uint32_t &) const
 
bool implementsCall () const
 
bool isBoolean () const
 
bool isNull () const
 
bool isNumber () const
 
bool isObject () const
 
bool isObject (const ClassInfo *) const
 
bool isString () const
 
bool isUndefined () const
 
bool isUndefinedOrNull () const
 
void mark ()
 
bool marked () const
 
bool toBoolean (ExecState *exec) const
 
float toFloat (ExecState *) const
 
int32_t toInt32 (ExecState *) const
 
int32_t toInt32 (ExecState *, bool &ok) const
 
double toInteger (ExecState *) const
 
double toIntegerPreserveNaN (ExecState *) const
 
JSValuetoJSNumber (ExecState *) const
 
double toNumber (ExecState *exec) const
 
JSObject * toObject (ExecState *exec) const
 
JSValuetoPrimitive (ExecState *exec, JSType preferredType=UnspecifiedType) const
 
UString toString (ExecState *exec) const
 
uint16_t toUInt16 (ExecState *exec) const
 
uint32_t toUInt32 (ExecState *) const
 
uint32_t toUInt32 (ExecState *, bool &ok) const
 
JSType type () const
 

Static Public Member Functions

static int32_t toInt32 (double)
 
static int32_t toInt32SlowCase (double, bool &ok)
 
static int32_t toUInt32 (double)
 
static uint32_t toUInt32SlowCase (double, bool &ok)
 

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 58 of file value.h.

Member Function Documentation

bool KJS::JSValue::implementsCall ( ) const
inline

Whether or not the value implements the call() method.

If it does, this also implies this is an object, and hence it can be cast to a JSObject and the call method can be invoked

Returns
true if this is an object implementing the call() method, otherwise false

Definition at line 557 of file value.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jul 10 2020 22:58:16 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.