library_base class
The library_base class provides the interface that library
implementations must implement to create iterators on a library.  It also has
virtual functions can be overriden to provide more efficient ways to search
and list libraries.
This should be overriden to construct a
library_base::const_iteratorpointing to the start of the library.
This returns a default constructed
library_base::const_iteratorrepresenting one past the end of the library.
This function should be overriden to return true if a valid library is currently loaded and false otherwise.
The default implementation of
loaditerates through the library searching for an entry with the correct name. When comparing method names, it does so in a case-insensitive manner. If stage is non-zero,loadrequires that the method is on that number of bells.If no such method is found, if exceptions are enabled, an exception of class
library_base::invalid_namewill be thrown; otherwise, the method returned will be an empty method with the name "Not Found".Library implementations may wish to override this if there is a more efficient way to locate the method.
The default implementations of
dirandmdiriterate through the library, pushing each name (in the case ofdir) or method (in the case ofmdir) onto result. The return value is the number of values pushed ontoresult.Library implementations may wish to override this if there is a more efficient way to locate the method.
These functions are for writing to method libraries. This functionality is still experimental.