On Mon, 20 Dec 2010 22:16:44 +0000 Joel Reymont <joe...@gmail.com> wrote:
> Are there any recipes for wrapping a large C++ class that uses callbacks? All the same as C bindings. But using C++ features one can reduce the amount of boilerplate needed. E.g. see http://ygrek.org.ua/p/code/cxx_wrapped/cxx_wrapped.h for a simple template class to wrap C++ objects as ocaml custom values (bindings to non-trivial C++ lib will probably need wrapping smart_ptr's as well). Also simple tricks like RAII for blocking_section save some typing. But all in all it is the same manual translation. -- ygrek http://ygrek.org.ua _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs