File: bebits.tgz Author: William Adams (wadams@be.com) Release: 970204 Compatibility: DR8.2 Location: pub/Samples/bebits.tgz Description: A bunch of useful C++ classes Notes: Name - Esoteric Library Author - William Adams (wadams@be.com) Release - 970204 This is the esoteric library. As the name implies, this is a set of objects that do very esoteric and mundane things. No C++ developer should have to waste their time doing this sort of stuff. So thus, this library. It is comprised of a number of template implementations of standard data structures and routines. It also includes a set of time, distance, and other classes. It is one part of the Nuts-n-bolts programming set that we have used at Adamation Inc. and now at Be Specific. There are many class libraries and template libraries that exist in the world. STL is the one that all compiler manufacturers should be including in their systems real soon now. The purpose of this set is just to throw one more into the ring. We have found that several of the existing libraries are too cumbersome for our liking. So we try to maintain a minimal amount of useful functionality. You will find a number of standard things like: string A very basic functional string class ASequenceOf Like an array with a different name ABitSequence A Sequence of bits ACharSet A specialized sequence of bits AIterator Iterator over a sequence AListOf A list as opposed to a array based sequence AQueueSequenceOf A queue based on a fixed size sequence Searching Routines Linear Search Searches a sequence for an element Sorting Routines BubbleSort Sorting using the slow bubble sort SelectionSort Sorting using selection sort InsertionSort Sorting using insertion sort QuickSort Sorting using the very fast quick sort OS Kernel Routines ACondition A condition object AThread A sub-classable thread class USAGE The files should be fairly self explanatory if you have used templates in C++ before. If you haven't, then you should buy a good book on the language and then this will become more apparent. The file test.cpp shows some samples of how to simply use some of the templates. It doesn't do anything in particular, it was primarily used to help us flush out compile errors. You can probably just include the files that you need into whatever project you are working on. Or put the headers in a good place where they will be found automatically. If you're not a big templates fan, then the easiest thing to do would be to copy and paste the code into another file and do a global find and replace on 'AType' making is specifically the type that you want to hard code for. The routines remain the same. You can expect that this library will continue to grow over time and improve in its implementation. However, you may not see our best work show up in this public domain code because we are after all a commercial entity and don't want to give away all of our secrets. So enjoy it if you will.