|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Loads a shared library and creates one object of type T with a C function exported by it; the object is deleted when the factory is destroyed or reused. More...
#include <utilities.hh>
Public Member Functions | |
| Factory () | |
| Construct with no object. | |
| ~Factory () | |
| Delete the object if one was created. | |
| T * | create (const std::string &soname, const std::string &symbol) |
| Delete any previous object, close any open library, open soname and call its function symbol to create a new object. | |
Loads a shared library and creates one object of type T with a C function exported by it; the object is deleted when the factory is destroyed or reused.
|
inline |
Construct with no object.
|
inline |
Delete the object if one was created.
| T * Pds::Trg::Factory< T >::create | ( | const std::string & | soname, |
| const std::string & | symbol | ||
| ) |
Delete any previous object, close any open library, open soname and call its function symbol to create a new object.
Returns the object, or nullptr if the library, the symbol or the creation fails.