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
Paul Martz wrote:
Personally, I already feel that using an enum to store bitflags is
overkill. Defining an entire class to implement the bitflag/mask pattern
along with set/get methods strikes me as the epitome of C++ abuse. I
don't think I can back this, not even if measurements indicate no
Chris 'Xenon' Hanson wrote:
Oh, I love getting to wrangle theory with friends. ;)
You can call me an idiot if you want, and I'll still buy you coffee. :-)
In the situation where they are unrelated state bits, being able to
say stateBits.test(MY_STATE) it actually is perhaps more obvious
On Wed, Nov 4, 2009 at 4:51 PM, Paul Martz pma...@skew-matrix.com wrote:
Like I said, it's Robert's call, and we'll all go with what he says.
From this day forth everyone should wear kilts and toss the caber, and
work towards world peace and harmony ;-)
Robert.
From this day forth everyone should wear kilts and toss the caber, and
work towards world peace and harmony ;-)
Absolutely! I agree with you on all points! Robert has spoken!
... but don't hate me if I had to Google to find out what toss the
caber meant ... :-)
J-S
--
Robert Osfield wrote:
From this day forth everyone should wear kilts and toss the caber, and
work towards world peace and harmony ;-)
As long as I don't have to shave my legs.
Robert.
--
Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com
PixelSense Landsat
Hi,
Paul Martz schrieb:
Hi Robert -- The code submission by Wojciech and I for MSFBO has opened
a small can of worms on declaring bits and bitmasks. I hope you can
weigh in and put an end to the debate.
Has anybody had a look at Qt's QFlags?
http://doc.trolltech.com/4.5/qflags.html
They
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
Hi Chris,
Chris 'Xenon' Hanson schrieb:
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
Peter Hrenka wrote:
Nothing needs to be virtual here. It's just a template class
with overloaded operators which means everything is effectively
inlined. We could also use an unsigned int as internal storage type
(Qt seems to use a signed int).
But doesn't RTTI embed a hidden pointer
IMHO This is the best option so far ;-). I like it.
Wojtek
- Original Message -
From: Peter Hrenka p.hre...@science-computing.de
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Tuesday, November 03, 2009 6:31 PM
Subject: Re: [osg-users] Change to Optimizer
Hi Chris,
Chris 'Xenon' Hanson schrieb:
Peter Hrenka wrote:
Nothing needs to be virtual here. It's just a template class
with overloaded operators which means everything is effectively
inlined. We could also use an unsigned int as internal storage type
(Qt seems to use a signed int).
But
Paul Martz wrote:
In Wojciech's modified submission, he changed the bitmask variable to a
signed int, with the reasoning that enum values are also signed ints,
and this eliminates the need for a typecast to get rid of compiler
warnings.
This caused me to weigh in with the workaround of
Hi,
If you could post with do it this way or do it that way, I (for one)
could get back to work and stop prodding everyone with my code style
opinions. :-)
Ooh, we could start a whole new OSG list just for code style fights and
then unearth
the old extensionless headers arguments on
On 29/10/09 10:55 PM, Paul Martz wrote:
Hi Robert -- The code submission by Wojciech and I for MSFBO has opened
a small can of worms on declaring bits and bitmasks. I hope you can
weigh in and put an end to the debate.
Originally, my submission followed the Optimizer's OptimizationOptions
Hi Robert -- The code submission by Wojciech and I for MSFBO has opened
a small can of worms on declaring bits and bitmasks. I hope you can
weigh in and put an end to the debate.
Originally, my submission followed the Optimizer's OptimizationOptions
pattern of declaring bit values in an enum,
16 matches
Mail list logo