# class Global | Unique global object containing initial native properties. More...
Full name | `KJS::Global`
Definition | `#include <object.h>`
Inherits | KJS::Object [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- Global ()
- virtual ~Global ()
- KJSO objectPrototype () const
- KJSO functionPrototype () const
- void setFilter (const KJSO &f)
- KJSO filter () const

#### Public Static Methods

- static Global current ()

## 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: root@i386.ports.openbsd.org on Wed Apr 25 13:58:56 2001, using kdoc 2.0a53.