Hi Sukender,

On 29/10/09 3:38 PM, Sukender wrote:
And once again, don't you think supporting metadata ("Name, value") directly in 
the
osg::Object wouldn't be nice? Or could we code something like: "if UserData is 
an
osg::Object (or another given type), read from/write to file using
UserData->serialize()/unserialize()" in reader/writers?

Having the serialize/deserialize as part of the object isn't a good idea, because it doesn't allow you to deal with different formats, such as .osg and .ive? This must be implemented in the respective plugin but for pure key/value pairs this could be added to the .osg and .ive plugins.

How about having a osg::KeyValue object derived from osg::Referenced so that it can be used as user-data?

That would also allow other plugins to return additional information, like an image loader to pass additional information (like description, fps, colourspace, and such) back to the application in a standard format.

On the other hand there is the problem with typing the contained data and name 
collisions...

Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to