fire v0.19.0
Framework for sImulation and Reconstruction of Events
|
used to isolate base templated Factory class More...
Classes | |
class | Factory |
Factory to dynamically create objects derived from a specific prototype class. More... | |
Functions | |
void | loadLibrary (const std::string &libname) |
load a library by name More... | |
used to isolate base templated Factory class
This namespace is used to isolate the templated Factory from where other Factories are defined. There should be nothing else in this namespace in order to avoid potential name conflicts.
void fire::factory::loadLibrary | ( | const std::string & | libname | ) |
load a library by name
Loading a library by name is similar to linking a shared library to an executable; however, it does not include some assumptions about the library naming that some linkers make.
libname needs to include the 'lib' prefix and the '.so' suffix as well as be "findable" by the linker ld. You can make any library "findable" by passing the full path as 'libname' or you can add the directory that the library is in to LD_LIBRARY_PATH.
We maintain a cache of libraries that are already loaded so that the same library is not loaded twice.
Exception | if library failed to load The Exception includes the loader error message to help debug. |
[in] | libname | name of library to load |