Langbahn Team – Weltmeisterschaft

Ddoc

Ddoc is a documentation generation technology for the D programming language; provided as a feature of the D compiler. Ddoc is similar to other documentation generation technologies such as Doxygen and Javadoc.

As is common for documentation generators, Ddoc generates documentation from source code based on comments and symbolic (non-comment) code. To maximize readability of the comments in the code, Ddoc requires relatively little use of embedded markup. It leverages the symbolic code for common information such as parameters and return types. This obviates the need to repeat the information in comments as required by some document generators.

Ddoc processes the comment and symbolic information by applying template macros to it which indirectly generates a final representation such as HTML. The template macros can be customized via external files analogous to HTML style sheets which allows for customizing formatting either for all output representations or to produce other representations such as XML and XHTML.

Compiler options

D compiler (dmd) options to control documentation generation:

  • /-D selects to generate documentation; output defaults to a file with the same name as the source file but with extension ".html"
  • /-Dd<directory> specifies a directory into which to save documentation files
  • /-Df<filename> specifies a file by name into which to write documentation

References