Data Structures Library

    This collection of classes come from the classic lexicon of abstract data types.  They are often intended as containers for other object types, or they provide methods for accessing and structuring data that can be useful.  Some of the objects that would normally reside here are in the Basis Library instead, since that library is the fundamental root.
    Note that the software is distributed under the GNU Public License.  No warranty is made for it whatsoever.  We have done our best to ensure that this software is high quality and error-free, but cannot guarantee anything real about it due to potential legal culpability. 
    If you find bugs in this software or wish to contribute enhancements to it, please send them to the HOOPLE Administrator.

amorph template [h, cpp]

Provides a cabinet for pointers.  Each pointer must be of the templated type or derive from it.  When a pointer is checked in to the amorph, the amorph assumes responsibility for it from then on.  When the amorph is destroyed, all of the pointers currently held in it are also destroyed.

bit_vector class [h, cpp]

Manages an array of bits and provides operations for setting and clearing individual bits.

byte_hasher class [h, cpp]

A hashing algorithm for byte arrays and flat objects (see the hash_table header for the definition of hashing algorithm).

common_templates group [h, cpp]

Provides commonly used templates from the data structures library.  Currently this is empty.

configlet class [h, cpp]

An individual item of configuration information.  The configlet resides in a particular section name and has a specific entry name within that section.  For example, a scheduling class might have an activation frequency.  This could reside in a configuration section named "scheduler" and the entry name might be "activation_frequency".  The value for the item could be a number of microseconds between activation.  Note that the configlet assumes nothing about the data stored; that is for the derived configlet to manage.

configuration_list class [h, cpp]

Implements a list of configuration items and provides methods for loading and storing them to a configurator.

configurator class [h, cpp]

Defines a base class for configuration storage.  This provides operations for loading and storing individual items.  Some derived configurators also support loading and storing an entire configuration section at once.

guarded_value template [h]

Wraps a data value and adds a notion of whether the value is initialized or not.

hash_table template [h, cpp]

Implements a templated fast lookup table called a hash table.  This particular type does "hashing into buckets" in cases where the hash index collides for two different items.  A "hashing algorithm" must be provided to the hash_table; this defines a way to translate a key for an item into a hash index.  Given a fast hashing algorithm, lookup and storage to the hash_table can be very fast compared to linear lookups.

ice_key class [h, cpp]

This class provides simple DES-like encryption.  The length of the encryption key can be varied.

int_hash template [h, cpp]

Defines a hash_table where the keys are integers.  This is useful for managing objects that are keyed by simple unique identifiers.

managed_object template [h, cpp]

Reference counts the object held in the template.  When all users of the object go away, the object is destroyed.

mat_morph template [h, cpp]

Implements a matrix of pointers based on the amorph class. When pointers are checked into the mat_morph, it takes on responsibility for their destruction. The pointers can be checked back out also, shifting responsibility back to the caller.

memory_limiter class [h, cpp]

Tracks memory allocations made by a parent class.  The allocations are tracked by the identifier of the object requesting them.  Each object is allowed a certain amount of memory before allocations are denied.  The memory limiter also tracks memory allocated overall within its scope.

section_manager class [h, cpp]

Manages a group of related configuration sections.  A table of contents tracks the section names.  Each named section consists of a string_table of items that can be stored or retrieved from a configurator.

span_manager class [h, cpp]

Based on a process that is completed in portions that can be numbered.  The tasks are able to be executed in parallel such that any item can be completed in any order.  The span_manager tracks this process and can output the current state in different forms.

stack template [h, cpp]

This class is based on the traditional stack data structure.  Entries are removed in Last In-First Out (LIFO) order.  The stack also allows untraditional iteration over the elements in the stack.  Stacks can either be bounded (by having a maximum number of elements) or unbounded.

static_memory gremlin class [h cpp ]

Manages two types of objects: internal HOOPLE objects and user-defined objects that have been created using the SAFE_STATIC macros.  The object lifetimes will generally be from their creation until the program exits.

string_hasher class [h, cpp]

A hashing algorithm for string types.  Uses some characters from the beginning and end of the string to create the hash index.

string_hash template [h, cpp]

A hash table that stores the templated objects using strings as the keys.  This is useful for managing a collection of named objects.

string_table class [h, cpp]

A list of named strings.  That is, each string listed in the string_table is accessed by its name, which is also a string.

symbol_table template [h, cpp]

A list of named objects.  Each object stored in the table has a string name by which it can be retrieved or deleted.

table_configurator class [h, cpp]

An in-memory version of the configurator class.

unique_id template [h]

A simple notion of a unique identifier.  The main thing this provides is comparison for equality and inequality.  It also provides a way to distinguish two different unique id objects where the templated object cannot.  Say the templated identifier type is a int; with this class one can have both a scheduler_id class derived from unique_id<int> and a buffer_id class also derived from unique<int>; since they are different classes, one cannot accidentally pass a buffer id to a method expecting a scheduler id, whereas it is easy to accidentally pass a simple integer with the wrong "type".