lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::Dl Class Reference

Owns one dynamic library handle opened with dlopen(). More...

#include <Dl.hh>

Public Member Functions

 Dl ()
 Construct with no library open.
 
 ~Dl ()
 Call close().
 
int open (const std::string &filename, int flag)
 Open filename with dlopen() and flag; returns 0, or -1 (logged at debug level) if a library is already open or dlopen() fails.
 
void close ()
 Close the library with dlclose() if one is open.
 
void * loadSymbol (const std::string &name) const
 Return the address of symbol name from the open library, or nullptr (logged at debug level) if dlsym() reports an error.
 

Detailed Description

Owns one dynamic library handle opened with dlopen().

Constructor & Destructor Documentation

◆ Dl()

Pds::Dl::Dl ( )
inline

Construct with no library open.

◆ ~Dl()

Pds::Dl::~Dl ( )
inline

Call close().

Member Function Documentation

◆ close()

void Pds::Dl::close ( )

Close the library with dlclose() if one is open.

◆ loadSymbol()

void * Pds::Dl::loadSymbol ( const std::string &  name) const

Return the address of symbol name from the open library, or nullptr (logged at debug level) if dlsym() reports an error.

◆ open()

int Pds::Dl::open ( const std::string &  filename,
int  flag 
)

Open filename with dlopen() and flag; returns 0, or -1 (logged at debug level) if a library is already open or dlopen() fails.


The documentation for this class was generated from the following file: