[Insight-developers] itkLightObject Print() : const
Fri, 4 May 2001 16:02:53 -0400 (EDT)
> That probably makes sense given that a Print
> operation should not modify the printed object.
> (unless somebody really likes quantum mechanics :-)
> The only problem with this, is that the Print() method
> exists in a lot of classes and the change will have
> to be propagated to all of them.
> Does somebody see potential conflicts with this change ?
I can't think of any conflicts, but even if there were, then that is a
design problem. The print method is a read-only function, and should
therefore be const. If this causes problems, then they should be fixed by
some other method than making the Print method non-const.