dart
Public Member Functions | Protected Attributes | Friends | List of all members
dart::common::detail::SharedLibraryManager Class Referencefinal
Inheritance diagram for dart::common::detail::SharedLibraryManager:
Inheritance graph
[legend]
Collaboration diagram for dart::common::detail::SharedLibraryManager:
Collaboration graph
[legend]

Public Member Functions

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

Protected Attributes

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

Friends

class Singleton< SharedLibraryManager >
 

Additional Inherited Members

- Static Public Member Functions inherited from dart::common::Singleton< T >
template<typename... Args>
static T & getSingleton (Args... _args)
 Returns reference of the singleton.
 
template<typename... Args>
static T * getSingletonPtr (Args... _args)
 Returns pointer of the singleton.
 
- Protected Member Functions inherited from dart::common::Singleton< T >
 Singleton ()=default
 Constructor.
 
virtual ~Singleton ()=default
 Destructor.
 

Member Function Documentation

◆ load() [1/2]

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.
Deprecated:
Deprecated in 6.10. Please use load(const std::string&) instead.

◆ load() [2/2]

std::shared_ptr< SharedLibrary > dart::common::detail::SharedLibraryManager::load ( const std::string &  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.

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