Doxygen Helper XCode


#1

I’m very big on Doxygen, whether writing code for someone else or for personal use. I’ve found that while writing a Doxygen comment it forces me to think twice about the class and or method(s) in question. I’ve found this script that you can plug-in to XCode with a couple easy steps.

http://www.duckrowing.com/2010/03/18/documenting-objective-c-with-doxygen-part-ii/

Even though the title reads “Documenting Objective-C…” it works on functions, structs and classes for c++ as-well. I’ve also made a little tweak to the script to put the description on the same line as the “/***” opening comment.

# Creates an opening comment def start_comment(description = 'Description') str = "#{@indent}/**\n" str += "#{@indent}\t<##{description}#>\n" str end
to

# Creates an opening comment def start_comment(description = 'Description') str = "#{@indent}/**\t<##{description}#>\n\n" str end