irccd  3.0.3
test_plugin_loader.hpp
1 /*
2  * test_plugin_loader.hpp -- special plugin loader for unit tests
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_TEST_PLUGIN_LOADER_HPP
20 #define IRCCD_TEST_PLUGIN_LOADER_HPP
21 
27 #include <irccd/daemon/plugin.hpp>
28 
29 namespace irccd::test {
30 
43 public:
47  auto open(std::string_view id, std::string_view file) -> std::shared_ptr<daemon::plugin> override;
48 
52  auto find(std::string_view id) -> std::shared_ptr<daemon::plugin> override;
53 };
54 
55 } // !irccd::test
56 
57 #endif // !IRCCD_TEST_PLUGIN_LOADER_HPP
irccd::test::test_plugin_loader::find
auto find(std::string_view id) -> std::shared_ptr< daemon::plugin > override
irccd::test::test_plugin_loader::open
auto open(std::string_view id, std::string_view file) -> std::shared_ptr< daemon::plugin > override
irccd::daemon::plugin_loader
Abstract interface for searching plugins.
Definition: plugin.hpp:328
irccd::test
Namespace for unit tests.
Definition: broken_plugin.hpp:29
irccd::test::test_plugin_loader
Special plugin loader for unit tests.
Definition: test_plugin_loader.hpp:42