C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Accessing Middleware Using HP C and C++ for
NonStop Systems
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
6-3
Migration Considerations for Version 7
Migration Considerations for Version 7
Version 7 and version 6.1 are significantly different and are binarily incompatible. The
collection class templates were reengineered between the two versions to make the
templates compatible with the Standard C++ Library (VERSION2).
If you choose to move to version 7 and you have applications that were built using any
earlier version of Tools.h++, you must recompile those programs.
To migrate existing code from version 6.1 to version 7, these code adjustments are
required for specific classes:
Extra template arguments are required for hashed and sorted collections. Use the
predefined macro RWDefHArgs or RWDefCArgs to provide the additional template
arguments.
Different constructor arguments are required for hashed collections. You must use
a hash object (an object that provides a hash function through a public member
function) rather than a hashing function. Use the provided templatized object,
RWTHasher<T>, which builds a hash object from a hash function.
Element types in some collections may require less-than semantics (operator
<()). This requirement is due to the inclusion of member functions based on the
Standard C++ Library, such as sort().
Class hierarchies have changed. In version 7, there are no inheritance
relationships among the standard-library-based collection class templates. If your
code constructs an RWTValHashTableIterator from an RWTValHashSet, you
should use an RWTValHashSetIterator instead.
Detailed migration information is available in Chapter 11 of the user guide portion of
the Tools.h++ Manual Version 7.
Installation Notes
On an HP NonStop system, the Tools.h++ library is delivered on the site update tape
(SUT), and the files are installed on $SYSTEM. No user installation is required. On the
PC, Tools.h++ is included on the CD of TDS and ETK.