Classlib

Classlib è una estesa libreria per molteplici usi di programmazione. Non è complessa come la STDTL ma ha tutto quello che serve a un programmatore C++ per il suo normale lavoro.

Il suo nucleo è liberamente ispirato (e abbastanza compatibile) alla Borland Classlib ditribuita con il Borland C++ 3.0 e successivi. Essa era stata originariamente scritta per Windows a 16 bit e in quell'epoca lontana supportava un concetto di allocatore. Con la programmazione a 32 bit questo concetto di allocatore è stato completamente abbandonato ma i nomi delle classi sono rimasti gli stessi per compatibilità con il codice già scritto.

Ho cominciato a scrivere la libreria quando ho dovuto effettuare il porting di codice da Borland C++ (Windows 16 bit) a Visual C++ (Windows 32 bit).
Ho scritto la libreria per portare velocemente il codice fra le due piattaforme. Negli anni successivi vi ho aggiunto ogni pezzo di codice che ritenevo interessante per usi generali. Ho aggiunto le funzioni matematiche per il calcolo 3D (Matrix3) e molte comode funzioni matematiche per svariati usi. Ho introdotto una serie di oggetti per rappresentare le primitive elementari come Punto2D, Punto3D, Linea2D, Linea3D.
Ho ampiamente esteso la libreria template originaria con nuove classi template come TCache, TStaticArray, TSQueue ed altre.

Dal 2000 circa ho (spero) definitivamente abbandonato la piattaforma Windows per sviluppare in Linux e nel software libero. Ho riscritto la libreria per Linux con nuove estensioni. In questo momento esiste una emulazione del tipo Variant, una serie di classi per una semplice gestione del multithread, una gestione semplificata dei socket, un property container, stringhe a lunghezza fissa, e l'exchanger (un meccanismo per scambiare semplicemente valori multipli fra client e server).

Questa libreria si è evoluta in più di dieci anni di programmazione in C++. E' stata estesamente testata in molti progetti software e la trovo molto usabile e affidabile.

Fino ad oggi è il mio maggiore contributo al Free Software

In questo momento non è pianificato un back-port verso Windows non essendo questa piattaforma di mio interesse (ma se qualcuno vuole contribuire posso anche ripensarci...).

La libreria viene rilasciata con licenza GPL.


The classlib is an extensive library for many programming task. It's not complex like the STDTL but have all a C++ programmer need for it's normal work.

It's original core is free inspired (and almost compatible) to Borland Classlib shipped with Borland C++ 3.0 and later. It was orginally written for Win16 and in far year it's support an allocator concept. Whit the 32 bit programming this concept are totally abbandoned but the class naming are the same for compatibility with previous written programs.

The start is when I need to port some code written with Borland C++ 3.0 (16bit) in Visual C++ 2.0 (32bit).
I wrote the library to easy ports this code. In the past year I added any piece of code I think of full and general use. I have added the math funcion for 3D calculation (Matrix3) and some usefull math function; I have added also objects for 3D and 2D rapresentation like Punto2D, Punto3D, Linea2D, Linea3D. I have high expanded the original template library with many new useful classes like TCache, TStaticArray, TSQueue and so on.

From the 2000 about I have definitevly abbandoned Windows platform for develope in Linux and Free Software area. I have rewritten the library for Linux platform with new improvement. At this time I have written the Variant emulation, the easy-multi-thread support, the easy-socket support, property container, fixed string and the exchanger (a meccanism for simple exchanging value from client and server side of application).

This library is evolved in more than ten years of C++ developement. It was extensive tested in many software projects and I find it very usable and affidable.

At this time it's my major contribute to Free Software.

At this time isn't planned a back-port to Windows (but is someone want to contribute, I can rethink...).

The library was relased with GPL license.


Documentation (sorry, incomplete at this time): Italian-English

The API English only.

Download the source click here!
Decompres the file and install as usual:

tar -xvzf classlib-2.0.tar.gz
cd classlib-2.0
./configure
make
su
./install
The compilation was tested on Mandrake 8.2, 9.0, Red Hat 7.3, 8.0, Slakware 8.1.
On Slackware 8.1 (gcc 2.95) must compile and run the cvtcrlf2lf.c for some incompatibilty in macro espansion:
cd classlib-2.0
./configure
cd classlib
gcc -o cvtcrlf2lf cvtcrlf2lf.c
./cvtcrlf2lf *.cpp
./cvtcrlf2lf *.h
cd ..
make
su
./install

Thanks to all for suggestions, contributes, ideas, ... and greetings.

Please go to Sourceforge project home for classlib