next up previous contents
Next: Platforms Up: Technical Information Previous: Libraries

   
Namespaces and Interaction with other Libraries

If users want to use other software packages like ABACUS, CGAL, or STL together with LEDA in one project avoiding naming conflicts is an issue. As name spaces are not yet generally available LEDA offers a new prefixing mechanism to avoid name conflicts. The libraries from all object code packages as well as the ones produced from the source code package contain class name symbols with the common prefix leda_. A macroing package allows users to use unprefixed class names as used in the manual pages in chapters Simple Data Types to 14.

All unprefixed type names are transfered to prefixed ones at compile time by the macros provided automatically by the inclusion of any LEDA header file. There's two consequences to this.

Remember that you have to prefix all LEDA class types yourself if you use -DLEDA_PREFIX.

The second issue of interaction concerns the data type bool which is part of the new C++ standard. However not all compilers currently support a bool type. LEDA offers bool either compiler provided or defined within LEDA if the compiler lacks the support. Some STL packages follow a similar scheme. To solve the existance conflict of two different bool type definitions we suggest to use LEDA's bool as STL is a pure template library only provided by header files and its defined bool type can be easily replaced.


next up previous contents
Next: Platforms Up: Technical Information Previous: Libraries
LEDA research project
1998-10-02