Before the auto-detection of libraries will work, the library
class needs to know which library types it should try when opening a
library. This is done by registering the different library types,
and should be done sometime during program startup. To make this as
simple as possible, each of the built-in library types has a static
member function called registerlib
for this purpose.
#include <ringing/xmllib.h> #include <ringing/cclib.h> xmllib::registerlib(); cclib::registerlib(); // Now we can open XML and Central Council libraries automatically
The order in which library types are registered is the order in which they will be tried when opening a library.