# FoundationClasses
TKernel
OSD

# OSD_SharedLibrary Class Reference

Interface to dynamic library loader.
.

`#include <OSD_SharedLibrary.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | OSD_SharedLibrary ()
| Creates a SharedLibrary object with name NULL. .
Standard_EXPORT | OSD_SharedLibrary (const Standard_CString aFilename)
| Creates a SharedLibrary object with name aFilename. .
Standard_EXPORT void | SetName (const Standard_CString aName)
| Sets a name associated to the shared object. .
Standard_EXPORT Standard_CString | Name () const
| Returns the name associated to the shared object. .
Standard_EXPORT Standard_Boolean | DlOpen (const OSD_LoadMode Mode)

The DlOpen method provides an interface to the
dynamic library loader to allow shared libraries
to be loaded and called at runtime. The DlOpen
function attempts to load Filename, in the address
space of the process, resolving symbols as appropriate.
Any libraries that Filename depends upon are also loaded.
If MODE is RTLD_LAZY, then the runtime loader
does symbol resolution only as needed.
Typically, this means that the first call to a function
in the newly loaded library will cause the resolution of
the address of that function to occur.
If Mode is RTLD_NOW, then the runtime loader must do all
symbol binding during the DlOpen call.
The DlOpen method returns a handle that is used by DlSym
or DlClose.
If there is an error, Standard_False is returned,
Standard_True otherwise.
If a NULL Filename is specified, DlOpen returns a handle
for the main executable, which allows access to dynamic
symbols in the running program.
.

Standard_EXPORT OSD_Function | DlSymb (const Standard_CString Name) const
| The dlsym function returns the address of the symbol name found in the shared library. If the symbol is not found, a NULL pointer is returned. .
Standard_EXPORT void | DlClose () const
| Deallocates the address space for the library corresponding to the shared object. If any user function continues to call a symbol resolved in the address space of a library that has been since been deallocated by DlClose, the results are undefined. .
Standard_EXPORT Standard_CString | DlError () const
| The dlerror function returns a string describing the last error that occurred from a call to DlOpen, DlClose or DlSym. .
Standard_EXPORT void | Destroy ()
| Frees memory allocated. .
| ~OSD_SharedLibrary ()

## Private Attributes

Standard_Address | myHandle
Standard_PCharacter | myName

## Constructor & Destructor Documentation

Standard_EXPORT OSD_SharedLibrary::OSD_SharedLibrary | ( |  | ) |

Standard_EXPORT OSD_SharedLibrary::OSD_SharedLibrary | ( | const Standard_CString | aFilename | ) |

OSD_SharedLibrary::~OSD_SharedLibrary | ( |  | ) | `[inline]`

## Member Function Documentation

Standard_EXPORT void OSD_SharedLibrary::Destroy | ( |  | ) |

Standard_EXPORT void OSD_SharedLibrary::DlClose | ( |  | ) | const

Standard_EXPORT Standard_CString OSD_SharedLibrary::DlError | ( |  | ) | const

Standard_EXPORT Standard_Boolean OSD_SharedLibrary::DlOpen | ( | const OSD_LoadMode | Mode | ) |

Standard_EXPORT OSD_Function OSD_SharedLibrary::DlSymb | ( | const Standard_CString | Name | ) | const

Standard_EXPORT Standard_CString OSD_SharedLibrary::Name | ( |  | ) | const

void OSD_SharedLibrary::operator delete | ( | void * | anAddress | ) | `[inline]`

void* OSD_SharedLibrary::operator new | ( | size_t | size | ) | `[inline]`

void* OSD_SharedLibrary::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_EXPORT void OSD_SharedLibrary::SetName | ( | const Standard_CString | aName | ) |

## Field Documentation

Standard_Address OSD_SharedLibrary::myHandle `[private]`

Standard_PCharacter OSD_SharedLibrary::myName `[private]`

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

- OSD_SharedLibrary.hxx