PPL Logo

CkDll Class Reference

Abstraction for a DLL (Dynamically Linked Library) that is linked in to the running program. More...

#include <ckdll.h>

Collaboration diagram for CkDll:

Collaboration graph
[legend]

Public Member Functions

 CkDll (const char *sharedLibraryName)
 Open this DLL and link it into this program.
int valid (void) const
 Return true if the link-in was successful.
void * lookup (const char *symbolName)
 Resolve this symbol in the DLL, and return its pointer.
 ~CkDll ()
 Remove this DLL from the program.

Static Public Attributes

static const char * extension = 0
 Filename extension used by DLLs on this machine (e.g., ".dll" or ".so").

Private Attributes

void * handle

Detailed Description

Abstraction for a DLL (Dynamically Linked Library) that is linked in to the running program.

Definition at line 13 of file ckdll.h.


Constructor & Destructor Documentation

CkDll::CkDll ( const char *  sharedLibraryName  ) 

Open this DLL and link it into this program.

Definition at line 33 of file ckdll.C.

References handle.

CkDll::~CkDll (  ) 

Remove this DLL from the program.

This invalidates any pointers created with lookup-- any references to this dll's function pointers will crash the program (or worse).

Definition at line 39 of file ckdll.C.


Member Function Documentation

int CkDll::valid ( void   )  const [inline]

Return true if the link-in was successful.

Definition at line 22 of file ckdll.h.

References handle.

void * CkDll::lookup ( const char *  symbolName  ) 

Resolve this symbol in the DLL, and return its pointer.

If the symbol is a function, you can cast this to a function pointer and call it. If that symbol name is not found, returns NULL.

Definition at line 36 of file ckdll.C.

Referenced by CkCppInterpreter::lookup().

Here is the caller graph for this function:


Field Documentation

void* CkDll::handle [private]

Definition at line 14 of file ckdll.h.

Referenced by CkDll(), and valid().

const char * CkDll::extension = 0 [static]

Filename extension used by DLLs on this machine (e.g., ".dll" or ".so").

Definition at line 41 of file ckdll.h.

Referenced by CkCppInterpreter::CkCppInterpreter().


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

Generated on Mon Sep 21 08:19:57 2020 for Charm++ by  doxygen 1.5.5