HeaderDoc is a
documentation generator
In software development, a documentation generator is an automation technology that generates documentation. A generator is often used to generate API documentation which is generally for programmers or operational documents (such as a manual) f ...
developed and maintained by
Apple Inc.
Apple Inc. is an American multinational corporation and technology company headquartered in Cupertino, California, in Silicon Valley. It is best known for its consumer electronics, software, and services. Founded in 1976 as Apple Comput ...
Using specially commented source code files as input, HeaderDoc generates documentation for the code in
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
or
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
format. Syntax for HeaderDoc comment tags is largely similar to, and as of HeaderDoc version 8, supportive of
Javadoc
Javadoc (also capitalized as JavaDoc or javadoc) is an API documentation generator for the Java programming language. Based on information in Java source code, Javadoc generates documentation formatted as HTML and other formats via extensions. ...
tags. HeaderDoc 8.7 and later also provides partial support for many
Doxygen
Doxygen ( ) is a documentation generator that works with many programming languages. It extracts information from specially-formatted source code comments and saves the information in one of various supported formats.
Doxygen supports static ...
tags (@ form only, and must conform to HeaderDoc tag ordering rules). Apple's HeaderDoc project is
free,
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
software distributed under the
Apple Public Source License
The Apple Public Source License (APSL) is the open-source and free software license under which Apple's Darwin operating system was released in 2000. A free and open-source software license was voluntarily adopted to further involve the commu ...
.
Supported plain text languages
*
AppleScript
AppleScript is a scripting language created by Apple Inc. that facilitates automated control of Mac applications. First introduced in System 7, it is currently included in macOS in a package of automation tools. The term ''AppleScript'' may ...
*
Bash
*
Bourne Shell
The Bourne shell (sh) is a shell command-line interpreter for computer operating systems. It first appeared on Version 7 Unix, as its default shell. Unix-like systems continue to have /bin/sh—which will be the Bourne shell, or a symbolic lin ...
*
C Shell
The C shell (csh or the improved version, tcsh) is a Unix shell created by Bill Joy while he was a graduate student at University of California, Berkeley in the late 1970s. It has been widely distributed, beginning with the 2BSD release of the ...
*
C
*
C++
*
Korn Shell
KornShell (ksh) is a Unix shell which was developed by David Korn at Bell Labs in the early 1980s and announced at USENIX on July 14, 1983. The initial development was based on Bourne shell source code. Other early contributors were Bell ...
*
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
*
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
*
Mach
The Mach number (M or Ma), often only Mach, (; ) is a dimensionless quantity in fluid dynamics representing the ratio of flow velocity past a Boundary (thermodynamic), boundary to the local speed of sound.
It is named after the Austrian physi ...
MIG definition
*
Objective-C
Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
*
Pascal
*
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".
Perl was developed ...
*
PHP
PHP is a general-purpose scripting language geared towards web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by the PHP Group. ...
*
Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (prog ...
*
Ruby
Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
*
Tcl
TCL or Tcl or TCLs may refer to:
Business
* TCL Technology, a Chinese consumer electronics and appliance company
** TCL Electronics, a subsidiary of TCL Technology
* Texas Collegiate League, a collegiate baseball league
* Trade Centre Limited ...
The HeaderDoc tool set consists of the main utility, headerdoc2html, and gatherheaderdoc. The headerdoc2html tool generates a directory of either
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
(or optionally
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
) files from the commented source files specified. Afterwards, the gatherheaderdoc utility may be executed to create a
table of contents
A table of contents (or simply contents, abbreviated as TOC), is a list usually part of the Book design#Front matter, front matter preceding the main text of a book or other written work containing the titles of the text's sections, sometimes with ...
file for the documentation. Finally, the resolveLinks utility may be used to resolve cross-references between multiple documentation collections.
Apple's
Xcode
Xcode is a suite of developer tools for building apps on Apple devices. It includes an integrated development environment (IDE) of the same name for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, tvOS, and visionOS. It w ...
development environment contains features designed to assist the process of creating documentation using the HeaderDoc syntax and tools.
Additional features
HeaderDoc has the following core features:
* C preprocessing, allowing user-selected #define macros to alter the content, and allowing the user to pass command-line flags to ignore portions of the input.
* Syntax coloring with user-defined styles.
* Template-driven landing pages for indices.
* Cross-platform (written mostly in Perl).
The HeaderDoc suite also includes several tools that may be used independently:
*
MPGL—a set of tools designed to simplify creation of UNIX manual pages using a lightweight XML syntax consisting of a subset of XHTML plus section tags, parameter tags, etc. HeaderDoc also provides a bridging tool that helps generate manual pages from header comments for functions via HeaderDoc's XML output mode.
*
resolveLinks—a tool that allows for rapid web site relinking when content moves to a different address through the use of embedded anchors and link requests.
*
filtermacros.pl—a tool that can be used to filter out sections of headers based on C preprocessor macros. This is currently available only by downloading the source tarball. As of HeaderDoc 8.9, this functionality is built into the headerdoc2html tool itself.
See also
*
Comparison of documentation generators
The following tables compare general and technical information for a number of documentation generators. Please see the individual products' articles for further information. Unless otherwise specified in footnotes, comparisons are based on the s ...
*
Standard interface documentation
External links
Legacy Documentation: HeaderDoc User Guide*http://opensource.apple.com Latest version] (currently 8.9.28)
HeaderDoc mailing list(commonly used for getting help, patches, etc.)
Free documentation generators
{{programming-software-stub