gtpm2m1y | Migration Guide: Program Update Tapes |
The following section discusses the migration considerations for C++ class library support.
See the APEDIT for APAR PJ26187 and APAR PJ26173 for information about prerequisite APARs.
C++ class libraries provide you, the programmer, with more powerful tools for the development and maintenance of object-oriented programs. Built on the solid foundation of the C language, the C++ language adds support for object-oriented programs and many other features without sacrificing any of the power, elegance, or flexibility of the C language. C++ class library support provides specific class libraries that you can use and extends the power of the C++ language, which enables you to take advantage of more powerful C++ features and standards.
Although the TPF 4.1 system does not provide all the C++ class libraries that are available, it does provide the input/output (I/O) stream class libraries, which provide facilities for handling many varieties of I/O such as cin, cout, clog, and cerr. See OS/390 C/C++ IBM Open Class Library Reference for more information about these I/O stream class libraries.
In addition, the TPF 4.1 system provides support for the STLport standard template library, which is available from Silicon Graphics, Inc. as a product called STLport Standard Template Library Version 3.01. This library, which is part of the ANSI/ISO C++ standard, contains generic container classes and algorithms that are designed to work together to provide you with a wide range of functions. The container classes are used as templates to define objects, while the algorithms are used to manage data in the containers. For example, the vector class can be used to represent vectors and the reverse algorithm can be used to reverse elements in vectors. The reverse algorithm can also be used to reverse elements in a list or in a C array. Therefore, generic C algorithms can be used to manage different containers. By providing a set of containers and algorithms to manage the containers, the STLport standard template library becomes a powerful tool for data representation and code development.
The TPF 4.1 system supports STLport Standard Template Library Version 3.01 compiled with IBM OS/390 C/C++ Version 2 Release 4. STLport Standard Template Library Version 3.01 is not shipped with the TPF 4.1 system. Rather, STLport Standard Template Library Version 3.01, which supports the IBM OS/390 environment, is available as freeware from the World Wide Web (WWW). You can port STLport Standard Template Library Version 3.01 to the TPF 4.1 system. See Migration Scenarios for more information.
C++ class library support is a follow-on to C++ support (APAR PJ25084), which provides support for:
See C++ Support (APAR PJ25084) for more information about C++ support (APAR PJ25084).
I/O stream class libraries and the STLport standard template library provide the flexibility, productivity, and quality needed to gain a market advantage because C++ class libraries:
There are no changes.
To ensure that your TPF 4.1 system performs correctly with C++ class library support, you must establish the required operating environment. The following section describes hardware and software requirements specific to C++ class library support.
Operating Environment Requirements and Planning Information provides information about the minimum system configuration requirements that are necessary to operate the TPF 4.1 system. You may find it helpful to review that chapter along with the following information.
There are no changes.
The following section contains information about software requirements.
If you want to take advantage of the power behind the STLport standard template library, you must port STLport Standard Template Library Version 3.01 from the WWW. See Migration Scenarios for more information about porting STLport Standard Template Library Version 3.01.
The following section summarizes interface changes.
The following section summarizes C/C++ language changes. This information is presented in alphabetic order by the type of C/C++ language information. See the TPF C/C++ Language Support User's Guide and TPF Application Programming for more information about the C/C++ language.
Table 587 summarizes changes to the build scripts used by the build
tool. This information is presented in alphabetic order by the name of
the build script.
Table 587. Changes to Build Scripts for C++ Class Library Support
Build Script | Type | New, Changed, or No Longer Supported? | Description of Change |
---|---|---|---|
CPP1BS | DLL | Changed | Added comments to state that the members are object code only (OCO). |
CPP2BS | DLL | New | Build script containing the C++ I/O stream class library function. CPP2 is a DLL and does not need a library interface script. Program update tape (PUT)10 contains the CPP240 DLL, which has been built for you already. You do not need to use the CPP2BS build script to build the DLL. |
There are no changes.
Table 588 summarizes the general use C/C++ language header file changes. This information is presented in alphabetic order by the name of the general use C/C++ language header file.
General use means these header files are available for your
use.
Table 588. Changes to General Use C/C++ Language Header Files for C++ Class Library Support
C/C++ Language Header File | New, Changed, or No Longer Supported? | Do You Need to Recompile Segments? |
---|---|---|
fstream.h | New | No |
generic.h | New | No |
iomanip.h | New | No |
iostream.h | New | No |
irtllock.h | New | No |
stdiostream.h | New | No |
stream.h | New | No |
strstream.h | New | No |
There are no changes.
There are no changes.
Table 589 summarizes the library member (object file) changes.
This information is presented in alphabetic order by the name of the library
member (object file).
Table 589. Changes to Library Members (Object Files) for C++ Class Library Support
Library Member (Object File) | Library Module Name | New, Changed, or No Longer Supported? | Type | Description of Change |
---|---|---|---|---|
CSSDLL | CISO | Changed | C Language | Add the CPP2 name to the subsystem-shared DLL validation routine. |
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
The following section summarizes the macro changes. This information is presented in alphabetic order by the type of macro.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
Table 590 summarizes system initialization program (SIP) Stage II
macro changes. This information is presented in alphabetic order by the
name of the SIP Stage II macro. If IBMPAL is changed, you must run the
system allocator (SALO) and load the new program allocation table
(PAT) to the TPF 4.1 system.
Table 590. Changes to SIP Stage II Macros for C++ Class Library Support
SIP Stage II Macro | New, Changed, or No Longer Supported? |
---|---|
IBMPAL | Changed |
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
Table 591 summarizes changes to the publications in the TPF
library. This information is presented in alphabetic order by the
publication title. See the TPF Library Guide
for more information about the TPF library.
Table 591. Changes to TPF Publications for C++ Class Library Support
Publication Title | Softcopy File Name | Description of Change |
---|---|---|
TPF Application Programming | GTPAPP09 | Updated with information about TPF restrictions using C++ class library support. |
TPF Migration Guide: Program Update Tapes | GTPMG200 | Updated with migration considerations for C++ class library support. |
There are no changes.
There are no changes.
There are no changes.
There are no changes.
There are no changes.
This section provides migration scenario information for the I/O stream class libraries and the STLport standard template library.
Use the following procedure to install I/O stream class libraries in your TPF 4.1 system:
Use the following sets of procedures, in the order they are presented, to port STLport Standard Template Library Version 3.01 from the WWW to your TPF 4.1 system and then test it using the STLport test suite program:
Before you begin, do the following:
Use the following procedure to obtain STLport Standard Template Library Version 3.01 and the modules in the STLport test suite program from the WWW:
If you want to use the STLport test suite program to test the STLport standard template library, continue with Making Setup Modifications for the TPF 4.1 System and Making Modifications to the Expected Results File for the TPF 4.1 System to modify the expected results file.
If you do not want to test the STLport standard template library, there is no further action for you to take.
You can use either the TPF C Debugger for VisualAge Client or the ibm390.mak file to compile the modules in the STLport test suite program. The ibm390.mak file uses the IBM OS/390 UNIX System Services in the IBM OS/390 environment as well as the Compile ANSI C/MVS Source Code and Create an Executable File command with CXX specified to compile the modules in the STLport test suite program. See OS/390 UNIX System Services Command Reference for more information about this command.
STL_INCL=/u/stlport
If you want to include additional libraries, separate each library by a blank and place -I (dash-capital I) in front of the second library, the third library, and so on. For example:
STL_INCL=/u/stlport -I/u/lib2 -I/u/lib3
_CXX_INCDIRS,_CXX_PSYSIX,_CXX_PSYSLIB
Change: //# define _STL_NONTEMPL_BASE_MATCH_BUG 1
To: # define _STL_NONTEMPL_BASE_MATCH_BUG 1
Notes:
system("STL1");
The STLport test suite program issues cout C++ functions to print results from the test cases. The STLport standard template library provides the stl_test.ibm390.exp expected-results file. You can use this file to compare your actual results.
The results file expects the output lines to be in the order in which the cout C++ functions were issued. However, because these output messages are not chained together, the TPF 4.1 system may not print the messages in the order in which the cout C++ functions were issued. To avoid this sequencing problem, use the file system functions to direct the output to a file on the TPF file system. See File System Support (APAR PJ25089) for more information about file system support and the TPF C/C++ Language Support User's Guide for more information about file system C functions.
You must edit and modify the actual results file before doing the comparison because of TPF-unique messages.
You are now ready to compare the actual results file with the expected results file.