There are two ways to implement new library classes, depending on whether or
not the new library class can support the automatic detection of library type
done in the library(const string&
filename)
constructor. In
general, if the library is based on a single text file, the auto-detection
mechanism adequately provides a simple way for users of to transparently use
various types of library. More complicated types of library, such as those
based on a database, or on multiple files, fit less well with the
auto-detection mechanism, and some alternative mechanism is often better.