Unicorn XML Toolkit
Version 1.00.00

Namespace EcmaScript
Class CBuiltinFunction

class CBuiltinFunction: public CNativeObject {
public:
    CBuiltinFunction(
        CGlobalObject *pGlobalObject,
        CNativeObject *pObject, 
        int nIndex,
        int nLength);
    ~CBuiltinFunction();
public:
    CString Class();
    XValue Call(
        CContext &context, 
        const XObject &pThis, 
        const CList &argList);
    CString TypeOf();
    };

The abstract interface to built-in functions.

Classes implementing built-in functions are usually derived from this class.

Each built-in function is associated with an integer selector. Selectors are unique within the property list of each object. Selectors are used by the interpreter to select appropriate implementation procedure for each built-in function.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
CValue, CObject, CList, CGlobalObject, CNativeObject
Constructor/Destructor Summary
CBuiltinFunction (CGlobalObject *pGlobalObject, CNativeObject *pObject, int nIndex, int nLength);
����������Constructs the built-in function.
~CBuiltinFunction ();
����������Destroys the built-in function.

Function Summary
CString Class ();
����������Returns the class of this object.
XValue Call (CContext &context, const XObject &pThis, const CList &argList);
����������Calls this object as a function.
CString TypeOf ();
����������Returns a string representing type of this object.

Constructor/Destructor Detail

CBuiltinFunction

CBuiltinFunction(
    CGlobalObject *pGlobalObject,
    CNativeObject *pObject, 
    int nIndex,
    int nLength);

Constructs the built-in function.

Parameters:
pGlobalObject - the global object
pObject - the object which has this built-in function as a property
nIndex - the selector
nLength - the value of the property "length" of this function (that is, the maximum number of arguments, or 1 if any number of arguments is allowed)

~CBuiltinFunction

~CBuiltinFunction();

Destroys the built-in function.

Function Detail

Class

CString Class();

Returns the class of this object.

This function corresponds to the internal [[Class]] property.

Returns:
the class of this object

Call

XValue Call(
    CContext &context, 
    const XObject &pThis, 
    const CList &argList);

Calls this object as a function.

This function corresponds to the internal [[Call]] property.

Parameters:
context - the evaluation context
pThis - the object to be used as value of this during the function call
argList - the list of argument values
Returns:
the value obtained as the result of the function call

TypeOf

CString TypeOf();

Returns a string representing type of this object.

Returns:
the string representing type of this object

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.