Files
SERiF/src/python/eos/bindings.cpp

24 lines
790 B
C++
Raw Normal View History

#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() + "')>";
});
}