class Global

Unique global object containing initial native properties. More...

Full nameKJS::Global
Definition#include <object.h>
InheritsKJS::Object [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


Detailed Description

The Global object represents the global namespace. It holds the native objects like String and functions like eval().

It also serves as a container for variables created by the user, i.e. the statement


   var i = 2;

will basically perform a Global::current().put("i", Number(2)); operation.

 Global ()

Global

Constructs a Global object. This is done by the interpreter once and there should be no need to create an instance on your own. Usually, you'll just want to access the current instance. For example like this:


 Global global(Global::current());
 KJSO proto = global.objectPrototype();

 ~Global ()

~Global

[virtual]

Destruct the Global object.

Global  current ()

current

[static]

Returns: A reference to the Global object belonging to the current interpreter instance.

KJSO  objectPrototype ()

objectPrototype

[const]

Returns: A handle to Object.prototype.

KJSO  functionPrototype ()

functionPrototype

[const]

Returns: A handle to Function.prototype.

void  setFilter (const KJSO &f)

setFilter

Set a filter object that will intercept all put() and get() calls to the global object. If this object returns Undefined on get() the request will be passed on the global object.

KJSO  filter ()

filter

[const]

Return a handle to the filter object (see setFilter()). Null if no filter has been installed.


Generated by: dfaure on Tue Feb 27 12:47:36 2001, using kdoc 2.0a50.