Available Classes - Data Object Library
Question: Why doesn't this link to documentation instead?
Our library provides a greater variety of data structures than STL or Rogue Wave's tools.h++, even though we have fewer classes and functions. Our design philosophy has always been that coding with a class library should be possible without constantly searching through the documentation.
Our classes are more universal, and we provide the minimum set of functions to manipulate each data structure. As examples: our dynamic ARRAY includes an array of objects, an array of pointers, a stack, and a binary heap; or our COLLECTION is regular or ordered, depending on how you treat it. Our trees do not include breath-first or depth-first searches, because these can be coded in 3-4 lines using our iterators. Many of our data structures include two-way pointer relations which cannot be implemented with containers - for example AGGREGATE or GRAPH.
Even though our library has been around much longer than STL, the style of its interface is surprisingly similar to that of STL. Most functions apply to more than one class, and iterators for different data structures are almost identical. This makes it easy to replace one data structure by another, similar one. In spite of the similarities, the interfaces of DOL and STL cannot be identical. The internal design of the library (intrusive data vs. containers) implies a different style of use. For example, intrusive data structures are naturally 'sets', while container based data structures are naturally 'bags'.
Frequently used functions (Many functions have abbreviated names):
add() ... add/append an item ins() ... insert an item del() ... delete/remove an item without destroying it fwd() ... move forward bwd() ... move backward par() ... get parent child() ... get the prime child (head of the list) chld() ... get the secondary child (tail of the list) set() ... make the selected item to be the prime child merge() ... splits or merges two lists
All iterators have: a constructor, start(), and operators ++ and possibly --. We believe that adding other functions to the iterator only complicates its use. Note that even simple pointer relations are recorded as 'data organizations'. This is necessary for automatic data persistency.
[Intrusive, circular ring of objects type T, singly linked. The user may control the order. Can also be used as a stack/queue.]
[Just like SINGLE_RING, but doubly linked] Can also be used as a stack/queue.]
[Basic intrusive collection. Each object of the parent class P keeps a singly linked ring of children, class C. Similar to SINGLE_RING, but encapsulated under the parent class.]
[Just like SINGLE_COLLECT, but doubly linked.]
[Just like SINGLE_COLLECT, but each child has a pointer to its parent.]
[Just like SINGLE_AGGREGATE, but doubly linked.]
[This is similar to the String class. Every object of type T has a pointer to a variable length, \0 ending text string.]
[Each object of the source type, S, has a pointer to the target, type T. The T object has no pointer or knowledge of who points to it.]
[T points to S, and S points to T.]
[T has a void* pointer.]
[Last in, first out queue.]
Functions: push, pop.
[First in, first out queue.]
Functions: push, pop.
[Source S points to target T; T keeps a count of how many S point to it.]
[Each object of class T keeps a singly-linked list of children. The iterator traverses the children of a given parent.]
[Just like SINGLE_TREE, but children form a doubly-linked list. The iterator traverses the children of a given parent.]
[Each node N keeps a singly-linked list of adjacent edges, E. Each edge knows its source and target nodes. Can be used for both directed and undirected graphs. The iterator traverses adjacent edges.]
[Each node N keeps a singly-linked list of adjacent edges, E. Each edge points to a target node, but does not know its source node. The iterator traverses adjacent edges.]
[One-to-one relation. Source S and target T are connected via relation R. R knows the source and target.]
[One-to-many relation. Source S keeps a set of relations R. Each relation knows its source and target. The iterator traverses relation/target pairs for a given source.]
[Many-to-one relation. Reverse of 1_TO_N. Actually, 1_TO_N can be used instead.]
[Many-to-many relation. An S object can have multiple relations with different T objects, while any T object can have multiple relations with S objects. Each R is on two independent lists: One for all R's that have the same S as source, and one for all R's that have the same T as target. The iterator traverses relation/target pairs for a given source.]
Functions: add,del,fwd,bwd,source,target,nxtOnTarg,preOnTarg,nxtOnSour, preOnSour.
[Every H object keeps a dynamic array of T's. T can be a pointer, for example ARRAY(MyClass,char*). This data organization can also be used as a binary heap, or a stack. There is no iterator. Function ind() replaces operator ; for a given index, it returns a pointer to the element of the array.]
Functions: form,formed,free,size,ind,head,reset,push,pop,sort,inHeap, outHeap,updHeap,delHeap.
[Every H object keeps a hash table of T's. The user supplies the hashing function, but default functions for hashing an integer or a text string are available. The iterator traverses objects within the same bucket.]
[LISP-like property: Objects of type T can have any number of labelled properties. The values can be int, float, char, string, or an array of any of these. There is an overhead of only one pointer for each T.]
[Each object of type T has an infinitely large array of characters, which is paged to disk according to the user's specification. Function addr() returns a pointer to the object directly inside its page, function io() copies objects in/out of the disk as if it were a database.]
[On demand, provides the meta-structure of your classes, including a mask which detects virtual function pointers.]
[Disk saving utilities, including allocation and deallocation of strings, functions which detect the closure of all objects, error detection, and entry into the intelligent browser, which lets you traverse your data structures.]
Functions: too many and too specialized to list them here.