|
|
@ -4,24 +4,11 @@ tstylesheet { |
|
|
|
template "module" { |
|
|
|
document("py_module.cc", "text") { |
|
|
|
|| |
|
|
|
#include <string> |
|
|
|
#include <iostream> |
|
|
|
#include <pybind11/pybind11.h> |
|
|
|
#include <pybind11/detail/common.h> |
|
|
|
#include "synth_shed.h" |
|
|
|
|
|
|
|
using namespace std; |
|
|
|
namespace py = pybind11; |
|
|
|
|
|
|
|
PYBIND11_MODULE(«@name», m) { |
|
|
|
|
|
|
|
`` apply "method" |
|
|
|
|
|
|
|
`` apply "struct" |
|
|
|
|
|
|
|
`` apply "enum" |
|
|
|
|
|
|
|
} |
|
|
|
|| |
|
|
|
} |
|
|
|
} |
|
|
@ -34,7 +21,7 @@ tstylesheet { |
|
|
|
|
|
|
|
template "struct" { |
|
|
|
|| |
|
|
|
py::class_<«@name»>(m, "«@name»") |
|
|
|
pybind11::class_<«@name»>(m, "«@name»") |
|
|
|
``apply "field" |
|
|
|
; |
|
|
|
|
|
|
@ -49,7 +36,7 @@ tstylesheet { |
|
|
|
|
|
|
|
template "enum" { |
|
|
|
|| |
|
|
|
py::enum_<::«@name»>(m, "«@name»") |
|
|
|
pybind11::enum_<::«@name»>(m, "«@name»") |
|
|
|
``apply item |
|
|
|
; |
|
|
|
|
|
|
|