HAL
plugin_interfaces.cpp
Go to the documentation of this file.
2 
3 namespace hal
4 {
5 
7  {
8  public:
10 
11  std::string get_name() const override
12  {
13  PYBIND11_OVERRIDE_PURE(std::string, /* Return type */
14  BasePluginInterface, /* Parent class */
15  get_name); /* Name of function in C++ (must match Python name) */
16  }
17 
18  std::string get_version() const override
19  {
20  PYBIND11_OVERRIDE_PURE(std::string, /* Return type */
21  BasePluginInterface, /* Parent class */
22  get_version); /* Name of function in C++ (must match Python name) */
23  }
24 
25  std::string get_description() const override
26  {
27  PYBIND11_OVERRIDE(std::string, /* Return type */
28  BasePluginInterface, /* Parent class */
29  get_description); /* Name of function in C++ (must match Python name) */
30  }
31 
32  std::set<std::string> get_dependencies() const override
33  {
34  PYBIND11_OVERRIDE(std::set<std::string>, /* Return type */
35  BasePluginInterface, /* Parent class */
36  get_dependencies); /* Name of function in C++ (must match Python name) */
37  }
38  };
39 
41  {
42  py::class_<BasePluginInterface, RawPtrWrapper<BasePluginInterface>, PyBasePluginInterface> py_base_plugin_interface(m, "BasePluginInterface");
43 
44  py_base_plugin_interface.def_property_readonly("name", &BasePluginInterface::get_name, R"(
45  The name of the plugin.
46 
47  :type: str
48  )");
49 
50  py_base_plugin_interface.def("get_name", &BasePluginInterface::get_name, R"(
51  Get the name of the plugin.
52 
53  :returns: The name of the plugin.
54  :rtype: str
55  )");
56 
57  py_base_plugin_interface.def_property_readonly("version", &BasePluginInterface::get_version, R"(
58  The version of the plugin.
59 
60  :type: str
61  )");
62 
63  py_base_plugin_interface.def("get_version", &BasePluginInterface::get_version, R"(
64  Get the version of the plugin.
65 
66  :returns: The version of the plugin.
67  :rtype: str
68  )");
69 
70  py_base_plugin_interface.def_property_readonly("description", &BasePluginInterface::get_description, R"(
71  The description of the plugin.
72 
73  :type: str
74  )");
75 
76  py_base_plugin_interface.def("get_description", &BasePluginInterface::get_description, R"(
77  Get the description of the plugin.
78 
79  :returns: The description of the plugin.
80  :rtype: str
81  )");
82 
83  py_base_plugin_interface.def_property_readonly("dependencies", &BasePluginInterface::get_dependencies, R"(
84  The plugins that this plugin depends on.
85 
86  :type: set[str]
87  )");
88 
89  py_base_plugin_interface.def("get_dependencies", &BasePluginInterface::get_dependencies, R"(
90  Get all dependencies of this plugin.
91 
92  :returns: The plugins that this plugin depends on.
93  :rtype: set[str]
94  )");
95  }
96 } // namespace hal
virtual std::set< std::string > get_dependencies() const
virtual std::string get_name() const =0
virtual std::string get_description() const
virtual std::string get_version() const =0
std::set< std::string > get_dependencies() const override
std::string get_name() const override
std::string get_description() const override
std::string get_version() const override
void plugin_interfaces_init(py::module &m)
const Module * module(const Gate *g, const NodeBoxes &boxes)