Debian Codegraph @

include/iscriptinterface.h

raw
1 #pragma once
2
3 #include <memory>
4 #include <vector>
5 #include <utility>
6 #include <pybind11/pybind11.h>
7 namespace py = pybind11;
8
9 namespace script
10 {
11
12 class IScriptInterface
13 {
14 public:
15 using Ptr = std::shared_ptr<IScriptInterface>;
16
17 virtual ~IScriptInterface() {}
18
19 /**
20 * This method is called by the Scripting System to let this class
21 * add its objects to the Python context.
22 */
23 virtual void registerInterface(py::module& scope, py::dict& globals) = 0;
24 };
25
26 using NamedInterface = std::pair<std::string, IScriptInterface::Ptr>;
27 using NamedInterfaces = std::vector<NamedInterface>;
28
29 }