SoDynamicLibManager Class Reference
[General]

VSG extension Class for managing dynamic libraries. More...

#include <Inventor/sys/SoDynamicLibManager.h>

List of all members.

Classes

struct  SafeLibraryHandle

Static Public Member Functions

static SbBool loadLibrary (const SbString &libName, const bool reportError=true)
static SbBool unloadLibrary (const SbString &libName)
static void unloadAllLibraries ()
static SbBool isLibraryLoaded (const SbString &libName)
static void * lookUpFunction (const SbString &libName, const SbString &funcName, const bool reportError=true)
static int getLoadedLibraryList (SbString *&libList)
static SbString getLibrarySuffix ()
static SbString getLibraryFromSymbol (void *symbol)

Detailed Description

VSG extension Class for managing dynamic libraries.

This class is used to dynamically load/unload dynamic libraries and can be used to inquire if a specified function is available within a specified library.


Member Function Documentation

static SbString SoDynamicLibManager::getLibraryFromSymbol ( void *  symbol  )  [static]

Returns the full path of the library that contains the given symbol.

This function is not available on all platforms and will return an empty string on some Unix systems.

static SbString SoDynamicLibManager::getLibrarySuffix (  )  [static]

Returns the dynamic library suffix used on the current operating system.

static int SoDynamicLibManager::getLoadedLibraryList ( SbString *&  libList  )  [static]

Allocates an array and fills it with the names of the libraries loaded by this class.

Returns the number of elements in the array.

static SbBool SoDynamicLibManager::isLibraryLoaded ( const SbString libName  )  [static]

Inquires if the given library is already loaded by this class.

static SbBool SoDynamicLibManager::loadLibrary ( const SbString libName,
const bool  reportError = true 
) [static]

Loads a dynamic library using the specified libName.

libName can include an absolute or relative path. If no path is supplied, the library will be searched for in the following paths:

  • Windows: The directory where Inventor dll is, the application directory, the current directory, the system directory, the Windows directory, %PATH%, and %OIV_LD_LIBRARY_PATH% (single path).
  • UNIX: $LD_LIBRARY_PATH, $OIV_LD_LIBRARY_PATH (single path).
  • MacOS: $DYLD_LIBRARY_PATH, $OIV_LD_LIBRARY_PATH (single path).
static void* SoDynamicLibManager::lookUpFunction ( const SbString libName,
const SbString funcName,
const bool  reportError = true 
) [static]

Inquires if the specified function is available in the specified library.

Open Inventor will load the specified library if it is not already loaded.

Returns:
This function, or NULL if not found.
static void SoDynamicLibManager::unloadAllLibraries (  )  [static]

Unloads all dynamic libraries previously loaded by the class.

static SbBool SoDynamicLibManager::unloadLibrary ( const SbString libName  )  [static]

Unloads a dynamic library previously loaded by the above method.


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

Open Inventor Toolkit reference manual, generated on 25 Feb 2021
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/