irccd
3.0.3
|
Implementation for searching Javascript plugins. More...
#include <plugin.hpp>
Public Types | |
using | modules = std::vector< std::unique_ptr< api > > |
The list of Javascript API modules. More... | |
Public Member Functions | |
plugin_loader (daemon::bot &bot, std::vector< std::string > directories={}, std::vector< std::string > extensions={".js"}) noexcept | |
~plugin_loader () noexcept | |
auto | get_modules () const noexcept -> const modules & |
auto | get_modules () noexcept -> modules & |
auto | open (std::string_view id, std::string_view file) -> std::shared_ptr< daemon::plugin > |
![]() | |
plugin_loader (std::vector< std::string > directories={}, std::vector< std::string > extensions={}) noexcept | |
virtual auto | is_supported (std::string_view path) noexcept -> bool |
virtual auto | find (std::string_view id) -> std::shared_ptr< plugin > |
Implementation for searching Javascript plugins.
using irccd::js::plugin_loader::modules = std::vector<std::unique_ptr<api> > |
The list of Javascript API modules.
|
noexcept |
Constructor.
bot | the irccd instance |
directories | directories to search |
extensions | extensions to search |
|
virtualnoexcept |
Destructor defaulted.
Reimplemented from irccd::daemon::plugin_loader.
|
noexcept |
Get the list of modules.
|
noexcept |
Overloaded function.
|
virtual |
Try to open the plugin specified by path.
The implementation must test if the plugin is suitable for opening, by testing extension for example.
id | the plugin identifier |
file | the file path |
plugin_error | on errors |
Implements irccd::daemon::plugin_loader.