irccd
3.0.3
daemon
dynlib_plugin.hpp
1
/*
2
* dynlib_plugin.hpp -- native plugin implementation
3
*
4
* Copyright (c) 2013-2019 David Demelier <markand@malikania.fr>
5
*
6
* Permission to use, copy, modify, and/or distribute this software for any
7
* purpose with or without fee is hereby granted, provided that the above
8
* copyright notice and this permission notice appear in all copies.
9
*
10
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
*/
18
19
#ifndef IRCCD_DAEMON_DYNLIB_PLUGIN_HPP
20
#define IRCCD_DAEMON_DYNLIB_PLUGIN_HPP
21
27
#include <irccd/sysconfig.hpp>
28
29
#define BOOST_DLL_FORCE_ALIAS_INSTANTIATION
30
#include <boost/dll.hpp>
31
32
#include "plugin.hpp"
33
34
namespace
irccd::daemon
{
35
40
class
dynlib_plugin_loader
:
public
plugin_loader
{
41
public
:
47
dynlib_plugin_loader
(std::vector<std::string> directories = {}) noexcept;
48
52
auto
open
(std::string_view
id
, std::string_view file) -> std::shared_ptr<plugin>
override
;
53
};
54
55
}
// !irccd::daemon
56
57
#endif // !IRCCD_DAEMON_DYNLIB_PLUGIN_HPP
irccd::daemon::dynlib_plugin_loader
Implementation for searching native plugins.
Definition:
dynlib_plugin.hpp:40
irccd::daemon::dynlib_plugin_loader::dynlib_plugin_loader
dynlib_plugin_loader(std::vector< std::string > directories={}) noexcept
irccd::daemon::plugin_loader
Abstract interface for searching plugins.
Definition:
plugin.hpp:328
irccd::daemon
Main irccd namespace.
Definition:
bot.hpp:41
irccd::daemon::dynlib_plugin_loader::open
auto open(std::string_view id, std::string_view file) -> std::shared_ptr< plugin > override
Generated by
1.8.17