Commit 55571c29 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.1.5-20000716

parent 56bc9bda
DOXYGEN Version 1.1.5-20000709
DOXYGEN Version 1.1.5-20000716
CONTENTS
--------
- Installation instructions for UNIX
- Installation instructions for Windows
- Known configuration problems:
* HTML related problems
* LaTeX related problems
* HP-UX / Digital UNIX problems
* gcc 2.7.2.x related problems
INSTALLATION INSTRUCTIONS FOR UNIX:
-----------------------------------
1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.5-20000709.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.5-20000709.src.tar # unpack it
2. Run the configure script:
sh ./configure
The script tries to determine the platform you use, the location
of the Qt library, the make tool (which _must_ be GNU make) and the perl
interpreter. It will report what it finds. Use configure --help
to see how to override or change the default or detected settings.
If you have downloaded the binary distribution, you can proceed
with step 6 now.
3. Compile the program by running make:
make
The program should compile without problems and three binaries (doxygen,
doxytag, and doxysearch) should be available in the bin directory of the
distribution.
4. Generate the user manual (optional, will also be done in step 6).
make docs
To let doxygen generate the HTML and LaTeX documentation.
(you will need the stream editor `sed' for this)
5. make ps
to generate a postscript version of the manual.
(you will need latex and dvips for this)
The html directory of the distribution will now contain the html
documentation (just point a HTML browser to the file index.html in the
html directory).
The postscript manual doxygen_manual.ps will be located in the latex
directory of the distribution. Just send it to a postscript printer to
print it or use ghostview to view it.
6. Install the doxygen binaries, manual and examples
make install
Binaries are installed in the directory <prefix>/bin
Documentation and examples in the directory <prefix>/doc/doxygen
<prefix> defaults to /usr but can be changed with the --prefix
option of the configure script.
INSTALLATION INSTRUCTIONS FOR WINDOWS:
--------------------------------------
Currently, only Microsoft Visual C++ (version 5.0 or higher) is supported.
(For other compilers you may need to edit the perl script in wintools/make.pl
a bit). Let me know what you had to change if you got Doxygen working with
another windows compiler.
You will need to install the windows/dos versions of following tools:
- Perl 5.0+
You can download it at: http://www.ActiveState.com/pw32/
- the GNU tools flex, bison and sed.
To get these working on Windows you can install the cygwin tools.
You can download them at: http://sourceware.cygnus.com/cygwin/
Make sure the BISONLIB environment variable points to the
location where bison.simple and bison.hairy are located.
- Qt-1.xx (Qt-2.xx does not work without adding some extra code)
Only the tools section is required, so you can use the free
X-windows version (use Qt-1.44) and build a library called qt.lib out of
the sources in src/tools. The library should be put in the lib directory
of the Qt distribution. You can get Qt-1.44 at http://www.trolltech.com
Before continuing make sure the QTDIR environment variable points to the
root of the Qt distribution.
- Microsoft Visual C++ (I only tested with version 5.0).
Use the vcvars32.bat to set the environment variables
(if you did not select to do this automatically during installation).
- To generate LaTeX documentation or formulas in HTML you need the tools:
latex, dvips and gswin32
To get these working under Windows install the fpTeX distribution
You can download it at:
ftp://ctan.tug.org/tex-archive/systems/win32/web2c/fptex-0.3/
- If you want to generate compressed HTML help (see GENERATE_HTMLHELP in the
config file), then you need the Microsoft HTML help workshop.
You can download it at: http://msdn.microsoft.com/workshop/author/htmlhelp
- If you used WinZip to extract the tar archive it will (apparently) not
create empty folders, so you have to add the folders
`objects' and `bin' manually in the root of the distribution before
compiling.
Open a dos box.
Make sure all tools (i.e. nmake, latex, gswin32, dvips, sed, flex, bison,
cl, rm and perl), are accessible from the command-line (add them to the
PATH environment variable if needed).
goto the doxygen root dir and type:
make.bat
This should build the executables doxygen.exe, doxytag.exe, and doxysearch.exe
(The compiler should not produce any serious warnings or errors).
To build the examples type:
Please read the installation section of the manual for instructions.
nmake examples
To generate the HTML documentation type:
nmake docs
The generated docs are located in the html directory.
To generate the postscript manual type:
nmake ps
The manual should now be here latex/doxygen_manual.ps
-----------------------------------------------------------------------------
KNOWN CONFIGURATION PROBLEMS
QT RELATED PROBLEMS:
- The Qt include files and libraries are not a sub directory of the
directory pointed to by QTDIR on some systems.
(for instance on Red Hat 6.0 includes are in /usr/include/qt and
libs are in /usr/lib)
The solution:
- goto the root of doxygen distribution
- do "mkdir qt"
- do "cd qt"
- do "ln -s your-qt-include-dir-here include",
- do "ln -s your-qt-lib-dir-here lib",
- do "export QTDIR=$PWD" (or "setenv QTDIR $PWD if you have a csh-like shell)
Now install doxygen as described above.
- Qt-2.01 contains a bug that makes some special characters appear as
question marks (?) in the HTML output.
Bernhard Ristow provided a fix for this:
% in QT-2.0.1 is a bug in the member function
% QTextStream &QTextStream::operator<<( char c ).
%
% If the character is negative the cast to int in
% ts_putc( c ) produces an invalid char as unsigned
% short (e.g. char c = -4 -> unsigned short: 65532).
% This produces a strange output.
% If we modify the function into:
%
% QTextStream &QTextStream::operator<<( char c )
% {
% CHECK_STREAM_PRECOND
% unsigned char uc = (unsigned char) c;
% ts_putc( uc );
% return *this;
% }
% it works correctly.
HTML RELATED PROBLEMS:
- the indent continuously increases.
This seems to be a problem that can be observed with Netscape 4.01.
It is not present in many later and earlier versions I tested.
LATEX RELATED PROBLEMS:
- the LaTeX translation of HTML tables doesn't seem to work for all
compilers. It is known to work for teTeX (versions 0.4 and 0.9)
- the file a4wide.sty is not available for all distributions. If
your distribution does not have it please select another paper type
in the config file (see the PAPER_TYPE tag in the config file)
- the file fancyheader.sty is known as fancyhdr.sty on some systems.
Please change that in src/latexgen.cpp
HP-UX / DIGITAL UNIX PROBLEMS:
- If you are compiling for HP-UX with aCC and you get this error:
/opt/aCC/lbin/ld: Unsatisfied symbols:
alloca (code)
then you should (according to Anke Selig) edit ce_parse.cpp and replace
extern "C" {
void *alloca (unsigned int);
};
with
#include <alloca.h>
- If you are compiling for Digital Unix, the same problem can be solved
(according to Barnard Schmallhof) by replacing the following in
ce_parse.cpp:
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) ||
defined (__sparc) || defined (__sgi)
#include <alloca.h>
with
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) ||
defined (__sparc) || defined (__sgi) || defined (__osf__)
#include <alloca.h>
Alternatively, one could fix the problem at the bison side.
Here is patch for bison.simple (provided by Andre Johansen):
------------------------------------------------------------------------------
--- bison.simple~ Tue Nov 18 11:45:53 1997
+++ bison.simple Mon Jan 26 15:10:26 1998
@@ -27,7 +27,7 @@
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || defined (__alpha)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
------------------------------------------------------------------------------
The generated scanner.cpp that comes with doxygen is build with this
patch applied.
GCC 2.7.2.X PROBLEMS
Old versions of the GNU compiler have problems with constant strings
containing characters with ascii codes >127. Therefore the compiler will
fail to compile some of the translator_xx.h files.
A workaround, if you are planning to use the English translation only,
is to configure doxygen with the --english-only option.
-----------------------------------------------------------------------------
That's it!
Please report any problems to dimitri@stack.nl
The latest version of doxygen can be obtained at
http://www.stack.nl/~dimitri/doxygen
Enjoy,
Dimitri van Heesch (09 July 2000)
--------
Dimitri van Heesch (16 July 2000)
DOXYGEN Version 1.1.5-20000709
DOXYGEN Version 1.1.5-20000716
Please read INSTALL for compilation instructions.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (09 July 2000)
Dimitri van Heesch (16 July 2000)
1.1.5-20000709
1.1.5-20000716
......@@ -22,10 +22,13 @@
#include <qlist.h>
#include <qdict.h>
#include <qstrlist.h>
#include <qdatetime.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX_OPTION_LENGTH 22
static QString spaces=" ";
void init(); // defined below
......@@ -124,7 +127,7 @@ class ConfigOption
t << " t << \"\\n\";" << endl;
t << " }" << endl;
t << " t << \"" << cfgName;
t << spaces.left(22-cfgName.length());
t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
t << "= \";" << endl;
t << " " << writeFunc << "(t,Config::" << varName << ");" << endl;
t << " t << \"\\n\";" << endl;
......@@ -257,7 +260,7 @@ class ConfigList : public ConfigOption
virtual void printRules(QTextStream &t)
{
t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
t << spaces.left(22-cfgName.length());
t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
t << "{ BEGIN(GetStrList); l=&Config::" << varName;
t << "; l->clear(); elemStr=\"\"; }" << endl;
}
......@@ -357,7 +360,7 @@ class ConfigString : public ConfigOption
virtual void printRules(QTextStream &t)
{
t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
t << spaces.left(22-cfgName.length());
t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
t << "{ BEGIN(GetString); s=&Config::" << varName;
t << "; s->resize(0); }" << endl;
}
......@@ -462,7 +465,7 @@ class ConfigInt : public ConfigOption
virtual void printRules(QTextStream &t)
{
t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
t << spaces.left(22-cfgName.length());
t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
t << "{ BEGIN(GetString); s=&" << varName;
t << "String; s->resize(0); }" << endl;
}
......@@ -528,7 +531,7 @@ class ConfigBool : public ConfigOption
virtual void printRules(QTextStream &t)
{
t << "<Start>\"" << cfgName << "\"[ \\t]*\"=\"";
t << spaces.left(22-cfgName.length());
t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
t << "{ BEGIN(GetBool); b=&Config::" << varName;
t << "; }" << endl;
}
......@@ -691,10 +694,13 @@ int main(int argc,char * argv[])
const int maxLineLen=10000;
char buf[maxLineLen];
QFile f;
f.open(IO_WriteOnly,stdout);
QTextStream t(&f);
t << "/* This file was generated by configgen on "
<< QDateTime::currentDateTime().toString()
<< "\n * from " << argv[1] << "\n *\n * DO NOT EDIT!\n */\n\n";
// process template file
while (!ctfile.atEnd())
......@@ -868,7 +874,7 @@ void init()
"If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \n"
"can be used to strip a user defined part of the path. Stripping is \n"
"only done if one of the specified strings matches the left-hand part of \n"
"the path. \n"
"the path. It is allowed to use relative paths in the argument list.\n"
);
addDependency("stripFromPath","fullPathNameFlag");
ConfigBool::add( "internalDocsFlag",
......@@ -912,7 +918,7 @@ void init()
);
ConfigBool::add( "caseSensitiveNames",
"CASE_SENSE_NAMES",
"FALSE",
"TRUE",
"determines if output can be mixed case.",
"If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen \n"
"will only generate file names in lower case letters. If set to \n"
......@@ -1425,6 +1431,16 @@ void init()
ConfigList::Dir
);
addDependency("includePath","preprocessingFlag");
ConfigList::add( "includeFilePatternList",
"INCLUDE_FILE_PATTERNS",
"",
"list of include file patterns",
"You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard \n"
"patterns (like *.h and *.hpp) to filter out the header-files in the \n"
"directories. If left blank, the patterns specified with FILE_PATTERNS will \n"
"be used. \n"
);
addDependency("includeFilePatternList","preprocessingFlag");
ConfigList::add( "predefined",
"PREDEFINED",
"",
......
......@@ -27,11 +27,12 @@ GENERATE_HTML = YES
GENERATE_HTMLHELP = YES
GENERATE_RTF = NO
ENABLE_PREPROCESSING = NO
INPUT = index.doc install.doc starting.doc faq.doc trouble.doc \
history.doc features.doc \
doxygen_usage.doc doxytag_usage.doc doxysearch_usage.doc \
installdox_usage.doc output.doc autolink.doc \
config.doc commands.doc htmlcmds.doc language.doc
INPUT = index.doc install.doc starting.doc docblocks.doc \
grouping.doc formulas.doc diagrams.doc preprocessing.doc \
external.doc faq.doc trouble.doc history.doc features.doc \
doxygen_usage.doc doxytag_usage.doc doxysearch_usage.doc \
installdox_usage.doc output.doc autolink.doc \
config.doc commands.doc htmlcmds.doc language.doc
FILE_PATTERNS = *.cpp *.h *.doc
EXAMPLE_PATH = ../examples
RECURSIVE = NO
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
/*! \page diagrams Graphs and diagrams
Doxygen has build-in support to generate inheritance diagrams for C++
classes.
Doxygen can use the "dot" tool from graphviz 1.5 to generate
more advanced diagrams & graphs. Graphviz is an open-sourced,
cross-platform graph drawing toolkit from AT&T and Lucent Bell Labs and
can be found at http://www.research.att.com/sw/tools/graphviz/
If you have the "dot" tool available in the path, you can set
\ref cfg_have_dot "HAVE_DOT" to \c YES in the configuration file to
let doxygen use it.
Doxygen uses the "dot" tool to generate the following graphs:
<ul>
<li>if \ref cfg_graphical_hierarchy "GRAPHICAL_HIERARCHY" is set to \c YES,
a graphical representation of the class hierarchy will be drawn, along
with the textual one. Currently this feature is supported for HTML only.\n
<b>Warning:</b> When you have a very large class hierarchy where many
classes derive from a common base class, the resulting image may become
too big to handle for some browsers.
<li>if \ref cfg_class_graph "CLASS_GRAPH" is set to \c YES,
a graph will be generated for each documented class showing the
direct and indirect inheritance relations. This disables the
generation of the build-in class inheritance diagrams.
<li>if \ref cfg_include_graph "INCLUDE_GRAPH" is set to \c YES, an include
dependency graph is generated for each documented file that includes at
least one other file. This feature is currently supported for HTML and RTF
only.
<li>if \ref cfg_collaboration_graph "COLLABORATION_GRAPH" is set to YES, a
graph is drawn for each documented class and struct that shows:
<ul>
<li> the inheritance relations with base classes.
<li> the usage relations with other structs & classes (e.g.
class \c A has a member variable \c m_a of type class \c B, then
\c A has an arrow to \c B with \c m_a as label).
</ul>
</ul>
The elements in the class diagrams in HTML and RTF
have the following meaning:
<ul>
<li> A \b yellow box indicates a class. A box can have a
little marker in the lower right corner to indicate that the class
contains base classes that are hidden.
For the class diagrams the maximum tree width is currently 8 elements.
If a tree wider some nodes will be hidden.
If the box is filled with a
dashed pattern the inheritance relation is virtual.
<li> A \b white box indicates that the documentation of the class
is currently shown.
<li> A \b grey box indicates an undocumented class.
<li> A <b>solid dark blue</b> arrow indicates public inheritance.
<li> A <b>dashed dark green</b> arrow indicates protected inheritance.
<li> A <b>dotted dark green</b> arrow indicates private inheritance.
</ul>
The elements in the class diagram in \f$\mbox{\LaTeX}\f$ have the
following meaning:
<ul>
<li> A \b white box indicates a class.
A \b marker in the lower right corner of the box indicates that the
class has base classes that are hidden.
If the box has a \b dashed border this indicates virtual inheritance.
<li> A \b solid arrow indicates public inheritance.
<li> A \b dashed arrow indicates protected inheritance.
<li> A \b dotted arrow indicated private inheritance.
</ul>
The elements in the graphs generated by the dot tool have the following
meaning:
<ul>
<li> A \b white box indicates a class or struct or file.
<li> A box with a \b red border indicates a node that has
\e more arrows than are shown!
In order words: the graph is \e truncated with respect to this node.
The reason a graph is sometimes truncated is too prevent images
from becoming too large.
For the graphs generated with dot doxygen tries
to limit the width of the resulting image to 1024 pixels.
<li> A \b black box indicates that the class' documentation is currently shown.
<li> A <b>dark blue</b> arrow indicates an include relation (for the
include dependency graph) or public inheritance (for the other graphs).
<li> A <b>dark green</b> arrow indicates protected inheritance.
<li> A <b>dark red</b> arrow indicates private inheritance.
<li> A <b>purple dashed</b> arrow indicated a "usage" relation, the
edge of the arrow is labled with the variable(s) responsible for the
relation.
Class \c A uses class \c B, if class \c A has a member variable \c m
of type C, where B is a subtype of C (e.g. C could be \c B, \c B*, <code>T\<B\>*</code> ).
</ul>
Here are a couple of header files that together show the various diagrams
that doxygen can generate:
<code>diagrams_a.h</code>
\verbinclude diagrams_a.h
<code>diagrams_b.h</code>
\verbinclude diagrams_b.h
<code>diagrams_c.h</code>
\verbinclude diagrams_c.h
<code>diagrams_d.h</code>
\verbinclude diagrams_d.h
<code>diagrams_e.h</code>
\verbinclude diagrams_e.h
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/diagrams/html/index.html">here</a>
for the corresponding HTML documentation that is generated by doxygen<br>
(<code>EXTRACT_ALL</code> = <code>YES</code> is used here).
\endhtmlonly
\htmlonly
Go to the <a href="preprocessing.html">next</a> section or return to the
<a href="index.html">index</a>.
\endhtmlonly
*/
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
/*! \page docblocks Documenting the code
\subsection specialblock Special documentation blocks
The following types of special documentation blocks are supported by doxygen:
<ul>
<li>The Qt style, where special documentation blocks look like:
\verbatim
/*!
... text ...
*/
\endverbatim and the one line version:
\verbatim
//! ... one line of text ...
\endverbatim
<li>The JavaDoc style, where special documentation blocks look like:
\verbatim
/**
* ... text ...
*/
\endverbatim and the one line version:
\verbatim
/// ... one line of text ...
\endverbatim
</ul>
Doxygen only allows one brief and one detailed description. If there is
one brief description before a declaration and one before a
definition, only the one before the \e declaration will be used. If
the same situation occurs for a detail description,
the one before the \e definition is preferred and the one before the
declaration will be ignored.
Here is an example of a documented piece of C++ code using the Qt style:
\verbinclude qtstyle.cpp
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/qtstyle/html/class_test.html">here</a>
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
The one-line comments should contain a brief description,
whereas the multi-line comment blocks contain a more detailed description.
The brief descriptions are included in the member overview of a class,
namespace or file and are printed using a small italic font
(this description can be hidden by
setting \ref cfg_brief_member_desc "BRIEF_MEMBER_DESC" to \c NO in
the config file). By default the brief descriptions are also the first
sentence of the detailed description
(this can be changed by setting the \ref cfg_repeat_brief "REPEAT_BRIEF" tag
to \c NO). Both the brief and the detailed descriptions are optional
for the Qt style.
Here is the same piece of code, this time documented using the JavaDoc
style:
\verbinclude jdstyle.cpp
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/jdstyle/html/class_test.html">here</a>
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
Note that by default the first sentence of the documentation (until the <tt>.</tt>)
is treated as a brief description, whereas the documentation block as a whole
forms the detailed description. If you want to put a dot in the middle of a
sentence you should put a backslash and space behind it. Example:
\verbatim
/** Brief description (e.g.\ using only a few words). Details follow. */
\endverbatim
The brief description is required for the JavaDoc style, unless you set
\ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" to NO. If you do this,
doxygen treats JavaDoc comments just like Qt comments (i.e. You have
to insert an explicit \ref cmdbrief "\\brief" command to add a brief description).
Unlike most other documentation systems, doxygen also allows you to put
the documentation of members (including global functions) in front of
the \e definition. This way the documentation can be placed in the source
file instead of the header file. This keeps the header file compact, and allows the
implementer of the members more direct access to the documentation.
As a compromise the brief description could be placed before the
declaration and the detailed description before the member definition
(assuming you use the Qt style comments).
\par Note:
Each entity can only have \e one brief and \e one detailed description. If you
specify more than one comment block of the same type, only one will be used,
and all others are ignored!
\subsection structuralcommands Structural commands
So far we have assumed that the documentation blocks are always located in
front of the declaration or definition of a file, class or namespace or in
front of one of its members.
Although this is often comfortable, it may sometimes be better to put the
documentation somewhere else. For some types of documentation blocks (like file
documentation) this is even required. Doxygen allows you to put your
documentation blocks practically anywhere (the exception is inside the body
of a function or inside a normal C style comment block), as long as you put a
structural command inside the documentation block.
Structural commands (like all other commands) start with a backslash
(<tt>\\</tt>) followed by a command name and one or more parameters.
For instance, if you want to document the class \c Test in the example
above, you could have also put the following documentation block somewhere
in the input that is read by doxygen:
\verbatim
/*! \class Test
\brief A test class.
A more detailed class description.
*/
\endverbatim
Here the special command \c \class is used to indicated that the
comment block contains documentation for the class \c Test.
Other structural commands are:
<ul>
<li>\c \struct to document a C-struct.
<li>\c \union to document a union.
<li>\c \enum to document an enumeration type.
<li>\c \fn to document a function.
<li>\c \var to document a variable or typedef or enum value.
<li>\c \def to document a \#define.
<li>\c \file to document a file.
<li>\c \namespace to document a namespace.
</ul>
See section \ref commands for detailed information about these and other
commands. Note that the documentation block belonging to a file
should always contain a structural command.
To document a member of a C++ class, you must also document the class
itself. The same holds for namespaces. To document a C function, typedef,
enum or preprocessor definition you must first document the file that
contains it (usually this will be a header file, because that file contains
the information that is exported to other source files).
Here is an example of a C header named \c structcmd.h that is documented
using structural commands:
\verbinclude structcmd.h
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/structcmd/html/structcmd.h.html">here</a>
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
\par Note:
Because each comment block in the example above contains a structural command, all
the comment blocks could be moved to another location or input file
(the source file for instance), without affecting the generated
documentation. The disadvantage of this approach is that prototypes are
duplicated, so all changes have to be made twice!
\subsection memberdoc Documenting compound members.
If you want to document the members of a file, struct, union, class, or enum
and you want to put the documentation for these members inside the compound,
it is sometimes desired to place the documentation block after the member
instead of before. For this purpose doxygen has the following
additional comment blocks:
\verbatim
/*!< ... */
\endverbatim
This block can be used to put a qt style documentation blocks after a member.
The one line version look as follows:
\verbatim
//!< ...
\endverbatim
There are also JavaDoc versions:
\verbatim
/**< ... */
\endverbatim
and
\verbatim
///< ...
\endverbatim
Note that these blocks have the same structure and meaning as the
special comment blocks above only the \< indicates that the member is
located in front of the block instead of after the block.
Here is an example of a the use of these comment blocks:
\verbinclude afterdoc.h
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/afterdoc/html/class_test.html">here</a>
for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly
\warning These blocks can only be used to document \e members.
They cannot be used to document files, classes, unions, structs,
groups, namespaces and enums. Furthermore, the structural commands
mentioned in the previous section (like <code>\\class</code>) are ignored
inside these comment blocks.
\htmlonly
Go to the <a href="grouping.html">next</a> section or return to the
<a href="index.html">index</a>.
\endhtmlonly
*/
......@@ -51,6 +51,7 @@ Written by Dimitri van Heesch\\[2ex]
\input{formulas}
\input{diagrams}
\input{preprocessing}
\input{external}
\input{faq}
\input{trouble}
\part{Reference Manual}
......
......@@ -86,7 +86,7 @@ follow these steps:
In fact the HTTP daemon that I tried (apache for Windows) only
recognized <code>.cgi</code> files that were renamed
executables (so DOS batch files do not seem to work either). Therefore,
on Windows a small C program will generated by doxygen.
on Windows a small C program will be generated by doxygen.
You should compile and link the program with your favourite
compiler and change the extension of the executable from
<code>.exe</code> to <code>.cgi</code>.
......@@ -96,7 +96,7 @@ follow these steps:
This is usually a special directory on your system or in your
home directory.
Consult the manual of your HTTP daemon or your system administrator to
find out, where this directory resides on your system.
find out where this directory resides on your system.
<li>Goto the directory where the generated HTML files are located and run
doxytag as follows:
......@@ -104,13 +104,11 @@ follow these steps:
This will create a search index with the name <code>search.idx</code>.
Currently the index file <em>must</em> be called like this.
<li>Run <a href="installdox_usage.html">installdox</a> to replace
any dummy links in the documentation with real links.
\par Note:
When using a search engine this step is <em>required</em>
even if no tag files are used. If tag files are used you must specify
the correct options.
<li>If you change the location of the search engine or the documentation
and you do not want to regenerate the HTML output, you can simply edit
the generated search.cfg file and run the generated
<a href="installdox_usage.html">installdox</a> script to correct
the links in the documentation.
</ol>
......
......@@ -30,7 +30,8 @@ It has two functions:
directly from the HTML files. This has the advantage that you do not need
to have the sources from which the documentation was extracted.
If you \e do have the sources it is better to let \c doxygen generate the
tag file by putting the name of the tag file after \c GENERATE_TAGFILE in
tag file by putting the name of the tag file after
\ref cfg_generate_tagfile "GENERATE_TAGFILE" in
the configuration file.
<li>
Doxytag can generate a <em>search index</em> for the documentation
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
/*! \page external Linking to external documentation
If your project depends on external libraries or tools, there are several
reasons to not include all sources for these with every run of doxygen:
<dl>
<dt>Disk space:<dd> Some documentation may be available outside of the output
directory of doxygen already, for instance somewhere on the web.
You may want to link to these pages instead of generating the documentation
in your local output directory.
<dt>Compilation speed:<dd> External projects typically have a different update
frequency form your own project. It does not make much sense to let doxygen
parse the sources for these external project over and over again, even if
nothing has changed.
<dt>Memory:<dd> For very large source trees, letting doxygen parse all sources
may simply take too much of your system's memory. By dividing the sources
into several "packages", the sources of one package can be parsed by
doxygen, while all other packages that this package depends on, are
linked in externally. This saves a lot of memory.
<dt>Availability:<dd> For some projects that are documented with doxygen,
the sources may just not be available.
</dl>
If any of the above apply, you can use doxygen's tag file mechanism.
A tag file is basically a compact representation of the entities found in the
external sources. Doxygen can both generate and read tag files.
To generate a tag file for your project, simply put the name of the
tag file after the \ref cfg_generate_tagfile "GENERATE_TAGFILE" option in
the configuration file.
To combine the output of one or more external projects with you own project
you should specify the name of the tag files after
the \ref cfg_tagfiles "TAGFILES" option in the configuration file.
A tag file does not contain information about where the external documentation
is located. This could be a directory or URL. So when you include a tag
file you have to specify where the external documentation is located.
There are two ways to do this:
<dl>
<dt>At configuration time:<dd> just assign the location of the output to the
tag files specified after the \ref cfg_tagfiles "TAGFILES" configuration
option. If you use a relative path it should be relative with respect to
the directory where the html output of your project is generated.
<dt>After compile time:<dd> if you do not assign a location to a tag file,
doxygen will generate dummy links for all external HTML references. It will
also generate a perl script called \ref installdox_usage "installdox" in
the HTML output directory. This script should be run to replace the
dummy links with real links for all generated HTML files.
</dl>
\par Example:
Suppose you have a project \c proj that uses two external
projects called \c ext1 and \c ext2.
The directory structure looks as follows:
\par
\verbatim
<root>
+- proj
| +- html HTML output directory for proj
| +- src sources for proj
| |- proj.cpp
+- ext1
| +- html HTML output directory for ext1
| |- ext1.tag tag file for ext1
+- ext2
| +- html HTML output directory for ext2
| |- ext2.tag tag file for ext2
|- proj.cfg doxygen configuration file for proj
|- ext1.cfg doxygen configuration file for ext1
|- ext2.cfg doxygen configuration file for ext2
\endverbatim
\par
Then relevate parts of the configuration files look as follows:
\par
proj.cfg:
\verbatim
OUTPUT_DIRECTORY = proj
INPUT = proj/src
TAGFILES = ext1/ext1.tag=../../ext1/html \
ext2/ext2.tag=../../ext2/html
\endverbatim
ext1.cfg:
\verbatim
OUTPUT_DIRECTORY = ext1
GENERATE_TAGFILE = ext1/ext1.tag
\endverbatim
ext2.cfg:
\verbatim
OUTPUT_DIRECTORY = ext2
GENERATE_TAGFILE = ext2/ext2.tag
\endverbatim
In some (hopefully exceptional) cases you may have the documentation
generated by doxygen, but not the sources nor a tag file. In this case you
can use the \ref doxytag_usage "doxytag" tool to extract a tag file from
the generated HTML sources. This tool depends on the particular structure
of the generated output and on some special markers that are generated by
doxygen. Since this type of extraction is brittle and error prone I
suggest to only use this approach if there is no alternative. The
doxytag tool may even become obsolete in the future.
\htmlonly
Go to the <a href="faq.html">next</a> section or return to the
<a href="index.html">index</a>.
\endhtmlonly
*/
......@@ -68,7 +68,7 @@ as <code>PREPROCESSING = YES</code>.
Look at section \ref preprocessing for the answer.
<li><b>How can I change what's after the <code>#include</code> in class documentation?</b>
<li><b>How can I change what's after the <code>\#include</code> in the class documentation?</b>
You can document your class like
......@@ -162,6 +162,13 @@ Simply put an exclude pattern like this in the configuration file:
EXCLUDE_PATTERNS = */test/*
\endverbatim
<li><b>Doxygen automatically generates a link to the
class MyClass somewhere in the running text.
How do I prevent that at a certain place?</b>
Put a \% in front of the class name. Like this: \%MyClass. Doxygen will then
remove the % and keep the word unlinked.
</ol>
\htmlonly
......
......@@ -29,15 +29,17 @@
<li>JavaDoc (1.1), Qt-Doc, and KDOC compatible.
<li>Automatically generates class diagrams in HTML (as clickable
image maps) and \f$\mbox{\LaTeX}\f$ (as encapsulated postscript images).
<li>Using the dot tool of the Graphviz tool kit doxygen can generate
<li>Uses the dot tool of the Graphviz tool kit to generate
include dependency graphs, collaboration diagrams, and
graphical class hierarchy graphs.
<li>Allows you to put documentation in the header file (before the
declaration of an entity), source file (before the definition of an entity)
or in a separate file.
<li>Can generate a list of all members of a class (including any inherited
members) along with their protection level.
<li>Outputs documentation in on-line format (HTML and UNIX man page) and
off-line format (\f$\mbox{\LaTeX}\f$) and RTF simultaniously
(any one can be disabled if desired). Both formats are optimized for
(any of these can be disabled if desired). All formats are optimized for
ease of reading. <br>
Furthermore, compressed HTML can be generated from HTML output using
Microsoft's HTML help workshop (Windows only) and PDF can be generated
......@@ -54,9 +56,6 @@
generated automatically.
<li>Includes a fast, rank based search engine to search for strings or words
in the class and member documentation.
<li>Documentation may be placed either at the declaration or at the definition
of a member function or class. Most documentation systems (such as Javadoc) only
support the former, others (such as Qt) only the latter.
<li>You can type normal HTML tags in your documentation. Doxygen will convert
them to their equivalent \f$\mbox{\LaTeX}\f$ and man-page
counterparts automatically.
......@@ -69,8 +68,9 @@
looking into the implementation details.
<li>Allows automatic cross-referencing of (documented) entities with their
definition in the source code.
<li>All source code fragments are syntax highlighted for ease of reading.
<li>Allows inclusion of function/member/class definitions in the documentation.
<li>All options are read from an easy to edit and documented
<li>All options are read from an easy to edit and (optionally) annotated
configuration file.
<li>Documentation and search engine can be transferred to another
location or machine without regenerating the documentation.
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
/*! \page formulas Including formulas
Doxygen allows you to put \f$\mbox{\LaTeX}\f$ formulas in the
output (this works only for the HTML and \f$\mbox{\LaTeX}\f$ formats,
not for the man page output). To be able to include formulas (as images)
in the HTML documentation, you will also need to have the following tools
installed
<ul>
<li>\c latex: the \f$\mbox{\LaTeX}\f$ compiler, needed to parse the formulas.
To test I have used the teTeX 0.9 distribution.
<li>\c dvips: a tool to convert dvi files to postscript files
I have used version 5.86 from Radical Eye software for testing.
<li>\c gs: the ghostscript interpreter for converting postscript files
to bitmaps. I have used Aladdin Ghostscript 5.10 for testing.
</ul>
There are two ways to include formulas in the documentation.
<ol>
<li>Using in-text formulas that appear in the running text.
These formulas should be put between a pair of \\f\$
commands, so
\verbatim
The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is
\f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$.
\endverbatim results in:
The distance between \f$(x_1,y_1)\f$ and \f$(x_2,y_2)\f$ is
\f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$.
<br>
<li>Unnumbered displayed formulas that are centered on a separate line.
These formulas should be put between \\f\[ and \\f\] commands.
An example:
\verbatim
\f[
|I_2|=\left| \int_{0}^T \psi(t)
\left\{
u(a,t)-
\int_{\gamma(t)}^a
\frac{d\theta}{k(\theta,t)}
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
\right\} dt
\right|
\f]
\endverbatim
results in:
\f[
|I_2|=\left| \int_{0}^T \psi(t)
\left\{
u(a,t)-
\int_{\gamma(t)}^a
\frac{d\theta}{k(\theta,t)}
\int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi
\right\} dt
\right|
\f]
</ol>
Formulas should be valid commands in \f$\mbox{\LaTeX}\f$'s math-mode.
\warning Currently, doxygen is not very fault tolerant in recovering
from typos in formulas. It may have to be necessary to remove the
file <code>formula.repository</code> that is written in the html directory to
a rid of an incorrect formula
\htmlonly
Go to the <a href="diagrams.html">next</a> section or return to the
<a href="index.html">index</a>.
\endhtmlonly
*/
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
/*! \page grouping Grouping
Doxygen has two mechanisms to group things together.
One mechanism works at a global level, creating a new page
for each group. These groups are called "modules" in the documentation.
The other mechanism works within a member list of some compound entity,
and is refered to as a "member group".
\subsection modules Modules
Modules are a way to group things together on a separate page. You
can document a group as a whole, as well as all individual members.
Members of a group can be files, namespaces, classes, functions,
variables, enums, typedefs, and defines, but also other groups.
To define a group, you should put the \ref cmddefgroup "\\defgroup"
command in a special comment block. The first argument of the command
is a label that should uniquely identify the group. You can make an
entity a member of a specific group by putting
a \ref cmdingroup "\\ingroup" command inside its documentation.
\par Example:
\verbinclude group.cpp
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/group/html/modules.html">here</a>
for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly
\subsection memgroup Member Groups
If a compound (e.g. a class or file) has many members, it is often
desired to group them together. Doxygen already automatically groups
things together on type and protection level, but maybe you feel that
this is not enough or that that default grouping is wrong.
For instance, because you feel that members of different (syntactic)
types belong to the same (semantic) group.
A member group is defined by
a
\verbatim
//@{
...
//@}
\endverbatim
block or a
\verbatim
/*@{*/
...
/*@}*/
\endverbatim
block if you prefer C style
comments. Note that the members of the group should be
physcially inside the member group's body.
Before the opening marker of a block a separate comment block may be
placed. This block should contain the \ref cmdname "@name"
(or \ref cmdname "\name") command and is used to specify the header
of the group. Optionally, the comment block may also contain more
detailed information about the group.
Nesting of member groups is not allowed.
If all members of a member group inside a class have the same type
and protection level (for instance all are static public members),
then the whole member group is displayed as a subgroup of
the type/protection level group (the group is displayed as a
subsection of the "Static Public Members" section for instance).
If two or more members have different types, then the group is put
at the same level as the automatically generated groups.
If you want to force all member-groups of a class to be at the top level,
you should put a \ref cmdnosubgrouping "\\nosubgrouping" command inside the
documentation of the class.
\par Example:
\verbinclude memgrp.cpp
\htmlonly
Click <a href="$(DOXYGEN_DOCDIR)/examples/memgrp/html/class_test.html">here</a>
for the corresponding HTML documentation that is generated by Doxygen.
\endhtmlonly
Here Group1 is displayed as a subsection of the "Public Members". And
Group2 is a separate section because it contains members with
different protection levels (i.e. public and protected).
\htmlonly
Go to the <a href="formulas.html">next</a> section or return to the
<a href="index.html">index</a>.
\endhtmlonly
*/
......@@ -17,9 +17,38 @@
/*! \page history Doxygen History
<h3>Version 1.2.0</h3>
<h4>Major new features:</h4>
<ul>
<li>Support for RTF output.
<li>Using the dot tool of the AT&T's GraphViz package, doxygen can now
generate inheritance diagrams, collaboration diagrams, include
dependency graphs, included by graphs and graphical inheritance overviews.
<li>Function arguments can now be documentation with separate comment blocks.
<li>Initializers and macro definitions are now included in the documentation.
<li>Variables and typedefs are now put in their own section.
<li>Old configuration files can be upgraded using the -u option without
loosing any changes.
<li>Using the \\if and \\endif commands, doxygen can conditionally
include documentation blocks.
<li>Added Doc++ like support for member grouping.
<li>Doxygen now has a GUI front-end called doxywizard (based on Qt-2.1)
<li>All info about configuration options is now concentrated in a new
tool called configgen. This tool can generate the configuration
parser and GUI front-end from source templates.
<li>Better support for the using keyword.
<li>New transparent mini logo that is put in the footer of all HTML pages.
<li>Internationalization support for the Polish and Croatian language.
<li>Todo list support.
<li>If the source browser is enabled, for a function, a list of function whose
implementation calls that function, is generated.
<li>All source code fragments are now syntax highlighted in the HTML output.
The colors can be changed using cascading style sheets.
</ul>
<h3>Version 1.0.0</h3>
<h4>New features:</h4>
<h4>Major new features:</h4>
<ul>
<li>Support for templates and namespaces.
<li>Internationalization support. Currently supported languages are:
......@@ -36,7 +65,7 @@
<h3>Version 0.4</h3>
<h4>New features:</h4>
<h4>Major new features:</h4>
<ul>
<li>LaTeX output generation.
<li>Full JavaDoc support.
......@@ -52,14 +81,9 @@
<li>Completely new documentation, that is now generated by Doxygen.
<li>A lot of small examples are now included.
</ul>
<h4>Bug fixes:</h4>
<ul>
<li>A lot of parser bugs are fixed.
<li>Improved support for documenting C code.
</ul>
<h3>Version 0.3</h3>
<h4>New features:</h4>
<h4>Major new features:</h4>
<ul>
<li>A search engine <a href="doxysearch_usage.html">doxysearch</a>,
that allows you to search through the generated documentation.
......@@ -75,24 +99,8 @@
documentation.
</ul>
<h4>Bug fixes:</h4>
<ul>
<li>Fixed bug when files with the same name but in different directories
are used as include files.
<li>Template classes now work.
<li>Inner classes now work.
<li>Fixed a bug regarding unrelated functions and <code>\fn</code>.
<li>Fixed parse bug with <code>/**/</code> comments
<li>Fixed a bug regarding inline friend functions.
<li>The list of all members now also contains the undocumented members.
<li>Special documentation is now removed from code blocks.
<li>Doxygen should compile on Sun Solaris (with <code>CC</code>), HP-UX (with
<code>CC</code>), Irix (with DCC) and Linux (with <code>GCC</code>)
<li>Fixed several minor bugs.
</ul>
<h3>Version 0.2</h3>
<h4>New features:</h4>
<h4>Major new features:</h4>
<ul>
<li>Blocks of code are now parsed. Function calls and variables are
replaced by links to their documentation if possible.
......@@ -112,17 +120,6 @@
instead of only the used ones.
</ul>
<h4>Bug fixes:</h4>
<ul>
<li>Fixed a link generation problem with mixed case filenames are used.
<li>Made doxygen a little more portable.
(doxygen should now compile on Linux (with g++) and HP-UX (with CC))
<li>Fixed a bug in err() function.
<li>Fixed a problem with the type cast operator.
<li>Removed some typo's from the docs.
<li>Several small bug fixes and enhancements.
</ul>
<h3>Version 0.1</h3>
Initial version.
......
......@@ -91,6 +91,7 @@ The first part forms a user manual:
<li>Section \ref formulas shows how to insert formulas in the documentation.
<li>Section \ref diagrams describes the diagrams and graphs that doxygen can generate.
<li>Section \ref preprocessing explains how doxygen deals with macro definitions.
<li>Section \ref external explains how to let doxygen create links to externally generated documentation.
<li>Section \ref faq gives answers to frequently asked questions.
<li>Section \ref trouble tells you what to do when you have problems.
</ul>
......@@ -165,9 +166,10 @@ Thanks go to:
sources.
<li>Tim Mensch for adding the todo command.
<li>Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon,
Vlastimil Havran, Ahmed Also Faisal, Alessandro Falappa, Kenji Nagamatsu,
Francisco Oltra Thennet, Olli Korhonen for providing translations into
various languages.
Vlastimil Havran, Petr Prikryl, Ahmed Also Faisal, Alessandro Falappa,
Kenji Nagamatsu, Francisco Oltra Thennet, Olli Korhonen,
Boris Bralo, Nickolay Semyonov, and Grzegorz Kowal for providing
translations into various languages.
<li>
Arnt Gulbrandsen,
Adam P. Jenkins,
......
This diff is collapsed.
......@@ -92,18 +92,6 @@ Here is a list of the languages and their current maintainers:
havran@NOSPAM.fel.cvut.cz</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Romanian
</TD>
<TD>
Ionutz Borcoman
</TD>
<TD>
<a href="mailto:borco@NOSPAM.borco-ei.eng.hokudai.ac.jp">
borco@NOSPAM.borco-ei.eng.hokudai.ac.jp</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Italian
......@@ -226,8 +214,6 @@ Here is a list of the languages and their current maintainers:
Czech & Petr Prikryl & {\tt prikrylp@skil.cz} \\
& Vlastimil Havran & {\tt havran@fel.cvut.cz} \\
\hline
Romanian & Ionutz Borcoman & {\tt borco@borco-ei.eng.hokudai.ac.jp} \\
\hline
Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} \\
& Alessandro Falappa & {\tt a.falappa@flashnet.it} \\
\hline
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2000 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
/*! \page preprocessing Preprocessing
Source files that are used as input to doxygen can be parsed by doxygen's
build-in C-preprocessor.
By default doxygen does only partial preprocessing. That is, it
evaluates conditional compilation statements (like \#if) and
evaluates macro definitions, but it does not perform macro expansion.
So if you have the following code fragment
\verbatim
#define VERSION 200
#define CONST_STRING const char *
#if VERSION >= 200
static CONST_STRING version = "2.xx";
#else
static CONST_STRING version = "1.xx";
#endif
\endverbatim
Then by default doxygen will feed the following to its parser:
\verbatim
#define VERSION
#define CONST_STRING
static CONST_STRING version = "2.xx";
\endverbatim
You can disable all preprocessing by setting
\ref cfg_enable_preprocessing "ENABLE_PREPROCESSING" to \c
NO in the configuation file. In the case above doxygen will then reads
both statements!
In case you want to expand the \c CONST_STRING macro, you should set the
\ref cfg_macro_expansion "MACRO_EXPANSION" tag in the config file
to \c YES. Then the result after preprocessing becomes:
\verbatim
#define VERSION
#define CONST_STRING
static const char * version = "1.xx";
\endverbatim
Note that doxygen will now expand \e all macro definitions
(recursively if needed). This is often too much. Therefore, doxygen also
allows you to expand only those defines that you explicitly
specify. For this you have to set the
\ref cfg_expand_only_predef "EXPAND_ONLY_PREDEF" tag to \c YES
and specify the macro definitions after
the \ref cfg_predefined "PREDEFINED" tag.
As an example, suppose you have the following obfusciated code fragment
of an abstract base class called \c IUnknown:
\verbatim
/*! A reference to an IID */
#ifdef __cplusplus
#define REFIID const IID &
#else
#define REFIID const IID *
#endif
/*! The IUnknown interface */
DECLARE_INTERFACE(IUnknown)
{
STDMETHOD(HRESULT,QueryInterface) (THIS_ REFIID iid, void **ppv) PURE;
STDMETHOD(ULONG,AddRef) (THIS) PURE;
STDMETHOD(ULONG,Release) (THIS) PURE;
};
\endverbatim
without macro expansion doxygen will get confused, but we may not want to
expand the REFIID macro, because it is documented and the user that reads
the documentation should use it when implementing the interface.
By setting the following in the config file:
\verbatim
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED = "DECLARE_INTERFACE(name)=class name" \
"STDMETHOD(result,name)=virtual result name" \
"PURE= = 0" \
THIS_= \
THIS= \
__cplusplus
\endverbatim
we can make sure that the proper result is fed to doxygen's parser:
\verbatim
/*! A reference to an IID */
#define REFIID
/*! The IUnknown interface */
class IUnknown
{
virtual HRESULT QueryInterface ( REFIID iid, void **ppv) = 0;
virtual ULONG AddRef () = 0;
virtual ULONG Release () = 0;
};
\endverbatim
Note that the \ref cfg_predefined "PREDEFINED" tag accepts function
like macro definitions
(like \c DECLARE_INTERFACE ), normal macro
substitutions (like \c PURE and \c THIS) and plain
defines (like \c __cplusplus).
Note also that preprocessor definitions that are normally defined
automatically by the preprocessor (like \c __cplusplus), have to be defined
by hand with doxygen's parser (this is done because these defines
are often platform/compiler specific).
In some cases you may want to substitute a macro name or function by
something else without exposing the result to further macro substitution.
You can do this but using the <code>:=</code> operator instead of
<code>=</code>
As an example suppose we have the following piece of code:
\verbatim
#define QList QListT
class QListT
{
};
\endverbatim
Then the only way to get doxygen interpret this as a class definition
for class QList is to define:
\verbatim
PREDEFINED = QListT:=QList
\endverbatim
Here is example provided by Valter Minute that helps doxygen to
wade through the boilerplate code in Microsoft's ATL library:
\verbatim
PREDEFINED = DECLARE_REGISTRY_RESOURCEID=// \
DECLARE_PROTECT_FINAL_CONSTRUCT=// \
BEGIN_COM_MAP=/* \
END_COM_MAP=*/// \
BEGIN_PROP_MAP=/* \
END_PROP_MAP=*/// \
BEGIN_MSG_MAP=/* \
END_MSG_MAP=*/// \
DECLARE_VIEW_STATUS=// \
"STDMETHOD(a)=HRESULT a" \
"ATL_NO_VTABLE= "\
"__declspec(a)= "\
BEGIN_CONNECTION_POINT_MAP=/* \
END_CONNECTION_POINT_MAP=*///
\endverbatim
As you can see doxygen's preprocessor is quite powerful, but if you want
even more flexibility you can always write an input filter and specify it
after the \ref cfg_input_filter "INPUT_FILTER" tag.
If you are unsure what the effect of doxygen's preprocessing will be
you can run doxygen as follows:
\verbatim
doxygen -d Preprocessor
\endverbatim
This will instruct doxygen to dump the input sources to standard output after
preprocessing has been done (Hint: set <code>QUIET = YES</code> and
<code>WARNINGS = NO</code> in the configuration file to disable any other
output).
\htmlonly
Go to the <a href="external.html">next</a> section or return to the
<a href="index.html">index</a>.
\endhtmlonly
*/
This diff is collapsed.
......@@ -18,15 +18,16 @@
<h2>Known problems:</h2>
<ul>
<li>Doxygen is <em>not</em> a compiler, it is only a lexical scanner.
<li>Doxygen is <em>not</em> a real compiler, it is only a lexical scanner.
This means that it can and will not detect errors in your source code.
<li>Since it impossible to test all possible code fragments, it is
very well possible, that some valid piece of C/C++ code is not handled
properly. If you find such a piece, please send it to me, so I can
improve doxygen's parsing capabilities. Try to make the piece of code
you send as small as possible, to help me narrow down the search.
<li>Using declarations are not yet supported. They are simply ignored.
Using directives are supported however.
<li>Using declarations for member are not yet supported.
They are simply ignored. Using declarations for class and using
directives are supported however.
<li>Doxygen does not work properly if there are multiple classes, structs
or unions with the same name in your code. It should not crash however,
rather it should ignore all of the classes with the same name except one.
......@@ -52,6 +53,9 @@
then doxygen will remove the braces and correctly parse the result.
<li>Not all names in code fragments that are included in the documentation
are replaced by links (for instance when using \c SOURCE_BROWSER = \c YES).
This also holds for the "Referenced by" list that is generated for
each function.
For a part this is because the code parser isn't smart enough at the
moment. I'll try to improve this in the future. But even with these
improvements not everthing can be properly linked to the corresponding
......@@ -60,6 +64,10 @@
<li>It is not possible to insert a non-member function f in a class A
using the \relates command, if class A already has a member with name f
and the same argument list.
<li>There is only very limited support for member specialization at the
moment. It only works if there is a specialized template class as
well.
<li>Not all special commands are properly translated to RTF.
</ul>
......
>Test: "class_test.html"
>Test: "class_Test.html"
example a0 "()"
REM make script for Microsoft Visual C++
if "%QTDIR%"=="" goto ERROR
REM use perl to create the config file
perl wintools\make.pl
type makeconfig Makefile.win.in >Makefile
type makeconfig src\Makefile.in >src\Makefile
type makeconfig examples\Makefile.win.in >examples\Makefile
type makeconfig doc\Makefile.win.in >doc\Makefile
type src\doxygen.pro.in | sed "s/\$extraopts/release/g" >src\doxygen.pro
type src\doxytag.pro.in | sed "s/\$extraopts/release/g" >src\doxytag.pro
type src\doxysearch.pro.in | sed "s/\$extraopts/release/g" >src\doxysearch.pro
nmake
goto END
:ERROR
echo The QTDIR environment variable is not set! See the INSTALL file for more info.
goto END
:END
REM make script for Microsoft Visual C++
REM goto OK
if not '%QTDIR%'=='' goto OK
echo The QTDIR environment variable is not set! See the INSTALL file for more info.
rem You can also remove the comment from the upper "REM goto OK" line
rem and set the QTDIR correctly on the line below.
goto END
:OK
REM Change the QTDIR setting as appropriate (at the following line)
if '%QTDIR%'=='' set QTDIR=c:\usr\qt-1.44
REM Generate the batch for compilation from the src subdirectory (make.bat)
echo set QTDIR=%QTDIR%>src\make.bat
echo nmake>>src\make.bat
REM use perl to create the config file
perl wintools\make.pl
type makeconfig Makefile.win.in >Makefile
type makeconfig src\Makefile.in >src\Makefile
type makeconfig examples\Makefile.win.in >examples\Makefile
type makeconfig doc\Makefile.win.in >doc\Makefile
type src\doxygen.pro.in | sed "s/\$extraopts/release/g" >src\doxygen.pro
type src\doxytag.pro.in | sed "s/\$extraopts/release/g" >src\doxytag.pro
type src\doxysearch.pro.in | sed "s/\$extraopts/release/g" >src\doxysearch.pro
nmake
:END
Name: doxygen
Version: 1.1.5-20000709
Version: 1.1.5-20000716
Summary: documentation system for C, C++ and IDL
Release: 1
Source0: doxygen-%{version}.src.tar.gz
......
......@@ -532,7 +532,8 @@ static void generateMemberLink(OutputList &ol,const char *varName,
MemberDef *vmd;
for (;(vmd=vmni.current());++vmni)
{
if (vmd->isVariable() && vmd->memberClass()==vcd)
if ((vmd->isVariable() || vmd->isFunction()) &&
vmd->memberClass()==vcd)
{
//printf("Found variable type=%s\n",vmd->typeString());
ClassDef *mcd=stripClassName(vmd->typeString());
......@@ -924,12 +925,26 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
QCString text=yytext;
g_name+=text.left(i);
}
<Body>{SCOPENAME}/{B}* {
<Body>{SCOPENAME}/{B}* { // p->func()
generateClassLink(*g_code,yytext);
addType();
g_name+=yytext;
}
<Body>{SCOPENAME}/{B}*"(" {
<Body>"("{B}*"*"{B}*{SCOPENAME}*{B}*")"/{B}* { // (*p)->func()
QCString text=yytext;
int s=0;
while (s<yyleng && (text.at(s)=='(' || isspace(text.at(s)))) s++;
int e=yyleng-1;
while (e>=0 && (text.at(e)==')' || isspace(yytext[e]))) e--;
QCString varname = text.mid(s+1,e-s);
QCString tmp=varname.copy();
g_code->docify(text.left(s+1));
generateClassLink(*g_code,tmp.data());
g_code->docify(text.right(yyleng-e-1));
addType();
g_name+=varname;
}
<Body>{SCOPENAME}/{B}*"(" { // func1()->func2()
addType();
generateFunctionLink(*g_code,yytext);
g_bracketCount=1;
......@@ -1051,15 +1066,23 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_parmType.resize(0);g_parmName.resize(0);
BEGIN( Body );
}
<MemberCall2,FuncCall>")"[ \t\n]*";" {
<MemberCall2,FuncCall>")"[ \t\n]*[;:] {
codifyLines(yytext);
g_bracketCount=0;
g_searchingForBody=FALSE;
if (!g_inClass && !g_type.isEmpty())
addVariable();
g_name.resize(0);g_type.resize(0);
g_parmType.resize(0);g_parmName.resize(0);
BEGIN( Body );
if (yytext[yyleng-1]==';' || g_insideBody)
{
g_name.resize(0);g_type.resize(0);
BEGIN( Body );
}
else
{
g_bracketCount=0;
BEGIN( SkipInits );
}
}
<MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" {
addParameter();
......@@ -1081,16 +1104,11 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_type.resize(0); g_name.resize(0);
BEGIN( Body );
}
/*
<MemberCall2,FuncCall>")"[ \t\n]*":" {
addParameter();
g_parmType.resize(0);g_parmName.resize(0);
if (g_name.find("::")!=-1) setClassScope(g_name);
codifyLines(yytext);
<SkipInits>";" {
g_code->codify(yytext);
g_type.resize(0); g_name.resize(0);
BEGIN( SkipInits );
BEGIN( Body );
}
*/
<SkipInits>"{" {
g_code->codify(yytext);
g_curlyCount++;
......@@ -1100,6 +1118,8 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_insideBody=TRUE;
}
if (g_insideBody) g_bodyCurlyCount++;
if (g_name.find("::")!=-1) setClassScope(g_name);
g_type.resize(0); g_name.resize(0);
BEGIN( Body );
}
<SkipInits>{ID} {
......
/* This file was generated by configgen on Fri Jul 14 20:01:34 2000
* from config_templ.h
*
* DO NOT EDIT!
*/
/******************************************************************************
*
*
......@@ -105,6 +111,7 @@ struct Config
static bool onlyPredefinedFlag; // expand only predefined macros
static bool searchIncludeFlag; // search for included files
static QStrList includePath; // list of include paths
static QStrList includeFilePatternList; // list of include file patterns
static QStrList predefined; // list of predefined macro names.
static QStrList expandAsDefinedList; // list of defines to expand
static QStrList tagFileList; // list of tag files
......
/* This file was generated by configgen on Fri Jul 14 20:01:34 2000
* from config_templ.l
*
* DO NOT EDIT!
*/
/******************************************************************************
*
*
......@@ -86,7 +92,7 @@ bool Config::classDiagramFlag = TRUE;
bool Config::sourceBrowseFlag = FALSE;
bool Config::inlineSourceFlag = FALSE;
bool Config::stripCommentsFlag = TRUE;
bool Config::caseSensitiveNames = FALSE;
bool Config::caseSensitiveNames = TRUE;
bool Config::hideScopeNames = FALSE;
bool Config::verbatimHeaderFlag = TRUE;
bool Config::showIncFileFlag = TRUE;
......@@ -140,6 +146,7 @@ bool Config::macroExpansionFlag = FALSE;
bool Config::onlyPredefinedFlag = FALSE;
bool Config::searchIncludeFlag = TRUE;
QStrList Config::includePath;
QStrList Config::includeFilePatternList;
QStrList Config::predefined;
QStrList Config::expandAsDefinedList;
QStrList Config::tagFileList;
......@@ -288,6 +295,7 @@ static int yyread(char *buf,int max_size)
<Start>"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; }
<Start>"SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchIncludeFlag; }
<Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; l->clear(); elemStr=""; }
<Start>"INCLUDE_FILE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includeFilePatternList; l->clear(); elemStr=""; }
<Start>"PREDEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::predefined; l->clear(); elemStr=""; }
<Start>"EXPAND_AS_DEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::expandAsDefinedList; l->clear(); elemStr=""; }
<Start>"TAGFILES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::tagFileList; l->clear(); elemStr=""; }
......@@ -566,6 +574,14 @@ void dumpConfig()
is=Config::includePath.next();
}
}
{
char *is=Config::includeFilePatternList.first();
while (is)
{
printf("includeFilePatternList=`%s'\n",is);
is=Config::includeFilePatternList.next();
}
}
{
char *is=Config::predefined.first();
while (is)
......@@ -643,7 +659,7 @@ void Config::init()
Config::sourceBrowseFlag = FALSE;
Config::inlineSourceFlag = FALSE;
Config::stripCommentsFlag = TRUE;
Config::caseSensitiveNames = FALSE;
Config::caseSensitiveNames = TRUE;
Config::hideScopeNames = FALSE;
Config::verbatimHeaderFlag = TRUE;
Config::showIncFileFlag = TRUE;
......@@ -697,6 +713,7 @@ void Config::init()
Config::onlyPredefinedFlag = FALSE;
Config::searchIncludeFlag = TRUE;
Config::includePath.clear();
Config::includeFilePatternList.clear();
Config::predefined.clear();
Config::expandAsDefinedList.clear();
Config::tagFileList.clear();
......@@ -955,7 +972,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \n";
t << "# can be used to strip a user defined part of the path. Stripping is \n";
t << "# only done if one of the specified strings matches the left-hand part of \n";
t << "# the path. \n";
t << "# the path. It is allowed to use relative paths in the argument list.\n";
t << "\n";
}
t << "STRIP_FROM_PATH = ";
......@@ -1678,6 +1695,18 @@ void writeTemplateConfig(QFile *f,bool sl)
writeStringList(t,Config::includePath);
t << "\n";
if (!sl)
{
t << "\n";
t << "# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard \n";
t << "# patterns (like *.h and *.hpp) to filter out the header-files in the \n";
t << "# directories. If left blank, the patterns specified with FILE_PATTERNS will \n";
t << "# be used. \n";
t << "\n";
}
t << "INCLUDE_FILE_PATTERNS = ";
writeStringList(t,Config::includeFilePatternList);
t << "\n";
if (!sl)
{
t << "\n";
t << "# The PREDEFINED tag can be used to specify one or more macro names that \n";
......@@ -2164,6 +2193,7 @@ void substituteEnvironmentVars()
substEnvVarsInString( Config::manOutputDir );
substEnvVarsInString( Config::manExtension );
substEnvVarsInStrList( Config::includePath );
substEnvVarsInStrList( Config::includeFilePatternList );
substEnvVarsInStrList( Config::predefined );
substEnvVarsInStrList( Config::expandAsDefinedList );
substEnvVarsInStrList( Config::tagFileList );
......
......@@ -132,6 +132,7 @@ static bool readCodeFragment(const char *fileName,
if (f.open(IO_ReadOnly))
{
int c=0;
int col=0;
int lineNr=1;
// skip until the startLine has reached
while (lineNr<startLine && !f.atEnd())
......@@ -146,7 +147,21 @@ static bool readCodeFragment(const char *fileName,
char cn=0;
while (lineNr<=endLine && !f.atEnd() && !found)
{
while ((c=f.getch())!='{' && c!=':' && c!=-1) if (c=='\n') lineNr++;
while ((c=f.getch())!='{' && c!=':' && c!=-1)
{
if (c=='\n')
{
lineNr++,col=0;
}
else if (c=='\t')
{
col+=Config::tabSize - (col%Config::tabSize);
}
else
{
col++;
}
}
if (c==':')
{
cn=f.getch();
......@@ -159,6 +174,9 @@ static bool readCodeFragment(const char *fileName,
}
if (found)
{
// full the line with spaces until the right column
int i;
for (i=0;i<col;i++) result+=' ';
// copy until end of line
result+=c;
if (c==':') result+=cn;
......@@ -346,10 +364,19 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
}
if (md->getStartBodyLine()!=-1 && md->getBodyDef())
{
// for HTML write a real link
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
QCString lineStr,anchorStr;
anchorStr.sprintf("l%05d",md->getStartBodyLine());
ol.writeObjectLink(0,md->getBodyDef()->sourceName(),
anchorStr,name);
ol.writeObjectLink(0,md->getBodyDef()->sourceName(),anchorStr,name);
ol.popGeneratorState();
// for the other output formats just mention the name
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
ol.docify(name);
ol.popGeneratorState();
}
else
{
......
......@@ -985,9 +985,11 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
output << ":\\begin{figure}[H]\n"
"\\begin{center}\n"
"\\leavevmode\n";
output << "\\setlength{\\epsfysize}{" << realHeight << "cm}\n";
output << "\\epsfbox{" << fileName << ".eps}\n"
"\\end{center}\n"
//output << "\\setlength{\\epsfysize}{" << realHeight << "cm}\n";
//output << "\\epsfbox{" << fileName << ".eps}\n"
output << "\\includegraphics[height=" << realHeight << "cm]{"
<< fileName << "}" << endl;
output << "\\end{center}\n"
"\\end{figure}\n";
//printf("writeFigure rows=%d cols=%d\n",rows,cols);
......
This diff is collapsed.
This diff is collapsed.
......@@ -51,6 +51,7 @@ Entry::Entry(const Entry &e)
sig = e.sig;
slot = e.slot;
stat = e.stat;
explicitExternal = e.explicitExternal;
virt = e.virt;
parent = e.parent;
type = e.type.copy();
......@@ -219,6 +220,7 @@ void Entry::reset()
slot = FALSE;
stat = FALSE;
proto = FALSE;
explicitExternal = FALSE;
memSpec = 0;
subGrouping = TRUE;
protection = Public;
......
......@@ -164,6 +164,7 @@ class Entry
bool sig; // a Qt signal ?
bool slot; // a Qt slot ?
bool stat; // static ?
bool explicitExternal; // explicitly defined as external?
bool proto; // prototype ?
int memSpec; // member specifiers
int initLines; // define/variable initializer lines to show
......
......@@ -633,6 +633,7 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local
//-----------------------------------------------------------------------------
#if 0
/*! Creates a file list. */
FileList::FileList() : QList<FileDef>()
{
......@@ -659,4 +660,4 @@ FileListIterator::FileListIterator(const FileList &cllist) :
QListIterator<FileDef>(cllist)
{
}
#endif
......@@ -169,6 +169,7 @@ class FileDef : public Definition
MemberGroupDict *memberGroupDict;
};
#if 0 // obsolete
/*! \class FileList filedef.h
\brief This class is list of file definitions.
......@@ -195,5 +196,43 @@ class FileListIterator : public QListIterator<FileDef>
public:
FileListIterator(const FileList &list);
};
#endif
class FileList : public QList<FileDef>
{
public:
FileList() : m_pathName("tmp") {}
FileList(const char *path) : QList<FileDef>(), m_pathName(path) {}
~FileList() {}
QCString path() const { return m_pathName; }
int compareItems(GCI item1,GCI item2)
{
FileDef *md1 = (FileDef *)item1;
FileDef *md2 = (FileDef *)item2;
return strcasecmp(md1->name(),md2->name());
}
private:
QCString m_pathName;
};
class OutputNameList : public QList<FileList>
{
public:
OutputNameList() : QList<FileList>() {}
~OutputNameList() {}
int compareItems(GCI item1,GCI item2)
{
FileList *fl1 = (FileList *)item1;
FileList *fl2 = (FileList *)item2;
return strcasecmp(fl1->path(),fl2->path());
}
};
class OutputNameDict : public QDict<FileList>
{
public:
OutputNameDict(int size) : QDict<FileList>(size) {}
~OutputNameDict() {}
};
#endif
......@@ -100,7 +100,7 @@ void FormulaList::generateBitmaps(const char *path)
{
//printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null");
if (system("latex _formulas.tex")!=0)
if (iSystem("latex _formulas.tex")!=0)
{
err("Problems running latex. Check your installation or look for typos in _formulas.tex!\n");
formulaError=TRUE;
......@@ -121,7 +121,7 @@ void FormulaList::generateBitmaps(const char *path)
// encapsulated postscript.
sprintf(dviCmd,"dvips -q -D 600 -E -n 1 -p %d -o %s.eps _formulas.dvi",
pageIndex,formBase.data());
if (system(dviCmd)!=0)
if (iSystem(dviCmd)!=0)
{
err("Problems running dvips. Check your installation!\n");
return;
......@@ -183,7 +183,7 @@ void FormulaList::generateBitmaps(const char *path)
);
#endif
//printf("Running ghostscript...\n");
if (system(gsCmd)!=0)
if (iSystem(gsCmd)!=0)
{
err("Problem running ghostscript. Check your installation!\n");
return;
......
......@@ -28,12 +28,37 @@
#include "diagram.h"
#include "version.h"
#include "dot.h"
#include "language.h"
#define GROUP_COLOR "#ff8080"
//#define DBG_HTML(x) x;
#define DBG_HTML(x)
static const char *defaultStyleSheet =
"H1 { text-align: center; }\n"
"A.qindex {}\n"
"A.qindexRef {}\n"
"A.el { text-decoration: none; font-weight: bold }\n"
"A.elRef { font-weight: bold }\n"
"A.code { text-decoration: none; font-weight: normal; color: #4444ee }\n"
"A.codeRef { font-weight: normal; color: #4444ee }\n"
"DL.el { margin-left: -1cm }\n"
"DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n"
"DIV.in { margin-left: 16 }\n"
"DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 }\n"
"TD.md { background-color: #f2f2ff }\n"
"DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold }\n"
"DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }\n"
"FONT.keyword { color: #008000 }\n"
"FONT.keywordtype { color: #604020 }\n"
"FONT.keywordflow { color: #e08000 }\n"
"FONT.comment { color: #800000 }\n"
"FONT.preprocessor { color: #806020 }\n"
"FONT.stringliteral { color: #002080 }\n"
"FONT.charliteral { color: #008080 }\n";
HtmlHelp *HtmlGenerator::htmlHelp = 0;
HtmlGenerator::HtmlGenerator() : OutputGenerator()
......@@ -66,6 +91,11 @@ void HtmlGenerator::init()
writeNullImage(Config::htmlOutputDir);
}
void HtmlGenerator::writeStyleSheetFile(QFile &file)
{
QTextStream t(&file);
t << defaultStyleSheet;
}
void HtmlGenerator::startFile(const char *name,const char *title,bool external)
{
QCString fileName=name;
......@@ -77,6 +107,8 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external)
{
t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
"<html><head><meta name=\"robots\" content=\"noindex\">\n"
"<meta http-equiv=\"Content-Type\" content=\"text/html;charset="
<< theTranslator->idLanguageCharset() << "\">\n"
"<title>" << title << "</title>\n";
t << "<link ";
if (external)
......@@ -198,29 +230,7 @@ void HtmlGenerator::writeStyleInfo(int part)
//t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
//t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
t << "H1 { text-align: center; }" << endl;
t << "A.qindex {}" << endl;
t << "A.qindexRef {}" << endl;
t << "A.el { text-decoration: none; font-weight: bold }" << endl;
t << "A.elRef { font-weight: bold }" << endl;
t << "A.code { text-decoration: none; font-weight: normal; color: #4444ee }" << endl;
t << "A.codeRef { font-weight: normal; color: #4444ee }" << endl;
t << "DL.el { margin-left: -1cm }" << endl;
t << "DIV.fragment { width: 100%; border: none; background-color: #eeeeee }" << endl;
t << "DIV.in { margin-left: 16 }" << endl;
t << "DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 }" << endl;
t << "TD.md { background-color: #f2f2ff }" << endl;
t << "DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold }" << endl;
t << "DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller }" << endl;
t << "FONT.keyword { color: #008000 }" << endl;
t << "FONT.keywordtype { color: #604020 }" << endl;
t << "FONT.keywordflow { color: #e08000 }" << endl;
t << "FONT.comment { color: #800000 }" << endl;
t << "FONT.preprocessor { color: #806020 }" << endl;
t << "FONT.stringliteral { color: #002080 }" << endl;
t << "FONT.charliteral { color: #008080 }" << endl;
//t << "TD.groupLine { background-color: #3080ff }" << endl;
t << endl;
t << defaultStyleSheet;
endPlainFile();
}
else // write user defined style sheet
......@@ -759,8 +769,8 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const
t << "<p>" << endl;
t << "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\">" << endl;
t << " <tr>" << endl;
t << " <td class=\"md\"><b>" << endl;
t << " <table cellspadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl;
t << " <td class=\"md\">" << endl;
t << " <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl;
}
void HtmlGenerator::startMemberDocPrefixItem()
......@@ -887,3 +897,20 @@ void HtmlGenerator::endMemberGroup(bool)
{
}
void HtmlGenerator::startIndent()
{
//t << "<div class=\"in\">" << endl;
t << "<table cellspacing=5 cellpadding=0 border=0>\n"
" <tr>\n"
" <td>\n"
" &nbsp;\n"
" </td>\n"
" <td>\n";
}
void HtmlGenerator::endIndent()
{
t << " </td>\n"
" </tr>\n"
"</table>\n";
//t << "</div>" << endl;
}
......@@ -29,6 +29,8 @@ class HtmlGenerator : public OutputGenerator
public:
HtmlGenerator();
~HtmlGenerator();
static void init();
static void writeStyleSheetFile(QFile &f);
OutputGenerator *copy() { return new HtmlGenerator; }
//OutputGenerator *clone() { return new HtmlGenerator(*this); }
......@@ -41,7 +43,6 @@ class HtmlGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==Html && active); }
OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; }
static void init();
//void generateExternalIndex();
void startFile(const char *name,const char *title,bool external);
......@@ -185,8 +186,8 @@ class HtmlGenerator : public OutputGenerator
void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *);
void addToIndex(const char *,const char *) {}
void startIndent() { t << "<div class=\"in\">" << endl; }
void endIndent() { t << "</div>" << endl; }
void startIndent();
void endIndent();
void writeSynopsis() {}
void startClassDiagram();
void endClassDiagram(ClassDiagram &,const char *,const char *);
......
......@@ -37,6 +37,8 @@
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// strips w from s iff s starts with w
bool stripWord(QCString &s,QCString w)
{
......@@ -367,19 +369,50 @@ void writeFileIndex(OutputList &ol)
//ol.newParagraph();
ol.endTextBlock();
ol.startIndexList();
OutputNameDict outputNameDict(1009);
OutputNameList outputNameList;
outputNameList.setAutoDelete(TRUE);
// re-sort input files in (dir,file) output order instead of (file,dir) input order
FileName *fn=inputNameList.first();
while (fn)
{
FileDef *fd=fn->first();
while (fd)
{
QCString path=fd->getPath();
if (path.isEmpty()) path="[external]";
FileList *fl = outputNameDict.find(path);
if (fl)
{
fl->inSort(fd);
//printf("+ inserting %s---%s\n",fd->getPath().data(),fd->name().data());
}
else
{
//printf("o inserting %s---%s\n",fd->getPath().data(),fd->name().data());
fl = new FileList(path);
fl->inSort(fd);
outputNameList.inSort(fl);
outputNameDict.insert(path,fl);
}
fd=fn->next();
}
fn=inputNameList.next();
}
ol.startIndexList();
FileList *fl=outputNameList.first();
while (fl)
{
FileDef *fd=fl->first();
while (fd)
{
//printf("Found filedef %s\n",fd->name().data());
bool doc = fd->isLinkableInProject();
bool src = fd->generateSource() || Config::sourceBrowseFlag;
if ((doc || src) && !fd->isReference())
{
//ol.writeIndexItem(fd->getReference(),fd->diskName(),
// fd->name());
QCString path;
if (Config::fullPathNameFlag)
{
......@@ -419,6 +452,10 @@ void writeFileIndex(OutputList &ol)
if (doc)
{
ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name());
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(fd->name(),fd->getOutputFileBase());
}
}
else
{
......@@ -434,7 +471,6 @@ void writeFileIndex(OutputList &ol)
parseText(ol,theTranslator->trCode());
ol.docify("]");
ol.endTextLink();
//ol.writeObjectLink(0,fd->includeName(),0," [src]");
}
if (!fd->briefDescription().isEmpty())
{
......@@ -447,18 +483,13 @@ void writeFileIndex(OutputList &ol)
ol+=briefOutput;
ol.docify(")");
}
//ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
// --------------------------------------------------------
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(fd->name(),fd->getOutputFileBase());
}
}
fd=fn->next();
fd=fl->next();
}
fn=inputNameList.next();
fl=outputNameList.next();
}
ol.endIndexList();
if (hasHtmlHelp)
......@@ -773,7 +804,7 @@ void writeAlphabeticalClassList(OutputList &ol)
}
// generate table
for (i=0;i<rows;i++) // forarch table row
for (i=0;i<rows;i++) // foreach table row
{
ol.nextTableRow();
// the last column may contain less items then the others
......@@ -1474,10 +1505,7 @@ void writeGroupList(OutputList &ol)
{
ol.startDescItem();
ol.startTextLink(gd->getOutputFileBase(),0);
parseDoc(ol,
gd->getDefFileName(),gd->getDefLine(),
0,0,
gd->groupTitle());
parseText(ol,gd->groupTitle());
ol.endTextLink();
ol.endDescItem();
parseDoc(ol,
......
This diff is collapsed.
......@@ -27,6 +27,8 @@ class LatexGenerator : public OutputGenerator
public:
LatexGenerator();
~LatexGenerator();
static void init();
static void writeStyleSheetFile(QFile &f);
OutputGenerator *copy();
//OutputGenerator *clone() { return new LatexGenerator(*this); }
......@@ -39,7 +41,6 @@ class LatexGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==Latex && active); }
OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; }
static void init();
void startFile(const char *name,const char *title, bool external);
void writeFooter(int,bool) {}
void endFile();
......
......@@ -54,7 +54,9 @@ MemberGroup::~MemberGroup()
void MemberGroup::insertMember(MemberDef *md)
{
//printf("MemberGroup::insertMember memberList=%p count=%d"
// " member section list: %p\n",memberList,memberList->count(),
// " member section list: %p\n",
// memberList->first() ? memberList->first()->getSectionList() : 0,
// memberList->count(),
// md->getSectionList());
if (inSameSection && memberList->count()>0 &&
memberList->first()->getSectionList()!=md->getSectionList())
......
......@@ -78,4 +78,5 @@ class MemberDict : public QDict<MemberDef>
~MemberDict() {}
};
#endif
......@@ -668,12 +668,26 @@ QCString removeIdsAndMarkers(const char *s)
}
p+=2;
}
else if (isdigit(c))
else if (isdigit(c)) // number
{
result+=c;
p++;
inNum=TRUE;
}
else if (c=='d') // identifier starting with a `d'
{
if (strncmp(p,"defined ",8)==0 || strncmp(p,"defined(",8)==0)
// defined keyword
{
p+=7; // skip defined
}
else
{
result+="0L";
p++;
while ((c=*p) && isId(c)) p++;
}
}
else if ((isalpha(c) || c=='_') && !inNum) // replace identifier with 0L
{
result+="0L";
......@@ -731,8 +745,10 @@ bool computeExpression(const QCString &expr)
{
QCString e=expr;
expandExpression(e,0,0);
//printf("after expansion `%s'\n",e.data());
e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE;
//printf("parsing `%s'\n",e.data());
return parseCppExpression(e);
}
......
This diff is collapsed.
......@@ -27,6 +27,8 @@ class RTFGenerator : public OutputGenerator
public:
RTFGenerator();
~RTFGenerator();
static void init();
static void writeStyleSheetFile(QFile &f);
OutputGenerator *copy();
//OutputGenerator *clone() { return new RTFGenerator(*this); }
......@@ -39,7 +41,6 @@ class RTFGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==RTF && active); }
OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; }
static void init();
void startFile(const char *name,const char *title, bool external);
void writeFooter(int,bool) {}
void endFile();
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment