Next: , Previous: library derivation, Up: The library class



5.1.2.2 Constructors
— Constructor: library::library (void);

Constructs an empty (and useless) library object.

— Constructor: library::library (const string& filename);

This constructor attempts to automatically detect what type of library filename is, and create an appropriate library object to interpret it. For a library type to be correctly auto-detected, that type must be registered see Initialisation for libraries.

After constructing a library, the library::good function can be used to see whether auto-detection succeeded.

In addition to this constructor, which auto-detects the type of library, it is also possible to open a library of a fixed type, by constructing an object for a specific library type. See Built-in library types.