Hi Suikender, It's meant that one would subclass from osg::Object rather than ValueObject for complex user types. The ValueObject type is meant just for simple values not composite/array values. Extended the OSG serializer classes is quite straight forward so I wouldn't worry about this aspect - once you wrapped a couple of classes it becomes pretty natural. The osguserdata example illustrates this in action.
Robert. On Thu, Jul 28, 2011 at 11:16 AM, <[email protected]> wrote: > Hi Robert, hi all, > > I'm moving our software to the current meta implementation. And clearly, > adding new types handled by ValueObject is difficult: I may try adding > "META_ValueObject(SomeType, SomeTypeName)", I won't be able to compile as > Set/GetValueVisitor classes don't handle the new type. I may also try to > create a "MyTemplateValueObject<>" which accept some > "MySet/MyGetValueVisitor" (I did!), but there is plenty of problems, and > cumbersome code to work around them. So I think I'm going to store my custom > types directly as Objects, not as ValueObjects, manually handling the > retreival of the values. > > However, if for exotic types there is no solution apart from modifying > (again) the OSG's implementation, I ask if more common types may be added. > Namely: > - long > - osg::Vec[n](f|d)Array classes > - a "DateTime" class > > Thoughts? Do you think of any other type that could be added? > For the DateTime class, I know there is no censensus on it and users may have > choose different implementations. However this is quite common to require > such a feature, and it may be useful to have a class in OSG for it... or at > least a simple string that users may convert from/to their own type. > > Cheers, > > Sukender > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

