chapter_2_section_2.html [plain text]
<html>
<head>
<META NAME="Generator" CONTENT="Gutenberg">
<META NAME="GeneratorVersion" CONTENT="v100.1">
<META http-equiv="content-type" CONTENT="text/html;charset=iso-8859-1">
<META NAME = "Copyright" CONTENT="Copyright 2004 Apple Computer, Inc. All Rights Reserved.">
<TITLE>HeaderDoc Unfettered: Running headerDoc2HTML.pl</TITLE>
<base target="content">
<LINK REL="stylesheet" TYPE="text/css" HREF="../Resources/CSS/frameset_styles.css">
<style type="text/css"></style>
<script language="JavaScript" src="../Resources/JavaScript/page.js"></script>
</head>
<BODY bgcolor="#ffffff" onload="initialize_page();"><a name="//apple_ref/doc/uid/TP40001215-CH337-DontLinkElementID_843" title="Running headerDoc2HTML.pl" turn_anchor="no"></a>
<a name="top"></a>
<!-- start of header -->
<!--#include virtual="/includes/framesetheader" -->
<!-- end of header -->
<!-- start of path -->
<div class="breadcrumb"><a href="http://developer.apple.com/" target="_top">ADC Home</a> > <!--a logicalPath="//apple_ref/doc/uid/TP30000943" -->Reference Library<!--/a--> > <!--a logicalPath="Unknown" -->Technology TBD<!--/a--> > <a logicalPath="//apple_ref/doc/uid/TP40001215-CH345" href="../intro/chapter_1_section_1.html#//apple_ref/doc/uid/TP40001215-CH345">HeaderDoc Unfettered</a> > <a logicalPath="//apple_ref/doc/uid/TP40001215-CH337" href="chapter_2_section_1.html#//apple_ref/doc/uid/TP40001215-CH337">Using HeaderDoc</a> > </div><br>
<!-- end of path -->
<table width="100%" cellpadding=0 cellspacing=0 border=0 class="mini_nav_text"><tr>
<td align=left scope="row">
<!-- insert Show/Hide frames -->
<script type="text/javascript" language="JavaScript"><!--
if (self != top) {
document.write('<a href="'+self.location+'" target="_top"><img src="../Resources/Images/show_toc_icon.gif" width="15" height="14" border="0" style="margin-bottom: -2px;" alt=""></a> <a href="'+self.location+'" target="_top">Hide TOC</a>');
}
else {
document.write('<a href="../index.html?'+self.location+'" target="_top"><img src="../Resources/Images/show_toc_icon.gif" width="15" height="14" border="0" style="margin-bottom: -2px;" alt=""></a> <a href="../index.html?'+self.location+'" target="_top">Show TOC</a>');
}
<!-- end Show/Hide frames -->
</td><td align=right>
<a href="chapter_2_section_1.html" target="_self">< Previous Page</a><span style="margin-left: 8px"><a href="chapter_2_section_3.html" target="_self">Next Page ></a></span>
</td>
</tr></table>
<hr>
<br><h2>Running headerDoc2HTML.pl</h2>
<p>Once you have a header containing HeaderDoc comments, you
can run the headerDoc2HTML.pl script to generate HTML output like
this:</p>
<table><table cellpadding="8" width="100%" bgcolor="#F1F5F9" style="border: 1px solid #C9D1D7;"><tr><td scope="row"><table bgcolor="#F1F5F9" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> > headerDoc2HTML.pl MyHeader.h</code></pre></td><td><code><pre></pre></code></td></tr></table></td></tr></table></table>
<p>This will process “MyHeader.h” and create an output directory
called “MyHeader” in the same directory as the input file. To
view the results in your web browser, open the file<b> index.html</b> that
you find inside the output directory.</p>
<p>Instead of specifying a single input file (as above), you
can specify an input directory, if you wish. HeaderDoc will process
every “.h” file in the input directory (and all of its subdirectories),
generating an output directory of HTML files for each header that
contains HeaderDoc comments.</p>
<br><h3>HeaderDoc Command-line Switches</h3>
<p>HeaderDoc has a number of useful command-line switches that
alter its behavior.</p>
<p>The “-C” switch causes HeaderDoc to output class contents
as a composite page instead of breaking it up into separate pages
for functions, data types, and so on.</p>
<p>The “-H” switch turns on inclusion of the <tt>htmlHeader</tt> line,
as specified in the config file.</p>
<p>The “-O” switch enables “outer name only” type parsing,
in which tag names for typedefs are not documented (for example,
“foo” in “typedef struct foo {...} tdname;”).</p>
<p>The “-X” switch causes HeaderDoc to output XML content
instead of HTML.</p>
<p>The “-S” switch causes HeaderDoc to include functions
and data types from the superclass in the documentation of child
classes (if they are processed at once).</p>
<p>The “-b” switch puts HeaderDoc into “basic” mode.
In this mode, numbered lists are not automatically recognized, and
embedded headerdoc comments are not removed from declarations.</p>
<p>The “-d” switch turns on extra debugging output.</p>
<p>The “-h” switch causes HeaderDoc to output an XML file
containing metadata about the HeaderDoc output.</p>
<p>The “-i” switch tells HeaderDoc to output the body of
macro declarations.</p>
<p>The “-l” switch tells HeaderDoc not to generate link requests
in declarations.</p>
<p>The “-m” switch tells HeaderDoc to generate a man page
for each function found in lieu of generating XML or HTML output.</p>
<p>The “-o” switch allows you to specify another directory
for the output. For example:</p>
<table><table cellpadding="8" width="100%" bgcolor="#F1F5F9" style="border: 1px solid #C9D1D7;"><tr><td scope="row"><table bgcolor="#F1F5F9" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><pre><code> > headerDoc2HTML.pl -o /tmp MyHeader.h</code></pre></td><td><code><pre></pre></code></td></tr></table></td></tr></table></table>
<p>The “-q” switch makes HeaderDoc operate silently:</p>
<p>The “-s” switch causes HeaderDoc to enter a comment stripping
mode, in which it outputs a copy of your header file in the output
directory from which all headerdoc comments have been removed.</p>
<p>The “-t” switch enables strict tagging mode, in which
any function parameters not described with an @param tag result
in a warning.</p>
<p>The “-u” switch disables sorting of functions, data types,
and so on in the table of contents.</p>
<p>Most of these switches can be used in combination with each
other. The obvious exceptions are -X and -m (XML vs. man page output).
If you need both XML and man page output, you should specify the
-X flag (XML output), then run the scripts <code>hdxml2manxml</code> and <code>xml2man</code> to
convert the XML output to a man page yourself.</p>
<br><br>
<table width="100%" cellpadding=0 cellspacing=0 border=0 class="mini_nav_text"><tr>
<td align=left scope="row">
<!-- insert Show/Hide frames -->
<script type="text/javascript" language="JavaScript"><!--
if (self != top) {
document.write('<a href="'+self.location+'" target="_top"><img src="../Resources/Images/show_toc_icon.gif" width="15" height="14" border="0" style="margin-bottom: -2px;" alt=""></a> <a href="'+self.location+'" target="_top">Hide TOC</a>');
}
else {
document.write('<a href="../index.html?'+self.location+'" target="_top"><img src="../Resources/Images/show_toc_icon.gif" width="15" height="14" border="0" style="margin-bottom: -2px;" alt=""></a> <a href="../index.html?'+self.location+'" target="_top">Show TOC</a>');
}
<!-- end Show/Hide frames -->
</td><td align=right>
<a href="chapter_2_section_1.html" target="_self">< Previous Page</a><span style="margin-left: 8px"><a href="chapter_2_section_3.html" target="_self">Next Page ></a></span>
</td>
</tr></table>
<br><hr><p class="content_text"> <!--#if expr="0=1" -->© 1999, 2004 Apple Computer, Inc. All Rights Reserved. (<!--#endif -->Last updated: 2004-05-27<!--#if expr="0=1" -->)<!--#endif --></p>
<!-- start of footer -->
<!--#include virtual="/includes/framesetfooter" -->
<!-- end of footer -->
</BODY>
</html>