[IGSTK-Developers] Const correctness in events

Julien Jomier julien.jomier at kitware.com
Mon Mar 27 23:54:44 EST 2006


Hello,

I'm having a dilemma with events and const correctness.
I created a macro that passes an IGSTK object via event. At first I 
thought it was a good idea to pass the object as const, but the main 
issue is when getting the object from the event and doing a 
RequestGetSomething() which cannot be const because it modifies the 
internal state machine.

So should we pass igstk in events as non-const? The other option is to 
do a copy of the object when we get it from the event (kinda painful).
Or maybe there are other alternatives...

Thanks,

Julien




More information about the IGSTK-Developers mailing list