Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

2.2 The Java/C++ Interoperability Module

The Java/C++ interoperability module contains jtools, a Java library of five packages:

Section 2.2.1 describes all of the Java classes and interfaces.

2.2.1 Classes and Interfaces in the Java Packages

Table 1 through Table 8 list and briefly describe the classes and interfaces in the Tools.h++ Professional Java packages.

Table 1 -- Classes in the com.roguewave.tools.v2-0 package 

BTree
Represents a group of ordered elements; duplicates are not allowed. The elements are ordered according to a Comparator.
BTreeDictionary
Extends the abstract base class Dictionary from java.util to provide an always balanced tree of keys and associated values.
Bag ,.
Represents a group of unordered elements. Although duplicate entries are allowed, the implementation holds only a single reference for each group of objects that compare equal to each other.
BinaryTree
Implements a binary search tree. The collection maintains elements in sorted order according to a Comparator object given at construction.
CollectionBase
An abstract base class that implements the Collection interface. It is extended by most collection classes in the com.roguewave.tools.v2-0 package.
Dlist
Implements a doubly-linked list of elements ordered externally by the client of the class.
HashDictionary
Extends Hashtable to provide a dictionary of keys and associated values.
IdentityDictionary
Extends HashDictionary to provide a dictionary of keys and associated values where the key is found based on identity, not equality.
IdentitySet
Extends Set such that the key is found based on identity, not equality.
NumericCompare
Implements the Comparator interface for classes inheriting from java.lang.Number (e.g. Integer, Long, Float, and Double).
Queue
A first-in-first-out (FIFO) queue of objects.
RegExp
Represents a regular expression.
Set
Implements an unordered collection of elements using an underlying HashTable where duplicate entries are not allowed.
Slist
Implements a singly-linked list of elements ordered externally by the client of the class.
StringCompare
Implements the Comparator interface and is particularly suited for the String, StringBuffer, and Character classes from package java.lang.

Table 2 -- Interfaces in the com.roguewave.tools.v2-0 package 

BidirectionalEnumeration
Extends Enumeration to allow you to move both forward and backward within a collection.
BinaryFunction
Provides for a binary function. Implementing this interface allows an object to act as a functor to use in methods such as Collection.reduce().
Collection
Contains methods for the insertion, retrieval, and removal of elements.
Comparator
Implementing this interface allows an object to act as a comparator for the purpose of ordering elements in sorted collections such as BTree and BinaryTree.
Sequence
Extends Collection to allow external control of the location of its elements.
UnaryFunction
Provides for a unary function. Implementing this interface allows an object to act as a functor to use in methods such as Collection.apply().

Table 3 -- Classes in the com.roguewave.vsj package 

CollectableStreamer
An ObjectStreamer for mapping Java classes to C++ subclasses of class RWCollectable from Tools.h++.
PersistableStreamer
An ObjectStreamer for streaming objects that support Tools.h++ isomorphic persistence.
PortableInputStream
Corresponds to the Tools.h++ class RWpistream. The class contains methods to input basic data and restore objects.
PortableOutputStream
Corresponds to the Tools.h++ class RWpostream. The class contains methods to output basic data and save objects to an underlying output stream
ReadTable
An implementation of the RestoreContext interface written to correspond to the read tables used in Tools.h++.
StoreTable
An implementation of the SaveContext interface meant to correspond to the store tables used in Tools.h++ for doing both isomorphic and polymorphic persistence.

Table 4 -- Interfaces in the com.roguewave.vsj package 

DefineCollectable
Used with the CollectableStreamer class to map Java classes to C++ subclasses of class RWCollectable from Tools.h++.
DefinePersistable
Used to map Java classes to C++ classes that gain their persistence capabilities through the use of the RWDEFINE_PERSISTABLE macro from Tools.h++.
ObjectStreamer
Describes helper classes used for saving and restoring objects via VirtualOutputStreams and VirtualInputStreams respectively.
RestoreContext
An interface that allows you to keep track of objects so that you can resolve back-references to objects that were already read.
SaveContext
An interface that allows you to keep track of objects as they are written so that you can write back-references for objects that are encountered multiple times.
VirtualInputStream
Corresponds to the Tools.h++ abstract base class RWvistream. The interface contains methods to input basic data and restore objects.
VirtualOutputStream
Corresponds to the Tools.h++ abstract base class RWvostream. The interface contains methods to output basic data and save objects to be input or restored.

Table 5 -- Classes in the com.roguewave.vsj.streamer package 

BasicMappings
A repository of streamers mapping C++ basic types such as int, char, double, etc. to java.lang wrapper classes such as Integer, Character, and Double.
CollectableCompare
Implements the Comparator interface to match, as best we can in Java, the identity comparison semantics of the RWCollectable::compareTo() in Tools.h++.
CollectableMappings
Provides the mappings between Tools.h++ collectable classes and the equivalent classes in Tools.h++ Professional Java packages.
DefineCollectableCollection
Maps a C++ RWCollection-derived class to a Java class that implements com.roguewave.tools.Collection.
DefinePersistableTemplColl
An implementation of the DefinePersistable interface offering a generic mapping between collections that implements the com.roguewave.tools.v2-0.Collection interface. Doesn't require a Comparator to any one of several Tools.h++ template collections.
SimpleMappings
Maps simple Tools.h++ classes, such as RWCString and RWDate, to Java classes.
TemplateMappings
Provides streamer mappings of Tools.h++ templatized collection classes to Java classes.

Table 6 -- Classes in the com.roguewave.common package 

ConstantStringsHelper
NOTE: This class is reserved for future use.

Table 7 -- Interfaces in the com.roguewave.common package 

ConstantStrings
NOTE: This interface is reserved for future use.
Formattable
Any class that is to be formatted with the package com.roguewave.format must implement this interface.

Table 8 -- Classes in the com.roguewave.format package 

NumericFormat
Provides a flexible mechanism to control the format of numeric values.
NumericPicture
Separates the formatting of a numeric value, how many characters before and after the decimal place, from its text layout, the specification of sign placement and padding.
QuickFormat
Provides a convenient interface for the combined functionality of the TextPicture, TextAlignment, NumericPicture, and NumericFormat classes.
TextAlignment
Allows text to be laid out left, center, or right justified.
TextPicture
Allows numbers to be inserted into a pictorial template.



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.