The WebSphere valuetype library for C++ implements the methods listed in "CORBA valuetype library for C++: 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 the Java language, the java.io.FilterOutputStream class 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 must 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 the Java language). 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, handle exceptions, get registered factory objects, and 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 "Example: C++ value type library".