Skip to content

Commit

Permalink
Fix Python bindings without adding new functionality yet
Browse files Browse the repository at this point in the history
Overload resolution
  • Loading branch information
franzpoeschel committed Aug 2, 2023
1 parent ac5acf3 commit 9378126
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions src/binding/python/Series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* If not, see <http://www.gnu.org/licenses/>.
*/

#include <pybind11/detail/common.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

Expand Down Expand Up @@ -283,9 +284,23 @@ this method.
&Series::setOpenPMDextension)
.def_property("base_path", &Series::basePath, &Series::setBasePath)
.def_property(
"meshes_path", &Series::meshesPath, &Series::setMeshesPath)
"meshes_path",
&Series::meshesPath,
py::overload_cast<std::string const &>(&Series::setMeshesPath))
.def_property(
"particles_path", &Series::particlesPath, &Series::setParticlesPath)
"particles_path",
&Series::particlesPath,
py::overload_cast<std::string const &>(&Series::setParticlesPath))
.def_property(
"meshes_paths",
&Series::meshesPath,
py::overload_cast<std::vector<std::string> const &>(
&Series::setMeshesPath))
.def_property(
"particles_paths",
&Series::particlesPath,
py::overload_cast<std::vector<std::string> const &>(
&Series::setParticlesPath))
.def_property("author", &Series::author, &Series::setAuthor)
.def_property(
"machine",
Expand Down Expand Up @@ -327,8 +342,20 @@ this method.
.def("set_openPMD", &Series::setOpenPMD)
.def("set_openPMD_extension", &Series::setOpenPMDextension)
.def("set_base_path", &Series::setBasePath)
.def("set_meshes_path", &Series::setMeshesPath)
.def("set_particles_path", &Series::setParticlesPath)
.def(
"set_meshes_path",
py::overload_cast<std::string const &>(&Series::setMeshesPath))
.def(
"set_meshes_path",
py::overload_cast<std::vector<std::string> const &>(
&Series::setMeshesPath))
.def(
"set_particles_path",
py::overload_cast<std::vector<std::string> const &>(
&Series::setParticlesPath))
.def(
"set_particles_path",
py::overload_cast<std::string const &>(&Series::setParticlesPath))
.def("set_author", &Series::setAuthor)
.def("set_date", &Series::setDate)
.def("set_iteration_encoding", &Series::setIterationEncoding)
Expand Down

0 comments on commit 9378126

Please sign in to comment.