autowrap icon indicating copy to clipboard operation
autowrap copied to clipboard

Evaluate if wrapping functions that accept std::function (callbacks) are easily possible

Open jpfeuffer opened this issue 1 year ago • 0 comments

Should work with wrapped extension and primitive types.

https://stackoverflow.com/questions/45943940/cython-stdfunction-callbacks-with-custom-parameter-types https://stackoverflow.com/questions/39044063/pass-a-closure-from-cython-to-c/39052204#39052204 https://github.com/hildensia/py_c_py

If possible without using boost::python, but it would not be a dealbreaker, if it can be made optional.

Some similar manual things were done here: https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/extra_includes/python_ms_data_consumer.hpp https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/pxds/PythonMSDataConsumer.pxd https://github.com/OpenMS/OpenMS/blob/develop/src/pyOpenMS/addons/MzMLFile.pyx

Applications for e.g. OpenMS would be apply functions for large in-memory MSExperiments, to apply an algorithm (written in Python via our wrappers) to each spectrum.

jpfeuffer avatar Sep 29 '22 17:09 jpfeuffer