[Enterprise Extensions only]

C++ value type library, application programming interface

The WebSphere valuetype library for C++ implements the methods listed in C++ valuetype library, methods implemented. Because the implemented classes are derived from generated classes, the member functions they contain differ slightly from those in the java classes. For example, in java the class java.io.FilterOutputStream extends the abstract class java.io.OutputStream, so it must provide definitions for all abstract methods specified in the superclass. However, in the valuetype library hierarchy java_io_FilterOutputStream_Impl is derived from java_io_OutputStream_Impl; a concrete class that defines the methods of the generated class ::java::io::OutputStream.

The types used in the signatures of these methods are derived from the OMG Specification. The semantics of each of the valuetype methods conforms exactly to those of their Java counterparts. For a more detailed function specification of each method, see Sun's javadoc.

For each valuetype, there is a corresponding factory class. You should use the creation methods of a factory class (class name with _init or _factory suffix) to create instances of a valuetype (unlike the normal practice of using constructors to create objects in Java). Except in two cases, each creation method of the factory classes corresponds to a constructor in the Java counterparts of the valuetypes.

In addition to the valuetype classes, a utility class called VtlUtil is defined to provide several common methods to print debugging messages, to handle exceptions, to get registered factory objects, and to make transformation between C++ strings and the ::CORBA::WstringValue objects.

Note: You can reuse a registered factory object with the com::ibm::ws::VtlUtil::getFactory() method instead of creating a new factory every time.

The vtlib.h header file contains the definitions of all the factory classes and the VtlUtil class. These classes are defined in the com::ibm::ws name space.

For an example of using a registered factory object, the com::ibm::ws::VtlUtil::getFactory() method, and the creation methods of a factory, see C++ valuetype library, examples.