C++ Class Interface

C Scripting Language
Reference Manual
Version 4.4.0

<< Back  End  Next >>
Using the CSL executive
System library
String library
Math library
Regular expression lib.
File library
Database library
Async Communication
Registry/Profile handling
Windows control
C++ Class Interface
   Embedding CSL
   Writing libraries
   Class interface reference
CSL links

The C++ class interface is based on the IBK ZClass library which is part of the CSL package and can be used together with most other class libraries without conflicts. It is currently available for following configurations:

Compiler Version(s) Sample dir
IBM VisualAge C++ for OS/2 3.0.8 .\Samples\Class\Os2\Ibm
IBM VisualAge C++ for Windows 3.5.9 .\Samples\Class\Win\Ibm
Microsoft Visual C++ 5.0 .\Samples\Class\Win\Microsoft
Borland C++ (free commandline tools) 5.5 .\Samples\Class\Win\Borland
GNU GCC on unixish systems 2.95.2 ./Samples/Class/Unix/Gnu

The binary distributions for Windows and OS/2 include only the class library for IBM VisualAge C++. If you have a Borland or Microsoft compiler you must build the class library first. See Readme.txt in .\Win\Borland or .\Win\Microsoft respectively for instructions.

Although the class library works fine with GCC on Linux, this is not the case for 2.95.2 on Windows. It seems exceptions cannot be handled across dll's: Throwing an exception in a dll and not catching it in the same dll will make GNU terminate the program with SIGABORT instead of passing the exception to the calling dll or exe.

In fact there are 2 implementations of the CSL class interface:

  • If you include ZCsl.hpp you are working directly with the CSL kernel. I call this the NATIVE interface. It requires however that the CSL kernel and your application are built with the same compiler. This is the directest interface to CSL.

  • If you include ZCslWrap.hpp instead, every call will be redirected to the C API, which in turn will call the native interface. This allows mixed compiler configurations. There is an additional overhead by this interface, but in practice you'll hardly recognize a difference. The libraries of the binary windows distribution are built with this interface.

I'm sorry but the documentation of the ZClass library is still in my queue. Don't know when I will find time to do it (any volunteers?). You may help yourself by consulting the header files and source.

  Copyright © IBK Landquart Last revision: 27.05.2002 << Back  Top  Next >>