Skip to main content
gamedev.net
🔒 Locked

Wrap member function to boost python object

Started by crazedfool Jun 6, 2007 at 12:12 PM 0 replies 900+ views
Original Post
crazedfool
crazedfool
I'm having some trouble in a program I've written that uses python to script most of a simple GUI using boost python. Now I'd like some of the C++ to also be able to register callbacks. All of the callbacks are stored as boost::python::objects. It seems like there has to be a simple way to wrap a bound member function into this object type but after a couple of hours looking I can't seem to come up with it. I've found the function make_function here which will wrap member function pointers however it won't bind them to an actual object instance. Is there any way to bind the callable object returned by make_function to an actual instance, or is there some other way I need to go about this? Thanks in advance.
crazedfool
crazedfool
Going to try bumping this just once. It seems like there has to be a simple way to do this. Any help is greatly appreciated.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.