xrootd
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdOucPinLoader Class Reference

#include <XrdOucPinLoader.hh>

Collaboration diagram for XrdOucPinLoader:
Collaboration graph
[legend]

Public Member Functions

XrdSysPluginExport ()
 
void Global (bool glbl)
 
const char * LastMsg ()
 
const char * Path ()
 
void * Resolve (const char *symbl, int mcnt=1)
 
void Unload (bool dodel=false)
 
 XrdOucPinLoader (XrdSysError *errP, XrdVersionInfo *vInfo, const char *drctv, const char *plib)
 
 XrdOucPinLoader (char *eBuff, int eBlen, XrdVersionInfo *vInfo, const char *drctv, const char *plib)
 
 XrdOucPinLoader (XrdVersionInfo *vInfo, const char *drctv, const char *plib)
 
 ~XrdOucPinLoader ()
 

Private Member Functions

void Inform (const char *txt1, const char *txt2=0, const char *txt3=0, const char *txt4=0, const char *txt5=0)
 
void Init (const char *drctv, const char *plib)
 
bool LoadLib (int mcnt)
 

Private Attributes

XrdSysErroreDest
 
XrdSysPluginpiP
 
XrdVersionInfo * viP
 
const char * dName
 
char * theLib
 
char * altLib
 
char * errBP
 
int errBL
 
bool global
 
bool frBuff
 
bool badLib
 

Constructor & Destructor Documentation

◆ XrdOucPinLoader() [1/3]

XrdOucPinLoader::XrdOucPinLoader ( XrdSysError errP,
XrdVersionInfo *  vInfo,
const char *  drctv,
const char *  plib 
)

Constructor #1

Parameters
errPPointer to the message routing object.
vInfoPointer to the version information of the caller. If the pointer is nil, no version checking occurs.
drctvPointer to the directive that initiated the load. The text is used in error messages to relate the directive to the error. E.g. "ofs.osslib" -> "Unable to load ofs.osslib plugin...."
plibPointer to the shared library path that contains the plugin.

◆ XrdOucPinLoader() [2/3]

XrdOucPinLoader::XrdOucPinLoader ( char *  eBuff,
int  eBlen,
XrdVersionInfo *  vInfo,
const char *  drctv,
const char *  plib 
)

Constructor #2

Parameters
eBuffPointer to a buffer to receive messages.
eBlenLength of the buffer.
vInfoPointer to the version information of the caller. If the pointer is nil, no version checking occurs.
drctvPointer to the directive that initiated the load (see above).
plibPointer to the shared library path that contains the plugin.

◆ XrdOucPinLoader() [3/3]

XrdOucPinLoader::XrdOucPinLoader ( XrdVersionInfo *  vInfo,
const char *  drctv,
const char *  plib 
)

Constructor #3 (An internal message buffer is allocated. You can get the message, if any, using LastMsg())

Parameters
vInfoPointer to the version information of the caller. If the pointer is nil, no version checking occurs.
drctvPointer to the directive that initiated the load (see above).
plibPointer to the shared library path that contains the plugin.

◆ ~XrdOucPinLoader()

XrdOucPinLoader::~XrdOucPinLoader ( )

Destructor

Upon deletion, if the plugin was successfully loaded, it is persisted.

Member Function Documentation

◆ Export()

XrdSysPlugin * XrdOucPinLoader::Export ( )
inline

Export the plugin object for manual management.

Returns
!0 Pointer to the plugin object. It is disassociated from this object and must be manually managed.
=0 Either no plugin object has been created or it has been exported.

References piP.

◆ Global()

void XrdOucPinLoader::Global ( bool  glbl)
inline

Set export range of symbols in the plugin.

Parameters
glblwhen true then the symbols defined in the plug-in shared library are made available for symbol resolution of subsequently loaded libraries.

References global.

◆ Inform()

void XrdOucPinLoader::Inform ( const char *  txt1,
const char *  txt2 = 0,
const char *  txt3 = 0,
const char *  txt4 = 0,
const char *  txt5 = 0 
)
private

◆ Init()

void XrdOucPinLoader::Init ( const char *  drctv,
const char *  plib 
)
private

◆ LastMsg()

const char * XrdOucPinLoader::LastMsg ( )
inline

Get the last message placed in the buffer.

Returns
Pointer to the last message. If there is no buffer or no message exists, a null string is returned.

References errBP.

◆ LoadLib()

bool XrdOucPinLoader::LoadLib ( int  mcnt)
private

◆ Path()

const char * XrdOucPinLoader::Path ( )
inline

Get the actual path that was or will tried for loading.

Returns
Pointer to the path that was loaded if called after Resolve() or the path that will be attempted to be loaded. If the path is invalid, a single question mark is returned.

References theLib.

◆ Resolve()

void * XrdOucPinLoader::Resolve ( const char *  symbl,
int  mcnt = 1 
)

Resolve a desired symbol from the plugin image.

Parameters
symblPointer to the name of the symbol to resolve.
mcntMaximum number of version messages to be displayed.
Returns
!0 The address of the symbol.
=0 The symbol could not be resolved.

◆ Unload()

void XrdOucPinLoader::Unload ( bool  dodel = false)

Unload any plugin that may be associated with this object. The plugin image will not be persisted when this object is deleted.

Parameters
dodelWhen true, the object is deleted (this only works if it is created via new). Otherwise, plugin is only unloaded.

Referenced by XrdCl::PlugInManager::FactoryHelper::~FactoryHelper().

Member Data Documentation

◆ altLib

char* XrdOucPinLoader::altLib
private

◆ badLib

bool XrdOucPinLoader::badLib
private

◆ dName

const char* XrdOucPinLoader::dName
private

◆ eDest

XrdSysError* XrdOucPinLoader::eDest
private

◆ errBL

int XrdOucPinLoader::errBL
private

◆ errBP

char* XrdOucPinLoader::errBP
private

Referenced by LastMsg().

◆ frBuff

bool XrdOucPinLoader::frBuff
private

◆ global

bool XrdOucPinLoader::global
private

Referenced by Global().

◆ piP

XrdSysPlugin* XrdOucPinLoader::piP
private

Referenced by Export().

◆ theLib

char* XrdOucPinLoader::theLib
private

Referenced by Path().

◆ viP

XrdVersionInfo* XrdOucPinLoader::viP
private

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