ppap4lmp  0.7.2
py_processor.h
Go to the documentation of this file.
1 
8 #ifndef PYBIND_PROESSOR_H
9 #define PYBIND_PROESSOR_H
10 
11 #include <alias/pybind.h>
12 #include <processors/processor.h>
13 
21 template <class PRO = Processor>
22 class PyProcessor : public PRO {
23  protected:
24  void run_impl(
25  const int index) override
26  {
27  PYBIND11_OVERLOAD_PURE(
28  void, PRO, run_impl, index);
29  }
30  void use_generator_at(const int i) override
31  {
32  PYBIND11_OVERLOAD(
33  void, PRO, use_generator_at, i);
34  }
35  void finish_using_generator_at(const int i) override
36  {
37  PYBIND11_OVERLOAD(
38  void, PRO, finish_using_generator_at, i);
39  }
40  public:
41  using PRO::PRO;
42  void prepare() override
43  {
44  PYBIND11_OVERLOAD(
45  void, PRO, prepare, );
46  }
47  void finish() override
48  {
49  PYBIND11_OVERLOAD(
50  void, PRO, finish, );
51  }
52  bool run() override
53  {
54  PYBIND11_OVERLOAD(
55  bool, PRO, run, );
56  }
57 };
58 
60 namespace pybind
61 {
70  void py_processor(py::module &m);
71 }
72 
73 #endif
Trampoline class to bind Processor class and its subclasses to Python.
Definition: py_processor.h:22
Namespace for functions to bind C++ classes to Python.
This file has a definition of Processor class, where an analysis process is programmed.
void py_processor(py::module &m)
Bind Processor class to Python.
This file includes pybind11 and defines an alias for the namespace pybind11.