ZooLib
ZooLib is a cross-platform application framework. It allows you to
write a single set of C++ sources and compile them to native executables
to run on MacOS (including native
Carbon
executables),
Windows (including 95, 98, ME, NT4 and 2000),
BeOS or
POSIX
variants with XWindows
such as Linux.
It is distributed as open source
software under the MIT License.
ZooLib was developed over the last five years or so by Andrew Green of
The Electric Magic Company and
Learning in Motion.
What is ZooLib?
- ZooLib applications are multithreaded, with platform-independent
thread and mutex classes.
- It provides a graphical user
interface toolbox with a uniquely flexible layout method.
- The GUI widgets are drawn by platform-specific renderers, so
Mac apps look like native Mac apps, and
similarly for Windows. There is even a switchable renderer that calls through to the
real ones so you can change look and feel at runtime for testing and demonstration.
On the Mac OS, the Appearance Manager is used to render widgets if it is available.
- It provides useful classes such as thread-safe reference counted smart pointers.
- There is
a lightweight database file format, in which the databases are completely
contained in single files so they can serve as end-user documents, for
example to allow a user to email a database file to a friend who can
then double-click it to open it in an editor.
- It provides file access - file open and save dialogs that filter according to
platform style (three letter extension on Windows, file type on MacOS), file references
and classes for accessing open files.
- Streams which may be linked to various data sources and sinks (files, the network,
memory, etc.) and to each other to create filters.
- It provides TCP networking.
- It has extensive debugging support - debugging functions and
macros, assertions in frequently used core components, and a debugging
memory allocator.
- The ZooLib header files define several handy preprocessor macros
that allow you to easily use the C preprocessor to break out to
OS-specific code in the rare instances it is necessary, or when you're
using an API whose functionality is not provided directly within ZooLib.
In a few cases where it makes sense, certain classes are only provided
for one platform, or
variants with different names or different signatures are provided for the
different platforms.
You don't need to link in everything to write a ZooLib application; I believe
only the mutex, threads, and reference counted smart pointers (ZRef template) are
required to make a minimal ZooLib application. For example, you could use only the
networking classes to make a network daemon with no UI, or maybe a database server
if you also included the database classes.
ZooLib requires only very basic support from the underlying operating system and
user interface layer. Because of this, and because the platform-specific layer in
ZooLib is so well architected, an expert programmer could bind ZooLib to a totally
new platform in a few weeks once he or she was familiar with ZooLib internals.
Information about ZooLib
We regret to say that a proper programmer's manual has yet to be
written. It is our hope that the sample code will get you started, as
well as the ability to read ZooLib's source itself. The mailing lists
will serve for questions and answers. We're well aware that documentation
is needed, it will be coming as soon as possible. The documentation that
is available so far can be found here.
Getting the ZooLib Source Code
ZooLib is now maintained in SourceForge's CVS (for a long time after it
was first released, it was kept on the original private CVS server where it
had been stored before its open source release). You
can obtain the very latest source code via anonymous CVS.
[info@zoolib.org]