JsUnit 1.3
Project Developer Home doxygen

CallStack Class Reference

Collaboration diagram for CallStack:

Collaboration graph
[legend]
List of all members.

Detailed Description

CallStack object.

The object is extremely system dependent, since its functionality is not within the range of ECMA 262, 3rd edition. It is supported by JScript and SpiderMonkey and was supported in Netscape Enterprise Server 2.x, but not in the newer version 4.x.


Public Member Functions

void CallStack (Number depth)
 Constructor.
void fill (Number depth)
 Fills the object with the current call stack info.
Array< StringgetStack ()
 Retrieve call stack as array.
String toString ()
 Retrieve call stack as string.
void _fill (void depth)

Public Attributes

Array< StringmStack
 The array with the stack.


Constructor & Destructor Documentation

void CallStack::CallStack ( Number  depth  ) 

Constructor.

The object collects the current call stack up to the JavaScript engine. Most engines will not support call stack information with a recursion. Therefore the collection is stopped when the stack has two identical functions in direct sequence.

Parameters:
depth Maximum recorded stack depth (defaults to 10).


Member Function Documentation

void CallStack::fill ( Number  depth  ) 

Fills the object with the current call stack info.

The function collects the current call stack up to the JavaScript engine. Any previous data of the instance is lost. Most engines will not support call stack information with a recursion. Therefore the collection is stopped when the stack has two identical functions in direct sequence.

Parameters:
depth Maximum recorded stack depth (defaults to 10).

Array<String> CallStack::getStack (  ) 

Retrieve call stack as array.

The function returns the call stack as Array of Strings.

Returns:
The call stack as array of strings.

String CallStack::toString (  ) 

Retrieve call stack as string.

The function returns the call stack as string. Each stack frame has an own line and is prepended with the call stack depth.

Returns:
The call stack as string.

void CallStack::_fill ( void  depth  ) 


Member Data Documentation

Array<String> CallStack::mStack

The array with the stack.


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:10:48 2007 for JsUnit by doxygen 1.5.2