Robert Osfield wrote on Wednesday, December 02, 2009 4:11 AM:
> I've done something similar to this in the OSG in the
> osg::ArgumnetParser::Parameter class - this one uses a union
> internally like the Variant class above, with the twist that it's for
> passing in data to be set so it uses a pointer to each datatype rather
> than the actual data.  The Parameter class is used to avoid the need
> for many different read(..) methods for each type.  I've also adopted
> this technique in the osgDB::Input class to enable the same type of
> functionality with providing read(Parameter,...) that are really
> convenient to use.
> 
> One could use that osg::ArgumnetParser::Parameter approach in the new
> scheme being discussed for getting data out of the container object in
> convenient and type-safe way.

I agree, if we go with Variants, it would be best to store a type to be
type-safe.

-- 
Bryan Thrall
FlightSafety International
[email protected]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to