[Prev] [Next] [Top] [Bottom] [Contents] (9 out of 22)

Generic Container Functions

The SutList is a generic container that is a dynamically sized array of portable void pointers. The SutList frees the application developer from dealing with link list logic or resizing arrays. It also handles array bound checks. Sapphire/Web's tool, gateway, and CGI client library, were developed using this container. The use of the container proved to be the biggest productivity boost we have had for development. Whenever you think of things in the plural sense, we use a SutList. The concepts are simple to use. Read the man pages for a description of the functionality and for some example code. Also, some of the source code delivered in the contrib subtree and the client/src directory of the distribution show other examples. If you currently have a favorite container, for example C++ bag or set, then use that.

The SutList has some limitations. Since it only handles void pointers, you must type-cast all return values to the proper type. Although efficient in read operations, it is sometimes inefficient in adding or removing items¯and its memory usage is somewhat inefficient. See Chapter 8, Sapphire/Web Client API, SutDeleteList and SutDestroyList.


[Prev] [Next] [Top] [Bottom] [Contents] (9 out of 22)