Public Types | Public Member Functions | Public Attributes

jsdIValue Interface Reference

Value objects. More...

import "jsdIDebuggerService.idl";

Inheritance diagram for jsdIValue:
Collaboration diagram for jsdIValue:

List of all members.

Public Types

enum  { TYPE_BOOLEAN = 0U }
 

Value is either |true| or |false|.

More...
enum  { TYPE_DOUBLE = 1U }
 

Value is a primitive number that is too large to fit in an integer.

More...
enum  { TYPE_INT = 2U }
 

Value is a primitive number that fits into an integer.

More...
enum  { TYPE_FUNCTION = 3U }
 

Value is a function.

More...
enum  { TYPE_NULL = 4U }
 

Value is |null|.

More...
enum  { TYPE_OBJECT = 5U }
 

Value is an object.

More...
enum  { TYPE_STRING = 6U }
 

Value is a primitive AUTF8String.

More...
enum  { TYPE_VOID = 7U }
 

Value is void.

More...

Public Member Functions

virtual nsresult GetJSDContext (JSDContext **aJSDContext)=0
 Value objects.
virtual nsresult GetJSDValue (JSDValue **aJSDValue)=0
 Internal use only.
virtual nsresult GetIsNative (PRBool *aIsNative)=0
 |false| unless the value is a function declared in script.
virtual nsresult GetIsNumber (PRBool *aIsNumber)=0
 |true| if the value represents a number, either double or integer.
virtual nsresult GetIsPrimitive (PRBool *aIsPrimitive)=0
 |true| if the value represents a JavaScript primitive number or AUTF8String
virtual nsresult GetJsType (PRUint32 *aJsType)=0
 One of the TYPE_* values above.
virtual nsresult GetJsPrototype (jsdIValue **aJsPrototype)=0
 Prototype value if this value represents an object, null if the value is not an object or the object has no prototype.
virtual nsresult GetJsParent (jsdIValue **aJsParent)=0
 Parent value if this value represents an object, null if the value is not an object or the object has no parent.
virtual nsresult GetJsClassName (nsACString &aJsClassName)=0
 Class name if this value represents an object.
virtual nsresult GetJsConstructor (jsdIValue **aJsConstructor)=0
 Constructor name if this value represents an object.
virtual nsresult GetJsFunctionName (nsACString &aJsFunctionName)=0
 Function name if this value represents a function.
virtual nsresult GetBooleanValue (PRBool *aBooleanValue)=0
 Value if interpreted as a boolean.
virtual nsresult GetDoubleValue (double *aDoubleValue)=0
 Value if interpreted as a double.
virtual nsresult GetIntValue (PRInt32 *aIntValue)=0
 Value if interpreted as an integer.
virtual nsresult GetObjectValue (jsdIObject **aObjectValue)=0
 Value if interpreted as an object.
virtual nsresult GetStringValue (nsACString &aStringValue)=0
 Value if interpreted as a AUTF8String.
virtual nsresult GetPropertyCount (PRInt32 *aPropertyCount)=0
 Number of properties.
virtual nsresult GetProperties (jsdIProperty ***propArray, PRUint32 *length)=0
 Retrieves all properties if this value represents an object.
virtual nsresult GetProperty (const nsACString &name, jsdIProperty **_retval)=0
 Retrieves a single property from the value.
virtual nsresult Refresh (void)=0
 jsdIValues are wrappers around JavaScript engine structures.
virtual nsresult GetWrappedValue (void)=0
 When called from JavaScript, this method returns the JavaScript value wrapped by this jsdIValue.
virtual nsresult GetScript (jsdIScript **aScript)=0
 If this is a function value, return its associated jsdIScript.
void getProperties ([array, size_is(length)] out jsdIProperty propArray, out unsigned long length)
 Retrieves all properties if this value represents an object.
jsdIProperty getProperty (in AUTF8String name)
 Retrieves a single property from the value.
void refresh ()
 jsdIValues are wrappers around JavaScript engine structures.
