DART  6.7.3
dart::common::detail::SharedLibraryManager Class Referencefinal

#include <SharedLibraryManager.hpp>

Inheritance diagram for dart::common::detail::SharedLibraryManager:
dart::common::Singleton< SharedLibraryManager >

Public Member Functions

std::shared_ptr< SharedLibraryload (const boost::filesystem::path &path)
 Loads the shared library with the specified path. More...
 

Static Public Member Functions

static SharedLibraryManagergetSingleton (Args... _args)
 Returns reference of the singleton. More...
 
static SharedLibraryManagergetSingletonPtr (Args... _args)
 Returns pointer of the singleton. More...
 

Protected Attributes

std::unordered_map< boost::filesystem::path, std::weak_ptr< SharedLibrary > > mLibraries
 Map from library path to the library instances. More...
 

Static Private Attributes

static SharedLibraryManagermInstance
 Singleton instance. More...
 

Friends

class Singleton< SharedLibraryManager >
 

Member Function Documentation

◆ getSingleton()

SharedLibraryManager & dart::common::Singleton< SharedLibraryManager >::getSingleton ( Args...  _args)
staticinherited

Returns reference of the singleton.

◆ getSingletonPtr()

SharedLibraryManager * dart::common::Singleton< SharedLibraryManager >::getSingletonPtr ( Args...  _args)
staticinherited

Returns pointer of the singleton.

◆ load()

std::shared_ptr< SharedLibrary > dart::common::detail::SharedLibraryManager::load ( const boost::filesystem::path &  path)

Loads the shared library with the specified path.

Parameters
[in]pathThe path to the shared library. If the path doesn't include the extension, this function will use the best guess depending on the OS (e.g., '.so' for Linux, '.dylib' for macOS, and '.dll' for Windows).
Returns
Pointer to the shared library upon success. Otherwise, returns nullptr.

Friends And Related Function Documentation

◆ Singleton< SharedLibraryManager >

friend class Singleton< SharedLibraryManager >
friend

Member Data Documentation

◆ mInstance

SharedLibraryManager * dart::common::Singleton< SharedLibraryManager >::mInstance
staticprivateinherited

Singleton instance.

◆ mLibraries

std::unordered_map< boost::filesystem::path, std::weak_ptr<SharedLibrary> > dart::common::detail::SharedLibraryManager::mLibraries
protected

Map from library path to the library instances.