| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| jstl.tar.gz | 2015-06-30 | 130.7 kB | |
| README | 2015-06-28 | 1.3 kB | |
| Totals: 2 Items | 132.1 kB | 0 |
JSTL Programmer's Guide
=Overview=
The JSTL library is a Javascript implementation of the popular STL
library in C++. As with the C++ implementation the JSTL library aims
to provide a comprehensive set of classes to simplify the development
of complex applications.
The JSTL library has a similar semantics and API as the STL. It aims to
ease the transition for a developer from C++ to Javascript, while
providing stable industry-standard libraries.
=Sample=
To give you a flavor of what JSTL looks like, Here is a sample code in
JSTL and its C++ equivalent.
*JSTL Code*:
var listInt = new std.list;
var it;
var output="";
// Insert one at a time
listInt.insert( listInt.begin(), 2 );
listInt.insert( listInt.begin(), 1 );
listInt.insert( listInt.end(), 3 );
// 1 2 3
for( it = listInt.begin(); !it.at_end(); it.next() )
{
output += it.value();
output += " ";
}
assertEquals( "list-iterator test(int)", output, "1 2 3 " );;
*C++ Code*:
std::list listInt;
std::list::const_iterator It;
listInt.insert( listInt.begin(), 2 );
listInt.insert( listInt.begin(), 1 );
listInt.insert( listInt.end(), 3 );
// Validate argument type
for( It = listInt.begin(); It != listInt.end(); It++ )
cout << *It << ' ';
cout << endl;