Line data Source code
1 : /**
2 : * @file
3 : *
4 : * @brief Allows one to load plugins
5 : *
6 : * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
7 : *
8 : */
9 :
10 :
11 : #ifndef TOOLS_MODULES_HPP
12 : #define TOOLS_MODULES_HPP
13 :
14 : #include <keyset.hpp>
15 : #include <plugin.hpp>
16 : #include <pluginspec.hpp>
17 : #include <toolexcept.hpp>
18 :
19 : namespace kdb
20 : {
21 :
22 : namespace tools
23 : {
24 :
25 : /**
26 : * @brief Allows one to load plugins
27 : */
28 0 : class Modules
29 : {
30 : public:
31 : Modules ();
32 : ~Modules ();
33 :
34 : /**
35 : * @deprecated do not use
36 : */
37 : PluginPtr load (std::string const & pluginName);
38 : /**
39 : * @deprecated do not use
40 : */
41 : PluginPtr load (std::string const & pluginName, kdb::KeySet const & config);
42 : /**
43 : * @return a newly created plugin
44 : */
45 : PluginPtr load (PluginSpec const & spec);
46 :
47 : private:
48 : KeySet modules;
49 : };
50 : } // namespace tools
51 : } // namespace kdb
52 :
53 : #endif
|