Thrall, Bryan wrote:
> This seems overly complicated to me; couldn't we just rely on users
> knowing the type they want for a given key, like we rely on them knowing
> what subclass of UserData they want now? That way, UserPropertyContainer
> is simply an std::map<string,ref_ptr<Referenced> >. The UserData API
> would store its Referenced pointer, and the Description API could store
> a vector of strings:

  This works pretty well for objects that are Referenced, but I was looking for 
a good way
to store basic integer and floating-point values in the properties. There would 
need to be
a little more fleshing out to accomplish that, but I imagine one could make a 
class
derived from Referenced that contained a float or an int.

  Any other thoughts? I guess one can always use RTTI to check and make sure 
what came
back from getUserProperty really was the expected class before utilizing it.

-- 
Chris 'Xenon' Hanson, omo sanza lettere                  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to