25 #ifndef NVNEURAL_DYNAMICPLUGINLOADER_H
26 #define NVNEURAL_DYNAMICPLUGINLOADER_H
68 LoadedPlugin(
IPlugin* pPlugin_,
void* pLibrary_,
const std::string& path_);
72 LoadedPlugin(
const LoadedPlugin& copyFrom) =
delete;
73 LoadedPlugin& operator =(
const LoadedPlugin& copyFrom) =
delete;
76 LoadedPlugin(LoadedPlugin&& moveFrom);
77 LoadedPlugin& operator =(LoadedPlugin&& moveFrom);
79 std::vector<LoadedPlugin> m_loadedPlugins;
81 bool m_allowIncompatiblePlugins =
false;
82 bool m_warnedAboutIncompatiblePlugins =
false;
84 bool isIncompatiblePlugin(
const IPlugin* pPlugin)
const noexcept;
86 #if defined(_WIN32) || defined(DOXYGEN)
91 NeuralResult loadDynamicLibrary(
const std::u16string& libraryPath) noexcept;
Common helper classes and template function implementations.
NeuralResult
NeuralResult is a generic success/failure result type similar to COM HRESULT.
Definition: CoreTypes.h:275
Interfaces and functions that are implemented by plugin libraries.
Standard implementation for IRefObject-derived objects.
Standard IPluginLoader implementation that uses dynamic linking (dlopen/LoadLibrary) to find NvNeural...
Definition: DynamicPluginLoader.h:38
NeuralResult loadDirectory(const char *pPathname, std::uint32_t *pNumberLoadedOut) noexcept
Loads all compatible plugins from the provided directory.
Definition: DynamicPluginLoader_Linux.cpp:129
std::size_t pluginCount() const noexcept
Returns the number of plugins tracked by this object.
Definition: DynamicPluginLoader_Common.cpp:78
NeuralResult loadLibrary(const char *pFilename, IPlugin **ppPluginOut) noexcept
Loads a plugin from a specific shared library file.
Definition: DynamicPluginLoader_Linux.cpp:47
NeuralResult releasePlugin(IPlugin *pPlugin) noexcept
Releases the internal reference to a given plugin object and frees the library.
Definition: DynamicPluginLoader_Common.cpp:56
NeuralResult releaseAllPlugins() noexcept
Releases all plugins tracked by this object.
Definition: DynamicPluginLoader_Common.cpp:72
IPlugin * getPluginByIndex(std::size_t pluginIndex) const noexcept
Returns a particular IPlugin object by index, or nullptr if the index is out of range.
Definition: DynamicPluginLoader_Common.cpp:83
NeuralResult getPluginPath(const IPlugin *pPlugin, const char **ppPluginPathOut) const noexcept
Returns the file path to a particular plugin object.
Definition: DynamicPluginLoader_Common.cpp:93
void allowIncompatiblePlugins() noexcept
Override the current compatibility checks to allow the loading of out-of-date plugins.
Definition: DynamicPluginLoader_Common.cpp:109
IPlugin is the general factory interface used by NvNeural's plugin system.
Definition: PluginTypes.h:41
Parameterized base class implementing common IRefObject operations.
Definition: RefObject.h:336