LibraryLoader#

Fully qualified name: isaacsim::core::includes::LibraryLoader

class LibraryLoader#

Single dynamic library loader.

Handles loading, symbol resolution, and unloading of a single dynamic library. Provides platform-independent interface for library operations with automatic cleanup on destruction.

Public Functions

inline LibraryLoader(
std::string library,
std::string prefix = "",
bool test = false,
)#

Constructor for LibraryLoader.

Attempts to load the specified library with platform-specific naming conventions. On Windows, appends .dll, on other platforms prepends lib and appends .so

Parameters:
  • library[in] Base name of the library to load

  • prefix[in] Optional prefix to add to the library name

  • test[in] If true, suppresses error messages on load failure

inline ~LibraryLoader()#

Destructor.

Ensures proper cleanup by unloading the library if it was loaded

template<typename T>
inline T getSymbol(std::string symbol)#

Gets a symbol from the loaded library.

Template function to retrieve a symbol of any type from the library

Template Parameters:

T – Type of the symbol to retrieve

Parameters:

symbol[in] Name of the symbol to retrieve

Returns:

T The retrieved symbol cast to type T

template<typename T>
inline T callSymbol(std::string symbol)#

Calls a symbol function with no arguments.

Template function to call a function symbol that takes no arguments

Template Parameters:

T – Return type of the function

Parameters:

symbol[in] Name of the function to call

Returns:

T The return value from the function call, or nullptr if symbol not found

template<typename T, typename ...Arguments>
inline T callSymbolWithArg(
std::string symbol,
Arguments... args,
)#

Calls a symbol function with arguments.

Template function to call a function symbol with variable number of arguments

Template Parameters:
  • T – Return type of the function

  • Arguments – Types of the function arguments

Parameters:
  • symbol[in] Name of the function to call

  • args[in] Arguments to pass to the function

Returns:

T The return value from the function call

inline bool isValid()#

Checks if the library is loaded.

Returns:

bool True if the library was loaded successfully

Public Members

std::string loadedLibraryFile#

Path to the loaded library file.

carb::extras::LibraryHandle loadedLibrary = carb::extras::kInvalidLibraryHandle#

Handle to the loaded library.