Hi Tim,

On Wed, Jun 2, 2010 at 10:44 AM, Tim Moore <[email protected]> wrote:
> Here are my suggestions:
> * Remove the new ref_ptr constructor. It's not being used anywhere except in
> DatabasePager.cpp, and its use is not critical there. Seems a bit like the
> tail wagging the dog to change the source code for the benefit of
> genwrapper;

I totally agree with this perspective, the wrappers are supposed to
support the OSG not dictate it.  The automatically generated wrappers
have turned into a bit of nightmare, 95% of the time it just works,
but those 5% of times it doesn't it can be a real pain.

> * Or, ignore type observer_ptr. This may not be what you want from
> introspection;

I tried to get genwrapper to ignore it but didn't succeed - it still
picked up on the ref_ptr<> constructor.

> * Or, make genwrapper include osg/ref_ptr and osg/observer_ptr in all the
> generated files. This seems like the best solution to me. Normally I don't
> like including gratuitous files all over the place, but these are generated
> files we're talking about. This could either be hard-coded in
> genwrapper/WrapperGenerator.cpp (simple, a hack) or be a new option in the
> configuration file (more general and flexible, more programming).

I've just tried this, modifiying genwrapper.conf with the addition of:

configure file /.*/
        emit before "#include <osg/observer_ptr>
        "
end

This is a bit of sledgehammer solution, but so seems to be working...
fingers crossed.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to