Peter Hrenka wrote: > Has anybody had a look at Qt's QFlags? > http://doc.trolltech.com/4.5/qflags.html > > 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 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

