10. ORG C++ LIBRARY

OrgC++ includes a library of organizations. The library is open: you can add new organizations and functions.

The library has two parts:

  1. The orgC/macro directory contains the source code for all macros and parametric functions. (Examples: add1ton and fadd1ton.)
  2. The orgC/lib directory contains the source and libraries (*.a files under UNIX, *.lib file under DOS) for more complicated features, such as hash tables or saving to disk.

Note that each file in the macro directory contains both complete documentation (including an example) and the executable code. The file macro/zzmaster contains the master table for the whole library. It contains the following sections:

For more details about this file, see Chap.16.

Even the hyper-object definitions (ZZ_HYPER_.. calls) must be registered in the file zzmaster. The class generator needs this information on the internal setup of each hyper-object.

When you link a program written with OrgC++, you have to link it to the appropriate library:

UNIX:

orgC/lib/zzclib.a

DOS, TurboC++:

orgC\lib\cmlib.lib for the medium memory model
orgC\lib\cllib.lib for the large memory model

DOS, ZortechC++:

orgC\lib\zmlib.lib for the medium memory model
orgC\lib\zllib.lib
for the large memory model

For information on how to recompile the library see Chap.2 (Installation).

If you have been using OrgC with regular C, and you are now transferring to OrgC++, look at Appendix A. It contains a table of all functions and their uses in C and C++.

See Chap.12 (on-line help) on how to query the library documentation.

When calling the class generator you may, for the third parameter, specify the master file you want to use:

orgCpath/zzprep source.c ZZinclude.h zzmaster ZZfunc.c

This permits you:

  1. to select only a subset of organizations and simplify the preprocessing;
  2. to merge the standard OrgC++ library with one or more user libraries.

For more details on how to select/merge libraries, see Chap.17.

 

Chapter 9: Single User Mode Chapter 11: Available Organizations