[osg-users] Backward compatibility with custom serializers

2012-10-03 Thread Farshid Lashkari
Hi, I recently added serialization support for a custom osg::Object derived class in my application. I saved the object to a osgt and osgb file and attempted to load it into an older version of my application, which didn't have serialization support for my custom object yet. Loading the osgt file

Re: [osg-users] Backward compatibility with custom serializers

2012-10-04 Thread Robert Osfield
Hi Farshid, I will have to defer to Wang Rui to get into the nitty gritty bits of the serializers as he's the author of this feature. In general I would say the intention of the serializers is not to crash when handling unrecongized objects. Using 2.9.12 has to be a risk though, the serializers

Re: [osg-users] Backward compatibility with custom serializers

2012-10-04 Thread Wang Rui
Hi Farshid, Unfortunately the InputStream doesn't have a good mechanism to handle unsupported class in binary files without the version control macro UPDATE_TO_VERSION (for IVE files, version control is supported internally in the plugin source code). Text files can ignore unknown class blocks bec

Re: [osg-users] Backward compatibility with custom serializers

2012-10-05 Thread Wang Rui
Hi Farshid, 2012/10/5 Farshid Lashkari : > Thanks Wang, Robert. > > How would I go about using the UPDATE_TO_VERSION macro in this scenario? My > understanding is that the macro is used when the version of OSG is updated. > However, the version of OSG is the same between the two versions of my > a

Re: [osg-users] Backward compatibility with custom serializers

2012-10-05 Thread Farshid Lashkari
Hi Wang, On Fri, Oct 5, 2012 at 10:19 AM, Wang Rui wrote: > > Oh, this seems to be already discussed in another thread. I was > thinking of implementing a user version macro at that time but then I > was a little too busy to worked on it. I will consider adding a new > UPDATE_TO_USER_VERSION macr