When you build Tools.h++ Professional using the Rogue Wave Software Parts Manager, it creates separate directories for the C++ and the Java examples. The path to the Java examples directory is:
<rw_root>\com\roguewave\examples
This directory includes all the examples for the jtools library. The examples directory itself is organized as follows:
examples \format \tools\v2_0 \vsj
In other words, the examples in the Java examples directory are organized according to the functional categories of the jtools library: the formatting classes, the Java implementation of the Tools.h++ classes, and the virtual streams for Java classes. In addition, the tools directory is subdivided by version number.
Please see Section 1.5.2 for an explanation of the <rw_root> pathname variable; see the Build Guide for instructions on building the examples.
Table 16 through Table 18 list the names of the Java jtools examples by functional category. Each example usually consists of several files. If an example is discussed in the User's Guide, a reference is given in the table.
Example name | Description |
NumericFormatExample |
Prints out a series of credits and debits in a bankbook style table. |
NumericFormatExample2 |
Shows many ways to format numbers using the NumericFormat class. |
NumericPictureExample |
Shows the use of NumericPicture objects in conjunction with the QuickFormat class. The numeric pictures are built automatically using the QuickFormat.npic(String) method. |
NumericPictureExample2 |
Shows the explicit use of NumericPicture objects with a TextPicture. |
QuickFormatExample |
Prints out a series of credits and debits in a bankbook style HTML table. |
QuickFormatExample2 |
Prints out a series of credits and debits in a bankbook style table. See Section 8.6, "QuickFormat." |
TextAlignmentExample |
Shows how class TextAlignment formats text for various argument permutations. See Section 8.3, "NumericPicture." |
TextAlignmentExample2 |
Combines the use of TextPicture and TextAlignment. See Section 8.3, "NumericPicture." |
TextPictureExample |
Demonstrates the general use of the TextPicture class. |
TextPictureExample2 |
Uses the TextPicture class to print out a bankbook table. See Section 8.3, "NumericPicture." |
Example name | Description |
BagExample |
Uses a Bag to count the number of occurrences of several words from within this source file. |
BinaryTreeExample |
Sorts all the words in <file> using a BinaryTree and allows the user to search or modify the list. |
BTreeDictionaryExample |
Allows users to build a database of names and phone numbers that are stored in a BTreeDictionary. Users can search the database, insert numbers, modify entries, and save the database to <file>. |
BTreeExample |
Finds all the prime numbers in the range specified by the user and inserts them into a BTree using the sieve of Eratosthenes. The user can then test numbers within the range for primality by lookup. See Section 6.4.1, "BTree." |
DlistExample |
Uses a Dlist to determine whether a word or sentence is a palindrome or not. See Section 6.5.1, "Dlist." |
QueueExample |
Implements a simple Tree class, then uses Queue to iterate over the tree's elements in a breadth-first manner. |
RegExpExample |
Uses class RegExp; takes a simple regular expression and prints all the lines from <file> that contain a match with <regexp>. See Section 7.6, "A Regular Expression Example." |
SetExample |
Reads in the specified file, then inserts each word of the file into a Set. Since a Set does not allow duplicates, each word is guaranteed to be unique, so the number of entries in the Set corresponds to the number of unique words in the file. Section 6.4.4, "Set." |
Example name | Description |
Bus |
Writes a Bus object from a Java program and reads it into a C++ program. Section 5.3.9, "Class CollectableStreamer and the DefineCollectable Interface," begins a lengthy discussion. |
Employee |
Saves a templatized doubly-linked list of Employee objects, an RWTPtrDlist<Employee>, with a Java program that reads in the list as a com.roguewave.tools.v2-0.Dlist. Section 5.3.8.1, "From the C++ Program (empls_out.cpp)," begins a lengthy discussion. |
DefinePersistableEmployee |
Part of the Employee example. Persists an Employee object across a stream. |
Employee |
Part of the Employee example. Defines class Employee. |
empls_in |
Part of the Employee example. Reads a list of employees written from the C++ program empls_out. |
empls_out |
Part of the Employee example. Adds isomorphic persistence to the Employee class using the macro RWDEFINE_PERSISTABLE and implementing rwSaveGuts() and rwRestoreGuts(). |
simple_in |
Reads in the Tools.h++ RWDate and RWCString, written from simple_out, as a java.lang.String and java.util.GregorianCalendar respectively, and prints the result. |
simple_out |
Writes out a Tools.h++ RWDate and RWCString to a portable ASCII format stream. |
tvdlist_in |
Reads in the Tools.h++ RWTValDlist<int>, written from tvdlist_out, as a jtools Dlist and prints the result. |
tvdlist_out |
Writes out a tvdlist to a portable ASCII format stream. |
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.