[Insight-developers] 08df6af - ENH: Get function accessible from const objects

Ho Cheung hocheung20 at gmail.com
Thu Mar 28 10:51:46 EDT 2013


Is my understanding correct? Or am I missing something?

Ho Cheung
Research Assistant
Bio-Image Analytics Lab - University of Houston
hocheung20 at gmail.com
Cell: (775) 388-2368


On Tue, Mar 26, 2013 at 3:45 PM, Ho Cheung <hocheung20 at gmail.com> wrote:

> Hi Hans,
>
> From what I understand, the purpose of the GetModifiable macro is to
> provide both non-const and const versions of the function in the case that
> the code author wants to provide read/write access to the ivar.
>
> I believe that the PolyLineParametricPath class only wants to provide
> read-only access to the m_VertexList ivar as the comment says:
>
> /** Return the container of Vertices as a const object. */
>
> Regards,
>
>  Ho Cheung
> Research Assistant
> Bio-Image Analytics Laboratory - University of Houston
> (775) 388-2368
>
>
>
>
> On Mar 26, 2013, at 2:52 PM, "Johnson, Hans J" <hans-johnson at uiowa.edu>
> wrote:
>
>  Cheung,
>
>  The macro for Modifiable provides both the const and the non-const
> version of the Get function for more complete API consistency across the
> toolkit.
>
>  Regarding the doxygen generated code,  I am not familiar with how to
> accomplish what you request.
>
>   From: Ho Cheung <hocheung20 at gmail.com>
> Date: Tuesday, March 26, 2013 2:46 PM
> To: Hans Johnson <hans-johnson at uiowa.edu>
> Subject: 08df6af - ENH: Get function accessible from const objects
>
>   Hi Hans,
>
>  I was looking at the ITK nightly documentation and noticed that the
> GetVertexList() function is gone.
>
>  Here it is in the ITK4.3.0 documentation:
> http://www.itk.org/Doxygen43/html/classitk_1_1PolyLineParametricPath.html#acaed5e0ed9c07fb5cb464fb7c33a4383
>
>  This had me scratching my head for quite a while until I realized that
> the function is generated via a macro.
>
>  Here what happens to it in the nightly documentation:
>
>  Here it is in the ITK nightly documentation:
> http://www.itk.org/Doxygen/html/classitk_1_1PolyLineParametricPath.html#a288d6d3994677ffda85fb90fbe57ce51
>
>
>
>  With the power of gitk, I found commit 08df6af and noticed you
> introduced a series of changes to the macros, introducing the
> GetModifiableObjectMacro.
>
>  In particular I have 2 questions:
>
>  1. Why was GetVertexList changed from Const to Modifiable?
> 2. The documentation now shows the macro as the definition instead of the
> function generated by the macro. Can this be fixed in the
> doxygen.configure.in? I'm not quite familiar with that part of ITK.
>
>  Thanks for your time,
>
>  Ho Cheung
>  Research Assistant
> Bio-Image Analytics Laboratory - University of Houston
> (775) 388-2368
>
>
>
>
>
>
> ------------------------------
> 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.
> ------------------------------
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20130328/f3e3b933/attachment.htm>


More information about the Insight-developers mailing list