Some code for download
The files below contain small pieces of code. Some of them are useful and complete solutions to some problems and can be (and are) used out of the box in various applications. Others are just results of wild experimentations and should be treated only as starting points for further work.
(files are sorted by date - the most recent are at the beginning of the list)
| pgAda.tar.gz | 6 kB | A very simple Ada client library for PostgreSQL, see the test program for usage patterns. |
| safetypes.tar.gz | 3 kB | Much more elaborated range class (see also range.tar.gz below) with some additional possibilities like subranges, flexible handling of out of range conditions and more. |
| range.tar.gz | 1 kB | This file contains a range class that is able to check for out-of-bound errors at compile time. The code has been tested on g++-3.2. |
| streamstate.tar.gz | 3 kB | This file contains a set of classes that encapsulate the additional stream storage in the C++ IOStream library. The example usage includes easy building of new stream manipulators. Two approaches to the problem are implemented and presented in the examples. The code has been tested on g++-3.2. |
| nullstream.zip | 1 kB |
The null stream (equivalent of /dev/null
on Unix
systems) is not only funny, but can prove to be useful in automated
testing of code that produces some IOStream output. Tested on MS
VC++7.0 and g++-3.2.
|
| tpp.zip | 8 kB | This file contains a text pre-processor written in Tcl. TPP has very little functionality by itself, but is customizable in terms of plug-ins that implement the actual pre-processor directives. Example config files are provided with implementation of common functionality. |
| view.zip | 11 kB |
This file contains a utility class (compatible with
STL) that
supports transparent sequences of iterators. The examples show how to considerably speed up STL code by using views and how to perform tasks impossible normally, like sorting const
sequences or sequences of const objects, providing
random-access to std::lists, merging std::vectors
and so on.The code compiles on g++ 2.96 or later and MS VC++7.1. |
| sockets.zip | 7 kB |
This file contains a couple of C++ classes which turn
sockets into
iostreams so that it is possible to use them like any other stream with
<< and >> operators. Test and demo program is also provided. The code has been tested on MSVC++7.0 and g++-3.2. |
| messaging.zip | 3 kB | This file contains a couple of C++ classes that provide messaging infrastructure analogous to that from Java Swing. |
| agingcache.zip | 3 kB |
This file contains a couple of C++ classes that
provide the
semantics: "keep n most recently used items". The code (and the test program) runs on both Windows and Linux. |
| rawpool.zip | 1 kB |
This file contains a C++ class that can be used as a
memory pool for
arbitrary object types. It can considerably speed up the new and delete
operations.
|