Cmaid - manipulable and iteratable data types for C
Cmaid is a collection of different container data types. The interface and the actual implementation are sparated by using vtables. This makes it possible, for example, dead-simple to exchange one
map implementation with another, by simply changing the contstructor. The rest of your code can stay as it was before.
Unlike in other
ADT implementations, Cmaid's
containers keep track of which
iterators are currently attached to them. This has the greate advantage that you can iterator over a container, while you are manipulating it.
As mention before the collection interfaces are separated from their implementation. Cmaid supports the following interfaces:
- The List class provides an sequentiall order collection as they are known from linked lists and vectors
- The Map class provides an associative array, to map a value to a key
- The Set class provides a set of unique and unordered values
- The Cache class provides a pool to share memory for equal and constant objects.
There are three different implemenations, some of them provide more then one implementation of classes. Internally they reuse the most of the implementation specific code to reduce.
Cmaid provides the following implementations
Cmaid is written by:
Peter Wehrfritz <peter.wehrfritz@web.de>
Nathan Ingersoll <rbdpngn@users.sourceforge.net>
The hash table implementation was taken from Ecore_Hash (fka Ewd_Hash):
Nathan Ingersoll <rbdpngn@users.sourceforge.net>
Sebastian Dransfeld <sebastid@tango.flipp.net>
The tree implementation was taken from OpenBSD:
Niels Provos <provos@citi.umich.edu>
The string hash function was taken from Evas:
Carsten Haitzler <raster@rasterman.com>
Cmaid is under a BSD-like license with advertising clause, also know as 3-clause BSD-license. Read here the full
license text here. There is also a plain English
copyright notice .