void getWrappedValue ()
 When called from JavaScript, this method returns the JavaScript value wrapped by this jsdIValue.

Public Attributes

readonly attribute JSDContext JSDContext
 Internal use only.
readonly attribute JSDValue JSDValue
 Internal use only.
readonly attribute boolean isNative
 |false| unless the value is a function declared in script.
readonly attribute boolean isNumber
 |true| if the value represents a number, either double or integer.
readonly attribute boolean isPrimitive
 |true| if the value represents a JavaScript primitive number or AUTF8String
const unsigned long TYPE_BOOLEAN = 0
 Value is either |true| or |false|.
const unsigned long TYPE_DOUBLE = 1
 Value is a primitive number that is too large to fit in an integer.
const unsigned long TYPE_INT = 2
 Value is a primitive number that fits into an integer.
const unsigned long TYPE_FUNCTION = 3
 Value is a function.
const unsigned long TYPE_NULL = 4
 Value is |null|.
const unsigned long TYPE_OBJECT = 5
 Value is an object.
const unsigned long TYPE_STRING = 6
 Value is a primitive AUTF8String.
const unsigned long TYPE_VOID = 7
 Value is void.
readonly attribute unsigned long jsType
 One of the TYPE_* values above.
readonly attribute jsdIValue jsPrototype
 Prototype value if this value represents an object, null if the value is not an object or the object has no prototype.
readonly attribute jsdIValue jsParent
 Parent value if this value represents an object, null if the value is not an object or the object has no parent.
readonly attribute AUTF8String jsClassName
 Class name if this value represents an object.
readonly attribute jsdIValue jsConstructor
 Constructor name if this value represents an object.
readonly attribute AUTF8String jsFunctionName
 Function name if this value represents a function.
readonly attribute boolean booleanValue
 Value if interpreted as a boolean.
readonly attribute double doubleValue
 Value if interpreted as a double.
readonly attribute long intValue
 Value if interpreted as an integer.
readonly attribute jsdIObject objectValue
 Value if interpreted as an object.
readonly attribute AUTF8String stringValue
 Value if interpreted as a AUTF8String.
readonly attribute long propertyCount
 Number of properties.
readonly attribute jsdIScript script
 If this is a function value, return its associated jsdIScript.

Detailed Description

Value objects.

Represents typeless JavaScript values (jsval in SpiderMonkey terminology.) These are valid until the debugger is turned off. Holding a jsdIValue adds a root for the underlying JavaScript value, so don't keep it if you don't need to.


Member Enumeration Documentation

anonymous enum

Value is either |true| or |false|.

Enumerator:
TYPE_BOOLEAN 
anonymous enum

Value is a primitive number that is too large to fit in an integer.

Enumerator:
TYPE_DOUBLE 
anonymous enum

Value is a primitive number that fits into an integer.

Enumerator:
TYPE_INT 
anonymous enum

Value is a function.

Enumerator:
TYPE_FUNCTION 
anonymous enum

Value is |null|.

Enumerator:
TYPE_NULL 
anonymous enum

Value is an object.

Enumerator:
TYPE_OBJECT 
anonymous enum

Value is a primitive AUTF8String.

Enumerator:
TYPE_STRING 
anonymous enum

Value is void.

Enumerator:
TYPE_VOID 

Member Function Documentation

virtual nsresult jsdIValue::GetBooleanValue ( PRBool aBooleanValue  )  [pure virtual]

Value if interpreted as a boolean.

Converts if necessary.

virtual nsresult jsdIValue::GetDoubleValue ( double *  aDoubleValue  )  [pure virtual]

Value if interpreted as a double.

Converts if necessary.

virtual nsresult jsdIValue::GetIntValue ( PRInt32 *  aIntValue  )  [pure virtual]

Value if interpreted as an integer.

Converts if necessary.

virtual nsresult jsdIValue::GetIsNative ( PRBool aIsNative  )  [pure virtual]

