寫程式如果只是自己寫,在程式碼裡註解寫一寫,自己看得懂就可以。但如果程式是要給其他人呼叫使用,會需要有個API的說明文件,說明程式架構、有哪些函數和變數可以使用等。這時候如果有個方便的工具,能幫忙把寫完的程式碼自動輸出成說明文件,會省時省力很多。介紹幾款常見的工具:
- Javadoc
Javadoc is a tool for generating API documentation in HTML format from doc comments in source code.
- Doxygen
Doxygen is a documentation system for C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.
- Sandcastle
Sandcastle produces accurate, MSDN style, comprehensive documentation by reflecting over the source assemblies and optionally integrating XML Documentation Comments.
沒有留言:
張貼留言