The Tools.h++ V7.0 library can only be used in the C++ V3 mode of the compiler.
This library offers a broad spectrum of “foundation classes”, i.e.:
string classes with pattern-matching mechanisms
classes to handle the date and time
virtual streams
file and file manager classes
container classes (collectable) with the option of implementing persistence and associated iterator classes:
Smalltalk-like container classes (without template usage)
template container classes to store values (
RWTVal
...)template container classes to store pointers (
RWTPtr
...)
classes for internationalization
The header files for the above interfaces are contained in the library SYSLIB.CRTE, and the modules are contained in the libraries SYSLNK.CRTE.TOOLS.
Using the library
Program development in the BS2000 environment (SDF)
The library SYSLIB.CRTE must be searched for standard headers at compilation. This can be ensured by specifying the search for standard headers with the option STD-INCLUDE-LIBRARY= *STANDARD-LIBRARY (default) in the MODIFY-INCLUDE-LIBRARY statement.
The program must be linked with the BIND statement of the compiler, and the following options must be specified in the MODIFY-BIND-PROPERTIES statement:
RUNTIME-LANGUAGE=*CPLUSPLUS(MODE=*V3-COMPATIBLE) and TOOLSLIB=*YES.
For further details see "MODIFY-BIND-PROPERTIES".
Program development in the POSIX environment
In order to include header files and link in the required modules, the C++ V3 mode (-X V3-COMPATIBLE
) must be specified in the CC
command.
Furthermore, when linking the program, the option -l RWtools
must also be specified. For more details, see also the manual “POSIX Commands of the C/C++ Compiler” [1].
Documentation
The C++ V3 library Tools.h++ is described in detail in the following manuals:
“Tools.h++ V7.0, User ́s Guide” and
“Tools.h++ V7.0, Class Reference”
Information on the documentation
In order to make the tools.h++ library independent of incompatible future versions of the standard library, it is not based on the standard library (i.e. the RW_NO_STL directive has been placed in the central configuration header w/compiler.h).
Certain classes are therefore not available or only available with restrictions. These are identified accordingly in the “Tools.h++ Class Reference” manual [8], e.g.
“RWTValMap requires the Standard C++ Library.”
When the associated headers are used, a #error error message is issued, e.g.
“Cannot include header if RW_NO_STL macro is defined for your compiler”
or
“You must have both Standard Library and Exceptions to use this class.”
Some classes implement functions which are linked to particular systems:
header rw/xdrstrea.h; class RWXDRistream and RWXDRostream
These classes can be used in BS2000/POSIX, but not in BS2000 native.
header rw/winstrea.h; class RWCLIPstreambuf
The “Tools.h++ Class Reference” manual [8] contains the following information on this:
“Class RWCLIPstreambuf is a specialized streambuf that gets and puts sequences of characters to Microsoft Windows global memory. It can be used to exchange data through Windows clipboard facility.”
As neither the concept of a “Microsoft Windows global memory” nor that of a “Windows clipboard” exists in Windows, this class is not available here.