Code documentation for delphi similar to javadoc o

2019-01-10 15:26发布

I need a code documentation tool similar to javadoc or c# xml doc for delphi code. What is the best tool? I prefer a technology, which is in the future compatible to the Microsoft sandcastle project.

8条回答
Root(大扎)
2楼-- · 2019-01-10 16:05

Try: - Doxygen documentation - Pas2Dox

查看更多
Root(大扎)
3楼-- · 2019-01-10 16:09

DelphiCodeToDoc also have a command-line to use it with continuous integration tool (for example).

查看更多
Rolldiameter
4楼-- · 2019-01-10 16:13

Since Delphi 2005 it is build in the Delphi compiler. It uses the XMLDoc standard which uses XML style comments. Just as C# does, so I guess Sandcastle can handle it. See http://dn.codegear.com/article/32770 and http://tondrej.blogspot.com/2006/03/xml-documentation-in-delphi-2006.html

Also see Documenting Delphi

查看更多
我想做一个坏孩纸
5楼-- · 2019-01-10 16:16

As far as I'm aware, there is no tool easily compatible with Microsoft Sandcastle - at least until somebody actually bothers to write one, to modify an existing one, or to create a toolchain to properly transform the output.

I've personally used PasDoc with great success. I recommend building the latest SVN version, since the current release occasionally croaks on complicated interface definitions.

查看更多
▲ chillily
6楼-- · 2019-01-10 16:18

The question is pretty old, but I had the same problem today and found this post. Delphi 2007 allows following syntax, which seems to be equal to the C# documentations:

/// <summary>
/// Summary of the function / class
/// </summary>
/// <param name="param1">Description of the parameter param1</param>
/// <param name="param2">Description of the parameter param2</param>
/// <param name="param3">Description of the parameter param3</param>
/// <returns>Description of the return value</returns>
function test(param1, param2, param3: string): string;

For <summary>, there doesn't seem to be a possibility to allow linebreaks. <br /> doesn't work.

查看更多
Emotional °昔
7楼-- · 2019-01-10 16:23

Take a look at SynProject, an Open Source tool written in Delphi.

It was designed to handle a full documentation workflow, from specifications to release notes, including tests, architecture and design; and of course there is an integrated Delphi parser to generate architecture documentation from existing Delphi source code.

For the architecture document, the source code can extract comments (ala PasDoc) then embed this text into the main Architecture document (with class hierarchy diagrams and unit dependencies).

You write a plain text file using a wiki-like syntax in a dedicated text editor, then SynProject creates well formated Word documents from it. Some Wizards are available to access the content. But since it's stored as plain file, multiple programmers can write on it, using any SCM tool (SVN, Fossil...).

For instance, I currently use it for writing maintenance documentation for a huge and old Delphi application (about 2,000,000 lines of code written in Delphi 5 and 6), with no prior available documentation. You describe the changes made to the code (by quoting the unit/class/method), then the tool will update all documentations to reflect and trace those modifications. SynProject was designed to be compliant with some very "delicate" regulation rules (IEC 62304), but can be used for any project due to its unique "flat" design.

Note: I'm posting this a long time after the question, because SynProject was not existing at this time, and can be worth looking at. This thread has been defined as a reference for that question.

查看更多
登录 后发表回答