|false| unless the value is a function declared in script.

virtual nsresult jsdIValue::GetIsNumber ( PRBool aIsNumber  )  [pure virtual]

|true| if the value represents a number, either double or integer.

|false| for all other values, including numbers assigned as strings (eg. x = "1";)

virtual nsresult jsdIValue::GetIsPrimitive ( PRBool aIsPrimitive  )  [pure virtual]

|true| if the value represents a JavaScript primitive number or AUTF8String

virtual nsresult jsdIValue::GetJsClassName ( nsACString aJsClassName  )  [pure virtual]

Class name if this value represents an object.

Empty AUTF8String if the value is not an object.

virtual nsresult jsdIValue::GetJsConstructor ( jsdIValue **  aJsConstructor  )  [pure virtual]

Constructor name if this value represents an object.

Empty AUTF8String if the value is not an object.

virtual nsresult jsdIValue::GetJSDContext ( JSDContext **  aJSDContext  )  [pure virtual]

Value objects.

Represents typeless JavaScript values (jsval in SpiderMonkey terminology.) These are valid until the debugger is turned off. Holding a jsdIValue adds a root for the underlying JavaScript value, so don't keep it if you don't need to. Internal use only.

virtual nsresult jsdIValue::GetJSDValue ( JSDValue **  aJSDValue  )  [pure virtual]

Internal use only.

virtual nsresult jsdIValue::GetJsFunctionName ( nsACString aJsFunctionName  )  [pure virtual]

Function name if this value represents a function.

Empty AUTF8String if the value is not a function.

virtual nsresult jsdIValue::GetJsParent ( jsdIValue **  aJsParent  )  [pure virtual]

Parent value if this value represents an object, null if the value is not an object or the object has no parent.

virtual nsresult jsdIValue::GetJsPrototype ( jsdIValue **  aJsPrototype  )  [pure virtual]

Prototype value if this value represents an object, null if the value is not an object or the object has no prototype.

virtual nsresult jsdIValue::GetJsType ( PRUint32 *  aJsType  )  [pure virtual]

One of the TYPE_* values above.

virtual nsresult jsdIValue::GetObjectValue ( jsdIObject **  aObjectValue  )  [pure virtual]

Value if interpreted as an object.

virtual nsresult jsdIValue::GetProperties ( jsdIProperty ***  propArray,
PRUint32 *  length 
) [pure virtual]

Retrieves all properties if this value represents an object.

If this value is not an object a 0 element array is returned.

Parameters:
propArray Array of jsdIProperty values for this value.
length Size of array.
void jsdIValue::getProperties ( [array, size_is(length)] out jsdIProperty  propArray,
out unsigned long  length 
)

Retrieves all properties if this value represents an object.

If this value is not an object a 0 element array is returned.

Parameters:
propArray Array of jsdIProperty values for this value.
length Size of array.
virtual nsresult jsdIValue::GetProperty ( const nsACString name,
jsdIProperty **  _retval 
) [pure virtual]

Retrieves a single property from the value.

Only valid if the value represents an object.

Parameters:
name Name of the property to retrieve.
Return values:
jsdIProperty for the requested property name or null if no property exists for the requested name.
jsdIProperty jsdIValue::getProperty ( in AUTF8String  name  ) 

Retrieves a single property from the value.

Only valid if the value represents an object.

Parameters:
name Name of the property to retrieve.
Return values:
jsdIProperty for the requested property name or null if no property exists for the requested name.
virtual nsresult jsdIValue::GetPropertyCount ( PRInt32 *  aPropertyCount  )  [pure virtual]

Number of properties.

0 if the value is not an object, or the value is an object but has no properties.

virtual nsresult jsdIValue::GetScript ( jsdIScript **  aScript  )  [pure virtual]

If this is a function value, return its associated jsdIScript.

Otherwise, return null.

virtual nsresult jsdIValue::GetStringValue ( nsACString aStringValue  )  [pure virtual]

Value if interpreted as a AUTF8String.

