[Insight-developers] New Gerrit topic for Transform::Clone
Williams, Norman K
norman-k-williams at uiowa.edu
Fri Jan 20 17:22:13 EST 2012
Gaetan hit a roadblock with Java Wrapping with respect to my recent commit
that added a Clone method to Transform. The rationale behind the original
patch was to address two limitations:
1. The TransformFileReader only permits const access to transforms read
from disk.
2. If you wanted to make a copy of a Transform, you had to copy its
parameters yourself, and any ancillary transform data into your copy.
Gaetan's problem was that 'Š in java, a method can't return a different
type than the type returned by that method in the superclass.'
His patch is here:
http://review.source.kitware.com/#/c/3690/1
My thoughts were, in order
1. Whoa? (Remarkably, I've avoided all but the most superficial knowledge
of Java).
2. Was there really no instance in ITK previously of member function
overloading?
3. Making users cast the return value of Clone every time they use it is
ugly, is there a creative solution
for allowing Clone to return Self?
--
Kent Williams norman-k-williams at uiowa.edu
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the Insight-developers
mailing list