|
|
| KJSO ()
| KJSO |
Constructor.
| KJSO (Imp *d)
| KJSO |
| KJSO (const KJSO &)
| KJSO |
Copy constructor.
| KJSO& operator= (const KJSO &)
| operator= |
| ~KJSO ()
| ~KJSO |
[virtual]
Destructor.
| bool isNull ()
| isNull |
[const]
Returns: True if this object is null, i.e. if there is no data attached to this object. Don't confuse this with the Null object.
| bool isDefined ()
| isDefined |
[const]
Returns: True if this objects is of any other value than Undefined.
| Type type ()
| type |
[const]
Returns: the type of the object. One of the KJS::Type enums.
| bool isA (Type t)
| isA |
[const]
Check whether object is of a certain type
Parameters:
| t | type to check for |
| bool isA (const char *s)
| isA |
[const]
Check whether object is of a certain type. Allows checking of host objects, too.
Parameters:
| type | name (Number, Boolean etc.) |
| bool isObject ()
| isObject |
[const]
Use this method when checking for objects. It's safer than checking for a single object type with isA().
| bool derivedFrom (const char *s)
| derivedFrom |
[const]
Examine the inheritance structure of this object.
Parameters:
| t | Name of the base class. |
Returns: True if object is of type t or a derived from such a type.
| KJSO toPrimitive (Type preferred = UndefinedType)
| toPrimitive |
[const]
Parameters:
| preferred | Optional hint. Either StringType or NumberType. |
Returns: Conversion to primitive type (Undefined, Boolean, Number or String)
| Boolean toBoolean ()
| toBoolean |
[const]
Returns: Conversion to Boolean type.
| Number toNumber ()
| toNumber |
[const]
Returns: Conversion to Number type.
| double round ()
| round |
[const]
Returns: Conversion to double. 0.0 if conversion failed.
| Number toInteger ()
| toInteger |
[const]
Returns: Conversion to Number type containing an integer value.
| int toInt32 ()
| toInt32 |
[const]
Returns: Conversion to signed integer value.
| unsigned int toUInt32 ()
| toUInt32 |
[const]
Returns: Conversion to unsigned integer value.
| unsigned short toUInt16 ()
| toUInt16 |
[const]
Returns: Conversion to unsigned short value.
| String toString ()
| toString |
[const]
Returns: Conversion to String type.
| Object toObject ()
| toObject |
[const]
Returns: Conversion to Object type.
| void setPrototype (const KJSO &p)
| setPrototype |
Set the internal [[Prototype]] property of this object.
Parameters:
| p | A prototype object. |
| void setPrototypeProperty (const KJSO &p)
| setPrototypeProperty |
Set the "prototype" property of this object. Different from the internal [[Prototype]] property.
Parameters:
| p | A prototype object. |
| KJSO prototype ()
| prototype |
[const]
Returns: The internal [[prototype]] property.
| KJSO get (const UString &p)
| get |
[const]
The internal [[Get]] method.
Returns: The value of property p.
| bool hasProperty (const UString &p, bool recursive = true)
| hasProperty |
[const]
The internal [[HasProperty]] method.
Parameters:
| p | Property name. |
| recursive | Indicates whether prototypes are searched as well. |
Returns: Boolean value indicating whether the object already has a member with the given name p.
| void put (const UString &p, const KJSO& v)
| put |
The internal [[Put]] method. Sets the specified property to the value v.
Parameters:
| p | Property name. |
| v | Value. |
| bool canPut (const UString &p)
| canPut |
[const]
The internal [[CanPut]] method.
Parameters:
| p | Property name. |
Returns: A boolean value indicating whether a [[Put]] operation with p succeed.
| bool deleteProperty (const UString &p)
| deleteProperty |
The internal [[Delete]] method. Removes the specified property from the object.
Parameters:
| p | Property name. |
Returns: True if the property was deleted successfully or didn't exist in the first place. False if the DontDelete attribute was set.
| void put (const UString &p, const KJSO& v, int attr)
| put |
Same as above put() method except the additional attribute. Right now, this only works with native types as Host Objects don't reimplement this method.
Parameters:
| attr | One of KJS::Attribute. |
| void put (const UString &p, double d, int attr = None)
| put |
Convenience function for adding a Number property constructed from a double value.
| void put (const UString &p, int i, int attr = None)
| put |
Convenience function for adding a Number property constructed from an integer value.
| void put (const UString &p, unsigned int u, int attr = None)
| put |
Convenience function for adding a Number property constructed from an unsigned integer value.
| KJSO getBase ()
| getBase |
[const]
Reference method.
Returns: Reference base if object is a reference. Throws a ReferenceError otherwise.
| UString getPropertyName ()
| getPropertyName |
[const]
Reference method.
Returns: Property name of a reference. Null string if object is not a reference.
| KJSO getValue ()
| getValue |
[const]
Reference method.
Returns: Referenced value. This object if no reference.
| KJSO getValue ()
| getValue |
| ErrorType putValue (const KJSO& v)
| putValue |
Reference method. Set referenced value to v.
| bool implementsCall ()
| implementsCall |
[const]
Returns: True if object supports executeCall() method. That's the case for all objects derived from FunctionType.
| KJSO executeCall (const KJSO &thisV, const List *args)
| executeCall |
Execute function implemented via the Function::execute() method.
Note: check availability via implementsCall() beforehand.
Parameters:
| thisV | Object serving as the 'this' value. |
| args | Pointer to the list of arguments or null. |
Returns: Result of the function call.
| KJSO executeCall (const KJSO &thisV, const List *args, const List *extraScope)
| executeCall |
[const]
| void setConstructor (KJSO c)
| setConstructor |
Set this object's constructor.
| Imp * imp ()
| imp |
[const]
Returns: A Pointer to the internal implementation.
| static int count | count |
| Imp * rep | rep |
[protected]
| Generated by: dfaure on kde.faure.org on Thu Jan 17 22:18:54 2002, using kdoc 2.0a53. |