[osg-users] Change to Optimizer OptimizationOptions
Chris 'Xenon' Hanson
xenon at alphapixel.com
Tue Nov 3 09:03:12 PST 2009
Peter Hrenka wrote:
> Has anybody had a look at Qt's QFlags?
> They provide a type-safe way of dealing with bit-mask-style enums.
> The implementation is mostly a template class with overloaded
> operators. Once you have the idea, it should be rather trivial
> to reimplement this from scratch and tailor it OSG's requirements.
I'm not familiar with it, but I agree that perhaps a flags class/template would be a
smart way to clean up the situation. If it would solve the issues.
I know I'm always happier using a provided set/test API than manually masking stuff. As
long as it doesn't bloat the data size beyond the simple storage of the flag word. as long
as we don't make any of it virtual, I think it would be ok. Though I don't know how RTTI
adds to the class per-instance weight of a real class (as opposed to a built-in type like
unsigned long int). Any C++ guru care to comment on that?
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
More information about the osg-users