aboutsummaryrefslogtreecommitdiff
path: root/python/include/trygvis/kicad/GenerateHeaderPy.h
diff options
context:
space:
mode:
Diffstat (limited to 'python/include/trygvis/kicad/GenerateHeaderPy.h')
-rw-r--r--python/include/trygvis/kicad/GenerateHeaderPy.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/python/include/trygvis/kicad/GenerateHeaderPy.h b/python/include/trygvis/kicad/GenerateHeaderPy.h
new file mode 100644
index 0000000..893b7ed
--- /dev/null
+++ b/python/include/trygvis/kicad/GenerateHeaderPy.h
@@ -0,0 +1,45 @@
+#ifndef KICAD_UTILS_GENERATEHEADEPY_H
+#define KICAD_UTILS_GENERATEHEADEPY_H
+
+#include "trygvis/kicad.h"
+#include "pybind11/pybind11.h"
+#include <memory>
+#include <sstream>
+
+namespace trygvis {
+namespace kicad {
+namespace python {
+
+namespace py = pybind11;
+
+using nl = trygvis::kicad::netlist::netlist;
+
+class GenerateHeaderPy {
+public:
+ GenerateHeaderPy(const std::string &ref, nl *netlist);
+
+ virtual ~GenerateHeaderPy();
+
+ std::string ref();
+
+ nl *netlist();
+
+ std::string str();
+
+ void print(const std::string &str);
+
+ void println(const std::string &str);
+
+private:
+ std::string ref_;
+
+ nl *netlist_;
+
+ std::stringstream buf_;
+};
+
+} // namespace python
+} // namespace kicad
+} // namespace trygvis
+
+#endif