C# Class Rhino.BaseFunction

Inheritance: IdScriptableObject, System.Function
Mostra file Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
BaseFunction ( ) : System
BaseFunction ( Scriptable scope, Scriptable prototype ) : System
Call ( Context cx, Scriptable scope, Scriptable thisObj, object args ) : object

Should be overridden.

Should be overridden.

Construct ( Context cx, Scriptable scope, object args ) : Scriptable
CreateObject ( Context cx, Scriptable scope ) : Scriptable

Creates new script object.

Creates new script object. The default implementation of Construct(Context, Scriptable, object[]) uses the method to to get the value for thisObj argument when invoking Call(Context, Scriptable, Scriptable, object[]) . The methos is allowed to return null to indicate that Call(Context, Scriptable, Scriptable, object[]) will create a new object itself. In this case Construct(Context, Scriptable, object[]) will set scope and prototype on the result Call(Context, Scriptable, Scriptable, object[]) unless they are already set.

ExecIdCall ( IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, object args ) : object
GetArity ( ) : int
GetClassName ( ) : string
GetFunctionName ( ) : string
GetLength ( ) : int
GetTypeOf ( ) : string

Gets the value returned by calling the typeof operator on this object.

Gets the value returned by calling the typeof operator on this object.

HasInstance ( Scriptable instance ) : bool

Implements the instanceof operator for JavaScript Function objects.

Implements the instanceof operator for JavaScript Function objects.

foo = new Foo();
foo instanceof Foo; // true

SetImmunePrototypeProperty ( object value ) : void

Make value as DontEnum, DontDelete, ReadOnly prototype property of this Function object

Protected Methods

Method Description
FillConstructorProperties ( IdFunctionObject ctor ) : void
FindInstanceIdInfo ( string s ) : int
FindPrototypeId ( string s ) : int
GetClassPrototype ( ) : Scriptable
GetInstanceIdName ( int id ) : string
GetInstanceIdValue ( int id ) : object
GetMaxInstanceId ( ) : int
GetPrototypeProperty ( ) : object
HasPrototypeProperty ( ) : bool
InitPrototypeId ( int id ) : void
SetInstanceIdValue ( int id, object value ) : void

Private Methods

Method Description
Decompile ( int indent, int flags ) : string

Decompile the source information associated with this js function/script back into a string.

Decompile the source information associated with this js function/script back into a string.

GetArguments ( ) : object
Init ( Scriptable scope, bool @sealed ) : void
IsApply ( IdFunctionObject f ) : bool
IsApplyOrCall ( IdFunctionObject f ) : bool
JsConstructor ( Context cx, Scriptable scope, object args ) : object
RealFunction ( Scriptable thisObj, IdFunctionObject f ) : BaseFunction
SetupDefaultPrototype ( ) : object

Method Details

BaseFunction() public method

public BaseFunction ( ) : System
return System

BaseFunction() public method

public BaseFunction ( Scriptable scope, Scriptable prototype ) : System
scope Scriptable
prototype Scriptable
return System

Call() public method

Should be overridden.
Should be overridden.
public Call ( Context cx, Scriptable scope, Scriptable thisObj, object args ) : object
cx Context
scope Scriptable
thisObj Scriptable
args object
return object

Construct() public method

public Construct ( Context cx, Scriptable scope, object args ) : Scriptable
cx Context
scope Scriptable
args object
return Scriptable

CreateObject() public method

Creates new script object.
Creates new script object. The default implementation of Construct(Context, Scriptable, object[]) uses the method to to get the value for thisObj argument when invoking Call(Context, Scriptable, Scriptable, object[]) . The methos is allowed to return null to indicate that Call(Context, Scriptable, Scriptable, object[]) will create a new object itself. In this case Construct(Context, Scriptable, object[]) will set scope and prototype on the result Call(Context, Scriptable, Scriptable, object[]) unless they are already set.
public CreateObject ( Context cx, Scriptable scope ) : Scriptable
cx Context
scope Scriptable
return Scriptable

ExecIdCall() public method

public ExecIdCall ( IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, object args ) : object
f IdFunctionObject
cx Context
scope Scriptable
thisObj Scriptable
args object
return object

FillConstructorProperties() protected method

protected FillConstructorProperties ( IdFunctionObject ctor ) : void
ctor IdFunctionObject
return void

FindInstanceIdInfo() protected method

protected FindInstanceIdInfo ( string s ) : int
s string
return int

FindPrototypeId() protected method

protected FindPrototypeId ( string s ) : int
s string
return int

GetArity() public method

public GetArity ( ) : int
return int

GetClassName() public method

public GetClassName ( ) : string
return string

GetClassPrototype() protected method

protected GetClassPrototype ( ) : Scriptable
return Scriptable

GetFunctionName() public method

public GetFunctionName ( ) : string
return string

GetInstanceIdName() protected method

protected GetInstanceIdName ( int id ) : string
id int
return string

GetInstanceIdValue() protected method

protected GetInstanceIdValue ( int id ) : object
id int
return object

GetLength() public method

public GetLength ( ) : int
return int

GetMaxInstanceId() protected method

protected GetMaxInstanceId ( ) : int
return int

GetPrototypeProperty() protected method

protected GetPrototypeProperty ( ) : object
return object

GetTypeOf() public method

Gets the value returned by calling the typeof operator on this object.
Gets the value returned by calling the typeof operator on this object.
public GetTypeOf ( ) : string
return string

HasInstance() public method

Implements the instanceof operator for JavaScript Function objects.
Implements the instanceof operator for JavaScript Function objects.

foo = new Foo();
foo instanceof Foo; // true

public HasInstance ( Scriptable instance ) : bool
instance Scriptable /// The value that appeared on the LHS of the instanceof /// operator ///
return bool

HasPrototypeProperty() protected method

protected HasPrototypeProperty ( ) : bool
return bool

InitPrototypeId() protected method

protected InitPrototypeId ( int id ) : void
id int
return void

SetImmunePrototypeProperty() public method

Make value as DontEnum, DontDelete, ReadOnly prototype property of this Function object
public SetImmunePrototypeProperty ( object value ) : void
value object
return void

SetInstanceIdValue() protected method

protected SetInstanceIdValue ( int id, object value ) : void
id int
value object
return void