Erwin Data Structures Library + Tools

‘STL for C (and C++)’

No templates, no void*, no buffer overflow.
The Erwin library is meant to be the ultimate data
structure library for mixed usage of C and C++. Arbitrary key
and value types are implemented by template files that don't use C++
templates, but are instantiated by a Perl script. This
way, mixed usage in C and C++ is possible. However, a C++
interface is generated to support the advantages of the C++
language.Erwin contains a number of tools, too, all of them written
in Perl. The following list shows the data structures and
tools, together with some typical examples.

Vectors

Vectors behave much like standard arrays, but their size can be
changed dynamically and they use array bound checking to prevent
buffer overflows (or buffer overruns), which are the source of
most security problems in safety critical applications.

Lists

Usually, vectors should today be preferred over lists,
because their cache behaviour, which is important on modern microprocessors,
is much better. On the other hand, the one feature that makes
lists important is that sort order keeping deletion of an arbitrary
element takes constant time.

Documentation Extraction

Documentation from C and C++ libraries can be automatically
extracted. Several projects exist for this, but due to the need
to parse special syntax files and Erwin template files and
to document the correspondence between C++ and auto-generated C
headers, Erwin has its own documentation extractor. It also
provides a c2html markup interface and
a text2html formatter.See the Erwin Reference Documentation
for an example.

Stability

The library was developed over several years for private,
commercial and university projects. It is used extensively in
all three areas now.
The main data structures have stabilised well and bugs
are found rarely nowadays, so the library is considered to be very
stable and robust. Furthermore, the API is fixed -- it is simply
impossible to adjust all the existing software to Erwin, so it
will stay the way it is apart from, of course, bug fixes and
features additions.