DOC: Update documentation of GetNameOfClass macro calls#4477
Conversation
d1b702d to
9e00b62
Compare
9e00b62 to
740b6ac
Compare
GetNameOfClass macro callsGetNameOfClass macro calls
740b6ac to
b1d2e87
Compare
blowekamp
left a comment
There was a problem hiding this comment.
The /** */ comment is for doxygen. Restating the functions signature in the doxygen string is redundant and does not contribute to describing the API, IMHO.
Thanks @blowekamp, but did you look at the doxygen output, as it is currently generated? For example at https://itk.org/Doxygen/html/classitk_1_1LightObject.html
And at https://itk.org/Doxygen/html/classitk_1_1Object.html
So the doxygen output does not yet show function signature correctly! It does not expand those macro's! So it looks like restating the function signatures (as currently proposed) is not entirely useless 🤷 If you still don't like the current proposal, would you like it better if we simply just remove those lines of comment? |
|
See also: Let's postpone this pull request (4477) until the doxygen output at https://itk.org/Doxygen/html for those GetNameOfClass() member functions is fixed. |
|
Now that the doxygen output is OK again, it does indeed properly show the function signature of those
Would you like it if it would be replaced by the text "Returns the name of this class"? Or would you prefer no text at all (as the name of those member functions is already pretty clear)? |
|
Getting the function signature is a great improvement! Thank you. Adding some prose would be nice. To me the interesting things about the method is that 1) Can be used polymorpically to return the name of the instantiated class 2) it return's the non-mangle and non-namespace qualified class name. To me the old "Run-time type information" says that to me, but I have been looked at that for far too long. |
Thanks for the input @blowekamp Minor detail: Anyway, I would still like to keep the documentation very short for most of those 1000+member functions. Maybe we can only just have some more extensive documentation at For example: /** \see LightObject::GetNameOfClass() */
itkVirtualGetNameOfClassMacro(CellInterface);
|
|
Yes very good idea. Actually, if I recall correctly with Doxygen if an overloaded method has no documentation strings, then the parent's documentation is used. Last I checked that was before the override specifier was added so I don't know the behavior with that additional specifier. I would hope it would be the same. |
b1d2e87 to
43be95d
Compare
Made the documentation of the `GetNameOfClass()` member functions more specific, by referring to `LightObject`. Using Notepad++, Replace in Files: Find what: /\*\* .+ \*/\r\n itkOverrideGetNameOfClassMacro Replace with: /\*\* \\see LightObject::GetNameOfClass\(\) \*/\r\n itkOverrideGetNameOfClassMacro Find what: /\*\* .+ \*/\r\n itkVirtualGetNameOfClassMacro Replace with: /\*\* \\see LightObject::GetNameOfClass\(\) \*/\r\n itkVirtualGetNameOfClassMacro Filters: itk*.hxx;itk*.h;itk*.cxx [v] Match case (*) Regular expression Follow-up to pull request InsightSoftwareConsortium#4373 commit 2c264ea "STYLE: Replace itkTypeMacro calls with `itkOverrideGetNameOfClassMacro`" commit fa1f39a "STYLE: Replace itkTypeMacroNoParent with itkVirtualGetNameOfClassMacro"
43be95d to
e332901
Compare
|
I really hope that this pull request can get merged without merge conflicts. I found that amending a commit like this (involving more than a thousand files) is quite time consuming! Just running git to do the commit locally takes a long time! |
Follow-up to pull request Replace
itkTypeMacroNoParent,itkTypeMacrowithitkVirtualGetNameOfClassMacro,itkOverrideGetNameOfClassMacro#4373commit 2c264ea "STYLE: Replace itkTypeMacro calls with
itkOverrideGetNameOfClassMacro"commit fa1f39a "STYLE: Replace itkTypeMacroNoParent with itkVirtualGetNameOfClassMacro"
🎉 Ready for review now: improved documentation of 1000+
GetNameOfClassmacro calls!