JsUnit
Project Developer Home doxygen

Public Member Functions | Public Attributes | List of all members
CallStack Class Reference

CallStack object. More...

Collaboration diagram for CallStack:
Collaboration graph

Public Member Functions

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

Public Attributes

Array< StringmStack
 The array with the stack. More...
 

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.

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
depthMaximum recorded stack depth (defaults to 10).

Member Function Documentation

void CallStack::_fill ( void  depth)
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
depthMaximum 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.

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 Wed Apr 15 2015 02:33:06 for JsUnit by doxygen 1.8.5