JsUnit 1.3
Project Developer Home doxygen

Function Class Reference

List of all members.

Detailed Description

Standard ECMA class.


Public Member Functions

void Function ()
void glue (void scope)
 Glue functions to a JavaScript class as member functions.
void fulfills ()
 Ensures that a function fulfills an interface.


Constructor & Destructor Documentation

void Function::Function (  ) 


Member Function Documentation

void Function::glue ( void  scope  ) 

Glue functions to a JavaScript class as member functions.

The method attaches the functions given as arguments to the prototype of the current instance.

Exceptions:
InterfaceDefinitionError If the current instance of a given argument is not a Function object with a prototype.

void Function::fulfills (  ) 

Ensures that a function fulfills an interface.

Since with ECMA 262 (3rd edition) interfaces are not supported yet, this function will simulate the functionality. The arguments for the functions are all classes that the current class will implement. The function checks whether the current class fulfills the interface of the given classes or not.

Exceptions:
TypeError If the current object is not a class or the interface is not a Function object with a prototype.
InterfaceDefinitionError If an interface is not fulfilled or the interface has invalid members.


The documentation for this class was generated from the following file:
JsUnit © 1999, 2000, 2001, 2002, 2003, 2006, 2007 by Jörg Schaible
Generated on Fri Oct 19 23:11:00 2007 for JsUnit by doxygen 1.5.2