Converts if necessary.

virtual nsresult jsdIValue::GetWrappedValue ( void   )  [pure virtual]

When called from JavaScript, this method returns the JavaScript value wrapped by this jsdIValue.

The calling script is free to use the result as it would any other JavaScript value. When called from another language this method returns an xpconnect defined error code.

void jsdIValue::getWrappedValue (  ) 

When called from JavaScript, this method returns the JavaScript value wrapped by this jsdIValue.

The calling script is free to use the result as it would any other JavaScript value. When called from another language this method returns an xpconnect defined error code.

virtual nsresult jsdIValue::Refresh ( void   )  [pure virtual]

jsdIValues are wrappers around JavaScript engine structures.

Much of the data is copied instead of shared. The refresh method is used to resync the jsdIValue with the underlying structure.

void jsdIValue::refresh (  ) 

jsdIValues are wrappers around JavaScript engine structures.

Much of the data is copied instead of shared. The refresh method is used to resync the jsdIValue with the underlying structure.


Member Data Documentation

readonly attribute boolean jsdIValue::booleanValue

Value if interpreted as a boolean.

Converts if necessary.

readonly attribute double jsdIValue::doubleValue

Value if interpreted as a double.

Converts if necessary.

readonly attribute long jsdIValue::intValue

Value if interpreted as an integer.

Converts if necessary.

readonly attribute boolean jsdIValue::isNative

|false| unless the value is a function declared in script.

readonly attribute boolean jsdIValue::isNumber

|true| if the value represents a number, either double or integer.

|false| for all other values, including numbers assigned as strings (eg. x = "1";)

readonly attribute boolean jsdIValue::isPrimitive

|true| if the value represents a JavaScript primitive number or AUTF8String

readonly attribute AUTF8String jsdIValue::jsClassName

Class name if this value represents an object.

Empty AUTF8String if the value is not an object.

readonly attribute jsdIValue jsdIValue::jsConstructor

Constructor name if this value represents an object.

Empty AUTF8String if the value is not an object.

readonly attribute JSDContext jsdIValue::JSDContext

Internal use only.

readonly attribute JSDValue jsdIValue::JSDValue

Internal use only.

readonly attribute AUTF8String jsdIValue::jsFunctionName

Function name if this value represents a function.

Empty AUTF8String if the value is not a function.

readonly attribute jsdIValue jsdIValue::jsParent

Parent value if this value represents an object, null if the value is not an object or the object has no parent.

readonly attribute jsdIValue jsdIValue::jsPrototype

Prototype value if this value represents an object, null if the value is not an object or the object has no prototype.

readonly attribute unsigned long jsdIValue::jsType

One of the TYPE_* values above.

readonly attribute jsdIObject jsdIValue::objectValue

Value if interpreted as an object.

readonly attribute long jsdIValue::propertyCount

Number of properties.

0 if the value is not an object, or the value is an object but has no properties.

readonly attribute jsdIScript jsdIValue::script

If this is a function value, return its associated jsdIScript.

Otherwise, return null.

readonly attribute AUTF8String jsdIValue::stringValue

Value if interpreted as a AUTF8String.

Converts if necessary.

const unsigned long jsdIValue::TYPE_BOOLEAN = 0

Value is either |true| or |false|.

const unsigned long jsdIValue::TYPE_DOUBLE = 1

Value is a primitive number that is too large to fit in an integer.

const unsigned long jsdIValue::TYPE_FUNCTION = 3

Value is a function.

const unsigned long jsdIValue::TYPE_INT = 2

Value is a primitive number that fits into an integer.

const unsigned long jsdIValue::TYPE_NULL = 4

Value is |null|.

const unsigned long jsdIValue::TYPE_OBJECT = 5

Value is an object.

const unsigned long jsdIValue::TYPE_STRING = 6

Value is a primitive AUTF8String.

const unsigned long jsdIValue::TYPE_VOID = 7

Value is void.


The documentation for this interface was generated from the following files: