Hi,
so, the problem is that if you call an access function with the AccessByItk
macro, the (expanded) macro will put a write lock on the input MITK image,
even if the function only wants to read the ITK image.
I suggested to modify the macro in such a way that if the access function
declares the ITK image as const then the macro should lock the MITK image
only for reading.
However, that's not trivial to check if the first formal argument was
declared as 'const' or not. Especially that macro has only the function
name, the template parameters and the actual arguments, but not the number
and type of the formal arguments.
In C++-11 this is possible. See the conversation here:
http://stackoverflow.com/questions/25034811/capture-function-argument-type-from-actual-arguments
The credits should go to Jarod42 for finding the solution.
I have not found a C++-03 solution yet. I am not entirely sure if it's
possible. I know that the MITK Core does not have Boost dependency, but if
we found a solution in Boost, we could may be extract the relevant classes
and functions, just like how it's done with the _PP_ macros now.
What do you think?
Cheers,
Miklos
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users