|
ASL
|
Class Library allows loading a dynamic/shared library at runtime and import symbols from it (usually functions).
It also allows importing classes exported from a library and instantiating objects with them.
A dynamic library can contain this:
And a program can load it at runtime and instantiate the exported class Cat, with the name "Animal".
The program does not need the declaration of class Cat, only that of the base class Animal.
Classes | |
| class | Library |
| This class represents a dynamically loadable library (a DLL on Windows, a shared library on Linux). More... | |
Macros | |
| #define | ASL_LIB_EXT |
| Extension of dynamic/shared libraries (OS-dependent: "dll", "so" or "dylib") | |
| #define | ASL_LIB_PREFIX |
| Standard prefix of libraries (OS-dependent: "lib" on Unix) | |
| #define | ASL_EXPORT_CLASS(Class) |
Export a class to be instantiated with dynamic runtime loading with Library::create("className"). | |
| #define | ASL_EXPORT_CLASS_AS(Class, Name) |
| Export a class to be instantiated with dynamic runtime loading but giving a specific name for importing. | |
| #define ASL_EXPORT_CLASS | ( | Class | ) |
Export a class to be instantiated with dynamic runtime loading with Library::create("className").
The argument must be an identifier (no "::") and it will be used when importing.
| #define ASL_EXPORT_CLASS_AS | ( | Class, | |
| Name | |||
| ) |
Export a class to be instantiated with dynamic runtime loading but giving a specific name for importing.
The arguments must be identifiers (no "::") and the second will be used when importing.