Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

3.3 The Java/C++ Interoperability Module

The Java/C++ interoperability module provides a Java implementation of the Tools.h++ virtual streams in a set of com.roguewave packages.

Section 3.3.1 illustrates the hierarchical relationships among the classes in the Java packages that implement the Tools.h++ virtual streams.

3.3.1 Hierarchies in the Java Packages

Tools.h++ Professional includes five Java packages. Section 3.3.1.1 through Section 3.3.1.5 provide class hierarchies for each of these packages, including all the interfaces and exceptions.

In addition, Section 3.3.2 contains class diagrams showing the is-a, has-a, and uses-a relationships among the classes in the two most complex packages, com.roguewave.tools.v2-0 and com.roguewave.vsj.

The class hierarchy for each package is separated into interface, class, and exception trees, in the same manner as the javadocs. Inheritance is indicated using indentation. For example:

In this hierarchy, Class2 and Class3 extend Class1.

3.3.1.1 Package com.roguewave.tools.v2-0

Package com.roguewave.tools.v2-0 contains collection classes to store and retrieve objects, and utility classes including a regular expression class, RegExp.

Figure 4 -- Interfaces

BinaryFunction 
   Collection 
   Sequence
   Comparator 
   java.util.Enumeration
      BidirectionalEnumeration
   UnaryFunction

Figure 5 -- Classes

   CollectionBase (implements Collection, Serializable)
      BTree (implements Cloneable)
      Bag (implements Cloneable)
      BinaryTree (implements Cloneable)
      Dlist (implements Cloneable, Sequence)
      Slist (implements Cloneable, Sequence)
         Queue
   java.util.Dictionary
      BTreeDictionary (implements Cloneable, Serializable)
      java.util.Hashtable (implements Cloneable, Serializable)
         HashDictionary (implements Cloneable, Serializable)
            IdentityDictionary 
   NumericCompare (implements Comparator, Serializable)
   RegExp (implements Cloneable, Serializable)
   Set (implements Cloneable, Collection, Serializable)
      IdentitySet
   StringCompare (implements Comparator, Serializable)

Figure 6 -- Exceptions

   java.lang.Throwable 
      java.lang.Exception 
         java.lang.RuntimeException 
            BadRegularExpressionException 
            EmptyQueueException 
            java.lang.IndexOutOfBoundsException 
               DlistIndexOutOfBoundsException 
               SlistIndexOutOfBoundsException

3.3.1.2 Package com.roguewave.vsj

Package com.roguewave.vsj provides a framework for exchanging objects between programs written in Java and programs written in C++.

Figure 7 -- Interfaces

   DefineCollectable 
   DefinePersistable 
   ObjectStreamer 
   RestoreContext 
   SaveContext 
   VirtualInputStream 
   VirtualOutputStream

Figure 8 -- Classes

   CollectableStreamer (implements ObjectStreamer)
   PersistableStreamer (implements ObjectStreamer)
   PortableInputStream (implementsVirtualInputStream)
   PortableOutputStream (implements VirtualOutputStream)
   ReadTable (implements RestoreContext)
   StoreTable (implements SaveContext)

Figure 9 -- Exceptions

   java.lang.Throwable 
      java.lang.Exception 
         java.io.IOException 
            InputRangeException 
            OutputRangeException

3.3.1.3 Package com.roguewave.vsj.streamer

Java/C++ mappings in the Java implementation of Tools.h++ Virtual Streams are defined by small helper objects called streamers. In the package com.roguewave.vsj.streamers, Rogue Wave provides prebuilt streamers that map Tools.h++ classes to classes in the Java core packages.

Figure 10 -- Classes

   BasicMappings 
   CollectableCompare (implements Comparator)
   CollectableMappings 
   DefineCollectableCollection (implements DefineCollectable)
   DefinePersistableTemplColl (implements DefinePersistable)
   SimpleMappings 
   TemplateMappings 

3.3.1.4 Package com.roguewave.format

Package com.roguewave.format contains classes for output format specification.

Figure 11 -- Classes

   NumericFormat (implements Cloneable) 
   NumericPicture 
   QuickFormat
   TextAlignment 
   TextPicture

3.3.1.5 Package com.roguewave.common

Package com.roguewave.common contains the Formattable interface. This interface must be implemented by any class formatted with the com.roguewave.format package.

Figure 12 -- Interfaces

   ConstantStrings 
   Formattable 

Figure 13 -- Classes

   ConstantStringsHelper (implements ConstantStrings)

3.3.2 Class Relationships in the Java Packages

This section contains class diagrams showing the is-a, has-a, and uses-a relationships among the classes in com.roguewave.tools.v2-0 and com.roguewave.vsj. Figure 14 shows the class relationships for com.roguewave.tools.v2-0, and Figure 15 shows the class relationships for com.roguewave.vsj.

Figure 14 -- Class relationships for the com.roguewave.tools.v2-0 package

Figure 15 -- vsj package:Class relationships for the com.roguewave.vsj package



Previous fileTop of DocumentContentsIndexNext file

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