array template [docs]
Mimics the C language's array type, but keeps track
of its
own length and dynamically adjusts size when required. The
class which is contained in the array
must provide at least a default (parameterless) constructor and an
assignment
operator. The array provides a reasonably intelligent
pre-allocation scheme
to ensure that a dynamic resizing of the array will not necessarily
need
to
be re-allocated and copied. The class falls back to copying
within the
already allocated space rather than allocating new space.
auto_synchronizer class [docs]
Implements a simplified method for synchronizing
threads on one object. The synchronizing object must be derived
from the
synchronizer_base interface (like mutex, below). The
auto_synchronizer locks the synchronizing
object when the auto_synchronizer is constructed and unlocks the object
when destroyed. This approach uses automatic variable creation to
implement the locking scheme.
Thus, if an auto_synchronizer is constructed at the top of a function,
the lock is obtained for the entire function scope. When the
function is returned from, the scope with the lock goes out of
existence and the lock is released. The auto_synchronizer can
also
be used within inner scopes of functions for short-term locking.
build_configuration group [docs]
A set of macros that can be used to build DLLs.
Currently this is only useful on Win32 platforms. The macros are
used to tag classes and functions that live inside a DLL. When
the DLL is being built, they are specified as exports. But when
the import library for the DLL is being used in other DLLs or EXEs, the
tagged functions are specified as imports. When a DLL is not
being built or used at all, the macros are empty.
byte_array class [docs]
A concrete object based on the array<byte>
template instance. This provides a dynamically sizable array of
simple eight bit bytes.
chaos class [docs]
Generates random numbers within a range limited by
either inclusive bounds or exclusive bounds. The class can also
reset the program's random seed to begin generating a new series of
pseudo-random numbers.
common templates [docs]
A collection of templates that have proven to be
useful as objects themselves (such as the int_array), rather than
leaving them as templates (in the form array<int>). These
objects are based on templates, but they can easily be forward declared
in a class header (which may prove harder or impossible for the bare
templates within some compilers). This forward declaration practice
consequently reduces implementation visibility in the header and can
speed up compilation.
definitions group [docs]
A set of value and type definitions used throughout
the HOOPLE library. It includes values (like PI and NIL), simple
types (like byte and uint16) and structures (such as common, which has
some standard operation outcomes).
dll_root support [docs]
Used in Win32 DLLs to implement the required dynamic
library startup code.
earth_time group [docs]
A collection of definitions, structures and functions
for
manipulating time.
functions group [docs]
A set of useful templated functions for minimum,
maximum, negative, positive, etc.
gnu_header boilerplate [docs]
A header "template" that is prepended to all of the
HOOPLE files. It just specifies the name of the class, the
author, the GPL copyright info, and the administrative email address
where bugs can be
submitted.
guards group [docs]
Implements several guardian functions that check
boundary
conditions or provide warning or error messages to the user.
These can be used to check preconditions by reporting violations or by
actually shutting the program down; the behavior is specified by the
build configuration.
istring class [docs]
An object intended to wrap the C char pointer type,
but provide safe memory management. The istring provides a
variety of manipulation operations; strings can be compared, chopped
up, constructed similarly to
sprintf, and iterated on like an array.
log_base class [docs]
A base class for diagnostic logging classes.
Provides a notion of "filters" to control which messages appear.
When a message is logged using a
particular filter, it will appear in the log if the filter is
enabled. Otherwise the message is just dropped or never even
constructed in the first place. The base class also
provides a representation of text file line endings that is compatible
with Unix and DOS/Win32.
memory_checker class [docs]
This class is in flux; it is
being warped from a class that was an attempt to speed up allocations
into a class that checks memory allocations. It is in no shape to
do anything useful currently.
mutex class [docs]
Implements a semaphore-like synchronization primitive
that protects a single
resource. The resource is either locked or not locked. If
it's already locked, a new lock attempt will be paused until the prior
lock is released. This means that any thread trying to lock the
mutex will go to sleep until the lock is granted. Thus the mutex
can
be used to synchronize threads within a program, but it does not
support
synchronization across programs.
object_base class [docs]
The object_base is a virtual base class that mainly
requires object naming from its derivatives. The required
function is simply a class_name() method which will report the
most-derived object's textual class name. Other virtual methods
rely on the class name in their default versions, but these can be
overridden by the derived objects to include more information.
The text_form() method in particular should be implemented and should
show the state of class members.
The same header also provides the clonable class (defining
a way to do virtual copy constructors) and the synchronizer_base
class (defining virtual methods for locking and unlocking an object).
outcome class [docs]
An object that represents the completion of an
operation. It is not the "result" that was calculated by the operation;
it is just "how" the
operation completed. The outcome is used in HOOPLE to replace
exceptions. It does not force source code to implement an
additional control flow structure for handling exceptions; instead, the
code can just check the outcome and remain in standard control flow
through the function.
packable class [docs]
The base class for objects that can be packed into a
flat array of bytes and subsequently unpacked again.
portability group [docs]
Includes operating system independent typedefs for
window_handle and other commonly needed types. Also implements
portable versions of a variety of low-level operating
system specific methods, such as sleeping for a number of milliseconds
or getting the application's program name.
sequence template [docs]
Similar to array (and based on it), but supports
ordering one sequence against another sequence. Uses a canonical
lexicographic ordering
similar to alphabetization for comparing two sequences. The
object contained in the template must support the less than (<) and
equality (==) operators.
set template [docs]
Represents a mathematical set containing any type of
object that supports the equality operator (==). Set union,
difference, intersection and
iteration methods are provided.
shell sort template [docs]
A templated shell sorting algorithm. It can
sort
an unordered
array of objects very quickly compared to bubble sort and other O(n2)
algorithms. For more info, see the wikipedia entry for shell sort.
utility group [docs]
Offers numerous utility functions, such as conversion
functions, checksum functions, handy mini-templates, and others.
This is also the current home of the program-wide logger feature.
version_checker class [docs]
A set of tools for checking DLL and EXE versions on
the Win32 platform.
version and version_record classes [docs]
Objects used in version checking. The same file
provides the
smaller "version"
structure and the larger "version_record"
structure. The version class contains the numerical identifiers
of a file's version, whereas version_record contains information about
the software vendor, file version, and product version of a specific
file. Version can be used to represent any operating system's
version structure, since it is composed of a collection of
strings. The version_record object is more targeted to mirror the
items contained in Win32 style version resources.
|