objective-cdoxygen

Doxygen comments - in header or implementation?


I'd like to document an Objective C project with Doxygen. The intent is to document for the developers. The whole project is open source so viewable by anyone anyway.

I created a Doxyfile and after a Doxygen 1.9.5 run I can see some (generic) output. So far so good.

Now I want to enhance the documentation. When writing comments, I am not sure whether they should be in the .h (header) file or the .m (module) file.

Where should they go? What is the difference? What might happen if I document on both sides?


Solution

  • So I found out some significant difference. If I overlooked something essential, please let me know.

    When I created a topic (using \defgroup and \ingroup) I was wondering why some of my comments just would not show up in the group. Well, the comments were in the .m file.

    It seems the comments in the header get better spread where they need to go.

    Edit: I found some classes that have their header in .m files. Maybe not the best practice, but here it also turned out to better have the documentation in the declaration (header) than in the implementation.