Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoDynamicLibManager Class Reference

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

#include <Inventor/sys/SoDynamicLibManager.h>

Static Public Member Functions

static SbBool loadLibrary (const SbString &libName, const bool reportError=true)
 Loads a dynamic library using the specified libName.
 
static SbBool unloadLibrary (const SbString &libName)
 Unloads a dynamic library previously loaded by the above method.
 
static void unloadAllLibraries ()
 Unloads all dynamic libraries previously loaded by the class.
 
static SbBool isLibraryLoaded (const SbString &libName)
 Inquires if the given library is already loaded by this class.
 
static void * lookUpFunction (const SbString &libName, const SbString &funcName, const bool reportError=true)
 Inquires if the specified function is available in the specified library.
 
static int getLoadedLibraryList (SbString *&libList)
 Allocates an array and fills it with the names of the libraries loaded by this class.
 
static SbString getLibrarySuffix ()
 Returns the dynamic library suffix used on the current operating system.
 
static SbString getLibraryFromSymbol (void *symbol)
 Returns the full path of the library that contains the given 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.

Definition at line 42 of file SoDynamicLibManager.h.

Member Function Documentation

◆ getLibraryFromSymbol()

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.

◆ getLibrarySuffix()

static SbString SoDynamicLibManager::getLibrarySuffix ( )
static

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

◆ getLoadedLibraryList()

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.

◆ isLibraryLoaded()

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

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

◆ loadLibrary()

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).

◆ lookUpFunction()

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.

◆ unloadAllLibraries()

static void SoDynamicLibManager::unloadAllLibraries ( )
static

Unloads all dynamic libraries previously loaded by the class.

◆ unloadLibrary()

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: