I've been putting together a wrapper around Ogre 3d (www.ogre3d.org) for Ruby using SWIG (http://ogrerb.rubyforge.org
) and have run into a brick wall. Ogre makes heavy use of nested classes and to continue effectively and efficiently I need something that properly reads and wraps these classes without hundreds of lines of manual wrapper code. So I've got a few options:
1. Build my own wrapper system, much like Boost::Python and Luabind and abandon SWIG entirely
2. Take on the task of adding this much-needed functionality to SWIG.
Option 1 will take a very long time, will be a ton of work and a lot of reinventing the wheel.
I've given a lot of thought to Option 2, and some research into what it's going to take to "complete" SWIG, as I see it. For one, I can start with the hack-patch that's been submitted and look into making it proper and production quality, or for two I can build another back-end parser using gcc-xml (
Side note: I've recently found out about CABLE and CABLESwig (http://public.kitware.com/Cable/HTML/Index.html
) and while I will give these a look to see if they'll help my situation, SWIG still itself needs this functionality.
I know I'm not the first one, but the discussion has been sporadic enough that it's hard to know what people have suggested or if there's any work that's been done with this. So I guess before I really start on this, I'd like to hear what others have done, what you guys think of the best way of implementing this, etc.