Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
HeaderDoc Class Hierarchy
HeaderElement (Root Class--any header entity that's significant)
| (to HeaderDoc is a HeaderElement)
|-----------APIOwner (Object that owns declared API)
| |-------Header (Owner for header-wide API)
| |-------CPPClass (Container for all non-Objective-C classes and
| | C pseudoclass/COM Interface APIs).
| |-------ObjCClass (Owner for Objective-C class API)
| |-------ObjCCategory (Owner for Objective-C category API)
| |-------ObjCProtocol (Owner for Objective-C protocol API)
|-----------Method (an Objective-C method)
|-----------Function (any non-objective-C function or method)
|-----------MinorAPIElement (parameter, members of structs)
|-----------Struct (for both structs and unions)
| |-------Var (subclass of Struct so that it can contain fields)
DocReference (Another root class. Used by gatherHeaderDoc to store
information about documentation framesets within an
input folder. The script uses this information to
construct a top-level table of contents with links
to each frameset.)
ParseTree (Token tree instantiated from BlockParse.pm.)
ParserState (Parser state instance instantiated from BlockParse.pm and stored
in certain tokens within a ParseTree instance.)
IncludeHash (a simple data structure for storing information about a
In addition to the classes shown above, the
headerDoc2HTML.pl script also uses the non–object-oriented modules
BlockParse.pm. Most class instances are instantiated from
headerDoc2HTML.pl based on the results of a call to
ParseTree class is instantiated in the block parser itself. It contains a token tree and a set of operations on that tree (print the tree, return a text or html representation of the tree, walk the parse tree for parameters, walk the parse tree for embedded HeaderDoc markup, and so on).
ParserState class is also instantiated in the block parser. It contains only three methods (
IncludeHash class is essentially just a simple data structure to handle basic information about #include directives. It has two methods (
gatherHeaderDoc tool uses an external program,
resolveLinks, to convert special “link request” comments into links to other files in the directory being processed. This tool (written in C) resides in the
bin directory within the HeaderDoc modules directory.
xmllint (from libxml) to convert HTML into XHTML when generating XML output. HeaderDoc also uses
xml2man from the MPGL suite to generate man pages.