% % $Id: fpdoc.tex,v 1.3 2005/04/28 20:52:54 michael Exp $ % This file is part of the FPC documentation. % Copyright (C) 1997, by Michael Van Canneyt % % The FPC documentation is free text; you can redistribute it and/or % modify it under the terms of the GNU Library General Public License as % published by the Free Software Foundation; either version 2 of the % License, or (at your option) any later version. % % The FPC Documentation is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % Library General Public License for more details. % % You should have received a copy of the GNU Library General Public % License along with the FPC documentation; see the file COPYING.LIB. If not, % write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, % Boston, MA 02111-1307, USA. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Preamble. \input{preamble.inc} \latex{% \ifpdf \hypersetup{ pdfauthor={Michael Van Canneyt}, pdftitle={Users' Guide}, pdfsubject={FPDoc Users' guide}, pdfkeywords={Free Pascal} } \fi} % % Settings % \makeindex % % Start of document. % \newcommand{\fpdoc}{\textsc{FPDoc}\xspace} \newcommand{\seesu}[1]{section \ref{suse:#1}, page \pageref{suse:#1}\xspace} \newcommand{\seetag}[1]{\tag{#1} (\pageref{tag:#1})\xspace} \newcommand{\tag}[1]{\textbf{#1}} \newcommand{\attr}[1]{\textit{#1}} \usepackage{tabularx} \usepackage{syntax} \begin{document} \title{FPDoc :\\Free Pascal code documenter: Reference manual} \docdescription{Reference manual for FPDoc} \docversion{2.6} \date{\today} \author{Micha\"el Van Canneyt} \maketitle \tableofcontents %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Introduction %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Introduction} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % About this document \section{About this document} This is the reference manual for \fpdoc, a free documentation tool for Pascal units. It describes the usage of \fpdoc and how to write documentation with it. It attempts to be complete, but the tool is under continuous development, and so there may be some slight differences between the documentation and the actual program. In case of discrepancy, the sources of the tool are the final reference. A \file{README} or \file{CHANGES} file may be provided, and can also give some hints as to things which have changed. In case of doubt, these files or the sources are authoritative. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % About FPDoc \section{About \fpdoc} \fpdoc is a tool that combines a Pascal unit file and a description file in XML format and produces reference documentation for the unit. The reference documentation contains documentation for all of the identifiers found in the unit's interface section. The documentation is fully cross-referenced, making it easy to navigate. It is also possible to refer to other documentation sets written with \fpdoc, making it possible to maintain larger documentation sets for large projects. Contrary to some other documentation techniques, \fpdoc does not require the presence of formatted comments in the source code. It takes a source file and a documentation file (in XML format) and merges these two together to a full documentation of the source. This means that the code doesn't get obfuscated with large pieces of comment, making it hard to read and understand. \fpdoc is package-oriented, which means that it considers units as part of a package. Documentation for all units in a package can be generated in one run. At the moment of writing, the documentation can be generated in the following formats: \begin{description} \item[HTML] Plain HTML. Javascript is used to be able to show a small window with class properties or class methods, but the generated HTML will work without JavaScript as well. Style sheets are used to do the markup, so the output can be customised. \item[XHTML] As HTML, but using a more strict syntax. \item[LaTeX] LaTeX files, which can be used with the \file{fpc.sty} file which comes with the \fpc documentation. From this output, PDF documents can be generated, and with the use of latex2rtf, RTF or Winhelp files. Text files can also be generated. \item[Text] plain ascii text files. No cross-referencing exists. Other than that it resembles the LaTeX output in it's structure. \item[Man] Unix man pages. Each function/procedure/method identifier is a man page. Constants are on a separate page, as are types, variables and resourcestrings. \item[CHM] HTML files compressed into a .chm file using lzx compression. \item[RTF] Linear RTF files. \end{description} Note that pascal program files cannot be parsed by fpdoc, it is therefor impossible to create documentation for a program. Only units are supported. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Getting more information. \section{Getting more information.} If the documentation doesn't give an answer to your questions, you can obtain more information on the Internet, on the Free Pascal Website: \htmladdnormallink{http://www.freepascal.org/} {http://www.freepascal.org} It contains links to download all \fpdoc related material. Finally, if you think something should be added to this manual (entirely possible), please do not hesitate and contact me at \htmladdnormallink{michael@freepascal.org}{mailto:michael@freepascal.org}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Installation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Compiling and Installing \fpdoc} \label{ch:Installation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Compiling \section{Compiling} In order to compile \fpdoc, the following things are needed: \begin{enumerate} \item The fpdoc sources. These can be downloaded from the \fpdoc website. \item The \fpc compiler sources. \fpdoc uses the scanner from the \fpc compiler to scan the source file. \item The FCL units (or their sources) should be installed. \item fpcmake is needed to create the makefile for fpdoc. It comes with \fpc, so if \fpc is installed, there should be no problem. \item To make new internationalisation support files, \file{rstconv} must be installed, and the GNU gettext package. \end{enumerate} Links to download all these programs can be found on the \fpdoc website. When the fpdoc sources have been unzipped, the Makefile must be generated. Before generating the makefile, the location of the compiler source directory should be indicated. In the \file{Makefile.fpc} file, which has a windows ini file format, locate the \var{fpcdir} entry in the \var{defaults} section: \begin{verbatim} fpcdir=../.. \end{verbatim} and change it so it points to the top-level \fpc source directory. After that, running \file{fpcmake} will produce the \file{Makefile}, and running \file{make} should produce 2 executables: \file{fpdoc} and \file{makeskel}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Installation \section{Installation} When installing from sources, a simple \begin{verbatim} make install cd intl make install \end{verbatim} should completely install the documentation tool. When installing from a archive with the binaries, it should be sufficient to copy the binaries to a directory in the \var{PATH}. To have fpdoc available in several languages, the language files should be installed in the following directory on Unix systems: \begin{verbatim} /usr/local/share/locale/XX/LC_MESSAGES/ \end{verbatim} or \begin{verbatim} /usr/share/locale/XX/LC_MESSAGES/ \end{verbatim} Depending on the setup. Here \var{XX} should be replaced by the locale identifier. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Usage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{\fpdoc usage} \label{ch:usage} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Usage \section{fpdoc} Using \fpdoc is quite simple. It takes some command-line options, and based on these options, creates documentation. The command-line options can be given as long or short options, as is common for most GNU programs. In principle, only 2 command-line options are needed: \begin{description} \item[package] This specifies the name of the package for which documentation must be created. Exactly one package option can be specified. \item[input] The name of a unit file for which documentation should be generated. This can be a simple filename, but can also contain some syntax options as they could be given to the \fpc scanner. More than one \var{input} option can be given, and documentation will be generated for all specified input files. \end{description} Some examples: \begin{verbatim} fpdoc --package=fcl --input=crt.pp \end{verbatim} This will scan the \file{crt.pp} file and generate documentation for it in a directory called \file{fcl}. \begin{verbatim} fpdoc --package=fcl --input='-I../inc -S2 -DDebug classes.pp' \end{verbatim} This will scan the file \file{classes.pp}, with the \var{DEBUG} symbol defined, the scanner will look for include files in the \file{../inc} directory, and \var{OBJFPC}-mode syntax will be accepted. (for more information about these options, see the \fpc compiler user's guide) With the above commands, a set of documentation files will be generated in HTML format (this is the standard). There will be no description of any of the identifiers found in the unit's interface section, but all identifiers declarations will be present in the documentation. The actual documentation (i.e. the description of each of the identifiers) resides in a description file, which can be specified with the \var{descr} option: \begin{verbatim} fpdoc --package=fcl --descr=crt.xml --input=crt.pp \end{verbatim} This will scan the \file{crt.pp} file and generate documentation for it, using the descriptions found in the file{crt.xml} file. The documentation will be written in a directory called \file{fcl}. \begin{verbatim} fpdoc --package=fcl --descr=classes.xml \ --input='-I../inc -S2 -DDebug classes.pp' \end{verbatim} All options should be given on one line. This will scan the file \file{classes.pp}, with the \var{DEBUG} symbol defined, the scanner will look for include files in the \file{../inc} directory, and \var{OBJFPC}-mode syntax will be accepted. More than one input file or description file can be given: \begin{verbatim} fpdoc --package=fcl --descr=classes.xml --descr=process.xml \ --input='-I../inc -S2 -DDebug classes.pp' \ --input='-I../inc -S2 -DDebug process.pp' \end{verbatim} Here, documentation will be generated for 2 units: \file{classes} and \var{process} The format of the description file is discussed in the next chapter. Other formats can be generated, such as latex: \begin{verbatim} fpdoc --format=latex --package=fcl \ --descr=classes.xml --descr=process.xml\ --input='-I../inc -S2 -DDebug classes.pp' \ --input='-I../inc -S2 -DDebug process.pp' \end{verbatim} This will generate a LaTeX file called \file{fcl.tex}, which contains the documentation of the units \file{classes} and \var{process}. The latex file contains no document preamble, it starts with a chapter command. It is meant to be included (using the LaTeX include command) in a latex document with a preamble. The output of \fpdoc can be further customised by several command-line options, which will be explained in the next section. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Usage \section{\fpdoc command-line options reference} In this section all \fpdoc command-line options are explained. % auto-index \subsection{auto-index} This option generates an index of all the types including objects, classes, their methods and enums, sorted alphabhetically. Methods of classes and objects will appear as subitems of their class. If used in combination with --index-file this option will be used instead. This option only applies to the chm backend. % auto-toc \subsection{auto-toc} This option generates a Table of Contents that displays all classes, objects and routines in several ways. If used in combination with --toc-file this option will be used instead. This option only applies to the chm backend. % charset \subsection{charset} \label{suse:charset} This option can be used to specify the character set to be used for the HTML backend. It is simply inserted in the HTML tree. The default character set is \var{iso-8859-1} For example \begin{verbatim} --charset=UTF8 \end{verbatim} will result in an UTF8 specification of the \attr{content} attribute of the \tag{meta} tag in the generated HTML file: \begin{verbatim} \end{verbatim} % chm-title \subsection{chm-title} \label{suse:chm-title} This option is to specifiy a nicer title than the default title which is the same value as --package=value. % content \subsection{content} \label{suse:content} This option tells \fpdoc to generate a content file. A content file contains a list of all the possible anchors (labels) in the generated documentation file, and can be used to create cross-links in documentation for units in other packages, using the counterpart of the content option, the \var{import} option (\seesu{import}). % css-file \subsection{css-file} \label{suse:css-file} This option only applies to the chm backend. Use this option to set the css file used to style the html when the html is rendered by a viewer. % default-page \subsection{default-page} \label{suse:default-page} This option only applies to the chm backend. The default page to load when the chm is opened by a viewer. Using this option does not include a file but instead specifies a file you have included using --other-files. You only need to use this option if you have used the --other-files option and included a page you wish to use instead of the default page. %descr \subsection{descr} \label{suse:descr} This option specifies the name of a description file that contains the actual documentation for the unit. This option can be given several times, for several description files. The file will be searched relative to the current directory. No extension is added to the file, it should be a complete filename. If the filename starts with an 'at' sign \var{@}, then it is interpreted as a text file which contains a list of filenames, one per line. Each of these files will be added to the list of description files. The nodes in the description files will be merged into one big tree. This means that the documentation can be divided over multiple files. When merging the description files, nodes that occur twice will end up only once in the big node tree: the last node will always be the node that ends up in the parse tree. This means that the order of the various input commands or the ordering of the files in the file list is important. Examples: \begin{verbatim} --descr=crt.xml \end{verbatim} will tell \fpdoc to read documentation from \file{crt.xml}, while \begin{verbatim} --descr=@fcl.lst \end{verbatim} will tell \fpdoc to read filenames from \file{fcl.lst}; each of the filenames found in it will be added to the list of files to be scanned for descriptions. %footer \subsection{emit-notes} \label{suse:emit-notes} This option tells the documentation engine to include notes in the text. By default, notes are not included in the text as they serve as working notes for the documenter. %footer \subsection{footer} \label{suse:footer} This option tells the HTML engine to include the file indicated by this option as the footer of each generated HTML page. The file is assumed to contain a valid XHTML fragment. The contents of the file will be inserted in the HTML tree. Example: \begin{verbatim} --footer=footer.xml \end{verbatim} Where \file{footer.xml} contains for example: \begin{verbatim}
Date generated : June 1, 2008 \end{verbatim} This option is mutually exclusive with the \var{footer-date} option. %footer \subsection{footer-date} \label{suse:footerdate} This option tells the HTML engine to generate a footer for each page containing the current date. The optional format argument can be used to specify the format of the date. The format must be a formatting string as understoof by the \var{FormatDateTime} function in the \file{sysutils} unit. For example \begin{verbatim} --footer-date='mmm dd yyyy' \end{verbatim} This option is mutually exclusive with the \var{footer} option. %format \subsection{format} \label{suse:format} Specifies the output format in which the documentation will be generated. Currently, the following formats are known: \begin{description} \item[htm] Plain HTML with 8.3 conforming filenames. \item[html] HTML with long filenames. \item[xhtml] XHTML with long filenames. \item[latex] LaTex, which uses the \file{fpc.sty} style used by the \fpc documentation. \item[xml-struct] Structured XML. \item[chm] Compressed HTML. \end{description} % help \subsection{help} Gives a short copyright notice. % hide-protected \subsection{hide-protected} \label{suse:hideprotected} By default, the documentation will include descriptions and listings of protected fields and methods in classes or objects. This option changes this behaviour; if it is specified, no documentation will be generated for these methods. Note that public methods or properties that refer to these protected methods will then have a dangling (i.e. unavailable) link. % html-search \subsection{html-search} \label{suse:htmlsearch} This option can be used when generating HTML documentation, to specify an url that can be used to search in the generated documentation. The URL will be included in the header of each generated page with a \var{Search} caption. The option is ignored for non-html output formats. \fpdoc does not generate a search page, this should be made by some external tool. Only the url to such a page can be specified. Example: \begin{verbatim} --html-search=../search.html \end{verbatim} % image-dir \subsection{image-dir} \label{suse:imagedir} This option tells the \latex backend where the images are located. By default, a directory \file{images} is assumed. A path using forward slashes must be provided. Example: \begin{verbatim} --image-dir=pictures/ \end{verbatim} % image-dir \subsection{image-url} \label{suse:imageurl} This option tells the HTML backend where the images are located: the argument must be an absolute URL. By default, the images are assumed to be in a \var{images} directory below the package directory. Note that the URL must be absolute, i.e. if it is provided, the link to the image will be composed from the argument of this option with the filename. Example: \begin{verbatim} --image-url=http://www.mysite.org/docs/pictures/ \end{verbatim} % import \subsection{import} \label{suse:import} Import a table of contents file, generated by \fpdoc for another package with the \var{content} option (\seesu{content}). This option can be used to refer to documentation nodes in documentation sets for other packages. The argument consists of two parts: a filename, and a link prefix. The filename is the name of the file that will be imported. The link prefix is a prefix that will be made to each HTML link; this needs to be done to be able to place the files in different directories. Example: \begin{verbatim} --import=../fcl.cnt,../fcl \end{verbatim} This will read the file fcl.cnt in the parent directory. For HTML documentation, all links to items in the fcl.cnt file, the link will be prepended with \file{../fcl}. This allows a setup where all packages have their own subdirectory of a common documentation directory, and all content files reside in the main documentation directory, as e.g. in the following directory tree: \begin{verbatim} /docs/fcl /fpdoc /fpgui /fpgfx /fpimg \end{verbatim} The file fcl.cnt would reside in the \file{docs} directory. Similarly, for each package a contents file \file{xxx.cnt} could be places in that directory. Inside the subdirectory, commands as the above could be used to provide links to other documentation packages. Example: \begin{verbatim} --import=../fcl.cnt,ms-its:fcl.chm::/ \end{verbatim} As in the previous example this will read the file fcl.cnt in the parent directory. But all links to items in the fcl.cnt file, will be prepended with \file{ms-its:fcl.chm::/}. This is how chm's are crosslinked. Note that for Latex documentation, this option is ignored. % index-colcount \subsection{index-colcount} \label{suse:index-file} For the HTML backend, this option can be used to specify the number of columns that should be used when generating an identifier index page. By default, 3 columns are used. Example: \begin{verbatim} --index-colcount=4 \end{verbatim} Will use 4 columns instead. % index-file \subsection{index-file} \label{suse:index-file} Use this option to specify a local file to include and use as the index. This file is in the sitemap format. You can use the unit chmsitemap in your programs to read and write this type of file. Usually this file ends with .hhk. This option only applies to the chm backend. % input \subsection{input} \label{suse:input} This option tells \fpdoc what input file should be used. The argument can be just a filename, but can also be a complete compiler command-line with options that concern the scanning of the Pascal source: defines, include files, syntax options, as they would be specified to the \fpc compiler when compiling the file. If a complete command is used, then it should be enclosed in single or double quotes, so the shell will not break them in parts. It is possible to specify multiple input commands; they will be treated one by one, and documentation will be generated for each of the processed files. % lang \subsection{lang} \label{suse:lang} Select the language for the generated documentation. This will change all header names to the equivalent in the specified language. The documentation itself will not be translated, only the captions and headers used in the text. Currently, valid choices are \begin{description} \item[de] German. \item[fr] French. \item[nl] Dutch. \end{description} Example: \begin{verbatim} --lang=de \end{verbatim} Will select German language for headers. The language files should be installed correctly for this option to work. See the section on installing to check whether the languages are installed correctly. % latex-highlight \subsection{latex-highlight} \label{suse:latexhighlight} Switches on an internal latex syntax highlighter. This is not yet implemented. By default, syntax highlighting is provided by the syntax package that comes with \fpc. % make-searchable \subsection{make-searchable} This option generates an index of all the *.htm* files added in the chm, including files added with the --other-files option so that a full text search is possible. This option only applies to the chm backend. % other-files \subsection{other-files} \label{suse:other-files} This option specifies a text file with one filename per line to be included in the chm. You can include any type of file you want; it does not have to be a html file. For instance you can include images that you have linked to in the xml descr files. The files should be in a subfolder of the working directory and within their own folder to avoid naming conflicts with the auto generated files. This option only applies to the chm backend. % output \subsection{output} \label{suse:output} This option tells \fpdoc where the output file should be generated. How this option is interpreted depends on the format that is used. For latex, this is interpreted as the filename for the tex file. For chm, this is interpreted as the output filename. For all other formats, this is interpreted as the directory where all documentation files will be written. The directory will be created if it does not yet exist. The filename or directory name is interpreted as relative to the current directory. Example: \begin{verbatim} --format=html --output=docs/classes \end{verbatim} will generate HTML documentation in the directory \file{docs/classes}. \begin{verbatim} --format=latex --output=docs/classes.tex \end{verbatim} will generate latex documentation in the file \file{docs/classes}. \begin{verbatim} --format=chm --output=docs.chm \end{verbatim} will generate chm documentation in the file \file{docs.chm}. % package \subsection{package} \label{suse:package} This option specifies the name of the package to be used. The package name will also be used as a default for the \var{output} option (\seesu{output}). Note that if a project file is specified with multiple packages, this option will be used to select the package for which to produce documentation. % package \subsection{project} \label{suse:project} \fpdoc can work with a project file. This is an XML file which can contain specifies global options, and which contains the definition for one or more packages, for which it lists input files and description files etc. The project file is described in more detail in \seec{projectfile}. This option expects an argument, the name of the project file to use. Example: \begin{verbatim} fpdoc --project=rtl-project.xml --format=html --package=rtl \end{verbatim} % show-private \subsection{show-private} \label{suse:showprivate} By default, no documentation is generated for private methods or fields of classes or objects. This option causes \fpdoc to generate documentation for these methods and fields as well. % toc-file \subsection{toc-file} Use this option to specify a local file to include as a the Table of Contents. The table of contents is in the sitemap format and usually ends in .hhc. You can use the unit chmsitemap in your programs to read and write files of this type. This option only applies to the chm backend of \fpdoc. % warn-no-node \subsection{warn-no-node} \label{suse:warnnonode} If this option is given, then fpdoc will emit a warning if it cannot find a documentation node for some identifier. This can be used to see whether the description files are up-to-date, or whether they must be updated. % package \subsection{write-project} \label{suse:write-project} \fpdoc can create a project file based on all options given on the command line. For more information about the project file, \seec{projectfile}. This option expects an argument, the name of the project file to write. Example: \begin{verbatim} fpdoc --write-project=rtl-project.xml --format=html --package=rtl --input=file.pp --descr=file.xml \end{verbatim} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Makeskel \section{makeskel} \label{se:makeskel} % Introduction \subsection{introduction} \label{suse:makeskelintro} The makeskel tool can be used to generate an empty description file for a unit. The description file will contain an element node for each identifier in the interface section of the Pascal unit. It's usage is quite straightforward: the name of an input file (one or more) must be specified (as for \fpdoc), an output file, and the name of a package: \begin{verbatim} makeskel --package=rtl --input=crt.pp --output=crt.xml \end{verbatim} This will read the file \file{crt.pp} and will create a file \file{crt.xml} which contains empty nodes for all identifiers found in \file{crt.pp}, all in a package named \var{rtl}. The \var{input} option can be given more than once, as for the \file{fpdoc} command: \begin{verbatim} makeskel --input='-Sn system.pp' --input=crt.pp --output=rtl.xml \end{verbatim} As can be seen, the \var{input} option can contain some compiler options, as is the case for \fpdoc. The above command will process the files \file{system.pp} and \var{crt.pp}, and will create \tag{element} tags for the identifiers in both units in the file \var{rtl.xml}. The output of \file{makeskel} is a valid, empty description file. It will contain a \tag{module} tag for each unit specified, and each \tag{module} will have \tag{element} tags for each identifier in the unit. Each \tag{element} tag will by default contain \tag{short}, \tag{descr}, \tag{errors} and \tag{seealso} tags, but this can be customised. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Makeskel \section{Makeskel option reference} \label{se:makeskeloption} The output of \file{makeskel} can be customised using several options, which are discussed below. % descr \subsection{descr} %\subsection{suse:descr} When in update mode (\seesu{update}), this opion can be used to add an existing documentation file, as for \file{fpdoc}. Nodes that are already in one of the existing documentation files will not be written to the output file. % disable-arguments \subsection{disable-arguments} \label{suse:msdisablearguments} By default, for each function or procedure argument, a \tag{element} tag will be generated. This option disables this behaviour: no \tag{element} tags will be generated for procedure and function arguments. % disable-errors \subsection{disable-errors} \label{suse:msdisableerrors} If this option is specified, no \tag{errors} tag will be generated in the element nodes. By default all element tags contain a \tag{errors} node. The \tag{errors} tag is ignored when it is not needed; Normally, an \tag{errors} tag is only needed for procedure and function elements. % disable-function-results \subsection{disable-function-results} \label{suse:disablefunctionresults} If this option is specified, then no \tag{element} tag will be generated for function results. By default, \file{makeskel} will generate a result node for each function in the interface section. The result node is used in the documentation to document the return value of the function under a separate heading in the documentation page. Specifying this option suppresses the generation of the \tag{element} tag for the function result. % disable-private \subsection{disable-override} \label{suse:disableoverride} If this option is specified, then no \tag{element} tags will be generated for methods that override a method in a parent class. This means that the \file{fpdoc} engine will refer to the parent implementation for the documentation of the inherited method (provided it can find a parent implementation). % disable-private \subsection{disable-private} \label{suse:disableprivate} If this option is specified, then no \tag{element} tags will be generated for private methods or fields of classes or objects. The default behaviour is to generate nodes for private methods or fields. It can be used to generate a skeleton for end-user and developer documentation. % disable-protected \subsection{disable-protected} \label{suse:disableprotected} If this option is specified, then no \tag{element} tags will be generated for protected and private methods or fields of classes or objects. The default is to generate nodes for protected methods or fields. If this option is given, the option \var{--disable-private} is implied. It can be used to generate end-user-only documentation for classes. % disable-seealso \subsection{disable-seealso} \label{suse:msdisableseealso} If this option is specified, no \tag{seealso} tag will be generated in the element nodes. By default all \tag{element} tags contain a \tag{seealso} tag. % emitclassseparator \subsection{emitclassseparator} \label{suse:msemitclassseparator} When this option is specified, at the beginning of the elements for the documentation of a class, a comment tag is emitted which contains a separator text. This can be useful to separate documentation of different classes and make the description file more understandable. % help \subsection{help} \label{suse:mshelp} \file{Makeskel} emits a short copyright notice and exits when this option is specified. % input \subsection{input} \label{suse:msinput} This option is identical in meaning and functionality as the \var{input} option for \fpdoc. (\seesu{input}) It specifies the Pascal unit source file that will be scanned and for which a skeleton description file will be generated. Multiple \var{input} options can be given, and \tag{element} tags will be written for all the files, in one big output file. % lang \subsection{lang} \label{suse:mslang} This option is used to specify the language for messages emitted by \file{makeskel}. The supported languages are identical to the ones for \fpdoc: \begin{description} \item[de] German. \item[fr] French. \item[nl] Dutch. \end{description} % output \subsection{output} \label{suse:msoutput} This option specifies the name of the output file. A full filename must be given, no extension will be added. If this option is omitted, the output will be sent to standard output. When using update mode, the output file name should not appear in the list of existing documentation files. The \file{makeskel} program will do some elementary checks on this. % package \subsection{package} \label{suse:mspackage} This option specifies the package name that will be used when generating the skeleton. It is a mandatory option. % update \subsection{update} \label{suse:update} This option tells makeskel to create an update file: it will read description files (\seesu{descr}) and will only create documentation nodes for identifiers which do not yet have a documentation node in the read documentation files. The output file in this case can be merged with one (or more) of the documentation files: it's name should not appear in the list of existing documentation files. The \file{makeskel} program will do some elementary checks on this. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % The description file. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{The project file} \label{ch:projectfile} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Introduction \section{Introduction} When there are a lot of units to document, the command-line can be rather long. On some operating systems, this is a problem, as the length of the command-line easily exceeds the maximum length of command-line options supported by the OS. Also, command-lines are difficult to read and/or parse. fpdoc has always supported reading options from a file, but this is not very structured and difficult to handle in e.g. an IDE. Therefor it is possible to write a project file. The project file is an XML file that describes an fpdoc project. The XML file contains only a few tag names. In general, it looks as follows: \begin{verbatim} \end{verbatim} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Introduction \section{Project file structure} The top node is always a \tag{docproject} node. This node can contain only 2 nodes: a \tag{options} node and a \tag{packages} node; All other nodes will be ignored. % Options \subsection{The options node} \label{project:options} The \tag{options} tag that appears below the \tag{docproject} node specifies the options for the \fpdoc project. It contains a series of \tag{option} tags. No other nodes should appear under the \tag{options} tag. Example: \begin{verbatim} \end{verbatim} % Option \subsection{The option node} \label{project:option} Each \tag{option} tag under the \tag{options} tag specifies an option. Each \tag{option} tag has 2 attributes: \attr{name} and \var{value}. The name correspond to the command-line options that fpdoc supports. This attribute is mandatory. The \attr{value} attribute contains the value for the node. It is also mandatory. For command-line switches, only 2 values are accepted: \var{true} and \var{false}. Both general options and format-specific options can be specified this way. Example: \begin{verbatim}