Hi Robert

2010/1/20 Robert Osfield <[email protected]>:
> Perhaps tackling the problem in a different way would be appropriate.
> I have been wondering if we could make the serialization side the core
> part of the new wrapper mechanism then have different output/input
> stream implementations based on this.  Right now you implement
> serialization using stream operators, perhaps this could be continued
> or replaced with another scheme.

I'll be thinking of this. As you said, to encapsulate everything into
the output/input stream is not flexible. We could have a pair of
BaseOutput/BaseInput pure virtual classes and implement different
operations based on them, not only reading or writing files, maybe
some introspection/reflection work as well.

> I have now checked in the refactor of the old osg plugin and the
> NodeKits plugins so that all the DotOsgWrappers now exist in
> subdirectories off src/osgWrappers/deprecated-dotosg.  You should see
> how the src/osgPlugins/osg contains nothing more than a
> ReaderWriterOSG.cpp.
>
> I'd expect your osg2 to be reduced to the same extent once I move out
> the wrappers and the wrapper infrastructure out into osgDB.  Tomorrow
> I'll tackle refactoring osg2 to live in osgDB +
> osgWrappers/serialization and a osg2 directory, or I may even just
> merge osg and osg2.  I'll see how I get on.

It's possible to keep only a ReaderWriterOSG2.cpp in the
osgPlugins/osg2 directory, or even merge it with the osg plugin. The
first thing is to merge osgDB::Registry and osg2/Registry, and move
the Serializer, Compressor and ObjectWrapper sources to osgDB
namespace, so do OutputStream and InputStream, which may require to be
reduced and inheritd by different read/write operation classes.

I'd like to start to do this this weekend, no matter if the new format
wrappers are already merged into the trunk or not. I will pay close
attention to your changes and try to catch up with the latest SVN. So
don't worry about the revision control problem.

> I'm having to do shorter working days this week due to looking after
> my kids after school while my wife does a training course this week.
> This means I'm not getting as much done as usual.  Fingers crossed
> I'll be able to get the osg2 plugin refactored and checked in tomorrow
> before I have to head out for the school run.

IMHO, Family is the most important thing in life. Best wishes to you
and your family. :)

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

Reply via email to