Commit 8feba3b6 authored by dimitri's avatar dimitri

Release-1.1.5-20000716

parent 61a83f31
DOXYGEN Version 1.1.5-20000709 DOXYGEN Version 1.1.5-20000716
CONTENTS Please read the installation section of the manual for instructions.
--------
- 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:
nmake examples --------
Dimitri van Heesch (16 July 2000)
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)
DOXYGEN Version 1.1.5-20000709 DOXYGEN Version 1.1.5-20000716
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at ...@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy, 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 @@ ...@@ -22,10 +22,13 @@
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
#include <qstrlist.h> #include <qstrlist.h>
#include <qdatetime.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#define MAX_OPTION_LENGTH 22
static QString spaces=" "; static QString spaces=" ";
void init(); // defined below void init(); // defined below
...@@ -124,7 +127,7 @@ class ConfigOption ...@@ -124,7 +127,7 @@ class ConfigOption
t << " t << \"\\n\";" << endl; t << " t << \"\\n\";" << endl;
t << " }" << endl; t << " }" << endl;
t << " t << \"" << cfgName; t << " t << \"" << cfgName;
t << spaces.left(22-cfgName.length()); t << spaces.left(MAX_OPTION_LENGTH-cfgName.length());
t << "= \";" << endl; t << "= \";" << endl;
t << " " << writeFunc << "(t,Config::" << varName << ");" << endl; t << " " << writeFunc << "(t,Config::" << varName << ");" << endl;
t << " t << \"\\n\";" << endl; t << " t << \"\\n\";" << endl;
...@@ -257,7 +260,7 @@ class ConfigList : public ConfigOption ...@@ -257,7 +260,7 @@ class ConfigList : public ConfigOption
virtual void printRules(QTextStream &t) virtual void printRules(QTextStream &t)
{ {
t << "<Start>\"" << cfgName << "\"[ \\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 << "{ BEGIN(GetStrList); l=&Config::" << varName;
t << "; l->clear(); elemStr=\"\"; }" << endl; t << "; l->clear(); elemStr=\"\"; }" << endl;
} }
...@@ -357,7 +360,7 @@ class ConfigString : public ConfigOption ...@@ -357,7 +360,7 @@ class ConfigString : public ConfigOption
virtual void printRules(QTextStream &t) virtual void printRules(QTextStream &t)
{ {
t << "<Start>\"" << cfgName << "\"[ \\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 << "{ BEGIN(GetString); s=&Config::" << varName;
t << "; s->resize(0); }" << endl; t << "; s->resize(0); }" << endl;
} }
...@@ -462,7 +465,7 @@ class ConfigInt : public ConfigOption ...@@ -462,7 +465,7 @@ class ConfigInt : public ConfigOption
virtual void printRules(QTextStream &t) virtual void printRules(QTextStream &t)
{ {
t << "<Start>\"" << cfgName << "\"[ \\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 << "{ BEGIN(GetString); s=&" << varName;
t << "String; s->resize(0); }" << endl; t << "String; s->resize(0); }" << endl;
} }
...@@ -528,7 +531,7 @@ class ConfigBool : public ConfigOption ...@@ -528,7 +531,7 @@ class ConfigBool : public ConfigOption
virtual void printRules(QTextStream &t) virtual void printRules(QTextStream &t)
{ {
t << "<Start>\"" << cfgName << "\"[ \\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 << "{ BEGIN(GetBool); b=&Config::" << varName;
t << "; }" << endl; t << "; }" << endl;
} }
...@@ -691,11 +694,14 @@ int main(int argc,char * argv[]) ...@@ -691,11 +694,14 @@ int main(int argc,char * argv[])
const int maxLineLen=10000; const int maxLineLen=10000;
char buf[maxLineLen]; char buf[maxLineLen];
QFile f; QFile f;
f.open(IO_WriteOnly,stdout); f.open(IO_WriteOnly,stdout);
QTextStream t(&f); 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 // process template file
while (!ctfile.atEnd()) while (!ctfile.atEnd())
{ {
...@@ -868,7 +874,7 @@ void init() ...@@ -868,7 +874,7 @@ void init()
"If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \n" "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" "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" "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"); addDependency("stripFromPath","fullPathNameFlag");
ConfigBool::add( "internalDocsFlag", ConfigBool::add( "internalDocsFlag",
...@@ -912,7 +918,7 @@ void init() ...@@ -912,7 +918,7 @@ void init()
); );
ConfigBool::add( "caseSensitiveNames", ConfigBool::add( "caseSensitiveNames",
"CASE_SENSE_NAMES", "CASE_SENSE_NAMES",
"FALSE", "TRUE",
"determines if output can be mixed case.", "determines if output can be mixed case.",
"If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen \n" "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" "will only generate file names in lower case letters. If set to \n"
...@@ -1425,6 +1431,16 @@ void init() ...@@ -1425,6 +1431,16 @@ void init()
ConfigList::Dir ConfigList::Dir
); );
addDependency("includePath","preprocessingFlag"); 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", ConfigList::add( "predefined",
"PREDEFINED", "PREDEFINED",
"", "",
......
...@@ -27,8 +27,9 @@ GENERATE_HTML = YES ...@@ -27,8 +27,9 @@ GENERATE_HTML = YES
GENERATE_HTMLHELP = YES GENERATE_HTMLHELP = YES
GENERATE_RTF = NO GENERATE_RTF = NO
ENABLE_PREPROCESSING = NO ENABLE_PREPROCESSING = NO
INPUT = index.doc install.doc starting.doc faq.doc trouble.doc \ INPUT = index.doc install.doc starting.doc docblocks.doc \
history.doc features.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 \ doxygen_usage.doc doxytag_usage.doc doxysearch_usage.doc \
installdox_usage.doc output.doc autolink.doc \ installdox_usage.doc output.doc autolink.doc \
config.doc commands.doc htmlcmds.doc language.doc config.doc commands.doc htmlcmds.doc language.doc
......
/******************************************************************************
*
*
*
* 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] ...@@ -51,6 +51,7 @@ Written by Dimitri van Heesch\\[2ex]
\input{formulas} \input{formulas}
\input{diagrams} \input{diagrams}
\input{preprocessing} \input{preprocessing}
\input{external}
\input{faq} \input{faq}
\input{trouble} \input{trouble}
\part{Reference Manual} \part{Reference Manual}
......
...@@ -86,7 +86,7 @@ follow these steps: ...@@ -86,7 +86,7 @@ follow these steps:
In fact the HTTP daemon that I tried (apache for Windows) only In fact the HTTP daemon that I tried (apache for Windows) only
recognized <code>.cgi</code> files that were renamed recognized <code>.cgi</code> files that were renamed
executables (so DOS batch files do not seem to work either). Therefore, 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 You should compile and link the program with your favourite
compiler and change the extension of the executable from compiler and change the extension of the executable from
<code>.exe</code> to <code>.cgi</code>. <code>.exe</code> to <code>.cgi</code>.
...@@ -96,7 +96,7 @@ follow these steps: ...@@ -96,7 +96,7 @@ follow these steps:
This is usually a special directory on your system or in your This is usually a special directory on your system or in your
home directory. home directory.
Consult the manual of your HTTP daemon or your system administrator to 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 <li>Goto the directory where the generated HTML files are located and run
doxytag as follows: doxytag as follows:
...@@ -104,13 +104,11 @@ follow these steps: ...@@ -104,13 +104,11 @@ follow these steps:
This will create a search index with the name <code>search.idx</code>. This will create a search index with the name <code>search.idx</code>.
Currently the index file <em>must</em> be called like this. Currently the index file <em>must</em> be called like this.
<li>Run <a href="installdox_usage.html">installdox</a> to replace <li>If you change the location of the search engine or the documentation
any dummy links in the documentation with real links. and you do not want to regenerate the HTML output, you can simply edit
the generated search.cfg file and run the generated
\par Note: <a href="installdox_usage.html">installdox</a> script to correct
When using a search engine this step is <em>required</em> the links in the documentation.
even if no tag files are used. If tag files are used you must specify
the correct options.
</ol> </ol>
......
...@@ -30,7 +30,8 @@ It has two functions: ...@@ -30,7 +30,8 @@ It has two functions:
directly from the HTML files. This has the advantage that you do not need directly from the HTML files. This has the advantage that you do not need
to have the sources from which the documentation was extracted. 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 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. the configuration file.
<li> <li>
Doxytag can generate a <em>search index</em> for the documentation 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>. ...@@ -68,7 +68,7 @@ as <code>PREPROCESSING = YES</code>.
Look at section \ref preprocessing for the answer. 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 You can document your class like
...@@ -162,6 +162,13 @@ Simply put an exclude pattern like this in the configuration file: ...@@ -162,6 +162,13 @@ Simply put an exclude pattern like this in the configuration file:
EXCLUDE_PATTERNS = */test/* EXCLUDE_PATTERNS = */test/*
\endverbatim \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> </ol>
\htmlonly \htmlonly
......
...@@ -29,15 +29,17 @@ ...@@ -29,15 +29,17 @@
<li>JavaDoc (1.1), Qt-Doc, and KDOC compatible. <li>JavaDoc (1.1), Qt-Doc, and KDOC compatible.
<li>Automatically generates class diagrams in HTML (as clickable <li>Automatically generates class diagrams in HTML (as clickable
image maps) and \f$\mbox{\LaTeX}\f$ (as encapsulated postscript images). 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 include dependency graphs, collaboration diagrams, and
graphical class hierarchy graphs. graphical class hierarchy graphs.
<li>Allows you to put documentation in the header file (before the <li>Allows you to put documentation in the header file (before the
declaration of an entity), source file (before the definition of an entity) declaration of an entity), source file (before the definition of an entity)
or in a separate file. 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 <li>Outputs documentation in on-line format (HTML and UNIX man page) and
off-line format (\f$\mbox{\LaTeX}\f$) and RTF simultaniously 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> ease of reading. <br>
Furthermore, compressed HTML can be generated from HTML output using Furthermore, compressed HTML can be generated from HTML output using
Microsoft's HTML help workshop (Windows only) and PDF can be generated Microsoft's HTML help workshop (Windows only) and PDF can be generated
...@@ -54,9 +56,6 @@ ...@@ -54,9 +56,6 @@
generated automatically. generated automatically.
<li>Includes a fast, rank based search engine to search for strings or words <li>Includes a fast, rank based search engine to search for strings or words
in the class and member documentation. 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 <li>You can type normal HTML tags in your documentation. Doxygen will convert
them to their equivalent \f$\mbox{\LaTeX}\f$ and man-page them to their equivalent \f$\mbox{\LaTeX}\f$ and man-page
counterparts automatically. counterparts automatically.
...@@ -69,8 +68,9 @@ ...@@ -69,8 +68,9 @@
looking into the implementation details. looking into the implementation details.
<li>Allows automatic cross-referencing of (documented) entities with their <li>Allows automatic cross-referencing of (documented) entities with their
definition in the source code. 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>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. configuration file.
<li>Documentation and search engine can be transferred to another <li>Documentation and search engine can be transferred to another
location or machine without regenerating the documentation. 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 @@ ...@@ -17,9 +17,38 @@
/*! \page history Doxygen History /*! \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> <h3>Version 1.0.0</h3>
<h4>New features:</h4> <h4>Major new features:</h4>
<ul> <ul>
<li>Support for templates and namespaces. <li>Support for templates and namespaces.
<li>Internationalization support. Currently supported languages are: <li>Internationalization support. Currently supported languages are:
...@@ -36,7 +65,7 @@ ...@@ -36,7 +65,7 @@
<h3>Version 0.4</h3> <h3>Version 0.4</h3>
<h4>New features:</h4> <h4>Major new features:</h4>
<ul> <ul>
<li>LaTeX output generation. <li>LaTeX output generation.
<li>Full JavaDoc support. <li>Full JavaDoc support.
...@@ -52,14 +81,9 @@ ...@@ -52,14 +81,9 @@
<li>Completely new documentation, that is now generated by Doxygen. <li>Completely new documentation, that is now generated by Doxygen.
<li>A lot of small examples are now included. <li>A lot of small examples are now included.
</ul> </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> <h3>Version 0.3</h3>
<h4>New features:</h4> <h4>Major new features:</h4>
<ul> <ul>
<li>A search engine <a href="doxysearch_usage.html">doxysearch</a>, <li>A search engine <a href="doxysearch_usage.html">doxysearch</a>,
that allows you to search through the generated documentation. that allows you to search through the generated documentation.
...@@ -75,24 +99,8 @@ ...@@ -75,24 +99,8 @@
documentation. documentation.
</ul> </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> <h3>Version 0.2</h3>
<h4>New features:</h4> <h4>Major new features:</h4>
<ul> <ul>
<li>Blocks of code are now parsed. Function calls and variables are <li>Blocks of code are now parsed. Function calls and variables are
replaced by links to their documentation if possible. replaced by links to their documentation if possible.
...@@ -112,17 +120,6 @@ ...@@ -112,17 +120,6 @@
instead of only the used ones. instead of only the used ones.
</ul> </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> <h3>Version 0.1</h3>
Initial version. Initial version.
......
...@@ -91,6 +91,7 @@ The first part forms a user manual: ...@@ -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 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 diagrams describes the diagrams and graphs that doxygen can generate.
<li>Section \ref preprocessing explains how doxygen deals with macro definitions. <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 faq gives answers to frequently asked questions.
<li>Section \ref trouble tells you what to do when you have problems. <li>Section \ref trouble tells you what to do when you have problems.
</ul> </ul>
...@@ -165,9 +166,10 @@ Thanks go to: ...@@ -165,9 +166,10 @@ Thanks go to:
sources. sources.
<li>Tim Mensch for adding the todo command. <li>Tim Mensch for adding the todo command.
<li>Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon, <li>Jens Breitenstein, Christophe Bordeaux, Samuel Hägglund, Xet Erixon,
Vlastimil Havran, Ahmed Also Faisal, Alessandro Falappa, Kenji Nagamatsu, Vlastimil Havran, Petr Prikryl, Ahmed Also Faisal, Alessandro Falappa,
Francisco Oltra Thennet, Olli Korhonen for providing translations into Kenji Nagamatsu, Francisco Oltra Thennet, Olli Korhonen,
various languages. Boris Bralo, Nickolay Semyonov, and Grzegorz Kowal for providing
translations into various languages.
<li> <li>
Arnt Gulbrandsen, Arnt Gulbrandsen,
Adam P. Jenkins, Adam P. Jenkins,
......
...@@ -20,96 +20,395 @@ ...@@ -20,96 +20,395 @@
First go to the First go to the
<a href="http://www.stack.nl/~dimitri/doxygen/download.html">download</a> page <a href="http://www.stack.nl/~dimitri/doxygen/download.html">download</a> page
\latexonly({\tt http://www.stack.nl/$\sim$dimitri/doxygen/download.html})\endlatexonly \latexonly({\tt http://www.stack.nl/$\sim$dimitri/doxygen/download.html})\endlatexonly
to get the latest distribution and unpack it. to get the latest distribution, if you did not have it already.
\subsection install_src_unix Compiling from source on Unix
If you downloaded the source distribution, you need at least the If you downloaded the source distribution, you need at least the
following to build the executable: following to build the executable:
<UL> <ul>
<LI>Troll Tech's GUI toolkit <A HREF="http://www.trolltech.com/products/qt.html">Qt</A> <li>Troll Tech's GUI toolkit
<A HREF="http://www.trolltech.com/products/qt.html">Qt</A>
\latexonly(see {\tt http://www.trolltech.com/products/qt.html})\endlatexonly. \latexonly(see {\tt http://www.trolltech.com/products/qt.html})\endlatexonly.
\addindex Qt \addindex Qt
<LI>The <a href="ftp://prep.ai.mit.edu/pub/gnu">GNU</a> tools You can download either version 1.44 or version 2.1.x.
If want to build the GUI front-end you will need Qt 2.1.x. If you do
not need it, using Qt 1.44 will result in a somewhat smaller executable.
<li>The <a href="ftp://prep.ai.mit.edu/pub/gnu">GNU</a> tools
flex, bison and make flex, bison and make
\addindex flex \addindex flex
\addindex bison \addindex bison
\addindex make \addindex make
<LI>In order to generate a Makefile for your platform, you need <li>In order to generate a Makefile for your platform, you need
<a href="http://www.perl.com>perl</a> <a href="http://www.perl.com>perl</a>
\latexonly(see {\tt http://www.perl.com})\endlatexonly. \latexonly(see {\tt http://www.perl.com})\endlatexonly.
\addindex perl \addindex perl
</UL> </ul>
For platform specific installation instructions see the \c INSTALL file
that is included in the package. To take full advantage of doxygen's features the following additional
tools should be installed.
<ul>
<li>A \f$\mbox{\LaTeX}\f$ distribution: for instance
<a href="http://www.tug.org">teTeX 1.0</a>.<br>
This is needed for generating LaTeX, Postscript, and PDF output.
<li><a href="http://www.research.att.com/sw/tools/graphviz/">
the Graph visualization toolkit version 1.5</a><br>
Needed for the include dependency graphs,
the graphical inheritance graphs,
and the collaboration graphs.
<li>The ghostscript interpreter.
</ul>
Compilation is now done by performing the following steps:
\addindex HTTP <ol>
\addindex CGI <li> Unpack the archive, unless you already have done that:
To use the search engine \c doxysearch, you will also need
a HTTP daemon running on the target system and permission to execute a
CGI binary.
If you are running Unix, and have Qt installed correctly, you can simply enter
\verbatim \verbatim
configure gunzip doxygen-$VERSION.src.tar.gz # uncompress the archive
tar xf doxygen-$VERSION.src.tar # unpack it
\endverbatim \endverbatim
to set up the makefiles for your platform. For Windows this step can be
skipped.
To override the auto detected platform you can specify <li>Run the configure script:
\verbatim \verbatim
configure --platform platform-type sh ./configure
\endverbatim \endverbatim
See the file \c PLATFORMS for a list of possible platforms.
For more configuration options use <code>configure --help</code>
To compile and link the sources enter The script tries to determine the platform you use, the location
of the Qt library, the make tool (which \e must be GNU make) and the perl
interpreter. It will report what it finds.
To override the auto detected platform and compiler you can run
configure as follows:
\verbatim \verbatim
make configure --platform platform-type
\endverbatim \endverbatim
in the root of the distribution.
Doxygen should compile without errors or warnings.
If it does not, please send the compilation errors or warnings along
with a description of your platform to
<a href="mailto:dimitri@stack.nl>dimitri@stack.nl</a>.
After compilation, the binaries will be located in the \c bin See the <code>PLATFORMS</code> file for a list of possible platform
directory of the distribution. options.
You may want to copy these files to a location in your path
(\c /usr/local/bin for instance) or add the \c bin If you have Qt-2.1.x installed and want to build the GUI front-end, you
directory of the distribution to your search path. should run the configure script with the <code>--with-doxywizard</code>
option.
For an overview of other configuration options use
On Unix you can also type:
\verbatim \verbatim
make install configure --help
\endverbatim \endverbatim
The following binaries should now be available: <li>Compile the program by running make:
<UL>
<LI>\c doxygen: for generating the class browser.
<LI>\c doxytag: for creating a tag file containing references
to external documentation.
<LI>\c doxysearch: the search engine. This binary should not be
executed directly. It must be called from an CGI script that will be
generated by doxygen.
</UL>
To take full advantage of doxygen's features the following additional \verbatim
tools should be installed. make
\endverbatim
The program should compile without problems and three binaries
(<code>doxygen</code>, <code>doxytag</code>, and <code>doxysearch</code>)
should be available in the bin directory of the distribution.
<li>Optional: Generate the user manual.
\verbatim
make docs
\endverbatim
To let doxygen generate the HTML documentation.
\note you will need the stream editor <code>sed</code> for this,
but this should be available on any Unix platform.
The HTML directory of the distribution will now contain the html
documentation (just point a HTML browser to the file
<code>index.html</code> in the
html directory).
<li>Optional: Generate a postscript and pdf version of the manual.
(you will need <code>latex</code> and <code>dvips</code> and
the ghostscript package for this).
\verbatim
make pdf
\endverbatim
The postscript manual <code>doxygen_manual.ps</code> will be located
in the latex directory of the distribution. Just send it to a
postscript printer to print it or use <code>ghostview</code> to view it.
</ol>
\subsection install_bin_unix Installating the binaries on Unix
If you downloaded the binary distribution for Unix, you can install
doxygen by typing:
\verbatim
./configure
make install
\endverbatim
Binaries are installed in the directory <code>\<prefix\>/bin</code>
Documentation and examples in the directory
<code>\<prefix\>/doc/doxygen</code>
<code>\<prefix\></code> defaults to /usr but can be changed with
the <code>--prefix</code> option of the configure script.
Alternatively, you can also copy the binaries from the <code>bin</code>
directory manually to some <code>bin</code> directory in your search path.
This is sufficient to use doxygen.
\note You need the GNU install tool for this to work. Other
install tools may put the binaries in the wrong directory!
If you have a RPM or DEP package, then please follow the
standard installation procedure that is required for these packages.
\subsection unix_problems Known compilation problems for Unix
<b>Qt problems</b>
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 the doxygen distribution and do:
\verbatim
mkdir qt
cd qt
ln -s your-qt-include-dir-here include
ln -s your-qt-lib-dir-here lib
export QTDIR=$PWD
\endverbatim
If you have a csh-like shell you should use <code>setenv QTDIR $PWD</code>
instead of the <code>export</code> command above.
Now install doxygen as described above.
<b>Latex problems</b>
the file <code>a4wide.sty</code> is not available for all distributions. If
your distribution does not have it please select another paper type
in the config file (see the \ref cfg_paper_type "PAPER_TYPE" tag in the
config file).
<b>HP-UX & Digital Unix problems</b>
If you are compiling for HP-UX with aCC and you get this error:
\verbatim
/opt/aCC/lbin/ld: Unsatisfied symbols:
alloca (code)
\endverbatim
then you should (according to Anke Selig) edit <code>ce_parse.cpp</code>
and replace
\verbatim
extern "C" {
void *alloca (unsigned int);
};
\endverbatim
with
\verbatim
#include <alloca.h>
\endverbatim
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:
\verbatim
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
\endverbatim
with
\verbatim
#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || defined (__osf__)
#include <alloca.h>
\endverbatim
Alternatively, one could fix the problem at the bison side.
Here is patch for bison.simple (provided by Andre Johansen):
\verbatim
--- 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__)
\endverbatim
The generated scanner.cpp that comes with doxygen is build with this
patch applied.
<b>Sun compiler problems</b>
<b>GNU 2.7.2.x compiler problems</b>
Older versions of the GNU compiler have problems with constant strings
containing characters with character codes larger than 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 <code>--english-only</code> option.
\subsection install_src_windows Compiling from source on Windows
Currently, I have only compiled doxygen for Windows using Microsoft's
Visual C++ (version 6.0). For other compilers you may need to edit the
perl script in <code>wintools/make.pl</code> a bit.
Let me know what you had to change if you got Doxygen working with another
compiler.
Since Windows comes without all the nice tools that Unix users are
used to, you need to install a number of these tools before you can compile
doxygen for Windows.
Here is what is required:
<ul> <ul>
<li>\f$\mbox{\LaTeX}\f$: <li>WinZip to unpack the tar source distribution. This can be found at
<a href="http://www.tug.org">teTeX 1.0</a> (for Unix) or http://www.winzip.com
<a href="ftp://ctan.tug.org/tex-archive/systems/win32/web2c/fptex-0.3/">fpTeX 0.3</a> (for Windows)<br> <li>Microsoft Visual C++ (I only tested with version 6.0).
Needed for LaTeX and PDF output. Use the <code>vcvars32.bat</code> batch file to set the environment
variables (if you did not select to do this automatically during
installation).
<li>Perl 5.0 or higher for Windows. This can be download from:
http://www.ActiveState.com/pw32
<li>The GNU tools flex, bison and sed.
To get these working on Windows you should install the
<a href="http://sourceware.cygnus.com/cygwin/">cygwin tools</a>
\latexonly(see {\tt http://sourceware.cygnus.com/cygwin/})\endlatexonly.
Make sure the <code>BISONLIB</code> environment variable points to the
location where the files <code>bison.simple</code> and
<code>bison.hairy</code> are located.
Also make sure the tools are available from a dos box, by adding
the directory they are in to the search path.
<li>A professional license of
<A HREF="http://www.trolltech.com/products/qt.html">Qt for Windows</A><br>
\latexonly(see {\tt http://www.trolltech.com/products/qt.html})\endlatexonly.
If you do not have that and you can live without the GUI front-end
you can also download Qt-1.44 for X11. Doxygen only the depends on
the tools section of the Qt library, which happens also to compile
on Windows. (Qt version 2.1.x does not work anymore, at least not
without adding some window's specific code).
Now create the following directories:
\verbatim
qtools/src
qtools/include
qtools/lib
\endverbatim
Copy the contents of the <code>src/tools</code> directory of the
Qt-1.44 for X11 archive to <code>qtools/src</code>. Also copy the include
files in <code>src/tools</code> to <code>qtools/include</code>. Create a
static library project resulting in <code>qtools/lib/qt.lib</code> and
add the files in <code>qtools/src</code> to that project. Then
build the library and set the environment variable <code>QTDIR</code>
to the absolute path of the qtools directory.
<li>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/
Make sure the tools are available from a dos box, by adding the
directory they are in to the search path.
<li>If you want to generate compressed HTML help
(see \ref cfg_generate_htmlhelp "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
<li>If you used WinZip to extract the tar archive it will (apparently) not
create empty folders, so you have to add the folders
<code>objects</code> and <code>bin</code> manually in the root of the
distribution before compiling.
<li><a href="http://www.research.att.com/sw/tools/graphviz/"> <li><a href="http://www.research.att.com/sw/tools/graphviz/">
the Graph visualization toolkit version 1.5</a><br> the Graph visualization toolkit version 1.5</a><br>
Needed for the include dependency graphs, the graphical inheritance graphs, Needed for the include dependency graphs, the graphical inheritance graphs,
and the collaboration graphs.<br> and the collaboration graphs.<br>
<li><a href="http://msdn.microsoft.com/workshop/author/htmlhelp">
the HTML help workshop</a> (for Windows only)<br>
Needed for compiling compressed HTML output (a.k.a. the new Windows help format).
</ul> </ul>
Doxygen was developed and tested under Linux using the following tools: Compilation is now done by performing the following steps:
<ol>
<li>Open a dos box.
Make sure all tools (i.e. <code>nmake</code>, <code>latex</code>,
<code>gswin32</code>, <code>dvips</code>, <code>sed</code>,
<code>flex</code>, <code>bison</code>,
<code>cl</code>, <code>rm</code> and <code>perl</code>), are accessible from the command-line
(add them to the PATH environment variable if needed).
<li>goto the doxygen root dir and type:
\verbatim
make.bat
\endverbatim
This should build the executables
<code>doxygen.exe</code>, <code>doxytag.exe</code>, and
<code>doxysearch.exe</code> (The compiler should not produce any
serious warnings or errors).
<li>To build the examples type:
\verbatim
nmake examples
\endverbatim
<li>To generate the HTML documentation type:
\verbatim
nmake docs
\endverbatim
The generated docs are located in the html directory.
<li>
To generate the postscript and PDF manual type:
\verbatim
nmake pdf
\endverbatim
The manual should now be in <code>latex/doxygen_manual.pdf</code>
</ol>
\subsection install_bin_windows Installating the binaries on Windows
There is no fancy installation procedure at the moment (If anyone wants
to add it please let me know).
To install doxygen, just copy the binaries from the <code>bin</code> directory
to a location somewhere in the path. Alternatively, you can include
the <code>bin</code> directory of the distribution to the path.
\subsection build_tools Tools used to develop doxygen
Doxygen was developed and tested under Linux using the following
open-source tools:
<ul> <ul>
<li>EGCS version 2.91.66 <li>EGCS version 2.91.66
<li>GNU flex version 2.5.4 <li>GNU flex version 2.5.4
......
...@@ -92,18 +92,6 @@ Here is a list of the languages and their current maintainers: ...@@ -92,18 +92,6 @@ Here is a list of the languages and their current maintainers:
havran@NOSPAM.fel.cvut.cz</a> havran@NOSPAM.fel.cvut.cz</a>
</TD> </TD>
</TR> </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"> <TR BGCOLOR="#ffffff">
<TD> <TD>
Italian Italian
...@@ -226,8 +214,6 @@ Here is a list of the languages and their current maintainers: ...@@ -226,8 +214,6 @@ Here is a list of the languages and their current maintainers:
Czech & Petr Prikryl & {\tt prikrylp@skil.cz} \\ Czech & Petr Prikryl & {\tt prikrylp@skil.cz} \\
& Vlastimil Havran & {\tt havran@fel.cvut.cz} \\ & Vlastimil Havran & {\tt havran@fel.cvut.cz} \\
\hline \hline
Romanian & Ionutz Borcoman & {\tt borco@borco-ei.eng.hokudai.ac.jp} \\
\hline
Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} \\ Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} \\
& Alessandro Falappa & {\tt a.falappa@flashnet.it} \\ & Alessandro Falappa & {\tt a.falappa@flashnet.it} \\
\hline \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
*/
...@@ -192,7 +192,7 @@ During parsing the following steps take place: ...@@ -192,7 +192,7 @@ During parsing the following steps take place:
See section \ref htmlcmds for an overview of all supported HTML tags. See section \ref htmlcmds for an overview of all supported HTML tags.
</ul> </ul>
Using a number of column aligned minus signs at the start of a Using a number of column-aligned minus signs at the start of a
line in a comment block will generate a bullet list. line in a comment block will generate a bullet list.
Nested lists are also possible. Nested lists are also possible.
Here is an example: Here is an example:
...@@ -235,658 +235,4 @@ Go to the <a href="docblocks.html">next</a> section or return to the ...@@ -235,658 +235,4 @@ Go to the <a href="docblocks.html">next</a> section or return to the
*/ */
/*! \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
*/
/*! \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
*/
/*! \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
*/
/*! \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
*/
/*! \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="faq.html">next</a> section or return to the
<a href="index.html">index</a>.
\endhtmlonly
*/
...@@ -18,15 +18,16 @@ ...@@ -18,15 +18,16 @@
<h2>Known problems:</h2> <h2>Known problems:</h2>
<ul> <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. 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 <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 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 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 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. you send as small as possible, to help me narrow down the search.
<li>Using declarations are not yet supported. They are simply ignored. <li>Using declarations for member are not yet supported.
Using directives are supported however. 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 <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, 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. rather it should ignore all of the classes with the same name except one.
...@@ -52,6 +53,9 @@ ...@@ -52,6 +53,9 @@
then doxygen will remove the braces and correctly parse the result. then doxygen will remove the braces and correctly parse the result.
<li>Not all names in code fragments that are included in the documentation <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). 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 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 moment. I'll try to improve this in the future. But even with these
improvements not everthing can be properly linked to the corresponding improvements not everthing can be properly linked to the corresponding
...@@ -60,6 +64,10 @@ ...@@ -60,6 +64,10 @@
<li>It is not possible to insert a non-member function f in a class A <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 using the \relates command, if class A already has a member with name f
and the same argument list. 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> </ul>
......
>Test: "class_test.html" >Test: "class_Test.html"
example a0 "()" example a0 "()"
REM make script for Microsoft Visual C++ REM make script for Microsoft Visual C++
if "%QTDIR%"=="" goto ERROR 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 REM use perl to create the config file
perl wintools\make.pl perl wintools\make.pl
...@@ -14,10 +28,5 @@ type src\doxytag.pro.in | sed "s/\$extraopts/release/g" >src\doxytag.pro ...@@ -14,10 +28,5 @@ 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 type src\doxysearch.pro.in | sed "s/\$extraopts/release/g" >src\doxysearch.pro
nmake nmake
goto END
:ERROR
echo The QTDIR environment variable is not set! See the INSTALL file for more info.
goto END
:END :END
Name: doxygen Name: doxygen
Version: 1.1.5-20000709 Version: 1.1.5-20000716
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 1 Release: 1
Source0: doxygen-%{version}.src.tar.gz Source0: doxygen-%{version}.src.tar.gz
......
...@@ -532,7 +532,8 @@ static void generateMemberLink(OutputList &ol,const char *varName, ...@@ -532,7 +532,8 @@ static void generateMemberLink(OutputList &ol,const char *varName,
MemberDef *vmd; MemberDef *vmd;
for (;(vmd=vmni.current());++vmni) 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()); //printf("Found variable type=%s\n",vmd->typeString());
ClassDef *mcd=stripClassName(vmd->typeString()); ClassDef *mcd=stripClassName(vmd->typeString());
...@@ -924,12 +925,26 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -924,12 +925,26 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
QCString text=yytext; QCString text=yytext;
g_name+=text.left(i); g_name+=text.left(i);
} }
<Body>{SCOPENAME}/{B}* { <Body>{SCOPENAME}/{B}* { // p->func()
generateClassLink(*g_code,yytext); generateClassLink(*g_code,yytext);
addType(); addType();
g_name+=yytext; 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(); addType();
generateFunctionLink(*g_code,yytext); generateFunctionLink(*g_code,yytext);
g_bracketCount=1; g_bracketCount=1;
...@@ -1051,16 +1066,24 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1051,16 +1066,24 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
BEGIN( Body ); BEGIN( Body );
} }
<MemberCall2,FuncCall>")"[ \t\n]*";" { <MemberCall2,FuncCall>")"[ \t\n]*[;:] {
codifyLines(yytext); codifyLines(yytext);
g_bracketCount=0; g_bracketCount=0;
g_searchingForBody=FALSE; g_searchingForBody=FALSE;
if (!g_inClass && !g_type.isEmpty()) if (!g_inClass && !g_type.isEmpty())
addVariable(); addVariable();
g_name.resize(0);g_type.resize(0);
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
if (yytext[yyleng-1]==';' || g_insideBody)
{
g_name.resize(0);g_type.resize(0);
BEGIN( Body ); BEGIN( Body );
} }
else
{
g_bracketCount=0;
BEGIN( SkipInits );
}
}
<MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" { <MemberCall2,FuncCall>")"({BN}"const"|"volatile")*{BN}*"{" {
addParameter(); addParameter();
g_parmType.resize(0);g_parmName.resize(0); g_parmType.resize(0);g_parmName.resize(0);
...@@ -1081,16 +1104,11 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1081,16 +1104,11 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_type.resize(0); g_name.resize(0); g_type.resize(0); g_name.resize(0);
BEGIN( Body ); BEGIN( Body );
} }
/* <SkipInits>";" {
<MemberCall2,FuncCall>")"[ \t\n]*":" { g_code->codify(yytext);
addParameter();
g_parmType.resize(0);g_parmName.resize(0);
if (g_name.find("::")!=-1) setClassScope(g_name);
codifyLines(yytext);
g_type.resize(0); g_name.resize(0); g_type.resize(0); g_name.resize(0);
BEGIN( SkipInits ); BEGIN( Body );
} }
*/
<SkipInits>"{" { <SkipInits>"{" {
g_code->codify(yytext); g_code->codify(yytext);
g_curlyCount++; g_curlyCount++;
...@@ -1100,6 +1118,8 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1100,6 +1118,8 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_insideBody=TRUE; g_insideBody=TRUE;
} }
if (g_insideBody) g_bodyCurlyCount++; if (g_insideBody) g_bodyCurlyCount++;
if (g_name.find("::")!=-1) setClassScope(g_name);
g_type.resize(0); g_name.resize(0);
BEGIN( Body ); BEGIN( Body );
} }
<SkipInits>{ID} { <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 ...@@ -105,6 +111,7 @@ struct Config
static bool onlyPredefinedFlag; // expand only predefined macros static bool onlyPredefinedFlag; // expand only predefined macros
static bool searchIncludeFlag; // search for included files static bool searchIncludeFlag; // search for included files
static QStrList includePath; // list of include paths 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 predefined; // list of predefined macro names.
static QStrList expandAsDefinedList; // list of defines to expand static QStrList expandAsDefinedList; // list of defines to expand
static QStrList tagFileList; // list of tag files 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; ...@@ -86,7 +92,7 @@ bool Config::classDiagramFlag = TRUE;
bool Config::sourceBrowseFlag = FALSE; bool Config::sourceBrowseFlag = FALSE;
bool Config::inlineSourceFlag = FALSE; bool Config::inlineSourceFlag = FALSE;
bool Config::stripCommentsFlag = TRUE; bool Config::stripCommentsFlag = TRUE;
bool Config::caseSensitiveNames = FALSE; bool Config::caseSensitiveNames = TRUE;
bool Config::hideScopeNames = FALSE; bool Config::hideScopeNames = FALSE;
bool Config::verbatimHeaderFlag = TRUE; bool Config::verbatimHeaderFlag = TRUE;
bool Config::showIncFileFlag = TRUE; bool Config::showIncFileFlag = TRUE;
...@@ -140,6 +146,7 @@ bool Config::macroExpansionFlag = FALSE; ...@@ -140,6 +146,7 @@ bool Config::macroExpansionFlag = FALSE;
bool Config::onlyPredefinedFlag = FALSE; bool Config::onlyPredefinedFlag = FALSE;
bool Config::searchIncludeFlag = TRUE; bool Config::searchIncludeFlag = TRUE;
QStrList Config::includePath; QStrList Config::includePath;
QStrList Config::includeFilePatternList;
QStrList Config::predefined; QStrList Config::predefined;
QStrList Config::expandAsDefinedList; QStrList Config::expandAsDefinedList;
QStrList Config::tagFileList; QStrList Config::tagFileList;
...@@ -288,6 +295,7 @@ static int yyread(char *buf,int max_size) ...@@ -288,6 +295,7 @@ static int yyread(char *buf,int max_size)
<Start>"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; } <Start>"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; }
<Start>"SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchIncludeFlag; } <Start>"SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchIncludeFlag; }
<Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; l->clear(); elemStr=""; } <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>"PREDEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::predefined; l->clear(); elemStr=""; }
<Start>"EXPAND_AS_DEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::expandAsDefinedList; 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=""; } <Start>"TAGFILES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::tagFileList; l->clear(); elemStr=""; }
...@@ -566,6 +574,14 @@ void dumpConfig() ...@@ -566,6 +574,14 @@ void dumpConfig()
is=Config::includePath.next(); 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(); char *is=Config::predefined.first();
while (is) while (is)
...@@ -643,7 +659,7 @@ void Config::init() ...@@ -643,7 +659,7 @@ void Config::init()
Config::sourceBrowseFlag = FALSE; Config::sourceBrowseFlag = FALSE;
Config::inlineSourceFlag = FALSE; Config::inlineSourceFlag = FALSE;
Config::stripCommentsFlag = TRUE; Config::stripCommentsFlag = TRUE;
Config::caseSensitiveNames = FALSE; Config::caseSensitiveNames = TRUE;
Config::hideScopeNames = FALSE; Config::hideScopeNames = FALSE;
Config::verbatimHeaderFlag = TRUE; Config::verbatimHeaderFlag = TRUE;
Config::showIncFileFlag = TRUE; Config::showIncFileFlag = TRUE;
...@@ -697,6 +713,7 @@ void Config::init() ...@@ -697,6 +713,7 @@ void Config::init()
Config::onlyPredefinedFlag = FALSE; Config::onlyPredefinedFlag = FALSE;
Config::searchIncludeFlag = TRUE; Config::searchIncludeFlag = TRUE;
Config::includePath.clear(); Config::includePath.clear();
Config::includeFilePatternList.clear();
Config::predefined.clear(); Config::predefined.clear();
Config::expandAsDefinedList.clear(); Config::expandAsDefinedList.clear();
Config::tagFileList.clear(); Config::tagFileList.clear();
...@@ -955,7 +972,7 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -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 << "# 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 << "# 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 << "# 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 << "\n";
} }
t << "STRIP_FROM_PATH = "; t << "STRIP_FROM_PATH = ";
...@@ -1678,6 +1695,18 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -1678,6 +1695,18 @@ void writeTemplateConfig(QFile *f,bool sl)
writeStringList(t,Config::includePath); writeStringList(t,Config::includePath);
t << "\n"; t << "\n";
if (!sl) 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 << "\n";
t << "# The PREDEFINED tag can be used to specify one or more macro names that \n"; t << "# The PREDEFINED tag can be used to specify one or more macro names that \n";
...@@ -2164,6 +2193,7 @@ void substituteEnvironmentVars() ...@@ -2164,6 +2193,7 @@ void substituteEnvironmentVars()
substEnvVarsInString( Config::manOutputDir ); substEnvVarsInString( Config::manOutputDir );
substEnvVarsInString( Config::manExtension ); substEnvVarsInString( Config::manExtension );
substEnvVarsInStrList( Config::includePath ); substEnvVarsInStrList( Config::includePath );
substEnvVarsInStrList( Config::includeFilePatternList );
substEnvVarsInStrList( Config::predefined ); substEnvVarsInStrList( Config::predefined );
substEnvVarsInStrList( Config::expandAsDefinedList ); substEnvVarsInStrList( Config::expandAsDefinedList );
substEnvVarsInStrList( Config::tagFileList ); substEnvVarsInStrList( Config::tagFileList );
......
...@@ -132,6 +132,7 @@ static bool readCodeFragment(const char *fileName, ...@@ -132,6 +132,7 @@ static bool readCodeFragment(const char *fileName,
if (f.open(IO_ReadOnly)) if (f.open(IO_ReadOnly))
{ {
int c=0; int c=0;
int col=0;
int lineNr=1; int lineNr=1;
// skip until the startLine has reached // skip until the startLine has reached
while (lineNr<startLine && !f.atEnd()) while (lineNr<startLine && !f.atEnd())
...@@ -146,7 +147,21 @@ static bool readCodeFragment(const char *fileName, ...@@ -146,7 +147,21 @@ static bool readCodeFragment(const char *fileName,
char cn=0; char cn=0;
while (lineNr<=endLine && !f.atEnd() && !found) 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==':') if (c==':')
{ {
cn=f.getch(); cn=f.getch();
...@@ -159,6 +174,9 @@ static bool readCodeFragment(const char *fileName, ...@@ -159,6 +174,9 @@ static bool readCodeFragment(const char *fileName,
} }
if (found) 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 // copy until end of line
result+=c; result+=c;
if (c==':') result+=cn; if (c==':') result+=cn;
...@@ -346,10 +364,19 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) ...@@ -346,10 +364,19 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
} }
if (md->getStartBodyLine()!=-1 && md->getBodyDef()) if (md->getStartBodyLine()!=-1 && md->getBodyDef())
{ {
// for HTML write a real link
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
QCString lineStr,anchorStr; QCString lineStr,anchorStr;
anchorStr.sprintf("l%05d",md->getStartBodyLine()); anchorStr.sprintf("l%05d",md->getStartBodyLine());
ol.writeObjectLink(0,md->getBodyDef()->sourceName(), ol.writeObjectLink(0,md->getBodyDef()->sourceName(),anchorStr,name);
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 else
{ {
......
...@@ -985,9 +985,11 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path, ...@@ -985,9 +985,11 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
output << ":\\begin{figure}[H]\n" output << ":\\begin{figure}[H]\n"
"\\begin{center}\n" "\\begin{center}\n"
"\\leavevmode\n"; "\\leavevmode\n";
output << "\\setlength{\\epsfysize}{" << realHeight << "cm}\n"; //output << "\\setlength{\\epsfysize}{" << realHeight << "cm}\n";
output << "\\epsfbox{" << fileName << ".eps}\n" //output << "\\epsfbox{" << fileName << ".eps}\n"
"\\end{center}\n" output << "\\includegraphics[height=" << realHeight << "cm]{"
<< fileName << "}" << endl;
output << "\\end{center}\n"
"\\end{figure}\n"; "\\end{figure}\n";
//printf("writeFigure rows=%d cols=%d\n",rows,cols); //printf("writeFigure rows=%d cols=%d\n",rows,cols);
......
...@@ -39,7 +39,7 @@ static const char *edgeColorMap[] = ...@@ -39,7 +39,7 @@ static const char *edgeColorMap[] =
"darkgreen", // Protected "darkgreen", // Protected
"firebrick4", // Private "firebrick4", // Private
"darkorchid3", // "use" relation "darkorchid3", // "use" relation
"grey" // Undocumented "grey50" // Undocumented
}; };
static const char *edgeStyleMap[] = static const char *edgeStyleMap[] =
...@@ -82,7 +82,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName) ...@@ -82,7 +82,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
QCString *dest; QCString *dest;
*urlPtr++='\0'; *urlPtr++='\0';
//printf("refPtr=`%s' urlPtr=`%s'\n",refPtr,urlPtr); //printf("refPtr=`%s' urlPtr=`%s'\n",refPtr,urlPtr);
//printf("Found url=%s coords=%d,%d,%d,%d\n",file,x1,y1,x2,y2); //printf("Found url=%s coords=%d,%d,%d,%d\n",url,x1,y1,x2,y2);
t << "<area "; t << "<area ";
if (*refPtr!='\0') if (*refPtr!='\0')
{ {
...@@ -319,7 +319,7 @@ void DotNode::writeBox(QTextStream &t, ...@@ -319,7 +319,7 @@ void DotNode::writeBox(QTextStream &t,
bool hasNonReachableChildren) bool hasNonReachableChildren)
{ {
const char *labCol = const char *labCol =
m_url.isEmpty() ? "grey" : // non link m_url.isEmpty() ? "grey50" : // non link
( (
(hasNonReachableChildren) ? "red" : "black" (hasNonReachableChildren) ? "red" : "black"
); );
...@@ -584,7 +584,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -584,7 +584,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
dotCmd.sprintf("%sdot -Tgif \"%s\" -o \"%s\"", dotCmd.sprintf("%sdot -Tgif \"%s\" -o \"%s\"",
Config::dotPath.data(),dotName.data(),gifName.data()); Config::dotPath.data(),dotName.data(),gifName.data());
//printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data()); //printf("Running: dot -Tgif %s -o %s\n",dotName.data(),gifName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
out << "</table>" << endl; out << "</table>" << endl;
...@@ -593,7 +593,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -593,7 +593,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
dotCmd.sprintf("%sdot -Timap \"%s\" -o \"%s\"", dotCmd.sprintf("%sdot -Timap \"%s\" -o \"%s\"",
Config::dotPath.data(),dotName.data(),mapName.data()); Config::dotPath.data(),dotName.data(),mapName.data());
//printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data()); //printf("Running: dot -Timap %s -o %s\n",dotName.data(),mapName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
out << "</table>" << endl; out << "</table>" << endl;
...@@ -658,11 +658,12 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper) ...@@ -658,11 +658,12 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,ClassDef *cd,bool hideSuper)
} }
else else
{ {
QCString tmp_url="";
if (bClass->isLinkable())
tmp_url=bClass->getReference()+"$"+bClass->getOutputFileBase();
bn = new DotNode(m_curNodeNumber++, bn = new DotNode(m_curNodeNumber++,
bClass->displayName(), bClass->displayName(),
bClass->isLinkable() ? tmp_url.data()
(bClass->getReference()+"$"+bClass->getOutputFileBase()).data() :
0
); );
//printf("Adding node %s to new base node %s (c=%d,p=%d)\n", //printf("Adding node %s to new base node %s (c=%d,p=%d)\n",
// n->m_label.data(), // n->m_label.data(),
...@@ -704,12 +705,13 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() ...@@ -704,12 +705,13 @@ DotGfxHierarchyTable::DotGfxHierarchyTable()
{ {
if (cd->isVisibleInHierarchy()) // root class in the graph if (cd->isVisibleInHierarchy()) // root class in the graph
{ {
QCString tmp_url="";
if (cd->isLinkable())
tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
//printf("Inserting root class %s\n",cd->name().data()); //printf("Inserting root class %s\n",cd->name().data());
DotNode *n = new DotNode(m_curNodeNumber++, DotNode *n = new DotNode(m_curNodeNumber++,
cd->displayName(), cd->displayName(),
cd->isLinkable() ? tmp_url.data()
(cd->getReference()+"$"+cd->getOutputFileBase()).data() :
0
); );
//m_usedNodes->clear(); //m_usedNodes->clear();
...@@ -812,10 +814,11 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, ...@@ -812,10 +814,11 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
{ {
QCString displayName=className.copy(); QCString displayName=className.copy();
if (Config::hideScopeNames) displayName=stripScope(displayName); if (Config::hideScopeNames) displayName=stripScope(displayName);
QCString tmp_url;
if (cd->isLinkable()) tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
bn = new DotNode(m_curNodeNumber++, bn = new DotNode(m_curNodeNumber++,
displayName, displayName,
cd->isLinkable() ? tmp_url.data(),
(cd->getReference()+"$"+cd->getOutputFileBase()).data() : 0,
distance distance
); );
if (distance>m_maxDistance) m_maxDistance=distance; if (distance>m_maxDistance) m_maxDistance=distance;
...@@ -883,10 +886,11 @@ DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth) ...@@ -883,10 +886,11 @@ DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
m_graphType = t; m_graphType = t;
m_maxDistance = 0; m_maxDistance = 0;
m_recDepth = maxRecursionDepth; m_recDepth = maxRecursionDepth;
QCString tmp_url="";
if (cd->isLinkable()) tmp_url=cd->getReference()+"$"+cd->getOutputFileBase();
m_startNode = new DotNode(m_curNodeNumber++, m_startNode = new DotNode(m_curNodeNumber++,
cd->displayName(), cd->displayName(),
cd->isLinkable() ? tmp_url.data(),
(cd->getReference()+"$"+cd->getOutputFileBase()).data() : 0,
0, // distance 0, // distance
TRUE // is a root node TRUE // is a root node
); );
...@@ -992,7 +996,7 @@ static void findMaximalDotGraph(DotNode *root, ...@@ -992,7 +996,7 @@ static void findMaximalDotGraph(DotNode *root,
// create annotated dot file // create annotated dot file
dotCmd.sprintf("%sdot -Tdot \"%s.dot\" -o \"%s_tmp.dot\"", dotCmd.sprintf("%sdot -Tdot \"%s.dot\" -o \"%s_tmp.dot\"",
Config::dotPath.data(),baseName.data(),baseName.data()); Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
return; return;
...@@ -1084,7 +1088,7 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1084,7 +1088,7 @@ void DotClassGraph::writeGraph(QTextStream &out,
QCString dotCmd(4096); QCString dotCmd(4096);
dotCmd.sprintf("%sdot -Tgif \"%s.dot\" -o \"%s.gif\"", dotCmd.sprintf("%sdot -Tgif \"%s.dot\" -o \"%s.gif\"",
Config::dotPath.data(),baseName.data(),baseName.data()); Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Error: Problems running dot. Check your installation!\n"); err("Error: Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1093,7 +1097,7 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1093,7 +1097,7 @@ void DotClassGraph::writeGraph(QTextStream &out,
// run dot again to create an image map // run dot again to create an image map
dotCmd.sprintf("%sdot -Timap \"%s.dot\" -o \"%s.map\"", dotCmd.sprintf("%sdot -Timap \"%s.dot\" -o \"%s.map\"",
Config::dotPath.data(),baseName.data(),baseName.data()); Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Error: Problems running dot. Check your installation!\n"); err("Error: Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1111,7 +1115,7 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1111,7 +1115,7 @@ void DotClassGraph::writeGraph(QTextStream &out,
QCString dotCmd(4096); QCString dotCmd(4096);
dotCmd.sprintf("%sdot -Tps \"%s.dot\" -o \"%s.eps\"", dotCmd.sprintf("%sdot -Tps \"%s.dot\" -o \"%s.eps\"",
Config::dotPath.data(),baseName.data(),baseName.data()); Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Error: Problems running dot. Check your installation!\n"); err("Error: Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1129,8 +1133,10 @@ void DotClassGraph::writeGraph(QTextStream &out, ...@@ -1129,8 +1133,10 @@ void DotClassGraph::writeGraph(QTextStream &out,
out << "\\begin{figure}[H]\n" out << "\\begin{figure}[H]\n"
"\\begin{center}\n" "\\begin{center}\n"
"\\leavevmode\n" "\\leavevmode\n"
"\\setlength{\\epsfxsize}{" << QMIN(width/2,maxWidth) << "pt}\n" //"\\setlength{\\epsfxsize}{" << QMIN(width/2,maxWidth) << "pt}\n"
"\\epsfbox{" << baseName << ".eps}\n" //"\\epsfbox{" << baseName << ".eps}\n"
"\\includegraphics[width=" << QMIN(width/2,maxWidth)
<< "pt]{" << baseName << "}\n"
"\\end{center}\n" "\\end{center}\n"
"\\end{figure}\n"; "\\end{figure}\n";
} }
...@@ -1163,7 +1169,8 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance) ...@@ -1163,7 +1169,8 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
} }
if (doc || src) if (doc || src)
{ {
QCString url=bfd ? bfd->getOutputFileBase().data() : ""; QCString url="";
if (bfd) url=bfd->getOutputFileBase().copy();
if (!doc && src) if (!doc && src)
{ {
url+="-source"; url+="-source";
...@@ -1177,10 +1184,12 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance) ...@@ -1177,10 +1184,12 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
} }
else else
{ {
QCString tmp_url="";
if (bfd) tmp_url=bfd->getReference()+"$"+url;
bn = new DotNode( bn = new DotNode(
m_curNodeNumber++, m_curNodeNumber++,
ii->includeName, ii->includeName,
bfd ? (bfd->getReference()+"$"+url).data() : 0, tmp_url,
distance distance
); );
if (distance>m_maxDistance) m_maxDistance=distance; if (distance>m_maxDistance) m_maxDistance=distance;
...@@ -1199,9 +1208,10 @@ DotInclDepGraph::DotInclDepGraph(FileDef *fd,bool inverse) ...@@ -1199,9 +1208,10 @@ DotInclDepGraph::DotInclDepGraph(FileDef *fd,bool inverse)
m_inverse = inverse; m_inverse = inverse;
ASSERT(fd!=0); ASSERT(fd!=0);
m_diskName = fd->getOutputFileBase().copy(); m_diskName = fd->getOutputFileBase().copy();
QCString tmp_url=fd->getReference()+"$"+fd->getOutputFileBase();
m_startNode = new DotNode(m_curNodeNumber++, m_startNode = new DotNode(m_curNodeNumber++,
fd->name(), fd->name(),
fd->getReference()+"$"+fd->getOutputFileBase(), tmp_url.data(),
0, // distance 0, // distance
TRUE // root node TRUE // root node
); );
...@@ -1252,7 +1262,7 @@ void DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1252,7 +1262,7 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
QCString dotCmd(4096); QCString dotCmd(4096);
dotCmd.sprintf("%sdot -Tgif \"%s.dot\" -o \"%s.gif\"", dotCmd.sprintf("%sdot -Tgif \"%s.dot\" -o \"%s.gif\"",
Config::dotPath.data(),baseName.data(),baseName.data()); Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1262,7 +1272,7 @@ void DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1262,7 +1272,7 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
// run dot again to create an image map // run dot again to create an image map
dotCmd.sprintf("%sdot -Timap \"%s.dot\" -o \"%s.map\"", dotCmd.sprintf("%sdot -Timap \"%s.dot\" -o \"%s.map\"",
Config::dotPath.data(),baseName.data(),baseName.data()); Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1283,7 +1293,7 @@ void DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1283,7 +1293,7 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
QCString dotCmd(4096); QCString dotCmd(4096);
dotCmd.sprintf("%sdot -Tps \"%s.dot\" -o \"%s.eps\"", dotCmd.sprintf("%sdot -Tps \"%s.dot\" -o \"%s.eps\"",
Config::dotPath.data(),baseName.data(),baseName.data()); Config::dotPath.data(),baseName.data(),baseName.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
...@@ -1301,8 +1311,10 @@ void DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1301,8 +1311,10 @@ void DotInclDepGraph::writeGraph(QTextStream &out,
out << "\\begin{figure}[H]\n" out << "\\begin{figure}[H]\n"
"\\begin{center}\n" "\\begin{center}\n"
"\\leavevmode\n" "\\leavevmode\n"
"\\setlength{\\epsfxsize}{" << QMIN(width/2,maxWidth) << "pt}\n" //"\\setlength{\\epsfxsize}{" << QMIN(width/2,maxWidth) << "pt}\n"
"\\epsfbox{" << baseName << ".eps}\n" //"\\epsfbox{" << baseName << ".eps}\n"
"\\includegraphics[width=" << QMIN(width/2,maxWidth)
<< "pt]{" << baseName << "}\n"
"\\end{center}\n" "\\end{center}\n"
"\\end{figure}\n"; "\\end{figure}\n";
} }
...@@ -1341,7 +1353,7 @@ void generateGraphLegend(const char *path) ...@@ -1341,7 +1353,7 @@ void generateGraphLegend(const char *path)
dotText << " Node12 -> Node7 [dir=back,color=\"firebrick4\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; dotText << " Node12 -> Node7 [dir=back,color=\"firebrick4\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n";
dotText << " Node12 [shape=\"box\",label=\"PrivateBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_privatebase.html\"];\n"; dotText << " Node12 [shape=\"box\",label=\"PrivateBase\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_privatebase.html\"];\n";
dotText << " Node13 -> Node7 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n"; dotText << " Node13 -> Node7 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"doxfont\"];\n";
dotText << " Node13 [shape=\"box\",label=\"Undocumented\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"grey\"];\n"; dotText << " Node13 [shape=\"box\",label=\"Undocumented\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"grey50\"];\n";
dotText << " Node14 -> Node7 [dir=back,color=\"darkorchid3\",fontsize=10,style=\"dashed\",label=\"m_usedClass\",fontname=\"doxfont\"];\n"; dotText << " Node14 -> Node7 [dir=back,color=\"darkorchid3\",fontsize=10,style=\"dashed\",label=\"m_usedClass\",fontname=\"doxfont\"];\n";
dotText << " Node14 [shape=\"box\",label=\"Used\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_used.html\"];\n"; dotText << " Node14 [shape=\"box\",label=\"Used\",fontsize=10,height=0.2,width=0.4,fontname=\"doxfont\",color=\"black\",URL=\"$class_used.html\"];\n";
dotText << "}\n"; dotText << "}\n";
...@@ -1361,7 +1373,7 @@ void generateGraphLegend(const char *path) ...@@ -1361,7 +1373,7 @@ void generateGraphLegend(const char *path)
QCString dotCmd(4096); QCString dotCmd(4096);
dotCmd.sprintf("%sdot -Tgif graph_legend.dot -o graph_legend.gif", dotCmd.sprintf("%sdot -Tgif graph_legend.dot -o graph_legend.gif",
Config::dotPath.data()); Config::dotPath.data());
if (system(dotCmd)!=0) if (iSystem(dotCmd)!=0)
{ {
err("Problems running dot. Check your installation!\n"); err("Problems running dot. Check your installation!\n");
QDir::setCurrent(oldDir); QDir::setCurrent(oldDir);
......
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
#define pclose _pclose #define pclose _pclose
#endif #endif
// lists // lists
ClassList classList; // all documented classes ClassList classList; // all documented classes
NamespaceList namespaceList; // all namespaces NamespaceList namespaceList; // all namespaces
...@@ -1032,32 +1031,6 @@ static MemberDef *addVariableToFile( ...@@ -1032,32 +1031,6 @@ static MemberDef *addVariableToFile(
root->protection root->protection
); );
// new global variable, enum value or typedef
MemberDef *md=new MemberDef(
root->fileName,root->startLine,
root->type,name,root->args,0,
Public, Normal,root->stat,FALSE,
mtype,0,0);
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
md->setDocumentation(root->doc);
md->setBriefDescription(root->brief);
md->addSectionsToDefinition(root->anchors);
md->setFromAnnonymousScope(fromAnnScope);
md->setFromAnnonymousMember(fromAnnMemb);
md->setIndentDepth(indentDepth);
md->setBodySegment(root->bodyLine,root->endBodyLine);
md->setInitializer(root->initializer);
md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId);
bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig);
md->setBodyDef(fd);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
// see if the function is inside a namespace // see if the function is inside a namespace
NamespaceDef *nd = 0; NamespaceDef *nd = 0;
if (!scope.isEmpty()) if (!scope.isEmpty())
...@@ -1068,21 +1041,6 @@ static MemberDef *addVariableToFile( ...@@ -1068,21 +1041,6 @@ static MemberDef *addVariableToFile(
nd = namespaceDict[nscope]; nd = namespaceDict[nscope];
} }
} }
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{
nd->insertMember(md);
md->setNamespace(nd);
}
else
{
// find file definition
if (fd)
{
fd->insertMember(md);
md->setFileDef(fd);
}
}
QCString def; QCString def;
// determine the definition of the global variable // determine the definition of the global variable
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@' && if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@' &&
...@@ -1114,11 +1072,72 @@ static MemberDef *addVariableToFile( ...@@ -1114,11 +1072,72 @@ static MemberDef *addVariableToFile(
} }
} }
if (def.left(7)=="static ") def=def.right(def.length()-7); if (def.left(7)=="static ") def=def.right(def.length()-7);
MemberName *mn=functionNameDict[name];
if (mn)
{
MemberDef *md=mn->first();
while (md)
{
QCString nscope=removeAnnonymousScopes(scope);
NamespaceDef *nd=0;
if (!nscope.isEmpty())
{
nd = namespaceDict[nscope];
}
if (nd==0 || md->getNamespace()==nd)
// variable already in the scope
{
addMemberDocs(root,md,def,0,FALSE);
return md;
}
md=mn->next();
}
}
// new global variable, enum value or typedef
MemberDef *md=new MemberDef(
root->fileName,root->startLine,
root->type,name,root->args,0,
Public, Normal,root->stat,FALSE,
mtype,0,0);
//md->setDefFile(root->fileName);
//md->setDefLine(root->startLine);
md->setDocumentation(root->doc);
md->setBriefDescription(root->brief);
md->addSectionsToDefinition(root->anchors);
md->setFromAnnonymousScope(fromAnnScope);
md->setFromAnnonymousMember(fromAnnMemb);
md->setIndentDepth(indentDepth);
md->setBodySegment(root->bodyLine,root->endBodyLine);
md->setInitializer(root->initializer);
md->setMaxInitLines(root->initLines);
md->setMemberGroupId(root->mGrpId);
bool ambig;
FileDef *fd=findFileDef(inputNameDict,root->fileName,ambig);
md->setBodyDef(fd);
md->setDefinition(def); md->setDefinition(def);
//if (root->mGrpId!=-1)
//{
// md->setMemberGroup(memberGroupDict[root->mGrpId]);
//}
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{
nd->insertMember(md);
md->setNamespace(nd);
}
else
{
// find file definition
if (fd)
{
fd->insertMember(md);
md->setFileDef(fd);
}
}
MemberName *mn = 0;
// add member definition to the list of globals // add member definition to the list of globals
if ((mn=functionNameDict[name])) if (mn)
{ {
mn->inSort(md); mn->inSort(md);
} }
...@@ -1344,6 +1363,23 @@ static void buildMemberList(Entry *root) ...@@ -1344,6 +1363,23 @@ static void buildMemberList(Entry *root)
// root->parent->name.data(),getClass(root->parent->name), // root->parent->name.data(),getClass(root->parent->name),
// root->type.find(re,0)); // root->type.find(re,0));
QCString scope=stripAnnonymousNamespaceScope(root->parent->name.copy()); QCString scope=stripAnnonymousNamespaceScope(root->parent->name.copy());
bool isMember=FALSE;
int memIndex=root->name.find("::");
if (memIndex!=-1)
{
int ts=root->name.find('<');
int te=root->name.find('>');
if (ts==-1 || te==-1)
{
isMember=TRUE;
}
else
{
isMember=memIndex<ts && memIndex<te;
}
}
int i; int i;
if (root->parent && if (root->parent &&
!root->parent->name.isEmpty() && !root->parent->name.isEmpty() &&
...@@ -1494,10 +1530,13 @@ static void buildMemberList(Entry *root) ...@@ -1494,10 +1530,13 @@ static void buildMemberList(Entry *root)
} }
else if (root->parent && else if (root->parent &&
!(root->parent->section & Entry::COMPOUND_MASK) && !(root->parent->section & Entry::COMPOUND_MASK) &&
root->name.find("::")==-1 && // TODO: remove this check !isMember &&
// it breaks cases like
// func<A::B>(), but it is needed //root->name.find("::")==-1 && // TODO: remove this check
// for detect that A::func() is a member // // it breaks cases like
// // func<A::B>(), but it is needed
// // for detect that A::func() is a member
root->relates.isEmpty() && root->relates.isEmpty() &&
root->type.left(7)!="extern " && root->type.left(7)!="extern " &&
root->type.left(8)!="typedef " root->type.left(8)!="typedef "
...@@ -2193,7 +2232,8 @@ static void addMemberDocs(Entry *root, ...@@ -2193,7 +2232,8 @@ static void addMemberDocs(Entry *root,
//{ //{
// md->setBody(root->body); // md->setBody(root->body);
//} //}
if (md->getStartBodyLine()==-1 && root->bodyLine!=-1) if ((md->getStartBodyLine()==-1 && root->bodyLine!=-1) ||
(md->isVariable() && !root->explicitExternal))
{ {
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
bool ambig; bool ambig;
...@@ -3792,7 +3832,6 @@ static void buildCompleteMemberLists() ...@@ -3792,7 +3832,6 @@ static void buildCompleteMemberLists()
static void generateFileSources() static void generateFileSources()
{ {
if (documentedHtmlFiles==0) return; if (documentedHtmlFiles==0) return;
writeFileIndex(*outputList);
if (inputNameList.count()>0) if (inputNameList.count()>0)
{ {
...@@ -3821,7 +3860,6 @@ static void generateFileSources() ...@@ -3821,7 +3860,6 @@ static void generateFileSources()
static void generateFileDocs() static void generateFileDocs()
{ {
if (documentedHtmlFiles==0) return; if (documentedHtmlFiles==0) return;
writeFileIndex(*outputList);
if (inputNameList.count()>0) if (inputNameList.count()>0)
{ {
...@@ -4602,8 +4640,11 @@ static void generateSearchIndex() ...@@ -4602,8 +4640,11 @@ static void generateSearchIndex()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// generate the configuration file
/*! Generate a template version of the configuration file.
* If the \a shortList parameter is TRUE a configuration file without
* comments will be generated.
*/
static void generateConfigFile(const char *configFile,bool shortList) static void generateConfigFile(const char *configFile,bool shortList)
{ {
QFile f; QFile f;
...@@ -4619,6 +4660,9 @@ static void generateConfigFile(const char *configFile,bool shortList) ...@@ -4619,6 +4660,9 @@ static void generateConfigFile(const char *configFile,bool shortList)
if (fi.exists()) // create a backup if (fi.exists()) // create a backup
{ {
QDir dir=fi.dir(); QDir dir=fi.dir();
QFileInfo backup(fi.fileName()+".bak");
if (backup.exists()) // remove existing backup
dir.remove(backup.fileName());
dir.rename(fi.fileName(),fi.fileName()+".bak"); dir.rename(fi.fileName(),fi.fileName()+".bak");
} }
f.setName(configFile); f.setName(configFile);
...@@ -4642,11 +4686,65 @@ static void generateConfigFile(const char *configFile,bool shortList) ...@@ -4642,11 +4686,65 @@ static void generateConfigFile(const char *configFile,bool shortList)
} }
else else
{ {
err("Error: Cannot open file %s for writing\n"); err("Error: Cannot open file %s for writing\n",configFile);
exit(1); exit(1);
} }
} }
//----------------------------------------------------------------------------
/*! Generate a template stylesheet
*/
static void generateStyleSheetFile(OutputGenerator::OutputType outType,const char *sheetName)
{
QFile f;
bool fileOpened=FALSE;
bool writeToStdout = strcmp(sheetName,"-")==0;
if (writeToStdout) // write to stdout
{
fileOpened = f.open(IO_WriteOnly,stdout);
}
else // write to file
{
QFileInfo fi(sheetName);
if (fi.exists()) // create a backup
{
QDir dir=fi.dir();
QFileInfo backup(fi.fileName()+".bak");
if (backup.exists()) // remove existing backup
dir.remove(backup.fileName());
dir.rename(fi.fileName(),fi.fileName()+".bak");
}
f.setName(sheetName);
fileOpened = f.open(IO_WriteOnly);
}
if (fileOpened)
{
switch(outType)
{
case OutputGenerator::RTF:
RTFGenerator::writeStyleSheetFile(f);
break;
case OutputGenerator::Html:
HtmlGenerator::writeStyleSheetFile(f);
break;
case OutputGenerator::Latex:
LatexGenerator::writeStyleSheetFile(f);
break;
default:
break;
}
f.close();
}
else
{
err("Error: Cannot open file %s for writing\n",sheetName);
exit(1);
}
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// read and parse a tag file // read and parse a tag file
...@@ -5080,7 +5178,7 @@ static void readFormulaRepository() ...@@ -5080,7 +5178,7 @@ static void readFormulaRepository()
static void usage(const char *name) static void usage(const char *name)
{ {
msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2000\n\n",versionString); msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2000\n\n",versionString);
msg("You can use doxygen in three ways:\n\n"); msg("You can use doxygen in four ways:\n\n");
msg("1) Use doxygen to generate a template configuration file:\n"); msg("1) Use doxygen to generate a template configuration file:\n");
msg(" %s [-s] -g [configName]\n\n",name); msg(" %s [-s] -g [configName]\n\n",name);
msg(" If - is used for configName doxygen will write to standard output.\n\n"); msg(" If - is used for configName doxygen will write to standard output.\n\n");
...@@ -5090,6 +5188,9 @@ static void usage(const char *name) ...@@ -5090,6 +5188,9 @@ static void usage(const char *name)
msg("configuration file:\n"); msg("configuration file:\n");
msg(" %s [configName]\n\n",name); msg(" %s [configName]\n\n",name);
msg(" If - is used for configName doxygen will read from standard input.\n\n"); msg(" If - is used for configName doxygen will read from standard input.\n\n");
msg("4) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n");
msg(" %s -w rtf|html|latex outputFileName [configName]\n",name);
msg(" If - is used for outputFileName doxygen will write to standard output.\n\n");
msg("If -s is specified the comments in the config file will be omitted.\n"); msg("If -s is specified the comments in the config file will be omitted.\n");
msg("If configName is omitted `Doxyfile' will be used as a default.\n\n"); msg("If configName is omitted `Doxyfile' will be used as a default.\n\n");
exit(1); exit(1);
...@@ -5127,11 +5228,13 @@ int main(int argc,char **argv) ...@@ -5127,11 +5228,13 @@ int main(int argc,char **argv)
int optind=1; int optind=1;
const char *configName=0; const char *configName=0;
const char *debugLabel; const char *debugLabel;
const char *formatName;
bool genConfig=FALSE; bool genConfig=FALSE;
bool shortList=FALSE; bool shortList=FALSE;
bool updateConfig=FALSE; bool updateConfig=FALSE;
while (optind<argc && argv[optind][0]=='-' && while (optind<argc && argv[optind][0]=='-' &&
(isalpha(argv[optind][1]) || argv[optind][1]=='?') (isalpha(argv[optind][1]) || argv[optind][1]=='?' ||
argv[optind][1]=='-')
) )
{ {
switch(argv[optind][1]) switch(argv[optind][1])
...@@ -5151,6 +5254,64 @@ int main(int argc,char **argv) ...@@ -5151,6 +5254,64 @@ int main(int argc,char **argv)
case 'u': case 'u':
updateConfig=TRUE; updateConfig=TRUE;
break; break;
case 'w':
formatName=getArg(argc,argv,optind);
if (!formatName)
{
err("Error: option -w is missing format specifier rtf, html or latex\n");
exit(1);
}
if (optind+1>=argc)
{
err("Error: option -w is missing a configuration file name\n");
exit(1);
}
if (strcasecmp(formatName,"rtf")==0)
{
generateStyleSheetFile(OutputGenerator::RTF,argv[optind+1]);
exit(1);
}
else if (strcasecmp(formatName,"html")==0)
{
generateStyleSheetFile(OutputGenerator::Html,argv[optind+1]);
exit(1);
}
else if (strcasecmp(formatName,"latex")==0)
{
if (optind+2<argc) // use config file to get settings
{
QCString configFile=fileToString(argv[optind+2]);
if (configFile.isEmpty()) exit(1);
parseConfig(fileToString(argv[optind+2]));
configStrToVal();
substituteEnvironmentVars();
checkConfig();
}
else // use default config
{
Config::init();
setTranslator("English");
}
generateStyleSheetFile(OutputGenerator::Latex,argv[optind+1]);
exit(1);
}
else
{
err("Error: Illegal format specifier %s: should be one of rtf, html, or latex\n",formatName);
exit(1);
}
break;
case '-':
if (strcmp(&argv[optind][2],"help")==0)
{
usage(argv[0]);
}
else if (strcmp(&argv[optind][2],"version")==0)
{
msg("%s\n",versionString);
exit(1);
}
break;
case 'h': case 'h':
case '?': case '?':
usage(argv[0]); usage(argv[0]);
...@@ -5284,7 +5445,9 @@ int main(int argc,char **argv) ...@@ -5284,7 +5445,9 @@ int main(int argc,char **argv)
s=Config::includePath.first(); s=Config::includePath.first();
while (s) while (s)
{ {
readFileOrDirectory(s,0,includeNameDict,0,&Config::filePatternList, QStrList *pl = &Config::includeFilePatternList;
if (pl->count()==0) pl = &Config::filePatternList;
readFileOrDirectory(s,0,includeNameDict,0,pl,
&Config::excludePatternList,0,0); &Config::excludePatternList,0,0);
s=Config::includePath.next(); s=Config::includePath.next();
} }
...@@ -5429,6 +5592,9 @@ int main(int argc,char **argv) ...@@ -5429,6 +5592,9 @@ int main(int argc,char **argv)
msg("Search for main page...\n"); msg("Search for main page...\n");
findMainPage(root); findMainPage(root);
msg("Searching for documented variables...\n");
buildVarList(root);
msg("Building member list...\n"); // using class info only ! msg("Building member list...\n"); // using class info only !
buildMemberList(root); buildMemberList(root);
transferFunctionDocumentation(); transferFunctionDocumentation();
...@@ -5436,9 +5602,6 @@ int main(int argc,char **argv) ...@@ -5436,9 +5602,6 @@ int main(int argc,char **argv)
msg("Searching for friends...\n"); msg("Searching for friends...\n");
findFriends(); findFriends();
msg("Searching for documented variables...\n");
buildVarList(root);
msg("Searching for documented defines...\n"); msg("Searching for documented defines...\n");
findDefineDocumentation(root); findDefineDocumentation(root);
...@@ -5534,6 +5697,9 @@ int main(int argc,char **argv) ...@@ -5534,6 +5697,9 @@ int main(int argc,char **argv)
msg("Generating index page...\n"); msg("Generating index page...\n");
writeIndex(*outputList); writeIndex(*outputList);
msg("Generating file index...\n");
writeFileIndex(*outputList);
msg("Generating example documentation...\n"); msg("Generating example documentation...\n");
generateExampleDocs(); generateExampleDocs();
......
...@@ -51,6 +51,7 @@ Entry::Entry(const Entry &e) ...@@ -51,6 +51,7 @@ Entry::Entry(const Entry &e)
sig = e.sig; sig = e.sig;
slot = e.slot; slot = e.slot;
stat = e.stat; stat = e.stat;
explicitExternal = e.explicitExternal;
virt = e.virt; virt = e.virt;
parent = e.parent; parent = e.parent;
type = e.type.copy(); type = e.type.copy();
...@@ -219,6 +220,7 @@ void Entry::reset() ...@@ -219,6 +220,7 @@ void Entry::reset()
slot = FALSE; slot = FALSE;
stat = FALSE; stat = FALSE;
proto = FALSE; proto = FALSE;
explicitExternal = FALSE;
memSpec = 0; memSpec = 0;
subGrouping = TRUE; subGrouping = TRUE;
protection = Public; protection = Public;
......
...@@ -164,6 +164,7 @@ class Entry ...@@ -164,6 +164,7 @@ class Entry
bool sig; // a Qt signal ? bool sig; // a Qt signal ?
bool slot; // a Qt slot ? bool slot; // a Qt slot ?
bool stat; // static ? bool stat; // static ?
bool explicitExternal; // explicitly defined as external?
bool proto; // prototype ? bool proto; // prototype ?
int memSpec; // member specifiers int memSpec; // member specifiers
int initLines; // define/variable initializer lines to show int initLines; // define/variable initializer lines to show
......
...@@ -633,6 +633,7 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local ...@@ -633,6 +633,7 @@ void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,bool local
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if 0
/*! Creates a file list. */ /*! Creates a file list. */
FileList::FileList() : QList<FileDef>() FileList::FileList() : QList<FileDef>()
{ {
...@@ -659,4 +660,4 @@ FileListIterator::FileListIterator(const FileList &cllist) : ...@@ -659,4 +660,4 @@ FileListIterator::FileListIterator(const FileList &cllist) :
QListIterator<FileDef>(cllist) QListIterator<FileDef>(cllist)
{ {
} }
#endif
...@@ -169,6 +169,7 @@ class FileDef : public Definition ...@@ -169,6 +169,7 @@ class FileDef : public Definition
MemberGroupDict *memberGroupDict; MemberGroupDict *memberGroupDict;
}; };
#if 0 // obsolete
/*! \class FileList filedef.h /*! \class FileList filedef.h
\brief This class is list of file definitions. \brief This class is list of file definitions.
...@@ -195,5 +196,43 @@ class FileListIterator : public QListIterator<FileDef> ...@@ -195,5 +196,43 @@ class FileListIterator : public QListIterator<FileDef>
public: public:
FileListIterator(const FileList &list); 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 #endif
...@@ -100,7 +100,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -100,7 +100,7 @@ void FormulaList::generateBitmaps(const char *path)
{ {
//printf("Running latex...\n"); //printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null"); //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"); err("Problems running latex. Check your installation or look for typos in _formulas.tex!\n");
formulaError=TRUE; formulaError=TRUE;
...@@ -121,7 +121,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -121,7 +121,7 @@ void FormulaList::generateBitmaps(const char *path)
// encapsulated postscript. // encapsulated postscript.
sprintf(dviCmd,"dvips -q -D 600 -E -n 1 -p %d -o %s.eps _formulas.dvi", sprintf(dviCmd,"dvips -q -D 600 -E -n 1 -p %d -o %s.eps _formulas.dvi",
pageIndex,formBase.data()); pageIndex,formBase.data());
if (system(dviCmd)!=0) if (iSystem(dviCmd)!=0)
{ {
err("Problems running dvips. Check your installation!\n"); err("Problems running dvips. Check your installation!\n");
return; return;
...@@ -183,7 +183,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -183,7 +183,7 @@ void FormulaList::generateBitmaps(const char *path)
); );
#endif #endif
//printf("Running ghostscript...\n"); //printf("Running ghostscript...\n");
if (system(gsCmd)!=0) if (iSystem(gsCmd)!=0)
{ {
err("Problem running ghostscript. Check your installation!\n"); err("Problem running ghostscript. Check your installation!\n");
return; return;
......
...@@ -28,12 +28,37 @@ ...@@ -28,12 +28,37 @@
#include "diagram.h" #include "diagram.h"
#include "version.h" #include "version.h"
#include "dot.h" #include "dot.h"
#include "language.h"
#define GROUP_COLOR "#ff8080" #define GROUP_COLOR "#ff8080"
//#define DBG_HTML(x) x; //#define DBG_HTML(x) x;
#define DBG_HTML(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; HtmlHelp *HtmlGenerator::htmlHelp = 0;
HtmlGenerator::HtmlGenerator() : OutputGenerator() HtmlGenerator::HtmlGenerator() : OutputGenerator()
...@@ -66,6 +91,11 @@ void HtmlGenerator::init() ...@@ -66,6 +91,11 @@ void HtmlGenerator::init()
writeNullImage(Config::htmlOutputDir); writeNullImage(Config::htmlOutputDir);
} }
void HtmlGenerator::writeStyleSheetFile(QFile &file)
{
QTextStream t(&file);
t << defaultStyleSheet;
}
void HtmlGenerator::startFile(const char *name,const char *title,bool external) void HtmlGenerator::startFile(const char *name,const char *title,bool external)
{ {
QCString fileName=name; QCString fileName=name;
...@@ -77,6 +107,8 @@ void HtmlGenerator::startFile(const char *name,const char *title,bool external) ...@@ -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" t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
"<html><head><meta name=\"robots\" content=\"noindex\">\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"; "<title>" << title << "</title>\n";
t << "<link "; t << "<link ";
if (external) if (external)
...@@ -198,29 +230,7 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -198,29 +230,7 @@ void HtmlGenerator::writeStyleInfo(int part)
//t << "H1 { text-align: center; border-width: thin none thin none;" << endl; //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 << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
t << "H1 { text-align: center; }" << endl; t << defaultStyleSheet;
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;
endPlainFile(); endPlainFile();
} }
else // write user defined style sheet else // write user defined style sheet
...@@ -759,8 +769,8 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const ...@@ -759,8 +769,8 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const
t << "<p>" << endl; t << "<p>" << endl;
t << "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\">" << endl; t << "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\">" << endl;
t << " <tr>" << endl; t << " <tr>" << endl;
t << " <td class=\"md\"><b>" << endl; t << " <td class=\"md\">" << endl;
t << " <table cellspadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl; t << " <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl;
} }
void HtmlGenerator::startMemberDocPrefixItem() void HtmlGenerator::startMemberDocPrefixItem()
...@@ -887,3 +897,20 @@ void HtmlGenerator::endMemberGroup(bool) ...@@ -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 ...@@ -29,6 +29,8 @@ class HtmlGenerator : public OutputGenerator
public: public:
HtmlGenerator(); HtmlGenerator();
~HtmlGenerator(); ~HtmlGenerator();
static void init();
static void writeStyleSheetFile(QFile &f);
OutputGenerator *copy() { return new HtmlGenerator; } OutputGenerator *copy() { return new HtmlGenerator; }
//OutputGenerator *clone() { return new HtmlGenerator(*this); } //OutputGenerator *clone() { return new HtmlGenerator(*this); }
...@@ -41,7 +43,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -41,7 +43,6 @@ class HtmlGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==Html && active); } bool isEnabled(OutputType o) { return (o==Html && active); }
OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; } OutputGenerator *get(OutputType o) { return (o==Html) ? this : 0; }
static void init();
//void generateExternalIndex(); //void generateExternalIndex();
void startFile(const char *name,const char *title,bool external); void startFile(const char *name,const char *title,bool external);
...@@ -185,8 +186,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -185,8 +186,8 @@ class HtmlGenerator : public OutputGenerator
void writeSectionRefItem(const char *,const char *,const char *); void writeSectionRefItem(const char *,const char *,const char *);
void writeSectionRefAnchor(const char *,const char *,const char *); void writeSectionRefAnchor(const char *,const char *,const char *);
void addToIndex(const char *,const char *) {} void addToIndex(const char *,const char *) {}
void startIndent() { t << "<div class=\"in\">" << endl; } void startIndent();
void endIndent() { t << "</div>" << endl; } void endIndent();
void writeSynopsis() {} void writeSynopsis() {}
void startClassDiagram(); void startClassDiagram();
void endClassDiagram(ClassDiagram &,const char *,const char *); void endClassDiagram(ClassDiagram &,const char *,const char *);
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// strips w from s iff s starts with w // strips w from s iff s starts with w
bool stripWord(QCString &s,QCString w) bool stripWord(QCString &s,QCString w)
{ {
...@@ -367,19 +369,50 @@ void writeFileIndex(OutputList &ol) ...@@ -367,19 +369,50 @@ void writeFileIndex(OutputList &ol)
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); 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(); FileName *fn=inputNameList.first();
while (fn) while (fn)
{ {
FileDef *fd=fn->first(); FileDef *fd=fn->first();
while (fd) 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 doc = fd->isLinkableInProject();
bool src = fd->generateSource() || Config::sourceBrowseFlag; bool src = fd->generateSource() || Config::sourceBrowseFlag;
if ((doc || src) && !fd->isReference()) if ((doc || src) && !fd->isReference())
{ {
//ol.writeIndexItem(fd->getReference(),fd->diskName(),
// fd->name());
QCString path; QCString path;
if (Config::fullPathNameFlag) if (Config::fullPathNameFlag)
{ {
...@@ -419,6 +452,10 @@ void writeFileIndex(OutputList &ol) ...@@ -419,6 +452,10 @@ void writeFileIndex(OutputList &ol)
if (doc) if (doc)
{ {
ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name()); ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name());
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(fd->name(),fd->getOutputFileBase());
}
} }
else else
{ {
...@@ -434,7 +471,6 @@ void writeFileIndex(OutputList &ol) ...@@ -434,7 +471,6 @@ void writeFileIndex(OutputList &ol)
parseText(ol,theTranslator->trCode()); parseText(ol,theTranslator->trCode());
ol.docify("]"); ol.docify("]");
ol.endTextLink(); ol.endTextLink();
//ol.writeObjectLink(0,fd->includeName(),0," [src]");
} }
if (!fd->briefDescription().isEmpty()) if (!fd->briefDescription().isEmpty())
{ {
...@@ -447,18 +483,13 @@ void writeFileIndex(OutputList &ol) ...@@ -447,18 +483,13 @@ void writeFileIndex(OutputList &ol)
ol+=briefOutput; ol+=briefOutput;
ol.docify(")"); ol.docify(")");
} }
//ol.enable(OutputGenerator::Latex);
ol.popGeneratorState(); ol.popGeneratorState();
// -------------------------------------------------------- // --------------------------------------------------------
if (hasHtmlHelp)
{
htmlHelp->addContentsItem(fd->name(),fd->getOutputFileBase());
} }
fd=fl->next();
} }
fd=fn->next(); fl=outputNameList.next();
}
fn=inputNameList.next();
} }
ol.endIndexList(); ol.endIndexList();
if (hasHtmlHelp) if (hasHtmlHelp)
...@@ -773,7 +804,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -773,7 +804,7 @@ void writeAlphabeticalClassList(OutputList &ol)
} }
// generate table // generate table
for (i=0;i<rows;i++) // forarch table row for (i=0;i<rows;i++) // foreach table row
{ {
ol.nextTableRow(); ol.nextTableRow();
// the last column may contain less items then the others // the last column may contain less items then the others
...@@ -1474,10 +1505,7 @@ void writeGroupList(OutputList &ol) ...@@ -1474,10 +1505,7 @@ void writeGroupList(OutputList &ol)
{ {
ol.startDescItem(); ol.startDescItem();
ol.startTextLink(gd->getOutputFileBase(),0); ol.startTextLink(gd->getOutputFileBase(),0);
parseDoc(ol, parseText(ol,gd->groupTitle());
gd->getDefFileName(),gd->getDefLine(),
0,0,
gd->groupTitle());
ol.endTextLink(); ol.endTextLink();
ol.endDescItem(); ol.endDescItem();
parseDoc(ol, parseDoc(ol,
......
...@@ -146,12 +146,24 @@ void LatexGenerator::init() ...@@ -146,12 +146,24 @@ void LatexGenerator::init()
<< endl << endl
<< "ps: refman.ps" << endl << "ps: refman.ps" << endl
<< endl << endl
<< "pdf: ps" << endl << "pdf: refman.pdf" << endl
<< "\tps2pdf refman.ps refman.pdf" << endl << endl
<< "ps_2on1: refman_2on1.ps" << endl
<< endl
<< "pdf_2on1: refman_2on1.pdf" << endl
<< endl << endl
<< "refman.ps: refman.dvi" << endl << "refman.ps: refman.dvi" << endl
<< "\tdvips -o refman.ps refman.dvi" << endl << "\tdvips -o refman.ps refman.dvi" << endl
<< endl << endl
<< "refman.pdf: refman.ps" << endl
<< "\tps2pdf refman.ps refman.pdf" << endl
<< endl
<< "refman_2on1.ps: refman.ps" << endl
<< "\tpsnup -2 refman.ps >refman_2on1.ps" << endl
<< endl
<< "refman_2on1.pdf: refman_2on1.ps" << endl
<< "\tps2pdf refman_2on1.ps refman_2on1.pdf" << endl
<< endl
<< "refman.dvi: refman.tex doxygen.sty" << endl << "refman.dvi: refman.tex doxygen.sty" << endl
<< "\techo \"Running latex...\"" << endl << "\techo \"Running latex...\"" << endl
<< "\tlatex refman.tex" << endl << "\tlatex refman.tex" << endl
...@@ -163,37 +175,11 @@ void LatexGenerator::init() ...@@ -163,37 +175,11 @@ void LatexGenerator::init()
<< "\trm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out" << endl; << "\trm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out" << endl;
} }
void LatexGenerator::startFile(const char *name,const char *,bool) static void writeDefaultsStyleSheetPart1(QTextStream &t)
{ {
QCString fileName=name; // part 1
if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
startPlainFile(fileName);
}
void LatexGenerator::endFile()
{
endPlainFile();
}
//void LatexGenerator::writeIndex()
//{
// startFile("refman.tex");
//}
void LatexGenerator::startProjectNumber()
{
t << "\\\\[1ex]\\large ";
}
void LatexGenerator::startIndexSection(IndexSections is)
{
QCString paperName; QCString paperName;
switch (is)
{
case isTitlePageStart:
{
if (Config::latexHeaderFile.isEmpty())
{
if (Config::latexBatchModeFlag) t << "\\batchmode" << endl; if (Config::latexBatchModeFlag) t << "\\batchmode" << endl;
if (Config::paperType=="a4wide") paperName="a4"; else paperName=Config::paperType; if (Config::paperType=="a4wide") paperName="a4"; else paperName=Config::paperType;
t << "\\documentclass[" << paperName << "paper"; t << "\\documentclass[" << paperName << "paper";
...@@ -204,7 +190,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -204,7 +190,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
if (Config::paperType=="a4wide") t << "\\usepackage{a4wide}\n"; if (Config::paperType=="a4wide") t << "\\usepackage{a4wide}\n";
t << "\\usepackage{makeidx}\n" t << "\\usepackage{makeidx}\n"
"\\usepackage{fancyhdr}\n" "\\usepackage{fancyhdr}\n"
"\\usepackage{epsfig}\n" "\\usepackage{graphicx}\n"
"\\usepackage{float}\n" "\\usepackage{float}\n"
"\\usepackage{doxygen}\n"; "\\usepackage{doxygen}\n";
if (Config::pdfHyperFlag) if (Config::pdfHyperFlag)
...@@ -263,6 +249,74 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -263,6 +249,74 @@ void LatexGenerator::startIndexSection(IndexSections is)
"\\vspace*{7cm}\n" "\\vspace*{7cm}\n"
"\\begin{center}\n" "\\begin{center}\n"
"{\\Large "; "{\\Large ";
}
static void writeDefaultsStyleSheetPart2(QTextStream &t)
{
// part 2
t << "}\\\\" << endl
<< "\\vspace*{1cm}" << endl
<< "{\\large ";
}
static void writeDefaultsStyleSheetPart3(QTextStream &t)
{
// part 3
t << " Doxygen " << versionString << "}\\\\" << endl
<< "\\vspace*{0.5cm}" << endl
<< "{\\small " << dateToString(TRUE) << "}\\\\" << endl
<< "\\end{center}" << endl
<< "\\end{titlepage}" << endl;
if (!Config::compactLatexFlag) t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{roman}\n";
t << "\\tableofcontents\n";
if (!Config::compactLatexFlag) t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{arabic}\n";
}
void LatexGenerator::writeStyleSheetFile(QFile &f)
{
QTextStream t(&f);
writeDefaultsStyleSheetPart1(t);
t << "Your title here";
writeDefaultsStyleSheetPart2(t);
t << "Generated by";
writeDefaultsStyleSheetPart3(t);
}
void LatexGenerator::startFile(const char *name,const char *,bool)
{
QCString fileName=name;
if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
startPlainFile(fileName);
}
void LatexGenerator::endFile()
{
endPlainFile();
}
//void LatexGenerator::writeIndex()
//{
// startFile("refman.tex");
//}
void LatexGenerator::startProjectNumber()
{
t << "\\\\[1ex]\\large ";
}
void LatexGenerator::startIndexSection(IndexSections is)
{
switch (is)
{
case isTitlePageStart:
{
if (Config::latexHeaderFile.isEmpty())
{
writeDefaultsStyleSheetPart1(t);
} }
else else
{ {
...@@ -274,9 +328,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -274,9 +328,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
case isTitlePageAuthor: case isTitlePageAuthor:
if (Config::latexHeaderFile.isEmpty()) if (Config::latexHeaderFile.isEmpty())
{ {
t << "}\\\\" << endl writeDefaultsStyleSheetPart2(t);
<< "\\vspace*{1cm}" << endl
<< "{\\large ";
} }
break; break;
case isMainPage: case isMainPage:
...@@ -406,16 +458,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -406,16 +458,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isTitlePageAuthor: case isTitlePageAuthor:
if (Config::latexHeaderFile.isEmpty()) if (Config::latexHeaderFile.isEmpty())
{ {
t << " Doxygen " << versionString << "}\\\\" << endl writeDefaultsStyleSheetPart3(t);
<< "\\vspace*{0.5cm}" << endl
<< "{\\small " << dateToString(TRUE) << "}\\\\" << endl
<< "\\end{center}" << endl
<< "\\end{titlepage}" << endl;
if (!Config::compactLatexFlag) t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{roman}\n";
t << "\\tableofcontents\n";
if (!Config::compactLatexFlag) t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{arabic}\n";
} }
break; break;
case isMainPage: case isMainPage:
...@@ -1108,15 +1151,15 @@ void LatexGenerator::docify(const char *str) ...@@ -1108,15 +1151,15 @@ void LatexGenerator::docify(const char *str)
break; break;
case '"': if (isGerman) // " has a special meaning if German case '"': if (isGerman) // " has a special meaning if German
// - Thomas Vesper // - Thomas Vesper
{ t << "\\char`\\\""; } { t << "\\char`\\\"{}"; }
else else
{ t << (char)c; } { t << (char)c; }
break; break;
default: default:
if (isJapanese) if (isJapanese)
{ // language is japanese { // Japanese language uses wide characters
if (c>=128) // wide character if (c>=128)
{ {
t << (char)c; t << (char)c;
if (*p) if (*p)
...@@ -1125,25 +1168,25 @@ void LatexGenerator::docify(const char *str) ...@@ -1125,25 +1168,25 @@ void LatexGenerator::docify(const char *str)
t << (char)c; t << (char)c;
} }
} }
else // ascii char => see if we can insert hypenation hint else // ascii char => see if we can insert a hypenation hint
{ {
if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-"; if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-";
t << (char)c; t << (char)c;
} }
} }
else if (isRussian) else if (isCzech || isRussian)
{ {
if (c>=128) if (c>=128)
{ {
t << (char)c; t << (char)c;
} }
else else // ascii char => see if we can insert a hypenation hint
{ {
if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-"; if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-";
t << (char)c; t << (char)c;
} }
} }
else // language is other than russian or japanese else // language is other than Czech, Russian or Japanese
{ {
switch(c) switch(c)
{ {
...@@ -1156,8 +1199,8 @@ void LatexGenerator::docify(const char *str) ...@@ -1156,8 +1199,8 @@ void LatexGenerator::docify(const char *str)
case 194: t << "\\^{A}"; break; case 194: t << "\\^{A}"; break;
case 195: t << "\\~{A}"; break; case 195: t << "\\~{A}"; break;
case 196: t << "\\\"{A}"; break; case 196: t << "\\\"{A}"; break;
case 197: t << "\\AA "; break; case 197: t << "\\AA{}"; break;
case 198: t << "\\AE "; break; case 198: t << "\\AE{}"; break;
case 199: t << "\\c{C}"; break; case 199: t << "\\c{C}"; break;
case 200: t << "\\`{E}"; break; case 200: t << "\\`{E}"; break;
case 201: t << "\\'{E}"; break; case 201: t << "\\'{E}"; break;
...@@ -1181,14 +1224,14 @@ void LatexGenerator::docify(const char *str) ...@@ -1181,14 +1224,14 @@ void LatexGenerator::docify(const char *str)
case 219: t << "\\^{U}"; break; case 219: t << "\\^{U}"; break;
case 220: t << "\\\"{U}"; break; case 220: t << "\\\"{U}"; break;
case 221: t << "\\'{Y}"; break; case 221: t << "\\'{Y}"; break;
case 223: t << "\\ss "; break; case 223: t << "\\ss{}"; break;
case 224: t << "\\`{a}"; break; case 224: t << "\\`{a}"; break;
case 225: t << "\\'{a}"; break; case 225: t << "\\'{a}"; break;
case 226: t << "\\^{a}"; break; case 226: t << "\\^{a}"; break;
case 227: t << "\\~{a}"; break; case 227: t << "\\~{a}"; break;
case 228: t << "\\\"{a}"; break; case 228: t << "\\\"{a}"; break;
case 229: t << "\\aa "; break; case 229: t << "\\aa{}"; break;
case 230: t << "\\ae "; break; case 230: t << "\\ae{}"; break;
case 231: t << "\\c{c}"; break; case 231: t << "\\c{c}"; break;
case 232: t << "\\`{e}"; break; case 232: t << "\\`{e}"; break;
case 233: t << "\\'{e}"; break; case 233: t << "\\'{e}"; break;
...@@ -1204,7 +1247,7 @@ void LatexGenerator::docify(const char *str) ...@@ -1204,7 +1247,7 @@ void LatexGenerator::docify(const char *str)
case 244: t << "\\^{o}"; break; case 244: t << "\\^{o}"; break;
case 245: t << "\\~{o}"; break; case 245: t << "\\~{o}"; break;
case 246: t << "\\\"{o}"; break; case 246: t << "\\\"{o}"; break;
case 248: t << "\\o "; break; case 248: t << "\\o{}"; break;
case 249: t << "\\`{u}"; break; case 249: t << "\\`{u}"; break;
case 250: t << "\\'{u}"; break; case 250: t << "\\'{u}"; break;
case 251: t << "\\^{u}"; break; case 251: t << "\\^{u}"; break;
...@@ -1331,12 +1374,16 @@ void LatexGenerator::endMemberList() ...@@ -1331,12 +1374,16 @@ void LatexGenerator::endMemberList()
void LatexGenerator::writeImage(const char *name,const char *w,const char *h) void LatexGenerator::writeImage(const char *name,const char *w,const char *h)
{ {
t << "\\mbox{\\epsfig{file=" << name; t << "\\mbox{";
if (w) QCString gfxName = name;
t << "," << w; if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
else if (h) // "\\epsfig{file=" << name;
t << "," << h; t << "\\includegraphics";
t << "}}" << endl; if (w || h) t << "[";
if (w) t << "width=" << w; else if (h) t << "height=" << h;
if (w || h) t << "]";
t << "{" << gfxName << "}";
t << "}" << endl;
} }
void LatexGenerator::startMemberGroupHeader(bool hasHeader) void LatexGenerator::startMemberGroupHeader(bool hasHeader)
......
...@@ -27,6 +27,8 @@ class LatexGenerator : public OutputGenerator ...@@ -27,6 +27,8 @@ class LatexGenerator : public OutputGenerator
public: public:
LatexGenerator(); LatexGenerator();
~LatexGenerator(); ~LatexGenerator();
static void init();
static void writeStyleSheetFile(QFile &f);
OutputGenerator *copy(); OutputGenerator *copy();
//OutputGenerator *clone() { return new LatexGenerator(*this); } //OutputGenerator *clone() { return new LatexGenerator(*this); }
...@@ -39,7 +41,6 @@ class LatexGenerator : public OutputGenerator ...@@ -39,7 +41,6 @@ class LatexGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==Latex && active); } bool isEnabled(OutputType o) { return (o==Latex && active); }
OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; } OutputGenerator *get(OutputType o) { return (o==Latex) ? this : 0; }
static void init();
void startFile(const char *name,const char *title, bool external); void startFile(const char *name,const char *title, bool external);
void writeFooter(int,bool) {} void writeFooter(int,bool) {}
void endFile(); void endFile();
......
...@@ -54,7 +54,9 @@ MemberGroup::~MemberGroup() ...@@ -54,7 +54,9 @@ MemberGroup::~MemberGroup()
void MemberGroup::insertMember(MemberDef *md) void MemberGroup::insertMember(MemberDef *md)
{ {
//printf("MemberGroup::insertMember memberList=%p count=%d" //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()); // md->getSectionList());
if (inSameSection && memberList->count()>0 && if (inSameSection && memberList->count()>0 &&
memberList->first()->getSectionList()!=md->getSectionList()) memberList->first()->getSectionList()!=md->getSectionList())
......
...@@ -78,4 +78,5 @@ class MemberDict : public QDict<MemberDef> ...@@ -78,4 +78,5 @@ class MemberDict : public QDict<MemberDef>
~MemberDict() {} ~MemberDict() {}
}; };
#endif #endif
...@@ -668,12 +668,26 @@ QCString removeIdsAndMarkers(const char *s) ...@@ -668,12 +668,26 @@ QCString removeIdsAndMarkers(const char *s)
} }
p+=2; p+=2;
} }
else if (isdigit(c)) else if (isdigit(c)) // number
{ {
result+=c; result+=c;
p++; p++;
inNum=TRUE; 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 else if ((isalpha(c) || c=='_') && !inNum) // replace identifier with 0L
{ {
result+="0L"; result+="0L";
...@@ -731,8 +745,10 @@ bool computeExpression(const QCString &expr) ...@@ -731,8 +745,10 @@ bool computeExpression(const QCString &expr)
{ {
QCString e=expr; QCString e=expr;
expandExpression(e,0,0); expandExpression(e,0,0);
//printf("after expansion `%s'\n",e.data());
e = removeIdsAndMarkers(e); e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE; if (e.isEmpty()) return FALSE;
//printf("parsing `%s'\n",e.data());
return parseCppExpression(e); return parseCppExpression(e);
} }
......
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
#include "diagram.h" #include "diagram.h"
#include "language.h" #include "language.h"
#include "dot.h" #include "dot.h"
#include "version.h"
//#define DBG_RTF(x) x;
#define DBG_RTF(x)
const int indentLevels = 10; const int indentLevels = 10;
...@@ -343,6 +347,22 @@ static const struct ...@@ -343,6 +347,22 @@ static const struct
static QDict<char> Rtf_Style(257); static QDict<char> Rtf_Style(257);
void RTFGenerator::writeStyleSheetFile(QFile &file)
{
QTextStream t(&file);
t << "# Generated by doxygen " << versionString << "\n\n";
t << "# This file describes styles used for generating RTF output.\n";
t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
t << "# Remove a hash to activate a line.\n\n";
int i;
for (i=0;Rtf_Style_Default[i].name!=0;i++)
{
t << "# " << Rtf_Style_Default[i].name << " = "
<< Rtf_Style_Default[i].value << endl;
}
}
static void loadStylesheet(const char *name) static void loadStylesheet(const char *name)
{ {
QFile file(name); QFile file(name);
...@@ -428,14 +448,14 @@ void RTFGenerator::beginRTFDocument() ...@@ -428,14 +448,14 @@ void RTFGenerator::beginRTFDocument()
*/ */
t <<"{\\rtf1\\ansi\\ansicpg1252\\uc1 \\deff0\\deflang1033\\deflangfe1033\n"; t <<"{\\rtf1\\ansi\\ansicpg1252\\uc1 \\deff0\\deflang1033\\deflangfe1033\n";
t <<"{\\comment Begining font list}\n"; DBG_RTF(t <<"{\\comment Begining font list}\n")
t <<"{\\fonttbl "; t <<"{\\fonttbl ";
t <<"{\\f0\\froman\\fcharset0\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n"; t <<"{\\f0\\froman\\fcharset0\\fprq2{\\*\\panose 02020603050405020304}Times New Roman;}\n";
t <<"{\\f1\\fswiss\\fcharset0\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n"; t <<"{\\f1\\fswiss\\fcharset0\\fprq2{\\*\\panose 020b0604020202020204}Arial;}\n";
t <<"{\\f2\\fmodern\\fcharset0\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n"; t <<"{\\f2\\fmodern\\fcharset0\\fprq1{\\*\\panose 02070309020205020404}Courier New;}\n";
t <<"{\\f3\\froman\\fcharset2\\fprq2{\\*\\panose 05050102010706020507}Symbol;}\n"; t <<"{\\f3\\froman\\fcharset2\\fprq2{\\*\\panose 05050102010706020507}Symbol;}\n";
t <<"}\n"; t <<"}\n";
t <<"{\\comment begin colors}\n"; DBG_RTF(t <<"{\\comment begin colors}\n")
t <<"{\\colortbl;"; t <<"{\\colortbl;";
t <<"\\red0\\green0\\blue0;"; t <<"\\red0\\green0\\blue0;";
t <<"\\red0\\green0\\blue255;"; t <<"\\red0\\green0\\blue255;";
...@@ -454,7 +474,7 @@ void RTFGenerator::beginRTFDocument() ...@@ -454,7 +474,7 @@ void RTFGenerator::beginRTFDocument()
t <<"\\red128\\green128\\blue128;"; t <<"\\red128\\green128\\blue128;";
t <<"\\red192\\green192\\blue192;}" << endl; t <<"\\red192\\green192\\blue192;}" << endl;
t <<"{\\comment Begining style list}\n"; DBG_RTF(t <<"{\\comment Begining style list}\n")
t <<"{\\stylesheet\n"; t <<"{\\stylesheet\n";
t <<"{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n"; t <<"{\\widctlpar\\adjustright \\fs20\\cgrid \\snext0 Normal;}\n";
t <<"{" << Rtf_Style["Heading1"] <<"\\sbasedon0 \\snext0 heading 1;}\n"; t <<"{" << Rtf_Style["Heading1"] <<"\\sbasedon0 \\snext0 heading 1;}\n";
...@@ -507,13 +527,16 @@ void RTFGenerator::beginRTFDocument() ...@@ -507,13 +527,16 @@ void RTFGenerator::beginRTFDocument()
<< (QMIN(i+1,indentLevels-1)) << " \\sautoupd List Enum " << i << ";}\n"; << (QMIN(i+1,indentLevels-1)) << " \\sautoupd List Enum " << i << ";}\n";
} }
t <<"}" << endl; t <<"}" << endl;
// this comment is needed for postprocessing!
t <<"{\\comment begin body}" << endl; t <<"{\\comment begin body}" << endl;
} }
void RTFGenerator::beginRTFChapter() void RTFGenerator::beginRTFChapter()
{ {
t <<"\n{\\comment Begin Chapter}\n" << Rtf_Style["Reset"]; t <<"\n";
DBG_RTF(t << "{\\comment Begin Chapter}\n")
t << Rtf_Style["Reset"];
// if we are compact, no extra page breaks... // if we are compact, no extra page breaks...
if (Config::compactRTFFlag) if (Config::compactRTFFlag)
...@@ -531,7 +554,9 @@ void RTFGenerator::beginRTFChapter() ...@@ -531,7 +554,9 @@ void RTFGenerator::beginRTFChapter()
void RTFGenerator::beginRTFSection() void RTFGenerator::beginRTFSection()
{ {
t <<"\n{\\comment Begin Section}\n" << Rtf_Style["Reset"]; t <<"\n";
DBG_RTF(t << "{\\comment Begin Section}\n")
t << Rtf_Style["Reset"];
// if we are compact, no extra page breaks... // if we are compact, no extra page breaks...
if (Config::compactRTFFlag) if (Config::compactRTFFlag)
...@@ -603,7 +628,7 @@ void RTFGenerator::startIndexSection(IndexSections is) ...@@ -603,7 +628,7 @@ void RTFGenerator::startIndexSection(IndexSections is)
break; break;
case isClassHierarchyIndex: case isClassHierarchyIndex:
//Hierarchical Index //Hierarchical Index
t << "{\\comment start classhierarchy}\n"; DBG_RTF(t << "{\\comment start classhierarchy}\n")
beginRTFChapter(); beginRTFChapter();
break; break;
case isCompoundIndex: case isCompoundIndex:
...@@ -718,24 +743,24 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -718,24 +743,24 @@ void RTFGenerator::endIndexSection(IndexSections is)
{ {
t << " Doxygen}\n" t << " Doxygen}\n"
"{\\creatim " << dateToRTFDateString() << "}\n" "{\\creatim " << dateToRTFDateString() << "}\n"
"}{\\comment end of infoblock}\n"; "}";
DBG_RTF(t << "{\\comment end of infoblock}\n")
// setup for this section // setup for this section
t << Rtf_Style["Reset"] <<"\n"; t << Rtf_Style["Reset"] <<"\n";
t <<"\\sectd\\pgnlcrm\n"; t <<"\\sectd\\pgnlcrm\n";
t <<"{\\footer "<<Rtf_Style["Footer"] << "{\\chpgn}}\n"; t <<"{\\footer "<<Rtf_Style["Footer"] << "{\\chpgn}}\n";
// the title entry // the title entry
t << "{\\comment begin title page}\n"; DBG_RTF(t << "{\\comment begin title page}\n")
t << Rtf_Style["Reset"] << Rtf_Style["Title"] << endl; // set to title style t << Rtf_Style["Reset"] << Rtf_Style["Title"] << endl; // set to title style
t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt TITLE}}\\par" << endl; t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt TITLE}}\\par" << endl;
t << Rtf_Style["Reset"] << Rtf_Style["SubTitle"] << endl; // set to subtitle style t << Rtf_Style["Reset"] << Rtf_Style["SubTitle"] << endl; // set to subtitle style
t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par" << endl; t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par" << endl;
t << "{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}" t << "{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
"{\\fldrslt CREATEDATE}}\\par"<<endl; "{\\fldrslt CREATEDATE}}\\par"<<endl;
t << "{\\comment End title page}" << endl; DBG_RTF(t << "{\\comment End title page}" << endl)
// table of contents section // table of contents section
t << "{\\comment Table of contents}\n"; DBG_RTF(t << "{\\comment Table of contents}\n")
t << Rtf_Style["Reset"] << endl; t << Rtf_Style["Reset"] << endl;
t << "{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n"; t << "{\\field\\fldedit {\\*\\fldinst TOC \\\\f \\\\*MERGEFORMAT}{\\fldrslt Table of contents}}\\par\n";
t << Rtf_Style["Reset"] << endl; t << Rtf_Style["Reset"] << endl;
...@@ -978,7 +1003,7 @@ void RTFGenerator::endIndexSection(IndexSections is) ...@@ -978,7 +1003,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
void RTFGenerator::lastIndexPage() void RTFGenerator::lastIndexPage()
{ {
t <<"{\\comment Begining Body of RTF Document}\n"; DBG_RTF(t <<"{\\comment Begining Body of RTF Document}\n")
// end page and setup for rest of document // end page and setup for rest of document
t <<"\\sect \\sbkpage \\pgnrestart\n"; t <<"\\sect \\sbkpage \\pgnrestart\n";
t <<"\\sect \\sectd \\sbknone \\pgndec\n"; t <<"\\sect \\sectd \\sbknone \\pgndec\n";
...@@ -1007,7 +1032,7 @@ void RTFGenerator::writeString(const char *text) ...@@ -1007,7 +1032,7 @@ void RTFGenerator::writeString(const char *text)
void RTFGenerator::startIndexList() void RTFGenerator::startIndexList()
{ {
t << "{\\comment (startIndexList)}" << endl; DBG_RTF(t << "{\\comment (startIndexList)}" << endl)
t << "{" << endl; t << "{" << endl;
incrementIndentLevel(); incrementIndentLevel();
t << Rtf_Style["Reset"] << Rtf_LCList_DepthStyle() << endl; t << Rtf_Style["Reset"] << Rtf_LCList_DepthStyle() << endl;
...@@ -1017,7 +1042,7 @@ void RTFGenerator::startIndexList() ...@@ -1017,7 +1042,7 @@ void RTFGenerator::startIndexList()
void RTFGenerator::endIndexList() void RTFGenerator::endIndexList()
{ {
t << "{\\comment (endIndexList)}" << endl; DBG_RTF(t << "{\\comment (endIndexList)}" << endl)
newParagraph(); newParagraph();
t << "}"; t << "}";
decrementIndentLevel(); decrementIndentLevel();
...@@ -1027,7 +1052,7 @@ void RTFGenerator::endIndexList() ...@@ -1027,7 +1052,7 @@ void RTFGenerator::endIndexList()
/*! start bullet list */ /*! start bullet list */
void RTFGenerator::startItemList() void RTFGenerator::startItemList()
{ {
t << "{\\comment (startItemList level=" << m_listLevel << ") }" << endl; DBG_RTF(t << "{\\comment (startItemList level=" << m_listLevel << ") }" << endl)
t << "{"; t << "{";
incrementIndentLevel(); incrementIndentLevel();
listItemInfo[m_listLevel].isEnum = FALSE; listItemInfo[m_listLevel].isEnum = FALSE;
...@@ -1038,7 +1063,7 @@ void RTFGenerator::startItemList() ...@@ -1038,7 +1063,7 @@ void RTFGenerator::startItemList()
void RTFGenerator::endItemList() void RTFGenerator::endItemList()
{ {
newParagraph(); newParagraph();
t << "{\\comment (endItemList level=" << m_listLevel << ")}" << endl; DBG_RTF(t << "{\\comment (endItemList level=" << m_listLevel << ")}" << endl)
t << "}"; t << "}";
decrementIndentLevel(); decrementIndentLevel();
m_omitParagraph=TRUE; m_omitParagraph=TRUE;
...@@ -1050,7 +1075,7 @@ void RTFGenerator::endItemList() ...@@ -1050,7 +1075,7 @@ void RTFGenerator::endItemList()
/*! start enumeration list */ /*! start enumeration list */
void RTFGenerator::startEnumList() // starts an enumeration list void RTFGenerator::startEnumList() // starts an enumeration list
{ {
t << "{\\comment (startEnumList)}" << endl; DBG_RTF(t << "{\\comment (startEnumList)}" << endl)
t << "{" << endl; t << "{" << endl;
incrementIndentLevel(); incrementIndentLevel();
listItemInfo[m_listLevel].isEnum = TRUE; listItemInfo[m_listLevel].isEnum = TRUE;
...@@ -1065,7 +1090,7 @@ void RTFGenerator::startEnumList() // starts an enumeration list ...@@ -1065,7 +1090,7 @@ void RTFGenerator::startEnumList() // starts an enumeration list
void RTFGenerator::endEnumList() void RTFGenerator::endEnumList()
{ {
newParagraph(); newParagraph();
t << "{\\comment (endEnumList)}" << endl; DBG_RTF(t << "{\\comment (endEnumList)}" << endl)
t << "}"; t << "}";
decrementIndentLevel(); decrementIndentLevel();
m_omitParagraph=TRUE; m_omitParagraph=TRUE;
...@@ -1074,7 +1099,7 @@ void RTFGenerator::endEnumList() ...@@ -1074,7 +1099,7 @@ void RTFGenerator::endEnumList()
/*! write bullet or enum item */ /*! write bullet or enum item */
void RTFGenerator::writeListItem() void RTFGenerator::writeListItem()
{ {
t << "{\\comment (writeListItem)}" << endl; DBG_RTF(t << "{\\comment (writeListItem)}" << endl)
newParagraph(); newParagraph();
t << Rtf_Style["Reset"]; t << Rtf_Style["Reset"];
if (listItemInfo[m_listLevel].isEnum) if (listItemInfo[m_listLevel].isEnum)
...@@ -1093,7 +1118,7 @@ void RTFGenerator::writeListItem() ...@@ -1093,7 +1118,7 @@ void RTFGenerator::writeListItem()
void RTFGenerator::writeIndexItem(const char *ref,const char *fn, void RTFGenerator::writeIndexItem(const char *ref,const char *fn,
const char *name) const char *name)
{ {
t << "{\\comment (writeIndexItem)}" << endl; DBG_RTF(t << "{\\comment (writeIndexItem)}" << endl)
//t << Rtf_LCList_DepthStyle() << endl; //t << Rtf_LCList_DepthStyle() << endl;
docify(name); docify(name);
if (!ref && fn) if (!ref && fn)
...@@ -1152,7 +1177,7 @@ void RTFGenerator::writeMailLink(const char *url) ...@@ -1152,7 +1177,7 @@ void RTFGenerator::writeMailLink(const char *url)
void RTFGenerator::writeStartAnnoItem(const char *,const char *f, void RTFGenerator::writeStartAnnoItem(const char *,const char *f,
const char *path,const char *name) const char *path,const char *name)
{ {
t << "{\\comment (writeStartAnnoItem)}" << endl; DBG_RTF(t << "{\\comment (writeStartAnnoItem)}" << endl)
t << "{\\b "; t << "{\\b ";
if (path) docify(path); if (path) docify(path);
if (f && Config::rtfHyperFlag) if (f && Config::rtfHyperFlag)
...@@ -1175,7 +1200,7 @@ void RTFGenerator::writeStartAnnoItem(const char *,const char *f, ...@@ -1175,7 +1200,7 @@ void RTFGenerator::writeStartAnnoItem(const char *,const char *f,
void RTFGenerator::writeEndAnnoItem(const char *name) void RTFGenerator::writeEndAnnoItem(const char *name)
{ {
t << "{\\comment (writeEndAnnoItem)}" << endl; DBG_RTF(t << "{\\comment (writeEndAnnoItem)}" << endl)
if (name) if (name)
{ {
t << "\\tab "; t << "\\tab ";
...@@ -1192,7 +1217,9 @@ void RTFGenerator::writeEndAnnoItem(const char *name) ...@@ -1192,7 +1217,9 @@ void RTFGenerator::writeEndAnnoItem(const char *name)
void RTFGenerator::startSubsection() void RTFGenerator::startSubsection()
{ {
//beginRTFSubSection(); //beginRTFSubSection();
t <<"\n{\\comment Begin SubSection}\n" << Rtf_Style["Reset"]; t <<"\n";
DBG_RTF(t << "{\\comment Begin SubSection}\n")
t << Rtf_Style["Reset"];
t << Rtf_Style["Heading3"] << "\n"; t << Rtf_Style["Heading3"] << "\n";
} }
...@@ -1205,7 +1232,8 @@ void RTFGenerator::endSubsection() ...@@ -1205,7 +1232,8 @@ void RTFGenerator::endSubsection()
void RTFGenerator::startSubsubsection() void RTFGenerator::startSubsubsection()
{ {
//beginRTFSubSubSection(); //beginRTFSubSubSection();
t << "\n{\\comment Begin SubSubSection}\n"; t << "\n";
DBG_RTF(t << "{\\comment Begin SubSubSection}\n")
t << "{" << endl; t << "{" << endl;
t << Rtf_Style["Reset"] << Rtf_Style["Heading4"] << "\n"; t << Rtf_Style["Reset"] << Rtf_Style["Heading4"] << "\n";
} }
...@@ -1344,7 +1372,7 @@ void RTFGenerator::writeCodeLink(const char *ref,const char *f, ...@@ -1344,7 +1372,7 @@ void RTFGenerator::writeCodeLink(const char *ref,const char *f,
void RTFGenerator::startTitleHead(const char *) void RTFGenerator::startTitleHead(const char *)
{ {
t <<"{\\comment startTitleHead}" << endl; DBG_RTF(t <<"{\\comment startTitleHead}" << endl)
// beginRTFSection(); // beginRTFSection();
t << Rtf_Style["Reset"] << Rtf_Style["Heading2"] << endl; t << Rtf_Style["Reset"] << Rtf_Style["Heading2"] << endl;
...@@ -1352,7 +1380,7 @@ void RTFGenerator::startTitleHead(const char *) ...@@ -1352,7 +1380,7 @@ void RTFGenerator::startTitleHead(const char *)
void RTFGenerator::endTitleHead(const char *fileName,const char *name) void RTFGenerator::endTitleHead(const char *fileName,const char *name)
{ {
t <<"{\\comment endTitleHead}" << endl; DBG_RTF(t <<"{\\comment endTitleHead}" << endl)
t << "\\par " << Rtf_Style["Reset"] << endl; t << "\\par " << Rtf_Style["Reset"] << endl;
if (name) if (name)
{ {
...@@ -1378,7 +1406,7 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name) ...@@ -1378,7 +1406,7 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
void RTFGenerator::startTitle() void RTFGenerator::startTitle()
{ {
t <<"{\\comment startTitle}" << endl; DBG_RTF(t <<"{\\comment startTitle}" << endl)
if (Config::compactRTFFlag) if (Config::compactRTFFlag)
beginRTFSection(); beginRTFSection();
else else
...@@ -1387,7 +1415,7 @@ void RTFGenerator::startTitle() ...@@ -1387,7 +1415,7 @@ void RTFGenerator::startTitle()
void RTFGenerator::startGroupHeader() void RTFGenerator::startGroupHeader()
{ {
t <<"{\\comment startGroupHeader}" << endl; DBG_RTF(t <<"{\\comment startGroupHeader}" << endl)
newParagraph(); newParagraph();
t << Rtf_Style["Reset"]; t << Rtf_Style["Reset"];
t << Rtf_Style["Heading3"]; t << Rtf_Style["Heading3"];
...@@ -1396,7 +1424,7 @@ void RTFGenerator::startGroupHeader() ...@@ -1396,7 +1424,7 @@ void RTFGenerator::startGroupHeader()
void RTFGenerator::endGroupHeader() void RTFGenerator::endGroupHeader()
{ {
t <<"{\\comment endGroupHeader}" << endl; DBG_RTF(t <<"{\\comment endGroupHeader}" << endl)
newParagraph(); newParagraph();
t << Rtf_Style["Reset"] << endl; t << Rtf_Style["Reset"] << endl;
} }
...@@ -1406,7 +1434,7 @@ void RTFGenerator::startMemberDoc(const char *clname, ...@@ -1406,7 +1434,7 @@ void RTFGenerator::startMemberDoc(const char *clname,
const char *, const char *,
const char *) const char *)
{ {
t << "{\\comment startMemberDoc}" << endl; DBG_RTF(t << "{\\comment startMemberDoc}" << endl)
if (memname && memname[0]!='@') if (memname && memname[0]!='@')
{ {
addToIndex(memname,clname); addToIndex(memname,clname);
...@@ -1422,7 +1450,7 @@ void RTFGenerator::startMemberDoc(const char *clname, ...@@ -1422,7 +1450,7 @@ void RTFGenerator::startMemberDoc(const char *clname,
void RTFGenerator::endMemberDoc() void RTFGenerator::endMemberDoc()
{ {
t << "{\\comment endMemberDoc}" << endl; DBG_RTF(t << "{\\comment endMemberDoc}" << endl)
t << "}" << endl; t << "}" << endl;
//const char *style = styleStack.pop(); //const char *style = styleStack.pop();
//printf("RTFGenerator::endMemberDoc() `%s'\n",style); //printf("RTFGenerator::endMemberDoc() `%s'\n",style);
...@@ -1504,7 +1532,7 @@ void RTFGenerator::addToIndex(const char *s1,const char *s2) ...@@ -1504,7 +1532,7 @@ void RTFGenerator::addToIndex(const char *s1,const char *s2)
void RTFGenerator::startIndent() void RTFGenerator::startIndent()
{ {
incrementIndentLevel(); incrementIndentLevel();
t << "{\\comment (startIndent) }" << endl; DBG_RTF(t << "{\\comment (startIndent) }" << endl)
t << "{" << endl; t << "{" << endl;
t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle() << endl; t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle() << endl;
//styleStack.push(style); //styleStack.push(style);
...@@ -1520,14 +1548,14 @@ void RTFGenerator::endIndent() ...@@ -1520,14 +1548,14 @@ void RTFGenerator::endIndent()
void RTFGenerator::startDescription() void RTFGenerator::startDescription()
{ {
t << "{\\comment (startDescription)}" << endl; DBG_RTF(t << "{\\comment (startDescription)}" << endl)
t << "{" << endl; t << "{" << endl;
t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle(); t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle();
} }
void RTFGenerator::endDescription() void RTFGenerator::endDescription()
{ {
t << "{\\comment (endDescription)}" << endl; DBG_RTF(t << "{\\comment (endDescription)}" << endl)
t << "}"; t << "}";
newParagraph(); newParagraph();
} }
...@@ -1535,20 +1563,20 @@ void RTFGenerator::endDescription() ...@@ -1535,20 +1563,20 @@ void RTFGenerator::endDescription()
void RTFGenerator::startDescItem() void RTFGenerator::startDescItem()
{ {
newParagraph(); newParagraph();
t << "{\\comment (startDescItem)}" << endl; DBG_RTF(t << "{\\comment (startDescItem)}" << endl)
t << "{\\b "; t << "{\\b ";
} }
void RTFGenerator::endDescItem() void RTFGenerator::endDescItem()
{ {
t << "{\\comment (endDescItem)}" << endl; DBG_RTF(t << "{\\comment (endDescItem)}" << endl)
t << "}" << endl; t << "}" << endl;
newParagraph(); newParagraph();
} }
void RTFGenerator::startMemberDescription() void RTFGenerator::startMemberDescription()
{ {
t << "{\\comment (startMemberDescription)}" << endl; DBG_RTF(t << "{\\comment (startMemberDescription)}" << endl)
t << "{" << endl; t << "{" << endl;
incrementIndentLevel(); incrementIndentLevel();
t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle(); t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle();
...@@ -1557,7 +1585,7 @@ void RTFGenerator::startMemberDescription() ...@@ -1557,7 +1585,7 @@ void RTFGenerator::startMemberDescription()
void RTFGenerator::endMemberDescription() void RTFGenerator::endMemberDescription()
{ {
t << "{\\comment (endMemberDescription)}" << endl; DBG_RTF(t << "{\\comment (endMemberDescription)}" << endl)
endEmphasis(); endEmphasis();
newParagraph(); newParagraph();
decrementIndentLevel(); decrementIndentLevel();
...@@ -1566,14 +1594,14 @@ void RTFGenerator::endMemberDescription() ...@@ -1566,14 +1594,14 @@ void RTFGenerator::endMemberDescription()
void RTFGenerator::startDescList() void RTFGenerator::startDescList()
{ {
t << "{\\comment (startDescList)}" << endl; DBG_RTF(t << "{\\comment (startDescList)}" << endl)
t << "{"; t << "{";
newParagraph(); newParagraph();
} }
void RTFGenerator::endDescTitle() void RTFGenerator::endDescTitle()
{ {
t << "{\\comment (endDescTitle) }" << endl; DBG_RTF(t << "{\\comment (endDescTitle) }" << endl)
newParagraph(); newParagraph();
//t << Rtf_Style["Reset"] << styleStack.top(); //t << Rtf_Style["Reset"] << styleStack.top();
incrementIndentLevel(); incrementIndentLevel();
...@@ -1582,14 +1610,14 @@ void RTFGenerator::endDescTitle() ...@@ -1582,14 +1610,14 @@ void RTFGenerator::endDescTitle()
void RTFGenerator::writeDescItem() void RTFGenerator::writeDescItem()
{ {
t << "{\\comment (writeDescItem) }" << endl; DBG_RTF(t << "{\\comment (writeDescItem) }" << endl)
// incrementIndentLevel(); // incrementIndentLevel();
//t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle(); //t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle();
} }
void RTFGenerator::endDescList() void RTFGenerator::endDescList()
{ {
t << "{\\comment (endDescList)}" << endl; DBG_RTF(t << "{\\comment (endDescList)}" << endl)
newParagraph(); newParagraph();
t << "}"; t << "}";
decrementIndentLevel(); decrementIndentLevel();
...@@ -1599,7 +1627,7 @@ void RTFGenerator::endDescList() ...@@ -1599,7 +1627,7 @@ void RTFGenerator::endDescList()
void RTFGenerator::writeSection(const char *lab,const char *title,bool sub) void RTFGenerator::writeSection(const char *lab,const char *title,bool sub)
{ {
t << "{\\comment (writeSection)}" << endl; DBG_RTF(t << "{\\comment (writeSection)}" << endl)
t << "{"; t << "{";
t<< Rtf_Style["Reset"]; t<< Rtf_Style["Reset"];
if (sub) if (sub)
...@@ -1732,7 +1760,7 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d, ...@@ -1732,7 +1760,7 @@ void RTFGenerator::endClassDiagram(ClassDiagram &d,
const char *fileName,const char *) const char *fileName,const char *)
{ {
newParagraph(); newParagraph();
t <<"{\\comment This would be an image map..." << endl; DBG_RTF(t <<"{\\comment This would be an image map..." << endl)
// create a gif file // create a gif file
d.writeImageMap(t,dir,fileName); d.writeImageMap(t,dir,fileName);
...@@ -1755,13 +1783,13 @@ void RTFGenerator::writeFormula(const char *,const char *text) ...@@ -1755,13 +1783,13 @@ void RTFGenerator::writeFormula(const char *,const char *text)
void RTFGenerator::startMemberItem(int) void RTFGenerator::startMemberItem(int)
{ {
t <<"{\\comment startMemberItem }" << endl; DBG_RTF(t <<"{\\comment startMemberItem }" << endl)
t << Rtf_Style["Reset"] << Rtf_BList_DepthStyle() << endl; // set style to apropriate depth t << Rtf_Style["Reset"] << Rtf_BList_DepthStyle() << endl; // set style to apropriate depth
} }
void RTFGenerator::endMemberItem(bool) void RTFGenerator::endMemberItem(bool)
{ {
t <<"{\\comment endMemberItem }" << endl; DBG_RTF(t <<"{\\comment endMemberItem }" << endl)
newParagraph(); newParagraph();
} }
...@@ -1809,7 +1837,7 @@ void RTFGenerator::writeNonBreakableSpace() ...@@ -1809,7 +1837,7 @@ void RTFGenerator::writeNonBreakableSpace()
void RTFGenerator::startMemberList() void RTFGenerator::startMemberList()
{ {
t << endl; t << endl;
t << "{\\comment (startMemberList) }" << endl; DBG_RTF(t << "{\\comment (startMemberList) }" << endl)
t << "{" << endl; t << "{" << endl;
#ifdef DELETEDCODE #ifdef DELETEDCODE
if (!insideTabbing) if (!insideTabbing)
...@@ -1819,7 +1847,7 @@ void RTFGenerator::startMemberList() ...@@ -1819,7 +1847,7 @@ void RTFGenerator::startMemberList()
void RTFGenerator::endMemberList() void RTFGenerator::endMemberList()
{ {
t << "{\\comment (endMemberList) }" << endl; DBG_RTF(t << "{\\comment (endMemberList) }" << endl)
t << "}" << endl; t << "}" << endl;
#ifdef DELETEDCODE #ifdef DELETEDCODE
if (!insideTabbing) if (!insideTabbing)
...@@ -1841,7 +1869,7 @@ void RTFGenerator::writeImage(const char *,const char *,const char *) ...@@ -1841,7 +1869,7 @@ void RTFGenerator::writeImage(const char *,const char *,const char *)
void RTFGenerator::startDescTable() void RTFGenerator::startDescTable()
{ {
t << "{\\comment (startDescTable) }" << endl; DBG_RTF(t << "{\\comment (startDescTable) }" << endl)
t << "{" << endl; t << "{" << endl;
//incrementIndentLevel(); //incrementIndentLevel();
//t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle(); //t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle();
...@@ -1850,7 +1878,7 @@ void RTFGenerator::startDescTable() ...@@ -1850,7 +1878,7 @@ void RTFGenerator::startDescTable()
void RTFGenerator::endDescTable() void RTFGenerator::endDescTable()
{ {
//decrementIndentLevel(); //decrementIndentLevel();
t << "{\\comment (endDescTable)}" << endl; DBG_RTF(t << "{\\comment (endDescTable)}" << endl)
t << "}" << endl; t << "}" << endl;
//t << Rtf_Style["Reset"] << styleStack.top(); //t << Rtf_Style["Reset"] << styleStack.top();
} }
...@@ -1858,25 +1886,25 @@ void RTFGenerator::endDescTable() ...@@ -1858,25 +1886,25 @@ void RTFGenerator::endDescTable()
void RTFGenerator::startDescTableTitle() void RTFGenerator::startDescTableTitle()
{ {
//t << Rtf_BList_DepthStyle() << endl; //t << Rtf_BList_DepthStyle() << endl;
t << "{\\comment (startDescTableTitle) }" << endl; DBG_RTF(t << "{\\comment (startDescTableTitle) }" << endl)
startBold(); startBold();
} }
void RTFGenerator::endDescTableTitle() void RTFGenerator::endDescTableTitle()
{ {
t << "{\\comment (endDescTableTitle) }" << endl; DBG_RTF(t << "{\\comment (endDescTableTitle) }" << endl)
endBold(); endBold();
t << " "; t << " ";
} }
void RTFGenerator::startDescTableData() void RTFGenerator::startDescTableData()
{ {
t << "{\\comment (startDescTableData) }" << endl; DBG_RTF(t << "{\\comment (startDescTableData) }" << endl)
} }
void RTFGenerator::endDescTableData() void RTFGenerator::endDescTableData()
{ {
t << "{\\comment (endDescTableData) }" << endl; DBG_RTF(t << "{\\comment (endDescTableData) }" << endl)
newParagraph(); newParagraph();
} }
...@@ -1944,7 +1972,7 @@ const char * RTFGenerator::Rtf_Code_DepthStyle() ...@@ -1944,7 +1972,7 @@ const char * RTFGenerator::Rtf_Code_DepthStyle()
void RTFGenerator::startTextBlock(bool dense) void RTFGenerator::startTextBlock(bool dense)
{ {
t << "{\\comment Start TextBlock}" << endl; DBG_RTF(t << "{\\comment Start TextBlock}" << endl)
t << "{" << endl; t << "{" << endl;
t << Rtf_Style["Reset"]; t << Rtf_Style["Reset"];
if (dense) // no spacing between "paragraphs" if (dense) // no spacing between "paragraphs"
...@@ -1961,7 +1989,7 @@ void RTFGenerator::endTextBlock() ...@@ -1961,7 +1989,7 @@ void RTFGenerator::endTextBlock()
{ {
newParagraph(); newParagraph();
t << "}" << endl; t << "}" << endl;
t << "{\\comment End TextBlock}" << endl; DBG_RTF(t << "{\\comment End TextBlock}" << endl)
m_omitParagraph = TRUE; m_omitParagraph = TRUE;
} }
...@@ -2123,9 +2151,9 @@ static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncl ...@@ -2123,9 +2151,9 @@ static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncl
int startNamePos = lineBuf.find('"',pos)+1; int startNamePos = lineBuf.find('"',pos)+1;
int endNamePos = lineBuf.find('"',startNamePos); int endNamePos = lineBuf.find('"',startNamePos);
QCString fileName = lineBuf.mid(startNamePos,endNamePos-startNamePos); QCString fileName = lineBuf.mid(startNamePos,endNamePos-startNamePos);
t << "{\\comment begin include " << fileName << "}" << endl; DBG_RTF(t << "{\\comment begin include " << fileName << "}" << endl)
if (!PreProcessFile(d,fileName,t,FALSE)) return FALSE; if (!PreProcessFile(d,fileName,t,FALSE)) return FALSE;
t << "{\\comment end include " << fileName << "}" << endl; DBG_RTF(t << "{\\comment end include " << fileName << "}" << endl)
} }
else else
{ {
...@@ -2162,7 +2190,7 @@ void RTFGenerator::startDotGraph() ...@@ -2162,7 +2190,7 @@ void RTFGenerator::startDotGraph()
void RTFGenerator::endDotGraph(DotClassGraph &g) void RTFGenerator::endDotGraph(DotClassGraph &g)
{ {
newParagraph(); newParagraph();
t <<"{\\comment This would be an image map..." << endl; DBG_RTF(t <<"{\\comment This would be an image map..." << endl)
g.writeGraph(t,GIF,Config::rtfOutputDir); g.writeGraph(t,GIF,Config::rtfOutputDir);
...@@ -2184,7 +2212,7 @@ void RTFGenerator::startInclDepGraph() ...@@ -2184,7 +2212,7 @@ void RTFGenerator::startInclDepGraph()
void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
{ {
newParagraph(); newParagraph();
t <<"{\\comment This would be an image map..." << endl; DBG_RTF(t <<"{\\comment This would be an image map..." << endl)
g.writeGraph(t,GIF,Config::rtfOutputDir); g.writeGraph(t,GIF,Config::rtfOutputDir);
...@@ -2251,7 +2279,7 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name) ...@@ -2251,7 +2279,7 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
void RTFGenerator::startMemberGroupHeader(bool hasHeader) void RTFGenerator::startMemberGroupHeader(bool hasHeader)
{ {
t << "{\\comment startMemberGroupHeader}" << endl; DBG_RTF(t << "{\\comment startMemberGroupHeader}" << endl)
t << "{" << endl; t << "{" << endl;
if (hasHeader) incrementIndentLevel(); if (hasHeader) incrementIndentLevel();
t << Rtf_Style["Reset"] << Rtf_Style["GroupHeader"]; t << Rtf_Style["Reset"] << Rtf_Style["GroupHeader"];
...@@ -2259,33 +2287,33 @@ void RTFGenerator::startMemberGroupHeader(bool hasHeader) ...@@ -2259,33 +2287,33 @@ void RTFGenerator::startMemberGroupHeader(bool hasHeader)
void RTFGenerator::endMemberGroupHeader() void RTFGenerator::endMemberGroupHeader()
{ {
t << "{\\comment endMemberGroupHeader}" << endl; DBG_RTF(t << "{\\comment endMemberGroupHeader}" << endl)
newParagraph(); newParagraph();
t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle(); t << Rtf_Style["Reset"] << Rtf_CList_DepthStyle();
} }
void RTFGenerator::startMemberGroupDocs() void RTFGenerator::startMemberGroupDocs()
{ {
t << "{\\comment startMemberGroupDocs}" << endl; DBG_RTF(t << "{\\comment startMemberGroupDocs}" << endl)
startEmphasis(); startEmphasis();
} }
void RTFGenerator::endMemberGroupDocs() void RTFGenerator::endMemberGroupDocs()
{ {
t << "{\\comment endMemberGroupDocs}" << endl; DBG_RTF(t << "{\\comment endMemberGroupDocs}" << endl)
endEmphasis(); endEmphasis();
newParagraph(); newParagraph();
} }
void RTFGenerator::startMemberGroup() void RTFGenerator::startMemberGroup()
{ {
t << "{\\comment startMemberGroup}" << endl; DBG_RTF(t << "{\\comment startMemberGroup}" << endl)
t << Rtf_Style["Reset"] << Rtf_BList_DepthStyle() << endl; t << Rtf_Style["Reset"] << Rtf_BList_DepthStyle() << endl;
} }
void RTFGenerator::endMemberGroup(bool hasHeader) void RTFGenerator::endMemberGroup(bool hasHeader)
{ {
t << "{\\comment endMemberGroup}" << endl; DBG_RTF(t << "{\\comment endMemberGroup}" << endl)
if (hasHeader) decrementIndentLevel(); if (hasHeader) decrementIndentLevel();
t << "}"; t << "}";
} }
......
...@@ -27,6 +27,8 @@ class RTFGenerator : public OutputGenerator ...@@ -27,6 +27,8 @@ class RTFGenerator : public OutputGenerator
public: public:
RTFGenerator(); RTFGenerator();
~RTFGenerator(); ~RTFGenerator();
static void init();
static void writeStyleSheetFile(QFile &f);
OutputGenerator *copy(); OutputGenerator *copy();
//OutputGenerator *clone() { return new RTFGenerator(*this); } //OutputGenerator *clone() { return new RTFGenerator(*this); }
...@@ -39,7 +41,6 @@ class RTFGenerator : public OutputGenerator ...@@ -39,7 +41,6 @@ class RTFGenerator : public OutputGenerator
bool isEnabled(OutputType o) { return (o==RTF && active); } bool isEnabled(OutputType o) { return (o==RTF && active); }
OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; } OutputGenerator *get(OutputType o) { return (o==RTF) ? this : 0; }
static void init();
void startFile(const char *name,const char *title, bool external); void startFile(const char *name,const char *title, bool external);
void writeFooter(int,bool) {} void writeFooter(int,bool) {}
void endFile(); void endFile();
......
...@@ -859,11 +859,18 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type) ...@@ -859,11 +859,18 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
return result; return result;
} }
// find first identifier in string (exclusing type keywords)
QCString extractName(const QCString &s) QCString extractName(const QCString &s)
{ {
uint i=0; static const QRegExp id("[a-z_A-Z][a-z_A-Z0-9]*");
while (i<s.length() && isId(s.at(i))) i++; int i,p=0,l;
return s.left(i); while ((i=id.match(s,p,&l))!=-1)
{
QCString idstr=s.mid(i,l);
if (idstr!="struct" && idstr!="class" && idstr!="union") return idstr;
p=i+l;
}
return "";
} }
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
...@@ -1288,7 +1295,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1288,7 +1295,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->addToIndex(yytext,0); outDoc->addToIndex(yytext,0);
BEGIN(DocScan); BEGIN(DocScan);
} }
<DocScan>{CMD}"arg"/{BN} { <DocScan>{CMD}("arg"|"li")/{BN} {
if (insideArgumentList) if (insideArgumentList)
{ {
outDoc->writeListItem(); outDoc->writeListItem();
...@@ -1778,7 +1785,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1778,7 +1785,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
else if (!generateLink(*outDoc,className,yytext,TRUE,0)) else if (!generateLink(*outDoc,className,yytext,TRUE,0))
{ {
warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s!",yytext); warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s!",yytext);
outDoc->writeBoldString(" unknown reference! "); //outDoc->writeBoldString(" unknown reference! ");
} }
BEGIN(DocScan); BEGIN(DocScan);
} }
...@@ -1907,24 +1914,29 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1907,24 +1914,29 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
"in the documentation."); "in the documentation.");
} }
<DocScan>{ID}"<"[^>\ \t\n]*">"("::"{ID})+"("?[a-z_A-Z0-9,:\<\> \t\*\&]*")"? { <DocScan,DocRefName>{ID}"<"[^>\ \t\n]*">"("::"{ID})+"("?[a-z_A-Z0-9,:\<\> \t\*\&]*")"? {
generateRef(*outDoc,className,yytext,inSeeBlock); generateRef(*outDoc,className,yytext,inSeeBlock);
BEGIN(DocScan);
} }
<DocScan>{SCOPEMASK}"("[a-z_A-Z0-9,:\<\> \t\*\&]+")" { <DocScan,DocRefName>{SCOPEMASK}"("[a-z_A-Z0-9,:\<\> \t\*\&]+")" {
generateRef(*outDoc,className,yytext,inSeeBlock); generateRef(*outDoc,className,yytext,inSeeBlock);
BEGIN(DocScan);
} }
<DocScan>{SCOPEMASK}("()")? { <DocScan,DocRefName>{SCOPEMASK}("()")? {
generateRef(*outDoc,className,yytext,inSeeBlock); generateRef(*outDoc,className,yytext,inSeeBlock);
BEGIN(DocScan);
} }
<DocScan>({SCOPEMASK}"::")?"operator()("[a-z_A-Z0-9,\<\> \t\*\&]*")" { <DocScan,DocRefName>({SCOPEMASK}"::")?"operator()("[a-z_A-Z0-9,\<\> \t\*\&]*")" {
QCString oName=yytext; QCString oName=yytext;
generateRef(*outDoc,className, generateRef(*outDoc,className,
removeRedundantWhiteSpace(oName),inSeeBlock); removeRedundantWhiteSpace(oName),inSeeBlock);
BEGIN(DocScan);
} }
<DocScan>({SCOPEMASK}"::")?"operator"[^(\r\n.,]+"("[a-z_A-Z0-9,\<\> \t\*\&]*")" { <DocScan,DocRefName>({SCOPEMASK}"::")?"operator"[^(\r\n.,]+"("[a-z_A-Z0-9,\<\> \t\*\&]*")" {
QCString oName=yytext; QCString oName=yytext;
generateRef(*outDoc,className, generateRef(*outDoc,className,
removeRedundantWhiteSpace(oName),inSeeBlock); removeRedundantWhiteSpace(oName),inSeeBlock);
BEGIN(DocScan);
} }
<DocScan>("http:"|"https:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); } <DocScan>("http:"|"https:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); }
<DocScan>[a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); } <DocScan>[a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); }
...@@ -1943,10 +1955,9 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -1943,10 +1955,9 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
outDoc->endCodeFragment(); outDoc->endCodeFragment();
BEGIN( DocScan ); BEGIN( DocScan );
} }
<DocScan>{CMD}"e"{BN}+ { BEGIN( DocEmphasis ); } <DocScan>{CMD}("e"|"em"|"a"){BN}+ { BEGIN( DocEmphasis ); }
<DocScan>{CMD}"a"{BN}+ { BEGIN( DocEmphasis ); }
<DocScan>{CMD}"b"{BN}+ { BEGIN( DocBold ); } <DocScan>{CMD}"b"{BN}+ { BEGIN( DocBold ); }
<DocScan>{CMD}"c"{BN}+ { BEGIN( DocCode ); } <DocScan>{CMD}("c"|"p"){BN}+ { BEGIN( DocCode ); }
<DocScan>{CMD}"l"{BN}+ <DocScan>{CMD}"l"{BN}+
<DocScan>"\\n"/[^a-z_A-Z0-9] { outDoc->lineBreak(); } <DocScan>"\\n"/[^a-z_A-Z0-9] { outDoc->lineBreak(); }
<DocScan>{CMD}"include"{BN}+ { BEGIN( DocInclude ); } <DocScan>{CMD}"include"{BN}+ { BEGIN( DocInclude ); }
...@@ -2167,7 +2178,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2167,7 +2178,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
} }
<DocEmphasis>{WORD} { <DocEmphasis>{WORD} {
outDoc->startEmphasis(); outDoc->startEmphasis();
linkifyText(*outDoc,className,0,yytext); linkifyText(*outDoc,className,0,yytext,FALSE,FALSE);
outDoc->endEmphasis(); outDoc->endEmphasis();
BEGIN( DocScan ); BEGIN( DocScan );
} }
...@@ -2185,7 +2196,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2185,7 +2196,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
} }
<DocBold>{WORD} { <DocBold>{WORD} {
outDoc->startBold(); outDoc->startBold();
linkifyText(*outDoc,className,0,yytext); linkifyText(*outDoc,className,0,yytext,FALSE,FALSE);
outDoc->endBold(); outDoc->endBold();
BEGIN( DocScan ); BEGIN( DocScan );
} }
...@@ -2197,7 +2208,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2197,7 +2208,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
} }
<DocCode>{WORD} { <DocCode>{WORD} {
outDoc->startTypewriter(); outDoc->startTypewriter();
linkifyText(*outDoc,className,0,yytext); linkifyText(*outDoc,className,0,yytext,FALSE,FALSE);
outDoc->endTypewriter(); outDoc->endTypewriter();
BEGIN( DocScan ); BEGIN( DocScan );
} }
...@@ -2347,7 +2358,8 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2347,7 +2358,8 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
current->argList->clear(); current->argList->clear();
lineCount(); lineCount();
} }
<FindMembers>{B}*"properties"{B}":" { /* M$-IDL only: ignored */ }
<FindMembers>{B}*"methods"{B}":" { /* M$-IDL only: ignored */ }
<FindMembers>{B}*"public"{BN}*":"{BN}* { <FindMembers>{B}*"public"{BN}*":"{BN}* {
current->protection = protection = Public ; current->protection = protection = Public ;
current->slot = slot = FALSE; current->slot = slot = FALSE;
...@@ -2387,6 +2399,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2387,6 +2399,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
} }
<FindMembers>{B}*"extern"{BN}+ { <FindMembers>{B}*"extern"{BN}+ {
current->stat = FALSE; current->stat = FALSE;
current->explicitExternal = TRUE;
lineCount(); lineCount();
} }
<FindMembers>{B}*"virtual"{BN}+ { current->type += " virtual "; <FindMembers>{B}*"virtual"{BN}+ { current->type += " virtual ";
...@@ -2436,7 +2449,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -2436,7 +2449,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
lineCount(); lineCount();
BEGIN( CompoundName ); BEGIN( CompoundName );
} }
<FindMembers>{B}*"interface"{BN}+ { // M$/Corba IDL interface <FindMembers>{B}*("disp")?"interface"{BN}+ { // M$/Corba IDL interface
isTypedef=FALSE; isTypedef=FALSE;
current->section = Entry::INTERFACE_SEC; current->section = Entry::INTERFACE_SEC;
addType( current ) ; addType( current ) ;
...@@ -3047,9 +3060,9 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -3047,9 +3060,9 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
{ {
// add typedef to dictionary // add typedef to dictionary
QCString dest = extractName(current->type.right(current->type.length()-8)); QCString dest = extractName(current->type.right(current->type.length()-8));
if (!dest.isEmpty()) if (typedefDict[current->name]==0 && !dest.isEmpty())
{ {
//printf(">>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data()); //printf("1>>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data());
typedefDict.insert(current->name, new QCString(dest)); typedefDict.insert(current->name, new QCString(dest));
} }
} }
...@@ -3323,6 +3336,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -3323,6 +3336,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
//printf("current->name = %s %s\n",current->name.data(),msName.data()); //printf("current->name = %s %s\n",current->name.data(),msName.data());
if (!current->name.isEmpty() && current->name.at(0)!='@') if (!current->name.isEmpty() && current->name.at(0)!='@')
{ {
//printf("2>>>>>>>>>> adding %s->%s\n",msName.data(),current->name.data());
typedefDict.insert(msName,new QCString(current->name)); typedefDict.insert(msName,new QCString(current->name));
} }
} }
...@@ -3956,6 +3970,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -3956,6 +3970,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
if (isTypedef) if (isTypedef)
{ {
//QCString dest = extractName(current->name); //QCString dest = extractName(current->name);
//printf("3>>>>>>>>>> adding %s->%s\n",yytext,current->name.data());
typedefDict.insert(yytext,new QCString(current->name)); typedefDict.insert(yytext,new QCString(current->name));
//current->extends->append( //current->extends->append(
// new BaseInfo(yytext,Public,Normal) // new BaseInfo(yytext,Public,Normal)
...@@ -4656,7 +4671,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") ...@@ -4656,7 +4671,7 @@ DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"")
<SkipCode>"//" { <SkipCode>"//" {
current->doc+=yytext; current->doc+=yytext;
} }
<SkipCode>[^ \*\t\/\\\n]+ { <SkipCode>[^ \<\*\t\/\\\n]+ {
current->doc+=yytext; current->doc+=yytext;
} }
<SkipCode>\n { <SkipCode>\n {
......
...@@ -50,6 +50,12 @@ class Translator ...@@ -50,6 +50,12 @@ class Translator
virtual QCString latexBabelPackage() virtual QCString latexBabelPackage()
{ return ""; } { return ""; }
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
{
return "iso-8859-1";
}
// --- Language translation methods ------------------- // --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */ /*! used in the compound documentation before a list of related functions. */
......
...@@ -26,15 +26,115 @@ ...@@ -26,15 +26,115 @@
// mail the comments and text proposals to // mail the comments and text proposals to
// //
// havran@fel.cvut.cz, 1999/04/11 // havran@fel.cvut.cz, 1999/04/11
//
// The first version of Czech strings with diacritics was implemented by
// Petr Prikryl (prikrylp@skil.cz). Vlastimil Havran is still
// the maintainer. The translation was based on translator.h
// of Doxygen versison 1.1.4 (from scratch) and updated for 1.1.5
// (including important updates of the up-to-1.1.4 strings).
//
// The Czech strings in this file were first written in Windows 1250
// encoding. The conditional compilation ensures or the neutral
// functionality of the macro DECODE, or calling the WinToISO()
// method for on-line encoding conversion. If you want to maintain
// the source in the ISO Latin-2, do convert the source, change the
// conditional definition of the DECODE macro using the method
// ISOToWin() -- for conversion of strings for the Windows version.
// The version which does not call the function is slightly faster.
//
// Notice: Only one of the following tables is necessary for
// the support as well as the only one conversion private method
// of the TranslatorCzech class. However, the prototype was created
// under WindowsNT thus using Windows 1250 encoding. The second
// table and the method are here to switch to the ISO Latin-2
// smoothly. And also, there is not a big loose of space when both
// tables and methods are supported.
/*! Translation tables for characters >127. They should work,
* but I would not put my hand into fire for that.
*/
static const char WinToISOTab[] = {
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\xA9', '\x8B', '\xA6', '\xAB', '\xAE', '\xAC',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x2E', '\x96', '\x97',
'\x98', '\x99', '\xB9', '\x9B', '\xB6', '\xBB', '\xBE', '\xBC',
'\xA0', '\x20', '\x20', '\xA3', '\xA4', '\xA1', '\xA6', '\xA7',
'\x22', '\xA9', '\xAA', '\x3C', '\xAC', '\x2D', '\xAE', '\xAF',
'\x2E', '\x2B', '\x20', '\xB3', '\x27', '\x75', '\xB6', '\xB7',
'\x20', '\xB1', '\xBA', '\x3E', '\xA5', '\x22', '\xB5', '\xBF',
'\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7',
'\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF',
'\xD0', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7',
'\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF',
'\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7',
'\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF',
'\xF0', '\xF1', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\x2D',
'\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\xFE', '\xFF',
'\0'
};
static const char ISOToWinTab[] = {
'\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87',
'\x88', '\x89', '\x8A', '\x8B', '\x8C', '\x8D', '\x8E', '\x8F',
'\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97',
'\x98', '\x99', '\x9A', '\x9B', '\x9C', '\x9D', '\x9E', '\x9F',
'\xA0', '\xA5', '\xA2', '\xA3', '\xA4', '\xBC', '\x8C', '\xA7',
'\xA8', '\x8A', '\xAA', '\x8D', '\x8F', '\xAD', '\x8E', '\xAF',
'\xB0', '\xB9', '\xB2', '\xB3', '\xB4', '\xBE', '\x9C', '\xB7',
'\xB8', '\x9A', '\xBA', '\x9D', '\x9F', '\xBD', '\x9E', '\xBF',
'\xC0', '\xC1', '\xC2', '\xC3', '\xC4', '\xC5', '\xC6', '\xC7',
'\xC8', '\xC9', '\xCA', '\xCB', '\xCC', '\xCD', '\xCE', '\xCF',
'\xD0', '\xD1', '\xD2', '\xD3', '\xD4', '\xD5', '\xD6', '\xD7',
'\xD8', '\xD9', '\xDA', '\xDB', '\xDC', '\xDD', '\xDE', '\xDF',
'\xE0', '\xE1', '\xE2', '\xE3', '\xE4', '\xE5', '\xE6', '\xE7',
'\xE8', '\xE9', '\xEA', '\xEB', '\xEC', '\xED', '\xEE', '\xEF',
'\xF0', '\xF1', '\xF2', '\xF3', '\xF4', '\xF5', '\xF6', '\xF7',
'\xF8', '\xF9', '\xFA', '\xFB', '\xFC', '\xFD', '\xFE', '\xFF',
'\0'
};
// Notice that the following texts were written in Czech using // Here the DECODE macro assumes the source written in Win1250 encoding.
// MS-Windows code page 1250. If you want to use it in Unix,
// convert the file to the ISO Latin-2
// This is a prototype created by Petr Prikryl (prikrylp@skil.cz), 2000/06/20.
// //
#ifdef _WIN32
#define DECODE(sInput) sInput
#else
#define DECODE(sInput) WinToISO(sInput)
#endif
class TranslatorCzech : public Translator class TranslatorCzech : public Translator
{ {
private:
/*! returns the string converted from Win1250 to ISO Latin-2 */
QCString WinToISO(const QCString sInput)
{
QCString result;
int len = sInput.length();
for (int i = 0; i < len; ++i)
{
unsigned int c = sInput[i];
result += (c > 127) ? WinToISOTab[c & 0x7F] : c;
}
return result;
}
/*! returns the string converted from ISO Latin-2 to Win1250 */
QCString ISOToWin(const QCString sInput)
{
QCString result;
int len = sInput.length();
for (int i = 0; i < len; ++i)
{
unsigned int c = sInput[i];
result += (c > 127) ? ISOToWinTab[c & 0x7F] : c;
}
return result;
}
public: public:
virtual QCString idLanguage() virtual QCString idLanguage()
{ return "czech"; } { return "czech"; }
...@@ -48,51 +148,51 @@ class TranslatorCzech : public Translator ...@@ -48,51 +148,51 @@ class TranslatorCzech : public Translator
/*! used in the compound documentation before a list of related functions. */ /*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions() virtual QCString trRelatedFunctions()
{ return "Související funkce"; } { return DECODE("Související funkce"); }
/*! subscript for the related functions. */ /*! subscript for the related functions. */
virtual QCString trRelatedSubscript() virtual QCString trRelatedSubscript()
{ return "(Výše uvedené funkce nejsou èlenskými funkcemi.)"; } { return DECODE("(Uvedené funkce nejsou èlenskými funkcemi.)"); }
/*! header that is put before the detailed description of files, classes and namespaces. */ /*! header that is put before the detailed description of files, classes and namespaces. */
virtual QCString trDetailedDescription() virtual QCString trDetailedDescription()
{ return "Detailní popis"; } { return DECODE("Detailní popis"); }
/*! header that is put before the list of typedefs. */ /*! header that is put before the list of typedefs. */
virtual QCString trMemberTypedefDocumentation() virtual QCString trMemberTypedefDocumentation()
{ return "Dokumentace k èlenských typùm"; } { return DECODE("Dokumentace k èlenských typùm"); }
/*! header that is put before the list of enumerations. */ /*! header that is put before the list of enumerations. */
virtual QCString trMemberEnumerationDocumentation() virtual QCString trMemberEnumerationDocumentation()
{ return "Dokumentace k èlenským výètùm"; } { return DECODE("Dokumentace k èlenským výètùm"); }
/*! header that is put before the list of member functions. */ /*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation() virtual QCString trMemberFunctionDocumentation()
{ return "Dokumentace k metodám"; } { return DECODE("Dokumentace k metodám"); }
/*! header that is put before the list of member attributes. */ /*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation() virtual QCString trMemberDataDocumentation()
{ return "Dokumentace k datovým èlenùm"; } { return DECODE("Dokumentace k datovým èlenùm"); }
/*! this is the text of a link put after brief descriptions. */ /*! this is the text of a link put after brief descriptions. */
virtual QCString trMore() virtual QCString trMore()
{ return "Podrobnosti..."; } { return DECODE("(...)"); }
/*! put in the class documentation */ /*! put in the class documentation */
virtual QCString trListOfAllMembers() virtual QCString trListOfAllMembers()
{ return "Seznam všech èlenù."; } { return DECODE("Seznam všech èlenù."); }
/*! used as the title of the "list of all members" page of a class */ /*! used as the title of the "list of all members" page of a class */
virtual QCString trMemberList() virtual QCString trMemberList()
{ return "Seznam èlenù tøídy"; } { return DECODE("Seznam èlenù tøídy"); }
/*! this is the first part of a sentence that is followed by a class name */ /*! this is the first part of a sentence that is followed by a class name */
virtual QCString trThisIsTheListOfAllMembers() virtual QCString trThisIsTheListOfAllMembers()
{ return "Úplný seznam èlenù tøídy "; } { return DECODE("Zde naleznete úplný seznam èlenù tøídy "); }
/*! this is the remainder of the sentence after the class name */ /*! this is the remainder of the sentence after the class name */
virtual QCString trIncludingInheritedMembers() virtual QCString trIncludingInheritedMembers()
{ return ", vèetnì všech zdìdìných èlenù."; } { return DECODE(", vèetnì všech zdìdìných èlenù."); }
/*! this is put at the author sections at the bottom of man pages. /*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name. * parameter s is name of the project name.
...@@ -102,26 +202,26 @@ class TranslatorCzech : public Translator ...@@ -102,26 +202,26 @@ class TranslatorCzech : public Translator
"ze zdrojových textù"; "ze zdrojových textù";
if (s) result+=(QCString)" projektu "+s; if (s) result+=(QCString)" projektu "+s;
result+="."; result+=".";
return result; return DECODE(result);
} }
/*! put after an enum name in the list of all members */ /*! put after an enum name in the list of all members */
virtual QCString trEnumName() virtual QCString trEnumName()
{ return "jméno výètu"; } { return DECODE("jméno výètu"); }
/*! put after an enum value in the list of all members */ /*! put after an enum value in the list of all members */
virtual QCString trEnumValue() virtual QCString trEnumValue()
{ return "hodnota výètu"; } { return DECODE("hodnota výètu"); }
/*! put after an undocumented member in the list of all members */ /*! put after an undocumented member in the list of all members */
virtual QCString trDefinedIn() virtual QCString trDefinedIn()
{ return "definován v"; } { return DECODE("definován v"); }
/*! put as in introduction in the verbatim header file of a class. /*! put as in introduction in the verbatim header file of a class.
* parameter f is the name of the include file. * parameter f is the name of the include file.
*/ */
virtual QCString trVerbatimText(const char *f) virtual QCString trVerbatimText(const char *f)
{ return (QCString)"Úplný text vkládaného souboru "+f+"."; } { return DECODE((QCString)"Úplný text vkládaného souboru "+f+"."); }
// quick reference sections // quick reference sections
...@@ -129,48 +229,48 @@ class TranslatorCzech : public Translator ...@@ -129,48 +229,48 @@ class TranslatorCzech : public Translator
* compounds or files (see the \group command). * compounds or files (see the \group command).
*/ */
virtual QCString trModules() virtual QCString trModules()
{ return "Moduly"; } { return DECODE("Moduly"); }
/*! This is put above each page as a link to the class hierarchy */ /*! This is put above each page as a link to the class hierarchy */
virtual QCString trClassHierarchy() virtual QCString trClassHierarchy()
{ return "Hierarchie tøíd"; } { return DECODE("Hierarchie tøíd"); }
/*! This is put above each page as a link to the list of annotated classes */ /*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList() virtual QCString trCompoundList()
{ return "Seznam složenin"; } { return DECODE("Seznam tøíd"); }
/*! This is put above each page as a link to the list of documented files */ /*! This is put above each page as a link to the list of documented files */
virtual QCString trFileList() virtual QCString trFileList()
{ return "Seznam souborù"; } { return DECODE("Seznam souborù"); }
/*! This is put above each page as a link to the list of all verbatim headers */ /*! This is put above each page as a link to the list of all verbatim headers */
virtual QCString trHeaderFiles() virtual QCString trHeaderFiles()
{ return "Seznam hlavièkových souborù"; } { return DECODE("Seznam hlavièkových souborù"); }
/*! This is put above each page as a link to all members of compounds. */ /*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers() virtual QCString trCompoundMembers()
{ return "Souèásti složenin"; } { return DECODE("Seznam èlenù tøíd"); }
/*! This is put above each page as a link to all members of files. */ /*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers() virtual QCString trFileMembers()
{ return "Seznam globálních symbolù"; } { return DECODE("Symboly v souborech"); }
/*! This is put above each page as a link to all related pages. */ /*! This is put above each page as a link to all related pages. */
virtual QCString trRelatedPages() virtual QCString trRelatedPages()
{ return "Související stránky"; } { return DECODE("Související stránky"); }
/*! This is put above each page as a link to all examples. */ /*! This is put above each page as a link to all examples. */
virtual QCString trExamples() virtual QCString trExamples()
{ return "Pøíklady"; } { return DECODE("Pøíklady"); }
/*! This is put above each page as a link to the search engine. */ /*! This is put above each page as a link to the search engine. */
virtual QCString trSearch() virtual QCString trSearch()
{ return "Hledat"; } { return DECODE("Hledat"); }
/*! This is an introduction to the class hierarchy. */ /*! This is an introduction to the class hierarchy. */
virtual QCString trClassHierarchyDescription() virtual QCString trClassHierarchyDescription()
{ return "Zde naleznete seznam, vyjadøující vztah dìdiènosti tøíd. " { return DECODE("Zde naleznete seznam, vyjadøující vztah dìdiènosti tøíd. "
"Je seøazen pøibližnì (ale ne úplnì) podle abecedy:"; "Je seøazen pøibližnì (ale ne úplnì) podle abecedy:");
} }
/*! This is an introduction to the list with all files. */ /*! This is an introduction to the list with all files. */
...@@ -179,15 +279,15 @@ class TranslatorCzech : public Translator ...@@ -179,15 +279,15 @@ class TranslatorCzech : public Translator
QCString result="Zde naleznete seznam všech "; QCString result="Zde naleznete seznam všech ";
if (!extractAll) result+="dokumentovaných "; if (!extractAll) result+="dokumentovaných ";
result+="souborù se struènými popisy:"; result+="souborù se struènými popisy:";
return result; return DECODE(result);
} }
/*! This is an introduction to the annotated compound list. */ /*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription() virtual QCString trCompoundListDescription()
{ return "Složeninami (compound) se rozumí netriviální prvky, které " { return DECODE("Následující seznam obsahuje pøedevším identifikace tøíd, "
"zahrnují tøídy, struktury (struct), unie (union) " "ale nachází se zde i další netriviální prvky, jako jsou "
"a rozhraní (interface). V seznamu jsou uvedeny jejich struèné " "struktury (struct), unie (union) a rozhraní (interface). "
"popisy:"; "V seznamu jsou uvedeny jejich struèné popisy:");
} }
/*! This is an introduction to the page with all class members. */ /*! This is an introduction to the page with all class members. */
...@@ -200,7 +300,7 @@ class TranslatorCzech : public Translator ...@@ -200,7 +300,7 @@ class TranslatorCzech : public Translator
result+="dokumentaci tøíd, ke kterým pøíslušejí:"; result+="dokumentaci tøíd, ke kterým pøíslušejí:";
else else
result+="tøídy, ke kterým pøíslušejí:"; result+="tøídy, ke kterým pøíslušejí:";
return result; return DECODE(result);
} }
/*! This is an introduction to the page with all file members. */ /*! This is an introduction to the page with all file members. */
...@@ -208,205 +308,210 @@ class TranslatorCzech : public Translator ...@@ -208,205 +308,210 @@ class TranslatorCzech : public Translator
{ {
QCString result="Zde naleznete seznam všech "; QCString result="Zde naleznete seznam všech ";
if (!extractAll) result+="dokumentovaných "; if (!extractAll) result+="dokumentovaných ";
result+="globálních symbolù, které jsou definovány v souborech projektu. " result+="symbolù, které jsou definovány na úrovni svých souborù. "
"Pro každý symbol je uveden odkaz na "; "Pro každý symbol je uveden odkaz na ";
if (extractAll) if (extractAll)
result+="dokumentaci pøíslušného souboru"; result+="dokumentaci pøíslušného souboru";
else else
result+="soubor, ve kterém je symbol definován"; result+="soubor, ve kterém je symbol definován";
result+=". Symbol mùže oznaèovat makro, typ, instanci tøídy, " result+=". Podle zpùsobu definice mùže být symbol globálním symbolem "
"nebo symbolem, který je viditelný pouze z daného souboru "
"(to se týká napøíklad statických promìnných v C++). "
"Seznam neobsahuje symboly èlenù tøíd. "
"Symbol mùže oznaèovat makro, typ, instanci tøídy, "
"promìnnou, konstantu, funkci, výèet, hodnotu výètu a podobnì:"; "promìnnou, konstantu, funkci, výèet, hodnotu výètu a podobnì:";
return result; return DECODE(result);
} }
/*! This is an introduction to the page with the list of all header files. */ /*! This is an introduction to the page with the list of all header files. */
virtual QCString trHeaderFilesDescription() virtual QCString trHeaderFilesDescription()
{ return "Zde naleznete hlavièkové soubory, které tvoøí " { return DECODE("Zde naleznete hlavièkové soubory, které tvoøí "
"aplikaèní programátorské rozhraní (API):"; } "aplikaèní programátorské rozhraní (API):"); }
/*! This is an introduction to the page with the list of all examples */ /*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription() virtual QCString trExamplesDescription()
{ return "Zde naleznete seznam všech pøíkladù:"; } { return DECODE("Zde naleznete seznam všech pøíkladù:"); }
/*! This is an introduction to the page with the list of related pages */ /*! This is an introduction to the page with the list of related pages */
virtual QCString trRelatedPagesDescription() virtual QCString trRelatedPagesDescription()
{ return "Zde naleznete seznam všech souvisejících stránek dokumentace:"; } { return DECODE("Zde naleznete seznam všech souvisejících stránek "
"dokumentace:"); }
/*! This is an introduction to the page with the list of class/file groups */ /*! This is an introduction to the page with the list of class/file groups */
virtual QCString trModulesDescription() virtual QCString trModulesDescription()
{ return "Zde naleznete seznam všech modulù:"; } { return DECODE("Zde naleznete seznam všech modulù:"); }
/*! This sentences is used in the annotated class/file lists if no brief /*! This sentences is used in the annotated class/file lists if no brief
* description is given. * description is given.
*/ */
virtual QCString trNoDescriptionAvailable() virtual QCString trNoDescriptionAvailable()
{ return "Popis není k dispozici"; } { return DECODE("Popis není k dispozici"); }
// index titles (the project name is prepended for these) // index titles (the project name is prepended for these)
/*! This is used in HTML as the title of index.html. */ /*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation() virtual QCString trDocumentation()
{ return "Dokumentace"; } { return DECODE("Dokumentace"); }
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* index of all groups. * index of all groups.
*/ */
virtual QCString trModuleIndex() virtual QCString trModuleIndex()
{ return "Rejstøík modulù"; } { return DECODE("Rejstøík modulù"); }
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* class hierarchy. * class hierarchy.
*/ */
virtual QCString trHierarchicalIndex() virtual QCString trHierarchicalIndex()
{ return "Rejstøík hierarchie tøíd"; } { return DECODE("Rejstøík hierarchie tøíd"); }
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* annotated compound index. * annotated compound index.
*/ */
virtual QCString trCompoundIndex() virtual QCString trCompoundIndex()
{ return "Rejstøík složenin"; } { return DECODE("Rejstøík tøíd"); }
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* list of all files. * list of all files.
*/ */
virtual QCString trFileIndex() virtual QCString trFileIndex()
{ return "Rejstøík souborù"; } { return DECODE("Rejstøík souborù"); }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all groups. * the documentation of all groups.
*/ */
virtual QCString trModuleDocumentation() virtual QCString trModuleDocumentation()
{ return "Dokumentace modulù"; } { return DECODE("Dokumentace modulù"); }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions. * the documentation of all classes, structs and unions.
*/ */
virtual QCString trClassDocumentation() virtual QCString trClassDocumentation()
{ return "Dokumentace tøíd"; } { return DECODE("Dokumentace tøíd"); }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files. * the documentation of all files.
*/ */
virtual QCString trFileDocumentation() virtual QCString trFileDocumentation()
{ return "Dokumentace souborù"; } { return DECODE("Dokumentace souborù"); }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all examples. * the documentation of all examples.
*/ */
virtual QCString trExampleDocumentation() virtual QCString trExampleDocumentation()
{ return "Dokumentace pøíkladù"; } { return DECODE("Dokumentace pøíkladù"); }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all related pages. * the documentation of all related pages.
*/ */
virtual QCString trPageDocumentation() virtual QCString trPageDocumentation()
{ return "Dokumentace souvisejících stránek"; } { return DECODE("Dokumentace souvisejících stránek"); }
/*! This is used in LaTeX as the title of the document */ /*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual() virtual QCString trReferenceManual()
{ return "Referenèní pøíruèka"; } { return DECODE("Referenèní pøíruèka"); }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of defines * list of defines
*/ */
virtual QCString trDefines() virtual QCString trDefines()
{ return "Definice maker"; } { return DECODE("Definice maker"); }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of function prototypes * list of function prototypes
*/ */
virtual QCString trFuncProtos() virtual QCString trFuncProtos()
{ return "Prototypy"; } { return DECODE("Prototypy"); }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of typedefs * list of typedefs
*/ */
virtual QCString trTypedefs() virtual QCString trTypedefs()
{ return "Definice typù"; } { return DECODE("Definice typù"); }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of enumerations * list of enumerations
*/ */
virtual QCString trEnumerations() virtual QCString trEnumerations()
{ return "Výèty"; } { return DECODE("Výèty"); }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of (global) functions * list of (global) functions
*/ */
virtual QCString trFunctions() virtual QCString trFunctions()
{ return "Funkce"; } { return DECODE("Funkce"); }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of (global) variables * list of (global) variables
*/ */
virtual QCString trVariables() virtual QCString trVariables()
{ return "Promìnné"; } { return DECODE("Promìnné"); }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of (global) variables * list of (global) variables
*/ */
virtual QCString trEnumerationValues() virtual QCString trEnumerationValues()
{ return "Hodnoty výètù"; } { return DECODE("Hodnoty výètù"); }
/*! This is used in man pages as the author section. */ /*! This is used in man pages as the author section. */
virtual QCString trAuthor() virtual QCString trAuthor()
{ return "Autor"; } { return DECODE("Autor"); }
/*! This is used in the documentation of a file before the list of /*! This is used in the documentation of a file before the list of
* documentation blocks for defines * documentation blocks for defines
*/ */
virtual QCString trDefineDocumentation() virtual QCString trDefineDocumentation()
{ return "Dokumentace k definicím maker"; } { return DECODE("Dokumentace k definicím maker"); }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for function prototypes * of documentation blocks for function prototypes
*/ */
virtual QCString trFunctionPrototypeDocumentation() virtual QCString trFunctionPrototypeDocumentation()
{ return "Dokumentace prototypù"; } { return DECODE("Dokumentace prototypù"); }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for typedefs * of documentation blocks for typedefs
*/ */
virtual QCString trTypedefDocumentation() virtual QCString trTypedefDocumentation()
{ return "Dokumentace definic typù"; } { return DECODE("Dokumentace definic typù"); }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types * of documentation blocks for enumeration types
*/ */
virtual QCString trEnumerationTypeDocumentation() virtual QCString trEnumerationTypeDocumentation()
{ return "Dokumentace výètových typù"; } { return DECODE("Dokumentace výètových typù"); }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values * of documentation blocks for enumeration values
*/ */
virtual QCString trEnumerationValueDocumentation() virtual QCString trEnumerationValueDocumentation()
{ return "Dokumentace výètových hodnot"; } { return DECODE("Dokumentace výètových hodnot"); }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions * of documentation blocks for functions
*/ */
virtual QCString trFunctionDocumentation() virtual QCString trFunctionDocumentation()
{ return "Dokumentace funkcí"; } { return DECODE("Dokumentace funkcí"); }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables * of documentation blocks for variables
*/ */
virtual QCString trVariableDocumentation() virtual QCString trVariableDocumentation()
{ return "Dokumentace promìnných"; } { return DECODE("Dokumentace promìnných"); }
/*! This is used in the documentation of a file/namespace/group before /*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds * the list of links to documented compounds
*/ */
virtual QCString trCompounds() virtual QCString trCompounds()
{ return "Složeniny"; } { return DECODE("Tøídy"); }
/*! This is used in the documentation of a group before the list of /*! This is used in the documentation of a group before the list of
* links to documented files * links to documented files
*/ */
virtual QCString trFiles() virtual QCString trFiles()
{ return "Soubory"; } { return DECODE("Soubory"); }
/*! This is used in the standard footer of each page and indicates when /*! This is used in the standard footer of each page and indicates when
* the page was generated * the page was generated
...@@ -416,74 +521,75 @@ class TranslatorCzech : public Translator ...@@ -416,74 +521,75 @@ class TranslatorCzech : public Translator
QCString result=(QCString)"Generováno "+date; QCString result=(QCString)"Generováno "+date;
if (projName) result+=(QCString)" pro projekt "+projName; if (projName) result+=(QCString)" pro projekt "+projName;
result+=(QCString)" programem"; result+=(QCString)" programem";
return result; return DECODE(result);
} }
/*! This is part of the sentence used in the standard footer of each page. /*! This is part of the sentence used in the standard footer of each page.
*/ */
virtual QCString trWrittenBy() virtual QCString trWrittenBy()
{ {
return " -- autor "; return DECODE(" -- autor ");
} }
/*! this text is put before a class diagram */ /*! this text is put before a class diagram */
virtual QCString trClassDiagram(const char *clName) virtual QCString trClassDiagram(const char *clName)
{ {
return (QCString)"Diagram dìdiènosti pro tøídu "+clName; return DECODE((QCString)"Diagram dìdiènosti pro tøídu "+clName);
} }
/*! this text is generated when the \internal command is used. */ /*! this text is generated when the \internal command is used. */
virtual QCString trForInternalUseOnly() virtual QCString trForInternalUseOnly()
{ return "Pouze pro vnitøní použití."; } { return DECODE("Pouze pro vnitøní použití."); }
/*! this text is generated when the \reimp command is used. */ /*! this text is generated when the \reimp command is used. */
virtual QCString trReimplementedForInternalReasons() virtual QCString trReimplementedForInternalReasons()
{ return "Reimplementováno z interních dùvodù; aplikaèní rozhraní zachováno."; } { return DECODE("Reimplementováno z interních dùvodù; "
"aplikaèní rozhraní zachováno."); }
/*! this text is generated when the \warning command is used. */ /*! this text is generated when the \warning command is used. */
virtual QCString trWarning() virtual QCString trWarning()
{ return "Pozor"; } { return DECODE("Pozor"); }
/*! this text is generated when the \bug command is used. */ /*! this text is generated when the \bug command is used. */
virtual QCString trBugsAndLimitations() virtual QCString trBugsAndLimitations()
{ return "Chyby a omezení"; } { return DECODE("Chyby a omezení"); }
/*! this text is generated when the \version command is used. */ /*! this text is generated when the \version command is used. */
virtual QCString trVersion() virtual QCString trVersion()
{ return "Verze"; } { return DECODE("Verze"); }
/*! this text is generated when the \date command is used. */ /*! this text is generated when the \date command is used. */
virtual QCString trDate() virtual QCString trDate()
{ return "Datum"; } { return DECODE("Datum"); }
/*! this text is generated when the \author command is used. */ /*! this text is generated when the \author command is used. */
virtual QCString trAuthors() virtual QCString trAuthors()
{ return "Autor/autoøi"; } { return DECODE("Autor/autoøi"); }
/*! this text is generated when the \return command is used. */ /*! this text is generated when the \return command is used. */
virtual QCString trReturns() virtual QCString trReturns()
{ return "Vrací"; } { return DECODE("Vrací"); }
/*! this text is generated when the \sa command is used. */ /*! this text is generated when the \sa command is used. */
virtual QCString trSeeAlso() virtual QCString trSeeAlso()
{ return "Viz také"; } { return DECODE("Viz také"); }
/*! this text is generated when the \param command is used. */ /*! this text is generated when the \param command is used. */
virtual QCString trParameters() virtual QCString trParameters()
{ return "Parametry"; } { return DECODE("Parametry"); }
/*! this text is generated when the \exception command is used. */ /*! this text is generated when the \exception command is used. */
virtual QCString trExceptions() virtual QCString trExceptions()
{ return "Výjimky"; } { return DECODE("Výjimky"); }
/*! this text is used in the title page of a LaTeX document. */ /*! this text is used in the title page of a LaTeX document. */
virtual QCString trGeneratedBy() virtual QCString trGeneratedBy()
{ return "Generováno programem"; } { return DECODE("Generováno programem"); }
// new since 0.49-990307 // new since 0.49-990307
/*! used as the title of page containing all the index of all namespaces. */ /*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList() virtual QCString trNamespaceList()
{ return "Seznam prostorù jmen"; } { return DECODE("Seznam prostorù jmen"); }
/*! used as an introduction to the namespace list */ /*! used as an introduction to the namespace list */
virtual QCString trNamespaceListDescription(bool extractAll) virtual QCString trNamespaceListDescription(bool extractAll)
...@@ -491,14 +597,14 @@ class TranslatorCzech : public Translator ...@@ -491,14 +597,14 @@ class TranslatorCzech : public Translator
QCString result="Zde naleznete seznam všech "; QCString result="Zde naleznete seznam všech ";
if (!extractAll) result+="dokumentovaných "; if (!extractAll) result+="dokumentovaných ";
result+="prostorù jmen se struèným popisem:"; result+="prostorù jmen se struèným popisem:";
return result; return DECODE(result);
} }
/*! used in the class documentation as a header before the list of all /*! used in the class documentation as a header before the list of all
* friends of a class * friends of a class
*/ */
virtual QCString trFriends() virtual QCString trFriends()
{ return "Friends"; } { return DECODE("Friends"); }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990405 // new since 0.49-990405
...@@ -508,7 +614,7 @@ class TranslatorCzech : public Translator ...@@ -508,7 +614,7 @@ class TranslatorCzech : public Translator
* related classes * related classes
*/ */
virtual QCString trRelatedFunctionDocumentation() virtual QCString trRelatedFunctionDocumentation()
{ return "Dokumentace k friends"; } { return DECODE("Dokumentace k friends"); }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990425 // new since 0.49-990425
...@@ -517,60 +623,61 @@ class TranslatorCzech : public Translator ...@@ -517,60 +623,61 @@ class TranslatorCzech : public Translator
/*! used as the title of the HTML page of a class/struct/union */ /*! used as the title of the HTML page of a class/struct/union */
virtual QCString trCompoundReference(const char *clName, virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType, ClassDef::CompoundType compType,
bool /*isTemplate*/) bool isTemplate)
{ {
QCString result=(QCString)clName+" "; QCString result("Dokumentace ");
if (isTemplate) result+="šablony ";
switch(compType) switch(compType)
{ {
case ClassDef::Class: result+=" Tøída"; break; case ClassDef::Class: result+="tøídy "; break;
case ClassDef::Struct: result+=" Struktura"; break; case ClassDef::Struct: result+="struktury "; break;
case ClassDef::Union: result+=" Unie"; break; case ClassDef::Union: result+="unie "; break;
case ClassDef::Interface: result+=" Rozhraní"; break; case ClassDef::Interface: result+="rozhraní "; break;
case ClassDef::Exception: result+=" Výjimka"; break; case ClassDef::Exception: result+="výjimky "; break;
} }
result+=" Reference"; result+=clName;
return result; return DECODE(result);
} }
/*! used as the title of the HTML page of a file */ /*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const char *fileName) virtual QCString trFileReference(const char *fileName)
{ {
QCString result="Odkaz na soubor"; QCString result="Dokumentace souboru ";
result+=fileName; result+=fileName;
return result; return DECODE(result);
} }
/*! used as the title of the HTML page of a namespace */ /*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const char *namespaceName) virtual QCString trNamespaceReference(const char *namespaceName)
{ {
QCString result=namespaceName; QCString result("Dokumentace prostroru jmen ");
result+=" Namespace Reference???"; result+=namespaceName;
return result; return DECODE(result);
} }
/*! \mgroup Class sections /*! \mgroup Class sections
* these are for the member sections of a class, struct or union * these are for the member sections of a class, struct or union
*/ */
virtual QCString trPublicMembers() virtual QCString trPublicMembers()
{ return "Veøejné metody"; } { return DECODE("Veøejné metody"); }
virtual QCString trPublicSlots() virtual QCString trPublicSlots()
{ return "Veøejné sloty"; } { return DECODE("Veøejné sloty"); }
virtual QCString trSignals() virtual QCString trSignals()
{ return "Signály"; } { return DECODE("Signály"); }
virtual QCString trStaticPublicMembers() virtual QCString trStaticPublicMembers()
{ return "Statické veøejné metody"; } { return DECODE("Statické veøejné metody"); }
virtual QCString trProtectedMembers() virtual QCString trProtectedMembers()
{ return "Chránìné metody"; } { return DECODE("Chránìné metody"); }
virtual QCString trProtectedSlots() virtual QCString trProtectedSlots()
{ return "Chránìné sloty"; } { return DECODE("Chránìné sloty"); }
virtual QCString trStaticProtectedMembers() virtual QCString trStaticProtectedMembers()
{ return "Statické chránìné metody"; } { return DECODE("Statické chránìné metody"); }
virtual QCString trPrivateMembers() virtual QCString trPrivateMembers()
{ return "Privátní metody"; } { return DECODE("Privátní metody"); }
virtual QCString trPrivateSlots() virtual QCString trPrivateSlots()
{ return "Privátní sloty"; } { return DECODE("Privátní sloty"); }
virtual QCString trStaticPrivateMembers() virtual QCString trStaticPrivateMembers()
{ return "Statické privátní metody"; } { return DECODE("Statické privátní metody"); }
/*! \endmgroup */ /*! \endmgroup */
/*! this function is used to produce a comma-separated list of items. /*! this function is used to produce a comma-separated list of items.
...@@ -595,7 +702,7 @@ class TranslatorCzech : public Translator ...@@ -595,7 +702,7 @@ class TranslatorCzech : public Translator
result+=" a "; result+=" a ";
} }
} }
return result; return DECODE(result);
} }
/*! used in class documentation to produce a list of base classes, /*! used in class documentation to produce a list of base classes,
...@@ -603,7 +710,7 @@ class TranslatorCzech : public Translator ...@@ -603,7 +710,7 @@ class TranslatorCzech : public Translator
*/ */
virtual QCString trInheritsList(int numEntries) virtual QCString trInheritsList(int numEntries)
{ {
return "Dìdí "+trWriteList(numEntries)+"."; return DECODE("Dìdí "+trWriteList(numEntries)+".");
} }
/*! used in class documentation to produce a list of super classes, /*! used in class documentation to produce a list of super classes,
...@@ -611,7 +718,7 @@ class TranslatorCzech : public Translator ...@@ -611,7 +718,7 @@ class TranslatorCzech : public Translator
*/ */
virtual QCString trInheritedByList(int numEntries) virtual QCString trInheritedByList(int numEntries)
{ {
return "Zdìdìna tøídami "+trWriteList(numEntries)+"."; return DECODE("Zdìdìna tøídami "+trWriteList(numEntries)+".");
} }
/*! used in member documentation blocks to produce a list of /*! used in member documentation blocks to produce a list of
...@@ -619,7 +726,7 @@ class TranslatorCzech : public Translator ...@@ -619,7 +726,7 @@ class TranslatorCzech : public Translator
*/ */
virtual QCString trReimplementedFromList(int numEntries) virtual QCString trReimplementedFromList(int numEntries)
{ {
return "Reimplementace z "+trWriteList(numEntries)+"."; return DECODE("Reimplementace metody tøídy "+trWriteList(numEntries)+".");
} }
/*! used in member documentation blocks to produce a list of /*! used in member documentation blocks to produce a list of
...@@ -627,36 +734,37 @@ class TranslatorCzech : public Translator ...@@ -627,36 +734,37 @@ class TranslatorCzech : public Translator
*/ */
virtual QCString trReimplementedInList(int numEntries) virtual QCString trReimplementedInList(int numEntries)
{ {
return "Reimplementováno v "+trWriteList(numEntries)+"."; return DECODE("Reimplementováno v "+trWriteList(numEntries)+".");
} }
/*! This is put above each page as a link to all members of namespaces. */ /*! This is put above each page as a link to all members of namespaces. */
virtual QCString trNamespaceMembers() virtual QCString trNamespaceMembers()
{ return "???Namespace Members"; } { return DECODE("Symboly v prostorech jmen"); }
/*! This is an introduction to the page with all namespace members */ /*! This is an introduction to the page with all namespace members */
virtual QCString trNamespaceMemberDescription(bool extractAll) virtual QCString trNamespaceMemberDescription(bool extractAll)
{ {
QCString result="Zde naleznete seznam všech "; QCString result="Zde naleznete seznam všech ";
if (!extractAll) result+="dokumentovaných "; if (!extractAll) result+="dokumentovaných ";
result+="???namespace members s odkazy na "; result+="symbolù, které jsou definovány ve svých prostorech jmen. "
"U každého je uveden odkaz na ";
if (extractAll) if (extractAll)
result+="dokumentaci prostoru jmen pro každý èlen:"; result+="dokumentaci pøíslušného prostoru jmen:";
else else
result+="prostory jmen, ke kterým pøíslušejí:"; result+="pøíslušný prostor jmen:";
return result; return DECODE(result);
} }
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* index of all namespaces. * index of all namespaces.
*/ */
virtual QCString trNamespaceIndex() virtual QCString trNamespaceIndex()
{ return "Rejstøík prostorù jmen"; } { return DECODE("Rejstøík prostorù jmen"); }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces. * the documentation of all namespaces.
*/ */
virtual QCString trNamespaceDocumentation() virtual QCString trNamespaceDocumentation()
{ return "Dokumentace prostorù jmen"; } { return DECODE("Dokumentace prostorù jmen"); }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990522 // new since 0.49-990522
...@@ -666,7 +774,7 @@ class TranslatorCzech : public Translator ...@@ -666,7 +774,7 @@ class TranslatorCzech : public Translator
* namespaces in a file. * namespaces in a file.
*/ */
virtual QCString trNamespaces() virtual QCString trNamespaces()
{ return "Prostory jmen"; } { return DECODE("Prostory jmen"); }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990728 // new since 0.49-990728
...@@ -691,14 +799,14 @@ class TranslatorCzech : public Translator ...@@ -691,14 +799,14 @@ class TranslatorCzech : public Translator
result+=" byla generována z "; result+=" byla generována z ";
if (single) result+="následujícího souboru:"; if (single) result+="následujícího souboru:";
else result+="následujících souborù:"; else result+="následujících souborù:";
return result; return DECODE(result);
} }
/*! This is in the (quick) index as a link to the alphabetical compound /*! This is in the (quick) index as a link to the alphabetical compound
* list. * list.
*/ */
virtual QCString trAlphabeticalList() virtual QCString trAlphabeticalList()
{ return "Abecední seznam složenin"; } { return DECODE("Rejstøík tøíd"); }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990901 // new since 0.49-990901
...@@ -706,18 +814,18 @@ class TranslatorCzech : public Translator ...@@ -706,18 +814,18 @@ class TranslatorCzech : public Translator
/*! This is used as the heading text for the retval command. */ /*! This is used as the heading text for the retval command. */
virtual QCString trReturnValues() virtual QCString trReturnValues()
{ return "Vracené hodnoty"; } { return DECODE("Vracené hodnoty"); }
/*! This is in the (quick) index as a link to the main page (index.html) /*! This is in the (quick) index as a link to the main page (index.html)
*/ */
virtual QCString trMainPage() virtual QCString trMainPage()
{ return "Hlavní stránka"; } { return DECODE("Hlavní stránka"); }
/*! This is used in references to page that are put in the LaTeX /*! This is used in references to page that are put in the LaTeX
* documentation. It should be an abbreviation of the word page. * documentation. It should be an abbreviation of the word page.
*/ */
virtual QCString trPageAbbreviation() virtual QCString trPageAbbreviation()
{ return "s."; } { return DECODE("s."); }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-991003 // new since 0.49-991003
...@@ -725,15 +833,15 @@ class TranslatorCzech : public Translator ...@@ -725,15 +833,15 @@ class TranslatorCzech : public Translator
virtual QCString trSources() virtual QCString trSources()
{ {
return "Zdroje"; return DECODE("Zdroje");
} }
virtual QCString trDefinedAtLineInSourceFile() virtual QCString trDefinedAtLineInSourceFile()
{ {
return "Definice je uvedena na øádku @0 v souboru @1."; return DECODE("Definice je uvedena na øádku @0 v souboru @1.");
} }
virtual QCString trDefinedInSourceFile() virtual QCString trDefinedInSourceFile()
{ {
return "Definice v souboru @0."; return DECODE("Definice v souboru @0.");
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
...@@ -742,7 +850,7 @@ class TranslatorCzech : public Translator ...@@ -742,7 +850,7 @@ class TranslatorCzech : public Translator
virtual QCString trDeprecated() virtual QCString trDeprecated()
{ {
return "Zastaralé"; return DECODE("Zastaralé");
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
...@@ -752,68 +860,69 @@ class TranslatorCzech : public Translator ...@@ -752,68 +860,69 @@ class TranslatorCzech : public Translator
/*! this text is put before a collaboration diagram */ /*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const char *clName) virtual QCString trCollaborationDiagram(const char *clName)
{ {
return (QCString)"Diagram tøíd pro "+clName+":"; return DECODE((QCString)"Diagram tøíd pro "+clName+":");
} }
/*! this text is put before an include dependency graph */ /*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const char *fName) virtual QCString trInclDepGraph(const char *fName)
{ {
return (QCString)"Graf závislostí souborù pro "+fName+":"; return DECODE((QCString)"Graf závislostí na vkládaných souborech "
"pro "+fName+":");
} }
/*! header that is put before the list of constructor/destructors. */ /*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation() virtual QCString trConstructorDocumentation()
{ {
return "Dokumentace konstruktoru a destruktoru"; return DECODE("Dokumentace konstruktoru a destruktoru");
} }
/*! Used in the file documentation to point to the corresponding sources. */ /*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode() virtual QCString trGotoSourceCode()
{ {
return "Zobrazit zdrojový text tohoto souboru."; return DECODE("Zobrazit zdrojový text tohoto souboru.");
} }
/*! Used in the file sources to point to the corresponding documentation. */ /*! Used in the file sources to point to the corresponding documentation. */
virtual QCString trGotoDocumentation() virtual QCString trGotoDocumentation()
{ {
return "Zobrazit dokumentaci tohoto souboru."; return DECODE("Zobrazit dokumentaci tohoto souboru.");
} }
/*! Text for the \pre command */ /*! Text for the \pre command */
virtual QCString trPrecondition() virtual QCString trPrecondition()
{ {
return "Precondition"; return DECODE("Precondition");
} }
/*! Text for the \post command */ /*! Text for the \post command */
virtual QCString trPostcondition() virtual QCString trPostcondition()
{ {
return "Postcondition"; return DECODE("Postcondition");
} }
/*! Text for the \invariant command */ /*! Text for the \invariant command */
virtual QCString trInvariant() virtual QCString trInvariant()
{ {
return "Invariant"; return DECODE("Invariant");
} }
/*! Text shown before a multi-line variable/enum initialization */ /*! Text shown before a multi-line variable/enum initialization */
virtual QCString trInitialValue() virtual QCString trInitialValue()
{ {
return "Initializer:"; return DECODE("Initializer:");
} }
/*! Text used the source code in the file index */ /*! Text used the source code in the file index */
virtual QCString trCode() virtual QCString trCode()
{ {
return "zdrojový text"; return DECODE("zdrojový text");
} }
virtual QCString trGraphicalHierarchy() virtual QCString trGraphicalHierarchy()
{ {
return "Grafické zobrazení hierarchie tøíd"; return DECODE("Grafické zobrazení hierarchie tøíd");
} }
virtual QCString trGotoGraphicalHierarchy() virtual QCString trGotoGraphicalHierarchy()
{ {
return "Zobrazit grafickou podobu hierarchie tøíd"; return DECODE("Zobrazit grafickou podobu hierarchie tøíd");
} }
virtual QCString trGotoTextualHierarchy() virtual QCString trGotoTextualHierarchy()
{ {
return "Zobrazit textovou podobu hierarchie tøíd"; return DECODE("Zobrazit textovou podobu hierarchie tøíd");
} }
virtual QCString trPageIndex() virtual QCString trPageIndex()
{ {
return "Rejstøík stránek"; return DECODE("Rejstøík stránek");
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
...@@ -822,43 +931,43 @@ class TranslatorCzech : public Translator ...@@ -822,43 +931,43 @@ class TranslatorCzech : public Translator
virtual QCString trNote() virtual QCString trNote()
{ {
return "Poznámka"; return DECODE("Poznámka");
} }
virtual QCString trPublicTypes() virtual QCString trPublicTypes()
{ {
return "Veøejné typy"; return DECODE("Veøejné typy");
} }
virtual QCString trPublicAttribs() virtual QCString trPublicAttribs()
{ {
return "Veøejné atributy"; return DECODE("Veøejné atributy");
} }
virtual QCString trStaticPublicAttribs() virtual QCString trStaticPublicAttribs()
{ {
return "Statické veøejné atributy"; return DECODE("Statické veøejné atributy");
} }
virtual QCString trProtectedTypes() virtual QCString trProtectedTypes()
{ {
return "Chránìné typy"; return DECODE("Chránìné typy");
} }
virtual QCString trProtectedAttribs() virtual QCString trProtectedAttribs()
{ {
return "Chránìné atributy"; return DECODE("Chránìné atributy");
} }
virtual QCString trStaticProtectedAttribs() virtual QCString trStaticProtectedAttribs()
{ {
return "Statické chránìné atributy"; return DECODE("Statické chránìné atributy");
} }
virtual QCString trPrivateTypes() virtual QCString trPrivateTypes()
{ {
return "Privátní typy"; return DECODE("Privátní typy");
} }
virtual QCString trPrivateAttribs() virtual QCString trPrivateAttribs()
{ {
return "Privátní atributy"; return DECODE("Privátní atributy");
} }
virtual QCString trStaticPrivateAttribs() virtual QCString trStaticPrivateAttribs()
{ {
return "Statické privátní atributy"; return DECODE("Statické privátní atributy");
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
...@@ -868,16 +977,39 @@ class TranslatorCzech : public Translator ...@@ -868,16 +977,39 @@ class TranslatorCzech : public Translator
/*! Used as a marker that is put before a todo item */ /*! Used as a marker that is put before a todo item */
virtual QCString trTodo() virtual QCString trTodo()
{ {
return "Udìlat"; return DECODE("Udìlat");
} }
/*! Used as the header of the todo list */ /*! Used as the header of the todo list */
virtual QCString trTodoList() virtual QCString trTodoList()
{ {
return "Seznam plánovaných úprav"; return DECODE("Seznam plánovaných úprav");
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.1.4
//////////////////////////////////////////////////////////////////////////
virtual QCString trReferencedBy()
{
return DECODE("Používá se v");
}
virtual QCString trRemarks()
{
return DECODE("Poznámky"); // ??? not checked in a context
}
virtual QCString trAttention()
{
return DECODE("Upozornìní"); // ??? not checked in a context
}
virtual QCString trInclByDepGraph()
{
return DECODE("Následující graf ukazuje, které soubory pøímo nebo "
"nepøímo vkládají tento soubor:");
}
virtual QCString trSince()
{
return DECODE("Od"); // ??? not checked in a context
}
}; };
#endif // TRANSLATOR_CZ_H #endif // TRANSLATOR_CZ_H
...@@ -345,7 +345,7 @@ class TranslatorGerman : public Translator ...@@ -345,7 +345,7 @@ class TranslatorGerman : public Translator
{ return "Nur f&uuml;r den internen Gebrauch."; } { return "Nur f&uuml;r den internen Gebrauch."; }
QCString trReimplementedForInternalReasons() QCString trReimplementedForInternalReasons()
// this text is generated when the \reimp command is used. // this text is generated when the \reimp command is used.
{ return "Aufgrund interner Gr&uuml;nde neu implementiert; " { return "Aus internen Gr&uuml;nden neu implementiert. "
"Das API wird davon nicht ber&uuml;hrt."; "Das API wird davon nicht ber&uuml;hrt.";
} }
QCString trWarning() QCString trWarning()
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
*/ */
/** /**
* translator_es.h modified by Lucas Cruz * translator_es.h modified by Lucas Cruz (7-julio-2000)
* Some notes: * Some notes:
* - I only use upper case in the first letter of the title, because * - It's posible that some sentences haven't got meaning because
* the aspect of the document is more pleasing to the eye. * some words haven't got translate in spanish.
*/ */
#ifndef TRANSLATOR_ES_H #ifndef TRANSLATOR_ES_H
...@@ -38,7 +38,7 @@ class TranslatorSpanish : public Translator ...@@ -38,7 +38,7 @@ class TranslatorSpanish : public Translator
/*! used in the compound documentation before a list of related functions. */ /*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions() virtual QCString trRelatedFunctions()
{ return "Funciones Relacionadas"; } { return "Funciones relacionadas"; }
/*! subscript for the related functions. */ /*! subscript for the related functions. */
virtual QCString trRelatedSubscript() virtual QCString trRelatedSubscript()
...@@ -46,23 +46,23 @@ class TranslatorSpanish : public Translator ...@@ -46,23 +46,23 @@ class TranslatorSpanish : public Translator
/*! header that is put before the detailed description of files, classes and namespaces. */ /*! header that is put before the detailed description of files, classes and namespaces. */
virtual QCString trDetailedDescription() virtual QCString trDetailedDescription()
{ return "Descripción Detallada"; } { return "Descripción detallada"; }
/*! header that is put before the list of typedefs. */ /*! header that is put before the list of typedefs. */
virtual QCString trMemberTypedefDocumentation() virtual QCString trMemberTypedefDocumentation()
{ return "Documentación de los 'Tipos Definidos' Miembros de la Clase"; } { return "Documentación de los 'Tipos Definidos' miembros de la clase"; }
/*! header that is put before the list of enumerations. */ /*! header that is put before the list of enumerations. */
virtual QCString trMemberEnumerationDocumentation() virtual QCString trMemberEnumerationDocumentation()
{ return "Documentación de las Enumeraciones Miembro de la Clase"; } { return "Documentación de las enumeraciones miembro de la clase"; }
/*! header that is put before the list of member functions. */ /*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation() virtual QCString trMemberFunctionDocumentation()
{ return "Documentación de las Funciones Miembro"; } { return "Documentación de las funciones miembro"; }
/*! header that is put before the list of member attributes. */ /*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation() virtual QCString trMemberDataDocumentation()
{ return "Documentación de los Datos Miembro"; } { return "Documentación de los datos miembro"; }
/*! this is the text of a link put after brief descriptions. */ /*! this is the text of a link put after brief descriptions. */
virtual QCString trMore() virtual QCString trMore()
...@@ -74,7 +74,7 @@ class TranslatorSpanish : public Translator ...@@ -74,7 +74,7 @@ class TranslatorSpanish : public Translator
/*! used as the title of the "list of all members" page of a class */ /*! used as the title of the "list of all members" page of a class */
virtual QCString trMemberList() virtual QCString trMemberList()
{ return "Lista de los Miembros"; } { return "Lista de los miembros"; }
/*! this is the first part of a sentence that is followed by a class name */ /*! this is the first part of a sentence that is followed by a class name */
virtual QCString trThisIsTheListOfAllMembers() virtual QCString trThisIsTheListOfAllMembers()
...@@ -122,31 +122,31 @@ class TranslatorSpanish : public Translator ...@@ -122,31 +122,31 @@ class TranslatorSpanish : public Translator
/*! This is put above each page as a link to the class hierarchy */ /*! This is put above each page as a link to the class hierarchy */
virtual QCString trClassHierarchy() virtual QCString trClassHierarchy()
{ return "Jerarquía de la Clase"; } { return "Jerarquía de la clase"; }
/*! This is put above each page as a link to the list of annotated classes */ /*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList() virtual QCString trCompoundList()
{ return "Lista de Componentes"; } { return "Lista de componentes"; }
/*! This is put above each page as a link to the list of documented files */ /*! This is put above each page as a link to the list of documented files */
virtual QCString trFileList() virtual QCString trFileList()
{ return "Lista de Archivos"; } { return "Lista de archivos"; }
/*! This is put above each page as a link to the list of all verbatim headers */ /*! This is put above each page as a link to the list of all verbatim headers */
virtual QCString trHeaderFiles() virtual QCString trHeaderFiles()
{ return "Archivos Cabecera"; } { return "Archivos cabecera"; }
/*! This is put above each page as a link to all members of compounds. */ /*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers() virtual QCString trCompoundMembers()
{ return "Miembros de las Clases"; } { return "Miembros de las clases"; }
/*! This is put above each page as a link to all members of files. */ /*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers() virtual QCString trFileMembers()
{ return "Archivos de los Miembros"; } { return "Archivos de los miembros"; }
/*! This is put above each page as a link to all related pages. */ /*! This is put above each page as a link to all related pages. */
virtual QCString trRelatedPages() virtual QCString trRelatedPages()
{ return "Páginas Relacionadas"; } { return "Páginas relacionadas"; }
/*! This is put above each page as a link to all examples. */ /*! This is put above each page as a link to all examples. */
virtual QCString trExamples() virtual QCString trExamples()
...@@ -236,59 +236,59 @@ class TranslatorSpanish : public Translator ...@@ -236,59 +236,59 @@ class TranslatorSpanish : public Translator
* index of all groups. * index of all groups.
*/ */
virtual QCString trModuleIndex() virtual QCString trModuleIndex()
{ return "Indice de Módulos"; } { return "Indice de módulos"; }
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* class hierarchy. * class hierarchy.
*/ */
virtual QCString trHierarchicalIndex() virtual QCString trHierarchicalIndex()
{ return "Indice Jerárquico"; } { return "Indice jerárquico"; }
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* annotated compound index. * annotated compound index.
*/ */
virtual QCString trCompoundIndex() virtual QCString trCompoundIndex()
{ return "Indice de Clases"; } { return "Indice de clases"; }
/*! This is used in LaTeX as the title of the chapter with the /*! This is used in LaTeX as the title of the chapter with the
* list of all files. * list of all files.
*/ */
virtual QCString trFileIndex() virtual QCString trFileIndex()
{ return "Indice de Archivos"; } { return "Indice de archivos"; }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all groups. * the documentation of all groups.
*/ */
virtual QCString trModuleDocumentation() virtual QCString trModuleDocumentation()
{ return "Documentación de Módulos"; } { return "Documentación de módulos"; }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions. * the documentation of all classes, structs and unions.
*/ */
virtual QCString trClassDocumentation() virtual QCString trClassDocumentation()
{ return "Documentación de Clasee"; } { return "Documentación de clasee"; }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files. * the documentation of all files.
*/ */
virtual QCString trFileDocumentation() virtual QCString trFileDocumentation()
{ return "Documentación de Archivos"; } { return "Documentación de archivos"; }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all examples. * the documentation of all examples.
*/ */
virtual QCString trExampleDocumentation() virtual QCString trExampleDocumentation()
{ return "Documentación de Ejemplos"; } { return "Documentación de ejemplos"; }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all related pages. * the documentation of all related pages.
*/ */
virtual QCString trPageDocumentation() virtual QCString trPageDocumentation()
{ return "Documentación de Páginas"; } { return "Documentación de páginas"; }
/*! This is used in LaTeX as the title of the document */ /*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual() virtual QCString trReferenceManual()
{ return "Manual de Referencia"; } { return "Manual de referencia"; }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of defines * list of defines
...@@ -300,13 +300,13 @@ class TranslatorSpanish : public Translator ...@@ -300,13 +300,13 @@ class TranslatorSpanish : public Translator
* list of function prototypes * list of function prototypes
*/ */
virtual QCString trFuncProtos() virtual QCString trFuncProtos()
{ return "Funciones Prototipo"; } { return "Funciones prototipo"; }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of typedefs * list of typedefs
*/ */
virtual QCString trTypedefs() virtual QCString trTypedefs()
{ return "Tipos Definidos"; } { return "Tipos definidos"; }
/*! This is used in the documentation of a file as a header before the /*! This is used in the documentation of a file as a header before the
* list of enumerations * list of enumerations
...@@ -340,7 +340,7 @@ class TranslatorSpanish : public Translator ...@@ -340,7 +340,7 @@ class TranslatorSpanish : public Translator
* documentation blocks for defines * documentation blocks for defines
*/ */
virtual QCString trDefineDocumentation() virtual QCString trDefineDocumentation()
{ return "Documentación de las Definiciones"; } { return "Documentación de las definiciones"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for function prototypes * of documentation blocks for function prototypes
...@@ -352,31 +352,31 @@ class TranslatorSpanish : public Translator ...@@ -352,31 +352,31 @@ class TranslatorSpanish : public Translator
* of documentation blocks for typedefs * of documentation blocks for typedefs
*/ */
virtual QCString trTypedefDocumentation() virtual QCString trTypedefDocumentation()
{ return "Documentación de los Tipos Definidos"; } { return "Documentación de los tipos definidos"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types * of documentation blocks for enumeration types
*/ */
virtual QCString trEnumerationTypeDocumentation() virtual QCString trEnumerationTypeDocumentation()
{ return "Documentación de las Enumeraciones"; } { return "Documentación de las enumeraciones"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values * of documentation blocks for enumeration values
*/ */
virtual QCString trEnumerationValueDocumentation() virtual QCString trEnumerationValueDocumentation()
{ return "Documentación de los Valores de la Enumeración"; } { return "Documentación de los valores de la enumeración"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions * of documentation blocks for functions
*/ */
virtual QCString trFunctionDocumentation() virtual QCString trFunctionDocumentation()
{ return "Documentación de las Funciones"; } { return "Documentación de las funciones"; }
/*! This is used in the documentation of a file/namespace before the list /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables * of documentation blocks for variables
*/ */
virtual QCString trVariableDocumentation() virtual QCString trVariableDocumentation()
{ return "Documentación de las Variables"; } { return "Documentación de las variables"; }
/*! This is used in the documentation of a file/namespace/group before /*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds * the list of links to documented compounds
...@@ -465,7 +465,7 @@ class TranslatorSpanish : public Translator ...@@ -465,7 +465,7 @@ class TranslatorSpanish : public Translator
/*! used as the title of page containing all the index of all namespaces. */ /*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList() virtual QCString trNamespaceList()
{ return "Lista de Namespace"; } { return "Lista de namespace"; }
/*! used as an introduction to the namespace list */ /*! used as an introduction to the namespace list */
virtual QCString trNamespaceListDescription(bool extractAll) virtual QCString trNamespaceListDescription(bool extractAll)
...@@ -490,7 +490,7 @@ class TranslatorSpanish : public Translator ...@@ -490,7 +490,7 @@ class TranslatorSpanish : public Translator
* related classes * related classes
*/ */
virtual QCString trRelatedFunctionDocumentation() virtual QCString trRelatedFunctionDocumentation()
{ return "Documentación de las Funciones Relacionadas y Clases Amigas"; } { return "Documentación de las funciones relacionadas y clases amigas"; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990425 // new since 0.49-990425
...@@ -518,7 +518,7 @@ class TranslatorSpanish : public Translator ...@@ -518,7 +518,7 @@ class TranslatorSpanish : public Translator
virtual QCString trFileReference(const char *fileName) virtual QCString trFileReference(const char *fileName)
{ {
QCString result=fileName; QCString result=fileName;
result+=" Archivo Referencia"; result+=" Archivo referencia";
return result; return result;
} }
...@@ -526,7 +526,7 @@ class TranslatorSpanish : public Translator ...@@ -526,7 +526,7 @@ class TranslatorSpanish : public Translator
virtual QCString trNamespaceReference(const char *namespaceName) virtual QCString trNamespaceReference(const char *namespaceName)
{ {
QCString result=namespaceName; QCString result=namespaceName;
result+=" Namespace Referencia"; result+=" Namespace referencia";
return result; return result;
} }
...@@ -534,25 +534,25 @@ class TranslatorSpanish : public Translator ...@@ -534,25 +534,25 @@ class TranslatorSpanish : public Translator
* these are for the member sections of a class, struct or union * these are for the member sections of a class, struct or union
*/ */
virtual QCString trPublicMembers() virtual QCString trPublicMembers()
{ return "Métodos Públicos"; } { return "Métodos públicos"; }
virtual QCString trPublicSlots() virtual QCString trPublicSlots()
{ return "Slots Públicos"; } { return "Slots públicos"; }
virtual QCString trSignals() virtual QCString trSignals()
{ return "Señales"; } { return "Señales"; }
virtual QCString trStaticPublicMembers() virtual QCString trStaticPublicMembers()
{ return "Métodos Públicos Estáticos"; } { return "Métodos públicos estáticos"; }
virtual QCString trProtectedMembers() virtual QCString trProtectedMembers()
{ return "Métodos Protegidos"; } { return "Métodos protegidos"; }
virtual QCString trProtectedSlots() virtual QCString trProtectedSlots()
{ return "Slots Protegidos"; } { return "Slots protegidos"; }
virtual QCString trStaticProtectedMembers() virtual QCString trStaticProtectedMembers()
{ return "Métodos Protegidos Estáticos"; } { return "Métodos protegidos estáticos"; }
virtual QCString trPrivateMembers() virtual QCString trPrivateMembers()
{ return "Métodos Privados"; } { return "Métodos privados"; }
virtual QCString trPrivateSlots() virtual QCString trPrivateSlots()
{ return "Slots Privados"; } { return "Slots privados"; }
virtual QCString trStaticPrivateMembers() virtual QCString trStaticPrivateMembers()
{ return "Métodos Privados Estáticos"; } { return "Métodos privados estáticos"; }
/*! \endmgroup */ /*! \endmgroup */
/*! this function is used to produce a comma-separated list of items. /*! this function is used to produce a comma-separated list of items.
...@@ -614,7 +614,7 @@ class TranslatorSpanish : public Translator ...@@ -614,7 +614,7 @@ class TranslatorSpanish : public Translator
/*! This is put above each page as a link to all members of namespaces. */ /*! This is put above each page as a link to all members of namespaces. */
virtual QCString trNamespaceMembers() virtual QCString trNamespaceMembers()
{ return "Namespace Miembros"; } { return "Namespace miembros"; }
/*! This is an introduction to the page with all namespace members */ /*! This is an introduction to the page with all namespace members */
virtual QCString trNamespaceMemberDescription(bool extractAll) virtual QCString trNamespaceMemberDescription(bool extractAll)
...@@ -632,13 +632,13 @@ class TranslatorSpanish : public Translator ...@@ -632,13 +632,13 @@ class TranslatorSpanish : public Translator
* index of all namespaces. * index of all namespaces.
*/ */
virtual QCString trNamespaceIndex() virtual QCString trNamespaceIndex()
{ return "Indice de Namespace"; } { return "Indice de namespace"; }
/*! This is used in LaTeX as the title of the chapter containing /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces. * the documentation of all namespaces.
*/ */
virtual QCString trNamespaceDocumentation() virtual QCString trNamespaceDocumentation()
{ return "Documentación de Namespace"; } { return "Documentación de namespace"; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990522 // new since 0.49-990522
...@@ -680,7 +680,7 @@ class TranslatorSpanish : public Translator ...@@ -680,7 +680,7 @@ class TranslatorSpanish : public Translator
* list. * list.
*/ */
virtual QCString trAlphabeticalList() virtual QCString trAlphabeticalList()
{ return "Lista Alfabética"; } { return "Lista alfabética"; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990901 // new since 0.49-990901
...@@ -693,7 +693,7 @@ class TranslatorSpanish : public Translator ...@@ -693,7 +693,7 @@ class TranslatorSpanish : public Translator
/*! This is in the (quick) index as a link to the main page (index.html) /*! This is in the (quick) index as a link to the main page (index.html)
*/ */
virtual QCString trMainPage() virtual QCString trMainPage()
{ return "Página Principal"; } { return "Página principal"; }
/*! This is used in references to page that are put in the LaTeX /*! This is used in references to page that are put in the LaTeX
* documentation. It should be an abbreviation of the word page. * documentation. It should be an abbreviation of the word page.
...@@ -744,7 +744,7 @@ class TranslatorSpanish : public Translator ...@@ -744,7 +744,7 @@ class TranslatorSpanish : public Translator
/*! header that is put before the list of constructor/destructors. */ /*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation() virtual QCString trConstructorDocumentation()
{ {
return "Documentación del Constructor y Destructor"; return "Documentación del constructor y destructor";
} }
/*! Used in the file documentation to point to the corresponding sources. */ /*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode() virtual QCString trGotoSourceCode()
...@@ -783,7 +783,7 @@ class TranslatorSpanish : public Translator ...@@ -783,7 +783,7 @@ class TranslatorSpanish : public Translator
} }
virtual QCString trGraphicalHierarchy() virtual QCString trGraphicalHierarchy()
{ {
return "Representación Gráfica de la Clase"; return "Representación gráfica de la clase";
} }
virtual QCString trGotoGraphicalHierarchy() virtual QCString trGotoGraphicalHierarchy()
{ {
...@@ -795,7 +795,7 @@ class TranslatorSpanish : public Translator ...@@ -795,7 +795,7 @@ class TranslatorSpanish : public Translator
} }
virtual QCString trPageIndex() virtual QCString trPageIndex()
{ {
return "Página Indice"; return "Página indice";
} }
virtual QCString trNote() virtual QCString trNote()
{ {
...@@ -804,40 +804,82 @@ class TranslatorSpanish : public Translator ...@@ -804,40 +804,82 @@ class TranslatorSpanish : public Translator
virtual QCString trPublicTypes() virtual QCString trPublicTypes()
{ {
return "Tipos Públicos"; return "Tipos públicos";
} }
virtual QCString trPublicAttribs() virtual QCString trPublicAttribs()
{ {
return "Atributos Públicos"; return "Atributos públicos";
} }
virtual QCString trStaticPublicAttribs() virtual QCString trStaticPublicAttribs()
{ {
return "Atributos Públicos Estáticos"; return "Atributos públicos estáticos";
} }
virtual QCString trProtectedTypes() virtual QCString trProtectedTypes()
{ {
return "Tipos Protegidos"; return "Tipos protegidos";
} }
virtual QCString trProtectedAttribs() virtual QCString trProtectedAttribs()
{ {
return "Atributos Protegidos"; return "Atributos protegidos";
} }
virtual QCString trStaticProtectedAttribs() virtual QCString trStaticProtectedAttribs()
{ {
return "Atributos Protegidos Estáticos"; return "Atributos protegidos estáticos";
} }
virtual QCString trPrivateTypes() virtual QCString trPrivateTypes()
{ {
return "Tipos Privados"; return "Tipos privados";
} }
virtual QCString trPrivateAttribs() virtual QCString trPrivateAttribs()
{ {
return "Atributos Privados"; return "Atributos privados";
} }
virtual QCString trStaticPrivateAttribs() virtual QCString trStaticPrivateAttribs()
{ {
return "Atributos Privados Estáticos"; return "Atributos privados estáticos";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.3
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a todo item */
virtual QCString trTodo()
{
return "Todo";
}
/*! Used as the header of the todo list */
virtual QCString trTodoList()
{
return "Listado de todo";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.4
//////////////////////////////////////////////////////////////////////////
virtual QCString trReferencedBy()
{
return "Referenciado por";
}
virtual QCString trRemarks()
{
return "Comentarios";
}
virtual QCString trAttention()
{
return "Atención";
}
virtual QCString trInclByDepGraph()
{
return "Este gráfico muestra que archivos directa o "
"indirectamente incluyen a este archivo.";
}
virtual QCString trSince()
{
return "Desde";
} }
}; };
#endif #endif
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
* *
*/ */
// translation by Boris Bralo <boris.bralo@zg.tel.hr>
#ifndef TRANSLATOR_HR_H #ifndef TRANSLATOR_HR_H
#define TRANSLATOR_HR_H #define TRANSLATOR_HR_H
...@@ -27,6 +29,14 @@ class TranslatorCroatian : public Translator ...@@ -27,6 +29,14 @@ class TranslatorCroatian : public Translator
{ return "croatian"; } { return "croatian"; }
QCString latexBabelPackage() QCString latexBabelPackage()
{ return "croatian"; } { return "croatian"; }
QCString idLanguageCharset()
{
#ifdef _WIN32
return "windows-1250";
#else
return "iso-8859-2";
#endif
}
QCString trRelatedFunctions() QCString trRelatedFunctions()
{ return "Povezane funkcije"; } { return "Povezane funkcije"; }
QCString trRelatedSubscript() QCString trRelatedSubscript()
...@@ -612,7 +622,11 @@ class TranslatorCroatian : public Translator ...@@ -612,7 +622,11 @@ class TranslatorCroatian : public Translator
} }
virtual QCString trAttention() virtual QCString trAttention()
{ {
#ifdef _WIN32
return "Pa?nja";
#else
return "Panja"; return "Panja";
#endif
} }
virtual QCString trInclByDepGraph() virtual QCString trInclByDepGraph()
{ {
......
...@@ -37,6 +37,55 @@ ...@@ -37,6 +37,55 @@
#include "version.h" #include "version.h"
#include "groupdef.h" #include "groupdef.h"
#ifndef _WIN32
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
extern char **environ;
#endif
/*! Implements an interruptable system call on Unix */
int iSystem(const char *command)
{
#ifndef _WIN32
/*! taken from the system() manpage on my Linux box */
int pid,status;
if (command==0) return 1;
pid = fork();
if (pid==-1) return -1;
if (pid==0)
{
const char * argv[4];
argv[0] = "sh";
argv[1] = "-c";
argv[2] = command;
argv[3] = 0;
execve("/bin/sh",(char * const *)argv,environ);
exit(127);
}
for (;;)
{
if (waitpid(pid,&status,0)==-1)
{
if (errno!=EINTR) return -1;
}
else
{
return status;
}
}
#else
system(command);
#endif
}
// an inheritance tree of depth of 100000 should be enough for everyone :-) // an inheritance tree of depth of 100000 should be enough for everyone :-)
const int maxInheritanceDepth = 100000; const int maxInheritanceDepth = 100000;
...@@ -212,6 +261,7 @@ ClassDef *getResolvedClass(const char *name) ...@@ -212,6 +261,7 @@ ClassDef *getResolvedClass(const char *name)
QCString *subst = typedefDict[name]; QCString *subst = typedefDict[name];
if (subst) // there is a typedef with this name if (subst) // there is a typedef with this name
{ {
//printf("getResolvedClass `%s'->`%s'\n",name,subst->data());
if (*subst==name) // avoid resolving typedef struct foo foo; if (*subst==name) // avoid resolving typedef struct foo foo;
{ {
return classDict[name]; return classDict[name];
...@@ -220,6 +270,7 @@ ClassDef *getResolvedClass(const char *name) ...@@ -220,6 +270,7 @@ ClassDef *getResolvedClass(const char *name)
QCString *newSubst; QCString *newSubst;
while ((newSubst=typedefDict[*subst]) && count<10) while ((newSubst=typedefDict[*subst]) && count<10)
{ {
if (*subst==*newSubst) return classDict[subst->data()]; // for breaking typedef struct A A;
subst=newSubst; subst=newSubst;
count++; count++;
} }
...@@ -249,11 +300,11 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -249,11 +300,11 @@ QCString removeRedundantWhiteSpace(const QCString &s)
for (i=0;i<l;i++) for (i=0;i<l;i++)
{ {
char c=s.at(i); char c=s.at(i);
if (i<l-2 && c=='<' && s.at(i+1)!='<') if (i<l-2 && c=='<' && (isId(s.at(i+1)) || isspace(s.at(i+1))))
{ {
result+="< "; result+="< ";
} }
else if (i>0 && c=='>' && s.at(i-1)!='>') else if (i>0 && c=='>' && (isId(s.at(i-1)) || isspace(s.at(i-1))))
{ {
result+=" >"; result+=" >";
} }
...@@ -267,6 +318,7 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -267,6 +318,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
result+=c; result+=c;
} }
} }
//printf("removeRedundantWhiteSpace(`%s')=`%s'\n",s.data(),result.data());
return result; return result;
} }
...@@ -288,7 +340,7 @@ bool leftScopeMatch(const QCString &scope, const QCString &name) ...@@ -288,7 +340,7 @@ bool leftScopeMatch(const QCString &scope, const QCString &name)
); );
} }
void linkifyText(OutputList &ol,const char *scName,const char *name,const char *text,bool autoBreak) void linkifyText(OutputList &ol,const char *scName,const char *name,const char *text,bool autoBreak,bool external)
{ {
//printf("scope=`%s' name=`%s' Text: `%s'\n",scName,name,text); //printf("scope=`%s' name=`%s' Text: `%s'\n",scName,name,text);
static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9:]*"); static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9:]*");
...@@ -362,7 +414,7 @@ void linkifyText(OutputList &ol,const char *scName,const char *name,const char * ...@@ -362,7 +414,7 @@ void linkifyText(OutputList &ol,const char *scName,const char *name,const char *
if ((cd=getClass(fullName))) if ((cd=getClass(fullName)))
{ {
// add link to the result // add link to the result
if (cd->isLinkable()) if (external ? cd->isLinkable() : cd->isLinkableInProject())
{ {
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,word); ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,word);
found=TRUE; found=TRUE;
...@@ -384,13 +436,13 @@ void linkifyText(OutputList &ol,const char *scName,const char *name,const char * ...@@ -384,13 +436,13 @@ void linkifyText(OutputList &ol,const char *scName,const char *name,const char *
getDefs(scName,word,0,md,cd,fd,nd,gd) && getDefs(scName,word,0,md,cd,fd,nd,gd) &&
(md->isTypedef() || md->isEnumerate() || (md->isTypedef() || md->isEnumerate() ||
md->isReference() || md->isVariable()) && md->isReference() || md->isVariable()) &&
md->isLinkable() (external ? md->isLinkable() : md->isLinkableInProject())
) )
{ {
//printf("Found ref\n"); //printf("Found ref\n");
Definition *d=0; Definition *d=0;
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
if (d && d->isLinkable()) if (d && (external ? d->isLinkable() : d->isLinkableInProject()))
{ {
ol.writeObjectLink(d->getReference(),d->getOutputFileBase(), ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),
md->anchor(),word); md->anchor(),word);
......
...@@ -41,7 +41,7 @@ extern void setAnchors(char id,MemberList *ml,int groupId=-1); ...@@ -41,7 +41,7 @@ extern void setAnchors(char id,MemberList *ml,int groupId=-1);
extern QCString fileToString(const char *name); extern QCString fileToString(const char *name);
extern QCString dateToString(bool); extern QCString dateToString(bool);
extern void linkifyText(OutputList &ol,const char *clName,const char *name, extern void linkifyText(OutputList &ol,const char *clName,const char *name,
const char *text,bool autoBreak=FALSE); const char *text,bool autoBreak=FALSE,bool external=TRUE);
extern bool getDefs(const QCString &scopeName,const QCString &memberName, extern bool getDefs(const QCString &scopeName,const QCString &memberName,
const char *, MemberDef *&md, const char *, MemberDef *&md,
ClassDef *&cd,FileDef *&fd, ClassDef *&cd,FileDef *&fd,
...@@ -97,5 +97,6 @@ void extractNamespaceName(const QCString &scopeName, ...@@ -97,5 +97,6 @@ void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName); QCString &className,QCString &namespaceName);
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ); QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
QCString stripScope(const char *name); QCString stripScope(const char *name);
int iSystem(const char *command);
#endif #endif
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