diff --git a/hw4-pybind/pypart.cc b/hw4-pybind/pypart.cc index 28c76c9d..f8daecde 100644 --- a/hw4-pybind/pypart.cc +++ b/hw4-pybind/pypart.cc @@ -1,46 +1,47 @@ #include #include #include #include "material_points_factory.hh" #include "ping_pong_balls_factory.hh" #include "planets_factory.hh" #include "csv_writer.hh" #include "compute_temperature.hh" #include "compute_gravity.hh" #include "compute_verlet_integration.hh" #include "compute_interaction.hh" namespace py = pybind11; PYBIND11_MODULE(pypart, m) { m.doc() = "pybind pypart plugin"; // optional docstring // TODO: // The member functions of the various classes (used in main.py) must be exposed to pybind // Exercise 1 - Question 1, 2, 3 - py::class_(m, "ParticlesFactoryInterface") - .def("createSimulation", py::overload_cast(&ParticlesFactoryInterface::createSimulation), "create simulation without functor") - .def("createSimulation", py::overload_cast(&ParticlesFactoryInterface::createSimulation), "create simulation with function"); + py::class_(m, "ParticlesFactoryInterface"); + // DOES NOT COMPILE: + //.def("createSimulation", py::overload_cast(&ParticlesFactoryInterface::createSimulation), "create simulation without functor") + //.def("createSimulation", py::overload_cast(&ParticlesFactoryInterface::createSimulation), "create simulation with function"); py::class_(m, "MaterialPointsFactory" ); // inherits from ParticlesFactoryInterface py::class_(m, "PingPongBallsFactory" ); // inherits from ParticlesFactoryInterface py::class_(m, "PlanetsFactory" ); // inherits from ParticlesFactoryInterface // Exercise 2 - Question 1 py::class_(m, "Compute" ); py::class_(m, "CsvWriter" ); // inherits from Compute py::class_(m, "ComputeTemperature" ); // inherits from Compute py::class_(m, "ComputeGravity" ); // inherits from Compute py::class_(m, "ComputeVerletIntegration"); // inherits from Compute py::class_(m, "ComputeInteraction" ); // inherits from Compute // Should we use the inheritance class in pybind??? Like below? //py::class_(m, "PingPongBallsFactory"); }