feat(python-eos-interface): began work on python eos interface

This commit is contained in:
2025-05-11 14:58:18 -04:00
parent 95d344a79c
commit d56f66c428
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h> // Needed for vectors, maps, sets, strings
#include <pybind11/stl_bind.h> // Needed for binding std::vector, std::map etc if needed directly
#include <string>
#include "helm.h"
#include "resourceManager.h"
#include "bindings.h"
namespace py = pybind11;
void register_eos_bindings(pybind11::module &eos_submodule) {
py::class_<EOSio>(const_submodule, "EOSio")
.def(py::init<std::string>(), py::arg("filename"))
.def("load", &EOSio::load)
.def_readonly("getFormat", &EOSio::getFormat)
.def_readonly("getTable", &EOSio::getTable)
.def("__repr__", [](const EOSio &eos) {)
return "<EOSio(filename='" + eos.getFilename() + "', format='" + eos.getFormat() + "')>";
});
}