Commit daf91dc9 authored by mueller's avatar mueller

mods for doxygen-0.49-990728

parent a6cb7ef1
DOXYGEN Version 0.49-990522 DOXYGEN Version 0.49-990728
INSTALLATION INSTRUCTIONS FOR UNIX: INSTALLATION INSTRUCTIONS FOR UNIX:
----------------------------------- -----------------------------------
1. Unpack the archive, unless you already have: 1. Unpack the archive, unless you already have:
gunzip doxygen-0.49-990522.src.tar.gz # uncompress the archive gunzip doxygen-0.49-990728.src.tar.gz # uncompress the archive
tar xf doxygen-0.49-990522.src.tar # unpack it tar xf doxygen-0.49-990728.src.tar # unpack it
2. Make sure Qt is installed properly (check the environment variable $QTDIR) 2. Make sure Qt is installed properly (check the environment variable $QTDIR)
...@@ -104,7 +104,7 @@ KNOWN CONFIGURATION PROBLEMS ...@@ -104,7 +104,7 @@ KNOWN CONFIGURATION PROBLEMS
HTML RELATED PROBLEMS: HTML RELATED PROBLEMS:
- the indent continuously increases. - the indent continuously increases.
This seems to be a problem that can be observed with Netscape 4.01. This seems to be a problem that can be observed with Netscape 4.01.
It is not present in many later and earlier versions. It is not present in many later and earlier versions I tested.
LATEX RELATED PROBLEMS: LATEX RELATED PROBLEMS:
...@@ -116,16 +116,32 @@ LATEX RELATED PROBLEMS: ...@@ -116,16 +116,32 @@ LATEX RELATED PROBLEMS:
- the file fancyheader.sty is known as fancyhdr.sty on some systems. - the file fancyheader.sty is known as fancyhdr.sty on some systems.
Please change that in src/latexgen.cpp Please change that in src/latexgen.cpp
HP-UX PROBLEMS: HP-UX / DIGITAL UNIX PROBLEMS:
- If you are compiling for HP-UX with aCC and you get this error: - If you are compiling for HP-UX with aCC and you get this error:
/opt/aCC/lbin/ld: Unsatisfied symbols: /opt/aCC/lbin/ld: Unsatisfied symbols:
alloca (code) alloca (code)
then you should edit ce_parse.cpp and replace then you should (according to Anke Selig) edit ce_parse.cpp and replace
extern "C" { extern "C" {
void *alloca (unsigned int); void *alloca (unsigned int);
}; };
with with
#include <alloca.h> #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>
This seems to be a problem with bison, but I don't know how to fix it. This seems to be a problem with bison, but I don't know how to fix it.
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
...@@ -138,4 +154,4 @@ The latest version of doxygen can be obtained at ...@@ -138,4 +154,4 @@ The latest version of doxygen can be obtained at
Enjoy, Enjoy,
Dimitri van Heesch (22 May 1999) Dimitri van Heesch (30 July 1999)
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
...@@ -38,6 +38,11 @@ dgux-g++: src/version.cpp ...@@ -38,6 +38,11 @@ dgux-g++: src/version.cpp
TMAKEPATH=../tmake/lib/dgux-g++ \ TMAKEPATH=../tmake/lib/dgux-g++ \
$(MAKE) $(MAKE)
gnu-g++: src/version.cpp
cd src; \
TMAKEPATH=../tmake/lib/gnu-g++ \
$(MAKE)
freebsd-g++: src/version.cpp freebsd-g++: src/version.cpp
cd src; \ cd src; \
TMAKEPATH=../tmake/lib/freebsd-g++ \ TMAKEPATH=../tmake/lib/freebsd-g++ \
...@@ -170,7 +175,7 @@ ps: docs ...@@ -170,7 +175,7 @@ ps: docs
archive: clean archive: clean
$(TAR) zcvf backup/dx`date +%y%m%d`.tgz tmake doc examples bin objects \ $(TAR) zcvf backup/dx`date +%y%m%d`.tgz tmake doc examples bin objects \
src Makefile Makefile.windows INSTALL make.bat Makefile.config \ src Makefile Makefile.windows INSTALL make.bat Makefile.config \
LANGUAGE.HOWTO LANGUAGE.HOWTO LICENSE
src/version.cpp: FORCE src/version.cpp: FORCE
echo "char versionString[]=\"$(VERSION)\";" > src/version.cpp echo "char versionString[]=\"$(VERSION)\";" > src/version.cpp
......
...@@ -9,4 +9,4 @@ PERL = perl ...@@ -9,4 +9,4 @@ PERL = perl
# The values below should probably be left unmodified # The values below should probably be left unmodified
TAR = tar # name of the GNU tar tool TAR = tar # name of the GNU tar tool
TMAKE = ../tmake/bin/tmake TMAKE = ../tmake/bin/tmake
VERSION = 0.49-990522 VERSION = 0.49-990728
DOXYGEN Version 0.49-990522 DOXYGEN Version 0.49-990728
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 (22 May 1999) Dimitri van Heesch (30 July 1999)
...@@ -10,11 +10,11 @@ EXTRACT_PRIVATE = NO ...@@ -10,11 +10,11 @@ EXTRACT_PRIVATE = NO
GENERATE_LATEX = YES GENERATE_LATEX = YES
GENERATE_HTML = YES GENERATE_HTML = YES
ENABLE_PREPROCESSING = NO ENABLE_PREPROCESSING = NO
INPUT = index.doc install.doc starting.doc trouble.doc \ INPUT = index.doc install.doc starting.doc faq.doc trouble.doc \
history.doc features.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 autolink.doc \ installdox_usage.doc autolink.doc \
config.doc commands.doc htmlcmds.doc config.doc commands.doc htmlcmds.doc language.doc
FILE_PATTERNS = *.cpp *.h *.doc FILE_PATTERNS = *.cpp *.h *.doc
EXAMPLE_PATH = ../examples EXAMPLE_PATH = ../examples
RECURSIVE = NO RECURSIVE = NO
......
...@@ -183,6 +183,7 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -183,6 +183,7 @@ Doxygen. Unrecognized commands are treated as normal text.
\sa section \ref cmdcode "\\code" \sa section \ref cmdcode "\\code"
<hr> <hr>
\subsection cmdenum \enum <name> \subsection cmdenum \enum <name>
\addindex \enum \addindex \enum
...@@ -664,6 +665,7 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -664,6 +665,7 @@ Doxygen. Unrecognized commands are treated as normal text.
\sa \sa
Section \ref cmdpage "\\page" for an example of the \\cmdsection command. Section \ref cmdpage "\\page" for an example of the \\cmdsection command.
<hr> <hr>
\subsection cmdsubsection \subsection <subsection-name> (subsection title) \subsection cmdsubsection \subsection <subsection-name> (subsection title)
...@@ -677,6 +679,7 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -677,6 +679,7 @@ Doxygen. Unrecognized commands are treated as normal text.
\sa \sa
Section \ref cmdpage "\\page" for an example of the \\cmdsubsection command. Section \ref cmdpage "\\page" for an example of the \\cmdsubsection command.
<hr> <hr>
<h2>\htmlonly <center> --- \endhtmlonly <h2>\htmlonly <center> --- \endhtmlonly
...@@ -1054,7 +1057,6 @@ Doxygen. Unrecognized commands are treated as normal text. ...@@ -1054,7 +1057,6 @@ Doxygen. Unrecognized commands are treated as normal text.
character has to be escaped because it has a special meaning in HTML. character has to be escaped because it has a special meaning in HTML.
<hr> <hr>
<h2>\htmlonly <center> --- \endhtmlonly <h2>\htmlonly <center> --- \endhtmlonly
Commands included for JavaDoc compatibility Commands included for JavaDoc compatibility
\htmlonly --- </center>\endhtmlonly</h2> \htmlonly --- </center>\endhtmlonly</h2>
......
...@@ -63,6 +63,14 @@ Below is a list of tags that are recognized for each category. ...@@ -63,6 +63,14 @@ Below is a list of tags that are recognized for each category.
If a relative path is entered, it will be relative to the location If a relative path is entered, it will be relative to the location
where doxygen was started. If left blank the current directory will be used. where doxygen was started. If left blank the current directory will be used.
<dt>\c OUTPUT_LANGUAGE <dd>
\addindex OUTPUT_LANGUAGE
The \c OUTPUT_LANGUAGE tag is used to specify the language in which all
documentation generated by doxygen is written. Doxygen will use this
information to generate all constant output in the proper language.
The default language is English, other supported languages are:
Dutch, French, Italian, Czech, Swedish, German and Japanese.
<dt>\c QUIET <dd> <dt>\c QUIET <dd>
\addindex QUIET \addindex QUIET
The \c QUIET tag can be used to turn on/off the messages that are generated The \c QUIET tag can be used to turn on/off the messages that are generated
...@@ -268,6 +276,11 @@ Below is a list of tags that are recognized for each category. ...@@ -268,6 +276,11 @@ Below is a list of tags that are recognized for each category.
\endverbatim \endverbatim
If the tag is left blank doxygen will generate a If the tag is left blank doxygen will generate a
standard header. standard header.
The following commands have a special meaning inside the header:
<code>\$title</code>, <code>\$datetime</code>, <code>\$date</code>.
Doxygen will replace them by respectively
the title of the page, the current date and time, or only the current date.
<dt>\c HTML_FOOTER <dd> <dt>\c HTML_FOOTER <dd>
\addindex HTML_FOOTER \addindex HTML_FOOTER
...@@ -280,6 +293,11 @@ Below is a list of tags that are recognized for each category. ...@@ -280,6 +293,11 @@ Below is a list of tags that are recognized for each category.
\endverbatim \endverbatim
If the tag is left blank doxygen will generate a standard footer. If the tag is left blank doxygen will generate a standard footer.
The following commands have a special meaning inside the footer:
<code>\$title</code>, <code>\$datetime</code>, <code>\$date</code>.
Doxygen will replace them by respectively
the title of the page, the current date and time, or only the current date.
</dl> </dl>
\subsection latex_output LaTeX related options \subsection latex_output LaTeX related options
......
...@@ -26,6 +26,7 @@ Written by Dimitri van Heesch\\[2ex] ...@@ -26,6 +26,7 @@ Written by Dimitri van Heesch\\[2ex]
\part{User Manual} \part{User Manual}
\input{install} \input{install}
\input{starting} \input{starting}
\input{faq}
\input{trouble} \input{trouble}
\part{Reference Manual} \part{Reference Manual}
\input{features} \input{features}
...@@ -38,5 +39,6 @@ Written by Dimitri van Heesch\\[2ex] ...@@ -38,5 +39,6 @@ Written by Dimitri van Heesch\\[2ex]
\input{config} \input{config}
\input{commands} \input{commands}
\input{htmlcmds} \input{htmlcmds}
\input{langhowto}
\printindex \printindex
\end{document} \end{document}
...@@ -67,7 +67,7 @@ follow these steps: ...@@ -67,7 +67,7 @@ follow these steps:
documentation. Apart from the documentation, Doxygen will create the documentation. Apart from the documentation, Doxygen will create the
following files: following files:
<ul> <ul>
<li>A small CGI script. the name of the script is determined by the <li>A small shell script. the name of the script is determined by the
\c CGI_NAME tag in the configuration file. \c CGI_NAME tag in the configuration file.
The script is a small wrapper that calls \c doxysearch with The script is a small wrapper that calls \c doxysearch with
the correct parameters. Using this script allows multiple the correct parameters. Using this script allows multiple
...@@ -80,6 +80,16 @@ follow these steps: ...@@ -80,6 +80,16 @@ follow these steps:
<li>\c search.gif: this is the image that is used for the search button. <li>\c search.gif: this is the image that is used for the search button.
</ul> </ul>
\par Notice:
On the Windows platform Unix shell scripts cannot be used.
In fact the HTTP daemon that I tried (apache for Windows) only
recognized <code>.cgi</code> files that were renamed
executables (so DOS batch files do not seem to work either). Therefore,
on Windows a small C program will generated by doxygen.
You should compile and link the program with your favourite
compiler and change the extension of the executable from
<code>.exe</code> to <code>.cgi</code>.
<li>Copy (or move) the CGI script to the directory where the CGI binaries <li>Copy (or move) the CGI script to the directory where the CGI binaries
are located. are located.
This is usually a special directory on your system or in your This is usually a special directory on your system or in your
...@@ -112,7 +122,8 @@ This can be done by carefully following these steps: ...@@ -112,7 +122,8 @@ This can be done by carefully following these steps:
<li>Goto the html directory of the Qt-distribution: <li>Goto the html directory of the Qt-distribution:
<pre>cd $QTDIR/html</pre> <pre>cd $QTDIR/html</pre>
<li>Generate the search index by typing: <li>Generate the search index by typing:
<pre>doxytag -s search.idx *.html</pre> <pre>doxytag -s search.idx</pre>
in the directory where the HTML files are located.
This will parse all files and build a search index. This will parse all files and build a search index.
Apart from the file <code>search.idx</code> two other files Apart from the file <code>search.idx</code> two other files
will be generated: <code>search.gif</code> and <code>search.cgi</code> will be generated: <code>search.gif</code> and <code>search.cgi</code>
......
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
/*! \page faq Frequently Asked Questions
<ol>
<li><b>How do get information on the index page in HTML?</b>
<p>
There is no real support for title pages at the moment. But you can
override the default index page, by using the following comment block:
\verbatim
/*! \page index My Personal Index Page
*
* This is my index personal index page.
*/
\endverbatim
<li><b>How can I avoid that some code fragment is parsed by Doxyen?</b>
<p>
You can use Doxygen's preprocessor for this:
If you put
\verbatim
#ifndef DOXYGEN_SHOULD_SKIP_THIS
/* code that must be skipped by Doxygen */
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
\endverbatim
around the blocks that should be hidden and put:
\verbatim
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
\endverbatim
in the config file then all blocks should be skipped by Doxygen as long
as <code>PREPROCESSING = YES</code>.
</ol>
*/
...@@ -58,10 +58,12 @@ sections. ...@@ -58,10 +58,12 @@ sections.
The first part forms a user manual: The first part forms a user manual:
<ul> <ul>
<li>Section \ref install discusses how to download, compile and install <li>Section \ref install discusses how to
<a href="http://www.stack.nl/~dimitri/doxygen/download.html">download</a>, compile and install
doxygen for your platform. doxygen for your platform.
<li>Section \ref starting tells you how to generate your first piece of <li>Section \ref starting tells you how to generate your first piece of
documentation quickly. documentation quickly.
<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>
...@@ -84,8 +86,23 @@ The second part forms a reference manual: ...@@ -84,8 +86,23 @@ The second part forms a reference manual:
used within the documentation. used within the documentation.
<li>Section \ref htmlcmds shows an overview of the HTML commands that <li>Section \ref htmlcmds shows an overview of the HTML commands that
can be used within the documentation. can be used within the documentation.
<li>Section \ref langhowto explains how to add support for new
output languages.
</ul> </ul>
<h2>Projects using doxygen</h2>
I have compiled a small
\htmlonly
<a href="http://www.stack.nl/~dimitri/doxygen/projects.html">list of projects</a>
that use doxygen
\endhtmlonly
\latexonly
list of projects that use doxygen (see {\tt http://www.stack.nl/$\sim$dimitri/doxygen/projects.html})
\endlatexonly
If you know other projects, let me know and I'll add them.
<h2>Acknowledgements</h2> <h2>Acknowledgements</h2>
\addindex acknowledgements \addindex acknowledgements
Thanks go to: Thanks go to:
...@@ -156,9 +173,10 @@ Olaf Meeuwissen, ...@@ -156,9 +173,10 @@ Olaf Meeuwissen,
Feiyi Wang, Feiyi Wang,
Robert J. Clark, Robert J. Clark,
Matthias Baas, Matthias Baas,
Walter Mueller, and Walter Mueller,
William van Dieten William van Dieten, and
for suggestions, patches and bug reports. Joshua Jensen and
many others for suggestions, patches and bug reports.
</ul> </ul>
*/ */
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
/*! \page langhowto Internationalization
<h3>Support for multiple languages</h3>
Doxygen has support for multiple languages. This means that the text fragments that
doxygen generates can changed into languages other than English
(the default) at configuration time.
<p>
Currently, supported languages are English, French, Czech, Dutch,
Swedish, Italian, German and Japanese. A number
of people have volunteered to add support for other languages as well.
Here is a list of the languages and their current maintainers:
<p>
\htmlonly
<TABLE ALIGN=center CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR BGCOLOR="#000000">
<TD>
<TABLE CELLSPACING=1 CELLPADDING=2 BORDER=0>
<TR BGCOLOR="#4040c0">
<TD ><b><font size=+1 color="#ffffff"> Language </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Maintainer </font></b></TD>
<TD ><b><font size=+1 color="#ffffff"> Contact address </font></b></TD>
<TR BGCOLOR="#ffffff">
<TD>
German
</TD>
<TD>
Jens Breitenstein
</TD>
<TD>
<a href="mailto:Jens.Breitenstein@tlc.de">
Jens.Breitenstein@tlc.de</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
French
</TD>
<TD>
Christophe Bordeux
</TD>
<TD>
<a href="mailto:bordeux@lig.di.epfl.ch">
bordeux@lig.di.epfl.ch</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Swedish
</TD>
<TD>
Samuel Hägglund<BR>
XeT Erixon
</TD>
<TD>
<a href="mailto:sahag96@nts.mh.se">
sahag96@nts.mh.se</a><br>
<a href="mailto:xet@hem.passagen.se">
xet@hem.passagen.se</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Czech
</TD>
<TD>
Vlastimil Havran
</TD>
<TD>
<a href="mailto:havran@fel.cvut.cz">
havran@fel.cvut.cz</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Romanian
</TD>
<TD>
Ionutz Borcoman
</TD>
<TD>
<a href="mailto:borco@borco-ei.eng.hokudai.ac.jp">
borco@borco-ei.eng.hokudai.ac.jp</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Polish
</TD>
<TD>
Piotr Piatkowski
</TD>
<TD>
<a href="mailto:kompas@ceti.com.pl">
kompas@ceti.com.pl</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Italian
</TD>
<TD>
Ahmed Aldo Faisal<br>
Alessandro Falappa
</TD>
<TD>
<a href="mailto:aaf23@cam.ac.uk">
aaf23@cam.ac.uk</a><br>
<a href="mailto:a.falappa@flashnet.it">
a.falappa@flashnet.it</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Japanese
</TD>
<TD>
Kenji Nagamatsu
</TD>
<TD>
<a href="mailto:naga@joyful.club.ne.jp">
naga@joyful.club.ne.jp</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Spanish
</TD>
<TD>
Francisco Oltra Thennet
</TD>
<TD>
<a href="mailto:foltra@puc.cl">
foltra@puc.cl</a>
</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>
Dutch
</TD>
<TD>
Dimitri van Heesch
</TD>
<TD>
<a href="mailto:dimitri@stack.nl">
dimitri@stack.nl</a>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
\endhtmlonly
\latexonly
\begin{tabular}{|l|l|l|}
\hline
{\bf Language} & {\bf Maintainer} & {Contact address} \\
\hline
German & Jens Breitenstein & {\tt Jens.Breitenstein@tlc.de} \\
\hline
French & Christophe Bordeux & {\tt bordeux@lig.di.epfl.ch} \\
\hline
Swedish & Samuel Hägglund & {\tt sahag96@nts.mh.se} \\
& XeT Erixon & {\tt xet@hem.passagen.se} \\
\hline
Czech & Vlastimil Havran & {\tt havran@fel.cvut.cz} \\
\hline
Romanian & Ionutz Borcoman & {\tt borco@borco-ei.eng.hokudai.ac.jp} \\
\hline
Polish & Piotr Piatkowski & {\tt kompas@ceti.com.pl} \\
\hline
Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} \\
& Alessandro Falappa & {\tt a.falappa@flashnet.it} \\
\hline
Japanese & Kenji Nagamatsu & {\tt naga@joyful.club.ne.jp} \\
\hline
Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} \\
\hline
Dutch & Dimitri van Heesch & {\tt dimitri@stack.nl} \\
\hline
\end{tabular}
\endlatexonly
<p>
Most people on the list have indicated that they were also busy
doing other things, so if you want to help to speed things up please
let them (or me) know.
If you want to add support for a language that is not yet listed
please see the next section.
<h3>Language HOWTO</h3>
This short HOWTO explains how to add support for a new language to Doxygen:
Just follow these steps:
<ol>
<li>Tell me for which language you want to add support. If no one else
is already working on support for that language, you will be
assigned as the maintainer for the language.
<li>Create a copy of translator_nl.h and name it
translator_<your_2_letter_counter_code>.h
I'll use xx in the rest of this document.
<li>Edit language.cpp:
Add a
\verbatim
#include<translator_xx.h>
\endverbatim
in <code>setTranslator()</code> add
\verbatim
else if (L_EQUAL("your_language_name"))
{
theTranslator = new TranslatorYourLanguage;
}
\endverbatim
after the <code>if { ... }</code>
<li>Edit doxygen.pro and add \c translator_xx.h to
the \c HEADERS line in the file doxygen.pro.
<li>Edit <code>translator_xx.h</code>:
<ul>
<li>Rename <code>TRANSLATOR_NL_H</code> to <code>TRANSLATOR_XX_H</code> twice.
<li>Rename TranslatorDutch to TranslatorYourLanguage
<li>In the member <code>latexBabelPackage()</code> change "dutch" into the name of the
latex package that adds support for your language.
<li>Edit all the strings that are returned by the members that start
with tr.
Look at the corresponding member in translator.h for the english text
that is returned and translate that into your language.
Try to match punctuation and capitals!
To enter special characters (with accents) you can:
<ul>
<li> Enter them directly if your keyboard supports that and you are
using a Latin-1 font.
Doxygen will translate the characters to proper Latex and
leave the Html and man output for what it is.
<li> Use html codes like \&auml; for an a with an umlaut (i.e. &auml;).
See the HTML specification for the codes.
</ul>
</ul>
<li>Recompile everything (do this from the root of the distribution,
because the Makefile.dox* have to be regenerated!)
<li>Now you can use <code>OUTPUT_LANGUAGE = your_language_name</code>
in the config file to generate output in your language.
<li>Send <code>translator_xx.h</code> or a <code>diff -u</code> of the changes
to me so I can add it to doxygen.
</ol>
*/
...@@ -397,6 +397,122 @@ from typos in formulas. It may have to be necessary to remove the ...@@ -397,6 +397,122 @@ from typos in formulas. It may have to be necessary to remove the
file formula.repository that is written in the html directory to file formula.repository that is written in the html directory to
a rid of an incorrect formula a rid of an incorrect formula
\subsection 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 is 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 = "1.xx";
\endverbatim
You can disable all preprocessing by setting \c ENABLE_PREPROCESSING to \c
NO in the configuation file. In the case above doxygen will then read
both statements!
In case you want to expand the \c CONST_STRING macro, you should set the
\c 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
Notice 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 \c EXPAND_ONLY_PREDEF tag to \c YES
and specify the macro definitions after the \c 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)
{
MEMBER(HRESULT,QueryInterface) (THIS_ REFIID iid, void **ppv) PURE;
MEMBER(ULONG,AddRef) (THIS) PURE;
MEMBER(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" \
"MEMBER(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
Notice that the \c 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).
Notice 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).
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 on
the \c INPUT_FILTER flag.
\subsection moreinfo More information \subsection moreinfo More information
\addindex QdbtTabular \addindex QdbtTabular
...@@ -405,7 +521,7 @@ the documentation of QdbtTabular</a> \latexonly ...@@ -405,7 +521,7 @@ the documentation of QdbtTabular</a> \latexonly
({\tt http://www.stack.nl/$\sim$dimitri/qdbttabular/html})\endlatexonly. ({\tt http://www.stack.nl/$\sim$dimitri/qdbttabular/html})\endlatexonly.
\htmlonly \htmlonly
I hope that was clear. If not, please let me know, so I can improve this document. If you have problems I hope that was clear. If not, please let me know, so I can improve this document. If you have problems
take a look at the <a href="trouble.html">troubleshooting</a> section. take a look at the <a href="faq.html">faq</a> and the <a href="trouble.html">troubleshooting</a> sections.
\endhtmlonly \endhtmlonly
*/ */
...@@ -17,7 +17,6 @@ all: class/html/index.html \ ...@@ -17,7 +17,6 @@ all: class/html/index.html \
jdstyle/html/index.html \ jdstyle/html/index.html \
structcmd/html/index.html \ structcmd/html/index.html \
autolink/html/index.html \ autolink/html/index.html \
resdefine/html/index.html \
restypedef/html/index.html \ restypedef/html/index.html \
afterdoc/html/index.html \ afterdoc/html/index.html \
template/html/index.html \ template/html/index.html \
...@@ -26,7 +25,7 @@ all: class/html/index.html \ ...@@ -26,7 +25,7 @@ all: class/html/index.html \
clean: clean:
rm -rf class define enum file func page relates author \ rm -rf class define enum file func page relates author \
par overload example include qtstyle jdstyle structcmd \ par overload example include qtstyle jdstyle structcmd \
autolink tag resdefine restypedef afterdoc template autolink tag restypedef afterdoc template
class/html/index.html: class.h class.cfg class/html/index.html: class.h class.cfg
$(DOXYDIR)/doxygen class.cfg $(DOXYDIR)/doxygen class.cfg
...@@ -81,9 +80,6 @@ tag/html/index.html: tag.cpp tag.cfg ...@@ -81,9 +80,6 @@ tag/html/index.html: tag.cpp tag.cfg
sed -e "1,1s.perl.$(PERL).g" tag/html/installdox >tag/html/installdox.perl sed -e "1,1s.perl.$(PERL).g" tag/html/installdox >tag/html/installdox.perl
cd tag/html ; $(PERL) installdox.perl -lexample.tag@../../example/html cd tag/html ; $(PERL) installdox.perl -lexample.tag@../../example/html
resdefine/html/index.html: resdefine.cpp resdefine.cfg
$(DOXYDIR)/doxygen resdefine.cfg
restypedef/html/index.html: restypedef.cpp restypedef.cfg restypedef/html/index.html: restypedef.cpp restypedef.cfg
$(DOXYDIR)/doxygen restypedef.cfg $(DOXYDIR)/doxygen restypedef.cfg
......
PROJECT_NAME = "Example Command" PROJECT_NAME = "Example Command"
OUTPUT_DIRECTORY = example OUTPUT_DIRECTORY = example
GENERATE_TAGFILE = example.tag
GENERATE_LATEX = NO GENERATE_LATEX = NO
GENERATE_MAN = NO GENERATE_MAN = NO
INPUT = example.cpp INPUT = example.cpp
......
>Test: >Test: "class_test.html"
example a0 "()" example a0 "()"
PROJECT_NAME = "Resolving Defines"
OUTPUT_DIRECTORY = resdefine
GENERATE_LATEX = NO
GENERATE_MAN = NO
INPUT = resdefine.cpp
QUIET = YES
#define ExportedName InternalName
class InternalName
{
public:
InternalName() {}
~InternalName() {}
};
/*! \class ExportedName
* This class's real name is InternalName but everyone should use
* ExportedName.
*/
/*! \fn ExportedName::ExportedName()
* The constructor
*/
/*! \fn ExportedName::~ExportedName()
* The destructor
*/
/*! A template class */ /*! A template class */
template<class T,int i=100> class Test template<class T,int i=100> class Test
{ {
public: public:
Test(); Test();
Test(const Test &); Test(const Test &);
friend void friendTempFunc(Test &, int=5);
}; };
/*! complete specialization */ /*! complete specialization */
...@@ -15,7 +15,7 @@ template<> class Test<void *,200> ...@@ -15,7 +15,7 @@ template<> class Test<void *,200>
}; };
/*! A partial template specialization */ /*! A partial template specialization */
template<class T> class Test< T * > : public Test<void *,200> template<class T> class Test<T *> : public Test<void *,200>
{ {
public: public:
Test(); Test();
...@@ -27,11 +27,9 @@ template<class T,int i> Test<T,i>::Test() {} ...@@ -27,11 +27,9 @@ template<class T,int i> Test<T,i>::Test() {}
/*! The copy constructor */ /*! The copy constructor */
template<class T,int i> Test<T,i>::Test(const Test<T,i> &t) {} template<class T,int i> Test<T,i>::Test(const Test<T,i> &t) {}
/*! A friend function of a template class */ /*! The constructor of the partial specilization */
template<class T,int i> void friendTempFunc(Test<T,i> &t,int a) {} template<class T> Test<T *>::Test() {}
/*! The constructor of the specilization */ /*! The constructor of the specilization */
template<> Test<void *,200>::Test() {} template<> Test<void *,200>::Test() {}
/*! The constructor of the partial specilization */
template<class T> Test<T*>::Test() {}
...@@ -39,6 +39,6 @@ clean: ...@@ -39,6 +39,6 @@ clean:
$(MAKE) -f Makefile.doxysearch clean $(MAKE) -f Makefile.doxysearch clean
-rm -f scanner.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \ -rm -f scanner.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \ ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \
declinfo.cpp defargs.cpp version.cpp declinfo.cpp defargs.cpp
FORCE: FORCE:
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#include "diagram.h" #include "diagram.h"
#include "language.h" #include "language.h"
static QString stripExtension(const char *fName) static QCString stripExtension(const char *fName)
{ {
QString result=fName; QCString result=fName;
if (result.right(5)==".html") result=result.left(result.length()-5); if (result.right(5)==".html") result=result.left(result.length()-5);
return result; return result;
} }
...@@ -47,7 +47,7 @@ ClassDef::ClassDef(const char *nm,CompoundType ct,const char *ref,const char *fN ...@@ -47,7 +47,7 @@ ClassDef::ClassDef(const char *nm,CompoundType ct,const char *ref,const char *fN
fileName="class_"+nameToFile(nm); fileName="class_"+nameToFile(nm);
if (ref) if (ref)
{ {
//url=(QString)"doxygen=\""+ref+":\" href=\""+fileName; //url=(QCString)"doxygen=\""+ref+":\" href=\""+fileName;
exampleList = 0; exampleList = 0;
exampleDict = 0; exampleDict = 0;
} }
...@@ -105,7 +105,7 @@ void ClassDef::insertMember(const MemberDef *md) ...@@ -105,7 +105,7 @@ void ClassDef::insertMember(const MemberDef *md)
//printf("adding %s::%s\n",name(),md->name()); //printf("adding %s::%s\n",name(),md->name());
if (!reference) if (!reference)
{ {
if (md->isRelated() && (extractPrivateFlag || md->protection()!=Private)) if (md->isRelated() && (Config::extractPrivateFlag || md->protection()!=Private))
{ {
related.append(md); related.append(md);
} }
...@@ -152,7 +152,7 @@ void ClassDef::insertMember(const MemberDef *md) ...@@ -152,7 +152,7 @@ void ClassDef::insertMember(const MemberDef *md)
} }
} }
// check if we should add this member in the `all members' list // check if we should add this member in the `all members' list
if (md->isFriend() || md->protection()!=Private || extractPrivateFlag) if (md->isFriend() || md->protection()!=Private || Config::extractPrivateFlag)
{ {
MemberInfo *mi = new MemberInfo((MemberDef *)md,Public,Normal); MemberInfo *mi = new MemberInfo((MemberDef *)md,Public,Normal);
MemberNameInfo *mni=0; MemberNameInfo *mni=0;
...@@ -220,8 +220,8 @@ static void writeInheritanceSpecifier(OutputList &ol,BaseClassDef *bcd) ...@@ -220,8 +220,8 @@ static void writeInheritanceSpecifier(OutputList &ol,BaseClassDef *bcd)
void ClassDef::writeDocumentation(OutputList &ol) void ClassDef::writeDocumentation(OutputList &ol)
{ {
// write title // write title
QString pageTitle=name().copy(); QCString pageTitle=name().copy();
QString pageType; QCString pageType;
switch(compType) switch(compType)
{ {
case Class: pageType=" Class"; break; case Class: pageType=" Class"; break;
...@@ -257,12 +257,12 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -257,12 +257,12 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (incFile) if (incFile)
{ {
QString nm=incName.copy(); QCString nm=incName.copy();
if (incName.isNull()) nm=incFile->name(); if (incName.isNull()) nm=incFile->name();
ol.startTypewriter(); ol.startTypewriter();
ol.docify("#include <"); ol.docify("#include <");
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
if (verbatimHeaderFlag) if (Config::verbatimHeaderFlag)
{ {
ol.writeObjectLink(0,fileName+"-include",0,nm); ol.writeObjectLink(0,fileName+"-include",0,nm);
} }
...@@ -279,9 +279,9 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -279,9 +279,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.newParagraph(); ol.newParagraph();
} }
if (genTagFile.length()>0) tagFile << ">" << name() << ":"; if (Config::genTagFile.length()>0) tagFile << ">" << name() << ":";
if (classDiagramFlag) ol.disableAllBut(OutputGenerator::Man); if (Config::classDiagramFlag) ol.disableAllBut(OutputGenerator::Man);
// write superclasses // write superclasses
int count; int count;
...@@ -289,7 +289,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -289,7 +289,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
{ {
//parseText(ol,theTranslator->trInherits()+" "); //parseText(ol,theTranslator->trInherits()+" ");
QString inheritLine = theTranslator->trInheritsList(inherits->count()); QCString inheritLine = theTranslator->trInheritsList(inherits->count());
QRegExp marker("@[0-9]+"); QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen; int index=0,newIndex,matchLen;
// now replace all markers in inheritLine with links to the classes // now replace all markers in inheritLine with links to the classes
...@@ -304,7 +304,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -304,7 +304,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ClassDef *cd=bcd->classDef; ClassDef *cd=bcd->classDef;
if (cd->hasDocumentation() || cd->isReference()) if (cd->hasDocumentation() || cd->isReference())
{ {
if (genTagFile.length()>0) tagFile << cd->getOutputFileBase() << "?"; if (Config::genTagFile.length()>0) tagFile << cd->getOutputFileBase() << "?";
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()+bcd->templSpecifiers); ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()+bcd->templSpecifiers);
} }
else else
...@@ -320,41 +320,14 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -320,41 +320,14 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
parseText(ol,inheritLine.right(inheritLine.length()-index)); parseText(ol,inheritLine.right(inheritLine.length()-index));
ol.newParagraph(); ol.newParagraph();
#if 0
BaseClassDef *bcd=inherits->first();
while (bcd)
{
ClassDef *cd=bcd->classDef;
if (cd->hasDocumentation() || cd->isReference())
{
if (genTagFile.length()>0) tagFile << cd->classFile() << "?";
ol.writeObjectLink(cd->getReference(),cd->classFile(),0,cd->name()+bcd->templSpecifiers);
}
else
{
ol.docify(cd->name());
}
writeInheritanceSpecifier(ol,bcd);
bcd=inherits->next();
if (bcd)
{
if (inherits->at()==count-1)
parseText(ol," "+theTranslator->trAnd()+" ");
else
ol.writeString(", ");
}
}
ol.writeString(".");
#endif
} }
if (genTagFile.length()>0) tagFile << " \"" << fileName << ".html\"\n"; if (Config::genTagFile.length()>0) tagFile << " \"" << fileName << ".html\"\n";
// write subclasses // write subclasses
if ((count=inheritedBy->count())>0) if ((count=inheritedBy->count())>0)
{ {
QString inheritLine = theTranslator->trInheritedByList(inheritedBy->count()); QCString inheritLine = theTranslator->trInheritedByList(inheritedBy->count());
QRegExp marker("@[0-9]+"); QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen; int index=0,newIndex,matchLen;
// now replace all markers in inheritLine with links to the classes // now replace all markers in inheritLine with links to the classes
...@@ -381,37 +354,9 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -381,37 +354,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
parseText(ol,inheritLine.right(inheritLine.length()-index)); parseText(ol,inheritLine.right(inheritLine.length()-index));
ol.newParagraph(); ol.newParagraph();
#if 0
parseText(ol,theTranslator->trInheritedBy()+" ");
BaseClassDef *bcd=inheritedBy->first();
while (bcd)
{
ClassDef *cd=bcd->classDef;
if (cd->hasDocumentation() || cd->isReference())
{
ol.writeObjectLink(cd->getReference(),cd->classFile(),0,cd->name());
}
else
{
ol.docify(cd->name());
}
writeInheritanceSpecifier(ol,bcd);
bcd=inheritedBy->next();
if (bcd)
{
if (inheritedBy->at()==count-1)
parseText(ol," "+theTranslator->trAnd()+" ");
else
ol.writeString(", ");
}
}
ol.writeString(".");
ol.newParagraph();
#endif
} }
if (classDiagramFlag) ol.enableAll(); if (Config::classDiagramFlag) ol.enableAll();
count=0; count=0;
BaseClassDef *ibcd; BaseClassDef *ibcd;
...@@ -419,23 +364,17 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -419,23 +364,17 @@ void ClassDef::writeDocumentation(OutputList &ol)
while (ibcd) while (ibcd)
{ {
ClassDef *icd=ibcd->classDef; ClassDef *icd=ibcd->classDef;
if (//(icd->protection()!=Private || extractPrivateFlag) && if ( icd->isVisibleExt()) count++;
//(icd->hasDocumentation() || !hideClassFlag || icd->isReference())
icd->isVisibleExt()
) count++;
ibcd=inheritedBy->next(); ibcd=inheritedBy->next();
} }
ibcd=inherits->first(); ibcd=inherits->first();
while (ibcd) while (ibcd)
{ {
ClassDef *icd=ibcd->classDef; ClassDef *icd=ibcd->classDef;
if (//(icd->protection()!=Private || extractPrivateFlag) && if ( icd->isVisibleExt()) count++;
//(icd->hasDocumentation() || !hideClassFlag | icd->isReference())
icd->isVisibleExt()
) count++;
ibcd=inherits->next(); ibcd=inherits->next();
} }
if (classDiagramFlag && count>0) if (Config::classDiagramFlag && count>0)
// write class diagram // write class diagram
{ {
ClassDiagram diagram(this); // create a diagram of this class. ClassDiagram diagram(this); // create a diagram of this class.
...@@ -465,7 +404,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -465,7 +404,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeMemberDecs(ol,this,0,0,theTranslator->trProtectedMembers(),0,&proMembers); writeMemberDecs(ol,this,0,0,theTranslator->trProtectedMembers(),0,&proMembers);
writeMemberDecs(ol,this,0,0,theTranslator->trProtectedSlots(),0,&proSlots); writeMemberDecs(ol,this,0,0,theTranslator->trProtectedSlots(),0,&proSlots);
writeMemberDecs(ol,this,0,0,theTranslator->trStaticProtectedMembers(),0,&proStaticMembers); writeMemberDecs(ol,this,0,0,theTranslator->trStaticProtectedMembers(),0,&proStaticMembers);
if (extractPrivateFlag) if (Config::extractPrivateFlag)
{ {
writeMemberDecs(ol,this,0,0,theTranslator->trPrivateMembers(),0,&priMembers); writeMemberDecs(ol,this,0,0,theTranslator->trPrivateMembers(),0,&priMembers);
writeMemberDecs(ol,this,0,0,theTranslator->trPrivateSlots(),0,&priSlots); writeMemberDecs(ol,this,0,0,theTranslator->trPrivateSlots(),0,&priSlots);
...@@ -491,10 +430,28 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -491,10 +430,28 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription()); parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader(); ol.endGroupHeader();
if (tempArgs) // class is a template
ArgumentList *al=0;
int ti;
ClassDef *pcd=0;
int pi=0;
// find the outer most class scope
while ((ti=name().find("::",pi))!=-1 &&
(pcd=getClass(name().left(ti)))==0
) pi=ti+2;
if (pcd)
{
al=pcd->templateArguments();
}
else
{
al=tempArgs;
}
if (al) // class is a template
{ {
ol.startSubsubsection(); ol.startSubsubsection();
ArgumentList *al=tempArgs;
ol.docify("template<"); ol.docify("template<");
Argument *a=al->first(); Argument *a=al->first();
while (a) while (a)
...@@ -554,7 +511,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -554,7 +511,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
signals.countDocMembers(); signals.countDocMembers();
if ( pubMembers.typedefCount() + proMembers.typedefCount() + if ( pubMembers.typedefCount() + proMembers.typedefCount() +
(extractPrivateFlag ? priMembers.typedefCount() : 0 ) (Config::extractPrivateFlag ? priMembers.typedefCount() : 0 )
) )
{ {
ol.writeRuler(); ol.writeRuler();
...@@ -564,7 +521,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -564,7 +521,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeMemberDocs(ol,&pubMembers,name(),MemberDef::Typedef); writeMemberDocs(ol,&pubMembers,name(),MemberDef::Typedef);
writeMemberDocs(ol,&proMembers,name(),MemberDef::Typedef); writeMemberDocs(ol,&proMembers,name(),MemberDef::Typedef);
if (extractPrivateFlag) if (Config::extractPrivateFlag)
{ {
writeMemberDocs(ol,&priMembers,name(),MemberDef::Typedef); writeMemberDocs(ol,&priMembers,name(),MemberDef::Typedef);
} }
...@@ -572,7 +529,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -572,7 +529,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (pubMembers.enumCount() + if (pubMembers.enumCount() +
proMembers.enumCount() + proMembers.enumCount() +
( extractPrivateFlag ? priMembers.enumCount() : 0 ) ( Config::extractPrivateFlag ? priMembers.enumCount() : 0 )
) )
{ {
ol.writeRuler(); ol.writeRuler();
...@@ -582,7 +539,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -582,7 +539,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeMemberDocs(ol,&pubMembers,name(),MemberDef::Enumeration); writeMemberDocs(ol,&pubMembers,name(),MemberDef::Enumeration);
writeMemberDocs(ol,&proMembers,name(),MemberDef::Enumeration); writeMemberDocs(ol,&proMembers,name(),MemberDef::Enumeration);
if (extractPrivateFlag) if (Config::extractPrivateFlag)
{ {
writeMemberDocs(ol,&priMembers,name(),MemberDef::Enumeration); writeMemberDocs(ol,&priMembers,name(),MemberDef::Enumeration);
} }
...@@ -590,7 +547,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -590,7 +547,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (pubMembers.enumValueCount() + if (pubMembers.enumValueCount() +
proMembers.enumValueCount() + proMembers.enumValueCount() +
( extractPrivateFlag ? priMembers.enumValueCount() : 0 ) ( Config::extractPrivateFlag ? priMembers.enumValueCount() : 0 )
) )
{ {
ol.writeRuler(); ol.writeRuler();
...@@ -600,7 +557,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -600,7 +557,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeMemberDocs(ol,&pubMembers,name(),MemberDef::EnumValue); writeMemberDocs(ol,&pubMembers,name(),MemberDef::EnumValue);
writeMemberDocs(ol,&proMembers,name(),MemberDef::EnumValue); writeMemberDocs(ol,&proMembers,name(),MemberDef::EnumValue);
if (extractPrivateFlag) if (Config::extractPrivateFlag)
{ {
writeMemberDocs(ol,&priMembers,name(),MemberDef::EnumValue); writeMemberDocs(ol,&priMembers,name(),MemberDef::EnumValue);
} }
...@@ -610,7 +567,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -610,7 +567,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
pubStaticMembers.funcCount() + pubStaticMembers.funcCount() +
proMembers.funcCount() + proSlots.funcCount() + proMembers.funcCount() + proSlots.funcCount() +
proStaticMembers.funcCount() + proStaticMembers.funcCount() +
(extractPrivateFlag ? (Config::extractPrivateFlag ?
priMembers.funcCount() + priSlots.funcCount() + priMembers.funcCount() + priSlots.funcCount() +
priStaticMembers.funcCount() : 0 priStaticMembers.funcCount() : 0
) )
...@@ -628,7 +585,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -628,7 +585,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeMemberDocs(ol,&proMembers,name(),MemberDef::Function); writeMemberDocs(ol,&proMembers,name(),MemberDef::Function);
writeMemberDocs(ol,&proSlots,name(),MemberDef::Slot); writeMemberDocs(ol,&proSlots,name(),MemberDef::Slot);
writeMemberDocs(ol,&proStaticMembers,name(),MemberDef::Function); writeMemberDocs(ol,&proStaticMembers,name(),MemberDef::Function);
if (extractPrivateFlag) if (Config::extractPrivateFlag)
{ {
writeMemberDocs(ol,&priMembers,name(),MemberDef::Function); writeMemberDocs(ol,&priMembers,name(),MemberDef::Function);
writeMemberDocs(ol,&priSlots,name(),MemberDef::Slot); writeMemberDocs(ol,&priSlots,name(),MemberDef::Slot);
...@@ -636,7 +593,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -636,7 +593,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
} }
if ( friends.count() + related.count() ) if ( friends.friendCount() + related.count() )
{ {
ol.writeRuler(); ol.writeRuler();
ol.startGroupHeader(); ol.startGroupHeader();
...@@ -649,7 +606,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -649,7 +606,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if ( pubMembers.varCount() + pubStaticMembers.varCount() + if ( pubMembers.varCount() + pubStaticMembers.varCount() +
proMembers.varCount() + proStaticMembers.varCount() + proMembers.varCount() + proStaticMembers.varCount() +
(extractPrivateFlag ? (Config::extractPrivateFlag ?
priMembers.varCount() + priStaticMembers.varCount() : 0 priMembers.varCount() + priStaticMembers.varCount() : 0
) )
) )
...@@ -663,7 +620,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -663,7 +620,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
writeMemberDocs(ol,&pubStaticMembers,name(),MemberDef::Variable); writeMemberDocs(ol,&pubStaticMembers,name(),MemberDef::Variable);
writeMemberDocs(ol,&proMembers,name(),MemberDef::Variable); writeMemberDocs(ol,&proMembers,name(),MemberDef::Variable);
writeMemberDocs(ol,&proStaticMembers,name(),MemberDef::Variable); writeMemberDocs(ol,&proStaticMembers,name(),MemberDef::Variable);
if (extractPrivateFlag) if (Config::extractPrivateFlag)
{ {
writeMemberDocs(ol,&priMembers,name(),MemberDef::Variable); writeMemberDocs(ol,&priMembers,name(),MemberDef::Variable);
writeMemberDocs(ol,&priStaticMembers,name(),MemberDef::Variable); writeMemberDocs(ol,&priStaticMembers,name(),MemberDef::Variable);
...@@ -691,13 +648,13 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -691,13 +648,13 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
ol.writeListItem(); ol.writeListItem();
QString path=fd->getPath().copy(); QCString path=fd->getPath().copy();
if (fullPathNameFlag) if (Config::fullPathNameFlag)
{ {
// strip part of the path // strip part of the path
if (path.left(stripFromPath.length())==stripFromPath) if (path.left(Config::stripFromPath.length())==Config::stripFromPath)
{ {
path=path.right(path.length()-stripFromPath.length()); path=path.right(path.length()-Config::stripFromPath.length());
} }
ol.docify(path); ol.docify(path);
} }
...@@ -723,7 +680,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -723,7 +680,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor()); parseText(ol,theTranslator->trAuthor());
ol.endGroupHeader(); ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(projectName)); parseText(ol,theTranslator->trGeneratedAutomatically(Config::projectName));
ol.enableAll(); ol.enableAll();
endFile(ol); endFile(ol);
...@@ -776,7 +733,7 @@ void ClassDef::writeMemberList(OutputList &ol) ...@@ -776,7 +733,7 @@ void ClassDef::writeMemberList(OutputList &ol)
if (cd && !md->name().isEmpty() && md->name()[0]!='@' && if (cd && !md->name().isEmpty() && md->name()[0]!='@' &&
( (
md->isFriend() || md->isFriend() ||
(mi->prot!=Private && (protect!=Private || extractPrivateFlag)) (mi->prot!=Private && (protect!=Private || Config::extractPrivateFlag))
) )
) )
{ {
...@@ -784,7 +741,7 @@ void ClassDef::writeMemberList(OutputList &ol) ...@@ -784,7 +741,7 @@ void ClassDef::writeMemberList(OutputList &ol)
if (cd->isVisible() && (md->hasDocumentation() || md->isReference())) if (cd->isVisible() && (md->hasDocumentation() || md->isReference()))
// create a link to the documentation // create a link to the documentation
{ {
QString name=mi->ambiguityResolutionScope+md->name(); QCString name=mi->ambiguityResolutionScope+md->name();
ol.writeListItem(); ol.writeListItem();
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(), ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),
md->anchor(),name); md->anchor(),name);
...@@ -801,7 +758,7 @@ void ClassDef::writeMemberList(OutputList &ol) ...@@ -801,7 +758,7 @@ void ClassDef::writeMemberList(OutputList &ol)
ol.writeString("\n"); ol.writeString("\n");
memberWritten=TRUE; memberWritten=TRUE;
} }
else if (!hideMemberFlag) // no documentation, else if (!Config::hideMemberFlag) // no documentation,
// generate link to the class instead. // generate link to the class instead.
{ {
ol.writeListItem(); ol.writeListItem();
...@@ -874,7 +831,7 @@ void ClassDef::writeIncludeFile(OutputList &ol) ...@@ -874,7 +831,7 @@ void ClassDef::writeIncludeFile(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
startFile(ol,fileName+"-include",name()+" Include File"); startFile(ol,fileName+"-include",name()+" Include File");
startTitle(ol); startTitle(ol);
QString n=incName.copy(); QCString n=incName.copy();
if (incName.isNull()) n=incFile->name(); if (incName.isNull()) n=incFile->name();
parseText(ol,n); parseText(ol,n);
endTitle(ol,0); endTitle(ol,0);
...@@ -917,7 +874,7 @@ bool ClassDef::hasExamples() ...@@ -917,7 +874,7 @@ bool ClassDef::hasExamples()
// write the list of all examples that are use this class. // write the list of all examples that are use this class.
void ClassDef::writeExample(OutputList &ol) void ClassDef::writeExample(OutputList &ol)
{ {
QString exampleLine=theTranslator->trWriteList(exampleList->count()); QCString exampleLine=theTranslator->trWriteList(exampleList->count());
QRegExp marker("@[0-9]+"); QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen; int index=0,newIndex,matchLen;
...@@ -970,9 +927,9 @@ void ClassDef::setTemplateArguments(ArgumentList *al) ...@@ -970,9 +927,9 @@ void ClassDef::setTemplateArguments(ArgumentList *al)
} }
} }
QString ClassDef::getTemplateNameString() QCString ClassDef::getTemplateNameString()
{ {
QString result; QCString result;
if (!tempArgs || tempArgs->count()==0) return result; if (!tempArgs || tempArgs->count()==0) return result;
result="<"; result="<";
Argument *a=tempArgs->first(); Argument *a=tempArgs->first();
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
#ifndef CLASSDEF_H #ifndef CLASSDEF_H
#define CLASSDEF_H #define CLASSDEF_H
#include <qstring.h> //#include <qtstream.h>
#include "qtbc.h"
#include <qfileinf.h> #include <qfileinf.h>
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
#include <qtstream.h>
#include <qstrlist.h> #include <qstrlist.h>
#include "membername.h" #include "membername.h"
...@@ -51,8 +51,8 @@ class ClassDef : public Definition ...@@ -51,8 +51,8 @@ class ClassDef : public Definition
ClassDef(const char *name,CompoundType ct,const char *ref=0,const char *fName=0); ClassDef(const char *name,CompoundType ct,const char *ref=0,const char *fName=0);
~ClassDef(); ~ClassDef();
//QString classFile() const { return fileName; } //QCString classFile() const { return fileName; }
QString getOutputFileBase() const { return fileName; } QCString getOutputFileBase() const { return fileName; }
CompoundType compoundType() const { return compType; } CompoundType compoundType() const { return compType; }
const char *memberListFileName() const { return memListFileName; } const char *memberListFileName() const { return memListFileName; }
void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0); void insertBaseClass(ClassDef *,Protection p,Specifier s,const char *t=0);
...@@ -81,34 +81,35 @@ class ClassDef : public Definition ...@@ -81,34 +81,35 @@ class ClassDef : public Definition
Protection protection() const { return prot; } Protection protection() const { return prot; }
bool isVisible() bool isVisible()
{ return !name().isEmpty() && name().at(0)!='@' && { return !name().isEmpty() && name().at(0)!='@' &&
(prot!=Private || extractPrivateFlag) && (prot!=Private || Config::extractPrivateFlag) &&
hasDocumentation(); hasDocumentation();
} }
bool hasNonReferenceSuperClass(); bool hasNonReferenceSuperClass();
bool isVisibleExt() bool isVisibleExt()
{ return (allExtFlag || hasNonReferenceSuperClass()) && { return (Config::allExtFlag || hasNonReferenceSuperClass()) &&
!name().isEmpty() && name().at(0)!='@' && !name().isEmpty() && name().at(0)!='@' &&
(prot!=Private || extractPrivateFlag) && (prot!=Private || Config::extractPrivateFlag) &&
(hasDocumentation() || !hideClassFlag || !reference.isNull()); (hasDocumentation() || !Config::hideClassFlag ||
!reference.isNull());
} }
// template argument functions // template argument functions
ArgumentList *templateArguments() const { return tempArgs; } ArgumentList *templateArguments() const { return tempArgs; }
void setTemplateArguments(ArgumentList *al); void setTemplateArguments(ArgumentList *al);
QString getTemplateNameString(); QCString getTemplateNameString();
void setNamespace(NamespaceDef *nd) { nspace = nd; } void setNamespace(NamespaceDef *nd) { nspace = nd; }
NamespaceDef *getNamespace() { return nspace; } NamespaceDef *getNamespace() { return nspace; }
bool visited; bool visited;
private: private:
//QString name; // name of the class //QCString name; // name of the class
QString fileName; // HTML containing the class docs QCString fileName; // HTML containing the class docs
//QString doc; // general class documentation //QCString doc; // general class documentation
FileDef *incFile; // header file to refer to FileDef *incFile; // header file to refer to
QString incName; // alternative include file name QCString incName; // alternative include file name
//QString brief; // brief class discription //QCString brief; // brief class discription
QString memListFileName; QCString memListFileName;
BaseClassList *inherits; BaseClassList *inherits;
BaseClassList *inheritedBy; BaseClassList *inheritedBy;
NamespaceDef *nspace; // the namespace this class is in NamespaceDef *nspace; // the namespace this class is in
...@@ -128,7 +129,7 @@ class ClassDef : public Definition ...@@ -128,7 +129,7 @@ class ClassDef : public Definition
MemberNameInfoDict *allMemberNameInfoDict; MemberNameInfoDict *allMemberNameInfoDict;
ArgumentList *tempArgs; ArgumentList *tempArgs;
QStrList files; QStrList files;
QString reference; QCString reference;
ExampleList *exampleList; ExampleList *exampleList;
ExampleDict *exampleDict; ExampleDict *exampleDict;
CompoundType compType; CompoundType compType;
...@@ -143,7 +144,7 @@ struct BaseClassDef ...@@ -143,7 +144,7 @@ struct BaseClassDef
ClassDef *classDef; ClassDef *classDef;
Protection prot; Protection prot;
Specifier virt; Specifier virt;
QString templSpecifiers; QCString templSpecifiers;
}; };
class BaseClassList : public QList<BaseClassDef> class BaseClassList : public QList<BaseClassDef>
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
#ifndef CODE_H #ifndef CODE_H
#define CODE_H #define CODE_H
#include "qtbc.h"
#include <stdio.h> #include <stdio.h>
#include <qstring.h>
class OutputList; class OutputList;
extern void parseCode(OutputList &,const char *,const QString &, extern void parseCode(OutputList &,const char *,const QCString &,
bool ,const char *); bool ,const char *);
extern void initParseCodeContext(); extern void initParseCodeContext();
#endif #endif
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <qstring.h> #include "qtbc.h"
#include "scanner.h" #include "scanner.h"
#include "entry.h" #include "entry.h"
#include "doxygen.h" #include "doxygen.h"
...@@ -47,7 +46,7 @@ class CodeClassDef ...@@ -47,7 +46,7 @@ class CodeClassDef
} }
~CodeClassDef() {} ~CodeClassDef() {}
QString name; QCString name;
QStrList bases; QStrList bases;
}; };
...@@ -63,9 +62,9 @@ class CodeVarDef ...@@ -63,9 +62,9 @@ class CodeVarDef
} }
~CodeVarDef() {} ~CodeVarDef() {}
QString name; QCString name;
QString type; QCString type;
QString classScope; QCString classScope;
}; };
typedef QList<CodeClassDef> CodeClassList; typedef QList<CodeClassDef> CodeClassList;
...@@ -91,19 +90,19 @@ static int bracketCount = 0; ...@@ -91,19 +90,19 @@ static int bracketCount = 0;
static int curlyCount = 0; static int curlyCount = 0;
static int sharpCount = 0; static int sharpCount = 0;
static int yyLineNr = 0; static int yyLineNr = 0;
static QString type; static QCString type;
static QString name; static QCString name;
static QString args; static QCString args;
static QString parmType; static QCString parmType;
static QString parmName; static QCString parmName;
static bool inClass; static bool inClass;
static QString classScope; static QCString classScope;
static OutputList *code; static OutputList *code;
static CodeClassDef ccd; static CodeClassDef ccd;
static CodeVarDef cvd; static CodeVarDef cvd;
static bool exampleBlock; static bool exampleBlock;
static QString exampleName; static QCString exampleName;
static QString exampleFile; static QCString exampleFile;
static int anchorCount; static int anchorCount;
static void addType() static void addType()
...@@ -125,9 +124,9 @@ static void addParmType() ...@@ -125,9 +124,9 @@ static void addParmType()
parmName.resize(0) ; parmName.resize(0) ;
} }
static void setClassScope(const QString &name) static void setClassScope(const QCString &name)
{ {
QString n=name; QCString n=name;
n=n.simplifyWhiteSpace(); n=n.simplifyWhiteSpace();
int index; int index;
if ((index=n.find("::"))!=-1) if ((index=n.find("::"))!=-1)
...@@ -165,14 +164,14 @@ static void addParameter() ...@@ -165,14 +164,14 @@ static void addParameter()
static void generateClassLink(OutputList &ol,const char *clName) static void generateClassLink(OutputList &ol,const char *clName)
{ {
QString className=clName; QCString className=clName;
if (className.length()==0) return; if (className.length()==0) return;
ClassDef *cd; ClassDef *cd;
if ((cd=getClass(className)) && cd->isVisible()) if ((cd=getClass(className)) && cd->isVisible())
{ {
if (exampleBlock) if (exampleBlock)
{ {
QString anchor; QCString anchor;
anchor.sprintf("_a%d",anchorCount); anchor.sprintf("_a%d",anchorCount);
//printf("addExampleClass(%s,%s,%s)\n",anchor.data(),exampleName.data(), //printf("addExampleClass(%s,%s,%s)\n",anchor.data(),exampleName.data(),
// exampleFile.data()); // exampleFile.data());
...@@ -200,16 +199,16 @@ static bool getLink(const char *className, ...@@ -200,16 +199,16 @@ static bool getLink(const char *className,
ClassDef *cd; ClassDef *cd;
FileDef *fd; FileDef *fd;
NamespaceDef *nd; NamespaceDef *nd;
QString m=memberName; QCString m=memberName;
QString c=className; QCString c=className;
//printf("Trying `%s'::`%s'\n",c.data(),m.data()); //printf("Trying `%s'::`%s'\n",c.data(),m.data());
if (getDefs(m,c,"()",md,cd,fd,nd) && if (getDefs(c,m,"()",md,cd,fd,nd) &&
(md->hasDocumentation() || md->isReference())) (md->hasDocumentation() || md->isReference()))
{ {
//printf("Found!\n"); //printf("Found!\n");
if (exampleBlock) if (exampleBlock)
{ {
QString anchor; QCString anchor;
anchor.sprintf("a%d",anchorCount); anchor.sprintf("a%d",anchorCount);
//printf("addExampleFile(%s,%s,%s)\n",anchor.data(),exampleName.data(), //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),exampleName.data(),
// exampleFile.data()); // exampleFile.data());
...@@ -339,6 +338,8 @@ static int yyread(char *buf,int max_size) ...@@ -339,6 +338,8 @@ static int yyread(char *buf,int max_size)
ID [a-z_A-Z][a-z_A-Z0-9]* ID [a-z_A-Z][a-z_A-Z0-9]*
%option noyywrap
%x SkipString %x SkipString
%x SkipCPP %x SkipCPP
%x SkipComment %x SkipComment
...@@ -380,7 +381,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -380,7 +381,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
code->codify(yytext); code->codify(yytext);
} }
char c=yyinput(); char c=yyinput();
QString text; QCString text;
text+=c; text+=c;
code->codify(text); code->codify(text);
BEGIN( Body ); BEGIN( Body );
...@@ -663,7 +664,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -663,7 +664,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
} }
<SkipSpecialComment>[ \t]*"*/"[ \t\n]*"\n"/"/*" { <SkipSpecialComment>[ \t]*"*/"[ \t\n]*"\n"/"/*" {
//code->codify("\n"); //code->codify("\n");
QString lineText=yytext; QCString lineText=yytext;
yyLineNr+=lineText.contains('\n'); yyLineNr+=lineText.contains('\n');
BEGIN( lastDContext ) ; BEGIN( lastDContext ) ;
} }
...@@ -700,7 +701,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -700,7 +701,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
code->codify(yytext); code->codify(yytext);
} }
<*>([ \t\n]*"\n"){2,} { // combine multiple blank lines <*>([ \t\n]*"\n"){2,} { // combine multiple blank lines
QString sepLine=yytext; QCString sepLine=yytext;
code->codify("\n\n"); code->codify("\n\n");
yyLineNr+=sepLine.contains('\n'); yyLineNr+=sepLine.contains('\n');
} }
...@@ -723,7 +724,7 @@ void initParseCodeContext() ...@@ -723,7 +724,7 @@ void initParseCodeContext()
anchorCount = 0; anchorCount = 0;
} }
void parseCode(OutputList &ol,const char *className,const QString &s, void parseCode(OutputList &ol,const char *className,const QCString &s,
bool e, const char *exName) bool e, const char *exName)
{ {
code = new OutputList(&ol); code = new OutputList(&ol);
...@@ -752,6 +753,6 @@ void parseCode(OutputList &ol,const char *className,const QString &s, ...@@ -752,6 +753,6 @@ void parseCode(OutputList &ol,const char *className,const QString &s,
} }
extern "C" { // some bogus code to keep the compiler happy extern "C" { // some bogus code to keep the compiler happy
int codeYYwrap() { return 1 ; } // int codeYYwrap() { return 1 ; }
void codeYYdummy() { yy_flex_realloc(0,0); } void codeYYdummy() { yy_flex_realloc(0,0); }
} }
...@@ -17,66 +17,78 @@ ...@@ -17,66 +17,78 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#include <qstring.h> #ifndef DOXYWIZARD
#include "qtbc.h"
#endif
#include <qstrlist.h> #include <qstrlist.h>
#include <qfile.h> #include <qfile.h>
extern void parseConfig(const QString &config); extern void parseConfig(const QCString &config);
extern void writeTemplateConfig(QFile *f,bool shortList); extern void writeTemplateConfig(QFile *f,bool shortList);
extern void checkConfig();
struct Config
{
static void init();
extern QString projectName; // the name of the project static QCString projectName; // the name of the project
extern QString projectNumber; // the number of the project static QCString projectNumber; // the number of the project
extern QString htmlOutputDir; // the directory to put the HTML files static QCString outputDir; // the global output directory
extern QString latexOutputDir; // the directory to put the Latex files static QCString htmlOutputDir; // the directory to put the HTML files
extern QString manOutputDir; // the directory to put the man pages static QCString latexOutputDir; // the directory to put the Latex files
extern QString headerFile; // the name of the personal HTML header static QCString manOutputDir; // the directory to put the man pages
extern QString footerFile; // the name of the personal HTML footer static QCString outputLanguage; // the output language
extern QString cgiName; // the name of the CGI binary static QCString headerFile; // the name of the personal HTML header
extern QString cgiURL; // the absolute URL to the CGI binary static QCString footerFile; // the name of the personal HTML footer
extern QString docURL; // the absolute URL to the documentation static QCString cgiName; // the name of the CGI binary
extern QString binAbsPath; // the absolute path to the doxysearch static QCString cgiURL; // the absolute URL to the CGI binary
extern QString docAbsPath; // the absolute path to the documentation static QCString docURL; // the absolute URL to the documentation
extern QString perlPath; // the absolute path to perl static QCString binAbsPath; // the absolute path to the doxysearch
extern QString genTagFile; // the tag file to generate static QCString docAbsPath; // the absolute path to the documentation
extern QString inputFilter; // a filter command that is applied to input files static QCString perlPath; // the absolute path to perl
extern QString paperType; // the page type to generate docs for static QCString genTagFile; // the tag file to generate
extern QString stripFromPath; // the string to strip from the file path static QCString inputFilter; // a filter command that is applied to input files
extern QString manExtension; // extension the man page files static QCString paperType; // the page type to generate docs for
extern QStrList includePath; // list of include paths static QCString stripFromPath; // the string to strip from the file path
extern QStrList examplePath; // list of example paths static QCString manExtension; // extension the man page files
extern QStrList inputSources; // list of input files static QStrList includePath; // list of include paths
extern QStrList excludeSources; // list of files to exclude from the input static QStrList examplePath; // list of example paths
extern QStrList filePatternList; // list of file patterns static QStrList inputSources; // list of input files
extern QStrList excludePatternList; // list of patterns to exclude from input static QStrList excludeSources; // list of files to exclude from the input
extern QStrList tagFileList; // list of tag files static QStrList filePatternList; // list of file patterns
extern QStrList extDocPathList; // list of external doc. directories. static QStrList excludePatternList; // list of patterns to exclude from input
extern QStrList predefined; // list of predefined macro names. static QStrList tagFileList; // list of tag files
extern QStrList extraPackageList; // list of extra LaTeX packages. static QStrList extDocPathList; // list of external doc. directories.
extern bool quietFlag; // generate progress messages flag static QStrList predefined; // list of predefined macro names.
extern bool warningFlag; // generate warnings flag static QStrList extraPackageList; // list of extra LaTeX packages.
extern bool recursiveFlag; // scan directories recursively static bool quietFlag; // generate progress messages flag
extern bool allExtFlag; // include all external classes flag static bool warningFlag; // generate warnings flag
extern bool searchEngineFlag; // generate search engine flag static bool recursiveFlag; // scan directories recursively
extern bool extractAllFlag; // gererate docs for all classes flag static bool allExtFlag; // include all external classes flag
extern bool extractPrivateFlag; // generate docs for private members flag static bool searchEngineFlag; // generate search engine flag
extern bool noIndexFlag; // generate condensed index flag static bool extractAllFlag; // gererate docs for all classes flag
extern bool generateHtml; // generate HTML output static bool extractPrivateFlag; // generate docs for private members flag
extern bool generateLatex; // generate Latex output static bool noIndexFlag; // generate condensed index flag
extern bool generateMan; // generate Man pages static bool generateHtml; // generate HTML output
extern bool preprocessingFlag; // enable preprocessing static bool generateLatex; // generate Latex output
extern bool briefMemDescFlag; // enable `inline' brief member descr. static bool generateMan; // generate Man pages
extern bool hideMemberFlag; // hide undocumented members. static bool preprocessingFlag; // enable preprocessing
extern bool hideClassFlag; // hide undocumented members. static bool briefMemDescFlag; // enable `inline' brief member descr.
extern bool searchIncludeFlag; // search for included files static bool hideMemberFlag; // hide undocumented members.
extern bool macroExpansionFlag; // expand macros in the source. static bool hideClassFlag; // hide undocumented members.
extern bool onlyPredefinedFlag; // expand only predefined macros static bool searchIncludeFlag; // search for included files
extern bool fullPathNameFlag; // using full path name in output static bool macroExpansionFlag; // expand macros in the source.
extern bool classDiagramFlag; // enable the generation of class diagrams. static bool onlyPredefinedFlag; // expand only predefined macros
extern bool compactLatexFlag; // generate compact LaTeX documentation. static bool fullPathNameFlag; // using full path name in output
extern bool repeatBriefFlag; // repeat brief descriptions. static bool classDiagramFlag; // enable the generation of class diagrams.
extern bool internalDocsFlag; // determines what happens to internal docs. static bool compactLatexFlag; // generate compact LaTeX documentation.
extern bool caseSensitiveNames; // determines if output can be mixed case. static bool repeatBriefFlag; // repeat brief descriptions.
extern bool verbatimHeaderFlag; // enable/disable generation of verb headers. static bool internalDocsFlag; // determines what happens to internal docs.
extern bool htmlAlignMemberFlag; // align members in HTML using tables. static bool caseSensitiveNames; // determines if output can be mixed case.
static bool verbatimHeaderFlag; // enable/disable generation of verb headers.
static bool htmlAlignMemberFlag; // align members in HTML using tables.
static bool includeSourceFlag; // include source code in documentation.
static bool autoBriefFlag; // javadoc comments behaves as Qt comments.
};
#endif #endif
...@@ -24,17 +24,36 @@ ...@@ -24,17 +24,36 @@
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <qstring.h>
#include <qfileinf.h> #include <qfileinf.h>
#include <qdir.h> #include <qdir.h>
#include <qtstream.h> #include <qtstream.h>
#include "doxygen.h"
#include "config.h" #include "config.h"
#include "version.h"
#ifdef DOXYWIZARD
#include <stdarg.h>
void err(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}
void warn(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}
#else
#include "doxygen.h"
#include "message.h" #include "message.h"
#include "pre.h" #include "pre.h"
#include "version.h" #include "version.h"
#include "language.h" #include "language.h"
#endif
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
...@@ -43,62 +62,65 @@ ...@@ -43,62 +62,65 @@
* exported variables * exported variables
*/ */
QString projectName;
QString projectNumber; QCString Config::projectName;
QString outputDir; QCString Config::projectNumber;
QString htmlOutputDir; QCString Config::outputDir;
QString latexOutputDir; QCString Config::htmlOutputDir;
QString manOutputDir; QCString Config::latexOutputDir;
QString headerFile; QCString Config::manOutputDir;
QString footerFile; QCString Config::outputLanguage;
QString cgiName; QCString Config::headerFile;
QString cgiURL; QCString Config::footerFile;
QString docURL; QCString Config::cgiName;
QString binAbsPath; QCString Config::cgiURL;
QString docAbsPath; QCString Config::docURL;
QString perlPath; QCString Config::binAbsPath;
QString genTagFile; QCString Config::docAbsPath;
QString inputFilter; QCString Config::perlPath;
QString paperType; QCString Config::genTagFile;
QString outputLanguage; QCString Config::inputFilter;
QString stripFromPath; QCString Config::paperType;
QString manExtension; QCString Config::stripFromPath;
QStrList includePath; QCString Config::manExtension;
QStrList examplePath; QStrList Config::includePath;
QStrList inputSources; QStrList Config::examplePath;
QStrList excludeSources; QStrList Config::inputSources;
QStrList filePatternList; QStrList Config::excludeSources;
QStrList excludePatternList; QStrList Config::filePatternList;
QStrList tagFileList; QStrList Config::excludePatternList;
QStrList extDocPathList; QStrList Config::tagFileList;
QStrList predefined; QStrList Config::extDocPathList;
QStrList extraPackageList; QStrList Config::predefined;
bool quietFlag = FALSE; QStrList Config::extraPackageList;
bool warningFlag = FALSE; bool Config::quietFlag = FALSE;
bool recursiveFlag = FALSE; bool Config::recursiveFlag = FALSE;
bool allExtFlag = FALSE; bool Config::allExtFlag = FALSE;
bool searchEngineFlag = FALSE; bool Config::searchEngineFlag = FALSE;
bool extractAllFlag = FALSE; bool Config::extractAllFlag = FALSE;
bool extractPrivateFlag = FALSE; bool Config::extractPrivateFlag = FALSE;
bool noIndexFlag = FALSE; bool Config::noIndexFlag = FALSE;
bool hideMemberFlag = FALSE; bool Config::hideMemberFlag = FALSE;
bool hideClassFlag = FALSE; bool Config::hideClassFlag = FALSE;
bool macroExpansionFlag = FALSE; bool Config::macroExpansionFlag = FALSE;
bool onlyPredefinedFlag = FALSE; bool Config::onlyPredefinedFlag = FALSE;
bool fullPathNameFlag = FALSE; bool Config::fullPathNameFlag = FALSE;
bool compactLatexFlag = FALSE; bool Config::compactLatexFlag = FALSE;
bool internalDocsFlag = FALSE; bool Config::internalDocsFlag = FALSE;
bool caseSensitiveNames = FALSE; bool Config::caseSensitiveNames = FALSE;
bool generateHtml = TRUE; bool Config::includeSourceFlag = FALSE;
bool generateLatex = TRUE; bool Config::autoBriefFlag = TRUE;
bool generateMan = TRUE; bool Config::warningFlag = TRUE;
bool preprocessingFlag = TRUE; bool Config::generateHtml = TRUE;
bool briefMemDescFlag = TRUE; bool Config::generateLatex = TRUE;
bool searchIncludeFlag = TRUE; bool Config::generateMan = TRUE;
bool classDiagramFlag = TRUE; bool Config::preprocessingFlag = TRUE;
bool repeatBriefFlag = TRUE; bool Config::briefMemDescFlag = TRUE;
bool verbatimHeaderFlag = TRUE; bool Config::searchIncludeFlag = TRUE;
bool htmlAlignMemberFlag = TRUE; bool Config::classDiagramFlag = TRUE;
bool Config::repeatBriefFlag = TRUE;
bool Config::verbatimHeaderFlag = TRUE;
bool Config::htmlAlignMemberFlag = TRUE;
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
* *
...@@ -108,13 +130,13 @@ bool htmlAlignMemberFlag = TRUE; ...@@ -108,13 +130,13 @@ bool htmlAlignMemberFlag = TRUE;
static const char * inputString; static const char * inputString;
static int inputPosition; static int inputPosition;
static int yyLineNr; static int yyLineNr;
static QString tmpString; static QCString tmpString;
static QString * s=0; static QCString * s=0;
static bool * b=0; static bool * b=0;
static QStrList * l=0; static QStrList * l=0;
static int lastState; static int lastState;
static int lastEnvState; static int lastEnvState;
static QString elemStr; static QCString elemStr;
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
*/ */
...@@ -134,6 +156,8 @@ static int yyread(char *buf,int max_size) ...@@ -134,6 +156,8 @@ static int yyread(char *buf,int max_size)
%} %}
%option noyywrap
%x Start %x Start
%x SkipComment %x SkipComment
%x GetString %x GetString
...@@ -146,62 +170,64 @@ static int yyread(char *buf,int max_size) ...@@ -146,62 +170,64 @@ static int yyread(char *buf,int max_size)
<*>\0x0d <*>\0x0d
<Start,GetString,GetStrList,GetBool>"#" { BEGIN(SkipComment); } <Start,GetString,GetStrList,GetBool>"#" { BEGIN(SkipComment); }
<Start>"PROJECT_NAME"[ \t]*"=" { BEGIN(GetString); s=&projectName; } <Start>"PROJECT_NAME"[ \t]*"=" { BEGIN(GetString); s=&Config::projectName; }
<Start>"PROJECT_NUMBER"[ \t]*"=" { BEGIN(GetString); s=&projectNumber; } <Start>"PROJECT_NUMBER"[ \t]*"=" { BEGIN(GetString); s=&Config::projectNumber; }
<Start>"OUTPUT_DIRECTORY"[ \t]*"=" { BEGIN(GetString); s=&outputDir; } <Start>"OUTPUT_DIRECTORY"[ \t]*"=" { BEGIN(GetString); s=&Config::outputDir; }
<Start>"HTML_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&htmlOutputDir; } <Start>"HTML_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::htmlOutputDir; }
<Start>"MAN_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&manOutputDir; } <Start>"MAN_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::manOutputDir; }
<Start>"LATEX_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&latexOutputDir; } <Start>"LATEX_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::latexOutputDir; }
<Start>"HTML_HEADER"[ \t]*"=" { BEGIN(GetString); s=&headerFile; } <Start>"HTML_HEADER"[ \t]*"=" { BEGIN(GetString); s=&Config::headerFile; }
<Start>"HTML_FOOTER"[ \t]*"=" { BEGIN(GetString); s=&footerFile; } <Start>"HTML_FOOTER"[ \t]*"=" { BEGIN(GetString); s=&Config::footerFile; }
<Start>"CGI_NAME"[ \t]*"=" { BEGIN(GetString); s=&cgiName; } <Start>"CGI_NAME"[ \t]*"=" { BEGIN(GetString); s=&Config::cgiName; }
<Start>"CGI_URL"[ \t]*"=" { BEGIN(GetString); s=&cgiURL; } <Start>"CGI_URL"[ \t]*"=" { BEGIN(GetString); s=&Config::cgiURL; }
<Start>"DOC_URL"[ \t]*"=" { BEGIN(GetString); s=&docURL; } <Start>"DOC_URL"[ \t]*"=" { BEGIN(GetString); s=&Config::docURL; }
<Start>"BIN_ABSPATH"[ \t]*"=" { BEGIN(GetString); s=&binAbsPath; } <Start>"BIN_ABSPATH"[ \t]*"=" { BEGIN(GetString); s=&Config::binAbsPath; }
<Start>"DOC_ABSPATH"[ \t]*"=" { BEGIN(GetString); s=&docAbsPath; } <Start>"DOC_ABSPATH"[ \t]*"=" { BEGIN(GetString); s=&Config::docAbsPath; }
<Start>"PERL_PATH"[ \t]*"=" { BEGIN(GetString); s=&perlPath; } <Start>"PERL_PATH"[ \t]*"=" { BEGIN(GetString); s=&Config::perlPath; }
<Start>"GENERATE_TAGFILE"[ \t]*"=" { BEGIN(GetString); s=&genTagFile; } <Start>"GENERATE_TAGFILE"[ \t]*"=" { BEGIN(GetString); s=&Config::genTagFile; }
<Start>"INPUT_FILTER"[ \t]*"=" { BEGIN(GetString); s=&inputFilter; } <Start>"INPUT_FILTER"[ \t]*"=" { BEGIN(GetString); s=&Config::inputFilter; }
<Start>"PAPER_TYPE"[ \t]*"=" { BEGIN(GetString); s=&paperType; } <Start>"PAPER_TYPE"[ \t]*"=" { BEGIN(GetString); s=&Config::paperType; }
<Start>"OUTPUT_LANGUAGE"[ \t]*"=" { BEGIN(GetString); s=&outputLanguage; } <Start>"OUTPUT_LANGUAGE"[ \t]*"=" { BEGIN(GetString); s=&Config::outputLanguage; }
<Start>"STRIP_FROM_PATH"[ \t]*"=" { BEGIN(GetString); s=&stripFromPath; } <Start>"STRIP_FROM_PATH"[ \t]*"=" { BEGIN(GetString); s=&Config::stripFromPath; }
<Start>"MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&manExtension; } <Start>"MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&Config::manExtension; }
<Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&includePath; elemStr=""; } <Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; elemStr=""; }
<Start>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&examplePath; elemStr=""; } <Start>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::examplePath; elemStr=""; }
<Start>"INPUT"[ \t]*"=" { BEGIN(GetStrList); l=&inputSources; elemStr=""; } <Start>"INPUT"[ \t]*"=" { BEGIN(GetStrList); l=&Config::inputSources; elemStr=""; }
<Start>"EXCLUDE"[ \t]*"=" { BEGIN(GetStrList); l=&excludeSources; elemStr=""; } <Start>"EXCLUDE"[ \t]*"=" { BEGIN(GetStrList); l=&Config::excludeSources; elemStr=""; }
<Start>"FILE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&filePatternList; elemStr=""; } <Start>"FILE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::filePatternList; elemStr=""; }
<Start>"EXCLUDE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&excludePatternList; elemStr=""; } <Start>"EXCLUDE_PATTERNS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::excludePatternList; elemStr=""; }
<Start>"TAGFILES"[ \t]*"=" { BEGIN(GetStrList); l=&tagFileList; elemStr=""; } <Start>"TAGFILES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::tagFileList; elemStr=""; }
<Start>"EXT_DOC_PATHS"[ \t]*"=" { BEGIN(GetStrList); l=&extDocPathList; elemStr=""; } <Start>"EXT_DOC_PATHS"[ \t]*"=" { BEGIN(GetStrList); l=&Config::extDocPathList; elemStr=""; }
<Start>"PREDEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&predefined; elemStr=""; } <Start>"PREDEFINED"[ \t]*"=" { BEGIN(GetStrList); l=&Config::predefined; elemStr=""; }
<Start>"EXTRA_PACKAGES"[ \t]*"=" { BEGIN(GetStrList); l=&extraPackageList; elemStr=""; } <Start>"EXTRA_PACKAGES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::extraPackageList; elemStr=""; }
<Start>"QUIET"[ \t]*"=" { BEGIN(GetBool); b=&quietFlag; } <Start>"QUIET"[ \t]*"=" { BEGIN(GetBool); b=&Config::quietFlag; }
<Start>"WARNINGS"[ \t]*"=" { BEGIN(GetBool); b=&warningFlag; } <Start>"WARNINGS"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningFlag; }
<Start>"RECURSIVE"[ \t]*"=" { BEGIN(GetBool); b=&recursiveFlag; } <Start>"RECURSIVE"[ \t]*"=" { BEGIN(GetBool); b=&Config::recursiveFlag; }
<Start>"ALLEXTERNALS"[ \t]*"=" { BEGIN(GetBool); b=&allExtFlag; } <Start>"ALLEXTERNALS"[ \t]*"=" { BEGIN(GetBool); b=&Config::allExtFlag; }
<Start>"SEARCHENGINE"[ \t]*"=" { BEGIN(GetBool); b=&searchEngineFlag; } <Start>"SEARCHENGINE"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchEngineFlag; }
<Start>"EXTRACT_ALL"[ \t]*"=" { BEGIN(GetBool); b=&extractAllFlag; } <Start>"EXTRACT_ALL"[ \t]*"=" { BEGIN(GetBool); b=&Config::extractAllFlag; }
<Start>"EXTRACT_PRIVATE"[ \t]*"=" { BEGIN(GetBool); b=&extractPrivateFlag; } <Start>"EXTRACT_PRIVATE"[ \t]*"=" { BEGIN(GetBool); b=&Config::extractPrivateFlag; }
<Start>"DISABLE_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&noIndexFlag; } <Start>"DISABLE_INDEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::noIndexFlag; }
<Start>"GENERATE_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&generateLatex; } <Start>"GENERATE_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateLatex; }
<Start>"GENERATE_HTML"[ \t]*"=" { BEGIN(GetBool); b=&generateHtml; } <Start>"GENERATE_HTML"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateHtml; }
<Start>"GENERATE_MAN"[ \t]*"=" { BEGIN(GetBool); b=&generateMan; } <Start>"GENERATE_MAN"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateMan; }
<Start>"ENABLE_PREPROCESSING"[ \t]*"=" { BEGIN(GetBool); b=&preprocessingFlag; } <Start>"ENABLE_PREPROCESSING"[ \t]*"=" { BEGIN(GetBool); b=&Config::preprocessingFlag; }
<Start>"MACRO_EXPANSION"[ \t]*"=" { BEGIN(GetBool); b=&macroExpansionFlag; } <Start>"MACRO_EXPANSION"[ \t]*"=" { BEGIN(GetBool); b=&Config::macroExpansionFlag; }
<Start>"SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&searchIncludeFlag; } <Start>"SEARCH_INCLUDES"[ \t]*"=" { BEGIN(GetBool); b=&Config::searchIncludeFlag; }
<Start>"BRIEF_MEMBER_DESC"[ \t]*"=" { BEGIN(GetBool); b=&briefMemDescFlag; } <Start>"BRIEF_MEMBER_DESC"[ \t]*"=" { BEGIN(GetBool); b=&Config::briefMemDescFlag; }
<Start>"HIDE_UNDOC_MEMBERS"[ \t]*"=" { BEGIN(GetBool); b=&hideMemberFlag; } <Start>"HIDE_UNDOC_MEMBERS"[ \t]*"=" { BEGIN(GetBool); b=&Config::hideMemberFlag; }
<Start>"HIDE_UNDOC_CLASSES"[ \t]*"=" { BEGIN(GetBool); b=&hideClassFlag; } <Start>"HIDE_UNDOC_CLASSES"[ \t]*"=" { BEGIN(GetBool); b=&Config::hideClassFlag; }
<Start>"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&onlyPredefinedFlag; } <Start>"EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; }
<Start>"FULL_PATH_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&fullPathNameFlag; } <Start>"FULL_PATH_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&Config::fullPathNameFlag; }
<Start>"CLASS_DIAGRAMS"[ \t]*"=" { BEGIN(GetBool); b=&classDiagramFlag; } <Start>"CLASS_DIAGRAMS"[ \t]*"=" { BEGIN(GetBool); b=&Config::classDiagramFlag; }
<Start>"COMPACT_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&compactLatexFlag; } <Start>"COMPACT_LATEX"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactLatexFlag; }
<Start>"REPEAT_BRIEF"[ \t]*"=" { BEGIN(GetBool); b=&repeatBriefFlag; } <Start>"REPEAT_BRIEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::repeatBriefFlag; }
<Start>"INTERNAL_DOCS"[ \t]*"=" { BEGIN(GetBool); b=&internalDocsFlag; } <Start>"INTERNAL_DOCS"[ \t]*"=" { BEGIN(GetBool); b=&Config::internalDocsFlag; }
<Start>"CASE_SENSE_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&caseSensitiveNames; } <Start>"CASE_SENSE_NAMES"[ \t]*"=" { BEGIN(GetBool); b=&Config::caseSensitiveNames; }
<Start>"VERBATIM_HEADERS"[ \t]*"=" { BEGIN(GetBool); b=&verbatimHeaderFlag; } <Start>"VERBATIM_HEADERS"[ \t]*"=" { BEGIN(GetBool); b=&Config::verbatimHeaderFlag; }
<Start>"HTML_ALIGN_MEMBERS"[ \t]*"=" { BEGIN(GetBool); b=&htmlAlignMemberFlag; } <Start>"HTML_ALIGN_MEMBERS"[ \t]*"=" { BEGIN(GetBool); b=&Config::htmlAlignMemberFlag; }
<Start>"SOURCE_BROWSER"[ \t]*"=" { BEGIN(GetBool); b=&Config::includeSourceFlag; }
<Start>"JAVADOC_AUTOBRIEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::autoBriefFlag; }
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); } <Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); } <GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n { <GetStrList>\n {
...@@ -258,7 +284,7 @@ static int yyread(char *buf,int max_size) ...@@ -258,7 +284,7 @@ static int yyread(char *buf,int max_size)
} }
<GetQuotedString>. { tmpString+=*yytext; } <GetQuotedString>. { tmpString+=*yytext; }
<GetBool>[a-zA-Z]+ { <GetBool>[a-zA-Z]+ {
QString bs=yytext; QCString bs=yytext;
bs=bs.upper(); bs=bs.upper();
if (bs=="YES") if (bs=="YES")
*b=TRUE; *b=TRUE;
...@@ -272,11 +298,6 @@ static int yyread(char *buf,int max_size) ...@@ -272,11 +298,6 @@ static int yyread(char *buf,int max_size)
bs.data(),yyLineNr); bs.data(),yyLineNr);
} }
} }
/*
<GetStrList>[a-z_A-Z.*:?~0-9/\\\-]+ {
elemStr+=yytext;
}
*/
<GetStrList>[^ \#\"\$\t\r\n]+ { <GetStrList>[^ \#\"\$\t\r\n]+ {
elemStr+=yytext; elemStr+=yytext;
} }
...@@ -294,56 +315,122 @@ static int yyread(char *buf,int max_size) ...@@ -294,56 +315,122 @@ static int yyread(char *buf,int max_size)
void dumpConfig() void dumpConfig()
{ {
printf("projectName=`%s'\n",projectName.data()); printf("projectName=`%s'\n",Config::projectName.data());
printf("outputDir=`%s'\n", outputDir.data()); printf("outputDir=`%s'\n", Config::outputDir.data());
printf("headerFile=`%s'\n", headerFile.data()); printf("headerFile=`%s'\n", Config::headerFile.data());
printf("footerFile=`%s'\n", footerFile.data()); printf("footerFile=`%s'\n", Config::footerFile.data());
char *ip=includePath.first(); char *ip=Config::includePath.first();
while (ip) while (ip)
{ {
printf("includePath=`%s'\n",ip); printf("includePath=`%s'\n",ip);
ip=includePath.next(); ip=Config::includePath.next();
} }
printf("quiet=`%d'\n", quietFlag); printf("quiet=`%d'\n", Config::quietFlag);
printf("warnings=`%d'\n", warningFlag); printf("warnings=`%d'\n", Config::warningFlag);
char *is=inputSources.first(); char *is=Config::inputSources.first();
while (is) while (is)
{ {
printf("inputSources=`%s'\n",is); printf("inputSources=`%s'\n",is);
is=inputSources.next(); is=Config::inputSources.next();
} }
char *fp=filePatternList.first(); char *fp=Config::filePatternList.first();
while (fp) while (fp)
{ {
printf("filePattern=`%s'\n",fp); printf("filePattern=`%s'\n",fp);
fp=filePatternList.next(); fp=Config::filePatternList.next();
} }
printf("recusive=`%d'\n",recursiveFlag); printf("recusive=`%d'\n",Config::recursiveFlag);
printf("inputFilter=`%s'\n",inputFilter.data()); printf("inputFilter=`%s'\n",Config::inputFilter.data());
char *tf=tagFileList.first(); char *tf=Config::tagFileList.first();
while (tf) while (tf)
{ {
printf("tagFile=`%s'\n",tf); printf("tagFile=`%s'\n",tf);
tf=tagFileList.next(); tf=Config::tagFileList.next();
} }
printf("allExternals=`%d'\n",allExtFlag); printf("allExternals=`%d'\n",Config::allExtFlag);
printf("searchEngine=`%d'\n",searchEngineFlag); printf("searchEngine=`%d'\n",Config::searchEngineFlag);
printf("cgiName=`%s'\n",cgiName.data()); printf("cgiName=`%s'\n",Config::cgiName.data());
printf("cgiURL=`%s'\n",cgiURL.data()); printf("cgiURL=`%s'\n",Config::cgiURL.data());
printf("docURL=`%s'\n",docURL.data()); printf("docURL=`%s'\n",Config::docURL.data());
printf("binAbsPath=`%s'\n",binAbsPath.data()); printf("binAbsPath=`%s'\n",Config::binAbsPath.data());
char *ed=extDocPathList.first(); char *ed=Config::extDocPathList.first();
while (ed) while (ed)
{ {
printf("binAbsPathFile=`%s'\n",ed); printf("binAbsPathFile=`%s'\n",ed);
ed=extDocPathList.next(); ed=Config::extDocPathList.next();
} }
} }
void Config::init()
{
Config::projectName.resize(0);
Config::projectNumber.resize(0);
Config::outputDir.resize(0);
Config::htmlOutputDir = "html";
Config::latexOutputDir ="latex";
Config::manOutputDir ="man";
Config::outputLanguage = "English";
Config::headerFile.resize(0);
Config::footerFile.resize(0);
Config::cgiName = "search.cgi";
Config::cgiURL.resize(0);
Config::docURL.resize(0);
Config::binAbsPath = "/usr/local/bin/";
Config::docAbsPath.resize(0);
Config::perlPath = "/usr/bin/perl";
Config::genTagFile.resize(0);
Config::inputFilter.resize(0);
Config::paperType = "a4wide";
Config::stripFromPath.resize(0);
Config::manExtension = ".3";
Config::includePath.clear();
Config::examplePath.clear();
Config::inputSources.clear();
Config::excludeSources.clear();
Config::filePatternList.clear();
Config::excludePatternList.clear();
Config::tagFileList.clear();
Config::extDocPathList.clear();
Config::predefined.clear();
Config::extraPackageList.clear();
Config::quietFlag = FALSE;
Config::recursiveFlag = FALSE;
Config::allExtFlag = FALSE;
Config::searchEngineFlag = FALSE;
Config::extractAllFlag = FALSE;
Config::extractPrivateFlag = FALSE;
Config::noIndexFlag = FALSE;
Config::hideMemberFlag = FALSE;
Config::hideClassFlag = FALSE;
Config::macroExpansionFlag = FALSE;
Config::onlyPredefinedFlag = FALSE;
Config::fullPathNameFlag = FALSE;
Config::compactLatexFlag = FALSE;
Config::internalDocsFlag = FALSE;
Config::caseSensitiveNames = FALSE;
Config::includeSourceFlag = FALSE;
Config::warningFlag = TRUE;
Config::generateHtml = TRUE;
Config::generateLatex = TRUE;
Config::generateMan = TRUE;
Config::preprocessingFlag = TRUE;
Config::briefMemDescFlag = TRUE;
Config::searchIncludeFlag = TRUE;
Config::classDiagramFlag = TRUE;
Config::repeatBriefFlag = TRUE;
Config::verbatimHeaderFlag = TRUE;
Config::htmlAlignMemberFlag = TRUE;
Config::autoBriefFlag = TRUE;
}
void writeTemplateConfig(QFile *f,bool sl) void writeTemplateConfig(QFile *f,bool sl)
{ {
QTextStream t(f); QTextStream t(f);
#ifdef DOXYWIZARD
t << "# Doxygen configuration generated by Doxywizard version " << versionString << endl;
#else
t << "# Doxyfile " << versionString << endl; t << "# Doxyfile " << versionString << endl;
#endif
if (!sl) if (!sl)
{ {
t << "# This file describes the settings to be used by doxygen for a project\n"; t << "# This file describes the settings to be used by doxygen for a project\n";
...@@ -387,7 +474,8 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -387,7 +474,8 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n"; t << "# The OUTPUT_LANGUAGE tag is used to specify the language in which all\n";
t << "# documentation generated by doxygen is written. Doxygen will use this\n"; t << "# documentation generated by doxygen is written. Doxygen will use this\n";
t << "# information to generate all constant output in the proper language.\n"; t << "# information to generate all constant output in the proper language.\n";
t << "# The default language is English, other supported languages are: Dutch\n"; t << "# The default language is English, other supported languages are: \n";
t << "# Dutch, French, Italian, Czech, Swedish, German and Japanese\n";
t << "\n"; t << "\n";
} }
t << "OUTPUT_LANGUAGE = English\n"; t << "OUTPUT_LANGUAGE = English\n";
...@@ -516,17 +604,36 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -516,17 +604,36 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# supports case sensitive file names.\n"; t << "# supports case sensitive file names.\n";
t << "\n"; t << "\n";
} }
t << "SOURCE_BROWSER = NO\n";
if (!sl)
{
t << "\n";
t << "# If the SOURCE_BROWSER tag is set to YES than the body of a member or\n";
t << "# function will be appended as a block of code to the documentation of.\n";
t << "# that member or function.\n";
t << "\n";
}
t << "CASE_SENSE_NAMES = NO\n"; t << "CASE_SENSE_NAMES = NO\n";
if (!sl) if (!sl)
{ {
t << "\n"; t << "\n";
t << "# If the VERBATIM_HEADERS tag is set the YES (the default) then Doxygen\n"; t << "# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen\n";
t << "# will generate a verbatim copy of the header file for each class for\n"; t << "# will generate a verbatim copy of the header file for each class for\n";
t << "# which an include is specified. Set to NO to disable this.\n"; t << "# which an include is specified. Set to NO to disable this.\n";
t << "\n"; t << "\n";
} }
t << "VERBATIM_HEADERS = YES\n"; t << "VERBATIM_HEADERS = YES\n";
if (!sl) if (!sl)
{
t << "\n";
t << "# If the JAVADOC_NO_AUTOBRIEF is set to YES (the default) then Doxygen\n";
t << "# will interpret the first line (until the first dot) of a JavaDoc-style\n";
t << "# comment as the brief description. If set to NO, the Javadoc-style will\n";
t << "# behave just like the Qt-style comments.\n";
t << "\n";
}
t << "JAVADOC_AUTOBRIEF = YES\n";
if (!sl)
{ {
t << "\n"; t << "\n";
t << "#---------------------------------------------------------------------------\n"; t << "#---------------------------------------------------------------------------\n";
...@@ -817,7 +924,7 @@ void writeTemplateConfig(QFile *f,bool sl) ...@@ -817,7 +924,7 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "# interpreter (i.e. the result of `which perl').\n"; t << "# interpreter (i.e. the result of `which perl').\n";
t << "\n"; t << "\n";
} }
t << "PERL_PATH = /usr/local/bin/perl\n"; t << "PERL_PATH = /usr/bin/perl\n";
if (!sl) if (!sl)
{ {
t << "\n"; t << "\n";
...@@ -893,147 +1000,154 @@ void checkConfig() ...@@ -893,147 +1000,154 @@ void checkConfig()
//} //}
// set default man page extension if non is given by the user // set default man page extension if non is given by the user
if (manExtension.isEmpty()) if (Config::manExtension.isEmpty())
{ {
manExtension=".3"; Config::manExtension=".3";
} }
paperType = paperType.lower().stripWhiteSpace(); Config::paperType = Config::paperType.lower().stripWhiteSpace();
if (paperType.isEmpty()) if (Config::paperType.isEmpty())
{ {
paperType = "a4wide"; Config::paperType = "a4wide";
} }
if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" && if (Config::paperType!="a4" && Config::paperType!="a4wide" && Config::paperType!="letter" &&
paperType!="legal" && paperType!="executive") Config::paperType!="legal" && Config::paperType!="executive")
{ {
err("Error: Unknown page type specified"); err("Error: Unknown page type specified");
} }
outputLanguage=outputLanguage.stripWhiteSpace(); Config::outputLanguage=Config::outputLanguage.stripWhiteSpace();
if (outputLanguage.isEmpty()) if (Config::outputLanguage.isEmpty())
{ {
Config::outputLanguage = "English";
#ifndef DOXYWIZARD
setTranslator("English"); setTranslator("English");
#endif
} }
else else
{ {
if (!setTranslator(outputLanguage)) #ifndef DOXYWIZARD
if (!setTranslator(Config::outputLanguage))
{ {
err("Error: Output language %s not supported! Using english instead.\n", err("Error: Output language %s not supported! Using English instead.\n",
outputLanguage.data()); Config::outputLanguage.data());
} }
#endif
} }
// Test to see if output directory is valid // Test to see if output directory is valid
if (outputDir.isEmpty()) if (Config::outputDir.isEmpty())
outputDir=QDir::currentDirPath(); Config::outputDir=QDir::currentDirPath();
else else
{ {
QDir dir(outputDir); QDir dir(Config::outputDir);
if (!dir.exists()) if (!dir.exists())
{ {
dir.setPath(QDir::currentDirPath()); dir.setPath(QDir::currentDirPath());
if (!dir.mkdir(outputDir)) if (!dir.mkdir(Config::outputDir))
{ {
err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not " err("Error: tag OUTPUT_DIRECTORY: Output directory `%s' does not "
"exist and cannot be created\n",outputDir.data()); "exist and cannot be created\n",Config::outputDir.data());
exit(1); exit(1);
} }
else if (!quietFlag) else if (!Config::quietFlag)
{ {
err("Notice: Output directory `%s' does not exist. " err("Notice: Output directory `%s' does not exist. "
"I have created it for you.\n", outputDir.data()); "I have created it for you.\n", Config::outputDir.data());
} }
dir.cd(outputDir); dir.cd(Config::outputDir);
} }
outputDir=dir.absPath(); Config::outputDir=dir.absPath();
} }
if (htmlOutputDir.isEmpty() && generateHtml) if (Config::htmlOutputDir.isEmpty() && Config::generateHtml)
{ {
htmlOutputDir=outputDir+"/html"; Config::htmlOutputDir=Config::outputDir+"/html";
} }
else if (htmlOutputDir && htmlOutputDir[0]!='/') else if (Config::htmlOutputDir && Config::htmlOutputDir[0]!='/')
{ {
htmlOutputDir.prepend(outputDir+'/'); Config::htmlOutputDir.prepend(Config::outputDir+'/');
} }
QDir htmlDir(htmlOutputDir); QDir htmlDir(Config::htmlOutputDir);
if (!htmlDir.exists() && !htmlDir.mkdir(htmlOutputDir)) if (!htmlDir.exists() && !htmlDir.mkdir(Config::htmlOutputDir))
{ {
err("Could not create output directory %s\n",htmlOutputDir.data()); err("Could not create output directory %s\n",Config::htmlOutputDir.data());
exit(1); exit(1);
} }
if (latexOutputDir.isEmpty() && generateLatex) if (Config::latexOutputDir.isEmpty() && Config::generateLatex)
{ {
latexOutputDir=outputDir+"/latex"; Config::latexOutputDir=Config::outputDir+"/latex";
} }
else if (latexOutputDir && latexOutputDir[0]!='/') else if (Config::latexOutputDir && Config::latexOutputDir[0]!='/')
{ {
latexOutputDir.prepend(outputDir+'/'); Config::latexOutputDir.prepend(Config::outputDir+'/');
} }
QDir latexDir(latexOutputDir); QDir latexDir(Config::latexOutputDir);
if (!latexDir.exists() && !latexDir.mkdir(latexOutputDir)) if (!latexDir.exists() && !latexDir.mkdir(Config::latexOutputDir))
{ {
err("Could not create output directory %s\n",latexOutputDir.data()); err("Could not create output directory %s\n",Config::latexOutputDir.data());
exit(1); exit(1);
} }
if (manOutputDir.isEmpty() && generateMan) if (Config::manOutputDir.isEmpty() && Config::generateMan)
{ {
manOutputDir=outputDir+"/man"; Config::manOutputDir=Config::outputDir+"/man";
} }
else if (manOutputDir && manOutputDir[0]!='/') else if (Config::manOutputDir && Config::manOutputDir[0]!='/')
{ {
manOutputDir.prepend(outputDir+'/'); Config::manOutputDir.prepend(Config::outputDir+'/');
} }
QDir manDir(manOutputDir); QDir manDir(Config::manOutputDir);
if (!manDir.exists() && !manDir.mkdir(manOutputDir)) if (!manDir.exists() && !manDir.mkdir(Config::manOutputDir))
{ {
err("Could not create output directory %s\n",manOutputDir.data()); err("Could not create output directory %s\n",Config::manOutputDir.data());
exit(1); exit(1);
} }
// Test to see if HTML header is valid // Test to see if HTML header is valid
if (headerFile.length()>0) if (Config::headerFile.length()>0)
{ {
QFileInfo fi(headerFile); QFileInfo fi(Config::headerFile);
if (!fi.exists()) if (!fi.exists())
{ {
err("Error: tag HTML_HEADER: header file `%s' " err("Error: tag HTML_HEADER: header file `%s' "
"does not exist\n",headerFile.data()); "does not exist\n",Config::headerFile.data());
exit(1); exit(1);
} }
} }
// Test to see if HTML footer is valid // Test to see if HTML footer is valid
if (footerFile.length()>0) if (Config::footerFile.length()>0)
{ {
QFileInfo fi(footerFile); QFileInfo fi(Config::footerFile);
if (!fi.exists()) if (!fi.exists())
{ {
err("Error: tag HTML_FOOTER: footer file `%s' " err("Error: tag HTML_FOOTER: footer file `%s' "
"does not exist\n",footerFile.data()); "does not exist\n",Config::footerFile.data());
exit(1); exit(1);
} }
} }
// check include path // check include path
char *s=includePath.first(); char *s=Config::includePath.first();
while (s) while (s)
{ {
QFileInfo fi(s); QFileInfo fi(s);
if (!fi.exists()) err("Warning: tag INCLUDE_PATH: include path `%s' " if (!fi.exists()) err("Warning: tag INCLUDE_PATH: include path `%s' "
"does not exist\n",s); "does not exist\n",s);
#ifndef DOXYWIZARD
addSearchDir(fi.absFilePath()); addSearchDir(fi.absFilePath());
s=includePath.next(); #endif
s=Config::includePath.next();
} }
// check input // check input
if (inputSources.count()==0) if (Config::inputSources.count()==0)
{ {
err("Error: tag INPUT: no input files specified after the INPUT tag.\n"); err("Error: tag INPUT: no input files specified after the INPUT tag.\n");
exit(1); exit(1);
} }
else else
{ {
s=inputSources.first(); s=Config::inputSources.first();
while (s) while (s)
{ {
QFileInfo fi(s); QFileInfo fi(s);
...@@ -1042,89 +1156,105 @@ void checkConfig() ...@@ -1042,89 +1156,105 @@ void checkConfig()
err("Error: tag INPUT: input source `%s' does not exist\n",s); err("Error: tag INPUT: input source `%s' does not exist\n",s);
exit(1); exit(1);
} }
s=inputSources.next(); s=Config::inputSources.next();
} }
} }
// add default pattern if needed // add default pattern if needed
if (filePatternList.count()==0) if (Config::filePatternList.count()==0)
{ {
filePatternList.append("*"); Config::filePatternList.append("*");
} }
// more checks needed if and only if the search engine is enabled. // more checks needed if and only if the search engine is enabled.
if (searchEngineFlag) if (Config::searchEngineFlag)
{ {
// check cgi name // check cgi name
if (cgiName.length()==0) if (Config::cgiName.length()==0)
{ {
err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n"); err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n");
exit(1); exit(1);
} }
// check cgi URL // check cgi URL
if (cgiURL.length()==0) if (Config::cgiURL.length()==0)
{ {
err("Error: tag CGI_URL: no URL to cgi directory specified.\n"); err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
exit(1); exit(1);
} }
else if (cgiURL.left(7)!="http://") else if (Config::cgiURL.left(7)!="http://")
{ {
err("Error: tag CGI_URL: URL to cgi directory is invalid (must " err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
"start with http://).\n"); "start with http://).\n");
exit(1); exit(1);
} }
// check documentation URL // check documentation URL
if (docURL.length()==0) if (Config::docURL.length()==0)
{ {
docURL = outputDir.copy().prepend("file://").append("html"); Config::docURL = Config::outputDir.copy().prepend("file://").append("html");
} }
else if (docURL.left(7)!="http://" && docURL.left(7)!="file://") else if (Config::docURL.left(7)!="http://" && Config::docURL.left(7)!="file://")
{ {
err("Error: tag DOC_URL: URL to documentation is invalid or " err("Error: tag DOC_URL: URL to documentation is invalid or "
"not absolute.\n"); "not absolute.\n");
exit(1); exit(1);
} }
// check absolute documentation path // check absolute documentation path
if (docAbsPath.length()==0) if (Config::docAbsPath.length()==0)
{ {
docAbsPath = outputDir+"/html"; Config::docAbsPath = Config::outputDir+"/html";
} }
else if (docAbsPath && docAbsPath[0]!='/') else if (Config::docAbsPath[0]!='/' && Config::docAbsPath[1]!=':')
{ {
err("Error: tag DOC_ABSPATH: path is not absolute\n"); err("Error: tag DOC_ABSPATH: path is not absolute!\n");
exit(1); exit(1);
} }
// check path to doxysearch // check path to doxysearch
if (binAbsPath.length()==0) if (Config::binAbsPath.length()==0)
{ {
err("Error: tag BIN_ABSPATH: no absolute path to doxysearch " err("Error: tag BIN_ABSPATH: no absolute path to doxysearch "
"specified.\n"); "specified.\n");
exit(1); exit(1);
} }
else else if (Config::binAbsPath[0]!='/' && Config::binAbsPath[1]!=':')
{ {
if (binAbsPath && binAbsPath[0]!='/') err("Error: tag BIN_ABSPATH: path is not absolute!\n");
{ exit(1);
err("Error: tag BIN_ABSPATH: path is not absolute "
"(must start with /).\n");
exit(1);
}
} }
// check perl path // check perl path
if (perlPath.length()==0) bool found=FALSE;
if (Config::perlPath.length()==0)
{ {
perlPath="/usr/local/bin/perl"; QFileInfo fi;
fi.setFile("/usr/bin/perl");
if (fi.exists())
{
Config::perlPath="/usr/bin/perl";
found=TRUE;
}
else
{
fi.setFile("/usr/local/bin/perl");
if (fi.exists())
{
Config::perlPath="/usr/local/bin/perl";
found=TRUE;
}
}
} }
QFileInfo fi(perlPath); if (!found)
if (!fi.exists())
{ {
err("Error: tag PERL_PATH: perl interpreter not found at `%s'\n", QFileInfo fi(Config::perlPath);
perlPath.data()); if (!fi.exists())
exit(1); {
warn("Warning: tag PERL_PATH: perl interpreter not found at default or"
"user specified (%s) location\n",
Config::perlPath.data());
}
} }
} }
} }
void parseConfig(const QString &s) void parseConfig(const QCString &s)
{ {
inputString = s; inputString = s;
inputPosition = 0; inputPosition = 0;
...@@ -1132,9 +1262,8 @@ void parseConfig(const QString &s) ...@@ -1132,9 +1262,8 @@ void parseConfig(const QString &s)
configYYrestart( configYYin ); configYYrestart( configYYin );
BEGIN( Start ); BEGIN( Start );
configYYlex(); configYYlex();
checkConfig();
} }
extern "C" { // some bogus code to keep the compiler happy //extern "C" { // some bogus code to keep the compiler happy
int configYYwrap() { return 1 ; } // int configYYwrap() { return 1 ; }
} //}
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
#ifndef _CONSTEXP_H #ifndef _CONSTEXP_H
#define _CONSTEXP_H #define _CONSTEXP_H
#include <qstring.h> #include "qtbc.h"
#include "cppvalue.h" #include "cppvalue.h"
extern bool parseCppExpression(const QString &s); extern bool parseCppExpression(const QCString &s);
extern int cppExpYYparse(); extern int cppExpYYparse();
extern int cppExpYYdebug; extern int cppExpYYdebug;
extern QString strToken; extern QCString strToken;
extern CPPValue resultValue; extern CPPValue resultValue;
#endif #endif
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#define YY_NO_UNPUT #define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
QString strToken; QCString strToken;
static const char *inputString; static const char *inputString;
static int inputPosition; static int inputPosition;
...@@ -94,7 +94,7 @@ static int yyread(char *buf,int max_size) ...@@ -94,7 +94,7 @@ static int yyread(char *buf,int max_size)
%% %%
bool parseCppExpression(const QString &s) bool parseCppExpression(const QCString &s)
{ {
//printf("Expression: `%s'\n",s.data()); //printf("Expression: `%s'\n",s.data());
inputString = s; inputString = s;
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
* *
*/ */
#include "debug.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <qstring.h>
#include "qtbc.h"
#include "debug.h"
Debug::DebugMask Debug::curMask = Debug::Quiet; Debug::DebugMask Debug::curMask = Debug::Quiet;
int Debug::curPrio = 0; int Debug::curPrio = 0;
...@@ -35,7 +36,7 @@ void Debug::print(DebugMask mask,int prio,const char *fmt,...) ...@@ -35,7 +36,7 @@ void Debug::print(DebugMask mask,int prio,const char *fmt,...)
static int labelToEnumValue(const char *l) static int labelToEnumValue(const char *l)
{ {
QString label=l; QCString label=l;
if (label=="FindMembers") if (label=="FindMembers")
return Debug::FindMembers; return Debug::FindMembers;
else if (label=="Functions") else if (label=="Functions")
......
...@@ -17,16 +17,16 @@ ...@@ -17,16 +17,16 @@
#ifndef DECLINFO_H #ifndef DECLINFO_H
#define DECLINFO_H #define DECLINFO_H
#include "qtbc.h"
#include <stdio.h> #include <stdio.h>
#include <qstring.h>
extern void parseFuncDecl(const QString &decl, extern void parseFuncDecl(const QCString &decl,
QString &clName, QCString &clName,
QString &classTempList, QCString &classTempList,
QString &type, QCString &type,
QString &name, QCString &name,
QString &args, QCString &args,
QString &funcTempList, QCString &funcTempList,
QString &exceptions QCString &exceptions
); );
#endif #endif
...@@ -37,18 +37,18 @@ ...@@ -37,18 +37,18 @@
static const char * inputString; static const char * inputString;
static int inputPosition; static int inputPosition;
static QString scope; static QCString scope;
static QString className; static QCString className;
static QString classTempList; static QCString classTempList;
static QString funcTempList; static QCString funcTempList;
static QString type; static QCString type;
static QString name; static QCString name;
static QString args; static QCString args;
static QString tmpType; static QCString tmpType;
static int sharpCount; static int sharpCount;
static bool classTempListFound; static bool classTempListFound;
static bool funcTempListFound; static bool funcTempListFound;
static QString exceptionString; static QCString exceptionString;
static void addType() static void addType()
{ {
...@@ -95,6 +95,8 @@ static int yyread(char *buf,int max_size) ...@@ -95,6 +95,8 @@ static int yyread(char *buf,int max_size)
B [ \t] B [ \t]
ID [a-z_A-Z][a-z_A-Z0-9]* ID [a-z_A-Z][a-z_A-Z0-9]*
%option noyywrap
%x Start %x Start
%x Template %x Template
%x ReadArgs %x ReadArgs
...@@ -198,8 +200,8 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -198,8 +200,8 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
/*@ ---------------------------------------------------------------------------- /*@ ----------------------------------------------------------------------------
*/ */
void parseFuncDecl(const QString &decl,QString &cl,QString &ctl,QString &t, void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t,
QString &n,QString &a,QString &ftl,QString &exc) QCString &n,QCString &a,QCString &ftl,QCString &exc)
{ {
inputString = decl; inputString = decl;
//printf("Input=`%s'\n",inputString); //printf("Input=`%s'\n",inputString);
...@@ -221,17 +223,18 @@ void parseFuncDecl(const QString &decl,QString &cl,QString &ctl,QString &t, ...@@ -221,17 +223,18 @@ void parseFuncDecl(const QString &decl,QString &cl,QString &ctl,QString &t,
declinfoYYlex(); declinfoYYlex();
cl=scope.copy(); cl=scope.copy();
int i; int il,ir;
if ((i=cl.find('<'))!=-1) // split up scope and template arguments if ((il=cl.find('<'))!=-1 && (ir=cl.findRev('>'))!=-1) // split up scope and template arguments
{ {
ctl=removeRedundantWhiteSpace(cl.right(cl.length()-i)); if (ir==-1) ir=cl.length(); else ir++;
cl=cl.left(i); ctl=removeRedundantWhiteSpace(cl.mid(il,ir-il));
cl=cl.left(il)+cl.right(cl.length()-ir);
} }
n=removeRedundantWhiteSpace(name); n=removeRedundantWhiteSpace(name);
if ((i=n.find('<'))!=-1 && n.left(8)!="operator") if ((il=n.find('<'))!=-1 && n.left(8)!="operator")
{ {
ftl=removeRedundantWhiteSpace(n.right(n.length()-i)); ftl=removeRedundantWhiteSpace(n.right(n.length()-il));
n=n.left(i); n=n.left(il);
} }
//ctl=classTempList.copy(); //ctl=classTempList.copy();
...@@ -253,20 +256,20 @@ void parseFuncDecl(const QString &decl,QString &cl,QString &ctl,QString &t, ...@@ -253,20 +256,20 @@ void parseFuncDecl(const QString &decl,QString &cl,QString &ctl,QString &t,
} }
extern "C" { // some bogus code to keep the compiler happy //extern "C" { // some bogus code to keep the compiler happy
int declinfoYYwrap() { return 1 ; } // int declinfoYYwrap() { return 1 ; }
void declinfoYYdummy() { yy_flex_realloc(0,0); } // void declinfoYYdummy() { yy_flex_realloc(0,0); }
} //}
#if 0 #if 0
void dumpDecl(const char *s) void dumpDecl(const char *s)
{ {
QString className; QCString className;
QString classTNames; QCString classTNames;
QString type; QCString type;
QString name; QCString name;
QString args; QCString args;
QString funcTNames; QCString funcTNames;
printf("-----------------------------------------\n"); printf("-----------------------------------------\n");
parseFuncDecl(s,className,classTNames,type,name,args,funcTNames); parseFuncDecl(s,className,classTNames,type,name,args,funcTNames);
printf("type=`%s' class=`%s' classTempl=`%s' name=`%s' " printf("type=`%s' class=`%s' classTempl=`%s' name=`%s' "
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#ifndef DEFARGS_H #ifndef DEFARGS_H
#define DEFARGS_H #define DEFARGS_H
#include "qtbc.h"
#include <stdio.h> #include <stdio.h>
#include <qstring.h>
class ArgumentList; class ArgumentList;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
/* /*
* includes * includes
*/ */
#include "qtbc.h"
#include <stdio.h> #include <stdio.h>
#include <iostream.h> #include <iostream.h>
#include <assert.h> #include <assert.h>
...@@ -40,10 +41,10 @@ ...@@ -40,10 +41,10 @@
static const char *inputString; static const char *inputString;
static int inputPosition; static int inputPosition;
static ArgumentList *argList; static ArgumentList *argList;
static QString *copyArgValue; static QCString *copyArgValue;
static QString curArgTypeName; static QCString curArgTypeName;
static QString curArgDefValue; static QCString curArgDefValue;
static QString curArgName; static QCString curArgName;
static int argRoundCount; static int argRoundCount;
static int argSharpCount; static int argSharpCount;
static int argCurlyCount; static int argCurlyCount;
...@@ -72,6 +73,8 @@ static int yyread(char *buf,int max_size) ...@@ -72,6 +73,8 @@ static int yyread(char *buf,int max_size)
B [ \t] B [ \t]
ID [a-z_A-Z][a-z_A-Z0-9]* ID [a-z_A-Z][a-z_A-Z0-9]*
%option noyywrap
%x Start %x Start
%x CopyArgString %x CopyArgString
%x CopyArgRound %x CopyArgRound
...@@ -239,7 +242,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -239,7 +242,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
} }
} }
<ReadFuncArgType,ReadFuncArgPtr>{ID} { <ReadFuncArgType,ReadFuncArgPtr>{ID} {
QString name=yytext; //resolveDefines(yytext); QCString name=yytext; //resolveDefines(yytext);
//printf("resolveName `%s'->`%s'\n",yytext,name.data()); //printf("resolveName `%s'->`%s'\n",yytext,name.data());
curArgTypeName+=name; curArgTypeName+=name;
} }
...@@ -250,7 +253,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -250,7 +253,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
curArgDefValue+=*yytext; curArgDefValue+=*yytext;
} }
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>{ID} { <CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>{ID} {
QString name=yytext; //resolveDefines(yytext); QCString name=yytext; //resolveDefines(yytext);
*copyArgValue+=name; *copyArgValue+=name;
} }
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>. { <CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>. {
...@@ -293,6 +296,6 @@ void stringToArgumentList(const char *argsString,ArgumentList* &al) ...@@ -293,6 +296,6 @@ void stringToArgumentList(const char *argsString,ArgumentList* &al)
} }
extern "C" { // some bogus code to keep the compiler happy extern "C" { // some bogus code to keep the compiler happy
int defargsYYwrap() { return 1 ; } // int defargsYYwrap() { return 1 ; }
void defargsYYdummy() { yy_flex_realloc(0,0); } void defargsYYdummy() { yy_flex_realloc(0,0); }
} }
...@@ -39,5 +39,5 @@ Define::~Define() ...@@ -39,5 +39,5 @@ Define::~Define()
bool Define::hasDocumentation() bool Define::hasDocumentation()
{ {
return definition && (doc || extractAllFlag); return definition && (doc || Config::extractAllFlag);
} }
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#ifndef DEFINE_H #ifndef DEFINE_H
#define DEFINE_H #define DEFINE_H
#include "qtbc.h"
#include <qdict.h> #include <qdict.h>
#include <qstring.h>
#include "util.h" #include "util.h"
class FileDef; class FileDef;
...@@ -30,13 +30,13 @@ class Define ...@@ -30,13 +30,13 @@ class Define
Define(const Define &d); Define(const Define &d);
~Define(); ~Define();
bool hasDocumentation(); bool hasDocumentation();
QString name; QCString name;
QString definition; QCString definition;
QString fileName; QCString fileName;
QString doc; QCString doc;
QString brief; QCString brief;
QString args; QCString args;
QString anchor; QCString anchor;
FileDef *fileDef; FileDef *fileDef;
int lineNr; int lineNr;
int nargs; int nargs;
...@@ -67,7 +67,7 @@ class DefineName : public QList<Define> ...@@ -67,7 +67,7 @@ class DefineName : public QList<Define>
} }
private: private:
QString name; QCString name;
}; };
class DefineNameList : public QList<DefineName> class DefineNameList : public QList<DefineName>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
* *
*/ */
#include "qtbc.h"
#include <ctype.h> #include <ctype.h>
#include "definition.h" #include "definition.h"
#include "doxygen.h" #include "doxygen.h"
...@@ -28,23 +29,23 @@ Definition::~Definition() ...@@ -28,23 +29,23 @@ Definition::~Definition()
delete sectionList; delete sectionList;
} }
QString Definition::nameToFile(const char *name) QCString Definition::nameToFile(const char *name)
{ {
QString result; QCString result;
char c; char c;
const char *p=name; const char *p=name;
while ((c=*p++)!=0) while ((c=*p++)!=0)
{ {
switch(c) switch(c)
{ {
case ':': break; case ':': result+="_"; break;
case '<': result+="_lt"; break; case '<': result+="_lt"; break;
case '>': result+="_gt"; break; case '>': result+="_gt"; break;
case '*': result+="_ast"; break; case '*': result+="_ast"; break;
case '&': result+="_amp"; break; case '&': result+="_amp"; break;
case ' ': break; case ' ': break;
default: default:
if (caseSensitiveNames) if (Config::caseSensitiveNames)
result+=c; result+=c;
else else
result+=tolower(c); result+=tolower(c);
...@@ -54,10 +55,10 @@ QString Definition::nameToFile(const char *name) ...@@ -54,10 +55,10 @@ QString Definition::nameToFile(const char *name)
return result; return result;
} }
void Definition::addSectionsToDefinition(QList<QString> *anchorList) void Definition::addSectionsToDefinition(QList<QCString> *anchorList)
{ {
if (!anchorList) return; if (!anchorList) return;
QString *s=anchorList->first(); QCString *s=anchorList->first();
while (s) while (s)
{ {
SectionInfo *si=0; SectionInfo *si=0;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef DEFINITION_H #ifndef DEFINITION_H
#define DEFINITION_H #define DEFINITION_H
#include <qstring.h> #include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include "config.h" #include "config.h"
#include "section.h" #include "section.h"
...@@ -31,13 +31,13 @@ class Definition ...@@ -31,13 +31,13 @@ class Definition
//! destroys the definition //! destroys the definition
virtual ~Definition(); virtual ~Definition();
//! returns the name of the definition //! returns the name of the definition
QString name() const { return n; } QCString name() const { return n; }
//! returns the base name of the output file that contains this definition. //! returns the base name of the output file that contains this definition.
virtual QString getOutputFileBase() const = 0; virtual QCString getOutputFileBase() const = 0;
//! returns the detailed description of this definition //! returns the detailed description of this definition
QString documentation() const { return doc; } QCString documentation() const { return doc; }
//! returns the brief description of this definition //! returns the brief description of this definition
QString briefDescription() const { return brief; } QCString briefDescription() const { return brief; }
//! sets a new name for the definition //! sets a new name for the definition
void setName(const char *name) { n=name; } void setName(const char *name) { n=name; }
//! sets the documentation of this definition //! sets the documentation of this definition
...@@ -54,16 +54,16 @@ class Definition ...@@ -54,16 +54,16 @@ class Definition
brief.at(bl-1)!='?') brief+='.'; brief.at(bl-1)!='?') brief+='.';
} }
//! returns TRUE iff the definition is documented //! returns TRUE iff the definition is documented
bool hasDocumentation() virtual bool hasDocumentation()
{ return !doc.isNull() || !brief.isNull() || extractAllFlag; } { return !doc.isNull() || !brief.isNull() || Config::extractAllFlag; }
QString nameToFile(const char *name); QCString nameToFile(const char *name);
void addSectionsToDefinition(QList<QString> *anchorList); void addSectionsToDefinition(QList<QCString> *anchorList);
private: private:
QString n; // name of the definition QCString n; // name of the definition
QString brief; // brief description QCString brief; // brief description
QString doc; // detailed description QCString doc; // detailed description
SectionList *sectionList; // list of all sections SectionList *sectionList; // list of all sections
}; };
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
* *
*/ */
#include "qtbc.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <qlist.h> #include <qlist.h>
#include <qstring.h>
#include <qarray.h> #include <qarray.h>
#include <qtstream.h> #include <qtstream.h>
#include <qfile.h> #include <qfile.h>
...@@ -43,9 +43,9 @@ const uint labelVertSpacing = 32; // vertical distance between labels ...@@ -43,9 +43,9 @@ const uint labelVertSpacing = 32; // vertical distance between labels
const uint labelHorMargin = 6; // horiz. spacing between label and box const uint labelHorMargin = 6; // horiz. spacing between label and box
const uint fontHeight = 12; // height of a character const uint fontHeight = 12; // height of a character
//static QString escapeLatex(const char *s) //static QCString escapeLatex(const char *s)
//{ //{
// QString result; // QCString result;
// char c; // char c;
// while ((c=*s++)) // while ((c=*s++))
// { // {
...@@ -77,7 +77,7 @@ static uint protToColor(Protection p) ...@@ -77,7 +77,7 @@ static uint protToColor(Protection p)
return 0; return 0;
} }
static QString protToString(Protection p) static QCString protToString(Protection p)
{ {
switch(p) switch(p)
{ {
...@@ -180,12 +180,12 @@ DiagramItem::~DiagramItem() ...@@ -180,12 +180,12 @@ DiagramItem::~DiagramItem()
delete children; delete children;
} }
QString DiagramItem::label() const QCString DiagramItem::label() const
{ {
return classDef->name()+templSpec; return classDef->name()+templSpec;
} }
QString DiagramItem::fileName() const QCString DiagramItem::fileName() const
{ {
return classDef->getOutputFileBase(); return classDef->getOutputFileBase();
} }
...@@ -960,10 +960,10 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path, ...@@ -960,10 +960,10 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
//printf("writeFigure rows=%d cols=%d\n",rows,cols); //printf("writeFigure rows=%d cols=%d\n",rows,cols);
QFile f1((QString)path+"/"+fileName+".eps"); QFile f1((QCString)path+"/"+fileName+".eps");
if (!f1.open(IO_WriteOnly)) if (!f1.open(IO_WriteOnly))
{ {
err("Could not open file %s for writing\n",f1.name()); err("Could not open file %s for writing\n",convertToQCString(f1.name()).data());
exit(1); exit(1);
} }
QTextStream t(&f1); QTextStream t(&f1);
...@@ -1229,7 +1229,7 @@ void ClassDiagram::writeImageMap(QTextStream &t,const char *path, ...@@ -1229,7 +1229,7 @@ void ClassDiagram::writeImageMap(QTextStream &t,const char *path,
base->drawConnectors(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight); base->drawConnectors(t,&image,TRUE,TRUE,baseRows,superRows,cellWidth,cellHeight);
super->drawConnectors(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight); super->drawConnectors(t,&image,FALSE,TRUE,baseRows,superRows,cellWidth,cellHeight);
image.save((QString)path+"/"+fileName+".gif"); image.save((QCString)path+"/"+fileName+".gif");
t << "</MAP></P>" << endl; t << "</MAP></P>" << endl;
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
* *
*/ */
#include "qtbc.h"
#include "entry.h" #include "entry.h"
class ClassDef; class ClassDef;
...@@ -30,8 +31,8 @@ class DiagramItem ...@@ -30,8 +31,8 @@ class DiagramItem
DiagramItem(DiagramItem *p,int number,ClassDef *cd, DiagramItem(DiagramItem *p,int number,ClassDef *cd,
Protection prot,Specifier virt,const char *ts); Protection prot,Specifier virt,const char *ts);
~DiagramItem(); ~DiagramItem();
QString label() const; QCString label() const;
QString fileName() const; QCString fileName() const;
DiagramItem *parentItem() { return parent; } DiagramItem *parentItem() { return parent; }
DiagramItemList *getChildren() { return children; } DiagramItemList *getChildren() { return children; }
void move(int dx,int dy) { x+=dx; y+=dy; } void move(int dx,int dy) { x+=dx; y+=dy; }
...@@ -53,7 +54,7 @@ class DiagramItem ...@@ -53,7 +54,7 @@ class DiagramItem
int num; int num;
Protection prot; Protection prot;
Specifier virt; Specifier virt;
QString templSpec; QCString templSpec;
bool inList; bool inList;
ClassDef *classDef; ClassDef *classDef;
}; };
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
*/ */
#include <qstring.h> #include "qtbc.h"
#include <qfileinf.h> #include <qfileinf.h>
#include <qfile.h> #include <qfile.h>
#include <qdir.h> #include <qdir.h>
...@@ -109,6 +109,7 @@ QTextStream tagFile; ...@@ -109,6 +109,7 @@ QTextStream tagFile;
void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
bool over_load); bool over_load);
const char idMask[] = "[A-Za-z_][A-Za-z_0-9]*";
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Returns the standard string that is generated when the \overload // Returns the standard string that is generated when the \overload
...@@ -166,8 +167,8 @@ void buildGroupList(Entry *root) ...@@ -166,8 +167,8 @@ void buildGroupList(Entry *root)
// //
// if ((gd=groupDict[root->name])) // if ((gd=groupDict[root->name]))
// { // {
// QListIterator<QString> sli(*root->groups); // QListIterator<QCString> sli(*root->groups);
// QString *s; // QCString *s;
// for (;(s=sli.current());++sli) // for (;(s=sli.current());++sli)
// { // {
// GroupDef *pgd; // GroupDef *pgd;
...@@ -192,7 +193,7 @@ void buildGroupList(Entry *root) ...@@ -192,7 +193,7 @@ void buildGroupList(Entry *root)
void buildFileList(Entry *root) void buildFileList(Entry *root)
{ {
if (((root->section==Entry::FILEDOC_SEC) || if (((root->section==Entry::FILEDOC_SEC) ||
((root->section & Entry::FILE_MASK) && extractAllFlag)) && ((root->section & Entry::FILE_MASK) && Config::extractAllFlag)) &&
root->name.length()>0 root->name.length()>0
) )
{ {
...@@ -212,8 +213,8 @@ void buildFileList(Entry *root) ...@@ -212,8 +213,8 @@ void buildFileList(Entry *root)
fd->setDocumentation(root->doc); fd->setDocumentation(root->doc);
fd->setBriefDescription(root->brief); fd->setBriefDescription(root->brief);
fd->addSectionsToDefinition(root->anchors); fd->addSectionsToDefinition(root->anchors);
QListIterator<QString> sli(*root->groups); QListIterator<QCString> sli(*root->groups);
QString *s; QCString *s;
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
...@@ -307,11 +308,11 @@ void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root) ...@@ -307,11 +308,11 @@ void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
/*! Input is a scopeName, output is the scopename split into a /*! Input is a scopeName, output is the scopename split into a
* namespace part (as large as possible) and a classname part. * namespace part (as large as possible) and a classname part.
*/ */
void extractNamespaceName(const QString &scopeName, void extractNamespaceName(const QCString &scopeName,
QString &className,QString &namespaceName) QCString &className,QCString &namespaceName)
{ {
QString clName=scopeName.copy(); QCString clName=scopeName.copy();
QString nsName; QCString nsName;
if (clName.length()>0 && namespaceDict[clName]) if (clName.length()>0 && namespaceDict[clName])
{ // the whole name is a namespace { // the whole name is a namespace
namespaceName=clName.copy(); namespaceName=clName.copy();
...@@ -346,7 +347,9 @@ static bool addNamespace(Entry *root,ClassDef *cd) ...@@ -346,7 +347,9 @@ static bool addNamespace(Entry *root,ClassDef *cd)
if (e->section==Entry::NAMESPACE_SEC) if (e->section==Entry::NAMESPACE_SEC)
{ {
NamespaceDef *nd=0; NamespaceDef *nd=0;
if (!e->name.isEmpty() && (nd=namespaceDict[e->name])) if (!e->name.isEmpty() && e->name.at(0)!='@' &&
(nd=namespaceDict[e->name])
)
{ {
cd->setNamespace(nd); cd->setNamespace(nd);
nd->insertClass(cd); nd->insertClass(cd);
...@@ -359,6 +362,7 @@ static bool addNamespace(Entry *root,ClassDef *cd) ...@@ -359,6 +362,7 @@ static bool addNamespace(Entry *root,ClassDef *cd)
return FALSE; return FALSE;
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// build a list of all classes mentioned in the documentation // build a list of all classes mentioned in the documentation
// and all classes that have a documentation block before their definition. // and all classes that have a documentation block before their definition.
...@@ -370,7 +374,7 @@ void buildClassList(Entry *root) ...@@ -370,7 +374,7 @@ void buildClassList(Entry *root)
root->name.length()>0 root->name.length()>0
) )
{ {
QString fullName=root->name.copy(); QCString fullName=root->name.copy();
if (fullName.length()==0) if (fullName.length()==0)
{ {
// this should not be called // this should not be called
...@@ -379,19 +383,7 @@ void buildClassList(Entry *root) ...@@ -379,19 +383,7 @@ void buildClassList(Entry *root)
} }
else else
{ {
//QString className; fullName=stripAnnonymousScope(fullName);
//QString namespaceName;
//extractNamespaceName(fullName,className,namespaceName);
//printf("Found class %s in %s at line %d\n",fullName.data(),
// root->fileName.data(),root->startLine);
// add class name substitution entry iff the class name is alterned by a
// define. This is needed to properly document Qt's template classes
// (although, it's quite general)
//if (resolveDefines(fullName)!=fullName)
//{
// substituteDict.insert(resolveDefines(fullName),new QString(fullName));
//}
bool ambig; bool ambig;
ClassDef *cd; ClassDef *cd;
...@@ -427,13 +419,7 @@ void buildClassList(Entry *root) ...@@ -427,13 +419,7 @@ void buildClassList(Entry *root)
} }
addNamespace(root,cd); addNamespace(root,cd);
} }
else if (fullName[0]!='@' /* && else // new class
(root->doc.length()>0 ||
root->brief.length()>0 ||
extractAllFlag
)*/
)
// new class
{ {
ClassDef::CompoundType sec=ClassDef::Class; ClassDef::CompoundType sec=ClassDef::Class;
switch(root->section) switch(root->section)
...@@ -448,13 +434,12 @@ void buildClassList(Entry *root) ...@@ -448,13 +434,12 @@ void buildClassList(Entry *root)
ClassDef *cd=new ClassDef(fullName,sec); ClassDef *cd=new ClassDef(fullName,sec);
cd->setDocumentation(root->doc); // copy docs to definition cd->setDocumentation(root->doc); // copy docs to definition
cd->setBriefDescription(root->brief); cd->setBriefDescription(root->brief);
//printf("new ClassDef tempArgList=%p\n",root->tArgList);
cd->setTemplateArguments(root->tArgList); cd->setTemplateArguments(root->tArgList);
cd->setProtection(root->protection); cd->setProtection(root->protection);
cd->addSectionsToDefinition(root->anchors); cd->addSectionsToDefinition(root->anchors);
QListIterator<QString> sli(*root->groups); QListIterator<QCString> sli(*root->groups);
QString *s; QCString *s;
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
...@@ -475,7 +460,7 @@ void buildClassList(Entry *root) ...@@ -475,7 +460,7 @@ void buildClassList(Entry *root)
// if the class is not in a namespace then we insert // if the class is not in a namespace then we insert
// it in the file definition // it in the file definition
if (!found && ifd) ifd->insertClass(cd); if (!found && ifd) ifd->insertClass(cd);
// the empty string test is needed for extract all case // the empty string test is needed for extract all case
cd->setBriefDescription(root->brief); cd->setBriefDescription(root->brief);
cd->insertUsedFile(root->fileName); cd->insertUsedFile(root->fileName);
...@@ -506,7 +491,7 @@ void buildNamespaceList(Entry *root) ...@@ -506,7 +491,7 @@ void buildNamespaceList(Entry *root)
root->name.length()>0 root->name.length()>0
) )
{ {
QString fullName=root->name.copy(); QCString fullName=root->name.copy();
if (fullName.length()==0) if (fullName.length()==0)
{ {
// this should not be called // this should not be called
...@@ -549,7 +534,7 @@ void buildNamespaceList(Entry *root) ...@@ -549,7 +534,7 @@ void buildNamespaceList(Entry *root)
} }
else /* if (root->doc.length()>0 || else /* if (root->doc.length()>0 ||
root->brief.length()>0 || root->brief.length()>0 ||
extractAllFlag Config::extractAllFlag
) )
*/ */
{ {
...@@ -558,8 +543,8 @@ void buildNamespaceList(Entry *root) ...@@ -558,8 +543,8 @@ void buildNamespaceList(Entry *root)
nd->setBriefDescription(root->brief); nd->setBriefDescription(root->brief);
nd->addSectionsToDefinition(root->anchors); nd->addSectionsToDefinition(root->anchors);
QListIterator<QString> sli(*root->groups); QListIterator<QCString> sli(*root->groups);
QString *s; QCString *s;
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
GroupDef *gd=0; GroupDef *gd=0;
...@@ -645,35 +630,29 @@ void buildVarList(Entry *root) ...@@ -645,35 +630,29 @@ void buildVarList(Entry *root)
} }
} }
QString scope,name=root->name.copy(); QCString scope,name=root->name.copy();
bool stat=root->stat; bool stat=root->stat;
ClassDef *cd=0;
Entry *p = root->parent; Entry *p = root->parent;
while ((p->section & Entry::COMPOUND_MASK) || while ((p->section & Entry::SCOPE_MASK))
p->section==Entry::NAMESPACE_SEC)
{ {
if (p->name.length()>0 && p->name[0]!='@') QCString scopeName = stripAnnonymousScope(p->name);
if (!scopeName.isEmpty())
{ {
if (!scope.isEmpty()) scope.prepend("::"); scope.prepend(scopeName);
scope.prepend(p->name);
break; break;
} }
//if (p->name.length()>0 && p->name[0]!='@')
//{
// if (!scope.isEmpty()) scope.prepend("::");
// scope.prepend(p->name);
// break;
//}
p=p->parent; p=p->parent;
} }
//printf("scope=%s\n",scope.data()); //printf("scope=%s\n",scope.data());
int ni; int ni;
#if 0
if ((ni=root->name.findRev("::"))!=-1)
{
if (scope.length()>0) scope+="::";
scope+=root->name.left(ni);
name=root->name.right(root->name.length()-ni-2);
stat=TRUE;
}
#endif
if ((ni=root->name.findRev("::"))!=-1) goto nextMember; if ((ni=root->name.findRev("::"))!=-1) goto nextMember;
/* skip this member, because it is a /* skip this member, because it is a
* static variable definition (always?), which will be * static variable definition (always?), which will be
...@@ -684,7 +663,7 @@ void buildVarList(Entry *root) ...@@ -684,7 +663,7 @@ void buildVarList(Entry *root)
MemberDef::MemberType mtype; MemberDef::MemberType mtype;
// NamespaceDef *nd = 0; // NamespaceDef *nd = 0;
QString type=root->type.stripWhiteSpace(); QCString type=root->type.stripWhiteSpace();
if (type=="@") if (type=="@")
mtype=MemberDef::EnumValue; mtype=MemberDef::EnumValue;
else if (type.left(8)=="typedef ") else if (type.left(8)=="typedef ")
...@@ -694,6 +673,7 @@ void buildVarList(Entry *root) ...@@ -694,6 +673,7 @@ void buildVarList(Entry *root)
else else
mtype=MemberDef::Variable; mtype=MemberDef::Variable;
ClassDef *cd=0;
if (scope.length()>0 && name.length()>0 && (cd=getClass(scope))) if (scope.length()>0 && name.length()>0 && (cd=getClass(scope)))
{ {
...@@ -712,7 +692,7 @@ void buildVarList(Entry *root) ...@@ -712,7 +692,7 @@ void buildVarList(Entry *root)
// scope+=cd->getTemplateNameString(); // scope+=cd->getTemplateNameString();
//} //}
// generate member definition. // generate member definition.
QString def; QCString def;
if (root->type.length()>0) if (root->type.length()>0)
{ {
if (mtype==MemberDef::Friend) if (mtype==MemberDef::Friend)
...@@ -743,23 +723,6 @@ void buildVarList(Entry *root) ...@@ -743,23 +723,6 @@ void buildVarList(Entry *root)
if (md->memberClass()==cd) // member already in the scope if (md->memberClass()==cd) // member already in the scope
{ {
addMemberDocs(root,md,def,FALSE); addMemberDocs(root,md,def,FALSE);
#if 0
// always trust the most protected scope, so adjust if needed
// This is needed to properly place static private variables,
// which are defined in a `public' scope.
printf("Checking protection level\n");
if (root->protection==Private || md->protection()!=Private)
{
printf("Set to private\n");
md->setProtection(Private);
}
else if (root->protection==Protected && md->protection()==Public)
{
printf("Set to protected\n");
md->setProtection(Protected);
}
#endif
found=TRUE; found=TRUE;
} }
md=mn->next(); md=mn->next();
...@@ -802,56 +765,6 @@ void buildVarList(Entry *root) ...@@ -802,56 +765,6 @@ void buildVarList(Entry *root)
cd->insertUsedFile(root->fileName); cd->insertUsedFile(root->fileName);
} }
} }
#if 0
else if (scope.length()>0 && name.length()>0 && (nd=namespaceDict[scope]))
{
Debug::print(Debug::Variables,0,
" namespace variable:\n"
" type=`%s' scope=`%s' name=`%s' args=`%s' prot=`%d\n",
root->type.data(),
scope.data(),
name.data(),
root->args.data(),
root->protection
);
// new global variable, enum value or typedef
MemberDef *md=new MemberDef(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);
QString def;
nd->insertMember(md);
md->setNamespace(nd);
if (root->type.length()>0)
{
def=root->type+" "+nd->name()+"::"+name+root->args;
}
else
{
def=nd->name()+"::"+name+root->args;
}
if (def.left(7)=="static ") def=def.right(def.length()-7);
md->setDefinition(def);
MemberName *mn;
// add member definition to the list of globals
if ((mn=namespaceNameDict[name]))
{
mn->inSort(md);
}
else
{
mn = new MemberName(name);
mn->inSort(md);
namespaceNameDict.insert(name,mn);
namespaceNameList.inSort(mn);
}
}
#endif
else if (name.length()>0) // global variable else if (name.length()>0) // global variable
{ {
Debug::print(Debug::Variables,0, Debug::print(Debug::Variables,0,
...@@ -873,15 +786,15 @@ void buildVarList(Entry *root) ...@@ -873,15 +786,15 @@ void buildVarList(Entry *root)
md->setDocumentation(root->doc); md->setDocumentation(root->doc);
md->setBriefDescription(root->brief); md->setBriefDescription(root->brief);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
QString def; QCString def;
// see if the function is inside a namespace // see if the function is inside a namespace
NamespaceDef *nd = 0; NamespaceDef *nd = 0;
if (root->parent->section == Entry::NAMESPACE_SEC ) if (scope.length()>0)
{ {
nd = namespaceDict[root->parent->name]; nd = namespaceDict[scope];
} }
if (nd) if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{ {
nd->insertMember(md); nd->insertMember(md);
md->setNamespace(nd); md->setNamespace(nd);
...@@ -901,8 +814,8 @@ void buildVarList(Entry *root) ...@@ -901,8 +814,8 @@ void buildVarList(Entry *root)
} }
// determine the definition of the global variable // determine the definition of the global variable
if (nd) // variable is inside a namespace, so put the scope if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
// before the name // variable is inside a namespace, so put the scope before the name
{ {
if (root->type.length()>0) if (root->type.length()>0)
{ {
...@@ -961,20 +874,20 @@ void buildMemberList(Entry *root) ...@@ -961,20 +874,20 @@ void buildMemberList(Entry *root)
{ {
Debug::print(Debug::Functions,0, Debug::print(Debug::Functions,0,
"FUNCTION_SEC:\n" "FUNCTION_SEC:\n"
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' #targs=%d\n", " `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' #targs=%d docs=`%s'\n",
root->type.data(), root->type.data(),
root->parent->name.data(), root->parent->name.data(),
root->name.data(), root->name.data(),
root->args.data(), root->args.data(),
root->relates.data(), root->relates.data(),
root->fileName.data(), root->fileName.data(),
root->tArgList ? (int)root->tArgList->count() : -1 root->tArgList ? (int)root->tArgList->count() : -1,
root->doc.data()
); );
bool isFriend=root->type.find("friend ")!=-1; bool isFriend=root->type.find("friend ")!=-1;
//if (isFriend && root->relates.length()==0)
// root->relates=root->parent->name.copy(); if (root->name.length()>0)
if (root->name.length()>0 /* && !isFriend */)
{ {
ClassDef *cd=0; ClassDef *cd=0;
...@@ -983,11 +896,12 @@ void buildMemberList(Entry *root) ...@@ -983,11 +896,12 @@ void buildMemberList(Entry *root)
//printf("root->parent=`%s' cd=%p root->type.find(re,0)=%d\n", //printf("root->parent=`%s' cd=%p root->type.find(re,0)=%d\n",
// 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=stripAnnonymousScope(root->parent->name.copy());
int i; int i;
if (root->parent && if (root->parent &&
root->parent->name.length()>0 && root->parent->name.length()>0 &&
(root->parent->section & Entry::COMPOUND_MASK) && (root->parent->section & Entry::COMPOUND_MASK) &&
(cd=getClass(root->parent->name)) && (cd=getClass(scope)) &&
// do some fuzzy things to exclude function pointers // do some fuzzy things to exclude function pointers
(root->type.isNull() || root->type.find(re,0)==-1 || (root->type.isNull() || root->type.find(re,0)==-1 ||
root->type.find(")(")!=-1 || root->type.find("operator")!=-1 root->type.find(")(")!=-1 || root->type.find("operator")!=-1
...@@ -1001,7 +915,7 @@ void buildMemberList(Entry *root) ...@@ -1001,7 +915,7 @@ void buildMemberList(Entry *root)
root->type=root->type.left(i+l); root->type=root->type.left(i+l);
} }
QString name=removeRedundantWhiteSpace(root->name); QCString name=removeRedundantWhiteSpace(root->name);
if (name.left(2)=="::") name=name.right(name.length()-2); if (name.left(2)=="::") name=name.right(name.length()-2);
MemberDef::MemberType mtype; MemberDef::MemberType mtype;
...@@ -1009,7 +923,16 @@ void buildMemberList(Entry *root) ...@@ -1009,7 +923,16 @@ void buildMemberList(Entry *root)
else if (root->sig) mtype=MemberDef::Signal; else if (root->sig) mtype=MemberDef::Signal;
else if (root->slot) mtype=MemberDef::Slot; else if (root->slot) mtype=MemberDef::Slot;
else mtype=MemberDef::Function; else mtype=MemberDef::Function;
// new member of function, signal or slot.
//if (Config::includeSourceFlag && !root->body.isEmpty())
//{
// printf("Function: %s\n-----------------\n%s\n------------------\n",
// root->name.data(),root->body.data());
//}
// new member function, signal or slot.
//printf("new member: %s class template args=`%s'\n",
// root->args.data(),argListToString(cd->templateArguments()).data());
MemberDef *md=new MemberDef(root->type,name,root->args,root->exception, MemberDef *md=new MemberDef(root->type,name,root->args,root->exception,
root->protection,root->virt,root->stat,root->relates.length()>0, root->protection,root->virt,root->stat,root->relates.length()>0,
mtype,root->tArgList,root->argList); mtype,root->tArgList,root->argList);
...@@ -1018,8 +941,10 @@ void buildMemberList(Entry *root) ...@@ -1018,8 +941,10 @@ void buildMemberList(Entry *root)
md->setDefLine(root->startLine); md->setDefLine(root->startLine);
md->setDocumentation(root->doc); md->setDocumentation(root->doc);
md->setBriefDescription(root->brief); md->setBriefDescription(root->brief);
md->setBody(root->body);
//md->setScopeTemplateArguments(cd->templateArguments());
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
QString def; QCString def;
if (root->relates.length()>0 || isFriend) if (root->relates.length()>0 || isFriend)
{ {
if (root->type.length()>0) if (root->type.length()>0)
...@@ -1047,7 +972,6 @@ void buildMemberList(Entry *root) ...@@ -1047,7 +972,6 @@ void buildMemberList(Entry *root)
} }
else else
{ {
QString scope=root->parent->name.copy();
if (root->type.length()>0) if (root->type.length()>0)
{ {
if (root->argList) if (root->argList)
...@@ -1110,7 +1034,9 @@ void buildMemberList(Entry *root) ...@@ -1110,7 +1034,9 @@ void buildMemberList(Entry *root)
!(root->parent->section & Entry::COMPOUND_MASK) && !(root->parent->section & Entry::COMPOUND_MASK) &&
root->name.find("::")==-1 && root->name.find("::")==-1 &&
root->relates.length()==0 && root->relates.length()==0 &&
root->type.left(7)!="extern ") root->type.left(7)!="extern " &&
root->type.left(8)!="typedef "
)
// no member => unrelated function // no member => unrelated function
{ {
/* check the uniqueness of the function name in the file. /* check the uniqueness of the function name in the file.
...@@ -1153,7 +1079,7 @@ void buildMemberList(Entry *root) ...@@ -1153,7 +1079,7 @@ void buildMemberList(Entry *root)
// root->type.data(),root->name.data(),root->args.data()); // root->type.data(),root->name.data(),root->args.data());
// new global function // new global function
QString name=removeRedundantWhiteSpace(root->name); QCString name=removeRedundantWhiteSpace(root->name);
MemberDef *md=new MemberDef(root->type,name,root->args,root->exception, MemberDef *md=new MemberDef(root->type,name,root->args,root->exception,
root->protection,root->virt,root->stat,FALSE, root->protection,root->virt,root->stat,FALSE,
MemberDef::Function,root->tArgList,root->argList); MemberDef::Function,root->tArgList,root->argList);
...@@ -1162,8 +1088,9 @@ void buildMemberList(Entry *root) ...@@ -1162,8 +1088,9 @@ void buildMemberList(Entry *root)
md->setDocumentation(root->doc); md->setDocumentation(root->doc);
md->setBriefDescription(root->brief); md->setBriefDescription(root->brief);
md->setPrototype(root->proto); md->setPrototype(root->proto);
md->setBody(root->body);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
QString def; QCString def;
if (root->type.length()>0) if (root->type.length()>0)
{ {
if (root->argList) if (root->argList)
...@@ -1205,7 +1132,8 @@ void buildMemberList(Entry *root) ...@@ -1205,7 +1132,8 @@ void buildMemberList(Entry *root)
{ {
nd = namespaceDict[root->parent->name]; nd = namespaceDict[root->parent->name];
} }
if (nd)
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{ {
nd->insertMember(md); nd->insertMember(md);
md->setNamespace(nd); md->setNamespace(nd);
...@@ -1386,22 +1314,23 @@ void computeClassRelations(Entry *root) ...@@ -1386,22 +1314,23 @@ void computeClassRelations(Entry *root)
if (!cd->visited) if (!cd->visited)
{ {
cd->visited=TRUE; // mark class as used (in case the are multiple classes cd->visited=TRUE; // mark class as used (in case the are multiple classes
// with the same name!) // with the same name!)
if (root->extends->count()>0) // there are base classes if (root->extends->count()>0) // there are base classes
{ {
QString scopePrefix; QCString scopePrefix;
Entry *p=root->parent; Entry *p=root->parent;
bool found=FALSE;
// For nested classes the base class could also be nested! // For nested classes the base class could also be nested!
// To find the correct scope, we try to prepend the scope to the base // To find the correct scope, we try to prepend the scope to the base
// name, starting with the largest, most inner scope. // name, starting with the largest, most inner scope.
while (p->section&Entry::COMPOUND_MASK) while (p->section&Entry::COMPOUND_MASK && !found)
{ {
scopePrefix=p->name+"::"; scopePrefix=p->name+"::";
QList<BaseInfo> *baseList=root->extends; QList<BaseInfo> *baseList=root->extends;
BaseInfo *bi=baseList->first(); BaseInfo *bi=baseList->first();
while (bi) // for each base class while (bi && !found) // for each base class
{ {
QString cName=scopePrefix+bi->name; QCString cName=scopePrefix+bi->name;
//printf("Base class %s\n",cName.data()); //printf("Base class %s\n",cName.data());
ClassDef *baseClass=getClass(cName); ClassDef *baseClass=getClass(cName);
if (baseClass) // base class is documented if (baseClass) // base class is documented
...@@ -1411,6 +1340,7 @@ void computeClassRelations(Entry *root) ...@@ -1411,6 +1340,7 @@ void computeClassRelations(Entry *root)
cd->insertBaseClass(baseClass,bi->prot,bi->virt); cd->insertBaseClass(baseClass,bi->prot,bi->virt);
// add this class as super class to the base class // add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt); baseClass->insertSuperClass(cd,bi->prot,bi->virt);
found=TRUE;
} }
//else // base class not documented //else // base class not documented
//{ //{
...@@ -1421,71 +1351,75 @@ void computeClassRelations(Entry *root) ...@@ -1421,71 +1351,75 @@ void computeClassRelations(Entry *root)
} }
p=p->parent; p=p->parent;
} }
// The base class could ofcouse also be a non-nested class if (!found)
QList<BaseInfo> *baseList=root->extends;
BaseInfo *bi=baseList->first();
while (bi) // for each base class
{ {
ClassDef *baseClass=getClass(bi->name); // The base class could ofcouse also be a non-nested class
//printf("baseClass %s of %s found (%s and %s)\n", QList<BaseInfo> *baseList=root->extends;
// bi->name.data(), BaseInfo *bi=baseList->first();
// root->name.data(), while (bi) // for each base class
// (bi->prot==Private)?"private":((bi->prot==Protected)?"protected":"public"),
// (bi->virt==Normal)?"normal":"virtual"
// );
int i;
QString templSpec,baseClassName=bi->name.copy();
if (!baseClass && (i=bi->name.find('<'))!=-1)
// base class has template specifiers
{
// TODO: here we should try to find the correct template specialization
// but for now, we only look for the unspecializated base class.
baseClassName=bi->name.left(i);
baseClass=getClass(baseClassName);
templSpec=bi->name.right(bi->name.length()-i);
}
if (baseClass) // base class is documented
{
// add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
}
else // base class not documented
{ {
NamespaceDef *nd=cd->getNamespace(); ClassDef *baseClass=getClass(bi->name);
//printf("Found undocumented base class `%s' namespace scope=`%s'\n", //printf("baseClass %s of %s found (%s and %s)\n",
// bi->name.data(),nd ? nd->name().data() : "<none>"); // bi->name.data(),
if (nd && (baseClass=getClass(nd->name()+"::"+baseClassName))) // root->name.data(),
// class is defined inside namespace // (bi->prot==Private)?"private":((bi->prot==Protected)?"protected":"public"),
// (bi->virt==Normal)?"normal":"virtual"
// );
int i;
QCString templSpec,baseClassName=bi->name.copy();
if (!baseClass && (i=bi->name.find('<'))!=-1)
// base class has template specifiers
{ {
// add base class to this class // TODO: here we should try to find the correct template specialization
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec); // but for now, we only look for the unspecializated base class.
// add this class as super class to the base class baseClassName=bi->name.left(i);
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec); baseClass=getClass(baseClassName);
templSpec=bi->name.right(bi->name.length()-i);
} }
else // undocumented base class if (baseClass) // base class is documented
{ {
baseClass=new ClassDef(bi->name,ClassDef::Class);
// add base class to this class // add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec); cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class // add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec); baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
// the undocumented base was found in this file
baseClass->insertUsedFile(root->fileName);
// add class to the list
classList.inSort(baseClass);
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
//classDict.insert(resolveDefines(bi->name),baseClass);
classDict.insert(bi->name,baseClass);
} }
else // base class not documented
{
NamespaceDef *nd=cd->getNamespace();
//printf("Found undocumented base class `%s' namespace scope=`%s'\n",
// bi->name.data(),nd ? nd->name().data() : "<none>");
if (nd && (baseClass=getClass(nd->name()+"::"+baseClassName)))
// class is defined inside namespace
{
// add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
}
else // undocumented base class
{
//printf(">>> Undocumented base class = %s\n",bi->name.data());
baseClass=new ClassDef(baseClassName,ClassDef::Class);
// add base class to this class
cd->insertBaseClass(baseClass,bi->prot,bi->virt,templSpec);
// add this class as super class to the base class
baseClass->insertSuperClass(cd,bi->prot,bi->virt,templSpec);
// the undocumented base was found in this file
baseClass->insertUsedFile(root->fileName);
// add class to the list
classList.inSort(baseClass);
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
//classDict.insert(resolveDefines(bi->name),baseClass);
classDict.insert(bi->name,baseClass);
}
}
bi=baseList->next();
} }
bi=baseList->next();
} }
} }
// else // class has no base classes // else // class has no base classes
// { // {
// QString resName=resolveDefines(root->name); // QCString resName=resolveDefines(root->name);
// int i; // int i;
// // Check if this class is a template instance of another class. // // Check if this class is a template instance of another class.
// // If this is the case, we act as if this class `inherits' from the // // If this is the case, we act as if this class `inherits' from the
...@@ -1570,7 +1504,7 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, ...@@ -1570,7 +1504,7 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
{ {
//printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s'\n", //printf("addMemberDocs: `%s'::`%s' `%s' funcDecl=`%s'\n",
// root->parent->name.data(),md->name().data(),md->argsString(),funcDecl); // root->parent->name.data(),md->name().data(),md->argsString(),funcDecl);
QString fDecl=funcDecl; QCString fDecl=funcDecl;
// strip extern specifier // strip extern specifier
if (fDecl.left(7)=="extern ") fDecl=fDecl.right(fDecl.length()-7); if (fDecl.left(7)=="extern ") fDecl=fDecl.right(fDecl.length()-7);
md->setDefinition(fDecl); md->setDefinition(fDecl);
...@@ -1580,10 +1514,13 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, ...@@ -1580,10 +1514,13 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
cd ? cd->name().data() : 0, cd ? cd->name().data() : 0,
nd ? nd->name().data() : 0 nd ? nd->name().data() : 0
) )
) mergeArguments(md->argumentList(),root->argList); )
{
mergeArguments(md->argumentList(),root->argList);
}
if (over_load) // the \overload keyword was used if (over_load) // the \overload keyword was used
{ {
QString doc=getOverloadDocs(); QCString doc=getOverloadDocs();
if (!root->doc.isNull()) if (!root->doc.isNull())
{ {
doc+="<p>"; doc+="<p>";
...@@ -1596,7 +1533,7 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, ...@@ -1596,7 +1533,7 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
// documentation outside a compound overrides the documentation inside it // documentation outside a compound overrides the documentation inside it
if ( /* !md->isStatic() && !root->stat && do not replace doc of a static */ if ( /* !md->isStatic() && !root->stat && do not replace doc of a static */
( (
!md->documentation() || /* no docs yet */ md->documentation().isEmpty() || /* no docs yet */
(root->parent->name.isNull() && /* or overwrite prototype docs */ (root->parent->name.isNull() && /* or overwrite prototype docs */
!root->proto && md->isPrototype() /* with member definition docs */ !root->proto && md->isPrototype() /* with member definition docs */
) )
...@@ -1610,13 +1547,18 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, ...@@ -1610,13 +1547,18 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
// outside it // outside it
if ( /* !md->isStatic() && !root->stat && do not replace doc of static */ if ( /* !md->isStatic() && !root->stat && do not replace doc of static */
( (
!md->briefDescription() || /* no docs yet */ md->briefDescription().isEmpty() || /* no docs yet */
!root->parent->name.isNull() /* member of a class */ !root->parent->name.isNull() /* member of a class */
) && root->brief.length()>0 ) && root->brief.length()>0
) )
{ {
md->setBriefDescription(root->brief); md->setBriefDescription(root->brief);
} }
if (md->bodyCode().isEmpty() && !root->body.isEmpty()) /* no body yet */
{
md->setBody(root->body);
}
} }
md->setDefFile(root->fileName); md->setDefFile(root->fileName);
md->setDefLine(root->startLine); md->setDefLine(root->startLine);
...@@ -1630,13 +1572,13 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl, ...@@ -1630,13 +1572,13 @@ void addMemberDocs(Entry *root,MemberDef *md, const char *funcDecl,
// function declaration `decl' to the corresponding member definition. // function declaration `decl' to the corresponding member definition.
bool findUnrelatedFunction(Entry *root, bool findUnrelatedFunction(Entry *root,
const QString &namespaceName, const QCString &namespaceName,
const char *name, const char *name,
const char *, const char *,
const char *decl) const char *decl)
{ {
MemberName *mn=0; MemberName *mn=0;
QString n=name; QCString n=name;
if (n.find("::")!=-1) return FALSE; // skip undefined class members if (n.find("::")!=-1) return FALSE; // skip undefined class members
//printf("findUnrelatedFunction(%s)\n",name); //printf("findUnrelatedFunction(%s)\n",name);
if (n.length()>0 && (mn=functionNameDict[n])) // function name defined if (n.length()>0 && (mn=functionNameDict[n])) // function name defined
...@@ -1646,7 +1588,7 @@ bool findUnrelatedFunction(Entry *root, ...@@ -1646,7 +1588,7 @@ bool findUnrelatedFunction(Entry *root,
while (md) while (md)
{ {
NamespaceDef *nd=md->getNamespace(); NamespaceDef *nd=md->getNamespace();
QString nsName = nd ? nd->name().data() : ""; QCString nsName = nd ? nd->name().data() : "";
if (namespaceName.length()==0 || if (namespaceName.length()==0 ||
nsName==namespaceName) nsName==namespaceName)
{ {
...@@ -1698,6 +1640,89 @@ bool findUnrelatedFunction(Entry *root, ...@@ -1698,6 +1640,89 @@ bool findUnrelatedFunction(Entry *root,
return TRUE; return TRUE;
} }
void substituteTemplateArgNames(ArgumentList *src,
const QCString &s,
ArgumentList *tempArgs,
ArgumentList *dst)
{
ArgumentListIterator ali(*src);
Argument *a=0;
for (ali.toFirst();(a=ali.current());++ali) // for each member argument
{
QCString type=a->type.copy();
bool isReplaced=FALSE;
QRegExp re(idMask);
int i,p=0,l,c=0;
while ((i=re.match(s,p,&l))!=-1) // for each template name found at the
// member definition
{
Argument *ta = tempArgs->at(c);
if (ta) // get matching template argument of the class
{
QCString dstName=s.mid(i,l);
QCString srcName=ta->type.copy();
int bi;
if ((bi=srcName.findRev(' '))!=-1) // search for separator
{
// strip the type specifier (usuall class or typename)
srcName=srcName.right(srcName.length()-bi-1);
}
//if (srcName.left(6)=="class ") srcName=srcName.right(srcName.length()-6);
//if (srcName.left(9)=="typename ") srcName=srcName.right(srcName.length()-9);
//printf("Template Name = `%s' -> `%s'\n",srcName.data(),dstName.data());
if (srcName!=dstName) /* we need to substitute */
{
int ti,tp=0;
QCString result;
int sl=srcName.length();
while ((ti=type.find(srcName,tp))!=-1)
{
result+=type.mid(tp,ti-tp);
if (
(ti==0 || !isId(type.at(ti-1))) &&
(ti+sl==(int)type.length() || !isId(type.at(ti+sl)))
) /* idenitifier -> replace */
{
result+=dstName;
}
else /* substring of an identifier */
{
result+=srcName;
}
tp=ti+sl;
}
result+=type.right(type.length()-tp);
type=result;
isReplaced = TRUE;
}
}
p=i+l;
c++;
}
Argument *na = new Argument(*a);
if (isReplaced)
{
//printf("Template Arg: `%s' -> `%s'\n",na->type.data(),type.data());
na->type=type;
}
else
{
//printf("Template Arg `%s' not changed\n",a->type.data());
}
dst->append(na);
}
//printf("substituteTemplateArgNames(src=`%s',tempNameStr=`%s',tempArgs=`%s',dest=`%s')\n",
// argListToString(src).data(),
// s.data(),
// argListToString(tempArgs).data(),
// argListToString(dst).data()
// );
dst->constSpecifier = src->constSpecifier;
dst->volatileSpecifier = src->volatileSpecifier;
dst->pureSpecifier = src->pureSpecifier;
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// This function tries to find a member (in a documented class/file/namespace) // This function tries to find a member (in a documented class/file/namespace)
...@@ -1710,23 +1735,28 @@ bool findUnrelatedFunction(Entry *root, ...@@ -1710,23 +1735,28 @@ bool findUnrelatedFunction(Entry *root,
// The boolean overloaded is used to specify whether or not a standard // The boolean overloaded is used to specify whether or not a standard
// overload documentation line should be generated. // overload documentation line should be generated.
void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, void findMember(Entry *root,QCString funcDecl,QCString related,bool overloaded,
bool isFunc) bool isFunc)
{ {
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d,isFunc=%d)\n", "findMember(root=%p,funcDecl=`%s',related=`%s',overload=%d,isFunc=%d\n====\ndoc=%s\n====\n)\n",
root,funcDecl.data(),related.data(),overloaded,isFunc root,funcDecl.data(),related.data(),overloaded,isFunc,root->doc.data()
); );
if (Config::includeSourceFlag && !root->body.isEmpty())
{
//printf("Function: %s\n-----------------\n%s\n------------------\n",
//root->name.data(),root->body.data());
}
QString scopeName; QCString scopeName;
QString className; QCString className;
QString namespaceName; QCString namespaceName;
QString classTempList; QCString classTempList;
QString funcType; QCString funcType;
QString funcName; QCString funcName;
QString funcArgs; QCString funcArgs;
QString funcTempList; QCString funcTempList;
QString exceptions; QCString exceptions;
bool isRelated=FALSE; bool isRelated=FALSE;
bool isFriend=FALSE; bool isFriend=FALSE;
...@@ -1764,7 +1794,8 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -1764,7 +1794,8 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
// if a related class name is specified and the class name could // if a related class name is specified and the class name could
// not be derived from the function declaration, then use the // not be derived from the function declaration, then use the
// related field. // related field.
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); //printf("scopeName=`%s' classTempList=`%s' className=`%s'\n",
// scopeName.data(),classTempList.data(),className.data());
if (/*scopeName.isEmpty() &&*/ !related.isEmpty() && !isRelated) if (/*scopeName.isEmpty() &&*/ !related.isEmpty() && !isRelated)
{ {
isRelated=TRUE; isRelated=TRUE;
...@@ -1805,6 +1836,41 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -1805,6 +1836,41 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
} }
} }
// see if (part of) the scope name is a namespace name
extractNamespaceName(scopeName,className,namespaceName);
QCString tempScopeName=scopeName.copy();
int ti;
int spi = namespaceName.isEmpty() ? 0 : namespaceName.length()+2;
if ((ti=tempScopeName.find("::",spi))!=-1 && !classTempList.isEmpty())
{
// insert template parameters after the first scope name
tempScopeName=tempScopeName.left(ti)+classTempList+
tempScopeName.right(tempScopeName.length()-ti);
}
else
{
tempScopeName+=classTempList;
}
if (root->tArgList==0 && !classTempList.isEmpty())
{
// no template specifiers found during parsing (because \fn was used),
// but there are template names in the scope, so we build the template
// specifiers from that.
root->tArgList = new ArgumentList;
QRegExp re(idMask);
int i,p=0,l;
while ((i=re.match(classTempList,p,&l))!=-1) // for each template name found
{
Argument *a = new Argument;
a->type = "class "+classTempList.mid(i,l);
root->tArgList->append(a);
p=i+l;
}
}
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
// rebuild the function declaration (needed to get the scope right). // rebuild the function declaration (needed to get the scope right).
if (scopeName.length()>0 && !isRelated && !isFriend) if (scopeName.length()>0 && !isRelated && !isFriend)
...@@ -1813,22 +1879,22 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -1813,22 +1879,22 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
{ {
if (isFunc) // a function -> we use argList for the arguments if (isFunc) // a function -> we use argList for the arguments
{ {
funcDecl=funcType+" "+scopeName+classTempList+"::"+funcName+funcTempList; funcDecl=funcType+" "+tempScopeName+"::"+funcName+funcTempList;
} }
else else
{ {
funcDecl=funcType+" "+scopeName+classTempList+"::"+funcName+funcArgs; funcDecl=funcType+" "+tempScopeName+"::"+funcName+funcArgs;
} }
} }
else else
{ {
if (isFunc) // a function => we use argList for the arguments if (isFunc) // a function => we use argList for the arguments
{ {
funcDecl=scopeName+classTempList+"::"+funcName+funcTempList; funcDecl=tempScopeName+"::"+funcName+funcTempList;
} }
else // variable => add `argument' list else // variable => add `argument' list
{ {
funcDecl=scopeName+classTempList+"::"+funcName+funcArgs; funcDecl=tempScopeName+"::"+funcName+funcArgs;
} }
} }
} }
...@@ -1858,12 +1924,10 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -1858,12 +1924,10 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
} }
} }
QString fullFuncDecl=funcDecl.copy(); QCString fullFuncDecl=funcDecl.copy();
if (isFunc) fullFuncDecl+=argListToString(root->argList); if (isFunc) fullFuncDecl+=argListToString(root->argList);
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
// see if (part of) the scope name is a namespace name
extractNamespaceName(scopeName,className,namespaceName);
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data()); //printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
// destructor => do backward class name substitution if needed // destructor => do backward class name substitution if needed
...@@ -1902,11 +1966,11 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -1902,11 +1966,11 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
if (className.length()>0) // class name is valid if (className.length()>0) // class name is valid
{ {
int count=0; int count=0;
MemberDef *md=mn->first(); MemberDef *md=mn->first(); // for each member with that name
while (md) while (md)
{ {
ClassDef *cd=md->memberClass(); ClassDef *cd=md->memberClass();
//printf("Member %s member className=%s this className=%s\n",md->name().data(),cd->name().data(),className.data()); //printf("Member %s (member scopeName=%s) (this scopeName=%s) classTempList=%s\n",md->name().data(),cd->name().data(),scopeName.data(),classTempList.data());
ClassDef *tcd=0; ClassDef *tcd=0;
if (classTempList.length()>0) // try to find the correct specialization if (classTempList.length()>0) // try to find the correct specialization
{ {
...@@ -1917,15 +1981,60 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -1917,15 +1981,60 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
{ {
tcd=getClass(scopeName); tcd=getClass(scopeName);
} }
//printf("tcd=%p\n",tcd); if (cd && tcd==cd) // member's classes match
if (cd && tcd==cd)
{ {
//printf("Class %s\n",cd->name().data()); int ci;
ArgumentList *classTemplArgs = cd->templateArguments();
if ((ci=cd->name().find("::"))!=-1) // nested class
{
ClassDef *parentClass = getClass(cd->name().left(ci));
if (parentClass)
classTemplArgs = parentClass->templateArguments();
}
//printf("cd->name=%s classTemplArgs=%s\n",cd->name().data(),
// argListToString(classTemplArgs).data());
ArgumentList *argList = 0;
bool substDone=FALSE;
if (!classTempList.isEmpty() &&
classTemplArgs &&
md->argumentList()
)
{
/* the function definition has template arguments
* and the class also has template arguments, so
* we must substitute the template names if they are
* different before doing the match
*/
argList = new ArgumentList;
argList->setAutoDelete(TRUE);
substituteTemplateArgNames(
md->argumentList(), /* source argument list */
classTempList, /* template names source */
classTemplArgs, /* template names dest */
argList /* dest argument list */
);
substDone=TRUE;
}
else /* no template arguments, compare argument lists directly */
{
argList = md->argumentList();
}
bool matching= bool matching=
md->isVariable() || md->isTypedef() || // needed for function pointers md->isVariable() || md->isTypedef() || // needed for function pointers
(md->argumentList()==0 && root->argList->count()==0) || (md->argumentList()==0 && root->argList->count()==0) ||
matchArguments(md->argumentList(), root->argList, matchArguments(argList, root->argList,className,namespaceName);
className,namespaceName);
if (substDone) // found a new argument list
{
//printf("root->tArgList=`%s'\n",argListToString(root->tArgList).data());
if (matching) // replace member's argument list
{
md->setScopeTemplateArguments(root->tArgList);
md->setArgumentList(argList);
}
else // no match -> delete argument list
delete argList;
}
if (matching) if (matching)
{ {
addMemberDocs(root,md,funcDecl,overloaded); addMemberDocs(root,md,funcDecl,overloaded);
...@@ -1975,7 +2084,7 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -1975,7 +2084,7 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
ASSERT(md); ASSERT(md);
ClassDef *cd=md->memberClass(); ClassDef *cd=md->memberClass();
ASSERT(cd); ASSERT(cd);
QString className=cd->name().copy(); QCString className=cd->name().copy();
md=mn->next(); md=mn->next();
bool unique=TRUE; bool unique=TRUE;
while (md) while (md)
...@@ -1997,7 +2106,7 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -1997,7 +2106,7 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
mtype,root->tArgList,root->argList); mtype,root->tArgList,root->argList);
md->setMemberClass(cd); md->setMemberClass(cd);
md->setDefinition(funcDecl); md->setDefinition(funcDecl);
QString doc=getOverloadDocs(); QCString doc=getOverloadDocs();
doc+="<p>"; doc+="<p>";
doc+=root->doc; doc+=root->doc;
md->setDocumentation(doc); md->setDocumentation(doc);
...@@ -2007,6 +2116,7 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -2007,6 +2116,7 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
md->setDefLine(root->startLine); md->setDefLine(root->startLine);
md->setPrototype(root->proto); md->setPrototype(root->proto);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setBody(root->body);
mn->inSort(md); mn->inSort(md);
cd->insertMember(md); cd->insertMember(md);
cd->insertUsedFile(root->fileName); cd->insertUsedFile(root->fileName);
...@@ -2071,6 +2181,7 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded, ...@@ -2071,6 +2181,7 @@ void findMember(Entry *root,QString funcDecl,QString related,bool overloaded,
md->setDefFile(root->fileName); md->setDefFile(root->fileName);
md->setDefLine(root->startLine); md->setDefLine(root->startLine);
md->setPrototype(root->proto); md->setPrototype(root->proto);
md->setBody(root->body);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
mn->inSort(md); mn->inSort(md);
cd->insertMember(md); cd->insertMember(md);
...@@ -2118,8 +2229,8 @@ void findMemberDocumentation(Entry *root) ...@@ -2118,8 +2229,8 @@ void findMemberDocumentation(Entry *root)
int i,l; int i,l;
QRegExp re("([a-zA-Z0-9: ]*\\*+[ \\*]*"); QRegExp re("([a-zA-Z0-9: ]*\\*+[ \\*]*");
Debug::print(Debug::FindMembers,0, Debug::print(Debug::FindMembers,0,
"root->type=`%s' root->name=`%s' root->args=`%s'\n", "root->type=`%s' root->name=`%s' root->args=`%s' section=%x\n",
root->type.data(),root->name.data(),root->args.data() root->type.data(),root->name.data(),root->args.data(),root->section
); );
bool isFunc=TRUE; bool isFunc=TRUE;
if ((i=re.match(root->type,0,&l))!=-1) // func variable/typedef to func ptr if ((i=re.match(root->type,0,&l))!=-1) // func variable/typedef to func ptr
...@@ -2151,8 +2262,12 @@ void findMemberDocumentation(Entry *root) ...@@ -2151,8 +2262,12 @@ void findMemberDocumentation(Entry *root)
//printf("Overloaded member %s found\n",root->name.data()); //printf("Overloaded member %s found\n",root->name.data());
findMember(root,root->name,root->relates,TRUE,isFunc); findMember(root,root->name,root->relates,TRUE,isFunc);
} }
else if (root->section==Entry::FUNCTION_SEC && else if
(root->doc.length()>0 || root->brief.length()>0 || extractAllFlag)) (root->section==Entry::FUNCTION_SEC &&
(!root->doc.isEmpty() || !root->brief.isEmpty() ||
!root->body.isEmpty() /*|| Config::extractAllFlag*/
)
)
{ {
//printf("Documentation for member `%s' found args=`%s' excp=`%s'\n", //printf("Documentation for member `%s' found args=`%s' excp=`%s'\n",
// root->name.data(),root->args.data(),root->exception.data()); // root->name.data(),root->args.data(),root->exception.data());
...@@ -2179,6 +2294,10 @@ void findMemberDocumentation(Entry *root) ...@@ -2179,6 +2294,10 @@ void findMemberDocumentation(Entry *root)
//if (root->relates.length()>0) printf(" Relates %s\n",root->relates.data()); //if (root->relates.length()>0) printf(" Relates %s\n",root->relates.data());
findMember(root,root->name,root->relates,FALSE,FALSE); findMember(root,root->name,root->relates,FALSE,FALSE);
} }
else
{
// skip section
}
EntryListIterator eli(*root->sublist); EntryListIterator eli(*root->sublist);
Entry *e; Entry *e;
for (;(e=eli.current());++eli) for (;(e=eli.current());++eli)
...@@ -2195,31 +2314,31 @@ void findEnums(Entry *root) ...@@ -2195,31 +2314,31 @@ void findEnums(Entry *root)
if (root->section==Entry::ENUM_SEC) if (root->section==Entry::ENUM_SEC)
// non anonymous enumeration // non anonymous enumeration
{ {
MemberDef *md=0; MemberDef *md=0;
ClassDef *cd=0; ClassDef *cd=0;
FileDef *fd=0; FileDef *fd=0;
NamespaceDef *nd=0; NamespaceDef *nd=0;
MemberNameDict *mnd=0; MemberNameDict *mnd=0;
MemberNameList *mnl=0; MemberNameList *mnl=0;
bool isGlobal; bool isGlobal;
//printf("Found enum with name `%s'\n",root->name.data()); //printf("Found enum with name `%s'\n",root->name.data());
int i; int i;
QString name; QCString name;
if ((i=root->name.findRev("::"))!=-1) // scope is specified if ((i=root->name.findRev("::"))!=-1) // scope is specified
{ {
QString scope=root->name.left(i); // extract scope QCString scope=root->name.left(i); // extract scope
name=root->name.right(root->name.length()-i-2); // extract name name=root->name.right(root->name.length()-i-2); // extract name
cd=getClass(scope); if ((cd=getClass(scope))==0) nd=namespaceDict[scope];
if (!cd) nd=namespaceDict[scope];
} }
else // no scope, check the scope in which the docs where found else // no scope, check the scope in which the docs where found
{ {
if (( root->parent->section & Entry::COMPOUND_MASK ) if (( root->parent->section & Entry::SCOPE_MASK )
&& root->parent->name.length()>0 && root->parent->name.length()>0
) // found enum docs inside a compound ) // found enum docs inside a compound
{ {
cd=getClass(root->parent->name); QCString scope=root->parent->name;
if ((cd=getClass(scope))==0) nd=namespaceDict[scope];
} }
name=root->name.copy(); name=root->name.copy();
} }
...@@ -2231,7 +2350,7 @@ void findEnums(Entry *root) ...@@ -2231,7 +2350,7 @@ void findEnums(Entry *root)
mnl=&memberNameList; mnl=&memberNameList;
isGlobal=FALSE; isGlobal=FALSE;
} }
else if (nd) // found enum inside namespace else if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@') // found enum inside namespace
{ {
mnd=&functionNameDict; mnd=&functionNameDict;
mnl=&functionNameList; mnl=&functionNameList;
...@@ -2254,7 +2373,7 @@ void findEnums(Entry *root) ...@@ -2254,7 +2373,7 @@ void findEnums(Entry *root)
md->setDefFile(root->fileName); md->setDefFile(root->fileName);
md->setDefLine(root->startLine); md->setDefLine(root->startLine);
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
if (nd) if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{ {
md->setDefinition(nd->name()+"::"+name); md->setDefinition(nd->name()+"::"+name);
nd->insertMember(md); nd->insertMember(md);
...@@ -2299,12 +2418,12 @@ void findEnums(Entry *root) ...@@ -2299,12 +2418,12 @@ void findEnums(Entry *root)
// get list of members with the same name as the field // get list of members with the same name as the field
{ {
MemberDef *fmd=fmn->first(); MemberDef *fmd=fmn->first();
while (fmd) // search for the class with the right name while (fmd) // search for the scope with the right name
{ {
if (nd) if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{ {
NamespaceDef *fnd=fmd->getNamespace(); NamespaceDef *fnd=fmd->getNamespace();
if (fnd==nd) if (fnd==nd) // enum value is inside a namespace
{ {
md->insertEnumField(fmd); md->insertEnumField(fmd);
fmd->setEnumScope(md); fmd->setEnumScope(md);
...@@ -2313,7 +2432,7 @@ void findEnums(Entry *root) ...@@ -2313,7 +2432,7 @@ void findEnums(Entry *root)
else if (isGlobal) else if (isGlobal)
{ {
FileDef *ffd=fmd->getFileDef(); FileDef *ffd=fmd->getFileDef();
if (ffd==fd) if (ffd==fd) // enum value has file scope
{ {
md->insertEnumField(fmd); md->insertEnumField(fmd);
fmd->setEnumScope(md); fmd->setEnumScope(md);
...@@ -2322,7 +2441,7 @@ void findEnums(Entry *root) ...@@ -2322,7 +2441,7 @@ void findEnums(Entry *root)
else else
{ {
ClassDef *fcd=fmd->memberClass(); ClassDef *fcd=fmd->memberClass();
if (fcd==cd) if (fcd==cd) // enum value is inside a class
{ {
md->insertEnumField(fmd); // add field def to list md->insertEnumField(fmd); // add field def to list
fmd->setEnumScope(md); // cross ref with enum name fmd->setEnumScope(md); // cross ref with enum name
...@@ -2358,10 +2477,10 @@ void findEnumDocumentation(Entry *root) ...@@ -2358,10 +2477,10 @@ void findEnumDocumentation(Entry *root)
//printf("Found docs for enum with name `%s'\n",root->name.data()); //printf("Found docs for enum with name `%s'\n",root->name.data());
int i; int i;
ClassDef *cd=0; ClassDef *cd=0;
QString name; QCString name;
if ((i=root->name.findRev("::"))!=-1) // scope is specified if ((i=root->name.findRev("::"))!=-1) // scope is specified
{ {
QString scope=root->name.left(i); // extract scope QCString scope=root->name.left(i); // extract scope
name=root->name.right(root->name.length()-i-2); // extract name name=root->name.right(root->name.length()-i-2); // extract name
cd=getClass(scope); cd=getClass(scope);
//printf("Scope=`%s' Name=`%s'\n",scope.data(),name.data()); //printf("Scope=`%s' Name=`%s'\n",scope.data(),name.data());
...@@ -2382,7 +2501,7 @@ void findEnumDocumentation(Entry *root) ...@@ -2382,7 +2501,7 @@ void findEnumDocumentation(Entry *root)
if (cd) if (cd)
{ {
//printf("Enum: scope=`%s' name=`%s'\n",cd->name(),name.data()); //printf("Enum: scope=`%s' name=`%s'\n",cd->name(),name.data());
QString className=cd->name().copy(); QCString className=cd->name().copy();
MemberName *mn=memberNameDict[name]; MemberName *mn=memberNameDict[name];
if (mn) if (mn)
{ {
...@@ -2519,29 +2638,30 @@ void computeMemberRelations() ...@@ -2519,29 +2638,30 @@ void computeMemberRelations()
while (mn) // for each member name while (mn) // for each member name
{ {
MemberNameIterator mdi(*mn); MemberNameIterator mdi(*mn);
for ( ; mdi.current() ; ++mdi) // for each function with a specific name for ( ; mdi.current() ; ++mdi) // for each member with a specific arg list
{ {
MemberDef *md=mdi.current(); MemberDef *md=mdi.current();
MemberNameIterator bmdi(*mn); MemberNameIterator bmdi(*mn);
for ( ; bmdi.current() ; ++bmdi) // for each other function with that name for ( ; bmdi.current() ; ++bmdi) // for each other member with that signature
{ {
MemberDef *bmd=bmdi.current(); MemberDef *bmd=bmdi.current();
if (md!=bmd && bmd->memberClass() && md->memberClass() && ClassDef *bmcd = bmd->memberClass();
isBaseClass(bmd->memberClass(),md->memberClass())) ClassDef *mcd = md->memberClass();
//printf("Check relation between `%s'::`%s' and `%s'::`%s'\n",
// mcd->name().data(),md->name().data(),
// bmcd->name().data(),bmd->name().data()
// );
if (md!=bmd && bmcd && mcd && isBaseClass(bmcd,mcd))
{ {
//printf("Checking Base: %s\nWith normal : %s\n",bmd->definition(),md->definition()); //printf(" Base argList=`%s'\n Super argList=`%s'\n",
if (/*matchArguments(bmd->argsString(),md->argsString())*/ // argListToString(bmd->argumentList()).data(),
matchArguments(bmd->argumentList(),md->argumentList()) // argListToString(md->argumentList()).data()
) // );
if ( matchArguments(bmd->argumentList(),md->argumentList()) )
{ {
//printf("Base: %s\nNorm: %s\n",bmd->definition(),md->definition()); //printf(" match found!\n");
ClassDef *bmcd = bmd->memberClass();
ClassDef *mcd = md->memberClass();
if (mcd && bmcd && if (mcd && bmcd &&
(bmcd->protection()!=Private || extractPrivateFlag) && mcd->isVisibleExt() && bmcd->isVisibleExt()
(bmcd->hasDocumentation() || !hideClassFlag) &&
(mcd->protection()!=Private || extractPrivateFlag) &&
(mcd->hasDocumentation() || !hideClassFlag)
) )
{ {
md->setReimplements(bmd); md->setReimplements(bmd);
...@@ -2564,7 +2684,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl) ...@@ -2564,7 +2684,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl)
//if (mcd->flag==TRUE) //if (mcd->flag==TRUE)
//{ //{
// err("Error: Cyclic inhertance dependency found for class %s\n",mcd->name()); // err("Error: Cyclic inhertance dependency found for class %s\n",mcd->name());
// return; // return;
//} //}
//mcd->flag=TRUE; //mcd->flag=TRUE;
...@@ -2618,6 +2738,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl) ...@@ -2618,6 +2738,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl)
found = found =
/*matchArguments(srcMd->argsString(),dstMd->argsString());*/ /*matchArguments(srcMd->argsString(),dstMd->argsString());*/
matchArguments(srcMd->argumentList(),dstMd->argumentList()); matchArguments(srcMd->argumentList(),dstMd->argumentList());
ambigue=!found;
} }
else // member is in a non base class => multiple inheritance else // member is in a non base class => multiple inheritance
// using the same base class. // using the same base class.
...@@ -2627,7 +2748,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl) ...@@ -2627,7 +2748,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl)
// dstMd->name().data(), // dstMd->name().data(),
// dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data()); // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
QString scope=dstMi->scopePath.left(dstMi->scopePath.find("::")+2); QCString scope=dstMi->scopePath.left(dstMi->scopePath.find("::")+2);
if (scope!=dstMi->ambiguityResolutionScope.left(scope.length())) if (scope!=dstMi->ambiguityResolutionScope.left(scope.length()))
dstMi->ambiguityResolutionScope.prepend(scope); dstMi->ambiguityResolutionScope.prepend(scope);
ambigue=TRUE; ambigue=TRUE;
...@@ -2648,7 +2769,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl) ...@@ -2648,7 +2769,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl)
// dstMd->name().data(), // dstMd->name().data(),
// dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data()); // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
QString scope=dstMi->scopePath.left(dstMi->scopePath.find("::")+2); QCString scope=dstMi->scopePath.left(dstMi->scopePath.find("::")+2);
if (scope!=dstMi->ambiguityResolutionScope.left(scope.length())) if (scope!=dstMi->ambiguityResolutionScope.left(scope.length()))
dstMi->ambiguityResolutionScope.prepend(scope); dstMi->ambiguityResolutionScope.prepend(scope);
ambigue=TRUE; ambigue=TRUE;
...@@ -2660,7 +2781,6 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl) ...@@ -2660,7 +2781,6 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl)
Specifier virt=srcMi->virt; Specifier virt=srcMi->virt;
if (srcMi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt; if (srcMi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt;
MemberInfo *newMi = new MemberInfo(srcMd,bcd->prot,virt); MemberInfo *newMi = new MemberInfo(srcMd,bcd->prot,virt);
//if (srcMi->memberDef->memberClass()!=bClass)
newMi->scopePath=bClass->name()+"::"+srcMi->scopePath; newMi->scopePath=bClass->name()+"::"+srcMi->scopePath;
if (ambigue) if (ambigue)
{ {
...@@ -2669,7 +2789,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl) ...@@ -2669,7 +2789,7 @@ void mergeMembers(ClassDef *cd,BaseClassList *bcl)
// srcMd->name().data(), // srcMd->name().data(),
// bClass->name().data()); // bClass->name().data());
QString scope=bClass->name().copy(); scope+="::"; QCString scope=bClass->name().copy(); scope+="::";
if (scope!=srcMi->ambiguityResolutionScope.left(scope.length())) if (scope!=srcMi->ambiguityResolutionScope.left(scope.length()))
newMi->ambiguityResolutionScope= newMi->ambiguityResolutionScope=
scope+srcMi->ambiguityResolutionScope; scope+srcMi->ambiguityResolutionScope;
...@@ -2764,7 +2884,8 @@ void generateFileDocs() ...@@ -2764,7 +2884,8 @@ void generateFileDocs()
void generateClassDocs() void generateClassDocs()
{ {
// write the installdox script if necessary // write the installdox script if necessary
if (generateHtml && (tagFileList.count()>0 || searchEngineFlag)) if (Config::generateHtml &&
(Config::tagFileList.count()>0 || Config::searchEngineFlag))
writeInstallScript(); writeInstallScript();
msg("Generating index page...\n"); msg("Generating index page...\n");
...@@ -2797,8 +2918,8 @@ void generateClassDocs() ...@@ -2797,8 +2918,8 @@ void generateClassDocs()
if (!cd->isReference() && if (!cd->isReference() &&
//!cd->name().isEmpty() && //!cd->name().isEmpty() &&
//cd->name().at(0)!='@' && //cd->name().at(0)!='@' &&
//(cd->protection()!=Private || extractPrivateFlag) && //(cd->protection()!=Private || Config::extractPrivateFlag) &&
//(cd->hasDocumentation() || !hideClassFlag) //(cd->hasDocumentation() || !Config::hideClassFlag)
cd->isVisible() cd->isVisible()
) )
// skip external references and anonymous compounds // skip external references and anonymous compounds
...@@ -2807,7 +2928,7 @@ void generateClassDocs() ...@@ -2807,7 +2928,7 @@ void generateClassDocs()
cd->writeDocumentation(*outputList); cd->writeDocumentation(*outputList);
cd->writeMemberList(*outputList); cd->writeMemberList(*outputList);
if (verbatimHeaderFlag) cd->writeIncludeFile(*outputList); if (Config::verbatimHeaderFlag) cd->writeIncludeFile(*outputList);
} }
} }
} }
...@@ -2912,31 +3033,33 @@ void buildPageList(Entry *root) ...@@ -2912,31 +3033,33 @@ void buildPageList(Entry *root)
} }
else else
{ {
QString baseName=root->name.copy(); QCString baseName=root->name.copy();
if (baseName.right(4)==".tex") if (baseName.right(4)==".tex")
baseName=baseName.left(baseName.length()-4); baseName=baseName.left(baseName.length()-4);
else if (baseName.right(5)==".html") else if (baseName.right(5)==".html")
baseName=baseName.left(baseName.length()-5); baseName=baseName.left(baseName.length()-5);
pi=new PageInfo(baseName, root->doc, pi=new PageInfo(baseName, root->doc,
root->args.stripWhiteSpace()); root->args.stripWhiteSpace());
setFileNameForSections(root->anchors,root->name); QCString pageName;
if (Config::caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
setFileNameForSections(root->anchors,pageName);
pageList.append(pi); pageList.append(pi);
pageDict.insert(baseName,pi); pageDict.insert(baseName,pi);
if (pi->title.length()>0) if (pi->title.length()>0)
{ {
QString pageName;
if (caseSensitiveNames)
pageName=pi->name.copy();
else
pageName=pi->name.lower();
//outputList->writeTitle(pi->name,pi->title); //outputList->writeTitle(pi->name,pi->title);
// a page name is a label as well! // a page name is a label as well!
SectionInfo *si=new SectionInfo( SectionInfo *si=new SectionInfo(
pi->name,pi->title,SectionInfo::Section); pi->name,pi->title,SectionInfo::Section);
si->fileName=pageName+".html"; si->fileName=pageName+".html";
//printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data());
//printf("Adding section info %s\n",pi->name.data()); //printf("Adding section info %s\n",pi->name.data());
sectionDict.insert(pi->name,si); sectionDict.insert(pageName,si);
} }
} }
} }
...@@ -2979,8 +3102,8 @@ void generatePageDocs() ...@@ -2979,8 +3102,8 @@ void generatePageDocs()
{ {
msg("Generating docs for page %s...\n",pi->name.data()); msg("Generating docs for page %s...\n",pi->name.data());
outputList->disable(OutputGenerator::Man); outputList->disable(OutputGenerator::Man);
QString pageName; QCString pageName;
if (caseSensitiveNames) if (Config::caseSensitiveNames)
pageName=pi->name.copy(); pageName=pi->name.copy();
else else
pageName=pi->name.lower(); pageName=pi->name.lower();
...@@ -3047,7 +3170,7 @@ void generateExampleDocs() ...@@ -3047,7 +3170,7 @@ void generateExampleDocs()
while (pi) while (pi)
{ {
msg("Generating docs for example %s...\n",pi->name.data()); msg("Generating docs for example %s...\n",pi->name.data());
QString n=convertSlashes(pi->name,TRUE)+"-example"; QCString n=convertSlashes(pi->name,TRUE)+"-example";
startFile(*outputList,n,"Example Documentation"); startFile(*outputList,n,"Example Documentation");
//outputList->writeTitle(pi->name,pi->name); //outputList->writeTitle(pi->name,pi->name);
parseExample(*outputList,pi->doc+"\n\\include "+pi->name,pi->name); parseExample(*outputList,pi->doc+"\n\\include "+pi->name,pi->name);
...@@ -3081,37 +3204,64 @@ void generateNamespaceDocs() ...@@ -3081,37 +3204,64 @@ void generateNamespaceDocs()
NamespaceDef *nd; NamespaceDef *nd;
for (;(nd=nli.current());++nli) for (;(nd=nli.current());++nli)
{ {
msg("Generating docs for namespace %s\n",nd->name().data()); if ((nd->getReference() || nd->hasDocumentation()) &&
nd->writeDocumentation(*outputList); !nd->name().isEmpty() && nd->name().at(0)!='@')
{
msg("Generating docs for namespace %s\n",nd->name().data());
nd->writeDocumentation(*outputList);
}
} }
} }
#if defined(_WIN32)
static QCString fixSlashes(QCString &s)
{
QCString result;
uint i;
for (i=0;i<s.length();i++)
{
switch(s.at(i))
{
case '/':
case '\\':
result+="\\\\";
break;
default:
result+=s.at(i);
}
}
return result;
}
#endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// generate files for the search engine // generate files for the search engine
void generateSearchIndex() void generateSearchIndex()
{ {
if (searchEngineFlag && generateHtml) if (Config::searchEngineFlag && Config::generateHtml)
{ {
// create search index // create search index
QString fileName; QCString fileName;
writeSearchButton(htmlOutputDir); writeSearchButton(Config::htmlOutputDir);
#if !defined(_WIN32)
// create cgi script // create cgi script
fileName = htmlOutputDir+"/"+cgiName; fileName = Config::htmlOutputDir+"/"+Config::cgiName;
QFile f(fileName); QFile f(fileName);
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
{ {
QTextStream t(&f); QTextStream t(&f);
t << "#!/bin/sh" << endl t << "#!/bin/sh" << endl
<< "DOXYSEARCH=" << binAbsPath << "/doxysearch" << endl << "DOXYSEARCH=" << Config::binAbsPath << "/doxysearch" << endl
<< "DOXYPATH=" << docAbsPath << " "; << "DOXYPATH=" << Config::docAbsPath << " ";
char *s=extDocPathList.first(); char *s=Config::extDocPathList.first();
while (s) while (s)
{ {
t << s << " "; t << s << " ";
s=extDocPathList.next(); s=Config::extDocPathList.next();
} }
t << endl t << endl
...@@ -3121,28 +3271,65 @@ void generateSearchIndex() ...@@ -3121,28 +3271,65 @@ void generateSearchIndex()
<< "else" << endl << "else" << endl
<< " echo \"Content-Type: text/html\"" << endl << " echo \"Content-Type: text/html\"" << endl
<< " echo \"\"" << endl << " echo \"\"" << endl
<< " echo \"<H1>Error: $DOXYSEARCH not found. Check cgi script!\"" << endl << " echo \"<h2>Error: $DOXYSEARCH not found. Check cgi script!</h2>\"" << endl
<< "fi" << endl; << "fi" << endl;
f.close(); f.close();
struct stat stat_struct; struct stat stat_struct;
stat(fileName,&stat_struct); stat(fileName,&stat_struct);
#if !defined(_WIN32)
chmod(fileName,stat_struct.st_mode|S_IXUSR|S_IXGRP|S_IXOTH); chmod(fileName,stat_struct.st_mode|S_IXUSR|S_IXGRP|S_IXOTH);
#endif
} }
else else
{ {
err("Error: Cannot open file %s for writing\n",fileName.data()); err("Error: Cannot open file %s for writing\n",fileName.data());
} }
#else /* Windows platform */
// create cgi program
fileName = Config::cgiName.copy();
if (fileName.right(4)==".cgi")
fileName=fileName.left(fileName.length()-4);
fileName+=".c";
fileName.prepend(Config::htmlOutputDir+"/");
QFile f(fileName);
if (f.open(IO_WriteOnly))
{
QTextStream t(&f);
t << "#include <stdio.h>" << endl;
t << "#include <stdlib.h>" << endl;
t << "#include <process.h>" << endl;
t << endl;
t << "const char *DOXYSEARCH = \"" <<
fixSlashes(Config::binAbsPath) << "\\\\doxysearch.exe\";" << endl;
t << "const char *DOXYPATH = \"" <<
fixSlashes(Config::docAbsPath) << "\";" << endl;
t << endl;
t << "int main(void)" << endl;
t << "{" << endl;
t << " char buf[1024];" << endl;
t << " sprintf(buf,\"%s %s\",DOXYSEARCH,DOXYPATH);" << endl;
t << " if (system(buf))" << endl;
t << " {" << endl;
t << " printf(\"Content-Type: text/html\\n\\n\");" << endl;
t << " printf(\"<h2>Error: failed to execute %s</h2>\\n\",DOXYSEARCH);" << endl;
t << " exit(1);" << endl;
t << " }" << endl;
t << " return 0;" << endl;
t << "}" << endl;
f.close();
}
else
{
err("Error: Cannot open file %s for writing\n",fileName.data());
}
#endif /* !defined(_WIN32) */
// create config file // create config file
fileName = htmlOutputDir+"/search.cfg"; fileName = Config::htmlOutputDir+"/search.cfg";
f.setName(fileName); f.setName(fileName);
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
{ {
QTextStream t(&f); QTextStream t(&f);
t << docURL << endl << cgiURL << "/" << cgiName << endl; t << Config::docURL << endl << Config::cgiURL << "/" << Config::cgiName << endl;
f.close(); f.close();
} }
else else
...@@ -3194,7 +3381,7 @@ void generateConfigFile(const char *configFile,bool shortList) ...@@ -3194,7 +3381,7 @@ void generateConfigFile(const char *configFile,bool shortList)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// read and parse a tag file // read and parse a tag file
bool readLineFromFile(QFile &f,QString &s) bool readLineFromFile(QFile &f,QCString &s)
{ {
char c=0; char c=0;
s.resize(0); s.resize(0);
...@@ -3226,7 +3413,12 @@ bool patternMatch(QFileInfo *fi,QStrList *patList) ...@@ -3226,7 +3413,12 @@ bool patternMatch(QFileInfo *fi,QStrList *patList)
char *pattern=patList->first(); char *pattern=patList->first();
while (pattern && !found) while (pattern && !found)
{ {
found = found || QDir::match(pattern,fi->fileName()); #if defined(_WIN32) // windows
QRegExp re(pattern,FALSE,TRUE); // case insensitive match
#else // unix
QRegExp re(pattern,TRUE,TRUE); // case sensitive match
#endif
found = found || re.match(fi->fileName())!=-1;
pattern=patList->next(); pattern=patList->next();
} }
} }
...@@ -3245,7 +3437,7 @@ void copyAndFilterFile(const char *fileName,BufStr &dest) ...@@ -3245,7 +3437,7 @@ void copyAndFilterFile(const char *fileName,BufStr &dest)
QFileInfo fi(fileName); QFileInfo fi(fileName);
if (!fi.exists()) return; if (!fi.exists()) return;
if (inputFilter.isEmpty()) if (Config::inputFilter.isEmpty())
{ {
QFile f(fileName); QFile f(fileName);
if (!f.open(IO_ReadOnly)) if (!f.open(IO_ReadOnly))
...@@ -3266,11 +3458,11 @@ void copyAndFilterFile(const char *fileName,BufStr &dest) ...@@ -3266,11 +3458,11 @@ void copyAndFilterFile(const char *fileName,BufStr &dest)
{ {
int c; int c;
// char *p=dest; // char *p=dest;
QString cmd=inputFilter+" "+fileName; QCString cmd=Config::inputFilter+" "+fileName;
FILE *f=popen(cmd,"r"); FILE *f=popen(cmd,"r");
if (!f) if (!f)
{ {
err("Error: could not execute filter %s\n",inputFilter.data()); err("Error: could not execute filter %s\n",Config::inputFilter.data());
return; return;
} }
while ((c=fgetc(f))!=EOF) dest.addChar(c),size++; while ((c=fgetc(f))!=EOF) dest.addChar(c),size++;
...@@ -3295,17 +3487,17 @@ void copyAndFilterFile(const char *fileName,BufStr &dest) ...@@ -3295,17 +3487,17 @@ void copyAndFilterFile(const char *fileName,BufStr &dest)
void readFiles(BufStr &output) void readFiles(BufStr &output)
{ {
QString *s=inputFiles.first(); QCString *s=inputFiles.first();
// char *p=output.data(); // char *p=output.data();
while (s) while (s)
{ {
QString fileName=*s; QCString fileName=*s;
//int fileSize=fi->fileInfo()->size(); //int fileSize=fi->fileInfo()->size();
int fileNameSize=fileName.length(); int fileNameSize=fileName.length();
//int streamLength=fileSize+fileNameSize+4; //int streamLength=fileSize+fileNameSize+4;
//QString fileText(streamLength); //QCString fileText(streamLength);
// add begin filename marker // add begin filename marker
// *p++=0x06; // *p++=0x06;
...@@ -3320,7 +3512,7 @@ void readFiles(BufStr &output) ...@@ -3320,7 +3512,7 @@ void readFiles(BufStr &output)
output.addChar(0x06); output.addChar(0x06);
// *p++='\n'; // to make ^ work while scanning the first line of a file! // *p++='\n'; // to make ^ work while scanning the first line of a file!
output.addChar('\n'); output.addChar('\n');
if (preprocessingFlag) if (Config::preprocessingFlag)
{ {
msg("Preprocessing %s...\n",s->data()); msg("Preprocessing %s...\n",s->data());
preprocessFile(fileName,output); preprocessFile(fileName,output);
...@@ -3376,7 +3568,7 @@ int readDir(QFileInfo *fi, ...@@ -3376,7 +3568,7 @@ int readDir(QFileInfo *fi,
patternMatch(cfi,patList) && !patternMatch(cfi,exclPatList)) patternMatch(cfi,patList) && !patternMatch(cfi,exclPatList))
{ {
totalSize+=cfi->size()+cfi->absFilePath().length()+4; totalSize+=cfi->size()+cfi->absFilePath().length()+4;
QString name=cfi->fileName(); QCString name=convertToQCString(cfi->fileName());
if (fnDict) if (fnDict)
{ {
FileDef *fd=new FileDef(cfi->dirPath()+"/",name); FileDef *fd=new FileDef(cfi->dirPath()+"/",name);
...@@ -3393,15 +3585,15 @@ int readDir(QFileInfo *fi, ...@@ -3393,15 +3585,15 @@ int readDir(QFileInfo *fi,
fnDict->insert(name,fn); fnDict->insert(name,fn);
} }
} }
QString *rs=0; QCString *rs=0;
if (resultList || resultDict) if (resultList || resultDict)
{ {
rs=new QString(cfi->absFilePath()); rs=new QCString(cfi->absFilePath());
} }
if (resultList) resultList->append(rs); if (resultList) resultList->append(rs);
if (resultDict) resultDict->insert(cfi->absFilePath(),rs); if (resultDict) resultDict->insert(cfi->absFilePath(),rs);
} }
else if (recursiveFlag && cfi->isDir() && cfi->fileName()!="." && else if (Config::recursiveFlag && cfi->isDir() && cfi->fileName()!="." &&
cfi->fileName()!="..") cfi->fileName()!="..")
{ {
cfi->setFile(cfi->absFilePath()); cfi->setFile(cfi->absFilePath());
...@@ -3417,9 +3609,9 @@ int readDir(QFileInfo *fi, ...@@ -3417,9 +3609,9 @@ int readDir(QFileInfo *fi,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// read the file with name `name' into a string. // read the file with name `name' into a string.
QString readExampleFile(const char *name) QCString readExampleFile(const char *name)
{ {
QString example; QCString example;
QFileInfo fi(name); QFileInfo fi(name);
if (fi.exists()) if (fi.exists())
{ {
...@@ -3477,7 +3669,7 @@ int readFileOrDirectory(const char *s, ...@@ -3477,7 +3669,7 @@ int readFileOrDirectory(const char *s,
{ {
totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input); totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input);
//fiList->inSort(new FileInfo(fi)); //fiList->inSort(new FileInfo(fi));
QString name=fi.fileName(); QCString name=convertToQCString(fi.fileName());
if (fnDict) if (fnDict)
{ {
FileDef *fd=new FileDef(fi.dirPath(TRUE)+"/",name); FileDef *fd=new FileDef(fi.dirPath(TRUE)+"/",name);
...@@ -3494,10 +3686,10 @@ int readFileOrDirectory(const char *s, ...@@ -3494,10 +3686,10 @@ int readFileOrDirectory(const char *s,
fnDict->insert(name,fn); fnDict->insert(name,fn);
} }
} }
QString *rs=0; QCString *rs=0;
if (resultList || resultDict) if (resultList || resultDict)
{ {
rs=new QString(fi.absFilePath()); rs=new QCString(fi.absFilePath());
} }
if (resultList) resultList->append(rs); if (resultList) resultList->append(rs);
if (resultDict) resultDict->insert(fi.absFilePath(),rs); if (resultDict) resultDict->insert(fi.absFilePath(),rs);
...@@ -3514,11 +3706,11 @@ int readFileOrDirectory(const char *s, ...@@ -3514,11 +3706,11 @@ int readFileOrDirectory(const char *s,
void readFormulaRepository() void readFormulaRepository()
{ {
QFile f(htmlOutputDir+"/formula.repository"); QFile f(Config::htmlOutputDir+"/formula.repository");
if (f.open(IO_ReadOnly)) // open repository if (f.open(IO_ReadOnly)) // open repository
{ {
QTextStream t(&f); QTextStream t(&f);
QString line; QCString line;
while (!t.eof()) while (!t.eof())
{ {
line=t.readLine(); line=t.readLine();
...@@ -3530,8 +3722,8 @@ void readFormulaRepository() ...@@ -3530,8 +3722,8 @@ void readFormulaRepository()
} }
else else
{ {
QString formName = line.left(se); QCString formName = line.left(se);
QString formText = line.right(line.length()-se-1); QCString formText = line.right(line.length()-se-1);
Formula *f=new Formula(formText); Formula *f=new Formula(formText);
formulaList.append(f); formulaList.append(f);
formulaDict.insert(formText,f); formulaDict.insert(formText,f);
...@@ -3627,7 +3819,7 @@ int main(int argc,char **argv) ...@@ -3627,7 +3819,7 @@ int main(int argc,char **argv)
} }
QFileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile"); QFileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile");
QString config; QCString config;
if (optind>=argc) if (optind>=argc)
{ {
if (configFileInfo1.exists()) if (configFileInfo1.exists())
...@@ -3646,23 +3838,24 @@ int main(int argc,char **argv) ...@@ -3646,23 +3838,24 @@ int main(int argc,char **argv)
config=fileToString(argv[1]); config=fileToString(argv[1]);
parseConfig(config); parseConfig(config);
checkConfig();
/************************************************************************** /**************************************************************************
* Initialize output generators * * Initialize output generators *
**************************************************************************/ **************************************************************************/
outputList = new OutputList(TRUE); outputList = new OutputList(TRUE);
if (generateHtml) if (Config::generateHtml)
{ {
outputList->add(new HtmlGenerator); outputList->add(new HtmlGenerator);
HtmlGenerator::init(); HtmlGenerator::init();
} }
if (generateLatex) if (Config::generateLatex)
{ {
outputList->add(new LatexGenerator); outputList->add(new LatexGenerator);
LatexGenerator::init(); LatexGenerator::init();
} }
if (generateMan) if (Config::generateMan)
{ {
outputList->add(new ManGenerator); outputList->add(new ManGenerator);
ManGenerator::init(); ManGenerator::init();
...@@ -3674,42 +3867,43 @@ int main(int argc,char **argv) ...@@ -3674,42 +3867,43 @@ int main(int argc,char **argv)
// gather names of all files in the include path // gather names of all files in the include path
msg("Searching for include files...\n"); msg("Searching for include files...\n");
s=includePath.first(); s=Config::includePath.first();
while (s) while (s)
{ {
readFileOrDirectory(s,0,&includeNameDict,0,&filePatternList, readFileOrDirectory(s,0,&includeNameDict,0,&Config::filePatternList,
&excludePatternList,0,0); &Config::excludePatternList,0,0);
s=includePath.next(); s=Config::includePath.next();
} }
msg("Searching for example files...\n"); msg("Searching for example files...\n");
s=examplePath.first(); s=Config::examplePath.first();
while (s) while (s)
{ {
readFileOrDirectory(s,0,&exampleNameDict,0,&filePatternList, readFileOrDirectory(s,0,&exampleNameDict,0,&Config::filePatternList,
&excludePatternList,0,0); &Config::excludePatternList,0,0);
s=examplePath.next(); s=Config::examplePath.next();
} }
msg("Searching for files to exclude\n"); msg("Searching for files to exclude\n");
s=excludeSources.first(); s=Config::excludeSources.first();
while (s) while (s)
{ {
readFileOrDirectory(s,0,0,0,&filePatternList, readFileOrDirectory(s,0,0,0,&Config::filePatternList,
0,0,&excludeNameDict); 0,0,&excludeNameDict);
s=excludeSources.next(); s=Config::excludeSources.next();
} }
msg("Reading input files...\n"); msg("Reading input files...\n");
int inputSize=0; int inputSize=0;
s=inputSources.first(); s=Config::inputSources.first();
while (s) while (s)
{ {
inputSize+=readFileOrDirectory(s,&inputNameList, inputSize+=readFileOrDirectory(s,&inputNameList,
&inputNameDict,&excludeNameDict, &inputNameDict,&excludeNameDict,
&filePatternList,&excludePatternList, &Config::filePatternList,
&Config::excludePatternList,
&inputFiles,0); &inputFiles,0);
s=inputSources.next(); s=Config::inputSources.next();
} }
//msg("Input size %d bytes\n",inputSize); //msg("Input size %d bytes\n",inputSize);
...@@ -3732,19 +3926,21 @@ int main(int argc,char **argv) ...@@ -3732,19 +3926,21 @@ int main(int argc,char **argv)
msg("Reading tag files\n"); msg("Reading tag files\n");
s=tagFileList.first(); s=Config::tagFileList.first();
while (s) while (s)
{ {
readTagFile(s); readTagFile(s);
s=tagFileList.next(); s=Config::tagFileList.next();
} }
QFile *tag =new QFile(genTagFile); QFile *tag =new QFile(Config::genTagFile);
if (genTagFile.length()>0) if (Config::genTagFile.length()>0)
{ {
if (!tag->open(IO_WriteOnly)) if (!tag->open(IO_WriteOnly))
{ {
err("Error: cannot open tag file %s for writing\n",genTagFile.data()); err("Error: cannot open tag file %s for writing\n",
Config::genTagFile.data()
);
exit(1); exit(1);
} }
tagFile.setDevice(tag); tagFile.setDevice(tag);
...@@ -3756,7 +3952,7 @@ int main(int argc,char **argv) ...@@ -3756,7 +3952,7 @@ int main(int argc,char **argv)
// Notice: the order of the function calls below is very important! // Notice: the order of the function calls below is very important!
if (generateHtml) if (Config::generateHtml)
{ {
msg("Reading formula repository...\n"); msg("Reading formula repository...\n");
readFormulaRepository(); readFormulaRepository();
...@@ -3801,7 +3997,6 @@ int main(int argc,char **argv) ...@@ -3801,7 +3997,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"); msg("Searching for documented variables...\n");
buildVarList(root); buildVarList(root);
...@@ -3910,31 +4105,31 @@ int main(int argc,char **argv) ...@@ -3910,31 +4105,31 @@ int main(int argc,char **argv)
outputList->writeStyleInfo(0); // write first part outputList->writeStyleInfo(0); // write first part
outputList->disableAllBut(OutputGenerator::Latex); outputList->disableAllBut(OutputGenerator::Latex);
parseText(*outputList, parseText(*outputList,
theTranslator->trGeneratedAt(dateToString(TRUE),projectName) theTranslator->trGeneratedAt(dateToString(TRUE),Config::projectName)
); );
outputList->writeStyleInfo(1); // write second part outputList->writeStyleInfo(1); // write second part
parseText(*outputList,theTranslator->trWrittenBy()); parseText(*outputList,theTranslator->trWrittenBy());
outputList->writeStyleInfo(2); // write third part outputList->writeStyleInfo(2); // write third part
parseText(*outputList, parseText(*outputList,
theTranslator->trGeneratedAt(dateToString(TRUE),projectName) theTranslator->trGeneratedAt(dateToString(TRUE),Config::projectName)
); );
outputList->writeStyleInfo(3); // write fourth part outputList->writeStyleInfo(3); // write fourth part
parseText(*outputList,theTranslator->trWrittenBy()); parseText(*outputList,theTranslator->trWrittenBy());
outputList->writeStyleInfo(4); // write last part outputList->writeStyleInfo(4); // write last part
outputList->enableAll(); outputList->enableAll();
if (formulaList.count()>0 && generateHtml) if (formulaList.count()>0 && Config::generateHtml)
{ {
msg("Generating bitmaps for formulas in HTML...\n"); msg("Generating bitmaps for formulas in HTML...\n");
formulaList.generateBitmaps(htmlOutputDir); formulaList.generateBitmaps(Config::htmlOutputDir);
} }
if (searchEngineFlag || tagFileList.count()>0) if (Config::searchEngineFlag || Config::tagFileList.count()>0)
{ {
msg("\nNow copy the file\n\n %s\n\nto the directory where the CGI binaries are " msg("\nNow copy the file\n\n %s\n\nto the directory where the CGI binaries are "
"located and don't forget to run\n\n",(htmlOutputDir+"/"+cgiName).data()); "located and don't forget to run\n\n",(Config::htmlOutputDir+"/"+Config::cgiName).data());
msg(" %s/installdox\n\nto replace any dummy links.\n\n", msg(" %s/installdox\n\nto replace any dummy links.\n\n",
htmlOutputDir.data()); Config::htmlOutputDir.data());
} }
delete tag; delete tag;
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#ifndef DOXYGEN_H #ifndef DOXYGEN_H
#define DOXYGEN_H #define DOXYGEN_H
#include "qtbc.h"
#include "groupdef.h" #include "groupdef.h"
#include "filedef.h" #include "filedef.h"
#include "classdef.h" #include "classdef.h"
...@@ -34,9 +35,9 @@ struct PageInfo ...@@ -34,9 +35,9 @@ struct PageInfo
{ {
PageInfo(const char *n,const char *d,const char *t) PageInfo(const char *n,const char *d,const char *t)
{ name=n; doc=d; title=t; } { name=n; doc=d; title=t; }
QString name; QCString name;
QString doc; QCString doc;
QString title; QCString title;
}; };
class PageList : public QList<PageInfo> class PageList : public QList<PageInfo>
...@@ -47,10 +48,10 @@ class PageList : public QList<PageInfo> ...@@ -47,10 +48,10 @@ class PageList : public QList<PageInfo>
} }
}; };
class BufStr : public QString class BufStr : public QCString
{ {
public: public:
BufStr(int size) : QString(size), offset(0), spareRoom(10240) {} BufStr(int size) : QCString(size), offset(0), spareRoom(10240) {}
void addChar(char c) void addChar(char c)
{ {
if (offset>=size()) resize(size()+spareRoom); if (offset>=size()) resize(size()+spareRoom);
...@@ -73,11 +74,11 @@ class BufStr : public QString ...@@ -73,11 +74,11 @@ class BufStr : public QString
const int spareRoom; // 10Kb extra room to avoid frequent resizing const int spareRoom; // 10Kb extra room to avoid frequent resizing
}; };
typedef QList<QString> StringList; typedef QList<QCString> StringList;
typedef QDict<MemberDef> MemberDict; typedef QDict<MemberDef> MemberDict;
typedef QDict<ClassDef> ClassDict; typedef QDict<ClassDef> ClassDict;
typedef QDict<FileDef> FileDict; typedef QDict<FileDef> FileDict;
typedef QDict<QString> StringDict; typedef QDict<QCString> StringDict;
typedef QDict<PageInfo> PageDict; typedef QDict<PageInfo> PageDict;
typedef QDict<GroupDef> GroupDict; typedef QDict<GroupDef> GroupDict;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# TMake project file for doxygen # TMake project file for doxygen
TEMPLATE = doxygen.t TEMPLATE = doxygen.t
CONFIG = console qt warn_on release #debug CONFIG = console qt warn_on release #debug
HEADERS = doxygen.h scanner.h classdef.h classlist.h memberdef.h \ HEADERS = doxygen.h scanner.h classdef.h classlist.h memberdef.h \
membername.h index.h memberlist.h definition.h \ membername.h index.h memberlist.h definition.h \
entry.h logos.h instdox.h message.h code.h \ entry.h logos.h instdox.h message.h code.h \
......
...@@ -259,7 +259,15 @@ void printSearchPage(bool open=FALSE) ...@@ -259,7 +259,15 @@ void printSearchPage(bool open=FALSE)
int readInt(FILE *f) int readInt(FILE *f)
{ {
return (fgetc(f)<<24)+(fgetc(f)<<16)+(fgetc(f)<<8)+fgetc(f); unsigned char c_24 = fgetc(f);
unsigned char c_16 = fgetc(f);
unsigned char c_08 = fgetc(f);
unsigned char c_00 = fgetc(f);
return ((unsigned int)c_24<<24)+
((unsigned int)c_16<<16)+
((unsigned int)c_08<<8)+
c_00;
//return (fgetc(f)<<24)+(fgetc(f)<<16)+(fgetc(f)<<8)+fgetc(f);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -755,10 +763,10 @@ void fileToBuf(const char *name, char **buf) ...@@ -755,10 +763,10 @@ void fileToBuf(const char *name, char **buf)
{ {
FILE *f; FILE *f;
struct stat file_stats; struct stat file_stats;
if ((f=fopen(name,"r"))==NULL) return; if ((f=fopen(name,"rb"))==NULL) return;
if (stat(name,&file_stats)==-1) if (stat(name,&file_stats)==-1)
{ {
message("Error: could not fstat header file %s\n",name); message("Error: could not fstat file %s\n",name);
exit(1); exit(1);
} }
unsigned int len=file_stats.st_size; unsigned int len=file_stats.st_size;
...@@ -769,7 +777,7 @@ void fileToBuf(const char *name, char **buf) ...@@ -769,7 +777,7 @@ void fileToBuf(const char *name, char **buf)
} }
if (fread(*buf,1,len,f)!=len) if (fread(*buf,1,len,f)!=len)
{ {
message("Error: could not read header file %s\n",name); message("Error: could not read file %s\n",name);
exit(1); exit(1);
} }
(*buf)[len]='\0'; (*buf)[len]='\0';
...@@ -808,12 +816,20 @@ void getConfig(const char *s) ...@@ -808,12 +816,20 @@ void getConfig(const char *s)
char headerFile[MAXSTRLEN]; char headerFile[MAXSTRLEN];
strcpy(headerFile,s); strcpy(headerFile,s);
#if defined(_WIN32)
strcat(headerFile,"\\header.html");
#else
strcat(headerFile,"/header.html"); strcat(headerFile,"/header.html");
#endif
fileToBuf(headerFile,&headerBuf); fileToBuf(headerFile,&headerBuf);
char footerFile[MAXSTRLEN]; char footerFile[MAXSTRLEN];
strcpy(footerFile,s); strcpy(footerFile,s);
#if defined(_WIN32)
strcat(footerFile,"\\footer.html");
#else
strcat(footerFile,"/footer.html"); strcat(footerFile,"/footer.html");
#endif
fileToBuf(footerFile,&footerBuf); fileToBuf(footerFile,&footerBuf);
} }
...@@ -908,16 +924,24 @@ int main(int argc,char **argv) ...@@ -908,16 +924,24 @@ int main(int argc,char **argv)
{ {
char configFile[MAXSTRLEN]; char configFile[MAXSTRLEN];
strcpy(configFile,argv[argIndex]); strcpy(configFile,argv[argIndex]);
#if defined(_WIN32)
strcat(configFile,"\\search.cfg");
#else
strcat(configFile,"/search.cfg"); strcat(configFile,"/search.cfg");
#endif
char indexFile[MAXSTRLEN]; char indexFile[MAXSTRLEN];
strcpy(indexFile,argv[argIndex]); strcpy(indexFile,argv[argIndex]);
#if defined(_WIN32)
strcat(indexFile,"\\search.idx");
#else
strcat(indexFile,"/search.idx"); strcat(indexFile,"/search.idx");
#endif
FileInfo *fi=fileList.add(); FileInfo *fi=fileList.add();
FILE *g; FILE *g;
if ((fi->f=fopen(indexFile,"r"))==NULL) if ((fi->f=fopen(indexFile,"rb"))==NULL)
{ {
message("Error: could not open index file %s\n",indexFile); message("Error: could not open index file %s\n",indexFile);
exit(1); exit(1);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <qstring.h> #include "qtbc.h"
#include <qstrlist.h> #include <qstrlist.h>
#include <qfileinf.h> #include <qfileinf.h>
#include <qfile.h> #include <qfile.h>
...@@ -38,16 +38,16 @@ ...@@ -38,16 +38,16 @@
struct MemberDef struct MemberDef
{ {
QString name; QCString name;
QString anchor; QCString anchor;
QString args; QCString args;
}; };
struct ClassDef struct ClassDef
{ {
QString name; QCString name;
QStrList bases; QStrList bases;
QString fileName; QCString fileName;
bool isFile; bool isFile;
QList<MemberDef> memberList; QList<MemberDef> memberList;
}; };
...@@ -61,19 +61,19 @@ static bool genTag; ...@@ -61,19 +61,19 @@ static bool genTag;
static bool genIndex; static bool genIndex;
static QStrList bases; static QStrList bases;
static QString inputString; static QCString inputString;
static int inputPosition; static int inputPosition;
static QString yyFileName; static QCString yyFileName;
static int yyLineNr; static int yyLineNr;
static QString classFile; static QCString classFile;
static QString memberRef; static QCString memberRef;
static QString memberName; static QCString memberName;
static QString memberArgs; static QCString memberArgs;
static QString className; static QCString className;
//static bool newClass; //static bool newClass;
static QString docBaseLink; static QCString docBaseLink;
static QString docAnchor; static QCString docAnchor;
static QString docRefName; static QCString docRefName;
static bool nameBug; static bool nameBug;
static SearchIndex searchIndex; static SearchIndex searchIndex;
...@@ -152,9 +152,9 @@ static void addReference() ...@@ -152,9 +152,9 @@ static void addReference()
} }
} }
QString unhtmlify(const char *str) QCString unhtmlify(const char *str)
{ {
QString result; QCString result;
const char *p=str; const char *p=str;
char c; char c;
while ((c=*p)!='\0') while ((c=*p)!='\0')
...@@ -236,7 +236,7 @@ QString unhtmlify(const char *str) ...@@ -236,7 +236,7 @@ QString unhtmlify(const char *str)
} }
<SkipPreformated>[^\<]+ <SkipPreformated>[^\<]+
<CheckConstructor>[a-z_A-Z0-9~:]+ { <CheckConstructor>[a-z_A-Z0-9~:]+ {
QString s=yytext; QCString s=yytext;
if (s.find("::")!=-1) if (s.find("::")!=-1)
{ {
docRefName=yytext; docRefName=yytext;
...@@ -401,7 +401,7 @@ QString unhtmlify(const char *str) ...@@ -401,7 +401,7 @@ QString unhtmlify(const char *str)
*/ */
void parse(QString &s) void parse(QCString &s)
{ {
bases.clear(); bases.clear();
nameBug = FALSE; nameBug = FALSE;
...@@ -425,7 +425,7 @@ void parseFile(QFileInfo &fi) ...@@ -425,7 +425,7 @@ void parseFile(QFileInfo &fi)
className.resize(0); className.resize(0);
memberName.resize(0); memberName.resize(0);
//printf("Parsing file %s...\n",fi.fileName().data()); //printf("Parsing file %s...\n",fi.fileName().data());
QString input(fi.size()+1); QCString input(fi.size()+1);
docBaseLink=fi.fileName(); docBaseLink=fi.fileName();
docRefName=fi.fileName().copy(); docRefName=fi.fileName().copy();
searchIndex.addReference(docRefName,docBaseLink); searchIndex.addReference(docRefName,docBaseLink);
...@@ -503,8 +503,8 @@ const char *getArg(int argc,char **argv,int &optind,const char c) ...@@ -503,8 +503,8 @@ const char *getArg(int argc,char **argv,int &optind,const char c)
int main(int argc,char **argv) int main(int argc,char **argv)
{ {
QString tagName; QCString tagName;
QString indexName; QCString indexName;
int optind=1; int optind=1;
const char *arg; const char *arg;
...@@ -554,7 +554,7 @@ int main(int argc,char **argv) ...@@ -554,7 +554,7 @@ int main(int argc,char **argv)
} }
if (genIndex) if (genIndex)
{ {
printf("Writing search index\n"); //printf("Writing search index\n");
if (!searchIndex.saveIndex(indexName)) if (!searchIndex.saveIndex(indexName))
{ {
fprintf(stderr,"Error: Could not write search index\n"); fprintf(stderr,"Error: Could not write search index\n");
...@@ -562,7 +562,7 @@ int main(int argc,char **argv) ...@@ -562,7 +562,7 @@ int main(int argc,char **argv)
QFileInfo fi(indexName); QFileInfo fi(indexName);
if (fi.exists()) if (fi.exists())
{ {
QString dir=fi.dir().absPath(); QCString dir=convertToQCString(fi.dir().absPath());
fi.setFile(dir+"/search.gif"); fi.setFile(dir+"/search.gif");
if (!fi.exists()) writeSearchButton(dir); if (!fi.exists()) writeSearchButton(dir);
fi.setFile(dir+"/doxygen.gif"); fi.setFile(dir+"/doxygen.gif");
......
...@@ -16,31 +16,32 @@ ...@@ -16,31 +16,32 @@
#include "entry.h" #include "entry.h"
static int newCount=0; int Entry::num=0;
Entry::Entry() Entry::Entry()
{ {
num=newCount++; num++;
//printf("New Entry %d\n",num); //printf("New Entry %d\n",num);
parent=0; parent=0;
sublist = new QList<Entry>; sublist = new QList<Entry>;
sublist->setAutoDelete(TRUE); sublist->setAutoDelete(TRUE);
extends = new QList<BaseInfo>; extends = new QList<BaseInfo>;
extends->setAutoDelete(TRUE); extends->setAutoDelete(TRUE);
groups = new QList<QString>; groups = new QList<QCString>;
groups->setAutoDelete(TRUE); groups->setAutoDelete(TRUE);
anchors = new QList<QString>; anchors = new QList<QCString>;
anchors->setAutoDelete(TRUE); anchors->setAutoDelete(TRUE);
argList = new ArgumentList; argList = new ArgumentList;
argList->setAutoDelete(TRUE); argList->setAutoDelete(TRUE);
//printf("Entry::Entry() tArgList=0\n"); //printf("Entry::Entry() tArgList=0\n");
tArgList = 0; tArgList = 0;
mGrpId = -1;
reset(); reset();
} }
Entry::Entry(const Entry &e) Entry::Entry(const Entry &e)
{ {
num=newCount++; num++;
//printf("Copy New Entry %d\n",num); //printf("Copy New Entry %d\n",num);
section = e.section; section = e.section;
protection = e.protection; protection = e.protection;
...@@ -62,13 +63,14 @@ Entry::Entry(const Entry &e) ...@@ -62,13 +63,14 @@ Entry::Entry(const Entry &e)
inside = e.inside.copy(); inside = e.inside.copy();
fileName = e.fileName.copy(); fileName = e.fileName.copy();
startLine = e.startLine; startLine = e.startLine;
mGrpId = e.mGrpId;
sublist = new QList<Entry>; sublist = new QList<Entry>;
sublist->setAutoDelete(TRUE); sublist->setAutoDelete(TRUE);
extends = new QList<BaseInfo>; extends = new QList<BaseInfo>;
extends->setAutoDelete(TRUE); extends->setAutoDelete(TRUE);
groups = new QList<QString>; groups = new QList<QCString>;
groups->setAutoDelete(TRUE); groups->setAutoDelete(TRUE);
anchors = new QList<QString>; anchors = new QList<QCString>;
anchors->setAutoDelete(TRUE); anchors->setAutoDelete(TRUE);
argList = new ArgumentList; argList = new ArgumentList;
argList->setAutoDelete(TRUE); argList->setAutoDelete(TRUE);
...@@ -92,17 +94,17 @@ Entry::Entry(const Entry &e) ...@@ -92,17 +94,17 @@ Entry::Entry(const Entry &e)
} }
// deep copy group list // deep copy group list
QListIterator<QString> sli(*e.groups); QListIterator<QCString> sli(*e.groups);
QString *s; QCString *s;
for (;(s=sli.current());++sli) for (;(s=sli.current());++sli)
{ {
groups->append(new QString(*s)); groups->append(new QCString(*s));
} }
QListIterator<QString> sli2(*e.anchors); QListIterator<QCString> sli2(*e.anchors);
for (;(s=sli2.current());++sli2) for (;(s=sli2.current());++sli2)
{ {
anchors->append(new QString(*s)); anchors->append(new QCString(*s));
} }
// deep copy argument list // deep copy argument list
...@@ -140,8 +142,8 @@ Entry::~Entry() ...@@ -140,8 +142,8 @@ Entry::~Entry()
delete groups; delete groups;
delete anchors; delete anchors;
delete argList; delete argList;
//printf("Entry::~Entry() tArgList=%p\n",tArgList);
delete tArgList; delete tArgList;
num--;
} }
void Entry::addSubEntry(Entry *current) void Entry::addSubEntry(Entry *current)
...@@ -171,6 +173,7 @@ void Entry::reset() ...@@ -171,6 +173,7 @@ void Entry::reset()
args.resize(0); args.resize(0);
exception.resize(0); exception.resize(0);
program.resize(0); program.resize(0);
body.resize(0);
includeFile.resize(0); includeFile.resize(0);
includeName.resize(0); includeName.resize(0);
doc.resize(0); doc.resize(0);
...@@ -178,6 +181,7 @@ void Entry::reset() ...@@ -178,6 +181,7 @@ void Entry::reset()
brief.resize(0); brief.resize(0);
inside.resize(0); inside.resize(0);
fileName.resize(0); fileName.resize(0);
mGrpId = -1;
section = EMPTY_SEC; section = EMPTY_SEC;
sig = FALSE; sig = FALSE;
virt = Normal; virt = Normal;
...@@ -202,6 +206,7 @@ int Entry::getSize() ...@@ -202,6 +206,7 @@ int Entry::getSize()
size+=args.length()+1; size+=args.length()+1;
size+=exception.length()+1; size+=exception.length()+1;
size+=program.length()+1; size+=program.length()+1;
size+=body.length()+1;
size+=includeFile.length()+1; size+=includeFile.length()+1;
size+=includeName.length()+1; size+=includeName.length()+1;
size+=doc.length()+1; size+=doc.length()+1;
...@@ -216,7 +221,7 @@ int Entry::getSize() ...@@ -216,7 +221,7 @@ int Entry::getSize()
size+=bi->name.length()+1+sizeof(bi->prot)+sizeof(bi->virt); size+=bi->name.length()+1+sizeof(bi->prot)+sizeof(bi->virt);
bi=extends->next(); bi=extends->next();
} }
QString *s=groups->first(); QCString *s=groups->first();
while (s) while (s)
{ {
size+=sizeof(QLNode); size+=sizeof(QLNode);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef ENTRY_H #ifndef ENTRY_H
#define ENTRY_H #define ENTRY_H
#include <qstring.h> #include "qtbc.h"
#include <qlist.h> #include <qlist.h>
enum Protection { Public, Protected, Private } ; enum Protection { Public, Protected, Private } ;
...@@ -26,7 +26,7 @@ enum Specifier { Normal, Virtual, Pure } ; ...@@ -26,7 +26,7 @@ enum Specifier { Normal, Virtual, Pure } ;
struct BaseInfo struct BaseInfo
{ {
BaseInfo(const char *n,Protection p,Specifier v) : name(n),prot(p),virt(v) {} BaseInfo(const char *n,Protection p,Specifier v) : name(n),prot(p),virt(v) {}
QString name; // the name of the base class QCString name; // the name of the base class
Protection prot; // inheritance type Protection prot; // inheritance type
Specifier virt; // virtualness Specifier virt; // virtualness
}; };
...@@ -51,9 +51,9 @@ struct Argument ...@@ -51,9 +51,9 @@ struct Argument
return *this; return *this;
} }
QString type; // argument type QCString type; // argument type
QString name; // argument name (if any) QCString name; // argument name (if any)
QString defval; // argument default value (if any) QCString defval; // argument default value (if any)
}; };
class ArgumentList : public QList<Argument> class ArgumentList : public QList<Argument>
...@@ -115,35 +115,37 @@ class Entry ...@@ -115,35 +115,37 @@ class Entry
void addSubEntry (Entry* e) ; void addSubEntry (Entry* e) ;
void reset(); void reset();
int section; // entry type; int section; // entry type (see Sections);
Protection protection; // class protection Protection protection; // class protection
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 proto; // prototype ? bool proto; // prototype ?
Specifier virt; // virtualness of the entry Specifier virt; // virtualness of the entry
Entry *parent; // parent node in the tree Entry *parent; // parent node in the tree
QString type; // member type QCString type; // member type
QString name; // member name QCString name; // member name
QString args; // member argument string QCString args; // member argument string
ArgumentList *argList; // member arguments as a list ArgumentList *argList; // member arguments as a list
ArgumentList *tArgList; // template argument list ArgumentList *tArgList; // template argument list
ArgumentList *tNameList; // template name list QCString program; // the program text
QString program; // the program text QCString body; // the function body
QString includeFile; // include file (2 arg of \class, must be unique) QCString includeFile; // include file (2 arg of \class, must be unique)
QString includeName; // include name (3 arg of \class) QCString includeName; // include name (3 arg of \class)
QString doc; // documentation block (partly parsed) QCString doc; // documentation block (partly parsed)
QString relates; // related class (doc block) QCString relates; // related class (doc block)
QString brief; // brief description (doc block) QCString brief; // brief description (doc block)
QString inside; // name of the class in which documents are found QCString inside; // name of the class in which documents are found
QString exception; // throw specification QCString exception; // throw specification
int mGrpId; // member group id
QCString mGrpHeader; // member group header
QList<Entry> *sublist; // entries that are children of this one QList<Entry> *sublist; // entries that are children of this one
QList<BaseInfo> *extends; // list of base classes QList<BaseInfo> *extends; // list of base classes
QList<QString> *groups; // list of groups this entry belongs to QList<QCString> *groups; // list of groups this entry belongs to
QList<QString> *anchors; // list of anchors defined in this entry QList<QCString> *anchors; // list of anchors defined in this entry
QString fileName; // file this entry was extracted from QCString fileName; // file this entry was extracted from
int startLine; // start line of entry in the source int startLine; // start line of entry in the source
int num; static int num; // counts the total number of entries
private: private:
Entry &operator=(const Entry &); Entry &operator=(const Entry &);
} ; } ;
......
...@@ -17,16 +17,16 @@ ...@@ -17,16 +17,16 @@
#ifndef EXAMPLE_H #ifndef EXAMPLE_H
#define EXAMPLE_H #define EXAMPLE_H
#include <qstring.h> #include "qtbc.h"
class ClassDef; class ClassDef;
class MemberName; class MemberName;
struct Example struct Example
{ {
QString anchor; QCString anchor;
QString name; QCString name;
QString file; QCString file;
}; };
class ExampleList : public QList<Example> class ExampleList : public QList<Example>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
* *
*/ */
#include "qtbc.h"
#include "memberlist.h" #include "memberlist.h"
#include "classlist.h" #include "classlist.h"
#include "define.h" #include "define.h"
...@@ -66,14 +67,14 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -66,14 +67,14 @@ void FileDef::writeDocumentation(OutputList &ol)
{ {
//funcList->countDecMembers(); //funcList->countDecMembers();
QString pageTitle=name()+" File Reference"; QCString pageTitle=name()+" File Reference";
startFile(ol,diskname,pageTitle); startFile(ol,diskname,pageTitle);
startTitle(ol); startTitle(ol);
parseText(ol,theTranslator->trFileReference(name())); parseText(ol,theTranslator->trFileReference(name()));
endTitle(ol,name()); endTitle(ol,name());
//ol.newParagraph(); //ol.newParagraph();
if (genTagFile.length()>0) tagFile << "&" << name() << ":\n"; if (Config::genTagFile.length()>0) tagFile << "&" << name() << ":\n";
//brief=brief.stripWhiteSpace(); //brief=brief.stripWhiteSpace();
//int bl=brief.length(); //int bl=brief.length();
...@@ -97,17 +98,53 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -97,17 +98,53 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.writeSynopsis(); ol.writeSynopsis();
ol.startMemberSections(); ol.startMemberSections();
if (namespaceList->count()>0)
{
NamespaceDef *nd=namespaceList->first();
bool found=FALSE;
while (nd)
{
if (nd->isVisibleExt())
{
if (!found)
{
ol.startMemberHeader();
parseText(ol,theTranslator->trNamespaces());
ol.endMemberHeader();
ol.startMemberList();
found=TRUE;
}
ol.startMemberItem();
ol.writeString("namespace ");
ol.insertMemberAlign();
if (nd->hasDocumentation())
{
ol.writeObjectLink(nd->getReference(),
nd->getOutputFileBase(),
0,
nd->name()
);
}
else
{
ol.startBold();
ol.docify(nd->name());
ol.endBold();
}
ol.endMemberItem();
}
nd=namespaceList->next();
}
if (found) ol.endMemberList();
}
if (classList->count()>0) if (classList->count()>0)
{ {
ClassDef *cd=classList->first(); ClassDef *cd=classList->first();
bool found=FALSE; bool found=FALSE;
while (cd) while (cd)
{ {
if (//cd->name()[0]!='@' && if ( cd->isVisibleExt() )
//(cd->protection()!=Private || extractPrivateFlag) &&
//(cd->hasDocumentation() || !hideClassFlag))
cd->isVisibleExt()
)
{ {
if (!found) if (!found)
{ {
...@@ -247,7 +284,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -247,7 +284,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor()); parseText(ol,theTranslator->trAuthor());
ol.endGroupHeader(); ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(projectName)); parseText(ol,theTranslator->trGeneratedAutomatically(Config::projectName));
ol.enableAll(); ol.enableAll();
endFile(ol); endFile(ol);
} }
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#ifndef FILEDEF_H #ifndef FILEDEF_H
#define FILEDEF_H #define FILEDEF_H
#include <qlist.h>
#include "index.h" #include "index.h"
#include <qlist.h>
#include "config.h" #include "config.h"
#include "definition.h" #include "definition.h"
...@@ -53,9 +53,9 @@ class FileDef : public Definition ...@@ -53,9 +53,9 @@ class FileDef : public Definition
~FileDef(); ~FileDef();
/*! Returns the unique file name (this may include part of the path). */ /*! Returns the unique file name (this may include part of the path). */
QString name() const QCString name() const
{ {
if (fullPathNameFlag) if (Config::fullPathNameFlag)
return filename; return filename;
else else
return Definition::name(); return Definition::name();
...@@ -63,10 +63,10 @@ class FileDef : public Definition ...@@ -63,10 +63,10 @@ class FileDef : public Definition
/*! Returns nameString with all slashes replaced by underscores. */ /*! Returns nameString with all slashes replaced by underscores. */
//const char *diskName() const { return diskname; } //const char *diskName() const { return diskname; }
QString getOutputFileBase() const { return diskname; } QCString getOutputFileBase() const { return diskname; }
/*! Returns the absolute path including the file name. */ /*! Returns the absolute path including the file name. */
QString absFilePath() const { return filepath; } QCString absFilePath() const { return filepath; }
/*! Returns the name of the verbatim copy of this file (if any). */ /*! Returns the name of the verbatim copy of this file (if any). */
const char *includeName() const { return incName; } const char *includeName() const { return incName; }
...@@ -87,7 +87,7 @@ class FileDef : public Definition ...@@ -87,7 +87,7 @@ class FileDef : public Definition
//void setDocumentation(const char *d) { doc=d; } //void setDocumentation(const char *d) { doc=d; }
/*! Returns the absolute path of this file. */ /*! Returns the absolute path of this file. */
QString getPath() const { return path; } QCString getPath() const { return path; }
/*! Returns true iff any documentation for this file is found. */ /*! Returns true iff any documentation for this file is found. */
//bool hasDocumentation() //bool hasDocumentation()
...@@ -117,15 +117,15 @@ class FileDef : public Definition ...@@ -117,15 +117,15 @@ class FileDef : public Definition
FileList *includeList; FileList *includeList;
NamespaceList *namespaceList; NamespaceList *namespaceList;
DefineList *defineList; DefineList *defineList;
//QString n; //QCString n;
//QString doc; //QCString doc;
//QString brief; //QCString brief;
QString reference; QCString reference;
QString path; QCString path;
QString filepath; QCString filepath;
QString diskname; QCString diskname;
QString filename; QCString filename;
QString incName; QCString incName;
//FileType ftype; //FileType ftype;
}; };
......
...@@ -26,9 +26,9 @@ FileName::~FileName() ...@@ -26,9 +26,9 @@ FileName::~FileName()
{ {
} }
//static QString convertSlashes(const char *s) //static QCString convertSlashes(const char *s)
//{ //{
// QString result=s; // QCString result=s;
// int i,l=result.length(); // int i,l=result.length();
// for (i=0;i<l;i++) if (result.at(i)=='/') result.at(i)='_'; // for (i=0;i<l;i++) if (result.at(i)=='/') result.at(i)='_';
// return result; // return result;
...@@ -36,7 +36,7 @@ FileName::~FileName() ...@@ -36,7 +36,7 @@ FileName::~FileName()
void FileName::generateDiskNames() void FileName::generateDiskNames()
{ {
QString commonPrefix; QCString commonPrefix;
FileDef *fd=first(); FileDef *fd=first();
int count=0; int count=0;
while (fd) { if (!fd->isReference()) count++; fd=next(); } while (fd) { if (!fd->isReference()) count++; fd=next(); }
...@@ -66,8 +66,8 @@ void FileName::generateDiskNames() ...@@ -66,8 +66,8 @@ void FileName::generateDiskNames()
//printf("i=%d fd->path=`%s' fd->name=`%s'\n",i,fd->path.data(),fd->name().data()); //printf("i=%d fd->path=`%s' fd->name=`%s'\n",i,fd->path.data(),fd->name().data());
if (i==(int)fd->path.length()) if (i==(int)fd->path.length())
{ {
warning("Warning: Input file found multiple times!\n" warning("Warning: Input file %s found multiple times!\n"
" The generated documentation for this file may not be correct!\n"); " The generated documentation for this file may not be correct!\n",fd->absFilePath().data());
found=TRUE; found=TRUE;
} }
else if (fd->path[i]!=c) else if (fd->path[i]!=c)
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#ifndef FILENAME_H #ifndef FILENAME_H
#define FILENAME_H #define FILENAME_H
#include "qtbc.h"
#include <qdict.h> #include <qdict.h>
#include "filedef.h" #include "filedef.h"
...@@ -30,7 +31,7 @@ class FileName : public QList<FileDef> ...@@ -30,7 +31,7 @@ class FileName : public QList<FileDef>
int compareItems(GCI item1,GCI item2); int compareItems(GCI item1,GCI item2);
private: private:
QString name; QCString name;
}; };
class FileNameIterator : public QListIterator<FileDef> class FileNameIterator : public QListIterator<FileDef>
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include "qtbc.h"
#include <qfile.h> #include <qfile.h>
#include <qtstream.h> #include <qtstream.h>
#include <qfileinf.h> #include <qfileinf.h>
...@@ -49,12 +50,12 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -49,12 +50,12 @@ void FormulaList::generateBitmaps(const char *path)
QDir d(path); QDir d(path);
// store the original directory // store the original directory
if (!d.exists()) { err("Error: Output dir %s does not exist!\n",path); exit(1); } if (!d.exists()) { err("Error: Output dir %s does not exist!\n",path); exit(1); }
QString oldDir = QDir::currentDirPath().copy(); QCString oldDir = convertToQCString(QDir::currentDirPath());
// goto the html output directory (i.e. path) // goto the html output directory (i.e. path)
QDir::setCurrent(d.absPath()); QDir::setCurrent(d.absPath());
QDir thisDir; QDir thisDir;
// generate a latex file containing one formula per page. // generate a latex file containing one formula per page.
QString texName="_formulas.tex"; QCString texName="_formulas.tex";
QList<int> pagesToGenerate; QList<int> pagesToGenerate;
pagesToGenerate.setAutoDelete(TRUE); pagesToGenerate.setAutoDelete(TRUE);
FormulaListIterator fli(*this); FormulaListIterator fli(*this);
...@@ -70,7 +71,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -70,7 +71,7 @@ void FormulaList::generateBitmaps(const char *path)
int page=0; int page=0;
for (fli.toFirst();(formula=fli.current());++fli) for (fli.toFirst();(formula=fli.current());++fli)
{ {
QString resultName; QCString resultName;
resultName.sprintf("form-%d.gif",formula->getId()); resultName.sprintf("form-%d.gif",formula->getId());
// only formulas for which no image exists are generated // only formulas for which no image exists are generated
QFileInfo fi(resultName); QFileInfo fi(resultName);
...@@ -99,7 +100,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -99,7 +100,7 @@ void FormulaList::generateBitmaps(const char *path)
int pageNum=*pagePtr; int pageNum=*pagePtr;
msg("Generating image form-%d.gif for formula\n",pageNum); msg("Generating image form-%d.gif for formula\n",pageNum);
char dviCmd[256]; char dviCmd[256];
QString formBase; QCString formBase;
formBase.sprintf("_form%d",pageNum); formBase.sprintf("_form%d",pageNum);
// run dvips to convert the page with number pageIndex to an // run dvips to convert the page with number pageIndex to an
// encapsulated postscript. // encapsulated postscript.
...@@ -110,7 +111,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -110,7 +111,7 @@ void FormulaList::generateBitmaps(const char *path)
QFileInfo fi(formBase+".eps"); QFileInfo fi(formBase+".eps");
if (fi.exists()) if (fi.exists())
{ {
QString eps = fileToString(formBase+".eps"); QCString eps = fileToString(formBase+".eps");
int i=eps.find("%%BoundingBox:"); int i=eps.find("%%BoundingBox:");
if (i!=-1) if (i!=-1)
{ {
...@@ -162,7 +163,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -162,7 +163,7 @@ void FormulaList::generateBitmaps(const char *path)
if (f.open(IO_ReadOnly)) if (f.open(IO_ReadOnly))
{ {
QTextStream t(&f); QTextStream t(&f);
QString s; QCString s;
if (!t.eof()) if (!t.eof())
s=t.readLine(); s=t.readLine();
if (s.length()<2 || s.left(2)!="P6") if (s.length()<2 || s.left(2)!="P6")
...@@ -233,7 +234,7 @@ void FormulaList::generateBitmaps(const char *path) ...@@ -233,7 +234,7 @@ void FormulaList::generateBitmaps(const char *path)
} }
} }
// save the result as a gif // save the result as a gif
QString resultName; QCString resultName;
resultName.sprintf("form-%d.gif",pageNum); resultName.sprintf("form-%d.gif",pageNum);
// the option parameter 1 is used here as a temporary hack // the option parameter 1 is used here as a temporary hack
// to select the right color palette! // to select the right color palette!
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef FORMULA_H #ifndef FORMULA_H
#define FORMULA_H #define FORMULA_H
#include <qstring.h> #include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
...@@ -27,11 +27,11 @@ class Formula ...@@ -27,11 +27,11 @@ class Formula
Formula(const char *text); Formula(const char *text);
~Formula(); ~Formula();
int getId(); int getId();
QString getFormulaText() const { return form; } QCString getFormulaText() const { return form; }
private: private:
int number; int number;
QString form; QCString form;
}; };
class FormulaList : public QList<Formula> class FormulaList : public QList<Formula>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <ctype.h> #include <ctype.h>
#include "qtbc.h"
#include "groupdef.h" #include "groupdef.h"
#include "classdef.h" #include "classdef.h"
#include "filedef.h" #include "filedef.h"
...@@ -118,7 +119,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -118,7 +119,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ClassDef *cd=classList->first(); ClassDef *cd=classList->first();
while (cd) while (cd)
{ {
QString type; QCString type;
switch (cd->compoundType()) switch (cd->compoundType())
{ {
case ClassDef::Class: type="class"; break; case ClassDef::Class: type="class"; break;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef GROUPDEF_H #ifndef GROUPDEF_H
#define GROUPDEF_H #define GROUPDEF_H
#include <qstring.h> #include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include "definition.h" #include "definition.h"
...@@ -36,7 +36,7 @@ class GroupDef : public Definition ...@@ -36,7 +36,7 @@ class GroupDef : public Definition
GroupDef(const char *name,const char *title); GroupDef(const char *name,const char *title);
~GroupDef(); ~GroupDef();
//const char *groupFile() const { return fileName; } //const char *groupFile() const { return fileName; }
QString getOutputFileBase() const { return fileName; } QCString getOutputFileBase() const { return fileName; }
const char *groupTitle() const { return title; } const char *groupTitle() const { return title; }
void addFile(const FileDef *def); void addFile(const FileDef *def);
void addClass(const ClassDef *def); void addClass(const ClassDef *def);
...@@ -45,8 +45,8 @@ class GroupDef : public Definition ...@@ -45,8 +45,8 @@ class GroupDef : public Definition
int countMembers() const; int countMembers() const;
private: private:
QString title; // title of the group QCString title; // title of the group
QString fileName; // base name of the generated file QCString fileName; // base name of the generated file
FileList *fileList; // list of all files in the group FileList *fileList; // list of all files in the group
ClassList *classList; // list of all classes in the group ClassList *classList; // list of all classes in the group
NamespaceList *namespaceList; // list of all namespace in the group NamespaceList *namespaceList; // list of all namespace in the group
......
...@@ -14,8 +14,10 @@ ...@@ -14,8 +14,10 @@
* *
*/ */
#include <qdir.h>
#include <stdlib.h> #include <stdlib.h>
#include "qtbc.h"
#include <qdir.h>
#include "message.h" #include "message.h"
#include "htmlgen.h" #include "htmlgen.h"
#include "config.h" #include "config.h"
...@@ -26,9 +28,9 @@ ...@@ -26,9 +28,9 @@
HtmlGenerator::HtmlGenerator() : OutputGenerator() HtmlGenerator::HtmlGenerator() : OutputGenerator()
{ {
if (headerFile.length()>0) header=fileToString(headerFile); if (Config::headerFile.length()>0) header=fileToString(Config::headerFile);
if (footerFile.length()>0) footer=fileToString(footerFile); if (Config::footerFile.length()>0) footer=fileToString(Config::footerFile);
dir=htmlOutputDir; dir=Config::htmlOutputDir;
} }
HtmlGenerator::~HtmlGenerator() HtmlGenerator::~HtmlGenerator()
...@@ -42,18 +44,18 @@ void HtmlGenerator::append(const OutputGenerator *g) ...@@ -42,18 +44,18 @@ void HtmlGenerator::append(const OutputGenerator *g)
void HtmlGenerator::init() void HtmlGenerator::init()
{ {
QDir d(htmlOutputDir); QDir d(Config::htmlOutputDir);
if (!d.exists() && !d.mkdir(htmlOutputDir)) if (!d.exists() && !d.mkdir(Config::htmlOutputDir))
{ {
err("Could not create output directory %s\n",htmlOutputDir.data()); err("Could not create output directory %s\n",Config::htmlOutputDir.data());
exit(1); exit(1);
} }
writeLogo(htmlOutputDir); writeLogo(Config::htmlOutputDir);
} }
void HtmlGenerator::startFile(const char *name,const char *title,bool external) void HtmlGenerator::startFile(const char *name,const char *title,bool external)
{ {
QString fileName=name; QCString fileName=name;
lastTitle=title; lastTitle=title;
if (fileName.right(5)!=".html") fileName+=".html"; if (fileName.right(5)!=".html") fileName+=".html";
startPlainFile(fileName); startPlainFile(fileName);
...@@ -156,7 +158,9 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -156,7 +158,9 @@ void HtmlGenerator::writeStyleInfo(int part)
if (part==0) if (part==0)
{ {
startPlainFile("doxygen.css"); startPlainFile("doxygen.css");
t << "H1 { border-width: thin; border: solid; text-align: center }" << endl t
//<< "H1 { border-width: thin; border: solid; text-align: center }" << endl
<< "H1 { text-align: center }" << endl
<< "A.el { text-decoration: none; font-weight: bold }" << endl << "A.el { text-decoration: none; font-weight: bold }" << endl
<< "DL.el { margin-left: -1cm }" << endl << "DL.el { margin-left: -1cm }" << endl
<< "DIV.fragment { width: 100%; border: none; background-color: #eeeeee }" << endl << "DIV.fragment { width: 100%; border: none; background-color: #eeeeee }" << endl
...@@ -274,7 +278,7 @@ void HtmlGenerator::writeSection(const char *lab,const char *title,bool sub) ...@@ -274,7 +278,7 @@ void HtmlGenerator::writeSection(const char *lab,const char *title,bool sub)
void HtmlGenerator::writeSectionRef(const char *name,const char *lab, void HtmlGenerator::writeSectionRef(const char *name,const char *lab,
const char *title) const char *title)
{ {
QString refName=name; QCString refName=name;
if (refName.right(5)!=".html") refName+=".html"; if (refName.right(5)!=".html") refName+=".html";
t << "<a href=\"" << refName << "#" << lab << "\">"; t << "<a href=\"" << refName << "#" << lab << "\">";
docify(title); docify(title);
...@@ -284,7 +288,7 @@ void HtmlGenerator::writeSectionRef(const char *name,const char *lab, ...@@ -284,7 +288,7 @@ void HtmlGenerator::writeSectionRef(const char *name,const char *lab,
void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab, void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
const char *title) const char *title)
{ {
QString refName=name; QCString refName=name;
if (refName.right(5)!=".html") refName+=".html"; if (refName.right(5)!=".html") refName+=".html";
t << "<a href=\"" << refName << "#" << lab << "\">"; t << "<a href=\"" << refName << "#" << lab << "\">";
docify(title); docify(title);
...@@ -356,7 +360,7 @@ void HtmlGenerator::endClassDiagram(ClassDiagram &d, ...@@ -356,7 +360,7 @@ void HtmlGenerator::endClassDiagram(ClassDiagram &d,
void HtmlGenerator::startColorFont(uchar red,uchar green,uchar blue) void HtmlGenerator::startColorFont(uchar red,uchar green,uchar blue)
{ {
QString colorString; QCString colorString;
colorString.sprintf("%02x%02x%02x",red,green,blue); colorString.sprintf("%02x%02x%02x",red,green,blue);
t << "<font color=\"#" << colorString << "\">"; t << "<font color=\"#" << colorString << "\">";
} }
...@@ -370,12 +374,12 @@ void HtmlGenerator::writeFormula(const char *n,const char *text) ...@@ -370,12 +374,12 @@ void HtmlGenerator::writeFormula(const char *n,const char *text)
{ {
if (text && text[0]=='\\') t << "<p><center>" << endl; if (text && text[0]=='\\') t << "<p><center>" << endl;
t << "<img align=\"top\" src=\"" << n << "\">" << endl; t << "<img align=\"top\" src=\"" << n << "\">" << endl;
if (text && text[0]=='\\') t << "</center></p>" << endl; if (text && text[0]=='\\') t << "</center><p>" << endl;
} }
void HtmlGenerator::startMemberList() void HtmlGenerator::startMemberList()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
//t << endl << "<p><table border=0 cellspacing=2 cellpadding=0>" << endl; //t << endl << "<p><table border=0 cellspacing=2 cellpadding=0>" << endl;
} }
...@@ -387,7 +391,7 @@ void HtmlGenerator::startMemberList() ...@@ -387,7 +391,7 @@ void HtmlGenerator::startMemberList()
void HtmlGenerator::endMemberList() void HtmlGenerator::endMemberList()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
//t << "</table>" << endl; //t << "</table>" << endl;
} }
...@@ -399,7 +403,7 @@ void HtmlGenerator::endMemberList() ...@@ -399,7 +403,7 @@ void HtmlGenerator::endMemberList()
void HtmlGenerator::startMemberItem() void HtmlGenerator::startMemberItem()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "<tr><td align=right valign=top>"; t << "<tr><td align=right valign=top>";
} }
...@@ -411,15 +415,15 @@ void HtmlGenerator::startMemberItem() ...@@ -411,15 +415,15 @@ void HtmlGenerator::startMemberItem()
void HtmlGenerator::insertMemberAlign() void HtmlGenerator::insertMemberAlign()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "</td><td valign=top>"; t << "&nbsp;</td><td valign=top>";
} }
} }
void HtmlGenerator::endMemberItem() void HtmlGenerator::endMemberItem()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "</td></tr>"; t << "</td></tr>";
} }
...@@ -428,7 +432,7 @@ void HtmlGenerator::endMemberItem() ...@@ -428,7 +432,7 @@ void HtmlGenerator::endMemberItem()
void HtmlGenerator::startMemberDescription() void HtmlGenerator::startMemberDescription()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "<tr><td></td><td><font size=-1><em>"; t << "<tr><td></td><td><font size=-1><em>";
} }
...@@ -440,7 +444,7 @@ void HtmlGenerator::startMemberDescription() ...@@ -440,7 +444,7 @@ void HtmlGenerator::startMemberDescription()
void HtmlGenerator::endMemberDescription() void HtmlGenerator::endMemberDescription()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "</em></font><br><br></td></tr>" << endl; t << "</em></font><br><br></td></tr>" << endl;
} }
...@@ -452,7 +456,7 @@ void HtmlGenerator::endMemberDescription() ...@@ -452,7 +456,7 @@ void HtmlGenerator::endMemberDescription()
void HtmlGenerator::startMemberSections() void HtmlGenerator::startMemberSections()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "<table border=0 cellpadding=0 cellspacing=1>" << endl; t << "<table border=0 cellpadding=0 cellspacing=1>" << endl;
} }
...@@ -460,7 +464,7 @@ void HtmlGenerator::startMemberSections() ...@@ -460,7 +464,7 @@ void HtmlGenerator::startMemberSections()
void HtmlGenerator::endMemberSections() void HtmlGenerator::endMemberSections()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "</table>" << endl; t << "</table>" << endl;
} }
...@@ -468,7 +472,7 @@ void HtmlGenerator::endMemberSections() ...@@ -468,7 +472,7 @@ void HtmlGenerator::endMemberSections()
void HtmlGenerator::startMemberHeader() void HtmlGenerator::startMemberHeader()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "<tr><td colspan=2><br><h2>"; t << "<tr><td colspan=2><br><h2>";
} }
...@@ -480,7 +484,7 @@ void HtmlGenerator::startMemberHeader() ...@@ -480,7 +484,7 @@ void HtmlGenerator::startMemberHeader()
void HtmlGenerator::endMemberHeader() void HtmlGenerator::endMemberHeader()
{ {
if (htmlAlignMemberFlag) if (Config::htmlAlignMemberFlag)
{ {
t << "</h2></td></tr>" << endl; t << "</h2></td></tr>" << endl;
} }
...@@ -490,3 +494,13 @@ void HtmlGenerator::endMemberHeader() ...@@ -490,3 +494,13 @@ void HtmlGenerator::endMemberHeader()
} }
} }
void HtmlGenerator::startMemberSubtitle()
{
if (Config::htmlAlignMemberFlag) t << "<tr><td colspan=2>";
}
void HtmlGenerator::endMemberSubtitle()
{
if (Config::htmlAlignMemberFlag) t << "<br><br></td></tr>" << endl;
}
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#ifndef HTMLGEN_H #ifndef HTMLGEN_H
#define HTMLGEN_H #define HTMLGEN_H
#include "qtbc.h"
#include "outputgen.h" #include "outputgen.h"
class QFile; class QFile;
...@@ -85,6 +86,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -85,6 +86,8 @@ class HtmlGenerator : public OutputGenerator
void endMemberSections(); void endMemberSections();
void startMemberHeader(); void startMemberHeader();
void endMemberHeader(); void endMemberHeader();
void startMemberSubtitle();
void endMemberSubtitle();
void startMemberList(); void startMemberList();
void endMemberList(); void endMemberList();
void startMemberItem(); void startMemberItem();
...@@ -169,9 +172,9 @@ class HtmlGenerator : public OutputGenerator ...@@ -169,9 +172,9 @@ class HtmlGenerator : public OutputGenerator
//static void docifyStatic(QTextStream &t,const char *str); //static void docifyStatic(QTextStream &t,const char *str);
private: private:
QString header; QCString header;
QString footer; QCString footer;
QString lastTitle; QCString lastTitle;
HtmlGenerator &operator=(const HtmlGenerator &g); HtmlGenerator &operator=(const HtmlGenerator &g);
HtmlGenerator(const HtmlGenerator &g); HtmlGenerator(const HtmlGenerator &g);
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
* *
*/ */
#include "qtbc.h"
#include "image.h" #include "image.h"
#include "gifenc.h" #include "gifenc.h"
#include <qglobal.h> #include <qglobal.h>
#include <qstring.h>
const int charSetWidth=80; const int charSetWidth=80;
const int charHeight=12; const int charHeight=12;
...@@ -140,111 +140,6 @@ unsigned char fontRaw[charSetWidth*charHeight] = { ...@@ -140,111 +140,6 @@ unsigned char fontRaw[charSetWidth*charHeight] = {
0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0xac, 0x00, 0x00 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0xac, 0x00, 0x00
}; };
#if 0
const int charSetWidth=68;
const int charHeight=12;
const int numChars=80;
unsigned short charPos[numChars] =
{ 0, 7, 14, 21, 28, 35, 42, 49,
56, 63, 70, 73, 76, 83, 90, 97,
104,116,125,133,142,151,159,167,
176,185,188,195,203,210,221,230,
240,248,258,266,274,281,289,298,
309,318,327,336,339,343,346,352,
359,362,369,376,383,390,397,401,
407,414,417,420,426,429,438,445,
452,459,465,470,476,479,486,493,
502,508,515,521,525,528,532,539
};
unsigned char charWidth[numChars] =
{
7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 3, 3, 7, 7, 7, 7,
12, 9, 8, 9, 9, 8, 8, 9,
9, 3, 7, 8, 7,11, 9,10,
8,10, 8, 8, 7, 8, 9,11,
9, 9, 9, 3, 4, 3, 6, 7,
3, 7, 7, 7, 7, 7, 4, 6,
7, 3, 3, 6, 3, 9, 7, 7,
7, 6, 5, 6, 3, 7, 7, 9,
6, 7, 6, 4, 3, 4, 7, 5
};
unsigned char fontRaw[charSetWidth*charHeight] = {
0x38, 0x20, 0xe1, 0xc0, 0x8f, 0x8e, 0x3e, 0x38, 0x70, 0x00, 0x00, 0x00,
0x1c, 0x0f, 0x80, 0x83, 0xe0, 0xf1, 0xf0, 0xfc, 0xfc, 0x3c, 0x41, 0x20,
0x48, 0x48, 0x10, 0x12, 0x08, 0x78, 0x7c, 0x1e, 0x1f, 0x0f, 0x3f, 0xa1,
0x20, 0x91, 0x12, 0x09, 0x04, 0xfe, 0x71, 0x80, 0x00, 0x80, 0x20, 0x00,
0x08, 0x01, 0x80, 0x81, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0xc0, 0x00, 0x44, 0xe1, 0x12, 0x21,
0x88, 0x11, 0x02, 0x44, 0x88, 0x00, 0x00, 0x00, 0x22, 0x30, 0x41, 0x42,
0x11, 0x09, 0x08, 0x80, 0x80, 0x42, 0x41, 0x20, 0x48, 0x88, 0x18, 0x33,
0x08, 0x84, 0x42, 0x21, 0x10, 0x90, 0x84, 0x21, 0x20, 0x91, 0x11, 0x11,
0x04, 0x02, 0x50, 0x88, 0x01, 0x00, 0x20, 0x00, 0x08, 0x02, 0x00, 0x80,
0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x22, 0x20, 0x00, 0x44, 0x20, 0x10, 0x22, 0x88, 0x10, 0x04, 0x44,
0x88, 0x00, 0x00, 0x00, 0x22, 0x26, 0xa1, 0x42, 0x12, 0x01, 0x04, 0x80,
0x80, 0x80, 0x41, 0x20, 0x49, 0x08, 0x18, 0x32, 0x89, 0x02, 0x42, 0x40,
0x90, 0x90, 0x04, 0x21, 0x11, 0x11, 0x11, 0x10, 0x88, 0x04, 0x48, 0x94,
0x01, 0x8e, 0x2c, 0x38, 0x68, 0xe7, 0x34, 0xb1, 0x24, 0x92, 0x91, 0x61,
0xc5, 0x86, 0x94, 0xce, 0x89, 0x14, 0x46, 0x14, 0x4f, 0x22, 0x20, 0x00,
0x44, 0x20, 0x20, 0xc2, 0x8f, 0x16, 0x04, 0x38, 0x89, 0x20, 0xc0, 0x18,
0x04, 0x49, 0x22, 0x22, 0x12, 0x01, 0x04, 0x80, 0x80, 0x80, 0x41, 0x20,
0x4a, 0x08, 0x14, 0x52, 0x89, 0x02, 0x42, 0x40, 0x90, 0x8c, 0x04, 0x21,
0x11, 0x09, 0x20, 0xa0, 0x88, 0x08, 0x48, 0xa2, 0x00, 0x11, 0x32, 0x44,
0x99, 0x12, 0x4c, 0xc9, 0x25, 0x13, 0x69, 0x92, 0x26, 0x49, 0x99, 0x24,
0x89, 0x14, 0x45, 0x24, 0x41, 0x22, 0x20, 0x00, 0x44, 0x20, 0x40, 0x24,
0x80, 0x99, 0x08, 0x44, 0x78, 0x03, 0x0f, 0x86, 0x04, 0x51, 0x22, 0x23,
0xe2, 0x01, 0x04, 0xfc, 0xf8, 0x8e, 0x7f, 0x20, 0x4e, 0x08, 0x14, 0x52,
0x49, 0x02, 0x7c, 0x40, 0x9f, 0x03, 0x04, 0x21, 0x11, 0x0a, 0xa0, 0x40,
0x50, 0x10, 0x44, 0x80, 0x00, 0x01, 0x22, 0x40, 0x89, 0x12, 0x44, 0x89,
0x26, 0x12, 0x49, 0x12, 0x24, 0x48, 0x91, 0x04, 0x89, 0x12, 0x48, 0xc4,
0x42, 0x22, 0x26, 0x40, 0x44, 0x20, 0x80, 0x28, 0x80, 0x91, 0x08, 0x44,
0x08, 0x0c, 0x00, 0x01, 0x88, 0x51, 0x23, 0xe2, 0x12, 0x01, 0x04, 0x80,
0x80, 0x82, 0x41, 0x20, 0x49, 0x08, 0x12, 0x92, 0x29, 0x02, 0x40, 0x44,
0x91, 0x00, 0x84, 0x21, 0x0a, 0x0a, 0xa0, 0xa0, 0x20, 0x20, 0x44, 0x80,
0x00, 0x0f, 0x22, 0x40, 0x89, 0xf2, 0x44, 0x89, 0x26, 0x12, 0x49, 0x12,
0x24, 0x48, 0x90, 0xc4, 0x88, 0xa2, 0x48, 0xc4, 0x84, 0x42, 0x19, 0x80,
0x44, 0x21, 0x02, 0x2f, 0xc8, 0x91, 0x08, 0x44, 0x08, 0x03, 0x0f, 0x86,
0x08, 0x53, 0x44, 0x12, 0x12, 0x01, 0x04, 0x80, 0x80, 0x82, 0x41, 0x24,
0x48, 0x88, 0x12, 0x92, 0x29, 0x02, 0x40, 0x42, 0x90, 0x90, 0x84, 0x21,
0x0a, 0x04, 0x41, 0x10, 0x20, 0x40, 0x44, 0x80, 0x00, 0x11, 0x22, 0x40,
0x89, 0x02, 0x44, 0x89, 0x25, 0x12, 0x49, 0x12, 0x24, 0x48, 0x90, 0x24,
0x88, 0xa2, 0xa9, 0x22, 0x84, 0x22, 0x20, 0x00, 0x44, 0x21, 0x02, 0x20,
0x88, 0x91, 0x10, 0x44, 0x88, 0x00, 0xc0, 0x18, 0x00, 0x4d, 0x84, 0x12,
0x11, 0x09, 0x08, 0x80, 0x80, 0x46, 0x41, 0x24, 0x48, 0x48, 0x11, 0x12,
0x18, 0x84, 0x40, 0x21, 0x10, 0x90, 0x84, 0x21, 0x04, 0x04, 0x41, 0x10,
0x20, 0x80, 0x42, 0x80, 0x00, 0x11, 0x32, 0x44, 0x99, 0x12, 0x4c, 0x89,
0x24, 0x92, 0x49, 0x12, 0x26, 0x49, 0x91, 0x24, 0x98, 0x41, 0x12, 0x12,
0x88, 0x22, 0x20, 0x00, 0x38, 0x21, 0xf1, 0xc0, 0x87, 0x0e, 0x10, 0x38,
0x71, 0x20, 0x00, 0x00, 0x08, 0x20, 0x04, 0x13, 0xe0, 0xf1, 0xf0, 0xfc,
0x80, 0x3a, 0x41, 0x23, 0x88, 0x2f, 0x91, 0x12, 0x08, 0x78, 0x40, 0x1e,
0x90, 0x8f, 0x04, 0x1e, 0x04, 0x04, 0x42, 0x08, 0x20, 0xfe, 0x42, 0x80,
0x00, 0x0e, 0xac, 0x38, 0x68, 0xe2, 0x34, 0x89, 0x24, 0x52, 0x49, 0x11,
0xc5, 0x86, 0x90, 0xc6, 0x68, 0x41, 0x12, 0x11, 0x0f, 0x22, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00, 0x80, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00,
0x20, 0x00, 0x00, 0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02,
0x00, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x40, 0x00, 0x00, 0x00,
0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x1a, 0xc0, 0x00
};
#endif
static Color palette[] = static Color palette[] =
{ {
{ 0xff, 0xff, 0xff }, { 0xff, 0xff, 0xff },
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// strips w from s iff s starts with w // strips w from s iff s starts with w
bool stripWord(QString &s,QString w) bool stripWord(QCString &s,QCString w)
{ {
bool success=FALSE; bool success=FALSE;
if (s.left(w.length())==w) if (s.left(w.length())==w)
...@@ -47,12 +47,12 @@ bool stripWord(QString &s,QString w) ...@@ -47,12 +47,12 @@ bool stripWord(QString &s,QString w)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// some quasi intelligent brief description abbreviator :^) // some quasi intelligent brief description abbreviator :^)
QString abbreviate(const char *s,const char *name) QCString abbreviate(const char *s,const char *name)
{ {
QString result=s; QCString result=s;
QString start1=(QString)"The "+name+" class "; QCString start1=(QCString)"The "+name+" class ";
QString start2=(QString)"The "+name+" widget "; QCString start2=(QCString)"The "+name+" widget ";
QString start3=(QString)"The "+name+" file "; QCString start3=(QCString)"The "+name+" file ";
result=result.simplifyWhiteSpace(); result=result.simplifyWhiteSpace();
// strip trailing . // strip trailing .
if (result.length()>0 && result.at(result.length()-1)=='.') if (result.length()>0 && result.at(result.length()-1)=='.')
...@@ -236,7 +236,7 @@ void writeHierarchicalIndex(OutputList &ol) ...@@ -236,7 +236,7 @@ void writeHierarchicalIndex(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"hierarchy","Hierarchical Index"); startFile(ol,"hierarchy","Hierarchical Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trClassHierarchy()); parseText(ol,Config::projectName+" "+theTranslator->trClassHierarchy());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trClassHierarchyDescription()); parseText(ol,theTranslator->trClassHierarchyDescription());
ol.newParagraph(); ol.newParagraph();
...@@ -272,10 +272,10 @@ void writeFileIndex(OutputList &ol) ...@@ -272,10 +272,10 @@ void writeFileIndex(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"files","File Index"); startFile(ol,"files","File Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trFileList()); parseText(ol,Config::projectName+" "+theTranslator->trFileList());
endTitle(ol,0); endTitle(ol,0);
ol.newParagraph(); ol.newParagraph();
parseText(ol,theTranslator->trFileListDescription(extractAllFlag)); parseText(ol,theTranslator->trFileListDescription(Config::extractAllFlag));
ol.newParagraph(); ol.newParagraph();
ol.startIndexList(); ol.startIndexList();
...@@ -289,13 +289,13 @@ void writeFileIndex(OutputList &ol) ...@@ -289,13 +289,13 @@ void writeFileIndex(OutputList &ol)
{ {
//ol.writeIndexItem(fd->getReference(),fd->diskName(), //ol.writeIndexItem(fd->getReference(),fd->diskName(),
// fd->name()); // fd->name());
QString path; QCString path;
if (fullPathNameFlag) if (Config::fullPathNameFlag)
{ {
path=fd->getPath().copy(); path=fd->getPath().copy();
// strip part of the path // strip part of the path
if (path.left(stripFromPath.length())==stripFromPath) if (path.left(Config::stripFromPath.length())==Config::stripFromPath)
path=path.right(path.length()-stripFromPath.length()); path=path.right(path.length()-Config::stripFromPath.length());
} }
ol.writeStartAnnoItem("file", ol.writeStartAnnoItem("file",
...@@ -337,7 +337,7 @@ int countNamespaces() ...@@ -337,7 +337,7 @@ int countNamespaces()
NamespaceDef *nd; NamespaceDef *nd;
for (;(nd=nli.current());++nli) for (;(nd=nli.current());++nli)
{ {
if (!nd->getReference() && nd->hasDocumentation()) count++; if (nd->isVisible()) count++;
} }
return count; return count;
} }
...@@ -350,17 +350,17 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -350,17 +350,17 @@ void writeNamespaceIndex(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"namespaces","Namespace Index"); startFile(ol,"namespaces","Namespace Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trNamespaceList()); parseText(ol,Config::projectName+" "+theTranslator->trNamespaceList());
endTitle(ol,0); endTitle(ol,0);
ol.newParagraph(); ol.newParagraph();
parseText(ol,theTranslator->trNamespaceListDescription(extractAllFlag)); parseText(ol,theTranslator->trNamespaceListDescription(Config::extractAllFlag));
ol.newParagraph(); ol.newParagraph();
ol.startIndexList(); ol.startIndexList();
NamespaceDef *nd=namespaceList.first(); NamespaceDef *nd=namespaceList.first();
while (nd) while (nd)
{ {
if (!nd->getReference() && nd->hasDocumentation()) if (nd->isVisible())
{ {
ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name()); ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
ol.docify(" ("); ol.docify(" (");
...@@ -419,12 +419,12 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -419,12 +419,12 @@ void writeAnnotatedClassList(OutputList &ol)
{ {
if (!cd->isReference() && if (!cd->isReference() &&
//!cd->name().isEmpty() && cd->name()[0]!='@' && //!cd->name().isEmpty() && cd->name()[0]!='@' &&
//(cd->protection()!=Private || extractPrivateFlag) && //(cd->protection()!=Private || Config::extractPrivateFlag) &&
//(cd->hasDocumentation() || !hideClassFlag) //(cd->hasDocumentation() || !hideClassFlag)
cd->isVisible() cd->isVisible()
) )
{ {
QString type; QCString type;
switch (cd->compoundType()) switch (cd->compoundType())
{ {
case ClassDef::Class: type="class"; break; case ClassDef::Class: type="class"; break;
...@@ -465,7 +465,7 @@ void writeAnnotatedIndex(OutputList &ol) ...@@ -465,7 +465,7 @@ void writeAnnotatedIndex(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"annotated","Annotated Index"); startFile(ol,"annotated","Annotated Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trCompoundList()); parseText(ol,Config::projectName+" "+theTranslator->trCompoundList());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trCompoundListDescription()); parseText(ol,theTranslator->trCompoundListDescription());
writeAnnotatedClassList(ol); writeAnnotatedClassList(ol);
...@@ -487,7 +487,7 @@ void writeMemberList(OutputList &ol) ...@@ -487,7 +487,7 @@ void writeMemberList(OutputList &ol)
while (md && !found) while (md && !found)
{ {
ClassDef *cd; ClassDef *cd;
if ((md->isFriend() || md->protection()!=Private || extractPrivateFlag) && if ((md->isFriend() || md->protection()!=Private || Config::extractPrivateFlag) &&
!md->isReference() && md->hasDocumentation() && !md->isReference() && md->hasDocumentation() &&
md->name()[0]!='@' && (cd=md->memberClass()) && md->name()[0]!='@' && (cd=md->memberClass()) &&
cd->isVisible() cd->isVisible()
...@@ -506,12 +506,12 @@ void writeMemberList(OutputList &ol) ...@@ -506,12 +506,12 @@ void writeMemberList(OutputList &ol)
ol.writeString("\n"); ol.writeString("\n");
int count=0; int count=0;
md=mn->first(); md=mn->last();
QString prevName; QCString prevName;
while (md) while (md)
{ {
ClassDef *cd=md->memberClass(); ClassDef *cd=md->memberClass();
if (cd && (md->isFriend() || md->protection()!=Private || extractPrivateFlag) && if (cd && (md->isFriend() || md->protection()!=Private || Config::extractPrivateFlag) &&
!md->isReference() && md->hasDocumentation() && !md->isReference() && md->hasDocumentation() &&
prevName!=cd->name() && prevName!=cd->name() &&
cd->isVisible() cd->isVisible()
...@@ -526,7 +526,7 @@ void writeMemberList(OutputList &ol) ...@@ -526,7 +526,7 @@ void writeMemberList(OutputList &ol)
count++; count++;
prevName=cd->name(); prevName=cd->name();
} }
md=mn->next(); md=mn->prev();
} }
} }
mn=memberNameList.next(); mn=memberNameList.next();
...@@ -548,11 +548,11 @@ int countClassMembers() ...@@ -548,11 +548,11 @@ int countClassMembers()
ClassDef *cd; ClassDef *cd;
while (md && !found) while (md && !found)
{ {
if ((md->isFriend() || md->protection()!=Private || extractPrivateFlag) && if ((md->isFriend() || md->protection()!=Private || Config::extractPrivateFlag) &&
!md->isReference() && !md->isRelated() && md->hasDocumentation() && !md->isReference() && !md->isRelated() && md->hasDocumentation() &&
md->name()[0]!='@' && (cd=md->memberClass()) && cd->isVisible()) md->name()[0]!='@' && (cd=md->memberClass()) && cd->isVisible())
otherMd=md; otherMd=md;
if ((md->isFriend() || md->protection()!=Private || extractPrivateFlag) && if ((md->isFriend() || md->protection()!=Private || Config::extractPrivateFlag) &&
!md->isReference() && md->isRelated() && md->hasDocumentation() && !md->isReference() && md->isRelated() && md->hasDocumentation() &&
md->name()[0]!='@' && (cd=md->memberClass()) && cd->isVisible()) md->name()[0]!='@' && (cd=md->memberClass()) && cd->isVisible())
found=TRUE; found=TRUE;
...@@ -574,9 +574,9 @@ void writeMemberIndex(OutputList &ol) ...@@ -574,9 +574,9 @@ void writeMemberIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
startFile(ol,"functions","Compound Member Index"); startFile(ol,"functions","Compound Member Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trCompoundMembers()); parseText(ol,Config::projectName+" "+theTranslator->trCompoundMembers());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trCompoundMembersDescription(extractAllFlag)); parseText(ol,theTranslator->trCompoundMembersDescription(Config::extractAllFlag));
writeMemberList(ol); writeMemberList(ol);
endFile(ol); endFile(ol);
ol.enable(OutputGenerator::Latex); ol.enable(OutputGenerator::Latex);
...@@ -615,8 +615,8 @@ void writeFileMemberList(OutputList &ol) ...@@ -615,8 +615,8 @@ void writeFileMemberList(OutputList &ol)
ol.writeString("\n"); ol.writeString("\n");
int count=0; int count=0;
md=mn->first(); md=mn->last();
QString prevName; QCString prevName;
while (md) while (md)
{ {
FileDef *fd=md->getFileDef() ? md->getFileDef() : md->getFileDec(); FileDef *fd=md->getFileDef() ? md->getFileDef() : md->getFileDec();
...@@ -633,7 +633,7 @@ void writeFileMemberList(OutputList &ol) ...@@ -633,7 +633,7 @@ void writeFileMemberList(OutputList &ol)
ol.docify(": "); ol.docify(": ");
else else
ol.docify(", "); ol.docify(", ");
QString baseName=fd->name().copy(); QCString baseName=fd->name().copy();
//int s; //int s;
//if ((s=baseName.findRev("/"))!=-1) //if ((s=baseName.findRev("/"))!=-1)
// baseName=baseName.right(baseName.length()-s-1); // baseName=baseName.right(baseName.length()-s-1);
...@@ -642,7 +642,7 @@ void writeFileMemberList(OutputList &ol) ...@@ -642,7 +642,7 @@ void writeFileMemberList(OutputList &ol)
count++; count++;
prevName=fd->name(); prevName=fd->name();
} }
md=mn->next(); md=mn->prev();
} }
} }
mn=functionNameList.next(); mn=functionNameList.next();
...@@ -663,11 +663,9 @@ void writeNamespaceMemberList(OutputList &ol) ...@@ -663,11 +663,9 @@ void writeNamespaceMemberList(OutputList &ol)
while (md && !found) while (md && !found)
{ {
NamespaceDef *nd=md->getNamespace(); NamespaceDef *nd=md->getNamespace();
if (nd && nd->hasDocumentation() && if (nd && nd->isVisible() &&
!md->isReference() && !md->isReference() && md->hasDocumentation() &&
md->hasDocumentation() && !md->name().isEmpty() && md->name().at(0)!='@') found=TRUE;
!md->name().isEmpty() &&
md->name()[0]!='@') found=TRUE;
else else
md=mn->next(); md=mn->next();
} }
...@@ -679,16 +677,16 @@ void writeNamespaceMemberList(OutputList &ol) ...@@ -679,16 +677,16 @@ void writeNamespaceMemberList(OutputList &ol)
ol.writeString("\n"); ol.writeString("\n");
int count=0; int count=0;
md=mn->first(); md=mn->last();
QString prevName; QCString prevName;
while (md) while (md)
{ {
NamespaceDef *nd=md->getNamespace(); NamespaceDef *nd=md->getNamespace();
if (nd && nd->hasDocumentation() && if (nd && nd->isVisible() &&
!md->isReference() && !md->isReference() && md->hasDocumentation() &&
md->hasDocumentation() && !md->name().isEmpty() && md->name().at(0)!='@' &&
!md->name().isEmpty() && md->name()[0]!='@' prevName!=nd->name()
) )
{ {
if (count==0) if (count==0)
ol.docify(": "); ol.docify(": ");
...@@ -697,8 +695,9 @@ void writeNamespaceMemberList(OutputList &ol) ...@@ -697,8 +695,9 @@ void writeNamespaceMemberList(OutputList &ol)
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(), ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),
md->anchor(),nd->name()); md->anchor(),nd->name());
count++; count++;
prevName=nd->name();
} }
md=mn->next(); md=mn->prev();
} }
} }
mn=functionNameList.next(); mn=functionNameList.next();
...@@ -718,10 +717,11 @@ int countNamespaceMembers() ...@@ -718,10 +717,11 @@ int countNamespaceMembers()
bool found=FALSE; bool found=FALSE;
while (md && !found) while (md && !found)
{ {
if (md->getNamespace() && NamespaceDef *nd=md->getNamespace();
if (nd && nd->isVisible() &&
!md->isReference() && md->hasDocumentation() && !md->isReference() && md->hasDocumentation() &&
!md->name().isEmpty() && md->name()[0]!='@' !md->name().isEmpty() && md->name().at(0)!='@'
) )
found=TRUE; found=TRUE;
else else
md=mn->next(); md=mn->next();
...@@ -771,9 +771,9 @@ void writeFileMemberIndex(OutputList &ol) ...@@ -771,9 +771,9 @@ void writeFileMemberIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
startFile(ol,"globals","File Member Index"); startFile(ol,"globals","File Member Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trFileMembers()); parseText(ol,Config::projectName+" "+theTranslator->trFileMembers());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trFileMembersDescription(extractAllFlag)); parseText(ol,theTranslator->trFileMembersDescription(Config::extractAllFlag));
writeFileMemberList(ol); writeFileMemberList(ol);
endFile(ol); endFile(ol);
ol.enable(OutputGenerator::Latex); ol.enable(OutputGenerator::Latex);
...@@ -789,9 +789,9 @@ void writeNamespaceMemberIndex(OutputList &ol) ...@@ -789,9 +789,9 @@ void writeNamespaceMemberIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
startFile(ol,"namespacemembers","Namespace Member Index"); startFile(ol,"namespacemembers","Namespace Member Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trNamespaceMembers()); parseText(ol,Config::projectName+" "+theTranslator->trNamespaceMembers());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trNamespaceMemberDescription(extractAllFlag)); parseText(ol,theTranslator->trNamespaceMemberDescription(Config::extractAllFlag));
writeNamespaceMemberList(ol); writeNamespaceMemberList(ol);
endFile(ol); endFile(ol);
ol.enable(OutputGenerator::Latex); ol.enable(OutputGenerator::Latex);
...@@ -809,13 +809,13 @@ void writeHeaderFileList(OutputList &ol) ...@@ -809,13 +809,13 @@ void writeHeaderFileList(OutputList &ol)
while (fd) while (fd)
{ {
ol.writeListItem(); ol.writeListItem();
QString path; QCString path;
if (fullPathNameFlag) if (Config::fullPathNameFlag)
{ {
path=fd->getPath().copy(); path=fd->getPath().copy();
// strip part of the path // strip part of the path
if (path.left(stripFromPath.length())==stripFromPath) if (path.left(Config::stripFromPath.length())==Config::stripFromPath)
path=path.right(path.length()-stripFromPath.length()); path=path.right(path.length()-Config::stripFromPath.length());
} }
if (!path.isEmpty()) ol.docify(path); if (!path.isEmpty()) ol.docify(path);
ol.writeObjectLink(0,fd->includeName(),0,fd->name()); ol.writeObjectLink(0,fd->includeName(),0,fd->name());
...@@ -835,7 +835,7 @@ void writeHeaderIndex(OutputList &ol) ...@@ -835,7 +835,7 @@ void writeHeaderIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
startFile(ol,"headers","Header File Index"); startFile(ol,"headers","Header File Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trHeaderFiles()); parseText(ol,Config::projectName+" "+theTranslator->trHeaderFiles());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trHeaderFilesDescription()); parseText(ol,theTranslator->trHeaderFilesDescription());
writeHeaderFileList(ol); writeHeaderFileList(ol);
...@@ -852,7 +852,7 @@ void writeExampleIndex(OutputList &ol) ...@@ -852,7 +852,7 @@ void writeExampleIndex(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"examples","Example Index"); startFile(ol,"examples","Example Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trExamples()); parseText(ol,Config::projectName+" "+theTranslator->trExamples());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trExamplesDescription()); parseText(ol,theTranslator->trExamplesDescription());
ol.startIndexList(); ol.startIndexList();
...@@ -860,7 +860,7 @@ void writeExampleIndex(OutputList &ol) ...@@ -860,7 +860,7 @@ void writeExampleIndex(OutputList &ol)
while (pi) while (pi)
{ {
ol.writeListItem(); ol.writeListItem();
QString n=convertSlashes(pi->name,TRUE)+"-example"; QCString n=convertSlashes(pi->name,TRUE)+"-example";
if (!pi->title.isEmpty()) if (!pi->title.isEmpty())
{ {
ol.writeObjectLink(0,n,0,pi->title); ol.writeObjectLink(0,n,0,pi->title);
...@@ -885,16 +885,16 @@ void writePageIndex(OutputList &ol) ...@@ -885,16 +885,16 @@ void writePageIndex(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"pages","Page Index"); startFile(ol,"pages","Page Index");
startTitle(ol); startTitle(ol);
ol.docify(projectName+" "+theTranslator->trRelatedPages()); ol.docify(Config::projectName+" "+theTranslator->trRelatedPages());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trRelatedPagesDescription()); parseText(ol,theTranslator->trRelatedPagesDescription());
ol.startIndexList(); ol.startIndexList();
PageInfo *pi=pageList.first(); PageInfo *pi=pageList.first();
while (pi) while (pi)
{ {
QString pageName,pageTitle; QCString pageName,pageTitle;
if (caseSensitiveNames) if (Config::caseSensitiveNames)
pageName=pi->name.copy(); pageName=pi->name.copy();
else else
pageName=pi->name.lower(); pageName=pi->name.lower();
...@@ -960,7 +960,7 @@ void writeGroupIndex(OutputList &ol) ...@@ -960,7 +960,7 @@ void writeGroupIndex(OutputList &ol)
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
startFile(ol,"modules","Module Index"); startFile(ol,"modules","Module Index");
startTitle(ol); startTitle(ol);
parseText(ol,projectName+" "+theTranslator->trModules()); parseText(ol,Config::projectName+" "+theTranslator->trModules());
endTitle(ol,0); endTitle(ol,0);
parseText(ol,theTranslator->trModulesDescription()); parseText(ol,theTranslator->trModulesDescription());
writeGroupList(ol); writeGroupList(ol);
...@@ -975,27 +975,27 @@ void writeIndex(OutputList &ol) ...@@ -975,27 +975,27 @@ void writeIndex(OutputList &ol)
bool texEnabled = ol.isEnabled(OutputGenerator::Latex); bool texEnabled = ol.isEnabled(OutputGenerator::Latex);
bool htmEnabled = ol.isEnabled(OutputGenerator::Html); bool htmEnabled = ol.isEnabled(OutputGenerator::Html);
QString projPrefix; QCString projPrefix;
if (!projectName.isEmpty()) if (!Config::projectName.isEmpty())
{ {
projPrefix=projectName+" "; projPrefix=Config::projectName+" ";
} }
// write HTML index // write HTML index
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.disable(OutputGenerator::Latex); ol.disable(OutputGenerator::Latex);
ol.startFile("index","Main Index",FALSE); ol.startFile("index","Main Index",FALSE);
if (!noIndexFlag) writeQuickLinks(ol,TRUE); if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE);
ol.startTitleHead(); ol.startTitleHead();
parseText(ol,projPrefix+theTranslator->trDocumentation()); parseText(ol,projPrefix+theTranslator->trDocumentation());
ol.endTitleHead(0); ol.endTitleHead(0);
ol.newParagraph(); ol.newParagraph();
if (!projectNumber.isEmpty()) if (!Config::projectNumber.isEmpty())
{ {
ol.startProjectNumber(); ol.startProjectNumber();
parseDoc(ol,0,0,projectNumber); parseDoc(ol,0,0,Config::projectNumber);
ol.endProjectNumber(); ol.endProjectNumber();
} }
if (noIndexFlag) writeQuickLinks(ol,FALSE); if (Config::noIndexFlag) writeQuickLinks(ol,FALSE);
endFile(ol); endFile(ol);
ol.disable(OutputGenerator::Html); ol.disable(OutputGenerator::Html);
...@@ -1004,10 +1004,10 @@ void writeIndex(OutputList &ol) ...@@ -1004,10 +1004,10 @@ void writeIndex(OutputList &ol)
ol.startFile("refman",0,FALSE); ol.startFile("refman",0,FALSE);
ol.startIndexSection(isTitlePageStart); ol.startIndexSection(isTitlePageStart);
parseText(ol,projPrefix+theTranslator->trReferenceManual()); parseText(ol,projPrefix+theTranslator->trReferenceManual());
if (!projectNumber.isEmpty()) if (!Config::projectNumber.isEmpty())
{ {
ol.startProjectNumber(); ol.startProjectNumber();
parseDoc(ol,0,0,projectNumber); parseDoc(ol,0,0,Config::projectNumber);
ol.endProjectNumber(); ol.endProjectNumber();
} }
ol.endIndexSection(isTitlePageStart); ol.endIndexSection(isTitlePageStart);
......
...@@ -17,8 +17,9 @@ ...@@ -17,8 +17,9 @@
#ifndef INDEX_H #ifndef INDEX_H
#define INDEX_H #define INDEX_H
#include "qtbc.h"
#include <qfile.h> #include <qfile.h>
#include <qtstream.h> //#include <qtstream.h>
enum IndexSections enum IndexSections
{ {
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <qstring.h>
#include "qtbc.h"
#include <qfile.h> #include <qfile.h>
#include <qfileinf.h> #include <qfileinf.h>
#include <qtstream.h> #include <qtstream.h>
...@@ -28,19 +29,19 @@ ...@@ -28,19 +29,19 @@
void writeInstallScript() void writeInstallScript()
{ {
QString fileName=htmlOutputDir+"/installdox"; QCString fileName=Config::htmlOutputDir+"/installdox";
QFile f(fileName); QFile f(fileName);
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
{ {
QTextStream t(&f); QTextStream t(&f);
t << "#!" << perlPath << endl << endl << "%subst = ( "; t << "#!" << Config::perlPath << endl << endl << "%subst = ( ";
char *s=tagFileList.first(); char *s=Config::tagFileList.first();
while (s) while (s)
{ {
QFileInfo fi(s); QFileInfo fi(s);
t << "\"" << fi.fileName() << "\", \"\""; t << "\"" << fi.fileName() << "\", \"\"";
s=tagFileList.next(); s=Config::tagFileList.next();
if (s) t << ", "; if (s) t << ", ";
} }
......
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
#include "translator_cz.h" #include "translator_cz.h"
#include "translator_fr.h" #include "translator_fr.h"
#include "translator_it.h" #include "translator_it.h"
#include <qstring.h> #include "translator_de.h"
#include "translator_jp.h"
#include "translator_es.h"
#define L_EQUAL(a) !stricmp(langName,a) #define L_EQUAL(a) !stricmp(langName,a)
...@@ -52,6 +54,18 @@ bool setTranslator(const char *langName) ...@@ -52,6 +54,18 @@ bool setTranslator(const char *langName)
{ {
theTranslator=new TranslatorItalian; theTranslator=new TranslatorItalian;
} }
else if (L_EQUAL("german"))
{
theTranslator=new TranslatorGerman;
}
else if (L_EQUAL("japanese"))
{
theTranslator=new TranslatorJapanese;
}
else if (L_EQUAL("spanish"))
{
theTranslator=new TranslatorSpanish;
}
else // use the default language (i.e. english) else // use the default language (i.e. english)
{ {
theTranslator=new Translator; theTranslator=new Translator;
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include "qtbc.h"
#include <qdir.h> #include <qdir.h>
#include "latexgen.h" #include "latexgen.h"
#include "config.h" #include "config.h"
...@@ -24,9 +26,9 @@ ...@@ -24,9 +26,9 @@
#include "diagram.h" #include "diagram.h"
#include "language.h" #include "language.h"
//static QString escapeLabelName(const QString &s) //static QCString escapeLabelName(const QCString &s)
//{ //{
// QString result; // QCString result;
// uint i; // uint i;
// for (i=0;i<s.length();i++) // for (i=0;i<s.length();i++)
// { // {
...@@ -45,7 +47,7 @@ ...@@ -45,7 +47,7 @@
LatexGenerator::LatexGenerator() LatexGenerator::LatexGenerator()
: OutputGenerator() : OutputGenerator()
{ {
dir=latexOutputDir; dir=Config::latexOutputDir;
col=0; col=0;
} }
...@@ -68,7 +70,7 @@ void LatexGenerator::append(const OutputGenerator *g) ...@@ -68,7 +70,7 @@ void LatexGenerator::append(const OutputGenerator *g)
void LatexGenerator::init() void LatexGenerator::init()
{ {
QString dir=latexOutputDir; QCString dir=Config::latexOutputDir;
QDir d(dir); QDir d(dir);
if (!d.exists() && !d.mkdir(dir)) if (!d.exists() && !d.mkdir(dir))
{ {
...@@ -76,7 +78,7 @@ void LatexGenerator::init() ...@@ -76,7 +78,7 @@ void LatexGenerator::init()
exit(1); exit(1);
} }
QString fileName=dir+"/Makefile"; QCString fileName=dir+"/Makefile";
QFile file(fileName); QFile file(fileName);
if (!file.open(IO_WriteOnly)) if (!file.open(IO_WriteOnly))
{ {
...@@ -104,7 +106,7 @@ void LatexGenerator::init() ...@@ -104,7 +106,7 @@ void LatexGenerator::init()
void LatexGenerator::startFile(const char *name,const char *,bool) void LatexGenerator::startFile(const char *name,const char *,bool)
{ {
QString fileName=name; QCString fileName=name;
if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex"; if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
startPlainFile(fileName); startPlainFile(fileName);
} }
...@@ -126,16 +128,16 @@ void LatexGenerator::startProjectNumber() ...@@ -126,16 +128,16 @@ void LatexGenerator::startProjectNumber()
void LatexGenerator::startIndexSection(IndexSections is) void LatexGenerator::startIndexSection(IndexSections is)
{ {
QString paperName; QCString paperName;
switch (is) switch (is)
{ {
case isTitlePageStart: case isTitlePageStart:
{ {
if (paperType=="a4wide") paperName="a4"; else paperName=paperType; if (Config::paperType=="a4wide") paperName="a4"; else paperName=Config::paperType;
t << "\\documentclass[" << paperName << "paper]{"; t << "\\documentclass[" << paperName << "paper]{";
if (compactLatexFlag) t << "article"; else t << "book"; if (Config::compactLatexFlag) t << "article"; else t << "book";
t << "}\n"; t << "}\n";
if (paperType=="a4wide") t << "\\usepackage{a4wide}\n"; if (Config::paperType=="a4wide") t << "\\usepackage{a4wide}\n";
t << "\\usepackage{makeidx}\n" t << "\\usepackage{makeidx}\n"
"\\usepackage{fancyheadings}\n" "\\usepackage{fancyheadings}\n"
"\\usepackage{epsf}\n" "\\usepackage{epsf}\n"
...@@ -145,11 +147,11 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -145,11 +147,11 @@ void LatexGenerator::startIndexSection(IndexSections is)
{ {
t << "\\usepackage{" << theTranslator->latexBabelPackage() << "}\n"; t << "\\usepackage{" << theTranslator->latexBabelPackage() << "}\n";
} }
const char *s=extraPackageList.first(); const char *s=Config::extraPackageList.first();
while (s) while (s)
{ {
t << "\\usepackage{" << s << "}\n"; t << "\\usepackage{" << s << "}\n";
s=extraPackageList.next(); s=Config::extraPackageList.next();
} }
t << "\\makeindex\n" t << "\\makeindex\n"
"\\setcounter{tocdepth}{1}\n" "\\setcounter{tocdepth}{1}\n"
...@@ -169,23 +171,23 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -169,23 +171,23 @@ void LatexGenerator::startIndexSection(IndexSections is)
t << "}\n\\author{"; t << "}\n\\author{";
break; break;
case isModuleIndex: case isModuleIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Index}\n" t << "{"; //Module Index}\n"
break; break;
case isNamespaceIndex: case isNamespaceIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Namespace Index}\" t << "{"; //Namespace Index}\"
break; break;
case isClassHierarchyIndex: case isClassHierarchyIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Hierarchical Index}\n" t << "{"; //Hierarchical Index}\n"
break; break;
case isCompoundIndex: case isCompoundIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Annotated Compound Index}\n" t << "{"; //Annotated Compound Index}\n"
break; break;
case isFileIndex: case isFileIndex:
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Annotated File Index}\n" t << "{"; //Annotated File Index}\n"
break; break;
case isModuleDocumentation: case isModuleDocumentation:
...@@ -196,7 +198,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -196,7 +198,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
{ {
if (gd->hasDocumentation() || gd->countMembers()>0) if (gd->hasDocumentation() || gd->countMembers()>0)
{ {
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Documentation}\n"; t << "{"; //Module Documentation}\n";
found=TRUE; found=TRUE;
} }
...@@ -212,7 +214,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -212,7 +214,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
{ {
if (nd->hasDocumentation()) if (nd->hasDocumentation())
{ {
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; // Namespace Documentation}\n": t << "{"; // Namespace Documentation}\n":
found=TRUE; found=TRUE;
} }
...@@ -228,7 +230,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -228,7 +230,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
{ {
if (!cd->isReference() && cd->isVisible()) if (!cd->isReference() && cd->isVisible())
{ {
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Compound Documentation}\n"; t << "{"; //Compound Documentation}\n";
found=TRUE; found=TRUE;
} }
...@@ -249,7 +251,7 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -249,7 +251,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
{ {
if (isFirst) if (isFirst)
{ {
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //File Documentation}\n"; t << "{"; //File Documentation}\n";
isFirst=FALSE; isFirst=FALSE;
break; break;
...@@ -263,13 +265,13 @@ void LatexGenerator::startIndexSection(IndexSections is) ...@@ -263,13 +265,13 @@ void LatexGenerator::startIndexSection(IndexSections is)
break; break;
case isExampleDocumentation: case isExampleDocumentation:
{ {
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Example Documentation}\n"; t << "{"; //Example Documentation}\n";
} }
break; break;
case isPageDocumentation: case isPageDocumentation:
{ {
if (compactLatexFlag) t << "\\section"; else t << "\\chapter"; if (Config::compactLatexFlag) t << "\\section"; else t << "\\chapter";
t << "{"; //Page Documentation}\n"; t << "{"; //Page Documentation}\n";
} }
break; break;
...@@ -289,9 +291,9 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -289,9 +291,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
"\\date{" << dateToString(TRUE) << "}\n" "\\date{" << dateToString(TRUE) << "}\n"
"\\maketitle\n" "\\maketitle\n"
"\\pagenumbering{roman}\n"; "\\pagenumbering{roman}\n";
if (!compactLatexFlag) t << "\\clearemptydoublepage\n"; if (!Config::compactLatexFlag) t << "\\clearemptydoublepage\n";
t << "\\tableofcontents\n"; t << "\\tableofcontents\n";
if (!compactLatexFlag) t << "\\clearemptydoublepage\n"; if (!Config::compactLatexFlag) t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{arabic}\n"; t << "\\pagenumbering{arabic}\n";
break; break;
case isModuleIndex: case isModuleIndex:
...@@ -326,7 +328,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -326,7 +328,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
{ {
if (gd->hasDocumentation() || gd->countMembers()>0) if (gd->hasDocumentation() || gd->countMembers()>0)
{ {
if (compactLatexFlag) t << "\\input"; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << gd->getOutputFileBase() << "}\n"; t << "{" << gd->getOutputFileBase() << "}\n";
} }
gd=groupList.next(); gd=groupList.next();
...@@ -350,7 +352,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -350,7 +352,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
{ {
if (nd->hasDocumentation() || nd->countMembers()>0) if (nd->hasDocumentation() || nd->countMembers()>0)
{ {
if (compactLatexFlag) t << "\\input"; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << nd->getOutputFileBase() << "}\n"; t << "{" << nd->getOutputFileBase() << "}\n";
} }
nd=namespaceList.next(); nd=namespaceList.next();
...@@ -382,7 +384,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -382,7 +384,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
// ) // )
if (!cd->isReference() && cd->isVisible()) if (!cd->isReference() && cd->isVisible())
{ {
if (compactLatexFlag) t << "\\input"; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input"; else t << "\\include";
t << "{" << cd->getOutputFileBase() << "}\n"; t << "{" << cd->getOutputFileBase() << "}\n";
} }
cd=classList.next(); cd=classList.next();
...@@ -407,7 +409,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -407,7 +409,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
} }
else else
{ {
if (compactLatexFlag) t << "\\input" ; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input" ; else t << "\\include";
t << "{" << fd->getOutputFileBase() << "}\n"; t << "{" << fd->getOutputFileBase() << "}\n";
} }
} }
...@@ -428,7 +430,7 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -428,7 +430,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
} }
while (pi) while (pi)
{ {
if (compactLatexFlag) t << "\\input" ; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input" ; else t << "\\include";
t << "{" << convertSlashes(pi->name,TRUE) << "-example}\n"; t << "{" << convertSlashes(pi->name,TRUE) << "-example}\n";
pi=exampleList.next(); pi=exampleList.next();
} }
...@@ -440,8 +442,8 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -440,8 +442,8 @@ void LatexGenerator::endIndexSection(IndexSections is)
PageInfo *pi=pageList.first(); PageInfo *pi=pageList.first();
if (pi) if (pi)
{ {
QString pageName; QCString pageName;
if (caseSensitiveNames) if (Config::caseSensitiveNames)
pageName=pi->name.copy(); pageName=pi->name.copy();
else else
pageName=pi->name.lower(); pageName=pi->name.lower();
...@@ -450,9 +452,9 @@ void LatexGenerator::endIndexSection(IndexSections is) ...@@ -450,9 +452,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
} }
while (pi) while (pi)
{ {
if (compactLatexFlag) t << "\\input" ; else t << "\\include"; if (Config::compactLatexFlag) t << "\\input" ; else t << "\\include";
QString pageName; QCString pageName;
if (caseSensitiveNames) if (Config::caseSensitiveNames)
pageName=pi->name.copy(); pageName=pi->name.copy();
else else
pageName=pi->name.lower(); pageName=pi->name.lower();
...@@ -473,7 +475,7 @@ void LatexGenerator::writeStyleInfo(int part) ...@@ -473,7 +475,7 @@ void LatexGenerator::writeStyleInfo(int part)
{ {
case 0: case 0:
{ {
QString pname=projectName.stripWhiteSpace(); QCString pname=Config::projectName.stripWhiteSpace();
startPlainFile("doxygen.sty"); startPlainFile("doxygen.sty");
t << "\\NeedsTeXFormat{LaTeX2e}\n"; t << "\\NeedsTeXFormat{LaTeX2e}\n";
t << "\\ProvidesPackage{doxygen}\n"; t << "\\ProvidesPackage{doxygen}\n";
...@@ -484,7 +486,7 @@ void LatexGenerator::writeStyleInfo(int part) ...@@ -484,7 +486,7 @@ void LatexGenerator::writeStyleInfo(int part)
t << "\\addtolength{\\headwidth}{\\marginparwidth}\n"; t << "\\addtolength{\\headwidth}{\\marginparwidth}\n";
t << "\\newcommand{\\clearemptydoublepage}{\\newpage{\\pagestyle{empty}"; t << "\\newcommand{\\clearemptydoublepage}{\\newpage{\\pagestyle{empty}";
t << "\\cleardoublepage}}\n"; t << "\\cleardoublepage}}\n";
if (!compactLatexFlag) if (!Config::compactLatexFlag)
t << "\\renewcommand{\\chaptermark}[1]{\\markboth{#1}{}}\n"; t << "\\renewcommand{\\chaptermark}[1]{\\markboth{#1}{}}\n";
t << "\\renewcommand{\\sectionmark}[1]{\\markright{\\thesection\\ #1}}\n"; t << "\\renewcommand{\\sectionmark}[1]{\\markright{\\thesection\\ #1}}\n";
t << "\\lhead[\\fancyplain{}{\\bfseries\\thepage}]\n"; t << "\\lhead[\\fancyplain{}{\\bfseries\\thepage}]\n";
...@@ -501,7 +503,7 @@ void LatexGenerator::writeStyleInfo(int part) ...@@ -501,7 +503,7 @@ void LatexGenerator::writeStyleInfo(int part)
case 2: case 2:
{ {
t << " Dimitri van Heesch \\copyright 1997-1999}]{}\n"; t << " Dimitri van Heesch \\copyright 1997-1999}]{}\n";
//QString dtString=dateToString(FALSE); //QCString dtString=dateToString(FALSE);
t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize "; t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize ";
} }
break; break;
...@@ -646,7 +648,7 @@ void LatexGenerator::writeObjectLink(const char *, const char *, ...@@ -646,7 +648,7 @@ void LatexGenerator::writeObjectLink(const char *, const char *,
void LatexGenerator::writePageRef(const char *clname, const char *anchor) void LatexGenerator::writePageRef(const char *clname, const char *anchor)
{ {
t << " {\\rm (p. \\pageref{"; t << " {\\rm (p.~\\pageref{";
if (clname) t << clname; if (clname) t << clname;
if (anchor) t << "_" << anchor; if (anchor) t << "_" << anchor;
t << "})}"; t << "})}";
...@@ -662,12 +664,12 @@ void LatexGenerator::writeCodeLink(const char *,const char *, ...@@ -662,12 +664,12 @@ void LatexGenerator::writeCodeLink(const char *,const char *,
void LatexGenerator::startTitle() void LatexGenerator::startTitle()
{ {
if (compactLatexFlag) t << "\\subsection{"; else t << "\\section{"; if (Config::compactLatexFlag) t << "\\subsection{"; else t << "\\section{";
} }
void LatexGenerator::startGroupHeader() void LatexGenerator::startGroupHeader()
{ {
if (compactLatexFlag) t << "\\subsubsection*{"; else t << "\\subsection*{"; if (Config::compactLatexFlag) t << "\\subsubsection*{"; else t << "\\subsection*{";
} }
void LatexGenerator::endGroupHeader() void LatexGenerator::endGroupHeader()
...@@ -700,7 +702,7 @@ void LatexGenerator::startMemberDoc(const char *clname, ...@@ -700,7 +702,7 @@ void LatexGenerator::startMemberDoc(const char *clname,
} }
t << "}" << endl; t << "}" << endl;
// //
if (compactLatexFlag) t << "\\subsubsection{"; else t << "\\subsection{"; if (Config::compactLatexFlag) t << "\\subsubsection{"; else t << "\\subsection{";
t << "\\setlength{\\rightskip}{0pt plus 5cm}"; t << "\\setlength{\\rightskip}{0pt plus 5cm}";
} }
...@@ -762,7 +764,7 @@ void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab, ...@@ -762,7 +764,7 @@ void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
startBold(); startBold();
docify(title); docify(title);
endBold(); endBold();
t << " (p. \\pageref{" << lab << "})" << endl; t << " (p.~\\pageref{" << lab << "})" << endl;
} }
//void LatexGenerator::docify(const char *str) //void LatexGenerator::docify(const char *str)
...@@ -808,78 +810,101 @@ void LatexGenerator::docify(const char *str) ...@@ -808,78 +810,101 @@ void LatexGenerator::docify(const char *str)
else else
{ t << "$\\backslash$"; } { t << "$\\backslash$"; }
break; break;
// the Latin-1 characters
case 161: t << "!`"; break;
case 181: t << "$\\mu$"; break;
case 191: t << "?`"; break;
case 192: t << "\\`{A}"; break;
case 193: t << "\\'{A}"; break;
case 194: t << "\\^{A}"; break;
case 195: t << "\\~{A}"; break;
case 196: t << "\\\"{A}"; break;
case 197: t << "\\AA "; break;
case 198: t << "\\AE "; break;
case 199: t << "\\c{C}"; break;
case 200: t << "\\`{E}"; break;
case 201: t << "\\'{E}"; break;
case 202: t << "\\^{E}"; break;
case 203: t << "\\\"{E}"; break;
case 204: t << "\\`{I}"; break;
case 205: t << "\\'{I}"; break;
case 206: t << "\\^{I}"; break;
case 207: t << "\\\"{I}"; break;
case 208: t << "D "; break; // anyone know the real code?
case 209: t << "\\~{N}"; break;
case 210: t << "\\`{O}"; break;
case 211: t << "\\'{O}"; break;
case 212: t << "\\^{O}"; break;
case 213: t << "\\~{O}"; break;
case 214: t << "\\\"{O}"; break;
case 215: t << "$\\times$"; break;
case 216: t << "\\O"; break;
case 217: t << "\\`{U}"; break;
case 218: t << "\\'{U}"; break;
case 219: t << "\\^{U}"; break;
case 220: t << "\\\"{U}"; break;
case 221: t << "\\'{Y}"; break;
case 223: t << "\"s "; break; // assumes german package
case 224: t << "\\`{a}"; break;
case 225: t << "\\'{a}"; break;
case 226: t << "\\^{a}"; break;
case 227: t << "\\~{a}"; break;
case 228: t << "\\\"{a}"; break;
case 229: t << "\\aa "; break;
case 230: t << "\\ae "; break;
case 231: t << "\\c{c}"; break;
case 232: t << "\\`{e}"; break;
case 233: t << "\\'{e}"; break;
case 234: t << "\\^{e}"; break;
case 235: t << "\\\"{e}"; break;
case 236: t << "\\`{\\i}"; break;
case 237: t << "\\'{\\i}"; break;
case 238: t << "\\^{\\i}"; break;
case 239: t << "\\\"{\\i}"; break;
case 241: t << "\\~{n}"; break;
case 242: t << "\\`{o}"; break;
case 243: t << "\\'{o}"; break;
case 244: t << "\\^{o}"; break;
case 245: t << "\\~{o}"; break;
case 246: t << "\\\"{o}"; break;
case 248: t << "\\o "; break;
case 249: t << "\\`{u}"; break;
case 250: t << "\\'{u}"; break;
case 251: t << "\\^{u}"; break;
case 252: t << "\\\"{u}"; break;
case 253: t << "\\'{y}"; break;
case 255: t << "\\\"{y}"; break;
default: default:
if ((isupper(c) && islower(pc)) if (theTranslator->latexBabelPackage()=="a4j")
// || { // language is japanese
// (pc!=':' && c==':') || if (c>=128) // wide character
// (pc==':' && c!=':') {
) t << "\\-"; t << (char)c;
t << (char)c; if (*p)
{
c = *p++;
t << (char)c;
}
else // ascii char => see if we can insert hypenation hint
{
if (isupper(c) && islower(pc)) t << "\\-";
t << (char)c;
}
}
}
else // language is other than japanese
{
switch(c)
{
// the Latin-1 characters
case 161: t << "!`"; break;
case 181: t << "$\\mu$"; break;
case 191: t << "?`"; break;
case 192: t << "\\`{A}"; break;
case 193: t << "\\'{A}"; break;
case 194: t << "\\^{A}"; break;
case 195: t << "\\~{A}"; break;
case 196: t << "\\\"{A}"; break;
case 197: t << "\\AA "; break;
case 198: t << "\\AE "; break;
case 199: t << "\\c{C}"; break;
case 200: t << "\\`{E}"; break;
case 201: t << "\\'{E}"; break;
case 202: t << "\\^{E}"; break;
case 203: t << "\\\"{E}"; break;
case 204: t << "\\`{I}"; break;
case 205: t << "\\'{I}"; break;
case 206: t << "\\^{I}"; break;
case 207: t << "\\\"{I}"; break;
case 208: t << "D "; break; // anyone know the real code?
case 209: t << "\\~{N}"; break;
case 210: t << "\\`{O}"; break;
case 211: t << "\\'{O}"; break;
case 212: t << "\\^{O}"; break;
case 213: t << "\\~{O}"; break;
case 214: t << "\\\"{O}"; break;
case 215: t << "$\\times$"; break;
case 216: t << "\\O"; break;
case 217: t << "\\`{U}"; break;
case 218: t << "\\'{U}"; break;
case 219: t << "\\^{U}"; break;
case 220: t << "\\\"{U}"; break;
case 221: t << "\\'{Y}"; break;
case 223: t << "\"s "; break; // assumes german package
case 224: t << "\\`{a}"; break;
case 225: t << "\\'{a}"; break;
case 226: t << "\\^{a}"; break;
case 227: t << "\\~{a}"; break;
case 228: t << "\\\"{a}"; break;
case 229: t << "\\aa "; break;
case 230: t << "\\ae "; break;
case 231: t << "\\c{c}"; break;
case 232: t << "\\`{e}"; break;
case 233: t << "\\'{e}"; break;
case 234: t << "\\^{e}"; break;
case 235: t << "\\\"{e}"; break;
case 236: t << "\\`{\\i}"; break;
case 237: t << "\\'{\\i}"; break;
case 238: t << "\\^{\\i}"; break;
case 239: t << "\\\"{\\i}"; break;
case 241: t << "\\~{n}"; break;
case 242: t << "\\`{o}"; break;
case 243: t << "\\'{o}"; break;
case 244: t << "\\^{o}"; break;
case 245: t << "\\~{o}"; break;
case 246: t << "\\\"{o}"; break;
case 248: t << "\\o "; break;
case 249: t << "\\`{u}"; break;
case 250: t << "\\'{u}"; break;
case 251: t << "\\^{u}"; break;
case 252: t << "\\\"{u}"; break;
case 253: t << "\\'{y}"; break;
case 255: t << "\\\"{y}"; break;
default: // normal ascii char
{
// see if we can insert an hyphenation hint
if (isupper(c) && islower(pc)) t << "\\-";
t << (char)c;
}
}
}
} }
pc = c; pc = c;
} }
...@@ -916,7 +941,7 @@ void LatexGenerator::writeChar(char c) ...@@ -916,7 +941,7 @@ void LatexGenerator::writeChar(char c)
void LatexGenerator::startClassDiagram() void LatexGenerator::startClassDiagram()
{ {
if (compactLatexFlag) t << "\\subsubsection*"; else t << "\\subsection*"; if (Config::compactLatexFlag) t << "\\subsubsection*"; else t << "\\subsection*";
t << "{"; t << "{";
} }
......
...@@ -83,6 +83,8 @@ class LatexGenerator : public OutputGenerator ...@@ -83,6 +83,8 @@ class LatexGenerator : public OutputGenerator
void endMemberSections() {} void endMemberSections() {}
void startMemberHeader() { startGroupHeader(); } void startMemberHeader() { startGroupHeader(); }
void endMemberHeader() { endGroupHeader(); } void endMemberHeader() { endGroupHeader(); }
void startMemberSubtitle() {}
void endMemberSubtitle() {}
void startMemberList() { t << "\\begin{CompactItemize}" << endl; } void startMemberList() { t << "\\begin{CompactItemize}" << endl; }
void endMemberList() { t << "\\end{CompactItemize}" << endl; } void endMemberList() { t << "\\end{CompactItemize}" << endl; }
void startMemberItem() { t << "\\item " << endl; } void startMemberItem() { t << "\\item " << endl; }
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
* *
*/ */
#include <qstring.h>
#include <qfile.h>
#include <stdio.h> #include <stdio.h>
#include "qtbc.h"
#include <qfile.h>
unsigned char logo_data[] = { unsigned char logo_data[] = {
0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x76, 0x00, 0x35, 0x00, 0xf7, 0x00, 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x76, 0x00, 0x35, 0x00, 0xf7, 0x00,
0x00, 0x31, 0x7b, 0x6b, 0x31, 0x7b, 0x73, 0x31, 0x84, 0x7b, 0x31, 0x84, 0x00, 0x31, 0x7b, 0x6b, 0x31, 0x7b, 0x73, 0x31, 0x84, 0x7b, 0x31, 0x84,
...@@ -492,7 +493,7 @@ unsigned int search_len = 2010; ...@@ -492,7 +493,7 @@ unsigned int search_len = 2010;
void writeLogo(const char *dir) void writeLogo(const char *dir)
{ {
QString fileName=(QString)dir+"/doxygen.gif"; QCString fileName=(QCString)dir+"/doxygen.gif";
QFile f(fileName); QFile f(fileName);
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
f.writeBlock((char *)logo_data,logo_len); f.writeBlock((char *)logo_data,logo_len);
...@@ -505,7 +506,7 @@ void writeLogo(const char *dir) ...@@ -505,7 +506,7 @@ void writeLogo(const char *dir)
void writeSearchButton(const char *dir) void writeSearchButton(const char *dir)
{ {
QString fileName=(QString)dir+"/search.gif"; QCString fileName=(QCString)dir+"/search.gif";
QFile f(fileName); QFile f(fileName);
if (f.open(IO_WriteOnly)) if (f.open(IO_WriteOnly))
f.writeBlock((char *)search_data,search_len); f.writeBlock((char *)search_data,search_len);
......
...@@ -14,8 +14,10 @@ ...@@ -14,8 +14,10 @@
* *
*/ */
#include <qdir.h>
#include <stdlib.h> #include <stdlib.h>
#include "qtbc.h"
#include <qdir.h>
#include "message.h" #include "message.h"
#include "mangen.h" #include "mangen.h"
#include "config.h" #include "config.h"
...@@ -24,7 +26,7 @@ ...@@ -24,7 +26,7 @@
ManGenerator::ManGenerator() : OutputGenerator() ManGenerator::ManGenerator() : OutputGenerator()
{ {
dir=manOutputDir+"/man3"; dir=Config::manOutputDir+"/man3";
firstCol=TRUE; firstCol=TRUE;
paragraph=FALSE; paragraph=FALSE;
col=0; col=0;
...@@ -37,7 +39,7 @@ ManGenerator::~ManGenerator() ...@@ -37,7 +39,7 @@ ManGenerator::~ManGenerator()
void ManGenerator::append(const OutputGenerator *g) void ManGenerator::append(const OutputGenerator *g)
{ {
QString r=g->getContents(); QCString r=g->getContents();
if (upperCase) if (upperCase)
t << r.upper(); t << r.upper();
else else
...@@ -52,23 +54,23 @@ void ManGenerator::append(const OutputGenerator *g) ...@@ -52,23 +54,23 @@ void ManGenerator::append(const OutputGenerator *g)
void ManGenerator::init() void ManGenerator::init()
{ {
QDir d(manOutputDir); QDir d(Config::manOutputDir);
if (!d.exists() && !d.mkdir(manOutputDir)) if (!d.exists() && !d.mkdir(Config::manOutputDir))
{ {
err("Could not create output directory %s\n",manOutputDir.data()); err("Could not create output directory %s\n",Config::manOutputDir.data());
exit(1); exit(1);
} }
d.setPath(manOutputDir+"/man3"); d.setPath(Config::manOutputDir+"/man3");
if (!d.exists() && !d.mkdir(manOutputDir+"/man3")) if (!d.exists() && !d.mkdir(Config::manOutputDir+"/man3"))
{ {
err("Could not create output directory %s/man3\n",manOutputDir.data()); err("Could not create output directory %s/man3\n",Config::manOutputDir.data());
exit(1); exit(1);
} }
} }
void ManGenerator::startFile(const char *name,const char *,bool) void ManGenerator::startFile(const char *name,const char *,bool)
{ {
QString fileName=name; QCString fileName=name;
if (fileName.left(6)=="class_") if (fileName.left(6)=="class_")
{ {
fileName=fileName.right(fileName.length()-6); fileName=fileName.right(fileName.length()-6);
...@@ -78,7 +80,8 @@ void ManGenerator::startFile(const char *name,const char *,bool) ...@@ -78,7 +80,8 @@ void ManGenerator::startFile(const char *name,const char *,bool)
{ {
fileName=fileName.left(i); fileName=fileName.left(i);
} }
if (fileName.right(2)!=manExtension) fileName+=manExtension; if (convertToQCString(fileName.right(2))!=Config::manExtension)
fileName+=Config::manExtension;
startPlainFile(fileName); startPlainFile(fileName);
firstCol=TRUE; firstCol=TRUE;
} }
...@@ -95,10 +98,10 @@ void ManGenerator::writeDoxyAnchor(const char *, const char *,const char *) ...@@ -95,10 +98,10 @@ void ManGenerator::writeDoxyAnchor(const char *, const char *,const char *)
void ManGenerator::endTitleHead(const char *name) void ManGenerator::endTitleHead(const char *name)
{ {
t << ".TH " << name << " 3 \"" << dateToString(FALSE) << "\" \""; t << ".TH " << name << " 3 \"" << dateToString(FALSE) << "\" \"";
if (projectName.isEmpty()) if (Config::projectName.isEmpty())
t << "Doxygen"; t << "Doxygen";
else else
t << projectName; t << Config::projectName;
t << "\" \\\" -*- nroff -*-" << endl; t << "\" \\\" -*- nroff -*-" << endl;
t << ".ad l" << endl; t << ".ad l" << endl;
t << ".nh" << endl; t << ".nh" << endl;
......
...@@ -82,6 +82,8 @@ class ManGenerator : public OutputGenerator ...@@ -82,6 +82,8 @@ class ManGenerator : public OutputGenerator
void startMemberHeader(); void startMemberHeader();
void endMemberHeader(); void endMemberHeader();
void insertMemberAlign() {} void insertMemberAlign() {}
void startMemberSubtitle() {}
void endMemberSubtitle() {}
void writeListItem(); void writeListItem();
void startMemberList() { t << "\n.in +1c"; firstCol=FALSE; } void startMemberList() { t << "\n.in +1c"; firstCol=FALSE; }
void endMemberList() { t << "\n.in -1c"; firstCol=FALSE; } void endMemberList() { t << "\n.in -1c"; firstCol=FALSE; }
......
...@@ -58,6 +58,7 @@ MemberDef::MemberDef(const char *t,const char *na,const char *a,const char *e, ...@@ -58,6 +58,7 @@ MemberDef::MemberDef(const char *t,const char *na,const char *a,const char *e,
enumFields=0; enumFields=0;
enumScope=0; enumScope=0;
enumDeclList=0; enumDeclList=0;
scopeTAL=0;
type=substituteClassNames(t); type=substituteClassNames(t);
args=substituteClassNames(a); args=substituteClassNames(a);
if (type.isNull()) decl=name()+args; else decl=type+" "+name()+args; if (type.isNull()) decl=name()+args; else decl=type+" "+name()+args;
...@@ -107,7 +108,6 @@ MemberDef::MemberDef(const char *t,const char *na,const char *a,const char *e, ...@@ -107,7 +108,6 @@ MemberDef::MemberDef(const char *t,const char *na,const char *a,const char *e,
{ {
argList=0; argList=0;
} }
} }
MemberDef::~MemberDef() MemberDef::~MemberDef()
...@@ -180,7 +180,7 @@ void MemberDef::writeExample(OutputList &ol) ...@@ -180,7 +180,7 @@ void MemberDef::writeExample(OutputList &ol)
} }
#endif #endif
QString MemberDef::getOutputFileBase() const QCString MemberDef::getOutputFileBase() const
{ {
if (classDef) if (classDef)
{ {
...@@ -202,3 +202,50 @@ QString MemberDef::getOutputFileBase() const ...@@ -202,3 +202,50 @@ QString MemberDef::getOutputFileBase() const
" container!\n",name().data()); " container!\n",name().data());
return "dummy"; return "dummy";
} }
void MemberDef::setScopeTemplateArguments(ArgumentList *tal)
{
// copy function arguments (if any)
if (tal)
{
scopeTAL = new ArgumentList;
scopeTAL->setAutoDelete(TRUE);
ArgumentListIterator tali(*tal);
Argument *a;
for (;(a=tali.current());++tali)
{
scopeTAL->append(new Argument(*a));
}
scopeTAL->constSpecifier = tal->constSpecifier;
scopeTAL->volatileSpecifier = tal->volatileSpecifier;
scopeTAL->pureSpecifier = tal->pureSpecifier;
}
}
QCString MemberDef::getScopeTemplateNameString()
{
QCString result;
if (!scopeTAL || scopeTAL->count()==0) return result;
result="<";
Argument *a=scopeTAL->first();
while (a)
{
if (a->name.length()>0) // add template argument name
{
result+=a->name;
}
else // extract name from type
{
int i=a->type.length()-1;
while (i>=0 && isId(a->type.at(i))) i--;
if (i>0)
{
result+=a->type.right(a->type.length()-i-1);
}
}
a=scopeTAL->next();
if (a) result+=", ";
}
result+=">";
return result;
}
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef MEMBERDEF_H #ifndef MEMBERDEF_H
#define MEMBERDEF_H #define MEMBERDEF_H
#include <qstring.h> #include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
...@@ -55,13 +55,14 @@ class MemberDef : public Definition ...@@ -55,13 +55,14 @@ class MemberDef : public Definition
const ArgumentList *al); const ArgumentList *al);
~MemberDef(); ~MemberDef();
QString getOutputFileBase() const; QCString getOutputFileBase() const;
const char *declaration() const { return decl; } const char *declaration() const { return decl; }
const char *definition() const { return def; } const char *definition() const { return def; }
const char *typeString() const { return type; } const char *typeString() const { return type; }
const char *argsString() const { return args; } const char *argsString() const { return args; }
const char *excpString() const { return exception; } const char *excpString() const { return exception; }
const char *anchor() const { return ref; } const char *anchor() const { return ref; }
QCString bodyCode() const { return body; }
ClassDef *memberClass() { return classDef; } ClassDef *memberClass() { return classDef; }
Protection protection() const { return prot; } Protection protection() const { return prot; }
Specifier virtualness() const { return virt; } Specifier virtualness() const { return virt; }
...@@ -74,17 +75,25 @@ class MemberDef : public Definition ...@@ -74,17 +75,25 @@ class MemberDef : public Definition
void setFileDec(FileDef *fd) { fileDec=fd; } void setFileDec(FileDef *fd) { fileDec=fd; }
void setAnchor(const char *a) { ref=a; } void setAnchor(const char *a) { ref=a; }
void setProtection(Protection p) { prot=p; } void setProtection(Protection p) { prot=p; }
void setBody(const QCString &b) { body=b; }
FileDef *getFileDef() { return fileDef; } FileDef *getFileDef() { return fileDef; }
FileDef *getFileDec() { return fileDec; } FileDef *getFileDec() { return fileDec; }
void setMemberClass(ClassDef *cd) { classDef=cd; } void setMemberClass(ClassDef *cd) { classDef=cd; }
bool isRelated() const { return related; } bool isRelated() const { return related; }
bool isStatic() const { return stat; } bool isStatic() const { return stat; }
bool hasDocumentation() // overrides hasDocumentation in definition.h
{ return !documentation().isNull() ||
!briefDescription().isNull() ||
!body.isEmpty() ||
Config::extractAllFlag;
}
bool detailsAreVisible() const bool detailsAreVisible() const
{ return !documentation().isEmpty() || { return !documentation().isEmpty() || !body.isEmpty() ||
(mtype==Enumeration && docEnumValues) || (mtype==Enumeration && docEnumValues) ||
(mtype==EnumValue && !briefDescription().isEmpty()) || (mtype==EnumValue && !briefDescription().isEmpty()) ||
(!briefDescription().isEmpty() && (!briefDescription().isEmpty() &&
!briefMemDescFlag && repeatBriefFlag); !Config::briefMemDescFlag && Config::repeatBriefFlag);
} }
// relation to other members // relation to other members
...@@ -138,7 +147,14 @@ class MemberDef : public Definition ...@@ -138,7 +147,14 @@ class MemberDef : public Definition
// argument related members // argument related members
ArgumentList *argumentList() const { return argList; } ArgumentList *argumentList() const { return argList; }
void setArgumentList(ArgumentList *al)
{ if (argList) delete argList;
argList = al;
}
ArgumentList *templateArguments() const { return tArgList; } ArgumentList *templateArguments() const { return tArgList; }
void setScopeTemplateArguments(ArgumentList *t);
ArgumentList *scopeTemplateArguments() const { return scopeTAL; }
QCString getScopeTemplateNameString();
// namespace related members // namespace related members
NamespaceDef *getNamespace() { return nspace; } NamespaceDef *getNamespace() { return nspace; }
...@@ -158,20 +174,21 @@ class MemberDef : public Definition ...@@ -158,20 +174,21 @@ class MemberDef : public Definition
MemberList *enumFields; // enumeration fields MemberList *enumFields; // enumeration fields
OutputList *enumDeclList; // stored piece of documentation for enumeration. OutputList *enumDeclList; // stored piece of documentation for enumeration.
NamespaceDef *nspace; // the namespace this member is in. NamespaceDef *nspace; // the namespace this member is in.
QString type; // return type QCString type; // return type
QString args; // function arguments/variable array specifiers QCString args; // function arguments/variable array specifiers
QString exception; // exceptions that can be thrown QCString exception; // exceptions that can be thrown
QString decl; // member declaration in class QCString body; // function body code
QString declFile; // file where the declaration was found QCString decl; // member declaration in class
QCString declFile; // file where the declaration was found
int declLine; // line where the declaration was found int declLine; // line where the declaration was found
QString def; // member definition in code (fully qualified name) QCString def; // member definition in code (fully qualified name)
QString defFile; // file where the definition was found QCString defFile; // file where the definition was found
int defLine; // line where the definition was found int defLine; // line where the definition was found
QString ref; // HTML anchor name QCString ref; // HTML anchor name
Specifier virt; // normal/virtual/pure virtual Specifier virt; // normal/virtual/pure virtual
Protection prot; // protection type [Public/Protected/Private] Protection prot; // protection type [Public/Protected/Private]
bool related; // is this a member that is only related to a class bool related; // is this a member that is only related to a class
QString external; // anchor of a member if extracted from a tag file QCString external; // anchor of a member if extracted from a tag file
bool stat; // is it a static function? bool stat; // is it a static function?
MemberType mtype; // returns the kind of member MemberType mtype; // returns the kind of member
bool eUsed; // is the enumerate already placed in a list bool eUsed; // is the enumerate already placed in a list
...@@ -179,6 +196,7 @@ class MemberDef : public Definition ...@@ -179,6 +196,7 @@ class MemberDef : public Definition
bool docEnumValues; // is an enum with documented enum values. bool docEnumValues; // is an enum with documented enum values.
ArgumentList *argList; // argument list of this member ArgumentList *argList; // argument list of this member
ArgumentList *tArgList; // template argument list of function template ArgumentList *tArgList; // template argument list of function template
ArgumentList *scopeTAL; // template argument list of class template
// disable copying of member defs // disable copying of member defs
MemberDef(const MemberDef &); MemberDef(const MemberDef &);
......
...@@ -40,10 +40,10 @@ void MemberList::countDecMembers() ...@@ -40,10 +40,10 @@ void MemberList::countDecMembers()
MemberDef *md=first(); MemberDef *md=first();
while (md) while (md)
{ {
if ((!hideMemberFlag || md->hasDocumentation()) && if ((!Config::hideMemberFlag || md->hasDocumentation()) &&
(!hideMemberFlag || !md->documentation().isEmpty() || (!Config::hideMemberFlag || !md->documentation().isEmpty() ||
briefMemDescFlag || repeatBriefFlag Config::briefMemDescFlag || Config::repeatBriefFlag
) || extractAllFlag || ) || Config::extractAllFlag ||
(md->isEnumerate() && (md->isEnumerate() &&
md->hasDocumentedEnumValues() md->hasDocumentedEnumValues()
) )
...@@ -59,7 +59,7 @@ void MemberList::countDecMembers() ...@@ -59,7 +59,7 @@ void MemberList::countDecMembers()
case MemberDef::EnumValue: enumValCnt++; break; case MemberDef::EnumValue: enumValCnt++; break;
case MemberDef::Typedef: typeCnt++; break; case MemberDef::Typedef: typeCnt++; break;
case MemberDef::Prototype: protoCnt++; break; case MemberDef::Prototype: protoCnt++; break;
case MemberDef::Define: if (extractAllFlag || md->argsString() || md->hasDocumentation() ) case MemberDef::Define: if (Config::extractAllFlag || md->argsString() || md->hasDocumentation() )
defCnt++; defCnt++;
break; break;
case MemberDef::Friend: friendCnt++; break; case MemberDef::Friend: friendCnt++; break;
...@@ -73,18 +73,11 @@ void MemberList::countDecMembers() ...@@ -73,18 +73,11 @@ void MemberList::countDecMembers()
void MemberList::countDocMembers() void MemberList::countDocMembers()
{ {
varCnt=funcCnt=enumCnt=enumValCnt=typeCnt=protoCnt=defCnt=friendCnt; varCnt=funcCnt=enumCnt=enumValCnt=typeCnt=protoCnt=defCnt=friendCnt=0;
MemberDef *md=first(); MemberDef *md=first();
while (md) while (md)
{ {
//if (extractAllFlag || /*md->hasDocumentation()*/ if (Config::extractAllFlag || md->detailsAreVisible())
// !md->documentation().isEmpty() ||
// (!md->briefDescription().isEmpty() &&
// !briefMemDescFlag &&
// repeatBriefFlag
// )
// )
if (extractAllFlag || md->detailsAreVisible())
{ {
QRegExp r("@[0-9]+"); QRegExp r("@[0-9]+");
int dummy; int dummy;
......
...@@ -29,7 +29,7 @@ class MemberName : public QList<MemberDef> ...@@ -29,7 +29,7 @@ class MemberName : public QList<MemberDef>
int compareItems(GCI item1,GCI item2); int compareItems(GCI item1,GCI item2);
private: private:
QString name; QCString name;
}; };
class MemberNameIterator : public QListIterator<MemberDef> class MemberNameIterator : public QListIterator<MemberDef>
...@@ -62,8 +62,8 @@ struct MemberInfo ...@@ -62,8 +62,8 @@ struct MemberInfo
MemberDef *memberDef; MemberDef *memberDef;
Protection prot; Protection prot;
Specifier virt; Specifier virt;
QString scopePath; QCString scopePath;
QString ambiguityResolutionScope; QCString ambiguityResolutionScope;
}; };
class MemberNameInfo : public QList<MemberInfo> class MemberNameInfo : public QList<MemberInfo>
...@@ -74,7 +74,7 @@ class MemberNameInfo : public QList<MemberInfo> ...@@ -74,7 +74,7 @@ class MemberNameInfo : public QList<MemberInfo>
const char *memberName() const { return name; } const char *memberName() const { return name; }
int compareItems(GCI item1,GCI item2); int compareItems(GCI item1,GCI item2);
private: private:
QString name; QCString name;
}; };
class MemberNameInfoIterator : public QListIterator<MemberInfo> class MemberNameInfoIterator : public QListIterator<MemberInfo>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
void msg(const char *fmt, ...) void msg(const char *fmt, ...)
{ {
if (!quietFlag) if (!Config::quietFlag)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
...@@ -31,7 +31,7 @@ void msg(const char *fmt, ...) ...@@ -31,7 +31,7 @@ void msg(const char *fmt, ...)
void warn(const char *fmt, ...) void warn(const char *fmt, ...)
{ {
if (warningFlag) if (Config::warningFlag)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
* *
*/ */
#include "qtbc.h"
#include "namespacedef.h" #include "namespacedef.h"
#include "outputlist.h" #include "outputlist.h"
#include "util.h" #include "util.h"
...@@ -60,14 +61,14 @@ void NamespaceDef::computeAnchors() ...@@ -60,14 +61,14 @@ void NamespaceDef::computeAnchors()
void NamespaceDef::writeDocumentation(OutputList &ol) void NamespaceDef::writeDocumentation(OutputList &ol)
{ {
QString pageTitle=name()+" Namespace Reference"; QCString pageTitle=name()+" Namespace Reference";
startFile(ol,fileName,pageTitle); startFile(ol,fileName,pageTitle);
startTitle(ol); startTitle(ol);
//ol.docify(pageTitle); //ol.docify(pageTitle);
parseText(ol,theTranslator->trNamespaceReference(name())); parseText(ol,theTranslator->trNamespaceReference(name()));
endTitle(ol,name()); endTitle(ol,name());
if (genTagFile.length()>0) tagFile << "%" << name() << ":\n"; if (Config::genTagFile.length()>0) tagFile << "%" << name() << ":\n";
OutputList briefOutput(&ol); OutputList briefOutput(&ol);
if (briefDescription()) if (briefDescription())
...@@ -103,7 +104,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -103,7 +104,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startMemberList(); ol.startMemberList();
found=TRUE; found=TRUE;
} }
QString clName=cd->name().copy(); QCString clName=cd->name().copy();
if (clName.left(name().length()+2)==name()+"::") if (clName.left(name().length()+2)==name()+"::")
{ {
clName = clName.right(clName.length()-name().length()-2); clName = clName.right(clName.length()-name().length()-2);
...@@ -225,7 +226,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -225,7 +226,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startGroupHeader(); ol.startGroupHeader();
parseText(ol,theTranslator->trAuthor()); parseText(ol,theTranslator->trAuthor());
ol.endGroupHeader(); ol.endGroupHeader();
parseText(ol,theTranslator->trGeneratedAutomatically(projectName)); parseText(ol,theTranslator->trGeneratedAutomatically(Config::projectName));
ol.enableAll(); ol.enableAll();
endFile(ol); endFile(ol);
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef NAMESPACEDEF_H #ifndef NAMESPACEDEF_H
#define NAMESPACEDEF_H #define NAMESPACEDEF_H
#include <qstring.h> #include "qtbc.h"
#include <qstrlist.h> #include <qstrlist.h>
#include <qdict.h> #include <qdict.h>
#include "definition.h" #include "definition.h"
...@@ -33,8 +33,8 @@ class NamespaceDef : public Definition ...@@ -33,8 +33,8 @@ class NamespaceDef : public Definition
public: public:
NamespaceDef(const char *name,const char *ref=0); NamespaceDef(const char *name,const char *ref=0);
~NamespaceDef(); ~NamespaceDef();
//QString namespaceFile() const { return fileName; } //QCString namespaceFile() const { return fileName; }
QString getOutputFileBase() const { return fileName; } QCString getOutputFileBase() const { return fileName; }
void insertUsedFile(const char *fname); void insertUsedFile(const char *fname);
void writeDocumentation(OutputList &ol); void writeDocumentation(OutputList &ol);
void insertClass(ClassDef *cd); void insertClass(ClassDef *cd);
...@@ -42,10 +42,20 @@ class NamespaceDef : public Definition ...@@ -42,10 +42,20 @@ class NamespaceDef : public Definition
void computeAnchors(); void computeAnchors();
int countMembers(); int countMembers();
const char *getReference() { return reference; } const char *getReference() { return reference; }
bool isVisible()
{
return !getReference() && hasDocumentation() &&
!name().isEmpty() && name().at(0)!='@';
}
bool isVisibleExt()
{
return (getReference() || hasDocumentation()) &&
!name().isEmpty() && name().at(0)!='@';
}
private: private:
QString reference; QCString reference;
QString fileName; QCString fileName;
QStrList files; QStrList files;
ClassList *classList; ClassList *classList;
MemberList *memList; MemberList *memList;
......
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include "qtbc.h"
#include "outputgen.h" #include "outputgen.h"
#include <qstring.h>
#include "message.h" #include "message.h"
OutputGenerator::OutputGenerator() OutputGenerator::OutputGenerator()
...@@ -38,7 +39,7 @@ OutputGenerator::~OutputGenerator() ...@@ -38,7 +39,7 @@ OutputGenerator::~OutputGenerator()
void OutputGenerator::startPlainFile(const char *name) void OutputGenerator::startPlainFile(const char *name)
{ {
//printf("startPlainFile(%s)\n",name); //printf("startPlainFile(%s)\n",name);
QString fileName=dir+"/"+name; QCString fileName=dir+"/"+name;
file = new QFile(fileName); file = new QFile(fileName);
if (!file) if (!file)
{ {
...@@ -66,9 +67,9 @@ void OutputGenerator::endPlainFile() ...@@ -66,9 +67,9 @@ void OutputGenerator::endPlainFile()
t.setDevice(&b); t.setDevice(&b);
} }
QString OutputGenerator::getContents() const QCString OutputGenerator::getContents() const
{ {
QString s; QCString s;
s.resize(a.size()+1); s.resize(a.size()+1);
memcpy(s.data(),a.data(),a.size()); memcpy(s.data(),a.data(),a.size());
s.at(a.size())='\0'; s.at(a.size())='\0';
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef OUTPUTGEN_H #ifndef OUTPUTGEN_H
#define OUTPUTGEN_H #define OUTPUTGEN_H
#include <qstring.h> #include "qtbc.h"
#include <qtstream.h> #include <qtstream.h>
#include <qbuffer.h> #include <qbuffer.h>
#include <qfile.h> #include <qfile.h>
...@@ -88,6 +88,8 @@ class OutputGenerator ...@@ -88,6 +88,8 @@ class OutputGenerator
virtual void endMemberSections() = 0; virtual void endMemberSections() = 0;
virtual void startMemberHeader() = 0; virtual void startMemberHeader() = 0;
virtual void endMemberHeader() = 0; virtual void endMemberHeader() = 0;
virtual void startMemberSubtitle() = 0;
virtual void endMemberSubtitle() = 0;
virtual void startMemberList() = 0; virtual void startMemberList() = 0;
virtual void endMemberList() = 0; virtual void endMemberList() = 0;
virtual void startMemberItem() = 0; virtual void startMemberItem() = 0;
...@@ -168,7 +170,7 @@ class OutputGenerator ...@@ -168,7 +170,7 @@ class OutputGenerator
b.open(IO_WriteOnly); t.setDevice(&b); } b.open(IO_WriteOnly); t.setDevice(&b); }
void startPlainFile(const char *name); void startPlainFile(const char *name);
void endPlainFile(); void endPlainFile();
QString getContents() const; QCString getContents() const;
bool isEnabled() const { return active; } bool isEnabled() const { return active; }
protected: protected:
QTextStream fs; QTextStream fs;
...@@ -176,7 +178,7 @@ class OutputGenerator ...@@ -176,7 +178,7 @@ class OutputGenerator
QBuffer b; QBuffer b;
QTextStream t; QTextStream t;
QFile *file; QFile *file;
QString dir; QCString dir;
bool active; bool active;
private: private:
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#ifndef OUTPUTLIST_H #ifndef OUTPUTLIST_H
#define OUTPUTLIST_H #define OUTPUTLIST_H
#include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include <qstring.h>
#include "index.h" // for IndexSections #include "index.h" // for IndexSections
#include "outputgen.h" #include "outputgen.h"
...@@ -137,6 +137,10 @@ class OutputList ...@@ -137,6 +137,10 @@ class OutputList
{ forall(&OutputGenerator::startMemberHeader); } { forall(&OutputGenerator::startMemberHeader); }
void endMemberHeader() void endMemberHeader()
{ forall(&OutputGenerator::endMemberHeader); } { forall(&OutputGenerator::endMemberHeader); }
void startMemberSubtitle()
{ forall(&OutputGenerator::startMemberSubtitle); }
void endMemberSubtitle()
{ forall(&OutputGenerator::endMemberSubtitle); }
void startMemberList() void startMemberList()
{ forall(&OutputGenerator::startMemberList); } { forall(&OutputGenerator::startMemberList); }
void endMemberList() void endMemberList()
......
...@@ -17,23 +17,10 @@ ...@@ -17,23 +17,10 @@
#ifndef PRE_H #ifndef PRE_H
#define PRE_H #define PRE_H
#include "qtbc.h"
#include <stdio.h> #include <stdio.h>
#include <qstring.h>
#include <qfile.h> #include <qfile.h>
#if 0
class Define
{
public:
Define(const char *n) { name=n; }
~Define();
private:
QString name;
QStrList args;
};
#endif
void initPreprocessor(); void initPreprocessor();
void addSearchDir(const char *dir); void addSearchDir(const char *dir);
void preprocessFile(const char *fileName,BufStr &output); void preprocessFile(const char *fileName,BufStr &output);
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include "qtbc.h"
#include <qarray.h> #include <qarray.h>
#include <qstring.h>
#include <qstack.h> #include <qstack.h>
#include <qfile.h> #include <qfile.h>
#include <qstrlist.h> #include <qstrlist.h>
...@@ -55,7 +55,7 @@ struct FileState ...@@ -55,7 +55,7 @@ struct FileState
int lineNr; int lineNr;
FILE *filePtr; FILE *filePtr;
YY_BUFFER_STATE bufState; YY_BUFFER_STATE bufState;
QString fileName; QCString fileName;
}; };
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
...@@ -64,30 +64,30 @@ struct FileState ...@@ -64,30 +64,30 @@ struct FileState
*/ */
static int yyLineNr = 1; static int yyLineNr = 1;
static QString yyFileName; static QCString yyFileName;
static int ifcount = 0; static int ifcount = 0;
static QStrList *pathList = 0; static QStrList *pathList = 0;
static QStack<FileState> includeStack; static QStack<FileState> includeStack;
static QDict<int> *argDict; static QDict<int> *argDict;
static int defArgs = 0; static int defArgs = -1;
static QString defName; static QCString defName;
static QString defText; static QCString defText;
static QString defArgsStr; static QCString defArgsStr;
static bool defVarArgs; static bool defVarArgs;
static int level; static int level;
static int lastCContext; static int lastCContext;
static int lastCPPContext; static int lastCPPContext;
static QArray<int> levelGuard; static QArray<int> levelGuard;
static QString guardExpr; static QCString guardExpr;
static BufStr *outputBuf; static BufStr *outputBuf;
//static DefineCache *fileDefineCache;
static int roundCount; static int roundCount;
//static const Define *expandDefine;
static bool quoteArg; static bool quoteArg;
static DefineDict *fileDefineDict; static DefineDict *fileDefineDict;
static DefineDict *expandedDict; static DefineDict *expandedDict;
static int findDefArgContext; static int findDefArgContext;
static QCString lastGuardName;
static void incrLevel() static void incrLevel()
{ {
...@@ -142,14 +142,14 @@ static FILE *findFile(const char *fileName) ...@@ -142,14 +142,14 @@ static FILE *findFile(const char *fileName)
char *s=pathList->first(); char *s=pathList->first();
while (s) while (s)
{ {
QString absName=(QString)s+"/"+fileName; QCString absName=(QCString)s+"/"+fileName;
QFileInfo fi(absName); QFileInfo fi(absName);
if (fi.exists()) if (fi.exists())
{ {
FILE *f; FILE *f;
if (!inputFilter.isEmpty()) if (!Config::inputFilter.isEmpty())
{ {
QString cmd = inputFilter+" "+absName; QCString cmd = Config::inputFilter+" "+absName;
f=popen(cmd,"r"); f=popen(cmd,"r");
if (!f) warn("Warning: could not execute filter %s\n",cmd.data()); if (!f) warn("Warning: could not execute filter %s\n",cmd.data());
} }
...@@ -171,14 +171,14 @@ static FILE *findFile(const char *fileName) ...@@ -171,14 +171,14 @@ static FILE *findFile(const char *fileName)
} }
static int getNextChar(const QString &expr,QString *rest,uint &pos); static int getNextChar(const QCString &expr,QCString *rest,uint &pos);
static int getCurrentChar(const QString &expr,QString *rest,uint pos); static int getCurrentChar(const QCString &expr,QCString *rest,uint pos);
static void unputChar(const QString &expr,QString *rest,uint &pos,char c); static void unputChar(const QCString &expr,QCString *rest,uint &pos,char c);
static void expandExpression(QString &expr,QString *rest,int pos); static void expandExpression(QCString &expr,QCString *rest,int pos);
static QString stringize(const QString &s) static QCString stringize(const QCString &s)
{ {
QString result; QCString result;
uint i=0; uint i=0;
bool inString=FALSE; bool inString=FALSE;
bool inChar=FALSE; bool inChar=FALSE;
...@@ -254,7 +254,7 @@ static QString stringize(const QString &s) ...@@ -254,7 +254,7 @@ static QString stringize(const QString &s)
* marker (@-) then this is removed (before the concatenated macro name * marker (@-) then this is removed (before the concatenated macro name
* may be expanded again. * may be expanded again.
*/ */
static void processConcatOperators(QString &expr) static void processConcatOperators(QCString &expr)
{ {
QRegExp r("[ \\t\\n]*##[ \\t\\n]*"); QRegExp r("[ \\t\\n]*##[ \\t\\n]*");
int l,n,i=0; int l,n,i=0;
...@@ -286,7 +286,7 @@ static void processConcatOperators(QString &expr) ...@@ -286,7 +286,7 @@ static void processConcatOperators(QString &expr)
* The replacement string will be returned in \a result and the * The replacement string will be returned in \a result and the
* length of the (unexpanded) argument list is stored in \a len. * length of the (unexpanded) argument list is stored in \a len.
*/ */
static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int &len,const Define *def,QString &result) static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result)
{ {
//printf("replaceFunctionMacro(expr=%s,rest=%s,pos=%d,def=%s) level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),level); //printf("replaceFunctionMacro(expr=%s,rest=%s,pos=%d,def=%s) level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),level);
//bool replaced=FALSE; //bool replaced=FALSE;
...@@ -312,101 +312,113 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int & ...@@ -312,101 +312,113 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int &
//while (j<expr.length() && expr.at(j)!='(') j++; //while (j<expr.length() && expr.at(j)!='(') j++;
//j++; // skip opening paren //j++; // skip opening paren
QDict<QString> argTable; // list of arguments QDict<QCString> argTable; // list of arguments
argTable.setAutoDelete(TRUE); argTable.setAutoDelete(TRUE);
QString arg; QCString arg;
int argCount=0; int argCount=0;
bool done=FALSE; bool done=FALSE;
// FASE 1: read the macro arguments // FASE 1: read the macro arguments
while ((argCount<def->nargs || def->varArgs) && if (def->nargs==0)
((cc=getNextChar(expr,rest,j))!=EOF) && !done {
) while ((cc=getNextChar(expr,rest,j))!=EOF)
{
char c = (char)cc;
if (c==')') break;
}
}
else
{ {
char c=(char)cc; while ((argCount<def->nargs || def->varArgs) &&
if (c=='(') // argument is a function => search for matching ) ((cc=getNextChar(expr,rest,j))!=EOF) && !done
)
{ {
int level=1; char c=(char)cc;
arg+=c; if (c=='(') // argument is a function => search for matching )
char term='\0';
while ((cc=getNextChar(expr,rest,j))!=EOF)
{ {
char c=(char)cc; int level=1;
if (c=='\'' || c=='\"') // skip ('s and )'s inside strings arg+=c;
char term='\0';
while ((cc=getNextChar(expr,rest,j))!=EOF)
{ {
if (term!='\0') char c=(char)cc;
{ if (c=='\'' || c=='\"') // skip ('s and )'s inside strings
if (c==term && expr.at(j-2)!='\\') term='\0'; {
} if (term!='\0')
else {
{ if (c==term && expr.at(j-2)!='\\') term='\0';
term=c; }
else
{
term=c;
}
}
if (term=='\0' && c==')')
{
level--;
arg+=c;
if (level==0) break;
} }
else if (term=='\0' && c=='(')
{
level++;
arg+=c;
}
else
arg+=c;
} }
if (term=='\0' && c==')') }
else if (c==')' || c==',') // last or next argument found
{
if (c==',' && argCount==def->nargs-1 && def->varArgs)
{ {
level--; arg=arg.stripWhiteSpace();
arg+=c; arg+=',';
if (level==0) break;
} }
else if (term=='\0' && c=='(') else
{ {
level++; QCString argKey;
arg+=c; argKey.sprintf("@%d",argCount++); // key name
arg=arg.stripWhiteSpace();
// add argument to the lookup table
argTable.insert(argKey, new QCString(arg));
arg.resize(0);
if (c==')') // end of the argument list
{
done=TRUE;
}
} }
else }
arg+=c; else if (c=='\"') // append literal strings
}
}
else if (c==')' || c==',') // last or next argument found
{
if (c==',' && argCount==def->nargs-1 && def->varArgs)
{
arg=arg.stripWhiteSpace();
arg+=',';
}
else
{ {
QString argKey; arg+=c;
argKey.sprintf("@%d",argCount++); // key name char pc=c;
arg=arg.stripWhiteSpace(); bool found=FALSE;
// add argument to the lookup table while (!found && (cc=getNextChar(expr,rest,j))!=EOF)
argTable.insert(argKey, new QString(arg));
arg.resize(0);
if (c==')') // end of the argument list
{ {
done=TRUE; found = pc!='\\' && cc=='"';
c=(char)cc;
pc=c;
arg+=c;
} }
} }
} else if (c=='\'') // append literal characters
else if (c=='\"') // append literal strings
{
arg+=c;
char pc=c;
bool found=FALSE;
while (!found && (cc=getNextChar(expr,rest,j))!=EOF)
{ {
found = pc!='\\' && cc=='"';
c=(char)cc;
pc=c;
arg+=c; arg+=c;
} char pc=c;
} bool found=FALSE;
else if (c=='\'') // append literal characters while (!found && (cc=getNextChar(expr,rest,j))!=EOF)
{ {
arg+=c; found = pc!='\\' && cc=='\'';
char pc=c; c=(char)cc;
bool found=FALSE; pc=c;
while (!found && (cc=getNextChar(expr,rest,j))!=EOF) arg+=c;
}
}
else // append other characters
{ {
found = pc!='\\' && cc=='\'';
c=(char)cc;
pc=c;
arg+=c; arg+=c;
} }
}
else // append other characters
{
arg+=c;
} }
} }
...@@ -416,8 +428,8 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int & ...@@ -416,8 +428,8 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int &
{ {
uint k=0; uint k=0;
// substitution of all formal arguments // substitution of all formal arguments
QString resExpr; QCString resExpr;
const QString d=def->definition.stripWhiteSpace(); const QCString d=def->definition.stripWhiteSpace();
bool inString=FALSE; bool inString=FALSE;
while (k<d.length()) while (k<d.length())
{ {
...@@ -435,8 +447,8 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int & ...@@ -435,8 +447,8 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int &
} }
else // argument marker => read the argument number else // argument marker => read the argument number
{ {
QString key="@"; QCString key="@";
QString *subst=0; QCString *subst=0;
bool hash=FALSE; bool hash=FALSE;
int l=k-1; int l=k-1;
// search for ## backward // search for ## backward
...@@ -457,7 +469,7 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int & ...@@ -457,7 +469,7 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int &
//printf("request key %s result %s\n",key.data(),args[key]->data()); //printf("request key %s result %s\n",key.data(),args[key]->data());
if (key.length()>1 && (subst=argTable[key])) if (key.length()>1 && (subst=argTable[key]))
{ {
QString substArg=*subst; QCString substArg=*subst;
// only if no ## operator is before or after the argument // only if no ## operator is before or after the argument
// marker we do macro expansion. // marker we do macro expansion.
if (!hash) expandExpression(substArg,0,0); if (!hash) expandExpression(substArg,0,0);
...@@ -506,7 +518,7 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int & ...@@ -506,7 +518,7 @@ static bool replaceFunctionMacro(const QString &expr,QString *rest,int pos,int &
* The position of the identifier is returned (or -1 if nothing is found) * The position of the identifier is returned (or -1 if nothing is found)
* and \a l is its length. Any quoted strings are skipping during the search. * and \a l is its length. Any quoted strings are skipping during the search.
*/ */
static int getNextId(const QString &expr,int p,int *l) static int getNextId(const QCString &expr,int p,int *l)
{ {
int n; int n;
while (p<(int)expr.length()) while (p<(int)expr.length())
...@@ -541,11 +553,11 @@ static int getNextId(const QString &expr,int p,int *l) ...@@ -541,11 +553,11 @@ static int getNextId(const QString &expr,int p,int *l)
* If \a expandAll is \c TRUE then all macros in the expression are * If \a expandAll is \c TRUE then all macros in the expression are
* expanded, otherwise only the first is expanded. * expanded, otherwise only the first is expanded.
*/ */
static void expandExpression(QString &expr,QString *rest,int pos) static void expandExpression(QCString &expr,QCString *rest,int pos)
{ {
//printf("expandExpression(%s,%s)\n",expr.data(),rest ? rest->data() : 0); //printf("expandExpression(%s,%s)\n",expr.data(),rest ? rest->data() : 0);
QString macroName; QCString macroName;
QString expMacro; QCString expMacro;
int i=pos,l,p,len; int i=pos,l,p,len;
while ((p=getNextId(expr,i,&l))!=-1) // search for an macro name while ((p=getNextId(expr,i,&l))!=-1) // search for an macro name
{ {
...@@ -558,7 +570,7 @@ static void expandExpression(QString &expr,QString *rest,int pos) ...@@ -558,7 +570,7 @@ static void expandExpression(QString &expr,QString *rest,int pos)
{ {
Define *def=isDefined(macroName); Define *def=isDefined(macroName);
//printf("name is not an expanded macro def=%s\n",def ? def->name.data() : 0); //printf("name is not an expanded macro def=%s\n",def ? def->name.data() : 0);
if (def && def->nargs==0) // simple macro if (def && def->nargs==-1) // simple macro
{ {
// substitute the definition of the macro // substitute the definition of the macro
expMacro=def->definition.stripWhiteSpace(); expMacro=def->definition.stripWhiteSpace();
...@@ -566,7 +578,7 @@ static void expandExpression(QString &expr,QString *rest,int pos) ...@@ -566,7 +578,7 @@ static void expandExpression(QString &expr,QString *rest,int pos)
len=l; len=l;
//printf("simple macro expansion=`%s'->`%s'\n",macroName.data(),expMacro.data()); //printf("simple macro expansion=`%s'->`%s'\n",macroName.data(),expMacro.data());
} }
else if (def && def->nargs>0) // function macro else if (def && def->nargs>=0) // function macro
{ {
replaced=replaceFunctionMacro(expr,rest,p+l,len,def,expMacro); replaced=replaceFunctionMacro(expr,rest,p+l,len,def,expMacro);
len+=l; len+=l;
...@@ -575,8 +587,8 @@ static void expandExpression(QString &expr,QString *rest,int pos) ...@@ -575,8 +587,8 @@ static void expandExpression(QString &expr,QString *rest,int pos)
if (replaced) // expand the macro and rescan the expression if (replaced) // expand the macro and rescan the expression
{ {
//printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data()); //printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data());
QString resultExpr=expMacro; QCString resultExpr=expMacro;
QString restExpr=expr.right(expr.length()-len-p); QCString restExpr=expr.right(expr.length()-len-p);
processConcatOperators(resultExpr); processConcatOperators(resultExpr);
expandedDict->insert(macroName,def); expandedDict->insert(macroName,def);
expandExpression(resultExpr,&restExpr,0); expandExpression(resultExpr,&restExpr,0);
...@@ -612,13 +624,13 @@ static void expandExpression(QString &expr,QString *rest,int pos) ...@@ -612,13 +624,13 @@ static void expandExpression(QString &expr,QString *rest,int pos)
* \par assumption: * \par assumption:
* \a s only contains pairs of @@'s. * \a s only contains pairs of @@'s.
*/ */
QString removeIdsAndMarkers(const char *s) QCString removeIdsAndMarkers(const char *s)
{ {
//printf("removeIdsAndMarkers(%s)\n",s); //printf("removeIdsAndMarkers(%s)\n",s);
const char *p=s; const char *p=s;
char c; char c;
bool inNum=FALSE; bool inNum=FALSE;
QString result; QCString result;
if (p) if (p)
{ {
while ((c=*p)) while ((c=*p))
...@@ -659,11 +671,11 @@ QString removeIdsAndMarkers(const char *s) ...@@ -659,11 +671,11 @@ QString removeIdsAndMarkers(const char *s)
* \par assumption: * \par assumption:
* \a s only contains pairs of @@'s * \a s only contains pairs of @@'s
*/ */
QString removeMarkers(const char *s) QCString removeMarkers(const char *s)
{ {
const char *p=s; const char *p=s;
char c; char c;
QString result; QCString result;
if (p) if (p)
{ {
while ((c=*p)) while ((c=*p))
...@@ -690,9 +702,9 @@ QString removeMarkers(const char *s) ...@@ -690,9 +702,9 @@ QString removeMarkers(const char *s)
* If needed the function may read additional characters from the input. * If needed the function may read additional characters from the input.
*/ */
bool computeExpression(const QString &expr) bool computeExpression(const QCString &expr)
{ {
QString e=expr; QCString e=expr;
expandExpression(e,0,0); expandExpression(e,0,0);
e = removeIdsAndMarkers(e); e = removeIdsAndMarkers(e);
if (e.length()==0) return FALSE; if (e.length()==0) return FALSE;
...@@ -704,9 +716,9 @@ bool computeExpression(const QString &expr) ...@@ -704,9 +716,9 @@ bool computeExpression(const QString &expr)
* If needed the function may read additional characters from the input * If needed the function may read additional characters from the input
*/ */
QString expandMacro(const QString &name) QCString expandMacro(const QCString &name)
{ {
QString n=name; QCString n=name;
expandExpression(n,0,0); expandExpression(n,0,0);
n=removeMarkers(n); n=removeMarkers(n);
//printf("expandMacro `%s'->`%s'\n",name.data(),n.data()); //printf("expandMacro `%s'->`%s'\n",name.data(),n.data());
...@@ -761,9 +773,9 @@ static void outputArray(const char *a,int len) ...@@ -761,9 +773,9 @@ static void outputArray(const char *a,int len)
if (includeStack.isEmpty()) outputBuf->addArray(a,len); if (includeStack.isEmpty()) outputBuf->addArray(a,len);
} }
static void readIncludeFile(const QString &inc) static void readIncludeFile(const QCString &inc)
{ {
if (!searchIncludeFlag) return; // do not read include files if (!Config::searchIncludeFlag) return; // do not read include files
uint i=0; uint i=0;
// find the start of the include file name // find the start of the include file name
while (i<inc.length() && while (i<inc.length() &&
...@@ -775,10 +787,10 @@ static void readIncludeFile(const QString &inc) ...@@ -775,10 +787,10 @@ static void readIncludeFile(const QString &inc)
inc.at(i)!='"' && inc.at(i)!='>') i++; inc.at(i)!='"' && inc.at(i)!='>') i++;
if (s<inc.length() && i>s) // valid include file name found if (s<inc.length() && i>s) // valid include file name found
{ {
QString incFileName=inc.mid(s,i-s).stripWhiteSpace(); QCString incFileName=inc.mid(s,i-s).stripWhiteSpace();
FILE *f; FILE *f;
QString oldFileName=yyFileName.copy(); QCString oldFileName=yyFileName.copy();
if ((f=findFile(incFileName))) // see if the include file can be found if ((f=findFile(incFileName))) // see if the include file can be found
{ {
#if SHOW_INCLUDES #if SHOW_INCLUDES
...@@ -815,6 +827,8 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -815,6 +827,8 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
B [ \t] B [ \t]
BN [ \t\r\n] BN [ \t\r\n]
%option noyywrap
%x Start %x Start
%x Command %x Command
%x SkipCommand %x SkipCommand
...@@ -822,7 +836,7 @@ BN [ \t\r\n] ...@@ -822,7 +836,7 @@ BN [ \t\r\n]
%x CopyLine %x CopyLine
%x Include %x Include
%x IncludeID %x IncludeID
%x DefineName %x DefName
%x DefineArg %x DefineArg
%x DefineText %x DefineText
%x SkipCPPBlock %x SkipCPPBlock
...@@ -871,16 +885,27 @@ BN [ \t\r\n] ...@@ -871,16 +885,27 @@ BN [ \t\r\n]
} }
*/ */
<CopyLine>{ID}/{BN}*"(" { <CopyLine>{ID}/{BN}*"(" {
Define *def;
//printf("Search for define %s\n",yytext);
if (includeStack.isEmpty() && if (includeStack.isEmpty() &&
macroExpansionFlag && Config::macroExpansionFlag &&
/* (expandDefine=fileDefineCache->findDefine(yyFileName,yytext)) */ /* (expandDefine=fileDefineCache->findDefine(yyFileName,yytext)) */
fileDefineDict->find(yytext) (def=fileDefineDict->find(yytext))
) )
{ {
//printf("Found it!\n");
roundCount=0; roundCount=0;
defArgsStr=yytext; defArgsStr=yytext;
findDefArgContext = CopyLine; if (def->nargs==-1) // no function macro
BEGIN(FindDefineArgs); {
QCString result = expandMacro(defArgsStr);
outputArray(result,result.length());
}
else // zero or more arguments
{
findDefArgContext = CopyLine;
BEGIN(FindDefineArgs);
}
} }
else else
{ {
...@@ -889,14 +914,16 @@ BN [ \t\r\n] ...@@ -889,14 +914,16 @@ BN [ \t\r\n]
} }
<CopyLine>{ID} { <CopyLine>{ID} {
Define *def=0; Define *def=0;
//printf("Search for define %s\n",yytext);
if (includeStack.isEmpty() && if (includeStack.isEmpty() &&
macroExpansionFlag && Config::macroExpansionFlag &&
(def=fileDefineDict->find(yytext)) && (def=fileDefineDict->find(yytext)) &&
def->nargs==0 def->nargs==-1
) )
{ {
QString name=yytext; //printf("Found it!\n");
QString result=expandMacro(name); QCString name=yytext;
QCString result=expandMacro(name);
outputArray(result,result.length()); outputArray(result,result.length());
} }
else else
...@@ -921,7 +948,7 @@ BN [ \t\r\n] ...@@ -921,7 +948,7 @@ BN [ \t\r\n]
roundCount--; roundCount--;
if (roundCount==0) if (roundCount==0)
{ {
QString result=expandMacro(defArgsStr); QCString result=expandMacro(defArgsStr);
if (findDefArgContext==CopyLine) if (findDefArgContext==CopyLine)
{ {
outputArray(result,result.length()); outputArray(result,result.length());
...@@ -964,15 +991,15 @@ BN [ \t\r\n] ...@@ -964,15 +991,15 @@ BN [ \t\r\n]
defArgsStr+=*yytext; defArgsStr+=*yytext;
} }
<Command>"include"{B}*/{ID} { <Command>"include"{B}*/{ID} {
if (macroExpansionFlag) if (Config::macroExpansionFlag)
BEGIN(IncludeID); BEGIN(IncludeID);
} }
<Command>"include"{B}*[<"] { <Command>"include"{B}*[<"] {
BEGIN(Include); BEGIN(Include);
} }
<Command>"define"{B}+ { <Command>"define"{B}+ {
//printf("!!!DefineName\n"); //printf("!!!DefName\n");
BEGIN(DefineName); BEGIN(DefName);
} }
<Command>"ifdef"/{B}*"(" { <Command>"ifdef"/{B}*"(" {
incrLevel(); incrLevel();
...@@ -1094,6 +1121,7 @@ BN [ \t\r\n] ...@@ -1094,6 +1121,7 @@ BN [ \t\r\n]
guardExpr+=" 1L "; guardExpr+=" 1L ";
else else
guardExpr+=" 0L "; guardExpr+=" 0L ";
lastGuardName=yytext;
BEGIN(Guard); BEGIN(Guard);
} }
<DefinedExpr2>{ID} { <DefinedExpr2>{ID} {
...@@ -1101,6 +1129,7 @@ BN [ \t\r\n] ...@@ -1101,6 +1129,7 @@ BN [ \t\r\n]
guardExpr+=" 1L "; guardExpr+=" 1L ";
else else
guardExpr+=" 0L "; guardExpr+=" 0L ";
lastGuardName.resize(0);
} }
<DefinedExpr1,DefinedExpr2>\n { // should not happen, handle anyway <DefinedExpr1,DefinedExpr2>\n { // should not happen, handle anyway
ifcount=0; ifcount=0;
...@@ -1133,11 +1162,12 @@ BN [ \t\r\n] ...@@ -1133,11 +1162,12 @@ BN [ \t\r\n]
if (!otherCaseDone()) if (!otherCaseDone())
{ {
guardExpr.resize(0); guardExpr.resize(0);
lastGuardName.resize(0);
BEGIN(Guard); BEGIN(Guard);
} }
else else
{ {
BEGIN(Start); BEGIN(SkipCPPBlock);
} }
} }
} }
...@@ -1184,9 +1214,9 @@ BN [ \t\r\n] ...@@ -1184,9 +1214,9 @@ BN [ \t\r\n]
BEGIN(Start); BEGIN(Start);
} }
<Include>[^\">\n]+[\">] { <Include>[^\">\n]+[\">] {
QString incName=yytext; QCString incName=yytext;
//int l=incName.length(); //int l=incName.length();
//QString incFileName=incName.left(l-1); //QCString incFileName=incName.left(l-1);
//if (fileDefineCache->fileCached(incFileName)) //if (fileDefineCache->fileCached(incFileName))
//{ //{
// printf("file already cached!\n"); // printf("file already cached!\n");
...@@ -1197,7 +1227,7 @@ BN [ \t\r\n] ...@@ -1197,7 +1227,7 @@ BN [ \t\r\n]
BEGIN(Start); BEGIN(Start);
} }
<DefineName>{ID}/"(" { <DefName>{ID}/"(" {
//printf("Define() `%s'\n",yytext); //printf("Define() `%s'\n",yytext);
argDict = new QDict<int>(31); argDict = new QDict<int>(31);
argDict->setAutoDelete(TRUE); argDict->setAutoDelete(TRUE);
...@@ -1208,33 +1238,80 @@ BN [ \t\r\n] ...@@ -1208,33 +1238,80 @@ BN [ \t\r\n]
defVarArgs = FALSE; defVarArgs = FALSE;
BEGIN(DefineArg); BEGIN(DefineArg);
} }
<DefineName>{ID}/{B}* { <DefName>{ID}/{B}* {
//printf("Define `%s'\n",yytext); //printf("Define `%s'\n",yytext);
argDict = 0; argDict = 0;
defArgs = 0; defArgs = -1;
defArgsStr.resize(0); defArgsStr.resize(0);
defText.resize(0); defText.resize(0);
defName = yytext; defName = yytext;
defVarArgs = FALSE; defVarArgs = FALSE;
QString tmp=(QString)"#define "+defName+defArgsStr; QCString tmp=(QCString)"#define "+defName+defArgsStr;
outputArray(tmp.data(),tmp.length()); outputArray(tmp.data(),tmp.length());
quoteArg=FALSE; quoteArg=FALSE;
BEGIN(DefineText); BEGIN(DefineText);
} }
<DefName>{ID}/{B}*"\n" {
argDict = 0;
defArgs = -1;
defName = yytext;
defArgsStr.resize(0);
defText.resize(0);
defVarArgs = FALSE;
if ( defName!=lastGuardName )
{ // define may appear in the output
QCString tmp=(QCString)"#define "+defName+defArgsStr;
outputArray(tmp.data(),tmp.length());
quoteArg=FALSE;
BEGIN(DefineText);
}
else // define is a guard => hide
{
//printf("Found a guard %s\n",yytext);
Define *def=0;
//if (includeStack.isEmpty())
//{
// addDefine();
//}
if (!Config::onlyPredefinedFlag && (def=fileDefineDict->find(defName))==0)
{
fileDefineDict->insert(defName,newDefine());
}
else if (def)// name already exists
{
if (def->undef) // undefined name
{
def->undef = FALSE;
def->name = defName;
def->definition = defText.stripWhiteSpace();
def->nargs = defArgs;
def->fileName = yyFileName;
def->lineNr = yyLineNr;
}
else
{
//printf("Error: define %s is defined more than once!\n",defName.data());
}
}
outputChar('\n');
lastGuardName.resize(0);
BEGIN(Start);
}
}
<DefineArg>","{B}* { defArgsStr+=yytext; } <DefineArg>","{B}* { defArgsStr+=yytext; }
<DefineArg>"("{B}* { defArgsStr+=yytext; } <DefineArg>"("{B}* { defArgsStr+=yytext; }
<DefineArg>")"{B}* { <DefineArg>")"{B}* {
defArgsStr+=yytext; defArgsStr+=yytext;
QString tmp=(QString)"#define "+defName+defArgsStr; QCString tmp=(QCString)"#define "+defName+defArgsStr;
outputArray(tmp.data(),tmp.length()); outputArray(tmp.data(),tmp.length());
quoteArg=FALSE; quoteArg=FALSE;
BEGIN(DefineText); BEGIN(DefineText);
} }
<DefineArg>{ID}("..."?) { <DefineArg>{ID}("..."?) {
//printf("Define addArg(%s)\n",yytext); //printf("Define addArg(%s)\n",yytext);
QString argName=yytext; QCString argName=yytext;
defVarArgs = yytext[yyleng-1]=='.'; defVarArgs = yytext[yyleng-1]=='.';
if (defVarArgs) if (defVarArgs) // strip ellipsis
argName=argName.left(argName.length()-3); argName=argName.left(argName.length()-3);
defArgsStr+=yytext; defArgsStr+=yytext;
argDict->insert(argName,new int(defArgs)); argDict->insert(argName,new int(defArgs));
...@@ -1301,14 +1378,6 @@ BN [ \t\r\n] ...@@ -1301,14 +1378,6 @@ BN [ \t\r\n]
quoteArg=TRUE; quoteArg=TRUE;
} }
<DefineText>{ID} { <DefineText>{ID} {
//bool quote=FALSE;
//char *p=yytext;
//if (p[0]=='#')
//{
// p++;
// quote=TRUE;
// defText+="\"";
//}
if (quoteArg) if (quoteArg)
{ {
defText+="\""; defText+="\"";
...@@ -1320,7 +1389,7 @@ BN [ \t\r\n] ...@@ -1320,7 +1389,7 @@ BN [ \t\r\n]
{ {
if (!quoteArg) defText+=' '; if (!quoteArg) defText+=' ';
defText+='@'; defText+='@';
QString numStr; QCString numStr;
numStr.setNum(*n); numStr.setNum(*n);
defText+=numStr; defText+=numStr;
if (!quoteArg) defText+=' '; if (!quoteArg) defText+=' ';
...@@ -1348,16 +1417,14 @@ BN [ \t\r\n] ...@@ -1348,16 +1417,14 @@ BN [ \t\r\n]
outputChar('\n'); outputChar('\n');
Define *def=0; Define *def=0;
//printf("Define name=`%s' text=`%s'\n",defName.data(),defText.data()); //printf("Define name=`%s' text=`%s'\n",defName.data(),defText.data());
if (includeStack.isEmpty()) addDefine(); if (includeStack.isEmpty())
if (!onlyPredefinedFlag && (def=fileDefineDict->find(defName))==0) {
addDefine();
}
if (!Config::onlyPredefinedFlag && (def=fileDefineDict->find(defName))==0)
{ {
fileDefineDict->insert(defName,newDefine()); fileDefineDict->insert(defName,newDefine());
} }
//if ((def=fileDefineCache->findDefine(yyFileName,defName))==0)
//{
// printf("define is not found\n");
// fileDefineCache->insertDefine(yyFileName,defName,newDefine());
//}
else if (def)// name already exists else if (def)// name already exists
{ {
//printf("define found\n"); //printf("define found\n");
...@@ -1377,6 +1444,7 @@ BN [ \t\r\n] ...@@ -1377,6 +1444,7 @@ BN [ \t\r\n]
} }
delete argDict; delete argDict;
yyLineNr++; yyLineNr++;
lastGuardName.resize(0);
BEGIN(Start); BEGIN(Start);
} }
<DefineText>{B}* { defText += ' '; } <DefineText>{B}* { defText += ' '; }
...@@ -1411,7 +1479,7 @@ BN [ \t\r\n] ...@@ -1411,7 +1479,7 @@ BN [ \t\r\n]
{ {
FileState *fs=includeStack.pop(); FileState *fs=includeStack.pop();
//fileDefineCache->merge(yyFileName,fs->fileName); //fileDefineCache->merge(yyFileName,fs->fileName);
if (inputFilter.isEmpty()) if (Config::inputFilter.isEmpty())
fclose(fs->filePtr); fclose(fs->filePtr);
else else
pclose(fs->filePtr); pclose(fs->filePtr);
...@@ -1447,7 +1515,7 @@ BN [ \t\r\n] ...@@ -1447,7 +1515,7 @@ BN [ \t\r\n]
/*@ ---------------------------------------------------------------------------- /*@ ----------------------------------------------------------------------------
*/ */
static int getNextChar(const QString &expr,QString *rest,uint &pos) static int getNextChar(const QCString &expr,QCString *rest,uint &pos)
{ {
//printf("getNextChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos); //printf("getNextChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
if (pos<expr.length()) if (pos<expr.length())
...@@ -1470,7 +1538,7 @@ static int getNextChar(const QString &expr,QString *rest,uint &pos) ...@@ -1470,7 +1538,7 @@ static int getNextChar(const QString &expr,QString *rest,uint &pos)
} }
} }
static int getCurrentChar(const QString &expr,QString *rest,uint pos) static int getCurrentChar(const QCString &expr,QCString *rest,uint pos)
{ {
//printf("getCurrentChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos); //printf("getCurrentChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
if (pos<expr.length()) if (pos<expr.length())
...@@ -1492,7 +1560,7 @@ static int getCurrentChar(const QString &expr,QString *rest,uint pos) ...@@ -1492,7 +1560,7 @@ static int getCurrentChar(const QString &expr,QString *rest,uint pos)
} }
} }
static void unputChar(const QString &expr,QString *rest,uint &pos,char c) static void unputChar(const QCString &expr,QCString *rest,uint &pos,char c)
{ {
//printf("unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c); //printf("unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
if (pos<expr.length()) if (pos<expr.length())
...@@ -1554,37 +1622,92 @@ void preprocessFile(const char *fileName,BufStr &output) ...@@ -1554,37 +1622,92 @@ void preprocessFile(const char *fileName,BufStr &output)
expandedDict->clear(); expandedDict->clear();
// add predefined macros // add predefined macros
char *defStr = predefined.first(); char *defStr = Config::predefined.first();
while (defStr) while (defStr)
{ {
QString ds = defStr; QCString ds = defStr;
int i; int i_equals=ds.find('=');
if ((i=ds.find('='))==-1) int i_obrace=ds.find('(');
int i_cbrace=ds.find(')');
if (i_obrace==0) continue; // no define name
if (i_obrace<i_equals && i_cbrace<i_equals &&
i_obrace!=-1 && i_cbrace!=-1 &&
i_obrace<i_cbrace
) // predefined function macro definition
{ {
if (ds.length()>0) QRegExp reId("[a-z_A-Z][a-z_A-Z0-9]*"); // regexp matching an id
{ QDict<int> argDict(17);
Define *def = new Define; argDict.setAutoDelete(TRUE);
def->name = ds; int i=i_obrace+1,p,l,count=0;
def->definition = "1"; // gather the formal arguments in a dictionary
def->nargs = 0; while (i<i_cbrace && (p=reId.match(ds,i,&l)))
fileDefineDict->insert(ds,def); {
argDict.insert(ds.mid(p,l),new int(count++));
i=p+l;
}
// strip definition part
QCString tmp=ds.right(ds.length()-i_equals-1);
QCString definition;
i=0;
// substitute all occurrences of formal arguments by their
// corresponding markers
while ((p=reId.match(tmp,i,&l))!=-1)
{
if (p>i) definition+=tmp.mid(i,p-i);
int *argIndex;
if ((argIndex=argDict[tmp.mid(p,l)])!=0)
{
QCString marker;
marker.sprintf(" @%d ",*argIndex);
definition+=marker;
}
else
{
definition+=tmp.mid(p,l);
}
i=p+l;
} }
if (i<(int)tmp.length()) definition+=tmp.mid(i,tmp.length()-i);
// add define definition to the dictionary of defines for this file
Define *def = new Define;
def->name = ds.left(i_obrace);
def->definition = definition;
def->nargs = count;
fileDefineDict->insert(def->name,def);
//printf("#define `%s' `%s' #nargs=%d\n",
// def->name.data(),def->definition.data(),def->nargs);
} }
else else if ((i_obrace==-1 || i_obrace>i_equals) &&
(i_cbrace==-1 || i_cbrace>i_equals) &&
ds.length()>0 && (int)ds.length()>i_equals
) // predefined non-function macro definition
{ {
if (i>0 && (int)ds.length()>i) Define *def = new Define;
if (i_equals==-1) // simple define without argument
{
def->name = ds;
def->definition = "1"; // substitute occurrences by 1 (true)
}
else // simple define with argument
{ {
Define *def = new Define; def->name = ds.left(i_equals);
def->name = ds.left(i); def->definition = ds.right(ds.length()-i_equals-1);
def->definition = ds.right(ds.length()-i-1); }
def->nargs = 0; def->nargs = -1;
fileDefineDict->insert(ds.left(i),def); fileDefineDict->insert(def->name,def);
}
//printf("#define `%s' `%s' #nargs=%d\n",
// def->name.data(),def->definition.data(),def->nargs);
} }
defStr=predefined.next();
defStr=Config::predefined.next();
} }
if (inputFilter.isEmpty()) if (Config::inputFilter.isEmpty())
{ {
preYYin = fopen(fileName,"r"); preYYin = fopen(fileName,"r");
if (!preYYin) if (!preYYin)
...@@ -1595,7 +1718,7 @@ void preprocessFile(const char *fileName,BufStr &output) ...@@ -1595,7 +1718,7 @@ void preprocessFile(const char *fileName,BufStr &output)
} }
else else
{ {
QString cmd = inputFilter+" "+fileName; QCString cmd = Config::inputFilter+" "+fileName;
preYYin = popen(cmd,"r"); preYYin = popen(cmd,"r");
if (!preYYin) if (!preYYin)
{ {
...@@ -1605,10 +1728,15 @@ void preprocessFile(const char *fileName,BufStr &output) ...@@ -1605,10 +1728,15 @@ void preprocessFile(const char *fileName,BufStr &output)
} }
yyLineNr = 1; yyLineNr = 1;
level = 0; level = 0;
ifcount = 0;
yyFileName = fileName; yyFileName = fileName;
BEGIN( Start ); BEGIN( Start );
lastGuardName.resize(0);
guardExpr.resize(0);
preYYlex(); preYYlex();
if (inputFilter.isEmpty()) if (Config::inputFilter.isEmpty())
fclose(preYYin); fclose(preYYin);
else else
pclose(preYYin); pclose(preYYin);
...@@ -1629,8 +1757,7 @@ void preprocessFile(const char *fileName,BufStr &output) ...@@ -1629,8 +1757,7 @@ void preprocessFile(const char *fileName,BufStr &output)
#endif #endif
} }
extern "C" { // some bogus code to keep the compiler happy extern "C" { // some bogus code to keep the compiler happy
int preYYwrap() { return 1 ; } // int preYYwrap() { return 1 ; }
void preYYdummy() { yy_flex_realloc(0,0); } void preYYdummy() { yy_flex_realloc(0,0); }
} }
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#ifndef QTBC_H
#define QTBC_H
/*! This file contains some hacks to make Doxygen work with
* Qt version 2.00 and Qt version 1.xx
*/
#include <qglobal.h>
#if QT_VERSION >= 200
#define GCI QCollection::Item
#include <qcstring.h>
#include <qstring.h>
inline QCString convertToQCString(const QString &s) { return s.local8Bit(); }
#else /* QT_VERSION < 200 */
#include <qstring.h>
#define QCString QString
inline QCString convertToQCString(const QCString &s) { return s; }
#endif
#endif
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
#ifndef SCANNER_H #ifndef SCANNER_H
#define SCANNER_H #define SCANNER_H
#include "qtbc.h"
#include <stdio.h> #include <stdio.h>
#include <qlist.h> #include <qlist.h>
#include <qstring.h>
#include "entry.h" #include "entry.h"
#include "code.h" #include "code.h"
...@@ -28,8 +28,8 @@ class OutputList; ...@@ -28,8 +28,8 @@ class OutputList;
extern void parseMain(Entry *); extern void parseMain(Entry *);
extern void parseDoc(OutputList &ol,const char *clName, const char *memName, extern void parseDoc(OutputList &ol,const char *clName, const char *memName,
const QString &docString); const QCString &docString);
extern void parseExample(OutputList &ol,const QString &docString, extern void parseExample(OutputList &ol,const QCString &docString,
const char *fileName); const char *fileName);
extern void parseText(OutputList &ol,const QString &txtString); extern void parseText(OutputList &ol,const QCString &txtString);
#endif #endif
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include "qtbc.h"
#include <qarray.h> #include <qarray.h>
#include <qstring.h>
#include <qstack.h> #include <qstack.h>
#include <qregexp.h> #include <qregexp.h>
...@@ -51,14 +51,14 @@ ...@@ -51,14 +51,14 @@
* statics * statics
*/ */
static bool insideArgumentList; static bool insideArgumentList;
static QString className; static QCString className;
static QString memberName; static QCString memberName;
static QString refName; static QCString refName;
static OutputList * outDoc; static OutputList * outDoc;
static QString code; static QCString code;
static QString linkRef; static QCString linkRef;
static QString linkText; static QCString linkText;
static QString codeBlock; static QCString codeBlock;
static const char * inputString; static const char * inputString;
static int inputPosition; static int inputPosition;
static int lastContext; static int lastContext;
...@@ -78,6 +78,7 @@ static int lastGroupContext; ...@@ -78,6 +78,7 @@ static int lastGroupContext;
static int lastFormulaContext; static int lastFormulaContext;
static int lastAnchorContext; static int lastAnchorContext;
static int nextDefContext; static int nextDefContext;
static int overloadContext;
static Protection protection; static Protection protection;
static Protection baseProt; static Protection baseProt;
static int bracketCount = 0 ; static int bracketCount = 0 ;
...@@ -87,6 +88,8 @@ static int ifCount = 0 ; ...@@ -87,6 +88,8 @@ static int ifCount = 0 ;
static Entry* current_root = 0 ; static Entry* current_root = 0 ;
static Entry* global_root = 0 ; static Entry* global_root = 0 ;
static Entry* current = 0 ; static Entry* current = 0 ;
static Entry* previous = 0 ;
static Entry* tempEntry = 0 ;
static int yyLineNr = 0 ; static int yyLineNr = 0 ;
static int anonCount = 0 ; static int anonCount = 0 ;
static char yyFileName[2048] ; static char yyFileName[2048] ;
...@@ -97,10 +100,10 @@ static bool removeSlashes; ...@@ -97,10 +100,10 @@ static bool removeSlashes;
static Specifier virt; static Specifier virt;
static Specifier baseVirt; static Specifier baseVirt;
static bool exampleDoc; static bool exampleDoc;
static QString exampleName; static QCString exampleName;
static QString htmlUrl,htmlText; static QCString htmlUrl,htmlText;
static QString currentIncludeFile; static QCString currentIncludeFile;
static QString msType,msName,msArgs; static QCString msType,msName,msArgs;
static int includeFileOffset = 0; static int includeFileOffset = 0;
static int includeFileLength = 0; static int includeFileLength = 0;
static bool firstLine; static bool firstLine;
...@@ -119,16 +122,16 @@ static bool firstSeeArg; ...@@ -119,16 +122,16 @@ static bool firstSeeArg;
static bool javaDocSee; static bool javaDocSee;
static char afterDocTerminator; static char afterDocTerminator;
static int tmpDocType; static int tmpDocType;
static QString sectionLabel; static QCString sectionLabel;
static QString sectionTitle; static QCString sectionTitle;
static SectionInfo::SectionType static SectionInfo::SectionType
sectionType; sectionType;
static QString funcPtrType; static QCString funcPtrType;
static QString templateStr; static QCString templateStr;
static QString baseName; static QCString baseName;
static QString *specName; static QCString *specName;
static QString formulaText; static QCString formulaText;
static QString sectionRef; static QCString sectionRef;
// state variable for reading the argument list of a function // state variable for reading the argument list of a function
static int argRoundCount; static int argRoundCount;
...@@ -136,7 +139,7 @@ static int argSharpCount; ...@@ -136,7 +139,7 @@ static int argSharpCount;
static int currentArgumentContext; static int currentArgumentContext;
static int lastCopyArgStringContext; static int lastCopyArgStringContext;
static int lastCopyArgContext; static int lastCopyArgContext;
static QString *copyArgString; static QCString *copyArgString;
...@@ -404,9 +407,9 @@ static void verbIncludeFile(OutputList &ol,const char *name) ...@@ -404,9 +407,9 @@ static void verbIncludeFile(OutputList &ol,const char *name)
} }
static QString stripQuotes(const char *s) static QCString stripQuotes(const char *s)
{ {
QString name; QCString name;
if (s==0 || *s==0) return name; if (s==0 || *s==0) return name;
name=s; name=s;
if (name.at(0)=='"' && name.at(name.length()-1)=='"') if (name.at(0)=='"' && name.at(name.length()-1)=='"')
...@@ -416,9 +419,9 @@ static QString stripQuotes(const char *s) ...@@ -416,9 +419,9 @@ static QString stripQuotes(const char *s)
return name; return name;
} }
static QString stripKnownExtensions(const char *text) static QCString stripKnownExtensions(const char *text)
{ {
QString result=text; QCString result=text;
if (result.right(4)==".tex") result=result.left(result.length()-4); if (result.right(4)==".tex") result=result.left(result.length()-4);
else if (result.right(5)==".html") result=result.left(result.length()-5); else if (result.right(5)==".html") result=result.left(result.length()-5);
//printf("%s stripKnowExtensions(%s)\n",result.data(),text); //printf("%s stripKnowExtensions(%s)\n",result.data(),text);
...@@ -430,7 +433,7 @@ static void skipLine(OutputList &ol,const char *key) ...@@ -430,7 +433,7 @@ static void skipLine(OutputList &ol,const char *key)
bool found=FALSE; bool found=FALSE;
while (!found) while (!found)
{ {
QString s; QCString s;
char c; char c;
while ( includeFileOffset<includeFileLength && while ( includeFileOffset<includeFileLength &&
(c=currentIncludeFile[includeFileOffset++])!='\n' && c!=0 (c=currentIncludeFile[includeFileOffset++])!='\n' && c!=0
...@@ -451,7 +454,7 @@ static void skipUntil(const char *key) ...@@ -451,7 +454,7 @@ static void skipUntil(const char *key)
bool found=FALSE; bool found=FALSE;
while (!found) while (!found)
{ {
QString s; QCString s;
int i=includeFileOffset; int i=includeFileOffset;
char c; char c;
while ( i<includeFileLength && while ( i<includeFileLength &&
...@@ -470,7 +473,7 @@ static void skipUntil(const char *key) ...@@ -470,7 +473,7 @@ static void skipUntil(const char *key)
static void showLine(OutputList &ol,const char *key) static void showLine(OutputList &ol,const char *key)
{ {
QString s; QCString s;
char c; char c;
bool found=FALSE; bool found=FALSE;
while (!found) while (!found)
...@@ -494,7 +497,7 @@ static void showUntil(OutputList &ol,const char *key) ...@@ -494,7 +497,7 @@ static void showUntil(OutputList &ol,const char *key)
bool found=FALSE; bool found=FALSE;
while (!found) while (!found)
{ {
QString s; QCString s;
char c; char c;
while ( includeFileOffset<includeFileLength && while ( includeFileOffset<includeFileLength &&
(c=currentIncludeFile[includeFileOffset++])!='\n' && c!=0 (c=currentIncludeFile[includeFileOffset++])!='\n' && c!=0
...@@ -537,8 +540,9 @@ static void addSection() ...@@ -537,8 +540,9 @@ static void addSection()
if (sectionDict[sectionLabel]==0) if (sectionDict[sectionLabel]==0)
{ {
SectionInfo *si=new SectionInfo(sectionLabel,sectionTitle,sectionType); SectionInfo *si=new SectionInfo(sectionLabel,sectionTitle,sectionType);
//printf("Adding section addr=%p label=`%s' sectionTitle=`%s' fileName=%s\n",si,sectionLabel.data(),sectionTitle.data(),si->fileName.data());
sectionDict.insert(sectionLabel,si); sectionDict.insert(sectionLabel,si);
current->anchors->append(new QString(sectionLabel)); current->anchors->append(new QCString(sectionLabel));
} }
else else
{ {
...@@ -548,10 +552,10 @@ static void addSection() ...@@ -548,10 +552,10 @@ static void addSection()
// Adds a formula text to the list/dictionary of formulas if it was // Adds a formula text to the list/dictionary of formulas if it was
// not already added. Returns the label of the formula. // not already added. Returns the label of the formula.
static QString addFormula() static QCString addFormula()
{ {
QString formLabel; QCString formLabel;
QString fText=formulaText.simplifyWhiteSpace(); QCString fText=formulaText.simplifyWhiteSpace();
Formula *f=0; Formula *f=0;
if ((f=formulaDict[fText])==0) if ((f=formulaDict[fText])==0)
{ {
...@@ -568,8 +572,17 @@ static QString addFormula() ...@@ -568,8 +572,17 @@ static QString addFormula()
return formLabel; return formLabel;
} }
/* ----------------------------------------------------------------- static bool nameIsOperator(QCString &name)
*/ {
return name.right(8)=="operator" &&
(name.length()==8 || !isId(name.at(name.length()-9)));
}
/* ----------------------------------------------------------------- */
static void addToBody(const char *text);
static void addToBodyCond(const char *text);
/* ----------------------------------------------------------------- */
#undef YY_INPUT #undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
...@@ -641,6 +654,8 @@ TT [tT][tT] ...@@ -641,6 +654,8 @@ TT [tT][tT]
UL [uU][lL] UL [uU][lL]
VAR [vV][aA][rR] VAR [vV][aA][rR]
%option noyywrap
%x Define %x Define
%x DefineArg %x DefineArg
%x DefineEnd %x DefineEnd
...@@ -664,13 +679,15 @@ VAR [vV][aA][rR] ...@@ -664,13 +679,15 @@ VAR [vV][aA][rR]
%x NameSpaceDocArg1 %x NameSpaceDocArg1
%x SkipCurly %x SkipCurly
%x SkipCurlyCpp %x SkipCurlyCpp
%x SkipCurlyEndDoc
%x SkipString %x SkipString
%x SkipInits %x SkipInits
%x SkipCPP %x SkipCPP
%x SkipCPPBlock %x SkipCPPBlock
%x SkipComment %x SkipComment
%x SkipCxxComment %x SkipCxxComment
%x SkipBlock %x SkipCurlyBlock
%x SkipRoundBlock
%x SkipCode %x SkipCode
%x Sharp %x Sharp
%x SkipSharp %x SkipSharp
...@@ -688,6 +705,7 @@ VAR [vV][aA][rR] ...@@ -688,6 +705,7 @@ VAR [vV][aA][rR]
%x ClassDocFunc %x ClassDocFunc
%x ClassDocFuncPtr %x ClassDocFuncPtr
%x ClassDocFuncQual %x ClassDocFuncQual
%x ClassDocFuncSkipLine
%x ClassDocFuncExc %x ClassDocFuncExc
%x ClassDocDefine %x ClassDocDefine
%x ClassDocRelates %x ClassDocRelates
...@@ -818,7 +836,7 @@ VAR [vV][aA][rR] ...@@ -818,7 +836,7 @@ VAR [vV][aA][rR]
<DocScan,Text>"&"[AEIOUaeiou]"circ;" { outDoc->writeCirc(yytext[1]); } <DocScan,Text>"&"[AEIOUaeiou]"circ;" { outDoc->writeCirc(yytext[1]); }
<DocScan,Text>"&"[ANOano]"tilde;" { outDoc->writeTilde(yytext[1]); } <DocScan,Text>"&"[ANOano]"tilde;" { outDoc->writeTilde(yytext[1]); }
<DocScan,DocHtmlScan,DocLatexScan>"$("[a-z_A-Z]+")" { <DocScan,DocHtmlScan,DocLatexScan>"$("[a-z_A-Z]+")" {
QString envvar=&yytext[2]; QCString envvar=&yytext[2];
envvar=envvar.left(envvar.length()-1); envvar=envvar.left(envvar.length()-1);
outDoc->docify(getenv(envvar)); outDoc->docify(getenv(envvar));
} }
...@@ -879,7 +897,7 @@ VAR [vV][aA][rR] ...@@ -879,7 +897,7 @@ VAR [vV][aA][rR]
outDoc->codify(c); outDoc->codify(c);
} }
<DocScan>("\\"|"@")"internal"/{BN} { <DocScan>("\\"|"@")"internal"/{BN} {
if (!internalDocsFlag) if (!Config::internalDocsFlag)
{ {
outDoc->newParagraph(); outDoc->newParagraph();
scanString(theTranslator->trForInternalUseOnly()+"\n"); scanString(theTranslator->trForInternalUseOnly()+"\n");
...@@ -921,7 +939,7 @@ VAR [vV][aA][rR] ...@@ -921,7 +939,7 @@ VAR [vV][aA][rR]
Formula *formula=formulaNameDict[yytext]; Formula *formula=formulaNameDict[yytext];
if (formula) if (formula)
{ {
QString formName; QCString formName;
formName.sprintf("form-%d.gif",formula->getId()); formName.sprintf("form-%d.gif",formula->getId());
outDoc->writeFormula(formName,formula->getFormulaText()); outDoc->writeFormula(formName,formula->getFormulaText());
} }
...@@ -952,7 +970,7 @@ VAR [vV][aA][rR] ...@@ -952,7 +970,7 @@ VAR [vV][aA][rR]
inParBlock=TRUE; inParBlock=TRUE;
outDoc->startDescList(); outDoc->startDescList();
outDoc->startBold(); outDoc->startBold();
outDoc->docify(((QString)yytext).stripWhiteSpace()); outDoc->docify(((QCString)yytext).stripWhiteSpace());
outDoc->endBold(); outDoc->endBold();
outDoc->endDescTitle(); outDoc->endDescTitle();
outDoc->writeDescItem(); outDoc->writeDescItem();
...@@ -1137,7 +1155,7 @@ VAR [vV][aA][rR] ...@@ -1137,7 +1155,7 @@ VAR [vV][aA][rR]
BEGIN(DocScan); BEGIN(DocScan);
} }
<DocScan>"\\section "{ID}"\n" { <DocScan>"\\section "{ID}"\n" {
QString secName=&yytext[9]; // skip "\section " QCString secName=&yytext[9]; // skip "\section "
secName=secName.left(secName.length()-1); // remove \n secName=secName.left(secName.length()-1); // remove \n
//printf("SectionName %s found\n",secName.data()); //printf("SectionName %s found\n",secName.data());
SectionInfo *sec; SectionInfo *sec;
...@@ -1149,7 +1167,7 @@ VAR [vV][aA][rR] ...@@ -1149,7 +1167,7 @@ VAR [vV][aA][rR]
} }
} }
<DocScan>"\\anchor "{ID}"\n" { <DocScan>"\\anchor "{ID}"\n" {
QString secName=&yytext[8]; QCString secName=&yytext[8];
secName=secName.left(secName.length()-1); secName=secName.left(secName.length()-1);
SectionInfo *sec; SectionInfo *sec;
if ((sec=sectionDict[secName])) if ((sec=sectionDict[secName]))
...@@ -1164,11 +1182,11 @@ VAR [vV][aA][rR] ...@@ -1164,11 +1182,11 @@ VAR [vV][aA][rR]
BEGIN(DocRefItem); BEGIN(DocRefItem);
} }
<DocRefName>{ID} { <DocRefName>{ID} {
QString ref=yytext; QCString ref=yytext;
SectionInfo *sec; SectionInfo *sec;
if ((sec=sectionDict[ref])) if ((sec=sectionDict[ref]))
{ {
QString text; QCString text;
if (sec->title.isEmpty()) if (sec->title.isEmpty())
text=sec->label; text=sec->label;
else else
...@@ -1179,6 +1197,7 @@ VAR [vV][aA][rR] ...@@ -1179,6 +1197,7 @@ VAR [vV][aA][rR]
} }
else else
{ {
//printf(" ref sec=%p sec->fileName=%s\n",sec,sec->fileName.data());
outDoc->writeSectionRef(sec->fileName,sec->label,text); outDoc->writeSectionRef(sec->fileName,sec->label,text);
} }
} }
...@@ -1198,7 +1217,7 @@ VAR [vV][aA][rR] ...@@ -1198,7 +1217,7 @@ VAR [vV][aA][rR]
} }
<DocRefArg>[^\"\n]+[\n\"] { <DocRefArg>[^\"\n]+[\n\"] {
yytext[yyleng-1]='\0'; yytext[yyleng-1]='\0';
QString text=substitute(yytext,"\\\\","\\"); QCString text=substitute(yytext,"\\\\","\\");
SectionInfo *sec; SectionInfo *sec;
if ((sec=sectionDict[sectionRef])) if ((sec=sectionDict[sectionRef]))
{ {
...@@ -1250,13 +1269,13 @@ VAR [vV][aA][rR] ...@@ -1250,13 +1269,13 @@ VAR [vV][aA][rR]
<DocScan>{SCOPEMASK}(("()")?) { <DocScan>{SCOPEMASK}(("()")?) {
generateRef(*outDoc,className,yytext,inSeeBlock); generateRef(*outDoc,className,yytext,inSeeBlock);
} }
<DocScan>({SCOPEMASK}"::")?"operator"[^(\r\n.,]*"("[a-z_A-Z,\<\> \t\*\&]*")" { <DocScan>({SCOPEMASK}"::")?"operator()("[a-z_A-Z,\<\> \t\*\&]*")" {
QString oName=yytext; QCString oName=yytext;
generateRef(*outDoc,className, generateRef(*outDoc,className,
removeRedundantWhiteSpace(oName),inSeeBlock); removeRedundantWhiteSpace(oName),inSeeBlock);
} }
<DocScan>({SCOPEMASK}"::")?"operator()("[a-z_A-Z,\<\> \t\*\&]*")" { <DocScan>({SCOPEMASK}"::")?"operator"[^(\r\n.,]*"("[a-z_A-Z,\<\> \t\*\&]*")" {
QString oName=yytext; QCString oName=yytext;
generateRef(*outDoc,className, generateRef(*outDoc,className,
removeRedundantWhiteSpace(oName),inSeeBlock); removeRedundantWhiteSpace(oName),inSeeBlock);
} }
...@@ -1532,9 +1551,28 @@ VAR [vV][aA][rR] ...@@ -1532,9 +1551,28 @@ VAR [vV][aA][rR]
<DocCode,DocEmphasis,DocBold,DocScan,Text>. { <DocCode,DocEmphasis,DocBold,DocScan,Text>. {
outDoc->writeChar(*yytext); outDoc->writeChar(*yytext);
} }
<NextSemi>"{" { BEGIN(SkipBlock); } <NextSemi>"{" {
<SkipBlock>"{" { ++bracketCount ; } bracketCount=0;
<SkipBlock>"}" { if( bracketCount ) BEGIN(SkipCurlyBlock);
}
<NextSemi>"(" {
roundCount=0;
BEGIN(SkipRoundBlock);
}
<SkipRoundBlock>"(" {
++roundCount;
}
<SkipRoundBlock>")" {
if (roundCount )
--roundCount ;
else
BEGIN( NextSemi ) ;
}
<SkipCurlyBlock>"{" {
++bracketCount ;
}
<SkipCurlyBlock>"}" {
if( bracketCount )
--bracketCount ; --bracketCount ;
else else
BEGIN( NextSemi ) ; BEGIN( NextSemi ) ;
...@@ -1653,7 +1691,7 @@ VAR [vV][aA][rR] ...@@ -1653,7 +1691,7 @@ VAR [vV][aA][rR]
BEGIN( ClassName ); BEGIN( ClassName );
} }
<FindMembers>{B}*(("typedef"{BN}+)?)"class"{BN}+ { <FindMembers>{B}*(("typedef"{BN}+)?)"class"{BN}+ {
isTypedef=((QString)yytext).find("typedef")!=-1; isTypedef=((QCString)yytext).find("typedef")!=-1;
current->section = Entry::CLASS_SEC ; current->section = Entry::CLASS_SEC ;
addType( current ) ; addType( current ) ;
current->type += " class" ; current->type += " class" ;
...@@ -1663,7 +1701,7 @@ VAR [vV][aA][rR] ...@@ -1663,7 +1701,7 @@ VAR [vV][aA][rR]
BEGIN( ClassName ) ; BEGIN( ClassName ) ;
} }
<FindMembers>{B}*(("typedef"{BN}+)?)"struct"{BN}+ { <FindMembers>{B}*(("typedef"{BN}+)?)"struct"{BN}+ {
isTypedef=((QString)yytext).find("typedef")!=-1; isTypedef=((QCString)yytext).find("typedef")!=-1;
current->section = Entry::STRUCT_SEC ; current->section = Entry::STRUCT_SEC ;
addType( current ) ; addType( current ) ;
current->type += " struct" ; current->type += " struct" ;
...@@ -1673,7 +1711,7 @@ VAR [vV][aA][rR] ...@@ -1673,7 +1711,7 @@ VAR [vV][aA][rR]
BEGIN( ClassName ) ; BEGIN( ClassName ) ;
} }
<FindMembers>{B}*(("typedef"{BN}+)?)"union"{BN}+ { <FindMembers>{B}*(("typedef"{BN}+)?)"union"{BN}+ {
isTypedef=((QString)yytext).find("typedef")!=-1; isTypedef=((QCString)yytext).find("typedef")!=-1;
current->section = Entry::UNION_SEC ; current->section = Entry::UNION_SEC ;
addType( current ) ; addType( current ) ;
current->type += " union" ; current->type += " union" ;
...@@ -1683,7 +1721,7 @@ VAR [vV][aA][rR] ...@@ -1683,7 +1721,7 @@ VAR [vV][aA][rR]
BEGIN( ClassName ) ; BEGIN( ClassName ) ;
} }
<FindMembers>{B}*(("typedef"{BN}+)?)"enum"{BN}+ { <FindMembers>{B}*(("typedef"{BN}+)?)"enum"{BN}+ {
isTypedef=((QString)yytext).find("typedef")!=-1; isTypedef=((QCString)yytext).find("typedef")!=-1;
current->section = Entry::ENUM_SEC ; current->section = Entry::ENUM_SEC ;
addType( current ) ; addType( current ) ;
current->type += " enum" ; current->type += " enum" ;
...@@ -1751,7 +1789,7 @@ VAR [vV][aA][rR] ...@@ -1751,7 +1789,7 @@ VAR [vV][aA][rR]
<FindMembers>"using"{BN}+ { lineCount(); BEGIN(Using); } <FindMembers>"using"{BN}+ { lineCount(); BEGIN(Using); }
<Using>";" { BEGIN(FindMembers); } <Using>";" { BEGIN(FindMembers); }
<FindMembers>{SCOPENAME}{BN}*"<>" { // guided template decl <FindMembers>{SCOPENAME}{BN}*"<>" { // guided template decl
QString n=yytext; QCString n=yytext;
addType( current ); addType( current );
current->name=n.left(n.length()-2); current->name=n.left(n.length()-2);
} }
...@@ -1761,7 +1799,7 @@ VAR [vV][aA][rR] ...@@ -1761,7 +1799,7 @@ VAR [vV][aA][rR]
addType( current ); addType( current );
current->name=yytext; current->name=yytext;
current->name=current->name.stripWhiteSpace(); current->name=current->name.stripWhiteSpace();
if (current->name.right(8)=="operator") if (nameIsOperator(current->name))
BEGIN( Operator ); BEGIN( Operator );
else else
BEGIN( EndTemplate ); BEGIN( EndTemplate );
...@@ -1813,7 +1851,7 @@ VAR [vV][aA][rR] ...@@ -1813,7 +1851,7 @@ VAR [vV][aA][rR]
{ {
current->name += yytext; current->name += yytext;
} }
QString tmp=yytext; QCString tmp=yytext;
if (tmp.right(8)=="operator") if (tmp.right(8)=="operator")
BEGIN( Operator ); BEGIN( Operator );
else else
...@@ -1868,7 +1906,7 @@ VAR [vV][aA][rR] ...@@ -1868,7 +1906,7 @@ VAR [vV][aA][rR]
<DefineEnd>. <DefineEnd>.
<FindMembers>[*&]+ { current->name += yytext ; } <FindMembers>[*&]+ { current->name += yytext ; }
<FindMembers,MemberSpec,Function,NextSemi>";"{BN}*("/**"|"//!"|"/*!")"<" { <FindMembers,MemberSpec,Function,NextSemi>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount(); lineCount();
current->doc.resize(0); current->doc.resize(0);
current->brief.resize(0); current->brief.resize(0);
...@@ -1876,12 +1914,12 @@ VAR [vV][aA][rR] ...@@ -1876,12 +1914,12 @@ VAR [vV][aA][rR]
afterDocTerminator = ';'; afterDocTerminator = ';';
if (yytext[yyleng-3]=='/') if (yytext[yyleng-3]=='/')
BEGIN(AfterDocLine); BEGIN(AfterDocLine);
else if (yytext[yyleng-2]=='*') else if (yytext[yyleng-2]=='*' && Config::autoBriefFlag)
BEGIN(AfterDocBrief); BEGIN(AfterDocBrief);
else else
BEGIN(AfterDoc); BEGIN(AfterDoc);
} }
<MemberSpec,FindFields,FindMembers,NextSemi>","{BN}*("/**"|"//!"|"/*!")"<" { <MemberSpec,FindFields,FindMembers,NextSemi>","{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount(); lineCount();
current->doc.resize(0); current->doc.resize(0);
current->brief.resize(0); current->brief.resize(0);
...@@ -1889,12 +1927,12 @@ VAR [vV][aA][rR] ...@@ -1889,12 +1927,12 @@ VAR [vV][aA][rR]
afterDocTerminator = ','; afterDocTerminator = ',';
if (yytext[yyleng-3]=='/') if (yytext[yyleng-3]=='/')
BEGIN(AfterDocLine); BEGIN(AfterDocLine);
else if (yytext[yyleng-2]=='*') else if (yytext[yyleng-2]=='*' && Config::autoBriefFlag)
BEGIN(AfterDocBrief); BEGIN(AfterDocBrief);
else else
BEGIN(AfterDoc); BEGIN(AfterDoc);
} }
<DefineEnd,FindFields,FindFieldArg>{BN}*("/**"|"//!"|"/*!")"<" { <DefineEnd,FindFields,FindFieldArg>{BN}*("/**"|"//!"|"/*!"|"///")"<" {
lineCount(); lineCount();
current->doc.resize(0); current->doc.resize(0);
current->brief.resize(0); current->brief.resize(0);
...@@ -1905,7 +1943,7 @@ VAR [vV][aA][rR] ...@@ -1905,7 +1943,7 @@ VAR [vV][aA][rR]
afterDocTerminator = 0; afterDocTerminator = 0;
if (yytext[yyleng-3]=='/') if (yytext[yyleng-3]=='/')
BEGIN(AfterDocLine); BEGIN(AfterDocLine);
else if (yytext[yyleng-2]=='*') else if (yytext[yyleng-2]=='*' && Config::autoBriefFlag)
BEGIN(AfterDocBrief); BEGIN(AfterDocBrief);
else else
BEGIN(AfterDoc); BEGIN(AfterDoc);
...@@ -1914,8 +1952,10 @@ VAR [vV][aA][rR] ...@@ -1914,8 +1952,10 @@ VAR [vV][aA][rR]
BEGIN(NextSemi); BEGIN(NextSemi);
} }
<FindMembers>[:;,] { <FindMembers>[:;,] {
QString oldType = current->type.copy(); QCString oldType = current->type.copy();
QString oldDocs = current->doc.copy(); QCString oldDocs = current->doc.copy();
if ( *yytext != ':')
{
current->type=current->type.simplifyWhiteSpace(); current->type=current->type.simplifyWhiteSpace();
current->args=current->args.simplifyWhiteSpace(); current->args=current->args.simplifyWhiteSpace();
current->name=current->name.stripWhiteSpace(); current->name=current->name.stripWhiteSpace();
...@@ -1931,9 +1971,12 @@ VAR [vV][aA][rR] ...@@ -1931,9 +1971,12 @@ VAR [vV][aA][rR]
current->sig = sig = FALSE; current->sig = sig = FALSE;
current->virt = Normal; current->virt = Normal;
current->stat = gstat; current->stat = gstat;
}
// skip expression or bitfield if needed // skip expression or bitfield if needed
if ( *yytext == ':') if ( *yytext == ':')
{
BEGIN( NextSemi ); BEGIN( NextSemi );
}
else else
{ {
if ( *yytext == ',' ) if ( *yytext == ',' )
...@@ -2004,7 +2047,7 @@ VAR [vV][aA][rR] ...@@ -2004,7 +2047,7 @@ VAR [vV][aA][rR]
current->slot = slot; current->slot = slot;
} }
<FindFieldArg>"," { unput(*yytext); BEGIN(FindFields); } <FindFieldArg>"," { unput(*yytext); BEGIN(FindFields); }
<Curly>[^\r\n{}"/]* { current->program += yytext ; } <Curly>[^\r\n{}"'/]* { current->program += yytext ; }
<Curly>"//".* { current->program += yytext ; } <Curly>"//".* { current->program += yytext ; }
<Curly>\"[^\r\n"]*\" { current->program += yytext ; } <Curly>\"[^\r\n"]*\" { current->program += yytext ; }
<Curly>"/*"{B}* { current->program += yytext ; <Curly>"/*"{B}* { current->program += yytext ;
...@@ -2016,6 +2059,9 @@ VAR [vV][aA][rR] ...@@ -2016,6 +2059,9 @@ VAR [vV][aA][rR]
lastContext = Curly ; lastContext = Curly ;
BEGIN( Comment ) ; BEGIN( Comment ) ;
} }
<Curly>"'"\\[0-7]{1,3}"'" { current->program += yytext; }
<Curly>"'"\\."'" { current->program += yytext; }
<Curly>"'"."'" { current->program += yytext; }
<Curly>"{" { current->program += yytext ; <Curly>"{" { current->program += yytext ;
++bracketCount ; ++bracketCount ;
} }
...@@ -2026,16 +2072,15 @@ VAR [vV][aA][rR] ...@@ -2026,16 +2072,15 @@ VAR [vV][aA][rR]
} }
else else
{ {
QString &cn = current->name; QCString &cn = current->name;
QString &rn = current_root->name; QCString rn = stripAnnonymousScope(current_root->name);
//printf("current->name=`%s' current_root->name=`%s'\n", //printf("cn=`%s' rn=`%s'\n",cn.data(),rn.data());
// cn.data(),rn.data()); if (!cn.isEmpty() && !rn.isEmpty() &&
if (cn && cn[0]!='@' &&
(current_root->section & Entry::SCOPE_MASK)) (current_root->section & Entry::SCOPE_MASK))
{ {
cn.prepend(rn+"::"); cn.prepend(rn+"::");
} }
if (isTypedef && cn.length()==0) if (isTypedef && cn.isEmpty())
{ {
//printf("Typedef Name\n"); //printf("Typedef Name\n");
BEGIN( TypedefName ); BEGIN( TypedefName );
...@@ -2150,6 +2195,7 @@ VAR [vV][aA][rR] ...@@ -2150,6 +2195,7 @@ VAR [vV][aA][rR]
<MemberSpecSkip>"{" { <MemberSpecSkip>"{" {
bracketCount=0; bracketCount=0;
lastCurlyContext = MemberSpecSkip; lastCurlyContext = MemberSpecSkip;
previous = current;
BEGIN(SkipCurly); BEGIN(SkipCurly);
} }
<MemberSpecSkip>"," { BEGIN(MemberSpec); } <MemberSpecSkip>"," { BEGIN(MemberSpec); }
...@@ -2392,8 +2438,8 @@ VAR [vV][aA][rR] ...@@ -2392,8 +2438,8 @@ VAR [vV][aA][rR]
current->name=current->name.simplifyWhiteSpace(); current->name=current->name.simplifyWhiteSpace();
current->type=current->type.simplifyWhiteSpace(); current->type=current->type.simplifyWhiteSpace();
current->args=current->args.simplifyWhiteSpace(); current->args=current->args.simplifyWhiteSpace();
QString &cn=current->name; QCString &cn=current->name;
QString &rn=current_root->name; QCString &rn=current_root->name;
//printf("current_root->name=`%s'\n",rn.data()); //printf("current_root->name=`%s'\n",rn.data());
//printf("Function: `%s' `%s' `%s'\n",current->type.data(),cn.data(),current->args.data()); //printf("Function: `%s' `%s' `%s'\n",current->type.data(),cn.data(),current->args.data());
int i; int i;
...@@ -2415,7 +2461,7 @@ VAR [vV][aA][rR] ...@@ -2415,7 +2461,7 @@ VAR [vV][aA][rR]
if (*yytext!=';' || (current_root->section&Entry::SCOPE_MASK) ) if (*yytext!=';' || (current_root->section&Entry::SCOPE_MASK) )
{ {
int tempArg=current->name.find('<'); int tempArg=current->name.find('<');
QString tempName; QCString tempName;
if (tempArg==-1) if (tempArg==-1)
tempName=current->name; tempName=current->name;
else else
...@@ -2437,7 +2483,7 @@ VAR [vV][aA][rR] ...@@ -2437,7 +2483,7 @@ VAR [vV][aA][rR]
else // a global function prototype or function variable else // a global function prototype or function variable
{ {
//printf("Scanner.l: prototype? type=`%s' name=`%s' args=`%s'\n",current->type.data(),current->name.data(),current->args.data()); //printf("Scanner.l: prototype? type=`%s' name=`%s' args=`%s'\n",current->type.data(),current->name.data(),current->args.data());
QRegExp re("([^)])"); QRegExp re("([^)]*)");
if (!current->type.isNull() && current->type.find(re,0)!=-1) if (!current->type.isNull() && current->type.find(re,0)!=-1)
{ {
//printf("Scanner.l: found function variable!\n"); //printf("Scanner.l: found function variable!\n");
...@@ -2450,6 +2496,7 @@ VAR [vV][aA][rR] ...@@ -2450,6 +2496,7 @@ VAR [vV][aA][rR]
current->proto = TRUE; current->proto = TRUE;
} }
} }
previous = current;
current_root->addSubEntry(current); current_root->addSubEntry(current);
current = new Entry ; current = new Entry ;
current->protection = protection; current->protection = protection;
...@@ -2459,46 +2506,127 @@ VAR [vV][aA][rR] ...@@ -2459,46 +2506,127 @@ VAR [vV][aA][rR]
current->slot = slot; current->slot = slot;
lastCurlyContext = FindMembers; lastCurlyContext = FindMembers;
if( *yytext == '{' ) if( *yytext == '{' )
BEGIN( SkipCurly ) ; {
addToBody(yytext);
BEGIN( SkipCurly ) ;
}
else if( *yytext == ':' ) else if( *yytext == ':' )
BEGIN( SkipInits ) ; {
addToBody(yytext);
BEGIN( SkipInits ) ;
}
else else
BEGIN( FindMembers ) ; BEGIN( FindMembers ) ;
} }
<SkipInits>"{" { <SkipInits>"{" {
addToBody(yytext);
lastCurlyContext = FindMembers; lastCurlyContext = FindMembers;
BEGIN( SkipCurly ) ; BEGIN( SkipCurly ) ;
} }
<SkipCurly,SkipCurlyCpp>"{" { ++bracketCount ; } <SkipCurly>"{" {
<SkipCurly,SkipCurlyCpp>"}" { if( bracketCount ) addToBody(yytext);
++bracketCount ;
}
<SkipCurly>"}" {
addToBody(yytext);
if( bracketCount )
--bracketCount ; --bracketCount ;
else else
//BEGIN( FindMembers ) ;
BEGIN( lastCurlyContext ) ; BEGIN( lastCurlyContext ) ;
} }
<SkipCurly>"'"\\[0-7]{1,3}"'" <SkipCurly>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" {
<SkipCurly>"'"\\."'" if ( bracketCount )
<SkipCurly>"'"."'" {
addToBody(yytext);
--bracketCount ;
}
else
{
lineCount();
tempEntry = current; // temporarily switch to the previous entry
current = previous;
current->doc.resize(0);
current->brief.resize(0);
lastAfterDocContext = SkipCurlyEndDoc;
afterDocTerminator = '}';
if (yytext[yyleng-3]=='/')
BEGIN(AfterDocLine);
else if (yytext[yyleng-2]=='*' && Config::autoBriefFlag)
BEGIN(AfterDocBrief);
else
BEGIN(AfterDoc);
}
}
<SkipCurlyEndDoc>"}" {
addToBody("}");
current = tempEntry;
BEGIN( lastCurlyContext );
}
<SkipCurly>"'"\\[0-7]{1,3}"'" {
addToBody(yytext);
}
<SkipCurly>"'"\\."'" {
addToBody(yytext);
}
<SkipCurly>"'"."'" {
addToBody(yytext);
}
<SkipCurly>\" { <SkipCurly>\" {
addToBody(yytext);
lastStringContext=SkipCurly; lastStringContext=SkipCurly;
BEGIN( SkipString ); BEGIN( SkipString );
} }
<SkipCurly>^{B}*"#" { BEGIN( SkipCurlyCpp ); } <SkipCurly>^{B}*"#" {
<SkipCurlyCpp>\n { yyLineNr++; addToBody(yytext);
BEGIN( SkipCurlyCpp );
}
<SkipCurly,SkipInits>\n {
yyLineNr++;
addToBody(yytext);
}
<SkipCurly,SkipCurlyCpp>. {
addToBody(yytext);
}
<SkipCurlyCpp>\n {
addToBody(yytext);
yyLineNr++;
lastCurlyContext = FindMembers; lastCurlyContext = FindMembers;
BEGIN( SkipCurly ); BEGIN( SkipCurly );
} }
<SkipCurlyCpp>\\[\r]*"\n"[\r]* { yyLineNr++; } <SkipCurlyCpp>\\[\r]*"\n"[\r]* {
<SkipCurlyCpp>"/*" addToBody(yytext);
<SkipCurlyCpp>"*/" yyLineNr++;
<SkipCurlyCpp>"//" }
<SkipString>\\. <SkipInits,SkipCurly,SkipCurlyCpp>"/*" {
<SkipString>\" { BEGIN( lastStringContext ); } addToBody(yytext);
<SkipString>"/*" }
<SkipString>"*/" <SkipInits,SkipCurly,SkipCurlyCpp>"*/" {
<SkipString>"//" addToBody(yytext);
}
<SkipInits,SkipCurly,SkipCurlyCpp>"//".* {
addToBody(yytext);
}
<SkipInits,SkipCurly,SkipCurlyCpp>. {
addToBody(yytext);
}
<SkipString>\\. {
addToBodyCond(yytext);
}
<SkipString>\" {
addToBodyCond(yytext);
BEGIN( lastStringContext );
}
<SkipString>"/*"|"*/"|"//" {
addToBodyCond(yytext);
}
<SkipString>\n {
yyLineNr++;
addToBodyCond(yytext);
}
<SkipString>. {
addToBodyCond(yytext);
}
<Bases,ClassName>";" { <Bases,ClassName>";" {
current->section = Entry::EMPTY_SEC ; current->section = Entry::EMPTY_SEC ;
current->type.resize(0) ; current->type.resize(0) ;
...@@ -2507,7 +2635,7 @@ VAR [vV][aA][rR] ...@@ -2507,7 +2635,7 @@ VAR [vV][aA][rR]
current->argList->clear(); current->argList->clear();
BEGIN( FindMembers ) ; BEGIN( FindMembers ) ;
} }
<ClassName>{ID} { <ClassName>{SCOPENAME} {
current->name = yytext ; current->name = yytext ;
BEGIN( ClassVar ); BEGIN( ClassVar );
} }
...@@ -2522,7 +2650,7 @@ VAR [vV][aA][rR] ...@@ -2522,7 +2650,7 @@ VAR [vV][aA][rR]
<ClassVar>{ID} { <ClassVar>{ID} {
if (isTypedef) if (isTypedef)
{ {
typedefDict.insert(yytext,new QString(current->name)); typedefDict.insert(yytext,new QCString(current->name));
current->type.prepend("typedef "); current->type.prepend("typedef ");
} }
current->type += ' ' ; current->type += ' ' ;
...@@ -2638,22 +2766,34 @@ VAR [vV][aA][rR] ...@@ -2638,22 +2766,34 @@ VAR [vV][aA][rR]
} }
<FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator>("//"{B}*)?"/**"/[^/*] { <FindMembers,FindFields,MemberSpec,FuncQual,SkipCurly,Operator>("//"{B}*)?"/**"/[^/*] {
removeSlashes=(yytext[1]=='/'); removeSlashes=(yytext[1]=='/');
lastDocContext = YY_START;
if (current_root->section & Entry::SCOPE_MASK) if (current_root->section & Entry::SCOPE_MASK)
current->inside = current_root->name+"::"; current->inside = current_root->name+"::";
if (YY_START==Curly) if (!Config::autoBriefFlag) // use the Qt style
{ {
tmpDocType=-1; tmpDocType=-1;
current->doc+="\n\n"; if (YY_START==Curly)
lastDocContext = Curly; current->doc+="\n\n";
else
current->doc.resize(0);
BEGIN( Doc ); BEGIN( Doc );
} }
else else // Use the javadoc style
{ {
tmpDocType=Doc; if (YY_START==Curly)
current->doc.resize(0); {
current->brief.resize(0); tmpDocType=-1;
lastDocContext = YY_START; current->doc+="\n\n";
BEGIN( JavaDoc ); lastDocContext = Curly;
BEGIN( Doc );
}
else
{
tmpDocType=Doc;
current->doc.resize(0);
current->brief.resize(0);
BEGIN( JavaDoc );
}
} }
} }
<FindMembers,FindFields,MemberSpec,FuncQual,Operator>"//!" { <FindMembers,FindFields,MemberSpec,FuncQual,Operator>"//!" {
...@@ -2679,7 +2819,7 @@ VAR [vV][aA][rR] ...@@ -2679,7 +2819,7 @@ VAR [vV][aA][rR]
current->args.resize(0); current->args.resize(0);
current->argList->clear(); current->argList->clear();
bracketCount=0; bracketCount=0;
BEGIN( SkipBlock ); BEGIN( SkipCurlyBlock );
} }
<JavaDoc>"@short"{B}+ { <JavaDoc>"@short"{B}+ {
...@@ -2728,24 +2868,31 @@ VAR [vV][aA][rR] ...@@ -2728,24 +2868,31 @@ VAR [vV][aA][rR]
current->startLine = yyLineNr; current->startLine = yyLineNr;
BEGIN( ClassDocFunc ); BEGIN( ClassDocFunc );
} }
<LineDoc,Doc,JavaDoc>{B}*("\\"|"@")"def"{B}* { <Doc,JavaDoc>{B}*("\\"|"@")"def"{B}+ {
nextDefContext = YY_START==LineDoc ? DefLineDoc : ClassDoc; nextDefContext = YY_START==LineDoc ? DefLineDoc : ClassDoc;
current->section = Entry::DEFINEDOC_SEC; current->section = Entry::DEFINEDOC_SEC;
current->fileName = yyFileName; current->fileName = yyFileName;
current->startLine = yyLineNr; current->startLine = yyLineNr;
BEGIN( ClassDocDefine ); BEGIN( ClassDocDefine );
} }
<Doc,JavaDoc>{B}*("\\"|"@")"overload"{B}* { <LineDoc,Doc,JavaDoc>{B}*("\\"|"@")"overload"{B}* {
overloadContext = YY_START;
BEGIN( ClassDocOverload ); BEGIN( ClassDocOverload );
} }
<ClassDocOverload>{B}*"\n" { <ClassDocOverload>{B}*/"\n" {
QString orgDoc = current->doc; QCString orgDoc = current->doc;
current->doc = getOverloadDocs(); current->doc = getOverloadDocs();
current->doc += "\n\n"; current->doc += "\n\n";
current->doc += orgDoc; current->doc += orgDoc;
yyLineNr++; BEGIN( overloadContext );
BEGIN( Doc );
} }
<ClassDocOverload>{B}*/"*/" {
QCString orgDoc = current->doc;
current->doc = getOverloadDocs();
current->doc += "\n\n";
current->doc += orgDoc;
BEGIN( overloadContext );
}
<ClassDocOverload>. { unput(*yytext); <ClassDocOverload>. { unput(*yytext);
current->section = Entry::OVERLOADDOC_SEC; current->section = Entry::OVERLOADDOC_SEC;
current->fileName = yyFileName; current->fileName = yyFileName;
...@@ -3104,7 +3251,7 @@ VAR [vV][aA][rR] ...@@ -3104,7 +3251,7 @@ VAR [vV][aA][rR]
} }
<GroupName>{ID} { <GroupName>{ID} {
current->groups->append( current->groups->append(
new QString(yytext) new QCString(yytext)
); );
} }
<GroupName>\n { <GroupName>\n {
...@@ -3177,6 +3324,9 @@ VAR [vV][aA][rR] ...@@ -3177,6 +3324,9 @@ VAR [vV][aA][rR]
current->section = Entry::VARIABLEDOC_SEC; current->section = Entry::VARIABLEDOC_SEC;
newDocState(); newDocState();
} }
<ClassDocFunc>"operator"{B}*"("{B}*")" {
current->name+=yytext;
}
<ClassDocFunc>"(" { <ClassDocFunc>"(" {
current->args+=*yytext; current->args+=*yytext;
currentArgumentContext = ClassDocFuncQual; currentArgumentContext = ClassDocFuncQual;
...@@ -3194,6 +3344,9 @@ VAR [vV][aA][rR] ...@@ -3194,6 +3344,9 @@ VAR [vV][aA][rR]
current->name+=')'; current->name+=')';
BEGIN( ClassDocFunc ); BEGIN( ClassDocFunc );
} }
<ClassDocFuncQual>"{" {
BEGIN( ClassDocFuncSkipLine);
}
<ClassDocFuncQual>{B}*"const"{B}* { <ClassDocFuncQual>{B}*"const"{B}* {
current->args += " const "; current->args += " const ";
current->argList->constSpecifier=TRUE; current->argList->constSpecifier=TRUE;
...@@ -3221,7 +3374,7 @@ VAR [vV][aA][rR] ...@@ -3221,7 +3374,7 @@ VAR [vV][aA][rR]
<ClassDocFunc,ClassDocFuncQual>. { <ClassDocFunc,ClassDocFuncQual>. {
current->name += *yytext; current->name += *yytext;
} }
<ClassDocFuncQual>"\n" { <ClassDocFuncQual,ClassDocFuncSkipLine>"\n" {
yyLineNr++; yyLineNr++;
current->name = current->name.stripWhiteSpace(); current->name = current->name.stripWhiteSpace();
newDocState(); newDocState();
...@@ -3229,6 +3382,7 @@ VAR [vV][aA][rR] ...@@ -3229,6 +3382,7 @@ VAR [vV][aA][rR]
<Doc>. { current->doc += *yytext; } <Doc>. { current->doc += *yytext; }
<DefLineDoc,LineDoc>. { current->brief += *yytext; } <DefLineDoc,LineDoc>. { current->brief += *yytext; }
<Doc>\n { yyLineNr++; current->doc += *yytext; } <Doc>\n { yyLineNr++; current->doc += *yytext; }
<LineDoc>[\n\r]{B}*"//"[!/]
<LineDoc>\n { <LineDoc>\n {
yyLineNr++; yyLineNr++;
BEGIN( lastDocContext ); BEGIN( lastDocContext );
...@@ -3306,6 +3460,20 @@ VAR [vV][aA][rR] ...@@ -3306,6 +3460,20 @@ VAR [vV][aA][rR]
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void addToBody(const char *text)
{
if (Config::includeSourceFlag)
previous->body+=text;
}
static void addToBodyCond(const char *text)
{
if (Config::includeSourceFlag && lastStringContext==SkipCurly)
previous->body+=text;
}
//----------------------------------------------------------------------------
void scanString(const char *s) void scanString(const char *s)
{ {
const char *oldInputString = inputString; const char *oldInputString = inputString;
...@@ -3414,7 +3582,7 @@ void parseMain(Entry *rt) ...@@ -3414,7 +3582,7 @@ void parseMain(Entry *rt)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void parseDocument(OutputList &ol,const QString &docString) void parseDocument(OutputList &ol,const QCString &docString)
{ {
//inParamBlock=inSeeBlock=inReturnBlock=FALSE; //inParamBlock=inSeeBlock=inReturnBlock=FALSE;
curTable = 0; curTable = 0;
...@@ -3441,7 +3609,7 @@ void parseDocument(OutputList &ol,const QString &docString) ...@@ -3441,7 +3609,7 @@ void parseDocument(OutputList &ol,const QString &docString)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void parseDoc(OutputList &ol,const char *clName, void parseDoc(OutputList &ol,const char *clName,
const char *memName,const QString &docString) const char *memName,const QCString &docString)
{ {
initParser(); initParser();
initParseCodeContext(); initParseCodeContext();
...@@ -3461,7 +3629,7 @@ void parseDoc(OutputList &ol,const char *clName, ...@@ -3461,7 +3629,7 @@ void parseDoc(OutputList &ol,const char *clName,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void parseText(OutputList &ol,const QString &txtString) void parseText(OutputList &ol,const QCString &txtString)
{ {
inputString = txtString; inputString = txtString;
outDoc = new OutputList(&ol); outDoc = new OutputList(&ol);
...@@ -3476,7 +3644,7 @@ void parseText(OutputList &ol,const QString &txtString) ...@@ -3476,7 +3644,7 @@ void parseText(OutputList &ol,const QString &txtString)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void parseExample(OutputList &ol,const QString &docString, void parseExample(OutputList &ol,const QCString &docString,
const char *fileName) const char *fileName)
{ {
initParser(); initParser();
...@@ -3487,9 +3655,3 @@ void parseExample(OutputList &ol,const QString &docString, ...@@ -3487,9 +3655,3 @@ void parseExample(OutputList &ol,const QString &docString,
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
extern "C" { // some sillyness to keep the compiler happy
int scanYYwrap() { return 1 ; }
void bogus() { yy_flex_realloc(0,0); }
}
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
* *
*/ */
#include "qtbc.h"
#include "searchindex.h" #include "searchindex.h"
#include "suffixtree.h" #include "suffixtree.h"
...@@ -44,7 +45,7 @@ bool SearchIndex::addWord(const char *key,const char *word,bool special) ...@@ -44,7 +45,7 @@ bool SearchIndex::addWord(const char *key,const char *word,bool special)
DocRef *dr=0; DocRef *dr=0;
if (word && key && strlen(key)>0 && (dr=refDict[key])) if (word && key && strlen(key)>0 && (dr=refDict[key]))
{ {
suffixTree->insertWord(((QString)word).lower(),dr->index(),special); suffixTree->insertWord(((QCString)word).lower(),dr->index(),special);
return TRUE; return TRUE;
} }
else if (word) else if (word)
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#ifndef _SEARCHINDEX_H #ifndef _SEARCHINDEX_H
#define _SEARCHINDEX_H #define _SEARCHINDEX_H
#include "qtbc.h"
#include <qintdict.h> #include <qintdict.h>
#include <qstring.h>
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
...@@ -40,8 +40,8 @@ class DocRef ...@@ -40,8 +40,8 @@ class DocRef
int offset() const { return o; } int offset() const { return o; }
private: private:
QString n; QCString n;
QString u; QCString u;
int i; int i;
int o; int o;
}; };
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
#ifndef SECTION_H #ifndef SECTION_H
#define SECTION_H #define SECTION_H
#include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
#include <qstring.h>
class Definition; class Definition;
...@@ -29,11 +29,11 @@ struct SectionInfo ...@@ -29,11 +29,11 @@ struct SectionInfo
enum SectionType { Section, Subsection, Anchor }; enum SectionType { Section, Subsection, Anchor };
SectionInfo(const char *l,const char *t,SectionType st) SectionInfo(const char *l,const char *t,SectionType st)
{ label=l; title=t; type=st; definition=0; } { label=l; title=t; type=st; definition=0; }
QString fileName; QCString label;
QString label; QCString title;
QString title;
SectionType type; SectionType type;
Definition *definition; Definition *definition;
QCString fileName;
}; };
class SectionList : public QList<SectionInfo> class SectionList : public QList<SectionInfo>
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include "qtbc.h"
#include "suffixtree.h" #include "suffixtree.h"
#define MAXWORDLEN 1024 #define MAXWORDLEN 1024
...@@ -112,7 +114,7 @@ int SuffixNode::insert(const char *word,int refId,int inName,int fullWord) ...@@ -112,7 +114,7 @@ int SuffixNode::insert(const char *word,int refId,int inName,int fullWord)
SuffixNode *sn=children->first(); SuffixNode *sn=children->first();
while (sn) while (sn)
{ {
char *lab=sn->label.data(); const char *lab=sn->label.data();
char w=word[0],l=lab[0],i=0; char w=word[0],l=lab[0],i=0;
while (w!=0 && l!=0 && w==l) { i++; w=word[i]; l=lab[i]; } while (w!=0 && l!=0 && w==l) { i++; w=word[i]; l=lab[i]; }
if (w==0 && l==0) // match found if (w==0 && l==0) // match found
...@@ -320,7 +322,7 @@ SuffixTree::~SuffixTree() ...@@ -320,7 +322,7 @@ SuffixTree::~SuffixTree()
void SuffixTree::insertWord(const char *word,int index,bool inName) void SuffixTree::insertWord(const char *word,int index,bool inName)
{ {
QString suffix=word; QCString suffix=word;
uint i; uint i;
for (i=2;i<suffix.length()-1;i++) for (i=2;i<suffix.length()-1;i++)
{ {
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
#ifndef SUFFIXTREE_H #ifndef SUFFIXTREE_H
#define SUFFIXTREE_H #define SUFFIXTREE_H
#include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include <qarray.h> #include <qarray.h>
#include <qstring.h>
#include <qfile.h> #include <qfile.h>
class SuffixNodeList; class SuffixNodeList;
...@@ -56,7 +56,7 @@ class SuffixNode ...@@ -56,7 +56,7 @@ class SuffixNode
private: private:
SuffixNodeList *children; SuffixNodeList *children;
QArray<WordRef> references; QArray<WordRef> references;
QString label; QCString label;
int branchOffset; int branchOffset;
int totalFreq; int totalFreq;
}; };
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
* includes * includes
*/ */
#include <stdio.h> #include <stdio.h>
#include <qstring.h>
#include "qtbc.h"
#include <qfileinf.h> #include <qfileinf.h>
#include "classdef.h" #include "classdef.h"
...@@ -30,18 +31,19 @@ ...@@ -30,18 +31,19 @@
#include "doxygen.h" #include "doxygen.h"
#include "util.h" #include "util.h"
#include "message.h" #include "message.h"
#include "defargs.h"
#define YY_NO_UNPUT #define YY_NO_UNPUT
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
static int yyLineNr; static int yyLineNr;
static QString className; static QCString className;
static QString fileName; static QCString fileName;
static QString namespaceName; static QCString namespaceName;
static QString tagName; static QCString tagName;
static QString memberName; static QCString memberName;
static QString anchorName; static QCString anchorName;
static QString argString; static QCString argString;
static ClassDef *cd; static ClassDef *cd;
static FileDef *fd; static FileDef *fd;
static NamespaceDef *nd; static NamespaceDef *nd;
...@@ -105,8 +107,11 @@ static void addMember(const char *name,const char *anchor,const char *args) ...@@ -105,8 +107,11 @@ static void addMember(const char *name,const char *anchor,const char *args)
MemberNameDict *mnd=0; MemberNameDict *mnd=0;
MemberNameList *mnl=0; MemberNameList *mnl=0;
MemberDef *md; MemberDef *md;
ArgumentList *argList = new ArgumentList;
stringToArgumentList(args,argList);
md=new MemberDef(0,name,args,0,Public,Normal,FALSE,FALSE, md=new MemberDef(0,name,args,0,Public,Normal,FALSE,FALSE,
MemberDef::Function,0,0); MemberDef::Function,0,argList);
delete argList;
md->setReference(anchor); md->setReference(anchor);
if (cd) // member of a class if (cd) // member of a class
{ {
...@@ -129,7 +134,7 @@ static void addMember(const char *name,const char *anchor,const char *args) ...@@ -129,7 +134,7 @@ static void addMember(const char *name,const char *anchor,const char *args)
mnd=&functionNameDict; mnd=&functionNameDict;
mnl=&functionNameList; mnl=&functionNameList;
} }
MemberName *mn; MemberName *mn = 0;
if ((mn=(*mnd)[memberName])) if ((mn=(*mnd)[memberName]))
{ {
//printf("mn->inSort()\n"); //printf("mn->inSort()\n");
...@@ -156,6 +161,8 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -156,6 +161,8 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
FILE [a-z_A-Z0-9\.\-\+\:\\\/]+ FILE [a-z_A-Z0-9\.\-\+\:\\\/]+
SCOPE ({ID}"::")*{ID} SCOPE ({ID}"::")*{ID}
%option noyywrap
%x Pass1 %x Pass1
%x Pass2 %x Pass2
%x AnchorName %x AnchorName
...@@ -272,6 +279,6 @@ void parseTagFile(const char *fileName) ...@@ -272,6 +279,6 @@ void parseTagFile(const char *fileName)
fclose(f); fclose(f);
} }
extern "C" { // some bogus code to keep the compiler happy //extern "C" { // some bogus code to keep the compiler happy
int tagYYwrap() { return 1 ; } // int tagYYwrap() { return 1 ; }
} //}
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef TRANSLATOR_H #ifndef TRANSLATOR_H
#define TRANSLATOR_H #define TRANSLATOR_H
#include <qstring.h> #include "qtbc.h"
#include "classdef.h" #include "classdef.h"
#include "util.h" #include "util.h"
...@@ -28,166 +28,164 @@ class Translator ...@@ -28,166 +28,164 @@ class Translator
// NOTICE: // NOTICE:
// the following functions are now obsolete: these are no longer used and // the following functions are now obsolete: these are no longer used and
// will disappear in future versions. You do not have to translate them! // will disappear in future versions. You do not have to translate them!
virtual QString trInherits() virtual QCString trInherits()
{ return "Inherits"; } { return "Inherits"; }
virtual QString trAnd() virtual QCString trAnd()
{ return "and"; } { return "and"; }
virtual QString trInheritedBy() virtual QCString trInheritedBy()
{ return "Inherited By"; } { return "Inherited By"; }
virtual QString trReference() virtual QCString trReference()
{ return "Reference"; } { return "Reference"; }
virtual QString trReimplementedFrom() virtual QCString trReimplementedFrom()
{ return "Reimplemented from"; } { return "Reimplemented from"; }
virtual QString trReimplementedIn() virtual QCString trReimplementedIn()
{ return "Reimplemented in"; } { return "Reimplemented in"; }
virtual QString trIncludeFile() virtual QCString trIncludeFile()
{ return "Include File"; } { return "Include File"; }
virtual QString trNamespaces()
{ return "Namespace List"; }
// end of obsolete functions // end of obsolete functions
//-------------------------------------------------------------------- //--------------------------------------------------------------------
virtual QString latexBabelPackage() virtual QCString latexBabelPackage()
// returns the name of the package that is included by LaTeX // returns the name of the package that is included by LaTeX
{ return ""; } { return ""; }
virtual QString trRelatedFunctions() virtual QCString trRelatedFunctions()
// used in the compound documentation before a list of related functions. // used in the compound documentation before a list of related functions.
{ return "Related Functions"; } { return "Related Functions"; }
virtual QString trRelatedSubscript() virtual QCString trRelatedSubscript()
// subscript for the related functions. // subscript for the related functions.
{ return "(Note that these are not member functions.)"; } { return "(Note that these are not member functions.)"; }
virtual QString trDetailedDescription() virtual QCString trDetailedDescription()
// 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.
{ return "Detailed Description"; } { return "Detailed Description"; }
virtual QString trMemberTypedefDocumentation() virtual QCString trMemberTypedefDocumentation()
// header that is put before the list of typedefs. // header that is put before the list of typedefs.
{ return "Member Typedef Documentation"; } { return "Member Typedef Documentation"; }
virtual QString trMemberEnumerationDocumentation() virtual QCString trMemberEnumerationDocumentation()
// header that is put before the list of enumerations. // header that is put before the list of enumerations.
{ return "Member Enumeration Documentation"; } { return "Member Enumeration Documentation"; }
virtual QString trMemberFunctionDocumentation() virtual QCString trMemberFunctionDocumentation()
// header that is put before the list of member functions. // header that is put before the list of member functions.
{ return "Member Function Documentation"; } { return "Member Function Documentation"; }
virtual QString trMemberDataDocumentation() virtual QCString trMemberDataDocumentation()
// header that is put before the list of member attributes. // header that is put before the list of member attributes.
{ return "Member Data Documentation"; } { return "Member Data Documentation"; }
virtual QString trGeneratedFrom(const char *s,bool single) virtual QCString trGeneratedFrom(const char *s,bool single)
{ // here s is one of " Class", " Struct" or " Union" { // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file // single is true implies a single file
QString result=(QString)"The documentation for this"+s+ QCString result=(QCString)"The documentation for this"+s+
" was generated from the following file"; " was generated from the following file";
if (single) result+=":"; else result+="s:"; if (single) result+=":"; else result+="s:";
return result; return result;
} }
virtual QString trMore() virtual QCString trMore()
// this is the text of a link put after brief descriptions. // this is the text of a link put after brief descriptions.
{ return "More..."; } { return "More..."; }
virtual QString trListOfAllMembers() virtual QCString trListOfAllMembers()
// put in the class documentation // put in the class documentation
{ return "List of all members."; } { return "List of all members."; }
virtual QString trMemberList() virtual QCString trMemberList()
// 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
{ return "Member List"; } { return "Member List"; }
virtual QString trThisIsTheListOfAllMembers() virtual QCString trThisIsTheListOfAllMembers()
// 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
{ return "This is the complete list of members for "; } { return "This is the complete list of members for "; }
virtual QString trIncludingInheritedMembers() virtual QCString trIncludingInheritedMembers()
// this is the remainder of the sentence after the class name // this is the remainder of the sentence after the class name
{ return ", including all inherited members."; } { return ", including all inherited members."; }
virtual QString trGeneratedAutomatically(const char *s) virtual QCString trGeneratedAutomatically(const char *s)
// 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.
{ QString result="Generated automatically by Doxygen"; { QCString result="Generated automatically by Doxygen";
if (s) result+=(QString)" for "+s; if (s) result+=(QCString)" for "+s;
result+=" from the source code."; result+=" from the source code.";
return result; return result;
} }
virtual QString trEnumName() virtual QCString trEnumName()
// put after an enum name in the list of all members // put after an enum name in the list of all members
{ return "enum name"; } { return "enum name"; }
virtual QString trEnumValue() virtual QCString trEnumValue()
// put after an enum value in the list of all members // put after an enum value in the list of all members
{ return "enum value"; } { return "enum value"; }
virtual QString trDefinedIn() virtual QCString trDefinedIn()
// put after an undocumented member in the list of all members // put after an undocumented member in the list of all members
{ return "defined in"; } { return "defined in"; }
virtual QString trVerbatimText(const char *f) virtual QCString trVerbatimText(const char *f)
// 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.
{ return (QString)"This is the verbatim text of the "+f+" include file."; } { return (QCString)"This is the verbatim text of the "+f+" include file."; }
// quick reference sections // quick reference sections
virtual QString trModules() virtual QCString trModules()
// This is put above each page as a link to the list of all groups of // This is put above each page as a link to the list of all groups of
// compounds or files (see the \group command). // compounds or files (see the \group command).
{ return "Modules"; } { return "Modules"; }
virtual QString trClassHierarchy() virtual QCString trClassHierarchy()
// 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
{ return "Class Hierarchy"; } { return "Class Hierarchy"; }
virtual QString trCompoundList() virtual QCString trCompoundList()
// 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
{ return "Compound List"; } { return "Compound List"; }
virtual QString trFileList() virtual QCString trFileList()
// 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
{ return "File List"; } { return "File List"; }
virtual QString trHeaderFiles() virtual QCString trHeaderFiles()
// 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
{ return "Header Files"; } { return "Header Files"; }
virtual QString trCompoundMembers() virtual QCString trCompoundMembers()
// 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.
{ return "Compound Members"; } { return "Compound Members"; }
virtual QString trFileMembers() virtual QCString trFileMembers()
// 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.
{ return "File Members"; } { return "File Members"; }
virtual QString trRelatedPages() virtual QCString trRelatedPages()
// 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.
{ return "Related Pages"; } { return "Related Pages"; }
virtual QString trExamples() virtual QCString trExamples()
// This is put above each page as a link to all examples. // This is put above each page as a link to all examples.
{ return "Examples"; } { return "Examples"; }
virtual QString trSearch() virtual QCString trSearch()
// 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.
{ return "Search"; } { return "Search"; }
virtual QString trClassHierarchyDescription() virtual QCString trClassHierarchyDescription()
// This is an introduction to the class hierarchy. // This is an introduction to the class hierarchy.
{ return "This inheritance list is sorted roughly, " { return "This inheritance list is sorted roughly, "
"but not completely, alphabetically:"; "but not completely, alphabetically:";
} }
virtual QString trFileListDescription(bool extractAll) virtual QCString trFileListDescription(bool extractAll)
// This is an introduction to the list with all files. // This is an introduction to the list with all files.
{ {
QString result="Here is a list of all "; QCString result="Here is a list of all ";
if (!extractAll) result+="documented "; if (!extractAll) result+="documented ";
result+="files with brief descriptions:"; result+="files with brief descriptions:";
return result; return result;
} }
virtual QString trCompoundListDescription() virtual QCString trCompoundListDescription()
// This is an introduction to the annotated compound list // This is an introduction to the annotated compound list
{ return "Here are the classes, structs and " { return "Here are the classes, structs and "
"unions with brief descriptions:"; "unions with brief descriptions:";
} }
virtual QString trCompoundMembersDescription(bool extractAll) virtual QCString trCompoundMembersDescription(bool extractAll)
// This is an introduction to the page with all class members // This is an introduction to the page with all class members
{ {
QString result="Here is a list of all "; QCString result="Here is a list of all ";
if (!extractAll) result+="documented "; if (!extractAll) result+="documented ";
result+="class members with links to "; result+="class members with links to ";
if (extractAll) if (extractAll)
...@@ -196,10 +194,10 @@ class Translator ...@@ -196,10 +194,10 @@ class Translator
result+="the classes they belong to:"; result+="the classes they belong to:";
return result; return result;
} }
virtual QString trFileMembersDescription(bool extractAll) virtual QCString trFileMembersDescription(bool extractAll)
// This is an introduction to the page with all file members // This is an introduction to the page with all file members
{ {
QString result="Here is a list of all "; QCString result="Here is a list of all ";
if (!extractAll) result+="documented "; if (!extractAll) result+="documented ";
result+="file members with links to "; result+="file members with links to ";
if (extractAll) if (extractAll)
...@@ -208,207 +206,207 @@ class Translator ...@@ -208,207 +206,207 @@ class Translator
result+="the files they belong to:"; result+="the files they belong to:";
return result; return result;
} }
virtual QString trHeaderFilesDescription() virtual QCString trHeaderFilesDescription()
// 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
{ return "Here are the header files that make up the API:"; } { return "Here are the header files that make up the API:"; }
virtual QString trExamplesDescription() virtual QCString trExamplesDescription()
// 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
{ return "Here is a list of all examples:"; } { return "Here is a list of all examples:"; }
virtual QString trRelatedPagesDescription() virtual QCString trRelatedPagesDescription()
// 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
{ return "Here is a list of all related documentation pages:"; } { return "Here is a list of all related documentation pages:"; }
virtual QString trModulesDescription() virtual QCString trModulesDescription()
// 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
{ return "Here is a list of all modules:"; } { return "Here is a list of all modules:"; }
virtual QString trNoDescriptionAvailable() virtual QCString trNoDescriptionAvailable()
// 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.
{ return "No description available"; } { return "No description available"; }
// index titles (the project name is prepended for these) // index titles (the project name is prepended for these)
virtual QString trDocumentation() virtual QCString trDocumentation()
// This is used in HTML as the title of index.html. // This is used in HTML as the title of index.html.
{ return "Documentation"; } { return "Documentation"; }
virtual QString trModuleIndex() virtual QCString trModuleIndex()
// 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.
{ return "Module Index"; } { return "Module Index"; }
virtual QString trHierarchicalIndex() virtual QCString trHierarchicalIndex()
// 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.
{ return "Hierarchical Index"; } { return "Hierarchical Index"; }
virtual QString trCompoundIndex() virtual QCString trCompoundIndex()
// 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
{ return "Compound Index"; } { return "Compound Index"; }
virtual QString trFileIndex() virtual QCString trFileIndex()
// 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.
{ return "File Index"; } { return "File Index"; }
virtual QString trModuleDocumentation() virtual QCString trModuleDocumentation()
// 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.
{ return "Module Documentation"; } { return "Module Documentation"; }
virtual QString trClassDocumentation() virtual QCString trClassDocumentation()
// 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.
{ return "Class Documentation"; } { return "Class Documentation"; }
virtual QString trFileDocumentation() virtual QCString trFileDocumentation()
// 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.
{ return "File Documentation"; } { return "File Documentation"; }
virtual QString trExampleDocumentation() virtual QCString trExampleDocumentation()
// 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.
{ return "Example Documentation"; } { return "Example Documentation"; }
virtual QString trPageDocumentation() virtual QCString trPageDocumentation()
// 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.
{ return "Page Documentation"; } { return "Page Documentation"; }
virtual QString trReferenceManual() virtual QCString trReferenceManual()
// This is used in LaTeX as the title of the document // This is used in LaTeX as the title of the document
{ return "Reference Manual"; } { return "Reference Manual"; }
virtual QString trDefines() virtual QCString trDefines()
// 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
{ return "Defines"; } { return "Defines"; }
virtual QString trFuncProtos() virtual QCString trFuncProtos()
// 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
{ return "Function Prototypes"; } { return "Function Prototypes"; }
virtual QString trTypedefs() virtual QCString trTypedefs()
// 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
{ return "Typedefs"; } { return "Typedefs"; }
virtual QString trEnumerations() virtual QCString trEnumerations()
// 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
{ return "Enumerations"; } { return "Enumerations"; }
virtual QString trFunctions() virtual QCString trFunctions()
// 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
{ return "Functions"; } { return "Functions"; }
virtual QString trVariables() virtual QCString trVariables()
// 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
{ return "Variables"; } { return "Variables"; }
virtual QString trEnumerationValues() virtual QCString trEnumerationValues()
// 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
{ return "Enumeration values"; } { return "Enumeration values"; }
virtual QString trAuthor() virtual QCString trAuthor()
// This is used in man pages as the author section. // This is used in man pages as the author section.
{ return "Author"; } { return "Author"; }
virtual QString trDefineDocumentation() virtual QCString trDefineDocumentation()
// 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
{ return "Define Documentation"; } { return "Define Documentation"; }
virtual QString trFunctionPrototypeDocumentation() virtual QCString trFunctionPrototypeDocumentation()
// 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
{ return "Function Prototype Documentation"; } { return "Function Prototype Documentation"; }
virtual QString trTypedefDocumentation() virtual QCString trTypedefDocumentation()
// 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
{ return "Typedef Documentation"; } { return "Typedef Documentation"; }
virtual QString trEnumerationTypeDocumentation() virtual QCString trEnumerationTypeDocumentation()
// 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
{ return "Enumeration Type Documentation"; } { return "Enumeration Type Documentation"; }
virtual QString trEnumerationValueDocumentation() virtual QCString trEnumerationValueDocumentation()
// 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
{ return "Enumeration Value Documentation"; } { return "Enumeration Value Documentation"; }
virtual QString trFunctionDocumentation() virtual QCString trFunctionDocumentation()
// 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
{ return "Function Documentation"; } { return "Function Documentation"; }
virtual QString trVariableDocumentation() virtual QCString trVariableDocumentation()
// 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
{ return "Variable Documentation"; } { return "Variable Documentation"; }
virtual QString trCompounds() virtual QCString trCompounds()
// 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
{ return "Compounds"; } { return "Compounds"; }
virtual QString trFiles() virtual QCString trFiles()
// 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
{ return "Files"; } { return "Files"; }
virtual QString trGeneratedAt(const char *date,const char *projName) virtual QCString trGeneratedAt(const char *date,const char *projName)
{ {
QString result=(QString)"Generated at "+date; QCString result=(QCString)"Generated at "+date;
if (projName) result+=(QString)" for "+projName; if (projName) result+=(QCString)" for "+projName;
result+=(QString)" by"; result+=(QCString)" by";
return result; return result;
} }
virtual QString trWrittenBy() virtual QCString trWrittenBy()
{ {
return "written by"; return "written by";
} }
virtual QString trClassDiagram(const char *clName) virtual QCString trClassDiagram(const char *clName)
// this text is put before a class diagram // this text is put before a class diagram
{ {
return (QString)"Class diagram for "+clName; return (QCString)"Class diagram for "+clName;
} }
virtual QString trForInternalUseOnly() virtual QCString trForInternalUseOnly()
// this text is generated when the \internal command is used. // this text is generated when the \internal command is used.
{ return "For internal use only."; } { return "For internal use only."; }
virtual QString trReimplementedForInternalReasons() virtual QCString trReimplementedForInternalReasons()
// this text is generated when the \reimp command is used. // this text is generated when the \reimp command is used.
{ return "Reimplemented for internal reasons; the API is not affected."; } { return "Reimplemented for internal reasons; the API is not affected."; }
virtual QString trWarning() virtual QCString trWarning()
// this text is generated when the \warning command is used. // this text is generated when the \warning command is used.
{ return "Warning"; } { return "Warning"; }
virtual QString trBugsAndLimitations() virtual QCString trBugsAndLimitations()
// this text is generated when the \bug command is used. // this text is generated when the \bug command is used.
{ return "Bugs and limitations"; } { return "Bugs and limitations"; }
virtual QString trVersion() virtual QCString trVersion()
// this text is generated when the \version command is used. // this text is generated when the \version command is used.
{ return "Version"; } { return "Version"; }
virtual QString trDate() virtual QCString trDate()
// this text is generated when the \date command is used. // this text is generated when the \date command is used.
{ return "Date"; } { return "Date"; }
virtual QString trAuthors() virtual QCString trAuthors()
// this text is generated when the \author command is used. // this text is generated when the \author command is used.
{ return "Author(s)"; } { return "Author(s)"; }
virtual QString trReturns() virtual QCString trReturns()
// this text is generated when the \return command is used. // this text is generated when the \return command is used.
{ return "Returns"; } { return "Returns"; }
virtual QString trSeeAlso() virtual QCString trSeeAlso()
// this text is generated when the \sa command is used. // this text is generated when the \sa command is used.
{ return "See also"; } { return "See also"; }
virtual QString trParameters() virtual QCString trParameters()
// this text is generated when the \param command is used. // this text is generated when the \param command is used.
{ return "Parameters"; } { return "Parameters"; }
virtual QString trExceptions() virtual QCString trExceptions()
// this text is generated when the \exception command is used. // this text is generated when the \exception command is used.
{ return "Exceptions"; } { return "Exceptions"; }
virtual QString trGeneratedBy() virtual QCString trGeneratedBy()
// this text is used in the title page of a LaTeX document. // this text is used in the title page of a LaTeX document.
{ return "Generated by"; } { return "Generated by"; }
// new since 0.49-990307 // new since 0.49-990307
virtual QString trNamespaceList() virtual QCString trNamespaceList()
// 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.
{ return "Namespace List"; } { return "Namespace List"; }
virtual QString trNamespaceListDescription(bool extractAll) virtual QCString trNamespaceListDescription(bool extractAll)
// used as an introduction to the namespace list // used as an introduction to the namespace list
{ {
QString result="Here is a list of all "; QCString result="Here is a list of all ";
if (!extractAll) result+="documented "; if (!extractAll) result+="documented ";
result+="namespaces with brief descriptions:"; result+="namespaces with brief descriptions:";
return result; return result;
} }
virtual QString trFriends() virtual QCString trFriends()
// 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
{ return "Friends"; } { return "Friends"; }
...@@ -417,7 +415,7 @@ class Translator ...@@ -417,7 +415,7 @@ class Translator
// new since 0.49-990405 // new since 0.49-990405
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual QString trRelatedFunctionDocumentation() virtual QCString trRelatedFunctionDocumentation()
// 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
// related classes // related classes
{ return "Friends And Related Function Documentation"; } { return "Friends And Related Function Documentation"; }
...@@ -426,11 +424,11 @@ class Translator ...@@ -426,11 +424,11 @@ class Translator
// new since 0.49-990425 // new since 0.49-990425
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual QString trCompoundReference(const char *clName, virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType) ClassDef::CompoundType compType)
// 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
{ {
QString result=(QString)clName+" "; QCString result=(QCString)clName+" ";
switch(compType) switch(compType)
{ {
case ClassDef::Class: result+=" Class"; break; case ClassDef::Class: result+=" Class"; break;
...@@ -440,49 +438,49 @@ class Translator ...@@ -440,49 +438,49 @@ class Translator
result+=" Reference"; result+=" Reference";
return result; return result;
} }
virtual QString trFileReference(const char *fileName) virtual QCString trFileReference(const char *fileName)
// used as the title of the HTML page of a file // used as the title of the HTML page of a file
{ {
QString result=fileName; QCString result=fileName;
result+=" File Reference"; result+=" File Reference";
return result; return result;
} }
virtual QString trNamespaceReference(const char *namespaceName) virtual QCString trNamespaceReference(const char *namespaceName)
// used as the title of the HTML page of a namespace // used as the title of the HTML page of a namespace
{ {
QString result=namespaceName; QCString result=namespaceName;
result+=" Namespace Reference"; result+=" Namespace Reference";
return result; return result;
} }
// 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 QString trPublicMembers() virtual QCString trPublicMembers()
{ return "Public Members"; } { return "Public Members"; }
virtual QString trPublicSlots() virtual QCString trPublicSlots()
{ return "Public Slots"; } { return "Public Slots"; }
virtual QString trSignals() virtual QCString trSignals()
{ return "Signals"; } { return "Signals"; }
virtual QString trStaticPublicMembers() virtual QCString trStaticPublicMembers()
{ return "Static Public Members"; } { return "Static Public Members"; }
virtual QString trProtectedMembers() virtual QCString trProtectedMembers()
{ return "Protected Members"; } { return "Protected Members"; }
virtual QString trProtectedSlots() virtual QCString trProtectedSlots()
{ return "Protected Slots"; } { return "Protected Slots"; }
virtual QString trStaticProtectedMembers() virtual QCString trStaticProtectedMembers()
{ return "Static Protected Members"; } { return "Static Protected Members"; }
virtual QString trPrivateMembers() virtual QCString trPrivateMembers()
{ return "Private Members"; } { return "Private Members"; }
virtual QString trPrivateSlots() virtual QCString trPrivateSlots()
{ return "Private Slots"; } { return "Private Slots"; }
virtual QString trStaticPrivateMembers() virtual QCString trStaticPrivateMembers()
{ return "Static Private Members"; } { return "Static Private Members"; }
// end of member sections // end of member sections
virtual QString trWriteList(int numEntries) virtual QCString trWriteList(int numEntries)
{ {
// this function is used to produce a comma-separated list of items. // this function is used to produce a comma-separated list of items.
// use generateMarker(i) to indicate where item i should be put. // use generateMarker(i) to indicate where item i should be put.
QString result; QCString result;
int i; int i;
// the inherits list contain `numEntries' classes // the inherits list contain `numEntries' classes
for (i=0;i<numEntries;i++) for (i=0;i<numEntries;i++)
...@@ -502,38 +500,38 @@ class Translator ...@@ -502,38 +500,38 @@ class Translator
return result; return result;
} }
virtual QString trInheritsList(int numEntries) virtual QCString trInheritsList(int numEntries)
// used in class documentation to produce a list of base classes, // used in class documentation to produce a list of base classes,
// if class diagrams are disabled. // if class diagrams are disabled.
{ {
return "Inherits "+trWriteList(numEntries)+"."; return "Inherits "+trWriteList(numEntries)+".";
} }
virtual QString trInheritedByList(int numEntries) virtual QCString trInheritedByList(int numEntries)
// used in class documentation to produce a list of super classes, // used in class documentation to produce a list of super classes,
// if class diagrams are disabled. // if class diagrams are disabled.
{ {
return "Inherited by "+trWriteList(numEntries)+"."; return "Inherited by "+trWriteList(numEntries)+".";
} }
virtual QString trReimplementedFromList(int numEntries) virtual QCString trReimplementedFromList(int numEntries)
// used in member documentation blocks to produce a list of // used in member documentation blocks to produce a list of
// members that are hidden by this one. // members that are hidden by this one.
{ {
return "Reimplemented from "+trWriteList(numEntries)+"."; return "Reimplemented from "+trWriteList(numEntries)+".";
} }
virtual QString trReimplementedInList(int numEntries) virtual QCString trReimplementedInList(int numEntries)
{ {
// used in member documentation blocks to produce a list of // used in member documentation blocks to produce a list of
// all member that overwrite the implementation of this member. // all member that overwrite the implementation of this member.
return "Reimplemented in "+trWriteList(numEntries)+"."; return "Reimplemented in "+trWriteList(numEntries)+".";
} }
virtual QString trNamespaceMembers() virtual QCString trNamespaceMembers()
// 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.
{ return "Namespace Members"; } { return "Namespace Members"; }
virtual QString trNamespaceMemberDescription(bool extractAll) virtual QCString trNamespaceMemberDescription(bool extractAll)
// This is an introduction to the page with all namespace members // This is an introduction to the page with all namespace members
{ {
QString result="Here is a list of all "; QCString result="Here is a list of all ";
if (!extractAll) result+="documented "; if (!extractAll) result+="documented ";
result+="namespace members with links to "; result+="namespace members with links to ";
if (extractAll) if (extractAll)
...@@ -542,14 +540,23 @@ class Translator ...@@ -542,14 +540,23 @@ class Translator
result+="the namespaces they belong to:"; result+="the namespaces they belong to:";
return result; return result;
} }
virtual QString trNamespaceIndex() virtual QCString trNamespaceIndex()
// 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.
{ return "Namespace Index"; } { return "Namespace Index"; }
virtual QString trNamespaceDocumentation() virtual QCString trNamespaceDocumentation()
// 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.
{ return "Namespace Documentation"; } { return "Namespace Documentation"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990522
//////////////////////////////////////////////////////////////////////////
// This is used in the documentation before the list of all
// namespaces in a file.
virtual QCString trNamespaces()
{ return "Namespaces"; }
}; };
#endif #endif
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef TRANSLATOR_CZ_H #ifndef TRANSLATOR_CZ_H
#define TRANSLATOR_CZ_H #define TRANSLATOR_CZ_H
#include <qstring.h> #include "translator.h"
// The translation from English to Czech by Vlastimil Havran. // The translation from English to Czech by Vlastimil Havran.
// In the cases where are more translations possible I hope // In the cases where are more translations possible I hope
...@@ -29,247 +29,247 @@ ...@@ -29,247 +29,247 @@
class TranslatorCzech : public Translator class TranslatorCzech : public Translator
{ {
public: public:
QString latexBabelPackage() QCString latexBabelPackage()
{ return "czech"; } { return "czech"; }
QString trInherits() QCString trInherits()
{ return "Dedi"; } { return "Dedi"; }
QString trAnd() QCString trAnd()
{ return "a"; } { return "a"; }
QString trInheritedBy() QCString trInheritedBy()
{ return "Je Potomkem"; } { return "Je Potomkem"; }
QString trRelatedFunctions() QCString trRelatedFunctions()
{ return "Pribuzne Metody"; } { return "Pribuzne Metody"; }
QString trRelatedSubscript() QCString trRelatedSubscript()
{ return "(Tyto funkce nejsou metody.)"; } { return "(Tyto funkce nejsou metody.)"; }
QString trDetailedDescription() QCString trDetailedDescription()
{ return "Podrobna Dokumentace"; } { return "Podrobna Dokumentace"; }
QString trMemberTypedefDocumentation() QCString trMemberTypedefDocumentation()
{ return "Dokumentace pro Deklaraci Typu (typedef) ve Tride";} { return "Dokumentace pro Deklaraci Typu (typedef) ve Tride";}
QString trMemberEnumerationDocumentation() QCString trMemberEnumerationDocumentation()
{ return "Dokumentace Vyctovych Typu"; } { return "Dokumentace Vyctovych Typu"; }
QString trEnumerationValueDocumentation() QCString trEnumerationValueDocumentation()
{ return "Dokumentace Hodnot Vyctovych Typu"; } { return "Dokumentace Hodnot Vyctovych Typu"; }
QString trMemberFunctionDocumentation() QCString trMemberFunctionDocumentation()
{ return "Dokumentace Metod"; } { return "Dokumentace Metod"; }
QString trMemberDataDocumentation() QCString trMemberDataDocumentation()
{ return "Dokumentace Datovych Slozek Tridy"; } { return "Dokumentace Datovych Slozek Tridy"; }
QString trGeneratedFrom(const char *s,bool single) QCString trGeneratedFrom(const char *s,bool single)
{ {
QString result=(QString)"Dokumentace pro tento"+s+ QCString result=(QCString)"Dokumentace pro tento"+s+
" byla generovana z nasledujiciho souboru"; " byla generovana z nasledujiciho souboru";
if (single) result+=":"; else result+="s:"; if (single) result+=":"; else result+="s:";
return result; return result;
} }
QString trMore() QCString trMore()
{ return "Detaily"; } { return "Detaily"; }
QString trReference() QCString trReference()
{ return "Reference"; } { return "Reference"; }
QString trListOfAllMembers() QCString trListOfAllMembers()
{ return "Seznam vsech datovych slozek a metod tridy."; } { return "Seznam vsech datovych slozek a metod tridy."; }
QString trMemberList() QCString trMemberList()
{ return "Seznam datovych polozek a metod tridy"; } { return "Seznam datovych polozek a metod tridy"; }
QString trThisIsTheListOfAllMembers() QCString trThisIsTheListOfAllMembers()
{ return "Toto je uplny seznam datovych slozek a metod tridy pro"; } { return "Toto je uplny seznam datovych slozek a metod tridy pro"; }
QString trIncludingInheritedMembers() QCString trIncludingInheritedMembers()
{ return "zahrnuje vsechny nasledujici zdedene datove slozky a metody."; } { return "zahrnuje vsechny nasledujici zdedene datove slozky a metody."; }
QString trGeneratedAutomatically(const char *s) QCString trGeneratedAutomatically(const char *s)
{ QString result="Automaticky vygenerovany pomoci programu Doxygen"; { QCString result="Automaticky vygenerovany pomoci programu Doxygen";
if (s) result+=(QString)" pro "+s; if (s) result+=(QCString)" pro "+s;
result+=" ze zdrojoveho souboru."; result+=" ze zdrojoveho souboru.";
return result; return result;
} }
QString trEnumName() QCString trEnumName()
{ return "pojmenovani vyctoveho typu"; } { return "pojmenovani vyctoveho typu"; }
QString trEnumValue() QCString trEnumValue()
{ return "hodnota vyctoveho typu"; } { return "hodnota vyctoveho typu"; }
QString trDefinedIn() QCString trDefinedIn()
{ return "definovany v"; } { return "definovany v"; }
QString trIncludeFile() QCString trIncludeFile()
{ return "Vklada soubor"; } { return "Vklada soubor"; }
QString trVerbatimText(const char *f) QCString trVerbatimText(const char *f)
{ return (QString)"Toto je presny text z vlozeneho souboru "+f+""; } { return (QCString)"Toto je presny text z vlozeneho souboru "+f+""; }
QString trModules() QCString trModules()
{ return "Moduly"; } { return "Moduly"; }
QString trClassHierarchy() QCString trClassHierarchy()
{ return "Hierarchie trid"; } { return "Hierarchie trid"; }
QString trCompoundList() QCString trCompoundList()
{ return "Seznam objektovych typu"; } { return "Seznam objektovych typu"; }
QString trFileList() QCString trFileList()
{ return "Seznam souboru"; } { return "Seznam souboru"; }
QString trHeaderFiles() QCString trHeaderFiles()
{ return "Hlavickove soubory"; } { return "Hlavickove soubory"; }
QString trCompoundMembers() QCString trCompoundMembers()
{ return "Datove slozky a metody objektovych typu"; } { return "Datove slozky a metody objektovych typu"; }
QString trFileMembers() QCString trFileMembers()
{ return "Globalni deklarace"; } { return "Globalni deklarace"; }
QString trRelatedPages() QCString trRelatedPages()
{ return "Souvisejici stranky"; } { return "Souvisejici stranky"; }
QString trExamples() QCString trExamples()
{ return "Priklady:"; } { return "Priklady:"; }
QString trSearch() QCString trSearch()
{ return "Hledej"; } { return "Hledej"; }
QString trClassHierarchyDescription() QCString trClassHierarchyDescription()
{ return "Tento seznam dedicnych zavislosti je temer setriden" { return "Tento seznam dedicnych zavislosti je temer setriden"
" podle abecedy:"; " podle abecedy:";
} }
QString trFileListDescription(bool extractAll) QCString trFileListDescription(bool extractAll)
{ {
QString result="A toto je seznam vsech "; QCString result="A toto je seznam vsech ";
if (!extractAll) result+="dokumentovanych "; if (!extractAll) result+="dokumentovanych ";
result+="souboru s kratkymi popisy:"; result+="souboru s kratkymi popisy:";
return result; return result;
} }
QString trCompoundListDescription() QCString trCompoundListDescription()
{ return "Zde jsou tridy, struktury a " { return "Zde jsou tridy, struktury a "
"unie s kratkymi popisy:"; "unie s kratkymi popisy:";
} }
QString trCompoundMembersDescription(bool extractAll) QCString trCompoundMembersDescription(bool extractAll)
{ {
QString result="Zde je seznam vsech "; QCString result="Zde je seznam vsech ";
if (!extractAll) result+="dokumentovanych "; if (!extractAll) result+="dokumentovanych ";
result+="clenu tridy (metod a datovych slozek) s odkazy na "; result+="clenu tridy (metod a datovych slozek) s odkazy na ";
if (extractAll) result+="dokumentaci tridy pro kazdo polozku:"; if (extractAll) result+="dokumentaci tridy pro kazdo polozku:";
else result+="tridy, kam patri:"; else result+="tridy, kam patri:";
return result; return result;
} }
QString trFileMembersDescription(bool extractAll) QCString trFileMembersDescription(bool extractAll)
{ {
QString result="Zde je seznam vsech "; QCString result="Zde je seznam vsech ";
if (!extractAll) result+="zdokumentovanych "; if (!extractAll) result+="zdokumentovanych ";
result+="globalnich deklaraci s odkazy "; result+="globalnich deklaraci s odkazy ";
if (extractAll) result+="na dokumentaci k souboru pro kazdou deklaraci:"; if (extractAll) result+="na dokumentaci k souboru pro kazdou deklaraci:";
else result+="na soubory, kde jsou umisteny:"; else result+="na soubory, kde jsou umisteny:";
return result; return result;
} }
QString trHeaderFilesDescription() QCString trHeaderFilesDescription()
{return "Zde jsou hlavickove soubory ktere tvori programove" {return "Zde jsou hlavickove soubory ktere tvori programove"
" rozhrani aplikace(API):"; " rozhrani aplikace(API):";
} }
QString trExamplesDescription() QCString trExamplesDescription()
{ return "Zde je seznam vsech prikladu:"; } { return "Zde je seznam vsech prikladu:"; }
QString trRelatedPagesDescription() QCString trRelatedPagesDescription()
{ return "Zde je seznam vsech souvisejicich stranek dokumentace:"; } { return "Zde je seznam vsech souvisejicich stranek dokumentace:"; }
QString trModulesDescription() QCString trModulesDescription()
{ return "Zde je seznam vsech modulu:"; } { return "Zde je seznam vsech modulu:"; }
QString trNoDescriptionAvailable() QCString trNoDescriptionAvailable()
{ return "Zadny popis neni k dispozici."; } { return "Zadny popis neni k dispozici."; }
QString trDocumentation() QCString trDocumentation()
{ return "Dokumentace"; } { return "Dokumentace"; }
QString trModuleIndex() QCString trModuleIndex()
{ return "Index modulu"; } { return "Index modulu"; }
QString trHierarchicalIndex() QCString trHierarchicalIndex()
{ return "Index Hierarchie"; } { return "Index Hierarchie"; }
QString trCompoundIndex() QCString trCompoundIndex()
{ return "Index objektovych typu"; } { return "Index objektovych typu"; }
QString trFileIndex() QCString trFileIndex()
{ return "Index souboru"; } { return "Index souboru"; }
QString trModuleDocumentation() QCString trModuleDocumentation()
{ return "Dokumentace modulu"; } { return "Dokumentace modulu"; }
QString trClassDocumentation() QCString trClassDocumentation()
{ return "Dokumentace tridy"; } { return "Dokumentace tridy"; }
QString trFileDocumentation() QCString trFileDocumentation()
{ return "Dokumentace souboru"; } { return "Dokumentace souboru"; }
QString trExampleDocumentation() QCString trExampleDocumentation()
{ return "Dokumentace prikladu"; } { return "Dokumentace prikladu"; }
QString trPageDocumentation() QCString trPageDocumentation()
{ return "Dokumentace stranek"; } { return "Dokumentace stranek"; }
QString trReferenceManual() QCString trReferenceManual()
{ return "Referencni manual"; } { return "Referencni manual"; }
QString trDefines() QCString trDefines()
{ return "Definice"; } { return "Definice"; }
QString trFuncProtos() QCString trFuncProtos()
{ return "Prototypy funkci"; } { return "Prototypy funkci"; }
QString trTypedefs() QCString trTypedefs()
{ return "Deklarace datovych typu(typedefs)"; } { return "Deklarace datovych typu(typedefs)"; }
QString trEnumerations() QCString trEnumerations()
{ return "Vyctove typy (enumerations)"; } { return "Vyctove typy (enumerations)"; }
QString trFunctions() QCString trFunctions()
{ return "Funkce"; } { return "Funkce"; }
QString trVariables() QCString trVariables()
{ return "Promenne"; } { return "Promenne"; }
QString trEnumerationValues() QCString trEnumerationValues()
{ return "Hodnoty vyctovych typu"; } { return "Hodnoty vyctovych typu"; }
QString trReimplementedFrom() QCString trReimplementedFrom()
{ return "Je znovu implementovan z"; } { return "Je znovu implementovan z"; }
QString trReimplementedIn() QCString trReimplementedIn()
{ return "Je znovu implementovan v"; } { return "Je znovu implementovan v"; }
QString trAuthor() QCString trAuthor()
{ return "Autor"; } { return "Autor"; }
QString trDefineDocumentation() QCString trDefineDocumentation()
{ return "Dokumentace definic pomoci maker"; } { return "Dokumentace definic pomoci maker"; }
QString trFunctionPrototypeDocumentation() QCString trFunctionPrototypeDocumentation()
{ return "Dokumentace prototypu funkci"; } { return "Dokumentace prototypu funkci"; }
QString trTypedefDocumentation() QCString trTypedefDocumentation()
{ return "Dokumentace deklaraci datovych typu(typedefs)"; } { return "Dokumentace deklaraci datovych typu(typedefs)"; }
QString trEnumerationTypeDocumentation() QCString trEnumerationTypeDocumentation()
{ return "Dokumentace vyctovych typu"; } { return "Dokumentace vyctovych typu"; }
QString trFunctionDocumentation() QCString trFunctionDocumentation()
{ return "Dokumentace funkci"; } { return "Dokumentace funkci"; }
QString trVariableDocumentation() QCString trVariableDocumentation()
{ return "Dokumentace promennych"; } { return "Dokumentace promennych"; }
QString trCompounds() QCString trCompounds()
{ return "Polozky objektovych typu"; } { return "Polozky objektovych typu"; }
QString trFiles() QCString trFiles()
{ return "Soubory:"; } { return "Soubory:"; }
QString trGeneratedAt(const char *date,const char *projName) QCString trGeneratedAt(const char *date,const char *projName)
{ {
QString result=(QString)"Gegenerovany v "+date; QCString result=(QCString)"Gegenerovany v "+date;
if (projName) result+=(QString)" pro "+projName; if (projName) result+=(QCString)" pro "+projName;
result+=(QString)" "; result+=(QCString)" ";
return result; return result;
} }
QString trWrittenBy() QCString trWrittenBy()
{ {
return "napsany "; return "napsany ";
} }
QString trClassDiagram(const char *clName) QCString trClassDiagram(const char *clName)
{ {
return (QString)"Diagram trid pro "+clName; return (QCString)"Diagram trid pro "+clName;
} }
QString trForInternalUseOnly() QCString trForInternalUseOnly()
{ return "Jen pro interni pouziti."; } { return "Jen pro interni pouziti."; }
QString trReimplementedForInternalReasons() QCString trReimplementedForInternalReasons()
{ {
return "Znovu implementovany z internich duvodu; programove rozhrani" return "Znovu implementovany z internich duvodu; programove rozhrani"
" aplikace(API) neni zmeneno."; " aplikace(API) neni zmeneno.";
} }
QString trWarning() QCString trWarning()
{ return "Upozorneni"; } { return "Upozorneni"; }
QString trBugsAndLimitations() QCString trBugsAndLimitations()
{ return "Chyby a omezeni"; } { return "Chyby a omezeni"; }
QString trVersion() QCString trVersion()
{ return "Verze"; } { return "Verze"; }
QString trDate() QCString trDate()
{ return "Datum"; } { return "Datum"; }
QString trAuthors() QCString trAuthors()
{ return "Autor(i)"; } { return "Autor(i)"; }
QString trReturns() QCString trReturns()
{ return "ma navratovou hodnotu"; } { return "ma navratovou hodnotu"; }
QString trSeeAlso() QCString trSeeAlso()
{ return "Podivej se take na"; } { return "Podivej se take na"; }
QString trParameters() QCString trParameters()
{ return "Parametry"; } { return "Parametry"; }
QString trExceptions() QCString trExceptions()
{ return "Vyjimky"; } { return "Vyjimky"; }
QString trGeneratedBy() QCString trGeneratedBy()
{ return "Gegenerovan podle"; } { return "Gegenerovan podle"; }
// new since 0.49-990307 // new since 0.49-990307
QString trNamespaces() QCString trNamespaces()
{ return "Prostory jmen"; } { return "Prostory jmen"; }
QString trNamespaceList() QCString trNamespaceList()
{ return "Seznam prostoru jmen"; } { return "Seznam prostoru jmen"; }
QString trNamespaceListDescription(bool extractAll) QCString trNamespaceListDescription(bool extractAll)
{ {
QString result="Zde jsou vsechny "; QCString result="Zde jsou vsechny ";
if (!extractAll) result+="dokumentovane "; if (!extractAll) result+="dokumentovane ";
result+="prostory jem s kratkymi popisy:"; result+="prostory jem s kratkymi popisy:";
return result; return result;
} }
QString trFriends() QCString trFriends()
{ return "Spratelene tridy, funkce a metody"; } { return "Spratelene tridy, funkce a metody"; }
}; };
......
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
* The translation into German was provided by
* Jens Breitenstein (Jens.Breitenstein@tlc.de)
*/
#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H
#include "translator.h"
class TranslatorGerman : public Translator
{
public:
//--------------------------------------------------------------------
// NOTICE:
// the following functions are now obsolete: these are no longer used and
// will disappear in future versions. You do not have to translate them!
QCString trInherits()
{ return "Abgeleitet von "; }
QCString trAnd()
{ return "und"; }
QCString trInheritedBy()
{ return "Basisklasse f&uuml;r"; }
QCString trReference()
{ return "Verweis"; }
QCString trReimplementedFrom()
{ return "Implementiert von"; }
QCString trReimplementedIn()
{ return "erneute Implementation in"; }
QCString trIncludeFile()
{ return "Include-Datei"; }
QCString trNamespaces()
{ return "Namensbereiche"; }
// end of obsolete functions
//--------------------------------------------------------------------
QCString latexBabelPackage()
// returns the name of the package that is included by LaTeX
{ return "deutsch"; }
QCString trRelatedFunctions()
// used in the compound documentation before a list of related functions.
{ return "Verwandte Funktionen"; }
QCString trRelatedSubscript()
// subscript for the related functions.
{ return "(Es handelt sich hierbei nicht um Elementfunktionen.)"; }
QCString trDetailedDescription()
// header that is put before the detailed description of files, classes and namespaces.
{ return "Ausf&uuml;hrliche Beschreibung"; }
QCString trMemberTypedefDocumentation()
// header that is put before the list of typedefs.
{ return "Dokumentation der benutzerdefinierten Datentypen"; }
QCString trMemberEnumerationDocumentation()
// header that is put before the list of enumerations.
{ return "Dokumentation der Aufz&auml;hlungstypen"; }
QCString trMemberFunctionDocumentation()
// header that is put before the list of member functions.
{ return "Dokumentation der Elementfunktionen"; }
QCString trMemberDataDocumentation()
// header that is put before the list of member attributes.
{ return "Dokumentation der Datenelemente"; }
QCString trGeneratedFrom(const char *s,bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
QCString result=(QCString)"Die Dokumentation f&uuml;r diese"+s+
" wurde aus ";
if (single)
result+="folgender Datei erzeugt:";
else
result+="folgenden Dateien erzeugt:";
return result;
}
QCString trMore()
// this is the text of a link put after brief descriptions.
{ return "Mehr..."; }
QCString trListOfAllMembers()
// put in the class documentation
{ return "Aufstellung aller Elemente"; }
QCString trMemberList()
// used as the title of the "list of all members" page of a class
{ return "Elementverzeichnis"; }
QCString trThisIsTheListOfAllMembers()
// this is the first part of a sentence that is followed by a class name
{ return "Vollst&auml;ndige Aufstellung aller Elemente f&uuml;r"; }
QCString trIncludingInheritedMembers()
// this is the remainder of the sentence after the class name
{ return "einschlie&suml;lich aller geerbten Elemente."; }
QCString trGeneratedAutomatically(const char *s)
// this is put at the author sections at the bottom of man pages.
// parameter s is name of the project name.
{ QCString result="Automatisch erzeugt von Doxygen";
if (s) result+=(QCString)" f&uuml;r "+s;
result+=" aus dem Quellcode.";
return result;
}
QCString trEnumName()
// put after an enum name in the list of all members
{ return "enum Bezeichner"; }
QCString trEnumValue()
// put after an enum value in the list of all members
{ return "enum Wert"; }
QCString trDefinedIn()
// put after an undocumented member in the list of all members
{ return "Definiert in"; }
QCString trVerbatimText(const char *f)
// put as in introduction in the verbatim header file of a class.
// parameter f is the name of the include file.
{ return (QCString)"Dieses ist der unver&auml;nderte Text aus der "
"Include-Datei "+f+"."; }
// quick reference sections
QCString trModules()
// This is put above each page as a link to the list of all groups of
// compounds or files (see the \group command).
{ return "Module"; }
QCString trClassHierarchy()
// This is put above each page as a link to the class hierarchy
{ return "Klassenhierarchie"; }
QCString trCompoundList()
// This is put above each page as a link to the list of annotated classes
{ return "&Uuml;bersicht"; }
QCString trFileList()
// This is put above each page as a link to the list of documented files
{ return "Auflistung der Dateien"; }
QCString trHeaderFiles()
// This is put above each page as a link to the list of all verbatim headers
{ return "Auflistung der Header-Dateien"; }
QCString trCompoundMembers()
// This is put above each page as a link to all members of compounds.
{ return "Element&uuml;bersicht"; }
QCString trFileMembers()
// This is put above each page as a link to all members of files.
{ return "Datei-Elemente"; }
QCString trRelatedPages()
// This is put above each page as a link to all related pages.
{ return "Zus&auml;tzliche Informationen"; }
QCString trExamples()
// This is put above each page as a link to all examples.
{ return "Beispiele"; }
QCString trSearch()
// This is put above each page as a link to the search engine.
{ return "Suchen"; }
QCString trClassHierarchyDescription()
// This is an introduction to the class hierarchy.
{ return "Die Liste der Ableitungen ist -mit Einschr&auml;nkungen- "
"alphabetisch sortiert:";
}
QCString trFileListDescription(bool extractAll)
// This is an introduction to the list with all files.
{
QCString result="Hier folgt die Aufz&auml;hlung aller ";
if (!extractAll) result+="dokumentierten ";
result+="Dateien mit einer Kurzbeschreibung:";
return result;
}
QCString trCompoundListDescription()
// This is an introduction to the annotated compound list
{ return "Hier folgt die Aufz&auml;hlung aller Klassen, Strukturen "
"und Varianten mit einer Kurzbeschreibung:";
}
QCString trCompoundMembersDescription(bool extractAll)
// This is an introduction to the page with all class members
{
QCString result="Hier folgt die Aufz&auml;hlung aller ";
if (!extractAll) result+="dokumentierten ";
result+="Klassenelemente mit Verweisen auf ";
if (extractAll) result+="die Klassendokumentation zu jedem Element:";
else result+="die zugeh&ouml;rigen Klassen:";
return result;
}
QCString trFileMembersDescription(bool extractAll)
// This is an introduction to the page with all file members
{
QCString result="Hier folgt die Aufz&auml;hlung aller ";
if (!extractAll) result+="dokumentierter ";
result+="Dateielemente mit Verweisen auf ";
if (extractAll) result+="die Dateidokumentation zu jedem Element:";
else result+="die zugeh&ouml;rigen Dateien:";
return result;
}
QCString trHeaderFilesDescription()
// This is an introduction to the page with the list of all header files
{ return "Hier folgen die Headerdateien, welche die API definieren:"; }
QCString trExamplesDescription()
// This is an introduction to the page with the list of all examples
{ return "Hier folgt eine Liste mit allen Beispielen:"; }
QCString trRelatedPagesDescription()
// This is an introduction to the page with the list of related pages
{ return "Hier folgt eine Liste mit zusammengeh&ouml;rigen Themengebieten:"; }
QCString trModulesDescription()
// This is an introduction to the page with the list of class/file groups
{ return "Hier folgt die Aufz&auml;hlung aller Module:"; }
QCString trNoDescriptionAvailable()
// This sentences is used in the annotated class/file lists if no brief
// description is given.
{ return "Keine Beschreibung verf&uuml;gbar"; }
// index titles (the project name is prepended for these)
QCString trDocumentation()
// This is used in HTML as the title of index.html.
{ return "Dokumentation"; }
QCString trModuleIndex()
// This is used in LaTeX as the title of the chapter with the
// index of all groups.
{ return "Modul-Verzeichnis"; }
QCString trHierarchicalIndex()
// This is used in LaTeX as the title of the chapter with the
// class hierarchy.
{ return "Hierarchie-Verzeichnis"; }
QCString trCompoundIndex()
// This is used in LaTeX as the title of the chapter with the
// annotated compound index
{ return "Compound-Verzeichnis"; }
QCString trFileIndex()
// This is used in LaTeX as the title of the chapter with the
// list of all files.
{ return "Datei-Verzeichnis"; }
QCString trModuleDocumentation()
// This is used in LaTeX as the title of the chapter containing
// the documentation of all groups.
{ return "Modul-Dokumentation"; }
QCString trClassDocumentation()
// This is used in LaTeX as the title of the chapter containing
// the documentation of all classes, structs and unions.
{ return "Klassen-Dokumentation"; }
QCString trFileDocumentation()
// This is used in LaTeX as the title of the chapter containing
// the documentation of all files.
{ return "Datei-Dokumentation"; }
QCString trExampleDocumentation()
// This is used in LaTeX as the title of the chapter containing
// the documentation of all examples.
{ return "Dokumentation der Beispiele"; }
QCString trPageDocumentation()
// This is used in LaTeX as the title of the chapter containing
// the documentation of all related pages.
{ return "Seitenbeschreibung"; }
QCString trReferenceManual()
// This is used in LaTeX as the title of the document
{ return "Nachschlagewerk"; }
QCString trDefines()
// This is used in the documentation of a file as a header before the
// list of defines
{ return "Makrodefinitionen"; }
QCString trFuncProtos()
// This is used in the documentation of a file as a header before the
// list of function prototypes
{ return "Funktionsprototypen"; }
QCString trTypedefs()
// This is used in the documentation of a file as a header before the
// list of typedefs
{ return "Typendefinitionen"; }
QCString trEnumerations()
// This is used in the documentation of a file as a header before the
// list of enumerations
{ return "Aufz&auml;hlungen"; }
QCString trFunctions()
// This is used in the documentation of a file as a header before the
// list of (global) functions
{ return "Funktionen"; }
QCString trVariables()
// This is used in the documentation of a file as a header before the
// list of (global) variables
{ return "Variablen"; }
QCString trEnumerationValues()
// This is used in the documentation of a file as a header before the
// list of (global) variables
{ return "Aufz&auml;hlungswerte"; }
QCString trAuthor()
// This is used in man pages as the author section.
{ return "Autor"; }
QCString trDefineDocumentation()
// This is used in the documentation of a file before the list of
// documentation blocks for defines
{ return "Makro-Dokumentation"; }
QCString trFunctionPrototypeDocumentation()
// This is used in the documentation of a file/namespace before the list
// of documentation blocks for function prototypes
{ return "Funktionsprototypen Dokumentation"; }
QCString trTypedefDocumentation()
// This is used in the documentation of a file/namespace before the list
// of documentation blocks for typedefs
{ return "Dokumentation der benutzerdefinerten Typen"; }
QCString trEnumerationTypeDocumentation()
// This is used in the documentation of a file/namespace before the list
// of documentation blocks for enumeration types
{ return "Dokumentation der Aufz&auml;hlungstypen"; }
QCString trEnumerationValueDocumentation()
// This is used in the documentation of a file/namespace before the list
// of documentation blocks for enumeration values
{ return "Dokumentation des Wertebereiches der Aufz&auml;hlungstypen"; }
QCString trFunctionDocumentation()
// This is used in the documentation of a file/namespace before the list
// of documentation blocks for functions
{ return "Dokumentation der Funktionen"; }
QCString trVariableDocumentation()
// This is used in the documentation of a file/namespace before the list
// of documentation blocks for variables
{ return "Variablen-Dokumentation"; }
QCString trCompounds()
// This is used in the documentation of a file/namespace/group before
// the list of links to documented compounds
{ return "&Uuml;bersicht"; }
QCString trFiles()
// This is used in the documentation of a group before the list of
// links to documented files
{ return "Dateien"; }
QCString trGeneratedAt(const char *date,const char *projName)
{
QCString result=(QCString)"Erzeugt am "+date;
if (projName) result+=(QCString)" f&uuml;r "+projName;
result+=(QCString)" von";
return result;
}
QCString trWrittenBy()
{
return "geschrieben von";
}
QCString trClassDiagram(const char *clName)
// this text is put before a class diagram
{
return (QCString)"Klassendiagramm f&uuml;r "+clName;
}
QCString trForInternalUseOnly()
// this text is generated when the \internal command is used.
{ return "Nur f&uuml;r den internen Gebrauch."; }
QCString trReimplementedForInternalReasons()
// this text is generated when the \reimp command is used.
{ return "Aufgrund interner Gr&uuml;nde neu implementiert; "
"Das API wird davon nicht ber&uuml;hrt.";
}
QCString trWarning()
// this text is generated when the \warning command is used.
{ return "Warnung"; }
QCString trBugsAndLimitations()
// this text is generated when the \bug command is used.
{ return "Fehler und Einschr&auml;nkungen"; }
QCString trVersion()
// this text is generated when the \version command is used.
{ return "Version"; }
QCString trDate()
// this text is generated when the \date command is used.
{ return "Datum"; }
QCString trAuthors()
// this text is generated when the \author command is used.
{ return "Autor(en)"; }
QCString trReturns()
// this text is generated when the \return command is used.
{ return "R&uuml;ckgabe"; }
QCString trSeeAlso()
// this text is generated when the \sa command is used.
{ return "Siehe auch"; }
QCString trParameters()
// this text is generated when the \param command is used.
{ return "Parameter"; }
QCString trExceptions()
// this text is generated when the \exception command is used.
{ return "Ausnahmebehandlung"; }
QCString trGeneratedBy()
// this text is used in the title page of a LaTeX document.
{ return "Erzeugt von"; }
// new since 0.49-990307
QCString trNamespaceList()
// used as the title of page containing all the index of all namespaces.
{ return ""; }
QCString trNamespaceListDescription(bool extractAll)
// used as an introduction to the namespace list
{
QCString result="Lister aller ";
if (!extractAll) result+="dokumentierter ";
result+="Namensbereiche mit Kurzbeschreibung:";
return result;
}
QCString trFriends()
// used in the class documentation as a header before the list of all
// friends of a class
{ return "Freundbeziehungen"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
QCString trRelatedFunctionDocumentation()
// used in the class documentation as a header before the list of all
// related classes
{ return "Freundbeziehungen und Funktionsdokumentation"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType)
// used as the title of the HTML page of a class/struct/union
{
QCString result=(QCString)clName+" ";
switch(compType)
{
case ClassDef::Class: result+=" Klassen"; break;
case ClassDef::Struct: result+=" Strukturen"; break;
case ClassDef::Union: result+=" Varianten"; break;
}
result+="referenz";
return result;
}
QCString trFileReference(const char *fileName)
// used as the title of the HTML page of a file
{
QCString result=fileName;
result+=" Dateireferenz";
return result;
}
QCString trNamespaceReference(const char *namespaceName)
// used as the title of the HTML page of a namespace
{
QCString result=namespaceName;
result+=" Namensbereichsreferenz";
return result;
}
// these are for the member sections of a class, struct or union
QCString trPublicMembers()
{ return "&Ouml;ffentliche Datenelemente"; }
QCString trPublicSlots()
{ return "&Ouml;ffentliche Slots"; }
QCString trSignals()
{ return "Signale"; }
QCString trStaticPublicMembers()
{ return "&Ouml;ffentliche, statische Datenelemente"; }
QCString trProtectedMembers()
{ return "Gesch&uuml;tzte Datenelemente"; }
QCString trProtectedSlots()
{ return "Gesch&uuml;tzte Slots"; }
QCString trStaticProtectedMembers()
{ return "Gesch&uuml;tzte, statische Datenelemente"; }
QCString trPrivateMembers()
{ return "Private Datenelemente"; }
QCString trPrivateSlots()
{ return "Private Slots"; }
QCString trStaticPrivateMembers()
{ return "Private, statische Datenelemente"; }
// end of member sections
QCString trWriteList(int numEntries)
{
// this function is used to produce a comma-separated list of items.
// use generateMarker(i) to indicate where item i should be put.
QCString result;
int i;
// the inherits list contain `numEntries' classes
for (i=0;i<numEntries;i++)
{
// use generateMarker to generate placeholders for the class links!
result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
if (i!=numEntries-1) // not the last entry, so we need a separator
{
if (i<numEntries-2) // not the fore last entry
result+=", ";
else // the fore last entry
result+=", und ";
}
}
return result;
}
QCString trInheritsList(int numEntries)
// used in class documentation to produce a list of base classes,
// if class diagrams are disabled.
{
return "Abgeleitet von "+trWriteList(numEntries)+".";
}
QCString trInheritedByList(int numEntries)
// used in class documentation to produce a list of super classes,
// if class diagrams are disabled.
{
return "Basisklasse f&uuml;r "+trWriteList(numEntries)+".";
}
QCString trReimplementedFromList(int numEntries)
// used in member documentation blocks to produce a list of
// members that are hidden by this one.
{
return "Implementiert von "+trWriteList(numEntries)+".";
}
QCString trReimplementedInList(int numEntries)
{
// used in member documentation blocks to produce a list of
// all member that overwrite the implementation of this member.
return "Erneute Implementation in "+trWriteList(numEntries)+".";
}
QCString trNamespaceMembers()
// This is put above each page as a link to all members of namespaces.
{ return "Elemente eines Namensbereiches"; }
QCString trNamespaceMemberDescription(bool extractAll)
// This is an introduction to the page with all namespace members
{
QCString result="Hier folgt die Aufz&auml;hlung aller ";
if (!extractAll) result+="dokumentierter ";
result+="Namensbereichselemente mit Verweisen auf ";
if (extractAll)
result+="die Namensbereichsdokumentation f&uuml;r jedes Element:";
else
result+="die zugeh&ouml;rigen Dateien:";
return result;
}
QCString trNamespaceIndex()
// This is used in LaTeX as the title of the chapter with the
// index of all namespaces.
{ return "Verzeichnis der Namensbereiche"; }
QCString trNamespaceDocumentation()
// This is used in LaTeX as the title of the chapter containing
// the documentation of all namespaces.
{ return "Dokumentation der Namensbereiche"; }
};
#endif
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
/**
* translator_es.h modifief by Francisco Oltra
* Some notes:
* - Computer related use of the spanish language differs from
* country to country, so some words might not sound so good
* to some people (but it does to me, *grin* ). A good example
* is the spanish for File: i use "Archivo", others may prefer
* "Fichero".
* - Some words were not translated for understandability, since
* we are talking about a computer program here!
* - Some of the functions are called in some order coherent with
* the english grammar, this results in some ugly constructs.
*/
#ifndef TRANSLATOR_ES_H
#define TRANSLATOR_ES_H
#include "translator.h"
class TranslatorSpanish : public Translator
{
public:
QCString latexBabelPackage()
{ return "spanish"; }
QCString trRelatedFunctions()
{ return "Funciones Relacionadas"; }
QCString trRelatedSubscript()
{ return "(Note que estos no son funciones miembro.)"; }
QCString trDetailedDescription()
{ return "Descripcin Detallada"; }
QCString trMemberTypedefDocumentation()
{ return "Documentacin de Miembros Typedef"; }
QCString trMemberEnumerationDocumentation()
{ return "Documentacin de Miembros de Enumeracin"; }
QCString trEnumerationValueDocumentation()
{ return "Documentacin de los Valores de Enumeracin"; }
QCString trMemberFunctionDocumentation()
{ return "Documentacin de Funciones Miembro"; }
QCString trMemberDataDocumentation()
{ return "Documentacin de Datos Miembro"; }
QCString trGeneratedFrom(const char *s,bool single)
{
QCString result=(QCString)"La documentacin para esta"+s+
" fue generada del siguiente archivo";
if (single) result+=":"; else result+="s:";
return result;
}
QCString trMore()
{ return "Ms..."; }
QCString trListOfAllMembers()
{ return "Lista de todos los miembros."; }
QCString trMemberList()
{ return "Lista de Miembros"; }
QCString trThisIsTheListOfAllMembers()
{ return "Esta es la lista completa de miembros para "; }
QCString trIncludingInheritedMembers()
{ return ", incluyendo todos los miembros heredados."; }
QCString trGeneratedAutomatically(const char *s)
{ QCString result="Generado automticamente por Doxygen";
if (s) result+=(QCString)" para "+s;
result+=" desde el cdigo fuente.";
return result;
}
QCString trEnumName()
{ return "nombre de enum"; }
QCString trEnumValue()
{ return "valor de enum"; }
QCString trDefinedIn()
{ return "definido en"; }
QCString trVerbatimText(const char *f)
{ return (QCString)"Esto es texto verbatim del archivo includo "+f+"."; }
QCString trModules()
{ return "Modulos"; }
QCString trClassHierarchy()
{ return "Jerarqua de la clase"; }
QCString trCompoundList()
{ return "Lista de Tipos Compuestos"; }
QCString trFileList()
{ return "Lista de Archivos"; }
QCString trHeaderFiles()
{ return "Archivos de Cabecera"; }
QCString trCompoundMembers()
{ return "Miembros de Compuestos"; }
QCString trFileMembers()
{ return "Miembros de los Archivos"; }
QCString trRelatedPages()
{ return "Pginas Relacionadas"; }
QCString trExamples()
{ return "Ejemplos"; }
QCString trSearch()
{ return "Buscar"; }
QCString trClassHierarchyDescription()
{ return "Esta lista de herencia est ordenada alfabticamente, "
"pero no completamente:";
}
QCString trFileListDescription(bool extractAll)
{
QCString result="Esta es una lista de todos ";
result+="los archivos ";
if (!extractAll) result+="documentados ";
result+="con breves descripciones:";
return result;
}
QCString trCompoundListDescription()
{ return "Aqu estan las clases, estructuras y "
"uniones con descripciones breves:";
}
QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Esta es una lista de todos ";
result+="miembros de clases ";
if (!extractAll) result+="documentados ";
result+="con enlaces a ";
if (extractAll) result+="la documentacin de clase para cada miembro:";
else result+="las clases a que pertenecen:";
return result;
}
QCString trFileMembersDescription(bool extractAll)
{
QCString result="Esta es una lista de todos los miembros de los archivos ";
if (!extractAll) result+="documentados ";
result+="con enlaces a ";
if (extractAll) result+="la documentacin de archivo para cada miembro:";
else result+="los archivos a que pertenecen:";
return result;
}
QCString trHeaderFilesDescription()
{ return "Aqu estan los archivos de cabecera que forman el API:"; }
QCString trExamplesDescription()
{ return "Esta es la lista de todos los ejemplos:"; }
QCString trRelatedPagesDescription()
{ return "Esta es una lista de todos las pginas con documentacin relacionada:"; }
QCString trModulesDescription()
{ return "Esta es una lista con todos los modulos:"; }
QCString trNoDescriptionAvailable()
{ return "No existe descripcin disponible"; }
QCString trDocumentation()
{ return "Documentacin"; }
QCString trModuleIndex()
{ return "ndice de Modulos"; }
QCString trHierarchicalIndex()
{ return "ndice Jerrquico"; }
QCString trCompoundIndex()
{ return "ndice de Tipos Compuestos"; }
QCString trFileIndex()
{ return "ndice de Archivos"; }
QCString trModuleDocumentation()
{ return "Documentacin de los Modulos"; }
QCString trClassDocumentation()
{ return "Documentacin de las clases"; }
QCString trFileDocumentation()
{ return "Documentacin de los Archivos"; }
QCString trExampleDocumentation()
{ return "Documentacin de los Ejemplos"; }
QCString trPageDocumentation()
{ return "Documentacin de las Pginas Relacionadas"; }
QCString trReferenceManual()
{ return "Manual de Referencia"; }
QCString trDefines()
{ return "Definiciones"; }
QCString trFuncProtos()
{ return "Prototipo de Funciones"; }
QCString trTypedefs()
{ return "Typedefs"; }
QCString trEnumerations()
{ return "Enumeraciones"; }
QCString trFunctions()
{ return "Funciones"; }
QCString trVariables()
{ return "Variables"; }
QCString trEnumerationValues()
{ return "Valores de Enumeraciones"; }
QCString trAuthor()
{ return "Autor"; }
QCString trDefineDocumentation()
{ return "Documentacin de las Definiciones"; }
QCString trFunctionPrototypeDocumentation()
{ return "Documentacin de los Prototipos de Funciones"; }
QCString trTypedefDocumentation()
{ return "Documentacin de Typedefs"; }
QCString trEnumerationTypeDocumentation()
{ return "Documentacin de Enumeracin de tipos"; }
QCString trFunctionDocumentation()
{ return "Documentacin de Funciones"; }
QCString trVariableDocumentation()
{ return "Documentacin de Variables"; }
QCString trCompounds()
{ return "Tipos Compuestos"; }
QCString trFiles()
{ return "Archivos"; }
QCString trGeneratedAt(const char *date,const char *projName)
{
QCString result=(QCString)"Generado el "+date;
if (projName) result+=(QCString)" para "+projName;
result+=(QCString)" por";
return result;
}
QCString trWrittenBy()
{
return "escrito por";
}
QCString trClassDiagram(const char *clName)
{
return (QCString)"Diagrama de clases para "+clName;
}
QCString trForInternalUseOnly()
{ return "Para uso interno solamente."; }
QCString trReimplementedForInternalReasons()
{ return "Reimplementado por razones internas; el API no se ve afectado.";
}
QCString trWarning()
{ return "Atencin"; }
QCString trBugsAndLimitations()
{ return "Bugs y Limitaciones"; }
QCString trVersion()
{ return "Versin"; }
QCString trDate()
{ return "Fecha"; }
QCString trAuthors()
{ return "Autor(es)"; }
QCString trReturns()
{ return "Devuelve"; }
QCString trSeeAlso()
{ return "Ver tambin"; }
QCString trParameters()
{ return "Parmetros"; }
QCString trExceptions()
{ return "Excepciones"; }
QCString trGeneratedBy()
{ return "Generado por"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990307
//////////////////////////////////////////////////////////////////////////
QCString trNamespaceList()
{ return "Lista de Namespaces"; }
QCString trNamespaceListDescription(bool extractAll)
{
QCString result="Esta es una lista de los namespaces ";
if (!extractAll) result+="documentados ";
result+="con descripciones breves:";
return result;
}
QCString trFriends()
{ return "Clases Amigas"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
QCString trRelatedFunctionDocumentation()
{ return "Documentacin de Clases Amigas y Funciones Relacionadas"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType)
// used as the title of the HTML page of a class/struct/union
{
QCString result=(QCString)clName+" ";
switch(compType)
{
case ClassDef::Class: result+=" Clase"; break;
case ClassDef::Struct: result+=" Estructura"; break;
case ClassDef::Union: result+=" Unin"; break;
}
result+=" Referencia";
return result;
}
virtual QCString trFileReference(const char *fileName)
// used as the title of the HTML page of a file
{
QCString result=fileName;
result+=" Referencia de Archivos";
return result;
}
virtual QCString trNamespaceReference(const char *namespaceName)
// used as the title of the HTML page of a namespace
{
QCString result=namespaceName;
result+=" Referencia de Namespace";
return result;
}
// these are for the member sections of a class, struct or union
virtual QCString trPublicMembers()
{ return "Miembros Pblicos"; }
virtual QCString trPublicSlots()
{ return "Slots Pblicos"; }
virtual QCString trSignals()
{ return "Seales"; }
virtual QCString trStaticPublicMembers()
{ return "Miembros Estticos Pblicos"; }
virtual QCString trProtectedMembers()
{ return "Miembros Protegidos"; }
virtual QCString trProtectedSlots()
{ return "Slots Protegidos"; }
virtual QCString trStaticProtectedMembers()
{ return "Miembros Protegidos Estticos"; }
virtual QCString trPrivateMembers()
{ return "Miembros Privados"; }
virtual QCString trPrivateSlots()
{ return "Slots Privados"; }
virtual QCString trStaticPrivateMembers()
{ return "Miembros Estticos Privados"; }
// end of member sections
virtual QCString trWriteList(int numEntries)
{
// this function is used to produce a comma-separated list of items.
// use generateMarker(i) to indicate where item i should be put.
QCString result;
int i;
// the inherits list contain `numEntries' classes
for (i=0;i<numEntries;i++)
{
// use generateMarker to generate placeholders for the class links!
result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
if (i!=numEntries-1) // not the last entry, so we need a separator
{
if (i<numEntries-2) // not the fore last entry
result+=", ";
else // the fore last entry
result+=" y ";
}
}
return result;
}
virtual QCString trInheritsList(int numEntries)
// used in class documentation to produce a list of base classes,
// if class diagrams are disabled.
{
return "Hereda a "+trWriteList(numEntries)+".";
}
virtual QCString trInheritedByList(int numEntries)
// used in class documentation to produce a list of super classes,
// if class diagrams are disabled.
{
return "Heredado por "+trWriteList(numEntries)+".";
}
virtual QCString trReimplementedFromList(int numEntries)
// used in member documentation blocks to produce a list of
// members that are hidden by this one.
{
return "Reimplementado por "+trWriteList(numEntries)+".";
}
virtual QCString trReimplementedInList(int numEntries)
{
// used in member documentation blocks to produce a list of
// all member that overwrite the implementation of this member.
return "Reimplementado en "+trWriteList(numEntries)+".";
}
virtual QCString trNamespaceMembers()
// This is put above each page as a link to all members of namespaces.
{ return "Miembros del Namespace"; }
virtual QCString trNamespaceMemberDescription(bool extractAll)
// This is an introduction to the page with all namespace members
{
QCString result="Esta es una lista de todos los miembros de namespace ";
if (!extractAll) result+="documentados ";
result+="con enlaces a ";
if (extractAll)
result+="a la documentacin de namespaces para cada miembro:";
else
result+="los namespaces a los que pertenecen:";
return result;
}
virtual QCString trNamespaceIndex()
// This is used in LaTeX as the title of the chapter with the
// index of all namespaces.
{ return "ndice de Namespaces"; }
virtual QCString trNamespaceDocumentation()
// This is used in LaTeX as the title of the chapter containing
// the documentation of all namespaces.
{ return "Documentacin de Namespaces"; }
};
#endif
...@@ -12,122 +12,124 @@ ...@@ -12,122 +12,124 @@
* *
* All output generated with Doxygen is not covered by this license. * All output generated with Doxygen is not covered by this license.
* *
* The translation into French was provided by
* Christophe Bordeux (bordeux@lig.di.epfl.ch)
*/ */
#ifndef TRANSLATOR_FR_H #ifndef TRANSLATOR_FR_H
#define TRANSLATOR_FR_H #define TRANSLATOR_FR_H
#include <qstring.h> #include "translator.h"
class TranslatorFrench : public Translator class TranslatorFrench : public Translator
{ {
public: public:
QString latexBabelPackage() QCString latexBabelPackage()
{ return "french"; } { return "french"; }
QString trInherits() QCString trInherits()
{ return "Hérite de"; } { return "Hérite de"; }
QString trAnd() QCString trAnd()
{ return "et"; } { return "et"; }
QString trInheritedBy() QCString trInheritedBy()
{ return "Dérivée par"; } { return "Dérivée par"; }
QString trRelatedFunctions() QCString trRelatedFunctions()
{ return "Fonctions associées"; } { return "Fonctions associées"; }
QString trRelatedSubscript() QCString trRelatedSubscript()
{ return "(Noter que ces fonctions ne sont pas des méthodes de la classe)"; } { return "(Noter que ces fonctions ne sont pas des méthodes de la classe)"; }
QString trDetailedDescription() QCString trDetailedDescription()
{ return "Description détaillée"; } { return "Description détaillée"; }
QString trMemberTypedefDocumentation() QCString trMemberTypedefDocumentation()
{ return "Documentation des types imbriqués"; } { return "Documentation des types imbriqués"; }
QString trMemberEnumerationDocumentation() QCString trMemberEnumerationDocumentation()
{ return "Documentation des énumérations imbriqués"; } { return "Documentation des énumérations imbriqués"; }
QString trMemberFunctionDocumentation() QCString trMemberFunctionDocumentation()
{ return "Documentation des méthodes"; } { return "Documentation des méthodes"; }
QString trMemberDataDocumentation() QCString trMemberDataDocumentation()
{ return "Documentation des données imbriqués"; } { return "Documentation des données imbriqués"; }
QString trGeneratedFrom(const char *s,bool single) QCString trGeneratedFrom(const char *s,bool single)
{ {
QString result=(QString)"La documentation pour cette"+s+ QCString result=(QCString)"La documentation pour cette"+s+
" a été générée à partir "; " a été générée à partir ";
if (single) result+="du fichier suivant:"; if (single) result+="du fichier suivant:";
else result+="des fichiers suivants:"; else result+="des fichiers suivants:";
return result; return result;
} }
QString trMore() QCString trMore()
{ return "Plus de détails..."; } { return "Plus de détails..."; }
QString trReference() QCString trReference()
{ return "Référence"; } { return "Référence"; }
QString trListOfAllMembers() QCString trListOfAllMembers()
{ return "Liste de tous les membres"; } { return "Liste de tous les membres"; }
QString trMemberList() QCString trMemberList()
{ return "Liste des membres"; } { return "Liste des membres"; }
QString trThisIsTheListOfAllMembers() QCString trThisIsTheListOfAllMembers()
{ return "Ceci est la liste complète des membres de"; } { return "Ceci est la liste complète des membres de"; }
QString trIncludingInheritedMembers() QCString trIncludingInheritedMembers()
{ return "y compris des membres des classes héritées."; } { return "y compris des membres des classes héritées."; }
QString trGeneratedAutomatically(const char *s) QCString trGeneratedAutomatically(const char *s)
{ QString result="Généré automatiquement par Doxygen"; { QCString result="Généré automatiquement par Doxygen";
if (s) result+=(QString)" pour "+s; if (s) result+=(QCString)" pour "+s;
result+=" à partir du code source."; result+=" à partir du code source.";
return result; return result;
} }
QString trEnumName() QCString trEnumName()
{ return "énumération"; } { return "énumération"; }
QString trEnumValue() QCString trEnumValue()
{ return "élément d'une énumération"; } { return "élément d'une énumération"; }
QString trDefinedIn() QCString trDefinedIn()
{ return "défini dans"; } { return "défini dans"; }
QString trIncludeFile() QCString trIncludeFile()
{ return "Fichier inclu"; } { return "Fichier inclu"; }
QString trVerbatimText(const char *f) QCString trVerbatimText(const char *f)
{ return (QString)"Ce texte provient du fichier inclu "+f+"."; } { return (QCString)"Ce texte provient du fichier inclu "+f+"."; }
QString trModules() QCString trModules()
{ return "Modules"; } { return "Modules"; }
QString trClassHierarchy() QCString trClassHierarchy()
{ return "Hiérarchie des classes"; } { return "Hiérarchie des classes"; }
QString trCompoundList() QCString trCompoundList()
{ return "Liste des composants"; } { return "Liste des composants"; }
QString trFileList() QCString trFileList()
{ return "Liste des fichiers"; } { return "Liste des fichiers"; }
QString trHeaderFiles() QCString trHeaderFiles()
{ return "Fichiers d'entête"; } { return "Fichiers d'entête"; }
QString trCompoundMembers() QCString trCompoundMembers()
{ return "Composants"; } { return "Composants"; }
QString trFileMembers() QCString trFileMembers()
{ return "Déclarations"; } { return "Déclarations"; }
QString trRelatedPages() QCString trRelatedPages()
{ return "Pages associées"; } { return "Pages associées"; }
QString trExamples() QCString trExamples()
{ return "Exemples"; } { return "Exemples"; }
QString trSearch() QCString trSearch()
{ return "Recherche"; } { return "Recherche"; }
QString trClassHierarchyDescription() QCString trClassHierarchyDescription()
{ return "Cette liste d'héritage est, autant que possible, " { return "Cette liste d'héritage est, autant que possible, "
"classée par ordre alphabétique"; } "classée par ordre alphabétique"; }
QString trFileListDescription(bool extractAll) QCString trFileListDescription(bool extractAll)
{ {
QString result="Liste de tous les fichiers "; QCString result="Liste de tous les fichiers ";
if (!extractAll) result+="documentés "; if (!extractAll) result+="documentés ";
result+="avec une brève description :"; result+="avec une brève description :";
return result; return result;
} }
QString trCompoundListDescription() QCString trCompoundListDescription()
{ return "Liste des classes, des strutures et des unions " { return "Liste des classes, des strutures et des unions "
"avec une brève description :"; "avec une brève description :";
} }
QString trCompoundMembersDescription(bool extractAll) QCString trCompoundMembersDescription(bool extractAll)
{ {
QString result="Liste de tous les membres de classe "; QCString result="Liste de tous les membres de classe ";
if (!extractAll) result+="documentés "; if (!extractAll) result+="documentés ";
result+="avec les liens vers "; result+="avec les liens vers ";
if (extractAll) result+="la documentation de la classe correspondante :"; if (extractAll) result+="la documentation de la classe correspondante :";
else result+="les classes auxquelles ils appartiennent :"; else result+="les classes auxquelles ils appartiennent :";
return result; return result;
} }
QString trFileMembersDescription(bool extractAll) QCString trFileMembersDescription(bool extractAll)
{ {
QString result="Liste de toutes les déclarations"; QCString result="Liste de toutes les déclarations";
if (!extractAll) result+="documentées "; if (!extractAll) result+="documentées ";
result+="avec liens sur "; result+="avec liens sur ";
if (extractAll) result+="la documentation du fichier correspondant " if (extractAll) result+="la documentation du fichier correspondant "
...@@ -135,140 +137,140 @@ class TranslatorFrench : public Translator ...@@ -135,140 +137,140 @@ class TranslatorFrench : public Translator
else result+="les fichiers dans lesquels elles sont définies :"; else result+="les fichiers dans lesquels elles sont définies :";
return result; return result;
} }
QString trHeaderFilesDescription() QCString trHeaderFilesDescription()
{ return "Liste de tous les fichiers d'entête constituant " { return "Liste de tous les fichiers d'entête constituant "
"l'interface de programmation :"; } "l'interface de programmation :"; }
QString trExamplesDescription() QCString trExamplesDescription()
{ return "Liste de tous les exemples :"; } { return "Liste de tous les exemples :"; }
QString trRelatedPagesDescription() QCString trRelatedPagesDescription()
{ return "Liste de toutes les pages de documentation associées :"; } { return "Liste de toutes les pages de documentation associées :"; }
QString trModulesDescription() QCString trModulesDescription()
{ return "Liste de tous les modules"; } { return "Liste de tous les modules"; }
QString trNoDescriptionAvailable() QCString trNoDescriptionAvailable()
{ return "Aucune description n'est disponible"; } { return "Aucune description n'est disponible"; }
QString trDocumentation() QCString trDocumentation()
{ return "Documentation"; } { return "Documentation"; }
QString trModuleIndex() QCString trModuleIndex()
{ return "Index des modules"; } { return "Index des modules"; }
QString trHierarchicalIndex() QCString trHierarchicalIndex()
{ return "Index hiérarchique"; } { return "Index hiérarchique"; }
QString trCompoundIndex() QCString trCompoundIndex()
{ return "Index des composants"; } { return "Index des composants"; }
QString trFileIndex() QCString trFileIndex()
{ return "Index des fichiers"; } { return "Index des fichiers"; }
QString trModuleDocumentation() QCString trModuleDocumentation()
{ return "Documentation du module"; } { return "Documentation du module"; }
QString trClassDocumentation() QCString trClassDocumentation()
{ return "Documentation de la classe"; } { return "Documentation de la classe"; }
QString trFileDocumentation() QCString trFileDocumentation()
{ return "Documentation du fichier"; } { return "Documentation du fichier"; }
QString trExampleDocumentation() QCString trExampleDocumentation()
{ return "Documentation de l'exemple"; } { return "Documentation de l'exemple"; }
QString trPageDocumentation() QCString trPageDocumentation()
{ return "Documentation de la page"; } { return "Documentation de la page"; }
QString trReferenceManual() QCString trReferenceManual()
{ return "Manuel de référence"; } { return "Manuel de référence"; }
QString trDefines() QCString trDefines()
{ return "Définitions des macros"; } { return "Définitions des macros"; }
QString trFuncProtos() QCString trFuncProtos()
{ return "Prototypes des fonctions"; } { return "Prototypes des fonctions"; }
QString trTypedefs() QCString trTypedefs()
{ return "Définitions des types"; } { return "Définitions des types"; }
QString trEnumerations() QCString trEnumerations()
{ return "Enumérations"; } { return "Enumérations"; }
QString trFunctions() QCString trFunctions()
{ return "Fonctions"; } { return "Fonctions"; }
QString trVariables() QCString trVariables()
{ return "Variables"; } { return "Variables"; }
QString trEnumerationValues() QCString trEnumerationValues()
{ return "Eléments énumérés"; } { return "Eléments énumérés"; }
QString trReimplementedFrom() QCString trReimplementedFrom()
{ return "Redéfini à partir de"; } { return "Redéfini à partir de"; }
QString trReimplementedIn() QCString trReimplementedIn()
{ return "Redéfini dans"; } { return "Redéfini dans"; }
QString trAuthor() QCString trAuthor()
{ return "Auteur"; } { return "Auteur"; }
QString trDefineDocumentation() QCString trDefineDocumentation()
{ return "Documentation de la macro"; } { return "Documentation de la macro"; }
QString trFunctionPrototypeDocumentation() QCString trFunctionPrototypeDocumentation()
{ return "Documentation du prototype de la fonction"; } { return "Documentation du prototype de la fonction"; }
QString trTypedefDocumentation() QCString trTypedefDocumentation()
{ return "Documentation du type"; } { return "Documentation du type"; }
QString trEnumerationTypeDocumentation() QCString trEnumerationTypeDocumentation()
{ return "Documentation du type de l'énumeration"; } { return "Documentation du type de l'énumeration"; }
QString trEnumerationValueDocumentation() QCString trEnumerationValueDocumentation()
{ return "Documentation de l'élément de l'énumeration"; } { return "Documentation de l'élément de l'énumeration"; }
QString trFunctionDocumentation() QCString trFunctionDocumentation()
{ return "Documentation de la fonction"; } { return "Documentation de la fonction"; }
QString trVariableDocumentation() QCString trVariableDocumentation()
{ return "Documentation de la variable"; } { return "Documentation de la variable"; }
QString trCompounds() QCString trCompounds()
{ return "Composants"; } { return "Composants"; }
QString trFiles() QCString trFiles()
{ return "Fichiers"; } { return "Fichiers"; }
QString trGeneratedAt(const char *date,const char *projName) QCString trGeneratedAt(const char *date,const char *projName)
{ {
QString result=(QString)"Généré le "+date; QCString result=(QCString)"Généré le "+date;
if (projName) result+=(QString)" pour "+projName; if (projName) result+=(QCString)" pour "+projName;
result+=(QString)" par "; result+=(QCString)" par ";
return result; return result;
} }
QString trWrittenBy() QCString trWrittenBy()
{ {
return "écrit par"; return "écrit par";
} }
QString trClassDiagram(const char *clName) QCString trClassDiagram(const char *clName)
{ {
return (QString)"Graphe d'héritage de la classe "+clName; return (QCString)"Graphe d'héritage de la classe "+clName;
} }
QString trForInternalUseOnly() QCString trForInternalUseOnly()
{ return "A usage interne uniquement."; } { return "A usage interne uniquement."; }
QString trReimplementedForInternalReasons() QCString trReimplementedForInternalReasons()
{ return "Redéfini pour des raisons internes; " { return "Redéfini pour des raisons internes; "
"l'interface n'est pas modifiée"; "l'interface n'est pas modifiée";
} }
QString trWarning() QCString trWarning()
{ return "Avertissement"; } { return "Avertissement"; }
QString trBugsAndLimitations() QCString trBugsAndLimitations()
{ return "Bogues et limitations"; } { return "Bogues et limitations"; }
QString trVersion() QCString trVersion()
{ return "Version"; } { return "Version"; }
QString trDate() QCString trDate()
{ return "Date"; } { return "Date"; }
QString trAuthors() QCString trAuthors()
{ return "Auteur(s)"; } { return "Auteur(s)"; }
QString trReturns() QCString trReturns()
{ return "Renvoie"; } { return "Renvoie"; }
QString trSeeAlso() QCString trSeeAlso()
{ return "Voir également"; } { return "Voir également"; }
QString trParameters() QCString trParameters()
{ return "Paramètres"; } { return "Paramètres"; }
QString trExceptions() QCString trExceptions()
{ return "Exceptions"; } { return "Exceptions"; }
QString trGeneratedBy() QCString trGeneratedBy()
{ return "Généré par"; } { return "Généré par"; }
// new since 0.49-990307 // new since 0.49-990307
virtual QString trNamespaces() virtual QCString trNamespaces()
{ return "Namespaces"; } { return "Namespaces"; }
virtual QString trNamespaceList() virtual QCString trNamespaceList()
{ return "Liste des Namespaces"; } { return "Liste des Namespaces"; }
virtual QString trNamespaceListDescription(bool extractAll) virtual QCString trNamespaceListDescription(bool extractAll)
{ {
QString result="Liste de tous les namespaces "; QCString result="Liste de tous les namespaces ";
if (!extractAll) result+="documentés "; if (!extractAll) result+="documentés ";
result+="avec une brève description :"; result+="avec une brève description :";
return result; return result;
} }
virtual QString trFriends() virtual QCString trFriends()
{ return "Friends"; } { return "Friends"; }
// new since 0.49-990405 // new since 0.49-990405
virtual QString trRelatedFunctionDocumentation() virtual QCString trRelatedFunctionDocumentation()
{ return "Documentation des fonctions amies et associées"; } { return "Documentation des fonctions amies et associées"; }
}; };
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
* *
* Copyright (C) 1997-1999 by Dimitri van Heesch. * Copyright (C) 1997-1999 by Dimitri van Heesch.
* *
* Initial Italian Translation by Ahmed Aldo Faisal
* Revised and completed by Alessandro Falappa (June 1999)
*
* Permission to use, copy, modify, and distribute this software and its * Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby * documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software * granted. No representations are made about the suitability of this software
...@@ -17,250 +20,360 @@ ...@@ -17,250 +20,360 @@
#ifndef TRANSLATOR_IT_H #ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H #define TRANSLATOR_IT_H
#include <qstring.h> #include "translator.h"
class TranslatorItalian : public Translator class TranslatorItalian : public Translator
{ {
public: public:
QString latexBabelPackage() QCString latexBabelPackage()
{ return "italian"; } { return "italian"; }
QString trInherits() QCString trInherits()
{ return "eredita"; } { return "eredita"; }
QString trAnd() QCString trAnd()
{ return "e"; } { return "e"; }
QString trInheritedBy() QCString trInheritedBy()
{ return "Ereditato da"; } //{ return "Ereditato da"; }
QString trRelatedFunctions() { return "Ereditate da"; }
{ return "Funzioni relative"; } QCString trRelatedFunctions()
QString trRelatedSubscript() //{ return "Funzioni relative"; }
{ return "(Nota che questo no sono funzioni membro)"; } { return "Funzioni collegate"; }
QString trDetailedDescription() QCString trRelatedSubscript()
//{ return "(Nota che questo no sono funzioni membro)"; }
{ return "(Attenzione, queste non sono funzioni membro)"; }
QCString trDetailedDescription()
{ return "Descrizione dettagliata"; } { return "Descrizione dettagliata"; }
QString trMemberTypedefDocumentation() QCString trMemberTypedefDocumentation()
{ return "Documentazione dei membri Typedef"; } //{ return "Documentazione dei membri Typedef"; }
QString trMemberEnumerationDocumentation() { return "Documentazione delle ridefinizioni dei tipi (typedef)"; }
{ return "Documentazione dei membri enumerati"; } QCString trMemberEnumerationDocumentation()
QString trEnumerationValueDocumentation() //{ return "Documentazione dei membri enumerati"; }
{ return "Documentazione dei tipi enumerati"; } { return "Documentazione dei tipi enumerati (enum)"; }
QString trMemberFunctionDocumentation() QCString trEnumerationValueDocumentation()
{ return "Documentazione dei valori dei tipi enumerati"; }
QCString trMemberFunctionDocumentation()
{ return "Documentazione delle funzioni membro"; } { return "Documentazione delle funzioni membro"; }
QString trMemberDataDocumentation() QCString trMemberDataDocumentation()
{ return "Documentazione dei dati membro"; } { return "Documentazione dei dati membro"; }
QString trGeneratedFrom(const char *s,bool single) QCString trGeneratedFrom(const char *s,bool single)
{ {
QString result=(QString)"La documentazione di questa "+s+ QCString result=(QCString)"La documentazione di questa "+s+
" e stata generata dal seguente file"; " stata generata a partire";
if (single) result+=":"; else result+=":"; if (single) result+=" dal seguente file:";
else result+=" dai seguenti files:";
return result; return result;
} }
QString trMore() QCString trMore()
{ return "Continua..."; } { return "Continua..."; }
QString trReference() QCString trReference()
{ return "Riferimento"; } { return "Riferimento"; }
QString trListOfAllMembers() QCString trListOfAllMembers()
{ return "Lista di tuti i memberi."; } { return "Lista di tutti i membri."; }
QString trMemberList() QCString trMemberList()
{ return "Lista membri"; } { return "Lista dei membri"; }
QString trThisIsTheListOfAllMembers() QCString trThisIsTheListOfAllMembers()
{ return "Questa e la lista completa di tutti i membri"; } { return "Questa la lista completa di tutti i membri di "; }
QString trIncludingInheritedMembers() QCString trIncludingInheritedMembers()
{ return "includendo tutti i membri ereditati."; } { return ", includendo tutti i membri ereditati."; }
QString trGeneratedAutomatically(const char *s) QCString trGeneratedAutomatically(const char *s)
{ QString result="Generato automaticalmenta da Doxygen"; {
if (s) result+=(QString)" per "+s; QCString result="Generato automaticamente da Doxygen";
result+=" dall codice."; if (s) result+=(QCString)" per "+s;
result+=" a partire dal codice sorgente.";
return result; return result;
} }
QString trEnumName() QCString trEnumName()
{ return "nome dell enum"; } { return "nome di tipo enumerato"; }
QString trEnumValue() QCString trEnumValue()
{ return "valore dell enum"; } { return "valore di tipo enumerato"; }
QString trDefinedIn() QCString trDefinedIn()
{ return "definito in"; } { return "definito in"; }
QString trIncludeFile() QCString trIncludeFile()
{ return "Include il file"; } { return "Include il file"; }
QString trVerbatimText(const char *f) QCString trVerbatimText(const char *f)
{ return (QString)"Questo e il contenuto verbatim dell file "+f+"."; } { return (QCString)"Questo il contenuto integrale dell file "+f+"."; }
QString trModules() QCString trModules()
{ return "Moduli"; } { return "Moduli"; }
QString trClassHierarchy() QCString trClassHierarchy()
{ return "gerarchia delle classi"; } { return "Gerarchia delle classi"; }
QString trCompoundList() QCString trCompoundList()
{ return "Lista dei tipi composti"; } { return "Lista dei composti"; }
QString trFileList() QCString trFileList()
{ return "Lista dei file"; } { return "Lista dei files"; }
QString trHeaderFiles() QCString trHeaderFiles()
{ return "List dei fei file header"; } { return "Lista dei file header"; }
QString trCompoundMembers() QCString trCompoundMembers()
{ return "Membri composti"; } { return "Membri dei composti"; }
QString trFileMembers() QCString trFileMembers()
{ return "Membri dell file"; } { return "Membri dei files"; }
QString trRelatedPages() QCString trRelatedPages()
{ return "Relativo a pagina"; } { return "Pagine collegate"; }
QString trExamples() QCString trExamples()
{ return "Esempio"; } { return "Esempi"; }
QString trSearch() QCString trSearch()
{ return "Ricerca"; } { return "Cerca"; }
QString trClassHierarchyDescription() QCString trClassHierarchyDescription()
{ return "Qua sono la lista delle classi, structs e unions" {
"gesorte:"; return "Questa lista di ereditariet ordinata "
"approssimativamente, ma non completamente, in ordine alfabetico:";
} }
QString trFileListDescription(bool extractAll) QCString trFileListDescription(bool extractAll)
{ {
QString result="Hieronder volgt de lijst met alle "; QCString result="Questa una lista ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="dei files documentati ";
result+="files, elk met een korte beschrijving:"; else result+="di tutti i files ";
result+="con una loro breve descrizione:";
return result; return result;
} }
QString trCompoundListDescription() QCString trCompoundListDescription()
{ return "Hieronder volgen de klassen, structs en " { return "Queste sono le classi, structs e "
"unions met voor elk een korte beschrijving:"; "unions con una loro breve descrizione:";
} }
QString trCompoundMembersDescription(bool extractAll) QCString trCompoundMembersDescription(bool extractAll)
{ {
QString result="Hieronder volgt de lijst met alle "; QCString result="Questa una lista ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="dei membri documentati, ";
result+="klasse members met links naar "; else result+="di tutti i membri ";
if (extractAll) result+="de klasse Documentazione voor elke member:"; result+="con collegamenti ";
else result+="de klassen waartoe ze behoren:"; if (extractAll) result+="alla documentazione della classe di ciascun membro:";
else result+="alla documentazione delle classi a cui appartengono:";
return result; return result;
} }
QString trFileMembersDescription(bool extractAll) QCString trFileMembersDescription(bool extractAll)
{ {
QString result="Hieronder volgt de lijst met alle "; QCString result="Questa una lista ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="dei membri dei files documentati, ";
result+="file members met links naar "; else result+="di tutti i membri dei files ";
if (extractAll) result+="de file Documentazione voor elke member:"; result+="con collegamenti ";
else result+="de files waartoe ze behoren:"; if (extractAll) result+="alla documentazione del file di ciascun membro:";
else result+="alla documentazione dei files a cui appartengono:";
return result; return result;
} }
QString trHeaderFilesDescription() QCString trHeaderFilesDescription()
{ return "Hieronder volgen de header files die de API vormen:"; } { return "Questi sono gli header files che compongono l'API:"; }
QString trExamplesDescription() QCString trExamplesDescription()
{ return "Hieronder volgt de lijst met alle voorbeelden:"; } { return "Questa la lista di tutti gli esempi:"; }
QString trRelatedPagesDescription() QCString trRelatedPagesDescription()
{ return "Hieronder volgt de lijst met alle pagina's die gerelateerde Documentazione bevatten:"; } { return "Questa la lista di tutte le pagine di documentazione collegate fra loro:"; }
QString trModulesDescription() QCString trModulesDescription()
{ return "Hieronder volgt de lijst met alle modules:"; } { return "Questa la lista di tutti i moduli:"; }
QString trNoDescriptionAvailable() QCString trNoDescriptionAvailable()
{ return "Geen korte beschrijving beschikbaar"; } { return "Descrizione non disponibile"; }
QString trDocumentation() QCString trDocumentation()
{ return "Documentazione"; } { return "Documentazione"; }
QString trModuleIndex() QCString trModuleIndex()
{ return "Module Index"; } { return "Indice dei moduli"; }
QString trHierarchicalIndex() QCString trHierarchicalIndex()
{ return "Hi&euml;rarchische Index"; } { return "Indice della gerarchia"; }
QString trCompoundIndex() QCString trCompoundIndex()
{ return "Compound Index"; } { return "Indice dei composti"; }
QString trFileIndex() QCString trFileIndex()
{ return "File Index"; } { return "Indice dei files"; }
QString trModuleDocumentation() QCString trModuleDocumentation()
{ return "Module Documentazione"; } { return "Documentazione dei moduli"; }
QString trClassDocumentation() QCString trClassDocumentation()
{ return "Klasse Documentazione"; } { return "Documentazione delle classi"; }
QString trFileDocumentation() QCString trFileDocumentation()
{ return "File Documentazione"; } { return "Documentazione dei files"; }
QString trExampleDocumentation() QCString trExampleDocumentation()
{ return "Documentazione di voorbeelden"; } { return "Documentazione degli esempi"; }
QString trPageDocumentation() QCString trPageDocumentation()
{ return "Documentazione di gerelateerde pagina's"; } { return "Documentazione delle pagine"; }
QString trReferenceManual() QCString trReferenceManual()
{ return "Naslagwerk"; } { return "Manuale di riferimento"; }
QString trDefines() QCString trDefines()
{ return "Defines"; } { return "Definizioni"; }
QString trFuncProtos() QCString trFuncProtos()
{ return "Functie Prototypes"; } { return "Prototipi delle funzioni"; }
QString trTypedefs() QCString trTypedefs()
{ return "Typedefs"; } { return "Typedefs"; }
QString trEnumerations() QCString trEnumerations()
{ return "Enumeraties"; } { return "Tipi enumerati"; }
QString trFunctions() QCString trFunctions()
{ return "Functies"; } { return "Funzioni"; }
QString trVariables() QCString trVariables()
{ return "Variabelen"; } { return "Variabili"; }
QString trEnumerationValues() QCString trEnumerationValues()
{ return "Enumeratie waarden"; } { return "Valori dei tipi enumerati"; }
QString trReimplementedFrom() QCString trReimplementedFrom()
{ return "Nieuwe implementatie di"; } { return "Nuova implementazione di"; }
QString trReimplementedIn() QCString trReimplementedIn()
{ return "Opnieuw ge&iuml;mplementeerd in"; } { return "Reimplementato in"; }
QString trAuthor() QCString trAuthor()
{ return "auteur"; } { return "Autore"; }
QString trDefineDocumentation() QCString trDefineDocumentation()
{ return "Lista "; } { return "Documentazione delle definizioni"; }
QString trFunctionPrototypeDocumentation() QCString trFunctionPrototypeDocumentation()
{ return "Documentazione di functie Prototypes"; } { return "Documentazione dei prototipi delle funzioni"; }
QString trTypedefDocumentation() QCString trTypedefDocumentation()
{ return "Documentazione di typedefs"; } { return "Documentazione dei typedefs"; }
QString trEnumerationTypeDocumentation() QCString trEnumerationTypeDocumentation()
{ return "Documentazione di enumeratie types"; } { return "Documentazione dei tipi enumerati"; }
QString trFunctionDocumentation() QCString trFunctionDocumentation()
{ return "Documentazione di functies"; } { return "Documentazione delle funzioni"; }
QString trVariableDocumentation() QCString trVariableDocumentation()
{ return "Lista variabelen"; } { return "Documentazione delle variabili"; }
QString trCompounds() QCString trCompounds()
{ return "Compounds"; } { return "Composti"; }
QString trFiles() QCString trFiles()
{ return "Files"; } { return "Files"; }
QString trGeneratedAt(const char *date,const char *projName) QCString trGeneratedAt(const char *date,const char *projName)
{ {
QString result=(QString)"Gegenereerd op "+date; QCString result=(QCString)"Generato il "+date;
if (projName) result+=(QString)" voor "+projName; if (projName) result+=(QCString)" per "+projName;
result+=(QString)" door"; result+=(QCString)" da";
return result; return result;
} }
QString trWrittenBy() QCString trWrittenBy()
{ {
return "geschreven door"; return "scritto da";
} }
QString trClassDiagram(const char *clName) QCString trClassDiagram(const char *clName)
{ {
return (QString)"Klasse diagram voor "+clName; return (QCString)"Diagramma delle classi per "+clName;
} }
QString trForInternalUseOnly() QCString trForInternalUseOnly()
{ return "Alleen voor intern gebruik."; } { return "Solo per uso interno."; }
QString trReimplementedForInternalReasons() QCString trReimplementedForInternalReasons()
{ return "Om interne rederene opnieuwd ge&iuml;mplemented; " { return "Reimplementato per motivi interni; "
"de API wordt er niet door be&iuml;nvloed."; "l'API non stata modificata.";
} }
QString trWarning() QCString trWarning()
{ return "Waarschuwing"; } { return "Attenzione"; }
QString trBugsAndLimitations() QCString trBugsAndLimitations()
{ return "Fouten en beperkingen"; } { return "Bugs e limitazioni"; }
QString trVersion() QCString trVersion()
{ return "Versie"; } { return "Versione"; }
QString trDate() QCString trDate()
{ return "Datum"; } { return "Data"; }
QString trAuthors() QCString trAuthors()
{ return "Auteur(s)"; } { return "Autore(i)"; }
QString trReturns() QCString trReturns()
{ return "Retourneerd"; } { return "Restituisce"; }
QString trSeeAlso() QCString trSeeAlso()
{ return "Zie ook"; } { return "Vedi anche"; }
QString trParameters() QCString trParameters()
{ return "Parameters"; } { return "Parametri"; }
QString trExceptions() QCString trExceptions()
{ return "Excepties"; } { return "Eccezioni"; }
QString trGeneratedBy() QCString trGeneratedBy()
{ return "Gegenereerd door"; } { return "Generato da"; }
// new since 0.49-990307 //////////////////////////////////////////////////////////////////////////
// new since 0.49-990307
//////////////////////////////////////////////////////////////////////////
QString trNamespaces() QCString trNamespaces()
{ return "Namespaces"; } { return "Namespaces"; }
QString trNamespaceList() QCString trNamespaceList()
{ return "Namespace Lijst"; } { return "Lista dei namespaces"; }
QString trNamespaceListDescription(bool extractAll) QCString trNamespaceListDescription(bool extractAll)
{ {
QString result="Hier is een lijst met alle "; QCString result="Questa la lista ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="dei namespaces documentati, ";
result+="namespaces met voor elk een korte beschrijving:"; else result+="di tutti i namespaces ";
result+="con una loro breve descrizione:";
return result; return result;
} }
QString trFriends() QCString trFriends()
{ return "Friends"; } { return "Friends"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
QCString trRelatedFunctionDocumentation()
{ return "Documentazione dei friends e delle funzioni collegate"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType)
{
QCString result="Riferimenti per la";
switch(compType)
{
case ClassDef::Class: result+=" classe"; break;
case ClassDef::Struct: result+=" struct"; break;
case ClassDef::Union: result+=" union"; break;
}
result+=" "+(QCString)clName;
return result;
}
QCString trFileReference(const char *fileName)
{
QCString result="Riferimenti per il file ";
result+=(QCString)fileName;
return result;
}
QCString trNamespaceReference(const char *namespaceName)
{
QCString result="Riferimenti per il namespace ";
result+=(QCString)namespaceName;
return result;
}
// these are for the member sections of a class, struct or union
QCString trPublicMembers()
{ return "Membri pubblici"; }
QCString trPublicSlots()
{ return "Slots pubblici"; }
QCString trSignals()
{ return "Signals"; }
QCString trStaticPublicMembers()
{ return "Membri pubblici statici"; }
QCString trProtectedMembers()
{ return "Membri protetti"; }
QCString trProtectedSlots()
{ return "Slots protetti"; }
QCString trStaticProtectedMembers()
{ return "Membri protetti statici"; }
QCString trPrivateMembers()
{ return "Membri privati"; }
QCString trPrivateSlots()
{ return "Slots privati"; }
QCString trStaticPrivateMembers()
{ return "Membri privati statici"; }
QCString trInheritsList(int numEntries)
{
return "Eredita da "+trWriteList(numEntries)+".";
}
QCString trInheritedByList(int numEntries)
{
return "Base per "+trWriteList(numEntries)+".";
}
QCString trReimplementedFromList(int numEntries)
{
return "Reimplementa "+trWriteList(numEntries)+".";
}
QCString trReimplementedInList(int numEntries)
{
return "Reimplementata in "+trWriteList(numEntries)+".";
}
QCString trNamespaceMembers()
{ return "Membri dei namespaces"; }
QCString trNamespaceMemberDescription(bool extractAll)
{
QCString result="Questa la lista ";
if (!extractAll) result+="dei membri dei namespaces documentati, ";
else result+="di tutti i membri dei namespaces ";
result+="con collegamenti ";
if (extractAll)
result+="alla documentazione del namespace per ciascun membro:";
else
result+="ai namespaces a cui appartengono:";
return result;
}
QCString trNamespaceIndex()
{ return "Indice dei namespaces"; }
QCString trNamespaceDocumentation()
{ return "Documentazione dei namespaces"; }
}; };
#endif #endif
/******************************************************************************
*
* $Id$
*
* Copyright (C) 1997-1999 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.
*
* All output generated with Doxygen is not covered by this license.
*
*/
#ifndef TRANSLATOR_JP_H
#define TRANSLATOR_JP_H
#include "translator.h"
class TranslatorJapanese : public Translator
{
public:
QCString latexBabelPackage()
{ return "a4j"; }
QCString trInherits()
{ return "継承"; }
QCString trAnd()
{ return "と"; }
QCString trInheritedBy()
{ return "次に継承されています。"; }
QCString trRelatedFunctions()
{ return "関連する関数"; }
QCString trRelatedSubscript()
{ return "(これらはメンバ関数でないことに注意)"; }
QCString trDetailedDescription()
{ return "解説"; }
QCString trMemberTypedefDocumentation()
{ return "メンバ型定義の解説"; }
QCString trMemberEnumerationDocumentation()
{ return "メンバ列挙型の解説"; }
QCString trEnumerationValueDocumentation()
{ return "列挙型値の解説"; }
QCString trMemberFunctionDocumentation()
{ return "メンバ関数の解説"; }
QCString trMemberDataDocumentation()
{ return "メンバデータの解説"; }
QCString trGeneratedFrom(const char *s,bool)
{
QCString result=(QCString)"この"+s+
"に対するドキュメントは以下のファイルから生成されました。";
return result;
}
QCString trMore()
{ return "より詳しく..."; }
QCString trReference()
{ return "リファレンス"; }
QCString trListOfAllMembers()
{ return "すべてのメンバリスト"; }
QCString trMemberList()
{ return "メンバリスト"; }
QCString trThisIsTheListOfAllMembers()
{ return "これは次の全メンバリストです。"; }
QCString trIncludingInheritedMembers()
{ return "継承メンバすべてを含んで。"; }
QCString trGeneratedAutomatically(const char *s)
{ QCString result;
if (s) result=(QCString)s+"に対して";
result+="ソースコードから Doxygen が自動的に生成しました。";
return result;
}
QCString trEnumName()
{ return "enum 型"; }
QCString trEnumValue()
{ return "enum 値"; }
QCString trDefinedIn()
{ return "次で定義されました。"; }
QCString trIncludeFile()
{ return "インクルードファイル"; }
QCString trVerbatimText(const char *f)
{ return (QCString)"これはインクルードファイル"+f+
"の Verbatim テキストです。"; }
QCString trModules()
{ return "モジュール"; }
QCString trClassHierarchy()
{ return "クラス階層"; }
QCString trCompoundList()
{ return "データ構造リスト"; }
QCString trFileList()
{ return "ファイルリスト"; }
QCString trHeaderFiles()
{ return "ヘッダファイル"; }
QCString trCompoundMembers()
{ return "データ構造メンバ"; }
QCString trFileMembers()
{ return "ファイルメンバ"; }
QCString trRelatedPages()
{ return "関連ページ"; }
QCString trExamples()
{ return "例"; }
QCString trSearch()
{ return "検索"; }
QCString trClassHierarchyDescription()
{ return "この継承リストはおおまかにはソートされていますが、"
"アルファベット順で完全にソートされてはいません。";
}
QCString trFileListDescription(bool extractAll)
{
QCString result="このリストは、";
if (!extractAll) result+="ドキュメント化され、";
result+="簡易説明を持つファイルすべてのリストです。";
return result;
}
QCString trCompoundListDescription()
{ return "これは簡易説明を持つ、クラス、構造体、共用体のリストです。";}
QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="これは";
if (!extractAll) result+="ドキュメント化された";
result+="クラスメンバすべてのリストで、それぞれ";
if (extractAll) result+="が属しているクラス";
result+="の解説へのリンクが張られています。";
return result;
}
QCString trFileMembersDescription(bool extractAll)
{
QCString result="これは";
if (!extractAll) result+="ドキュメント化された";
result+="ファイルメンバすべてのリストで、それぞれ";
if (extractAll) result+="が属しているファイル";
result+="の解説へのリンクが張られています。";
return result;
}
QCString trHeaderFilesDescription()
{ return "APIを構成するヘッダファイルです。"; }
QCString trExamplesDescription()
{ return "すべての例のリストです。"; }
QCString trRelatedPagesDescription()
{ return "関連するドキュメントページすべてのリストです。"; }
QCString trModulesDescription()
{ return "すべてのモジュールのリストです。"; }
QCString trNoDescriptionAvailable()
{ return "ドキュメントが記述されていません。"; }
QCString trDocumentation()
{ return "ドキュメント"; }
QCString trModuleIndex()
{ return "モジュール索引"; }
QCString trHierarchicalIndex()
{ return "階層索引"; }
QCString trCompoundIndex()
{ return "データ構造索引"; }
QCString trFileIndex()
{ return "ファイル索引"; }
QCString trModuleDocumentation()
{ return "モジュールの解説"; }
QCString trClassDocumentation()
{ return "クラスの解説"; }
QCString trFileDocumentation()
{ return "ファイルの解説"; }
QCString trExampleDocumentation()
{ return "例題の解説"; }
QCString trPageDocumentation()
{ return "ページの解説"; }
QCString trReferenceManual()
{ return "リファレンスマニュアル"; }
QCString trDefines()
{ return "マクロ定義"; }
QCString trFuncProtos()
{ return "関数プロトタイプ"; }
QCString trTypedefs()
{ return "型定義"; }
QCString trEnumerations()
{ return "列挙型"; }
QCString trFunctions()
{ return "関数"; }
QCString trVariables()
{ return "変数"; }
QCString trEnumerationValues()
{ return "列挙型値"; }
QCString trReimplementedFrom()
{ return "次を再定義"; }
QCString trReimplementedIn()
{ return "次で再定義"; }
QCString trAuthor()
{ return "作者"; }
QCString trDefineDocumentation()
{ return "マクロ定義の解説"; }
QCString trFunctionPrototypeDocumentation()
{ return "関数プロトタイプの解説"; }
QCString trTypedefDocumentation()
{ return "型定義の解説"; }
QCString trEnumerationTypeDocumentation()
{ return "列挙型の解説"; }
QCString trFunctionDocumentation()
{ return "関数の解説"; }
QCString trVariableDocumentation()
{ return "変数の解説"; }
QCString trCompounds()
{ return "データ構造"; }
QCString trFiles()
{ return "ファイル"; }
QCString trGeneratedAt(const char *date,const char *projName)
{
QCString result;
if (projName) result+=(QCString)projName+"に対して";
result+=(QCString)date+"に生成されました。";
return result;
}
QCString trWrittenBy()
{
return "を開発したのは";
}
QCString trClassDiagram(const char *clName)
{
return (QCString)clName+"に対するクラス階層図";
}
QCString trForInternalUseOnly()
{ return "内部使用のみ。"; }
QCString trReimplementedForInternalReasons()
{ return "内部的な理由により再実装されましたが、APIには影響しません。";
}
QCString trWarning()
{ return "注意"; }
QCString trBugsAndLimitations()
{ return "バグと制限"; }
QCString trVersion()
{ return "バージョン"; }
QCString trDate()
{ return "日付"; }
QCString trAuthors()
{ return "作者"; }
QCString trReturns()
{ return "戻り値"; }
QCString trSeeAlso()
{ return "参照"; }
QCString trParameters()
{ return "引数"; }
QCString trExceptions()
{ return "例外"; }
QCString trGeneratedBy()
{ return ""; }
// new since 0.49-990307
QCString trNamespaces()
{ return "名前空間"; }
QCString trNamespaceList()
{ return "名前空間リスト"; }
QCString trNamespaceListDescription(bool extractAll)
{
QCString result="このリストは、簡易説明を持つすべての";
if (!extractAll) result+="ドキュメント化された";
result+="名前空間のリストです。";
return result;
}
QCString trFriends()
{ return "フレンド"; }
// new since 0.49-990405
virtual QCString trRelatedFunctionDocumentation()
{ return "フレンドと関連する関数の解説"; }
};
#endif
...@@ -17,253 +17,253 @@ ...@@ -17,253 +17,253 @@
#ifndef TRANSLATOR_NL_H #ifndef TRANSLATOR_NL_H
#define TRANSLATOR_NL_H #define TRANSLATOR_NL_H
#include <qstring.h> #include "translator.h"
class TranslatorDutch : public Translator class TranslatorDutch : public Translator
{ {
public: public:
QString latexBabelPackage() QCString latexBabelPackage()
{ return "dutch"; } { return "dutch"; }
QString trRelatedFunctions() QCString trRelatedFunctions()
{ return "Gerelateerde functies"; } { return "Gerelateerde functies"; }
QString trRelatedSubscript() QCString trRelatedSubscript()
{ return "(Merk op dat dit geen member functies zijn.)"; } { return "(Merk op dat dit geen member functies zijn.)"; }
QString trDetailedDescription() QCString trDetailedDescription()
{ return "Gedetaileerde Beschrijving"; } { return "Gedetaileerde Beschrijving"; }
QString trMemberTypedefDocumentation() QCString trMemberTypedefDocumentation()
{ return "Documentatie van type definitie members"; } { return "Documentatie van type definitie members"; }
QString trMemberEnumerationDocumentation() QCString trMemberEnumerationDocumentation()
{ return "Documentatie van enumeratie members"; } { return "Documentatie van enumeratie members"; }
QString trEnumerationValueDocumentation() QCString trEnumerationValueDocumentation()
{ return "Documentatie van enumeratie waarden"; } { return "Documentatie van enumeratie waarden"; }
QString trMemberFunctionDocumentation() QCString trMemberFunctionDocumentation()
{ return "Documentatie van functie members"; } { return "Documentatie van functie members"; }
QString trMemberDataDocumentation() QCString trMemberDataDocumentation()
{ return "Documentatie van data members"; } { return "Documentatie van data members"; }
QString trGeneratedFrom(const char *s,bool single) QCString trGeneratedFrom(const char *s,bool single)
{ {
QString result=(QString)"De documentatie voor deze"+s+ QCString result=(QCString)"De documentatie voor deze"+s+
" is gegenereerd op grond van de volgende file"; " is gegenereerd op grond van de volgende file";
if (single) result+=":"; else result+="s:"; if (single) result+=":"; else result+="s:";
return result; return result;
} }
QString trMore() QCString trMore()
{ return "Meer..."; } { return "Meer..."; }
QString trListOfAllMembers() QCString trListOfAllMembers()
{ return "Lijst van alle members."; } { return "Lijst van alle members."; }
QString trMemberList() QCString trMemberList()
{ return "Member Lijst"; } { return "Member Lijst"; }
QString trThisIsTheListOfAllMembers() QCString trThisIsTheListOfAllMembers()
{ return "Dit is de complete lijst van alle members voor"; } { return "Dit is de complete lijst van alle members voor"; }
QString trIncludingInheritedMembers() QCString trIncludingInheritedMembers()
{ return ", inclusief alle overge&euml;rfde members."; } { return ", inclusief alle overge&euml;rfde members."; }
QString trGeneratedAutomatically(const char *s) QCString trGeneratedAutomatically(const char *s)
{ QString result="Automatisch gegenereerd door Doxygen"; { QCString result="Automatisch gegenereerd door Doxygen";
if (s) result+=(QString)" voor "+s; if (s) result+=(QCString)" voor "+s;
result+=" uit de programmacode."; result+=" uit de programmacode.";
return result; return result;
} }
QString trEnumName() QCString trEnumName()
{ return "enum naam"; } { return "enum naam"; }
QString trEnumValue() QCString trEnumValue()
{ return "enum waarde"; } { return "enum waarde"; }
QString trDefinedIn() QCString trDefinedIn()
{ return "gedefinieerd in"; } { return "gedefinieerd in"; }
QString trVerbatimText(const char *f) QCString trVerbatimText(const char *f)
{ return (QString)"Dit is de letterlijke tekst van de include file "+f+"."; } { return (QCString)"Dit is de letterlijke tekst van de include file "+f+"."; }
QString trModules() QCString trModules()
{ return "Modules"; } { return "Modules"; }
QString trClassHierarchy() QCString trClassHierarchy()
{ return "Klasse Hi&euml;rarchie"; } { return "Klasse Hi&euml;rarchie"; }
QString trCompoundList() QCString trCompoundList()
{ return "Compound Lijst"; } { return "Compound Lijst"; }
QString trFileList() QCString trFileList()
{ return "File Lijst"; } { return "File Lijst"; }
QString trHeaderFiles() QCString trHeaderFiles()
{ return "Header Lijst"; } { return "Header Lijst"; }
QString trCompoundMembers() QCString trCompoundMembers()
{ return "Compound Members"; } { return "Compound Members"; }
QString trFileMembers() QCString trFileMembers()
{ return "File members"; } { return "File members"; }
QString trRelatedPages() QCString trRelatedPages()
{ return "Gerelateerde pagina's"; } { return "Gerelateerde pagina's"; }
QString trExamples() QCString trExamples()
{ return "Voorbeelden"; } { return "Voorbeelden"; }
QString trSearch() QCString trSearch()
{ return "Zoeken"; } { return "Zoeken"; }
QString trClassHierarchyDescription() QCString trClassHierarchyDescription()
{ return "Deze inheritance lijst is min of meer alfabetisch " { return "Deze inheritance lijst is min of meer alfabetisch "
"gesorteerd:"; "gesorteerd:";
} }
QString trFileListDescription(bool extractAll) QCString trFileListDescription(bool extractAll)
{ {
QString result="Hieronder volgt de lijst met alle "; QCString result="Hieronder volgt de lijst met alle ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="gedocumenteerde ";
result+="files, elk met een korte beschrijving:"; result+="files, elk met een korte beschrijving:";
return result; return result;
} }
QString trCompoundListDescription() QCString trCompoundListDescription()
{ return "Hieronder volgen de klassen, structs en " { return "Hieronder volgen de klassen, structs en "
"unions met voor elk een korte beschrijving:"; "unions met voor elk een korte beschrijving:";
} }
QString trCompoundMembersDescription(bool extractAll) QCString trCompoundMembersDescription(bool extractAll)
{ {
QString result="Hieronder volgt de lijst met alle "; QCString result="Hieronder volgt de lijst met alle ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="gedocumenteerde ";
result+="klasse members met links naar "; result+="klasse members met links naar ";
if (extractAll) result+="de klasse documentatie voor elke member:"; if (extractAll) result+="de klasse documentatie voor elke member:";
else result+="de klassen waartoe ze behoren:"; else result+="de klassen waartoe ze behoren:";
return result; return result;
} }
QString trFileMembersDescription(bool extractAll) QCString trFileMembersDescription(bool extractAll)
{ {
QString result="Hieronder volgt de lijst met alle "; QCString result="Hieronder volgt de lijst met alle ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="gedocumenteerde ";
result+="file members met links naar "; result+="file members met links naar ";
if (extractAll) result+="de file documentatie voor elke member:"; if (extractAll) result+="de file documentatie voor elke member:";
else result+="de files waartoe ze behoren:"; else result+="de files waartoe ze behoren:";
return result; return result;
} }
QString trHeaderFilesDescription() QCString trHeaderFilesDescription()
{ return "Hieronder volgen de header files die de API vormen:"; } { return "Hieronder volgen de header files die de API vormen:"; }
QString trExamplesDescription() QCString trExamplesDescription()
{ return "Hieronder volgt de lijst met alle voorbeelden:"; } { return "Hieronder volgt de lijst met alle voorbeelden:"; }
QString trRelatedPagesDescription() QCString trRelatedPagesDescription()
{ return "Hieronder volgt de lijst met alle pagina's die gerelateerde documentatie bevatten:"; } { return "Hieronder volgt de lijst met alle pagina's die gerelateerde documentatie bevatten:"; }
QString trModulesDescription() QCString trModulesDescription()
{ return "Hieronder volgt de lijst met alle modules:"; } { return "Hieronder volgt de lijst met alle modules:"; }
QString trNoDescriptionAvailable() QCString trNoDescriptionAvailable()
{ return "Geen korte beschrijving beschikbaar"; } { return "Geen korte beschrijving beschikbaar"; }
QString trDocumentation() QCString trDocumentation()
{ return "Documentatie"; } { return "Documentatie"; }
QString trModuleIndex() QCString trModuleIndex()
{ return "Module Index"; } { return "Module Index"; }
QString trHierarchicalIndex() QCString trHierarchicalIndex()
{ return "Hi&euml;rarchische Index"; } { return "Hi&euml;rarchische Index"; }
QString trCompoundIndex() QCString trCompoundIndex()
{ return "Compound Index"; } { return "Compound Index"; }
QString trFileIndex() QCString trFileIndex()
{ return "File Index"; } { return "File Index"; }
QString trModuleDocumentation() QCString trModuleDocumentation()
{ return "Module Documentatie"; } { return "Module Documentatie"; }
QString trClassDocumentation() QCString trClassDocumentation()
{ return "Klasse Documentatie"; } { return "Klasse Documentatie"; }
QString trFileDocumentation() QCString trFileDocumentation()
{ return "File Documentatie"; } { return "File Documentatie"; }
QString trExampleDocumentation() QCString trExampleDocumentation()
{ return "Documentatie van voorbeelden"; } { return "Documentatie van voorbeelden"; }
QString trPageDocumentation() QCString trPageDocumentation()
{ return "Documentatie van gerelateerde pagina's"; } { return "Documentatie van gerelateerde pagina's"; }
QString trReferenceManual() QCString trReferenceManual()
{ return "Naslagwerk"; } { return "Naslagwerk"; }
QString trDefines() QCString trDefines()
{ return "Defines"; } { return "Defines"; }
QString trFuncProtos() QCString trFuncProtos()
{ return "Functie Prototypes"; } { return "Functie Prototypes"; }
QString trTypedefs() QCString trTypedefs()
{ return "Typedefs"; } { return "Typedefs"; }
QString trEnumerations() QCString trEnumerations()
{ return "Enumeraties"; } { return "Enumeraties"; }
QString trFunctions() QCString trFunctions()
{ return "Functies"; } { return "Functies"; }
QString trVariables() QCString trVariables()
{ return "Variabelen"; } { return "Variabelen"; }
QString trEnumerationValues() QCString trEnumerationValues()
{ return "Enumeratie waarden"; } { return "Enumeratie waarden"; }
QString trAuthor() QCString trAuthor()
{ return "auteur"; } { return "auteur"; }
QString trDefineDocumentation() QCString trDefineDocumentation()
{ return "Documentatie van defines"; } { return "Documentatie van defines"; }
QString trFunctionPrototypeDocumentation() QCString trFunctionPrototypeDocumentation()
{ return "Documentatie van functie Prototypes"; } { return "Documentatie van functie Prototypes"; }
QString trTypedefDocumentation() QCString trTypedefDocumentation()
{ return "Documentatie van typedefs"; } { return "Documentatie van typedefs"; }
QString trEnumerationTypeDocumentation() QCString trEnumerationTypeDocumentation()
{ return "Documentatie van enumeratie types"; } { return "Documentatie van enumeratie types"; }
QString trFunctionDocumentation() QCString trFunctionDocumentation()
{ return "Documentatie van functies"; } { return "Documentatie van functies"; }
QString trVariableDocumentation() QCString trVariableDocumentation()
{ return "Documentatie van variabelen"; } { return "Documentatie van variabelen"; }
QString trCompounds() QCString trCompounds()
{ return "Compounds"; } { return "Compounds"; }
QString trFiles() QCString trFiles()
{ return "Files"; } { return "Files"; }
QString trGeneratedAt(const char *date,const char *projName) QCString trGeneratedAt(const char *date,const char *projName)
{ {
QString result=(QString)"Gegenereerd op "+date; QCString result=(QCString)"Gegenereerd op "+date;
if (projName) result+=(QString)" voor "+projName; if (projName) result+=(QCString)" voor "+projName;
result+=(QString)" door"; result+=(QCString)" door";
return result; return result;
} }
QString trWrittenBy() QCString trWrittenBy()
{ {
return "geschreven door"; return "geschreven door";
} }
QString trClassDiagram(const char *clName) QCString trClassDiagram(const char *clName)
{ {
return (QString)"Klasse diagram voor "+clName; return (QCString)"Klasse diagram voor "+clName;
} }
QString trForInternalUseOnly() QCString trForInternalUseOnly()
{ return "Alleen voor intern gebruik."; } { return "Alleen voor intern gebruik."; }
QString trReimplementedForInternalReasons() QCString trReimplementedForInternalReasons()
{ return "Om interne rederene opnieuwd ge&iuml;mplemented; " { return "Om interne rederene opnieuwd ge&iuml;mplemented; "
"de API wordt er niet door be&iuml;nvloed."; "de API wordt er niet door be&iuml;nvloed.";
} }
QString trWarning() QCString trWarning()
{ return "Waarschuwing"; } { return "Waarschuwing"; }
QString trBugsAndLimitations() QCString trBugsAndLimitations()
{ return "Fouten en beperkingen"; } { return "Fouten en beperkingen"; }
QString trVersion() QCString trVersion()
{ return "Versie"; } { return "Versie"; }
QString trDate() QCString trDate()
{ return "Datum"; } { return "Datum"; }
QString trAuthors() QCString trAuthors()
{ return "Auteur(s)"; } { return "Auteur(s)"; }
QString trReturns() QCString trReturns()
{ return "Retourneerd"; } { return "Retourneerd"; }
QString trSeeAlso() QCString trSeeAlso()
{ return "Zie ook"; } { return "Zie ook"; }
QString trParameters() QCString trParameters()
{ return "Parameters"; } { return "Parameters"; }
QString trExceptions() QCString trExceptions()
{ return "Excepties"; } { return "Excepties"; }
QString trGeneratedBy() QCString trGeneratedBy()
{ return "Gegenereerd door"; } { return "Gegenereerd door"; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990307 // new since 0.49-990307
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
QString trNamespaceList() QCString trNamespaceList()
{ return "Namespace Lijst"; } { return "Namespace Lijst"; }
QString trNamespaceListDescription(bool extractAll) QCString trNamespaceListDescription(bool extractAll)
{ {
QString result="Hier is een lijst met alle "; QCString result="Hier is een lijst met alle ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="gedocumenteerde ";
result+="namespaces met voor elk een korte beschrijving:"; result+="namespaces met voor elk een korte beschrijving:";
return result; return result;
} }
QString trFriends() QCString trFriends()
{ return "Friends"; } { return "Friends"; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990405 // new since 0.49-990405
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
QString trRelatedFunctionDocumentation() QCString trRelatedFunctionDocumentation()
{ return "Documentatie van friends en gerelateerde functies"; } { return "Documentatie van friends en gerelateerde functies"; }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 0.49-990425 // new since 0.49-990425
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
virtual QString trCompoundReference(const char *clName, virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType) ClassDef::CompoundType compType)
// 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
{ {
QString result=(QString)clName+" "; QCString result=(QCString)clName+" ";
switch(compType) switch(compType)
{ {
case ClassDef::Class: result+=" Class"; break; case ClassDef::Class: result+=" Class"; break;
...@@ -273,49 +273,49 @@ class TranslatorDutch : public Translator ...@@ -273,49 +273,49 @@ class TranslatorDutch : public Translator
result+=" Referentie"; result+=" Referentie";
return result; return result;
} }
virtual QString trFileReference(const char *fileName) virtual QCString trFileReference(const char *fileName)
// used as the title of the HTML page of a file // used as the title of the HTML page of a file
{ {
QString result=fileName; QCString result=fileName;
result+=" File Referentie"; result+=" File Referentie";
return result; return result;
} }
virtual QString trNamespaceReference(const char *namespaceName) virtual QCString trNamespaceReference(const char *namespaceName)
// used as the title of the HTML page of a namespace // used as the title of the HTML page of a namespace
{ {
QString result=namespaceName; QCString result=namespaceName;
result+=" Namespace Referentie"; result+=" Namespace Referentie";
return result; return result;
} }
// 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 QString trPublicMembers() virtual QCString trPublicMembers()
{ return "Public Members"; } { return "Public Members"; }
virtual QString trPublicSlots() virtual QCString trPublicSlots()
{ return "Public Slots"; } { return "Public Slots"; }
virtual QString trSignals() virtual QCString trSignals()
{ return "Signals"; } { return "Signals"; }
virtual QString trStaticPublicMembers() virtual QCString trStaticPublicMembers()
{ return "Static Public Members"; } { return "Static Public Members"; }
virtual QString trProtectedMembers() virtual QCString trProtectedMembers()
{ return "Protected Members"; } { return "Protected Members"; }
virtual QString trProtectedSlots() virtual QCString trProtectedSlots()
{ return "Protected Slots"; } { return "Protected Slots"; }
virtual QString trStaticProtectedMembers() virtual QCString trStaticProtectedMembers()
{ return "Static Protected Members"; } { return "Static Protected Members"; }
virtual QString trPrivateMembers() virtual QCString trPrivateMembers()
{ return "Private Members"; } { return "Private Members"; }
virtual QString trPrivateSlots() virtual QCString trPrivateSlots()
{ return "Private Slots"; } { return "Private Slots"; }
virtual QString trStaticPrivateMembers() virtual QCString trStaticPrivateMembers()
{ return "Static Private Members"; } { return "Static Private Members"; }
// end of member sections // end of member sections
virtual QString trWriteList(int numEntries) virtual QCString trWriteList(int numEntries)
{ {
// this function is used to produce a comma-separated list of items. // this function is used to produce a comma-separated list of items.
// use generateMarker(i) to indicate where item i should be put. // use generateMarker(i) to indicate where item i should be put.
QString result; QCString result;
int i; int i;
// the inherits list contain `numEntries' classes // the inherits list contain `numEntries' classes
for (i=0;i<numEntries;i++) for (i=0;i<numEntries;i++)
...@@ -335,38 +335,38 @@ class TranslatorDutch : public Translator ...@@ -335,38 +335,38 @@ class TranslatorDutch : public Translator
return result; return result;
} }
virtual QString trInheritsList(int numEntries) virtual QCString trInheritsList(int numEntries)
// used in class documentation to produce a list of base classes, // used in class documentation to produce a list of base classes,
// if class diagrams are disabled. // if class diagrams are disabled.
{ {
return "Erft over van "+trWriteList(numEntries)+"."; return "Erft over van "+trWriteList(numEntries)+".";
} }
virtual QString trInheritedByList(int numEntries) virtual QCString trInheritedByList(int numEntries)
// used in class documentation to produce a list of super classes, // used in class documentation to produce a list of super classes,
// if class diagrams are disabled. // if class diagrams are disabled.
{ {
return "Wordt overge&euml;rfd door "+trWriteList(numEntries)+"."; return "Wordt overge&euml;rfd door "+trWriteList(numEntries)+".";
} }
virtual QString trReimplementedFromList(int numEntries) virtual QCString trReimplementedFromList(int numEntries)
// used in member documentation blocks to produce a list of // used in member documentation blocks to produce a list of
// members that are hidden by this one. // members that are hidden by this one.
{ {
return "Nieuwe implementatie van "+trWriteList(numEntries)+"."; return "Nieuwe implementatie van "+trWriteList(numEntries)+".";
} }
virtual QString trReimplementedInList(int numEntries) virtual QCString trReimplementedInList(int numEntries)
{ {
// used in member documentation blocks to produce a list of // used in member documentation blocks to produce a list of
// all member that overwrite the implementation of this member. // all member that overwrite the implementation of this member.
return "Opnieuw ge&iuml;mplementeerd in "+trWriteList(numEntries)+"."; return "Opnieuw ge&iuml;mplementeerd in "+trWriteList(numEntries)+".";
} }
virtual QString trNamespaceMembers() virtual QCString trNamespaceMembers()
// 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.
{ return "Namespace Members"; } { return "Namespace Members"; }
virtual QString trNamespaceMemberDescription(bool extractAll) virtual QCString trNamespaceMemberDescription(bool extractAll)
// This is an introduction to the page with all namespace members // This is an introduction to the page with all namespace members
{ {
QString result="Hier is een lijst van alle "; QCString result="Hier is een lijst van alle ";
if (!extractAll) result+="gedocumenteerde "; if (!extractAll) result+="gedocumenteerde ";
result+="namespace members met links naar "; result+="namespace members met links naar ";
if (extractAll) if (extractAll)
...@@ -375,11 +375,11 @@ class TranslatorDutch : public Translator ...@@ -375,11 +375,11 @@ class TranslatorDutch : public Translator
result+="de namespaces waartoe ze behoren:"; result+="de namespaces waartoe ze behoren:";
return result; return result;
} }
virtual QString trNamespaceIndex() virtual QCString trNamespaceIndex()
// 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.
{ return "Namespace Index"; } { return "Namespace Index"; }
virtual QString trNamespaceDocumentation() virtual QCString trNamespaceDocumentation()
// 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.
{ return "Namespace Documentatie"; } { return "Namespace Documentatie"; }
......
...@@ -14,245 +14,484 @@ ...@@ -14,245 +14,484 @@
* *
*/ */
/*------------------------------------------------------------------------- /*
==================================================================================
Svensk versttning av: Svensk versttning av:
Samuel Hgglund <sahag96@ite.mh.se> Samuel Hgglund <sahag96@ite.mh.se>
Xet Erixon <xet@xeqt.com> Xet Erixon <xet@xeqt.com>
==================================================================================
Uppdateringar.
1999/04/29
* Omskrivningar av en hel del ordval, t.ex.
ENG INNAN EFTER
compound inhngnad sammansatt
structs structs strukter
unions unions unioner
Skicka grna synpunkter. osv...
--------------------------------------------------------------------------*/
* Alla versttnings-strngar returnerar i alla fall en ngot s nr vettig
frklaring...
1999/05/27
* Det verkade som vi glmt en del mellanslag i vissa strngar vilket resulterade
i att en del ord blev ihopskrivna.
* Bytt en del ordval igen...
ENG INNAN EFTER
reference manual Uppslagsbok referensmanual
* Skrivit ihop en del ord som innan hade bindestreck
* En del nya versttningar r tillagda.
* Gamla versttningar borttagna
===================================================================================
Problem!
Namespace och slot: har de nn hygglig svensk versttning???
Skicka grna synpunkter.
===================================================================================
*/
#ifndef TRANSLATOR_SE_H #ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H #define TRANSLATOR_SE_H
#include <qstring.h> #include "translator.h"
class TranslatorSwedish : public Translator class TranslatorSwedish : public Translator
{ {
public: public:
QString latexBabelPackage() QCString latexBabelPackage()
{ return "swedish"; } { return "swedish"; }
QString trInherits()
{ return "rver"; } QCString trRelatedFunctions()
QString trAnd()
{ return "och"; }
QString trInheritedBy()
{ return "rvd av"; }
QString trRelatedFunctions()
{ return "Beslktade funktioner"; } { return "Beslktade funktioner"; }
QString trRelatedSubscript()
QCString trRelatedSubscript()
{ return "(Observera att dessa inte r medlemsfunktioner)"; } { return "(Observera att dessa inte r medlemsfunktioner)"; }
QString trDetailedDescription()
QCString trDetailedDescription()
{ return "Detaljerad beskrivning"; } { return "Detaljerad beskrivning"; }
QString trMemberTypedefDocumentation()
QCString trMemberTypedefDocumentation()
{ return "Dokumentation ver typdefinierade medlemmar"; } { return "Dokumentation ver typdefinierade medlemmar"; }
QString trMemberEnumerationDocumentation()
QCString trMemberEnumerationDocumentation()
{ return "Dokumentation ver egenupprknande medlemmar"; } { return "Dokumentation ver egenupprknande medlemmar"; }
QString trMemberFunctionDocumentation()
QCString trMemberFunctionDocumentation()
{ return "Dokumentation ver medlemsfunktioner"; } { return "Dokumentation ver medlemsfunktioner"; }
QString trMemberDataDocumentation()
QCString trMemberDataDocumentation()
{ return "Dokumentation ver datamedlemmar"; } { return "Dokumentation ver datamedlemmar"; }
QString trGeneratedFrom(const char *s,bool single)
QCString trGeneratedFrom(const char *s,bool single)
{ {
QString result=(QString)"Dokumentationen fr denna"+s+
QCString result=(QCString)"Dokumentationen fr denna"+s+
" r skapad utifrn fljande fil"; " r skapad utifrn fljande fil";
if (single) result+=":"; else result+="er:"; if (single) result+=":"; else result+="er:";
return result; return result;
} }
QString trMore() QCString trMore()
{ return "Mer..."; } { return "Mer..."; }
QString trReference()
{ return "Referens"; } QCString trListOfAllMembers()
QString trListOfAllMembers()
{ return "Lista ver alla medlemmar."; } { return "Lista ver alla medlemmar."; }
QString trMemberList()
QCString trMemberList()
{ return "Medlemslista"; } { return "Medlemslista"; }
QString trThisIsTheListOfAllMembers()
{ return "Det hr r en fullstndig lista ver medlemmar fr"; } QCString trThisIsTheListOfAllMembers()
QString trIncludingInheritedMembers() { return "Det hr r en fullstndig lista ver medlemmar fr "; }
{ return "med alla rvda medlemmar."; }
QString trGeneratedAutomatically(const char *s) QCString trIncludingInheritedMembers()
{ QString result="Automatiskt skapad av Doxygen"; { return " med alla rvda medlemmar."; }
if (s) result+=(QString)" fr "+s;
QCString trGeneratedAutomatically(const char *s)
{ QCString result="Automatiskt skapad av Doxygen";
if (s) result+=(QCString)" fr "+s;
result+=" frn kllkoden."; result+=" frn kllkoden.";
return result; return result;
} }
QString trEnumName()
QCString trEnumName()
{ return "enum namn"; } { return "enum namn"; }
QString trEnumValue()
QCString trEnumValue()
{ return "enum vrde"; } { return "enum vrde"; }
QString trDefinedIn()
{ return "deklarerad i"; } QCString trDefinedIn()
QString trIncludeFile() { return "definierad i"; }
{ return "Inkluderingsfil"; }
QString trVerbatimText(const char *f)
{ return (QString)"Detta r den ordagranna texten frn inkluderingsfilen"+f; } QCString trVerbatimText(const char *f)
QString trModules() { return (QCString)"Detta r den ordagranna texten frn inkluderingsfilen "+f; }
QCString trModules()
{ return "Moduler"; } { return "Moduler"; }
QString trClassHierarchy()
QCString trClassHierarchy()
{ return "Klasshierarki"; } { return "Klasshierarki"; }
QString trCompoundList()
QCString trCompoundList()
{ return "Sammansatt klasslista"; } { return "Sammansatt klasslista"; }
QString trFileList()
QCString trFileList()
{ return "Fillista"; } { return "Fillista"; }
QString trHeaderFiles()
QCString trHeaderFiles()
{ return "Headerfiler"; } { return "Headerfiler"; }
QString trCompoundMembers()
QCString trCompoundMembers()
{ return "Sammansatta klassmedlemmar"; } { return "Sammansatta klassmedlemmar"; }
QString trFileMembers()
QCString trFileMembers()
{ return "Filmedlemmar"; } { return "Filmedlemmar"; }
QString trRelatedPages()
QCString trRelatedPages()
{ return "Beslktade sidor"; } { return "Beslktade sidor"; }
QString trExamples()
QCString trExamples()
{ return "Exempel"; } { return "Exempel"; }
QString trSearch()
QCString trSearch()
{ return "Sk"; } { return "Sk"; }
QString trClassHierarchyDescription()
QCString trClassHierarchyDescription()
{ return "Denna lista ver arv r grovt, men inte helt, " { return "Denna lista ver arv r grovt, men inte helt, "
"sorterad i alfabetisk ordning:"; "sorterad i alfabetisk ordning:";
} }
QString trFileListDescription(bool extractAll)
QCString trFileListDescription(bool extractAll)
{ {
QString result="Hr fljer en lista ver alla "; QCString result="Hr fljer en lista ver alla ";
if (!extractAll) result+="dokumenterade "; if (!extractAll) result+="dokumenterade ";
result+="filer, med en kort beskrivning:"; result+="filer, med en kort beskrivning:";
return result; return result;
} }
QString trCompoundListDescription()
{ return "Hr fljer klasserna, structerna och " QCString trCompoundListDescription()
{ return "Hr fljer klasserna, strukterna och "
"unionerna med en kort beskrivning:"; "unionerna med en kort beskrivning:";
} }
QString trCompoundMembersDescription(bool extractAll)
QCString trCompoundMembersDescription(bool extractAll)
{ {
QString result="Hr fljer en lista ver alla ";
QCString result="Hr fljer en lista ver alla ";
if (!extractAll) result+="dokumenterade "; if (!extractAll) result+="dokumenterade ";
result+="klassmedlemmar med lnkar till "; result+="klassmedlemmar med lnkar till ";
if (extractAll) result+="klassdokumentationen fr varje medlem:"; if (extractAll) result+="klassdokumentationen fr varje medlem:";
else result+="klasserna som de tillhr:"; else result+="klasserna som de tillhr:";
return result; return result;
} }
QString trFileMembersDescription(bool extractAll)
QCString trFileMembersDescription(bool extractAll)
{ {
QString result="Hr fljer en lista ver alla "; QCString result="Hr fljer en lista ver alla ";
if (!extractAll) result+="dokumenterade "; if (!extractAll) result+="dokumenterade ";
result+="filmedlemmar med lnkar till "; result+="filmedlemmar med lnkar till ";
if (extractAll) result+="dokumentationsfilen fr varje medlem:"; if (extractAll) result+="dokumentationsfilen fr varje medlem:";
else result+="filerna som de tillhr:"; else result+="filerna som de tillhr:";
return result; return result;
} }
QString trHeaderFilesDescription()
QCString trHeaderFilesDescription()
{ return "Hr fljer headerfilerna som API:n bestr av:"; } { return "Hr fljer headerfilerna som API:n bestr av:"; }
QString trExamplesDescription()
QCString trExamplesDescription()
{ return "Hr fljer en lista med alla exempel:"; } { return "Hr fljer en lista med alla exempel:"; }
QString trRelatedPagesDescription()
{ return "Hr fljer en lista ver alla relaterade dokumentationssidor:"; QCString trRelatedPagesDescription()
} QString trModulesDescription() { return "Hr fljer en lista ver alla beslktade dokumentationssidor:";}
QCString trModulesDescription()
{ return "Hr fljer en lista ver alla moduler:"; } { return "Hr fljer en lista ver alla moduler:"; }
QString trNoDescriptionAvailable()
QCString trNoDescriptionAvailable()
{ return "Beskrivning saknas"; } { return "Beskrivning saknas"; }
QString trDocumentation() QCString trDocumentation()
{ return "Dokumentation"; } { return "Dokumentation"; }
QString trModuleIndex()
{ return "Modul Index"; } QCString trModuleIndex()
QString trHierarchicalIndex() { return "Modulindex"; }
QCString trHierarchicalIndex()
{ return "Hierarkiskt Index"; } { return "Hierarkiskt Index"; }
QString trCompoundIndex()
QCString trCompoundIndex()
{ return "Sammansatt Index"; } { return "Sammansatt Index"; }
QString trFileIndex()
{ return "Fil Index"; } QCString trFileIndex()
QString trModuleDocumentation() { return "Filindex"; }
QCString trModuleDocumentation()
{ return "Dokumentation ver moduler"; } { return "Dokumentation ver moduler"; }
QString trClassDocumentation()
QCString trClassDocumentation()
{ return "Dokumentation ver klasser"; } { return "Dokumentation ver klasser"; }
QString trFileDocumentation()
QCString trFileDocumentation()
{ return "Dokumentation ver filer"; } { return "Dokumentation ver filer"; }
QString trExampleDocumentation()
QCString trExampleDocumentation()
{ return "Dokumentation ver exempel"; } { return "Dokumentation ver exempel"; }
QString trPageDocumentation()
QCString trPageDocumentation()
{ return "Dokumentation av sidor"; } { return "Dokumentation av sidor"; }
QString trReferenceManual()
{ return "Uppslagsbok"; }
QString trDefines() QCString trReferenceManual()
{ return "Referensmanual"; }
QCString trDefines()
{ return "Definitioner"; } { return "Definitioner"; }
QString trFuncProtos() QCString trFuncProtos()
{ return "Funktionsprototyper"; } { return "Funktionsprototyper"; }
QString trTypedefs() QCString trTypedefs()
{ return "Typdefinitioner"; } { return "Typdefinitioner"; }
QString trEnumerations() QCString trEnumerations()
{ return "Egenupprknande typer"; } { return "Egenupprknande typer"; }
QString trFunctions() QCString trFunctions()
{ return "Funktioner"; } { return "Funktioner"; }
QString trVariables()
QCString trVariables()
{ return "Variabler"; } { return "Variabler"; }
QString trEnumerationValues()
{ return "Egenupprknade vrden"; } QCString trEnumerationValues()
QString trReimplementedFrom() { return "Egenupprknade typers vrden"; }
{ return "teranvnd frn"; }
QString trReimplementedIn() QCString trAuthor()
{ return "teranvnd i"; }
QString trAuthor()
{ return "Frfattare"; } { return "Frfattare"; }
QString trDefineDocumentation()
QCString trDefineDocumentation()
{ return "Dokumentation ver definitioner"; } { return "Dokumentation ver definitioner"; }
QString trFunctionPrototypeDocumentation()
QCString trFunctionPrototypeDocumentation()
{ return "Dokumentation ver funktionsprototyper"; } { return "Dokumentation ver funktionsprototyper"; }
QString trTypedefDocumentation()
QCString trTypedefDocumentation()
{ return "Dokumentation ver typdefinitioner"; } { return "Dokumentation ver typdefinitioner"; }
QString trEnumerationTypeDocumentation()
{ return "Dokumentation ver egenupprknande typer (enum)"; } QCString trEnumerationTypeDocumentation()
QString trEnumerationValueDocumentation() { return "Dokumentation ver egenupprknande typer"; }
QCString trEnumerationValueDocumentation()
{ return "Dokumentation ver egenupprknande typers vrden"; } { return "Dokumentation ver egenupprknande typers vrden"; }
QString trFunctionDocumentation()
QCString trFunctionDocumentation()
{ return "Dokumentation ver funktioner"; } { return "Dokumentation ver funktioner"; }
QString trVariableDocumentation()
QCString trVariableDocumentation()
{ return "Dokumentation ver variabler"; } { return "Dokumentation ver variabler"; }
QString trCompounds()
QCString trCompounds()
{ return "Sammansttning"; } { return "Sammansttning"; }
QString trFiles()
QCString trFiles()
{ return "Filer"; } { return "Filer"; }
QString trGeneratedAt(const char *date,const char *projName)
{ QCString trGeneratedAt(const char *date,const char *projName)
QString result=(QString)"Skapad "+date; {
if (projName) result+=(QString)" fr "+projName; QCString result=(QCString)"Skapad "+date;
result+=(QString)" av"; if (projName) result+=(QCString)" fr "+projName;
result+=(QCString)" av";
return result; return result;
} }
QString trWrittenBy()
QCString trWrittenBy()
{ {
return "skriven av"; return "skriven av";
} }
QString trClassDiagram(const char *clName)
QCString trClassDiagram(const char *clName)
{ {
return (QString)"Klass-diagram fr "+clName; return (QCString)"Klassdiagram fr "+clName;
} }
QString trForInternalUseOnly()
QCString trForInternalUseOnly()
{ return "Endast fr internt bruk."; } { return "Endast fr internt bruk."; }
QString trReimplementedForInternalReasons()
{ return "Omskriven av intern anledning ; " QCString trReimplementedForInternalReasons()
"API:n pverkas inte."; { return "Omskriven av intern anledning ; API:n pverkas inte.";}
}
QString trWarning() QCString trWarning()
{ return "Varning"; } { return "Varning"; }
QString trBugsAndLimitations()
QCString trBugsAndLimitations()
{ return "Fel och begrnsningar"; } { return "Fel och begrnsningar"; }
QString trVersion()
QCString trVersion()
{ return "Version"; } { return "Version"; }
QString trDate()
QCString trDate()
{ return "Datum"; } { return "Datum"; }
QString trAuthors()
QCString trAuthors()
{ return "Frfattare"; } { return "Frfattare"; }
QString trReturns()
QCString trReturns()
{ return "Returnerar"; } { return "Returnerar"; }
QString trSeeAlso()
QCString trSeeAlso()
{ return "Se ven"; } { return "Se ven"; }
QString trParameters()
QCString trParameters()
{ return "Parametrar"; } { return "Parametrar"; }
QString trExceptions()
QCString trExceptions()
{ return "Undantag"; } { return "Undantag"; }
QString trGeneratedBy()
QCString trGeneratedBy()
{ return "Skapad av"; } { return "Skapad av"; }
// new since 0.49-990307
virtual QCString trNamespaceList()
{ return "Namespacelista"; }
virtual QCString trNamespaceListDescription(bool extractAll)
{
QCString result="Hr r en lista ver alla ";
if (!extractAll) result+="dokumenterade ";
result+="namespaces med en kort frklaring:";
return result;
}
virtual QCString trFriends()
{ return "Vnner"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
virtual QCString trRelatedFunctionDocumentation()
{ return "Vnners och beslktade funktioners dokumentation"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType)
{
QCString result=(QCString)clName+" ";
switch(compType)
{
case ClassDef::Class: result+=" Klass"; break;
case ClassDef::Struct: result+=" Strukt"; break;
case ClassDef::Union: result+=" Union"; break;
}
result+="referens";
return result;
}
virtual QCString trFileReference(const char *fileName)
{
QCString result=fileName;
result+=" filreferens";
return result;
}
virtual QCString trNamespaceReference(const char *namespaceName)
{
QCString result=namespaceName;
result+=" namespacereferens";
return result;
}
virtual QCString trPublicMembers()
{ return "Publika medlemmar"; }
virtual QCString trPublicSlots()
{ return "Publika slots"; }
virtual QCString trSignals()
{ return "Signaler"; }
virtual QCString trStaticPublicMembers()
{ return "Statiska publika medlemmar"; }
virtual QCString trProtectedMembers()
{ return "Skyddade medlemmar"; }
virtual QCString trProtectedSlots()
{ return "Skyddade slots"; }
virtual QCString trStaticProtectedMembers()
{ return "Statiska skyddade medlemmar"; }
virtual QCString trPrivateMembers()
{ return "Privata medlemmar"; }
virtual QCString trPrivateSlots()
{ return "Privata slots"; }
virtual QCString trStaticPrivateMembers()
{ return "Statiska privata medlemmar"; }
// end of member sections
virtual QCString trWriteList(int numEntries)
{
// this function is used to produce a comma-separated list of items.
// use generateMarker(i) to indicate where item i should be put.
QCString result;
int i;
// the inherits list contain `numEntries' classes
for (i=0;i<numEntries;i++)
{
// use generateMarker to generate placeholders for the class links!
result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
if (i!=numEntries-1) // not the last entry, so we need a separator
{
if (i<numEntries-2) // not the fore last entry
result+=", ";
else // the fore last entry
result+=", och ";
}
}
return result;
}
virtual QCString trInheritsList(int numEntries)
// used in class documentation to produce a list of base classes,
// if class diagrams are disabled.
{
return "rver "+trWriteList(numEntries)+".";
}
virtual QCString trInheritedByList(int numEntries)
// used in class documentation to produce a list of super classes,
// if class diagrams are disabled.
{
return "rvd av "+trWriteList(numEntries)+".";
}
virtual QCString trReimplementedFromList(int numEntries)
// used in member documentation blocks to produce a list of
// members that are hidden by this one.
{
return "terskapad frn "+trWriteList(numEntries)+".";
}
virtual QCString trReimplementedInList(int numEntries)
{
// used in member documentation blocks to produce a list of
// all member that overwrite the implementation of this member.
return "terskapad i "+trWriteList(numEntries)+".";
}
virtual QCString trNamespaceMembers()
{ return "Namespacemedlemmar"; }
virtual QCString trNamespaceMemberDescription(bool extractAll)
{
QCString result="Hr r en lista ver alla ";
if (!extractAll) result+="dokumenterade ";
result+="namespacemedlemmar med lnkar till ";
if (extractAll)
result+=" namespace-dokumentationen fr varje medlem:";
else
result+="de namespaces de tillhr:";
return result;
}
virtual QCString trNamespaceIndex()
{ return "Namespaceindex"; }
virtual QCString trNamespaceDocumentation()
{ return "Namespace-dokumentation"; }
}; };
#endif #endif
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <qregexp.h>
#include <qstring.h>
#include <ctype.h> #include <ctype.h>
#include "qtbc.h"
#include <qregexp.h>
#include "util.h" #include "util.h"
#include "message.h" #include "message.h"
#include "classdef.h" #include "classdef.h"
...@@ -37,9 +38,22 @@ bool isId(char c) ...@@ -37,9 +38,22 @@ bool isId(char c)
return c=='_' || isalnum(c); return c=='_' || isalnum(c);
} }
QString generateMarker(int id) // strip annonymous part of the scope
QCString stripAnnonymousScope(const QCString &s)
{
QCString result=s;
int i;
while (!result.isEmpty() && result.at(0)=='@' && (i=result.find("::"))!=-1)
{
result=result.right(result.length()-i-2);
}
return result;
}
QCString generateMarker(int id)
{ {
QString result; QCString result;
result.sprintf("@%d\n",id); result.sprintf("@%d\n",id);
return result; return result;
} }
...@@ -49,7 +63,7 @@ QString generateMarker(int id) ...@@ -49,7 +63,7 @@ QString generateMarker(int id)
// If anyone knows or uses another extension please let me know :-) // If anyone knows or uses another extension please let me know :-)
int guessSection(const char *name) int guessSection(const char *name)
{ {
QString n=((QString)name).lower(); QCString n=((QCString)name).lower();
if (n.right(2)==".c" || if (n.right(2)==".c" ||
n.right(3)==".cc" || n.right(3)==".cc" ||
n.right(4)==".cxx" || n.right(4)==".cxx" ||
...@@ -66,7 +80,7 @@ int guessSection(const char *name) ...@@ -66,7 +80,7 @@ int guessSection(const char *name)
} }
//QString resolveDefines(const char *n) //QCString resolveDefines(const char *n)
//{ //{
// return n; // return n;
// if (n) // if (n)
...@@ -81,9 +95,9 @@ int guessSection(const char *name) ...@@ -81,9 +95,9 @@ int guessSection(const char *name)
// return 0; // return 0;
//} //}
QString resolveTypedefs(const QString &n) QCString resolveTypedefs(const QCString &n)
{ {
QString *subst=typedefDict[n]; QCString *subst=typedefDict[n];
if (subst && !subst->isNull()) if (subst && !subst->isNull())
{ {
return *subst; return *subst;
...@@ -97,7 +111,7 @@ QString resolveTypedefs(const QString &n) ...@@ -97,7 +111,7 @@ QString resolveTypedefs(const QString &n)
ClassDef *getClass(const char *name) ClassDef *getClass(const char *name)
{ {
if (!name) return 0; if (!name) return 0;
//QString key=resolveTypedefs(resolveDefines(name)); //QCString key=resolveTypedefs(resolveDefines(name));
//Define *def=defineDict[key]; //Define *def=defineDict[key];
//if (def && def->nargs==0 && def->definition.length()>0) // normal define //if (def && def->nargs==0 && def->definition.length()>0) // normal define
// key=def->definition; // use substitution // key=def->definition; // use substitution
...@@ -105,10 +119,10 @@ ClassDef *getClass(const char *name) ...@@ -105,10 +119,10 @@ ClassDef *getClass(const char *name)
return classDict[resolveTypedefs(name)]; return classDict[resolveTypedefs(name)];
} }
QString removeRedundantWhiteSpace(const QString &s) QCString removeRedundantWhiteSpace(const QCString &s)
{ {
if (s.length()==0) return s; if (s.length()==0) return s;
QString result; QCString result;
uint i; uint i;
for (i=0;i<s.length();i++) for (i=0;i<s.length();i++)
{ {
...@@ -152,11 +166,11 @@ void writeTemplatePrefix(OutputList &ol,ArgumentList *al) ...@@ -152,11 +166,11 @@ void writeTemplatePrefix(OutputList &ol,ArgumentList *al)
if (manEnabled) ol.enable(OutputGenerator::Man); if (manEnabled) ol.enable(OutputGenerator::Man);
} }
QString addTemplateNames(const QString &s,const QString &n,const QString &t) QCString addTemplateNames(const QCString &s,const QCString &n,const QCString &t)
{ {
//printf("addTemplateNames(%s)\n",s.data()); //printf("addTemplateNames(%s)\n",s.data());
QString result; QCString result;
QString clRealName=n; QCString clRealName=n;
int p=0,i; int p=0,i;
if ((i=clRealName.find('<'))!=-1) if ((i=clRealName.find('<'))!=-1)
{ {
...@@ -183,11 +197,11 @@ QString addTemplateNames(const QString &s,const QString &n,const QString &t) ...@@ -183,11 +197,11 @@ QString addTemplateNames(const QString &s,const QString &n,const QString &t)
return result; return result;
} }
static void linkifyText(OutputList &ol,const char *clName,const char *name,const char *text) static void linkifyText(OutputList &ol,const char *scName,const char *name,const char *text)
{ {
//printf("class %s name %s Text: %s\n",clName,name,text); //printf("scope=`%s' name=`%s' Text: `%s'\n",scName,name,text);
QRegExp regExp("[a-z_A-Z0-9:<>]+"); QRegExp regExp("[a-z_A-Z0-9:<>]+");
QString txtStr=text; QCString txtStr=text;
OutputList result(&ol); OutputList result(&ol);
int matchLen; int matchLen;
int index=0; int index=0;
...@@ -199,55 +213,86 @@ static void linkifyText(OutputList &ol,const char *clName,const char *name,const ...@@ -199,55 +213,86 @@ static void linkifyText(OutputList &ol,const char *clName,const char *name,const
// add non-word part to the result // add non-word part to the result
result.docify(txtStr.mid(skipIndex,newIndex-skipIndex)); result.docify(txtStr.mid(skipIndex,newIndex-skipIndex));
// get word from string // get word from string
QString word=txtStr.mid(newIndex,matchLen); QCString word=txtStr.mid(newIndex,matchLen);
ClassDef *cd=0; ClassDef *cd=0;
FileDef *fd=0; FileDef *fd=0;
MemberDef *md=0; MemberDef *md=0;
NamespaceDef *nd=0; NamespaceDef *nd=0;
QCString scopeName=scName;
QCString searchName=name;
//printf("word=`%s' scopeName=`%s' searchName=`%s'\n",
// word.data(),scopeName.data(),searchName.data());
// check if `word' is a documented class name // check if `word' is a documented class name
if (word.length()>0 && word!=name && word!=clName) if (word.length()>0 &&
word.right(searchName.length())!=searchName &&
word!=scopeName.right(word.length())
)
{ {
if ((cd=getClass(word))) //printf("Searching...\n");
int scopeOffset=scopeName.length();
bool found=FALSE;
do // for each scope (starting with full scope and going to empty scope)
{ {
// add link to the result QCString fullName = word.copy();
if (cd->isVisible()) if (scopeOffset>0)
{ {
result.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,word); fullName.prepend(scopeName.left(scopeOffset)+"::");
} }
else //printf("Trying class %s\n",fullName.data());
if ((cd=getClass(fullName)))
{ {
result.docify(word); // add link to the result
if (cd->isVisible())
{
result.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,word);
found=TRUE;
}
} }
}
else if (getDefs(word,clName,0,md,cd,fd,nd) && md->hasDocumentation()) if (scopeOffset==0)
{
scopeOffset=-1;
}
else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1)
{
scopeOffset=0;
}
} while (!found && scopeOffset>=0);
if (!found &&
getDefs(scName,word,0,md,cd,fd,nd) &&
(md->isTypedef() || md->isEnumerate()) &&
md->hasDocumentation()
)
{ {
if (cd && cd->isVisible() && !md->isFunction()) // word is a member of cd if (cd && cd->isVisible()) // fullName is a member of cd
{ {
result.writeObjectLink(cd->getReference(), result.writeObjectLink(cd->getReference(),
cd->getOutputFileBase(),md->anchor(),word); cd->getOutputFileBase(),md->anchor(),word);
found=TRUE;
} }
else if (nd && nd->hasDocumentation()) else if (nd && nd->hasDocumentation())
{ {
result.writeObjectLink(nd->getReference(), result.writeObjectLink(nd->getReference(),
nd->getOutputFileBase(),md->anchor(),word); nd->getOutputFileBase(),md->anchor(),word);
found=TRUE;
} }
else if (fd && fd->hasDocumentation()) // word is a global in file fd else if (fd && fd->hasDocumentation()) // fullName is a global in file fd
{ {
result.writeObjectLink(fd->getReference(), result.writeObjectLink(fd->getReference(),
fd->getOutputFileBase(),md->anchor(),word); fd->getOutputFileBase(),md->anchor(),word);
} found=TRUE;
else // add word to the result
{
result.docify(word);
} }
} }
else // add word to the result
if (!found) // add word to the result
{ {
result.docify(word); result.docify(word);
} }
} }
else // add word to the result else
{ {
result.docify(word); result.docify(word);
} }
...@@ -261,13 +306,13 @@ static void linkifyText(OutputList &ol,const char *clName,const char *name,const ...@@ -261,13 +306,13 @@ static void linkifyText(OutputList &ol,const char *clName,const char *name,const
} }
static void writeDefArgumentList(OutputList &ol,ClassDef *cd, static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
const QString &scopeName,MemberDef *md) const QCString &scopeName,MemberDef *md)
{ {
ArgumentList *argList=md->argumentList(); ArgumentList *argList=md->argumentList();
if (argList==0) return; // member has no function like argument list if (argList==0) return; // member has no function like argument list
ol.docify(" ("); // start argument list ol.docify(" ("); // start argument list
Argument *a=argList->first(); Argument *a=argList->first();
QString cName; QCString cName;
if (cd && cd->templateArguments()) if (cd && cd->templateArguments())
{ {
cName=cd->getTemplateNameString(); cName=cd->getTemplateNameString();
...@@ -278,13 +323,13 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -278,13 +323,13 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
int vp; int vp;
if ((vp=a->type.find(re))!=-1) // argument type is a function pointer if ((vp=a->type.find(re))!=-1) // argument type is a function pointer
{ {
QString n=a->type.left(vp); QCString n=a->type.left(vp);
if (cName.length()>0) n=addTemplateNames(n,cd->name(),cName); if (cName.length()>0) n=addTemplateNames(n,cd->name(),cName);
linkifyText(ol,scopeName,md->name(),n); linkifyText(ol,scopeName,md->name(),n);
} }
else // non-function pointer type else // non-function pointer type
{ {
QString n=a->type; QCString n=a->type;
if (cName.length()>0) n=addTemplateNames(n,cd->name(),cName); if (cName.length()>0) n=addTemplateNames(n,cd->name(),cName);
linkifyText(ol,scopeName,md->name(),n); linkifyText(ol,scopeName,md->name(),n);
} }
...@@ -306,7 +351,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -306,7 +351,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
} }
if (a->defval.length()>0) // write the default value if (a->defval.length()>0) // write the default value
{ {
QString n=a->defval; QCString n=a->defval;
if (cName.length()>0) n=addTemplateNames(n,cd->name(),cName); if (cName.length()>0) n=addTemplateNames(n,cd->name(),cName);
ol.docify(" = "); ol.docify(" = ");
linkifyText(ol,scopeName,md->name(),n); linkifyText(ol,scopeName,md->name(),n);
...@@ -327,7 +372,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd, ...@@ -327,7 +372,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
void writeExample(OutputList &ol,ExampleList *el) void writeExample(OutputList &ol,ExampleList *el)
{ {
QString exampleLine=theTranslator->trWriteList(el->count()); QCString exampleLine=theTranslator->trWriteList(el->count());
QRegExp marker("@[0-9]+"); QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen; int index=0,newIndex,matchLen;
...@@ -347,9 +392,9 @@ void writeExample(OutputList &ol,ExampleList *el) ...@@ -347,9 +392,9 @@ void writeExample(OutputList &ol,ExampleList *el)
QString argListToString(ArgumentList *al) QCString argListToString(ArgumentList *al)
{ {
QString result; QCString result;
if (al==0) return result; if (al==0) return result;
Argument *a=al->first(); Argument *a=al->first();
result+="("; result+="(";
...@@ -416,7 +461,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) ...@@ -416,7 +461,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
{ {
bool manEnabled = ol.isEnabled(OutputGenerator::Man); bool manEnabled = ol.isEnabled(OutputGenerator::Man);
bool texEnabled = ol.isEnabled(OutputGenerator::Latex); bool texEnabled = ol.isEnabled(OutputGenerator::Latex);
QString extLink,absPath; QCString extLink,absPath;
if (ext) { extLink="_doc:"; absPath="/"; } if (ext) { extLink="_doc:"; absPath="/"; }
if (manEnabled) ol.disable(OutputGenerator::Man); if (manEnabled) ol.disable(OutputGenerator::Man);
if (texEnabled) ol.disable(OutputGenerator::Latex); if (texEnabled) ol.disable(OutputGenerator::Latex);
...@@ -456,7 +501,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) ...@@ -456,7 +501,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
parseText(ol,theTranslator->trFileList()); parseText(ol,theTranslator->trFileList());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (includeFiles.count()>0 && verbatimHeaderFlag) if (includeFiles.count()>0 && Config::verbatimHeaderFlag)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem(extLink,absPath+"headers.html"); ol.startQuickIndexItem(extLink,absPath+"headers.html");
...@@ -498,7 +543,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) ...@@ -498,7 +543,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
parseText(ol,theTranslator->trExamples()); parseText(ol,theTranslator->trExamples());
ol.endQuickIndexItem(); ol.endQuickIndexItem();
} }
if (searchEngineFlag) if (Config::searchEngineFlag)
{ {
if (!compact) ol.writeListItem(); if (!compact) ol.writeListItem();
ol.startQuickIndexItem("_cgi:",""); ol.startQuickIndexItem("_cgi:","");
...@@ -521,7 +566,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext) ...@@ -521,7 +566,7 @@ void writeQuickLinks(OutputList &ol,bool compact,bool ext)
void startFile(OutputList &ol,const char *name,const char *title,bool external) void startFile(OutputList &ol,const char *name,const char *title,bool external)
{ {
ol.startFile(name,title,external); ol.startFile(name,title,external);
if (!noIndexFlag) writeQuickLinks(ol,TRUE,external); if (!Config::noIndexFlag) writeQuickLinks(ol,TRUE,external);
} }
void endFile(OutputList &ol,bool external) void endFile(OutputList &ol,bool external)
...@@ -531,15 +576,15 @@ void endFile(OutputList &ol,bool external) ...@@ -531,15 +576,15 @@ void endFile(OutputList &ol,bool external)
if (latexEnabled) ol.disable(OutputGenerator::Latex); if (latexEnabled) ol.disable(OutputGenerator::Latex);
if (manEnabled) ol.disable(OutputGenerator::Man); if (manEnabled) ol.disable(OutputGenerator::Man);
ol.writeFooter(0,external); // write the footer ol.writeFooter(0,external); // write the footer
if (footerFile.length()==0) if (Config::footerFile.length()==0)
{ {
parseText(ol,theTranslator->trGeneratedAt( parseText(ol,theTranslator->trGeneratedAt(
dateToString(TRUE), dateToString(TRUE),
projectName Config::projectName
)); ));
} }
ol.writeFooter(1,external); // write the link to the picture ol.writeFooter(1,external); // write the link to the picture
if (footerFile.length()==0) if (Config::footerFile.length()==0)
{ {
parseText(ol,theTranslator->trWrittenBy()); parseText(ol,theTranslator->trWrittenBy());
} }
...@@ -555,14 +600,14 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd, ...@@ -555,14 +600,14 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd,
{ {
int i,l; int i,l;
bool hasDocs=md->hasDocumentation(); bool hasDocs=md->hasDocumentation();
if ((!hasDocs && hideMemberFlag) || if ((!hasDocs && Config::hideMemberFlag) ||
(hideMemberFlag && (Config::hideMemberFlag &&
md->documentation().isEmpty() && md->documentation().isEmpty() &&
!briefMemDescFlag && !Config::briefMemDescFlag &&
!repeatBriefFlag !Config::repeatBriefFlag
) )
) return; ) return;
QString type=md->typeString(); QCString type=md->typeString();
QRegExp r("@[0-9]+"); QRegExp r("@[0-9]+");
if ((i=r.match(type,0,&l))==-1 || !md->enumUsed()) if ((i=r.match(type,0,&l))==-1 || !md->enumUsed())
{ {
...@@ -571,22 +616,23 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd, ...@@ -571,22 +616,23 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd,
// strip `friend' keyword from type // strip `friend' keyword from type
if (type.left(7)=="friend ") type=type.right(type.length()-7); if (type.left(7)=="friend ") type=type.right(type.length()-7);
if (genTagFile.length()>0) if (Config::genTagFile.length()>0)
{ {
tagFile << md->name() << " " << md->anchor() << " \"" tagFile << md->name() << " " << md->anchor() << " \""
<< md->argsString() << "\"\n"; << md->argsString() << "\"\n";
} }
QString cname; QCString cname;
if (cd) cname=cd->name(); if (cd) cname=cd->name();
else if (nd) cname=nd->name(); else if (nd) cname=nd->name();
else if (fd) cname=fd->name(); else if (fd) cname=fd->name();
ol.startMemberItem();
// If there is no detailed description we need to write the anchor here. // If there is no detailed description we need to write the anchor here.
bool detailsVisible = md->detailsAreVisible(); bool detailsVisible = md->detailsAreVisible();
if (!detailsVisible && !extractAllFlag) if (!detailsVisible && !Config::extractAllFlag)
{ {
QString doxyName=md->name().copy(); QCString doxyName=md->name().copy();
if (!cname.isEmpty()) doxyName.prepend(cname+"::"); if (!cname.isEmpty()) doxyName.prepend(cname+"::");
ol.writeDoxyAnchor(cname,md->anchor(),doxyName); ol.writeDoxyAnchor(cname,md->anchor(),doxyName);
ol.addToIndex(md->name(),cname); ol.addToIndex(md->name(),cname);
...@@ -601,35 +647,37 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd, ...@@ -601,35 +647,37 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd,
ol.addToIndex(cname,md->name()); ol.addToIndex(cname,md->name());
ol.writeLatexLabel(cname,md->anchor()); ol.writeLatexLabel(cname,md->anchor());
} }
ol.startMemberItem();
// write type // write type
if (i!=-1) if (i!=-1)
{ {
QString newType = type.left(i) + " { ... } " + QCString newType = type.left(i) + " { ... } " +
type.right(type.length()-i-l); type.right(type.length()-i-l);
type = newType; type = newType;
ol.docify(type); //ol.docify(type);
linkifyText(ol,cname,md->name(),type);
} }
else else
{ {
ol.docify(type); //ol.docify(type);
linkifyText(ol,cname,md->name(),type);
}
QCString name=md->name().copy();
bool htmlOn = ol.isEnabled(OutputGenerator::Html);
if (htmlOn && Config::htmlAlignMemberFlag && type.length()>0)
{
ol.disable(OutputGenerator::Html);
}
if (!type.isEmpty()) ol.docify(" ");
if (htmlOn)
{
ol.enable(OutputGenerator::Html);
} }
QString name=md->name().copy();
if (type.length()>0) ol.writeString(" ");
ol.insertMemberAlign(); ol.insertMemberAlign();
// write name // write name
if ( extractAllFlag || if (md->hasDocumentation())
(md->briefDescription().isEmpty() || !briefMemDescFlag) &&
(!md->documentation().isEmpty() ||
(!md->briefDescription().isEmpty() &&
!briefMemDescFlag &&
repeatBriefFlag
)
)
)
{ {
//printf("writeLink %s->%d\n",name.data(),md->hasDocumentation()); //printf("writeLink %s->%d\n",name.data(),md->hasDocumentation());
writeLink(ol,cd,nd,fd,md,name); writeLink(ol,cd,nd,fd,md,name);
...@@ -643,7 +691,8 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd, ...@@ -643,7 +691,8 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd,
if (md->argsString()) if (md->argsString())
{ {
ol.writeString(" "); ol.writeString(" ");
ol.docify(md->argsString()); //ol.docify(md->argsString());
linkifyText(ol,cname,md->name(),md->argsString());
} }
if (md->excpString()) if (md->excpString())
...@@ -655,22 +704,21 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd, ...@@ -655,22 +704,21 @@ static void writeMemberDef(OutputList &ol, ClassDef *cd, NamespaceDef *nd,
ol.endMemberItem(); ol.endMemberItem();
// write brief description // write brief description
if (!md->briefDescription().isEmpty() && briefMemDescFlag) if (!md->briefDescription().isEmpty() && Config::briefMemDescFlag)
{ {
ol.startMemberDescription(); ol.startMemberDescription();
parseDoc(ol,cname,md->name(),md->briefDescription()); parseDoc(ol,cname,md->name(),md->briefDescription());
if (!md->documentation().isEmpty()) //if (!md->documentation().isEmpty())
{ //{
ol.disableAllBut(OutputGenerator::Html); // ol.disableAllBut(OutputGenerator::Html);
ol.endEmphasis(); // ol.endEmphasis();
ol.docify(" "); // ol.docify(" ");
ol.startTextLink(0,md->anchor()); // ol.startTextLink(0,md->anchor());
//ol.writeObjectLink(0,0,md->anchor()," More..."); // parseText(ol,theTranslator->trMore());
parseText(ol,theTranslator->trMore()); // ol.endTextLink();
ol.endTextLink(); // ol.startEmphasis();
ol.startEmphasis(); // ol.enableAll();
ol.enableAll(); //}
}
ol.endMemberDescription(); ol.endMemberDescription();
ol.newParagraph(); ol.newParagraph();
} }
...@@ -695,7 +743,9 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd, ...@@ -695,7 +743,9 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd,
} }
if (subtitle) if (subtitle)
{ {
ol.startMemberSubtitle();
parseText(ol,subtitle); parseText(ol,subtitle);
ol.endMemberSubtitle();
} }
if (!fd && !nd) ol.startMemberList(); if (!fd && !nd) ol.startMemberList();
...@@ -711,7 +761,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd, ...@@ -711,7 +761,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd,
for ( ; (md=mli.current()); ++mli ) for ( ; (md=mli.current()); ++mli )
{ {
if (md->isDefine() && if (md->isDefine() &&
(md->argsString() || md->hasDocumentation() || extractAllFlag) (md->argsString() || md->hasDocumentation() || Config::extractAllFlag)
) )
writeMemberDef(ol,cd,nd,fd,md); writeMemberDef(ol,cd,nd,fd,md);
} }
...@@ -763,34 +813,35 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd, ...@@ -763,34 +813,35 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd,
for ( ; (md=mli.current()) ; ++mli ) for ( ; (md=mli.current()) ; ++mli )
{ {
/*bool hasDocs=md->hasDocumentation();*/ /*bool hasDocs=md->hasDocumentation();*/
QString type=md->typeString(); QCString type=md->typeString();
type=type.stripWhiteSpace(); type=type.stripWhiteSpace();
if (md->isEnumerate() /*&& (hasDocs || !hideMemberFlag)*/) if (md->isEnumerate() /*&& (hasDocs || !Config::hideMemberFlag)*/)
{ {
if (!hideMemberFlag || // do not hide undocumented members or if (!Config::hideMemberFlag || // do not hide undocumented members or
!md->documentation().isEmpty() || // member has detailed descr. or !md->documentation().isEmpty() || // member has detailed descr. or
md->hasDocumentedEnumValues() || // member has documented enum vales. md->hasDocumentedEnumValues() || // member has documented enum vales.
briefMemDescFlag || // brief descr. is shown or Config::briefMemDescFlag || // brief descr. is shown or
repeatBriefFlag // brief descr. is repeated. Config::repeatBriefFlag // brief descr. is repeated.
) )
{ {
OutputList typeDecl(&ol); OutputList typeDecl(&ol);
QString name=md->name().copy(); QCString name=md->name().copy();
int i=name.findRev("::"); int i=name.findRev("::");
if (i!=-1) name=name.right(name.length()-i-2); // strip scope if (i!=-1) name=name.right(name.length()-i-2); // strip scope
if (name[0]!='@') // not an anonymous enum if (name[0]!='@') // not an anonymous enum
{ {
if (extractAllFlag || //if (Config::extractAllFlag ||
(md->briefDescription().isEmpty() || !briefMemDescFlag) && // (md->briefDescription().isEmpty() || !Config::briefMemDescFlag) &&
(!md->documentation().isEmpty() || md->hasDocumentedEnumValues() || // (!md->documentation().isEmpty() || md->hasDocumentedEnumValues() ||
(!md->briefDescription().isEmpty() && // (!md->briefDescription().isEmpty() &&
!briefMemDescFlag && // !Config::briefMemDescFlag &&
repeatBriefFlag // Config::repeatBriefFlag
) // )
) // )
) // )
if (md->hasDocumentation() || md->hasDocumentedEnumValues())
{ {
if (genTagFile.length()>0) if (Config::genTagFile.length()>0)
tagFile << md->name() << " " << md->anchor() tagFile << md->name() << " " << md->anchor()
<< " \"" << md->argsString() << "\""; << " \"" << md->argsString() << "\"";
writeLink(typeDecl,cd,nd,fd,md,name); writeLink(typeDecl,cd,nd,fd,md,name);
...@@ -811,7 +862,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd, ...@@ -811,7 +862,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd,
{ {
if (fmd->hasDocumentation()) if (fmd->hasDocumentation())
{ {
if (genTagFile.length()>0) if (Config::genTagFile.length()>0)
tagFile << fmd->name() << " " << fmd->anchor() tagFile << fmd->name() << " " << fmd->anchor()
<< " \"" << fmd->argsString() << "\""; << " \"" << fmd->argsString() << "\"";
writeLink(typeDecl,cd,nd,fd,fmd,fmd->name()); writeLink(typeDecl,cd,nd,fd,fmd,fmd->name());
...@@ -834,7 +885,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd, ...@@ -834,7 +885,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd,
{ {
for ( ; (vmd=vmli.current()) ; ++vmli) for ( ; (vmd=vmli.current()) ; ++vmli)
{ {
QString vtype=vmd->typeString(); QCString vtype=vmd->typeString();
if ((vtype.find(name))!=-1) enumVars++; if ((vtype.find(name))!=-1) enumVars++;
} }
} }
...@@ -845,25 +896,25 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd, ...@@ -845,25 +896,25 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd,
ol.insertMemberAlign(); ol.insertMemberAlign();
ol+=typeDecl; ol+=typeDecl;
ol.endMemberItem(); ol.endMemberItem();
//QString brief=md->briefDescription(); //QCString brief=md->briefDescription();
//brief=brief.stripWhiteSpace(); //brief=brief.stripWhiteSpace();
if (!md->briefDescription().isEmpty() && briefMemDescFlag) if (!md->briefDescription().isEmpty() && Config::briefMemDescFlag)
{ {
ol.startMemberDescription(); ol.startMemberDescription();
parseDoc(ol,cd?cd->name().data():0, parseDoc(ol,cd?cd->name().data():0,
md->name().data(),md->briefDescription()); md->name().data(),md->briefDescription());
if (!md->documentation().isEmpty() || md->hasDocumentedEnumValues()) //if (!md->documentation().isEmpty() || md->hasDocumentedEnumValues())
{ //{
ol.disableAllBut(OutputGenerator::Html); // ol.disableAllBut(OutputGenerator::Html);
ol.endEmphasis(); // ol.endEmphasis();
ol.docify(" "); // ol.docify(" ");
ol.startTextLink(0,md->anchor()); // ol.startTextLink(0,md->anchor());
//ol.writeObjectLink(0,0,md->anchor()," More..."); // //ol.writeObjectLink(0,0,md->anchor()," More...");
parseText(ol,theTranslator->trMore()); // parseText(ol,theTranslator->trMore());
ol.endTextLink(); // ol.endTextLink();
ol.startEmphasis(); // ol.startEmphasis();
ol.enableAll(); // ol.enableAll();
} //}
ol.endMemberDescription(); ol.endMemberDescription();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.newParagraph(); ol.newParagraph();
...@@ -904,7 +955,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd, ...@@ -904,7 +955,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd,
{ {
if ( md->isFriend()) if ( md->isFriend())
{ {
QString type=md->typeString(); QCString type=md->typeString();
//printf("Friend: type=%s name=%s\n",type.data(),md->name().data()); //printf("Friend: type=%s name=%s\n",type.data(),md->name().data());
if (md->hasDocumentation() && type!="friend class") if (md->hasDocumentation() && type!="friend class")
{ {
...@@ -930,7 +981,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd, ...@@ -930,7 +981,7 @@ void writeMemberDecs(OutputList &ol,ClassDef *cd,NamespaceDef *nd, FileDef *fd,
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name()); ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name());
ol.endMemberItem(); ol.endMemberItem();
} }
else if (!hideMemberFlag) // no documentation else if (!Config::hideMemberFlag) // no documentation
{ {
ol.startMemberItem(); ol.startMemberItem();
ol.docify("class "); ol.docify("class ");
...@@ -971,7 +1022,7 @@ void setAnchors(char id,MemberList *ml) ...@@ -971,7 +1022,7 @@ void setAnchors(char id,MemberList *ml)
MemberDef *md=ml->first(); MemberDef *md=ml->first();
while (md) while (md)
{ {
QString anchor; QCString anchor;
anchor.sprintf("%c%d",id,count++); anchor.sprintf("%c%d",id,count++);
//printf("Member %s anchor %s\n",md->name(),anchor.data()); //printf("Member %s anchor %s\n",md->name(),anchor.data());
md->setAnchor(anchor); md->setAnchor(anchor);
...@@ -992,21 +1043,21 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -992,21 +1043,21 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
// md->hasDocumentedEnumValues() // one of its values is documented // md->hasDocumentedEnumValues() // one of its values is documented
// ) || // or // ) || // or
// (!md->briefDescription().isEmpty() && // member has brief description and // (!md->briefDescription().isEmpty() && // member has brief description and
// !briefMemDescFlag && // brief description not shown earlier and // !Config::briefMemDescFlag && // brief description not shown earlier and
// repeatBriefFlag // brief description should be repeated. // Config::repeatBriefFlag // brief description should be repeated.
// ); // );
if (md->memberType()==m && // filter member type if (md->memberType()==m && // filter member type
(extractAllFlag || hasDocs) (Config::extractAllFlag || hasDocs)
) )
{ {
if (extractAllFlag && !hasDocs) if (Config::extractAllFlag && !hasDocs)
{ {
ol.disable(OutputGenerator::Latex); // Latex cannot insert a pagebreak ol.disable(OutputGenerator::Latex); // Latex cannot insert a pagebreak
// if there are a lot of empty sections, // if there are a lot of empty sections,
// so we disable LaTeX for all empty // so we disable LaTeX for all empty
// sections even if extractAllFlag is enabled // sections even if Config::extractAllFlag is enabled
} }
QString cname; QCString cname;
NamespaceDef *nd=md->getNamespace(); NamespaceDef *nd=md->getNamespace();
ClassDef *cd=md->memberClass(); ClassDef *cd=md->memberClass();
FileDef *fd=md->getFileDef(); FileDef *fd=md->getFileDef();
...@@ -1014,11 +1065,11 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -1014,11 +1065,11 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
else if (nd) cname=nd->name(); else if (nd) cname=nd->name();
else if (fd) cname=fd->name(); else if (fd) cname=fd->name();
// get member name // get member name
QString doxyName=md->name().copy(); QCString doxyName=md->name().copy();
// prepend scope if there is any (TODO: prepend namespace scope as well) // prepend scope if there is any
if (scopeName) doxyName.prepend((QString)scopeName+"::"); if (scopeName) doxyName.prepend((QCString)scopeName+"::");
QString def = md->definition(); QCString def = md->definition();
if (md->isEnumerate()) def.prepend("enum "); if (md->isEnumerate()) def.prepend("enum ");
MemberDef *smd; MemberDef *smd;
if (md->isEnumValue() && def[0]=='@') def = def.right(def.length()-2); if (md->isEnumValue() && def[0]=='@') def = def.right(def.length()-2);
...@@ -1060,7 +1111,8 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -1060,7 +1111,8 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
ol.writeDoxyAnchor(cname,md->anchor(),doxyName); ol.writeDoxyAnchor(cname,md->anchor(),doxyName);
ArgumentList *al=0; ArgumentList *al=0;
if (cd && (!md->isRelated() || !md->templateArguments()) && if (cd && (!md->isRelated() || !md->templateArguments()) &&
(al=cd->templateArguments())) // class template prefix ((al=md->scopeTemplateArguments()) || (al=cd->templateArguments()))
) // class template prefix
{ {
writeTemplatePrefix(ol,al); writeTemplatePrefix(ol,al);
} }
...@@ -1070,7 +1122,11 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -1070,7 +1122,11 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
{ {
writeTemplatePrefix(ol,al); writeTemplatePrefix(ol,al);
} }
if (cd && cd->templateArguments()) if (cd && md->scopeTemplateArguments())
{
def=addTemplateNames(def,cd->name(),md->getScopeTemplateNameString());
}
else if (cd && cd->templateArguments())
{ {
// add template name lists to all occurrences of the class name. // add template name lists to all occurrences of the class name.
def=addTemplateNames(def,cd->name(),cd->getTemplateNameString()); def=addTemplateNames(def,cd->name(),cd->getTemplateNameString());
...@@ -1129,8 +1185,8 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -1129,8 +1185,8 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
ol.newParagraph(); ol.newParagraph();
if (!md->briefDescription().isEmpty() && if (!md->briefDescription().isEmpty() &&
(repeatBriefFlag || (Config::repeatBriefFlag ||
(!briefMemDescFlag && md->documentation().isEmpty()) (!Config::briefMemDescFlag && md->documentation().isEmpty())
) )
) )
{ {
...@@ -1141,6 +1197,12 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -1141,6 +1197,12 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
{ {
parseDoc(ol,scopeName,md->name(),md->documentation()+"\n"); parseDoc(ol,scopeName,md->name(),md->documentation()+"\n");
} }
if (!md->bodyCode().isEmpty())
{
ol.startCodeFragment();
parseCode(ol,scopeName,md->bodyCode(),FALSE,0);
ol.endCodeFragment();
}
if (md->isEnumerate()) if (md->isEnumerate())
{ {
...@@ -1193,149 +1255,149 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -1193,149 +1255,149 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
} }
MemberDef *bmd=md->reimplements(); MemberDef *bmd=md->reimplements();
if (bmd) ClassDef *bcd=0;
if (bmd && (bcd=bmd->memberClass()))
{ {
if (virt!=Normal) // search for virtual member of the deepest base class if (virt!=Normal) // search for virtual member of the deepest base class
{ {
MemberDef *lastBmd=bmd; MemberDef *lastBmd=bmd;
while (lastBmd) while (lastBmd)
{ {
if (lastBmd->virtualness()!=Normal) bmd=lastBmd; ClassDef *lastBcd = lastBmd->memberClass();
if (lastBmd->virtualness()!=Normal &&
lastBmd->hasDocumentation() &&
(lastBmd->protection()!=Private || Config::extractPrivateFlag) &&
lastBcd->hasDocumentation() &&
(lastBcd->protection()!=Private || Config::extractPrivateFlag)
) { bmd=lastBmd; bcd=lastBcd; }
lastBmd=lastBmd->reimplements(); lastBmd=lastBmd->reimplements();
} }
} }
// write class that contains a member that is reimplemented by this one // write class that contains a member that is reimplemented by this one
ClassDef *bcd = bmd->memberClass(); if (bcd->hasDocumentation() || bcd->isReference())
ol.newParagraph();
//parseText(ol,theTranslator->trReimplementedFrom());
//ol.docify(" ");
QString reimplFromLine = theTranslator->trReimplementedFromList(1);
int markerPos = reimplFromLine.find("@0");
if (markerPos!=-1) // should always pass this.
{ {
parseText(ol,reimplFromLine.left(markerPos)); //text left from marker ol.newParagraph();
if (bmd->hasDocumentation() &&
(bmd->protection()!=Private || extractPrivateFlag) QCString reimplFromLine = theTranslator->trReimplementedFromList(1);
) // replace marker with link int markerPos = reimplFromLine.find("@0");
if (markerPos!=-1) // should always pass this.
{ {
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), parseText(ol,reimplFromLine.left(markerPos)); //text left from marker
bmd->anchor(),bcd->name()); if (bmd->hasDocumentation() &&
if ( (bmd->protection()!=Private || Config::extractPrivateFlag)
!bcd->isReference() && ) // replace marker with link
//(bcd->hasDocumentation() || !hideClassFlag) && {
//(bcd->protection()!=Private || extractPrivateFlag) ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
bcd->isVisible() bmd->anchor(),bcd->name());
/*&& bmd->detailsAreVisible()*/ if (
) ol.writePageRef(bcd->name(),bmd->anchor()); !bcd->isReference() &&
//(bcd->hasDocumentation() || !Config::hideClassFlag) &&
//(bcd->protection()!=Private || Config::extractPrivateFlag)
bcd->isVisible()
/*&& bmd->detailsAreVisible()*/
) ol.writePageRef(bcd->name(),bmd->anchor());
}
else
{
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
0,bcd->name());
if (
!bcd->isReference() &&
//(bcd->hasDocumentation() || !Config::hideClassFlag) &&
//(bcd->protection()!=Private || Config::extractPrivateFlag)
bcd->isVisible()
) ol.writePageRef(bcd->name(),0);
}
parseText(ol,reimplFromLine.right(
reimplFromLine.length()-markerPos-2)); // text right from marker
} }
else else
{ {
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), err("Error: translation error: no marker in trReimplementsFromList()\n");
0,bcd->name());
if (
!bcd->isReference() &&
//(bcd->hasDocumentation() || !hideClassFlag) &&
//(bcd->protection()!=Private || extractPrivateFlag)
bcd->isVisible()
) ol.writePageRef(bcd->name(),0);
} }
parseText(ol,reimplFromLine.right(
reimplFromLine.length()-markerPos-2)); // text right from marker
}
else
{
err("Error: translation error: no marker in trReimplementsFromList()\n");
} }
//ol.writeString("."); //ol.writeString(".");
} }
MemberList *bml=md->reimplementedBy(); MemberList *bml=md->reimplementedBy();
int count; if (bml)
if (bml && (count=bml->count())>0)
{ {
// write the list of classes that overwrite this member MemberListIterator mli(*bml);
ol.newParagraph(); MemberDef *bmd=0;
//parseText(ol,theTranslator->trReimplementedIn()); uint count=0;
//ol.writeString("Reimplemented in "); ClassDef *bcd=0;
//ol.docify(" "); for (mli.toFirst();(bmd=mli.current()) && (bcd=bmd->memberClass());++mli)
{
QString reimplInLine = // count the members that directly inherit from md and for
theTranslator->trReimplementedInList(bml->count()); // which the member and class are visible in the docs.
QRegExp marker("@[0-9]+"); if (bmd->hasDocumentation() &&
int index=0,newIndex,matchLen; (bmd->protection()!=Private || Config::extractPrivateFlag) &&
// now replace all markers in reimplInLine with links to the classes bcd->hasDocumentation() &&
while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1) (bcd->protection()!=Private || Config::extractPrivateFlag)
) count++;
}
if (count>0)
{ {
parseText(ol,reimplInLine.mid(index,newIndex-index)); mli.toFirst();
bool ok; // write the list of classes that overwrite this member
uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok); ol.newParagraph();
bmd=bml->at(entryIndex); //parseText(ol,theTranslator->trReimplementedIn());
if (ok && bmd) // write link for marker //ol.writeString("Reimplemented in ");
//ol.docify(" ");
QCString reimplInLine =
theTranslator->trReimplementedInList(count);
QRegExp marker("@[0-9]+");
int index=0,newIndex,matchLen;
// now replace all markers in reimplInLine with links to the classes
while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1)
{ {
ClassDef *bcd = bmd->memberClass(); parseText(ol,reimplInLine.mid(index,newIndex-index));
if (bmd->hasDocumentation() && bool ok;
(bmd->protection()!=Private || extractPrivateFlag) uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
) //bmd=bml->at(entryIndex);
count=0;
// find the entryIndex-th documented entry in the inheritance list.
for (mli.toFirst();(bmd=mli.current()) && (bcd=bmd->memberClass());++mli)
{ {
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), if (bmd->hasDocumentation() &&
bmd->anchor(),bcd->name()); (bmd->protection()!=Private || Config::extractPrivateFlag) &&
if (!bcd->isReference() && bcd->isVisible()) bcd->hasDocumentation() &&
ol.writePageRef(bcd->name(),bmd->anchor()); (bcd->protection()!=Private || Config::extractPrivateFlag)
)
{
if (count==entryIndex) break;
count++;
}
} }
else
if (ok && bcd && bmd) // write link for marker
{ {
//if (bmd->hasDocumentation() &&
// (bmd->protection()!=Private || Config::extractPrivateFlag)
// )
//{
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(), ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
0,bcd->name()); bmd->anchor(),bcd->name());
if (!bcd->isReference() && bcd->isVisible()) if (!bcd->isReference() && bcd->isVisible())
ol.writePageRef(bcd->name(),0); ol.writePageRef(bcd->name(),bmd->anchor());
//}
//else
//{
// ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
// 0,bcd->name());
// if (!bcd->isReference() && bcd->isVisible())
// ol.writePageRef(bcd->name(),0);
//}
} }
} ++mli;
index=newIndex+matchLen; index=newIndex+matchLen;
} }
parseText(ol,reimplInLine.right(reimplInLine.length()-index)); parseText(ol,reimplInLine.right(reimplInLine.length()-index));
#if 0
bmd=bml->first();
while (bmd)
{
ClassDef *bcd = bmd->memberClass();
if (bmd->hasDocumentation())
{
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
bmd->anchor(),bcd->name());
if (
!bcd->isReference() &&
//(bcd->hasDocumentation() || !hideClassFlag) &&
//(bcd->protection()!=Private || extractPrivateFlag)
bcd->isVisible()
/*&& bmd->detailsAreVisible()*/
) ol.writePageRef(bcd->name(),bmd->anchor());
}
else
{
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
0,bcd->name());
if (
!bcd->isReference() &&
//(bcd->hasDocumentation() || !hideClassFlag) &&
//(bcd->protection()!=Private || extractPrivateFlag)
bcd->isVisible()
) ol.writePageRef(bcd->name(),0);
}
bmd=bml->next();
if (bmd)
{
if (bml->at()==count-1)
//ol.writeString(" and ");
parseText(ol," "+theTranslator->trAnd()+" ");
else
ol.writeString(", ");
}
} }
ol.writeString(".");
#endif
} }
// write the list of examples that use this member // write the list of examples that use this member
if (md->hasExamples()) if (md->hasExamples())
...@@ -1353,7 +1415,7 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -1353,7 +1415,7 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
} }
ol.endIndent(); ol.endIndent();
// enable LaTeX again // enable LaTeX again
if (extractAllFlag && !hasDocs) ol.enable(OutputGenerator::Latex); if (Config::extractAllFlag && !hasDocs) ol.enable(OutputGenerator::Latex);
} }
} }
...@@ -1362,7 +1424,7 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName, ...@@ -1362,7 +1424,7 @@ void writeMemberDocs(OutputList &ol,MemberList *ml,const char *scopeName,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// read a file with `name' to a string. // read a file with `name' to a string.
QString fileToString(const char *name) QCString fileToString(const char *name)
{ {
if (name==0 || name[0]==0) return 0; if (name==0 || name[0]==0) return 0;
QFileInfo fi(name); QFileInfo fi(name);
...@@ -1378,32 +1440,32 @@ QString fileToString(const char *name) ...@@ -1378,32 +1440,32 @@ QString fileToString(const char *name)
exit(1); exit(1);
} }
int fsize=fi.size(); int fsize=fi.size();
QString contents(fsize+1); QCString contents(fsize+1);
f.readBlock(contents.data(),fsize); f.readBlock(contents.data(),fsize);
contents[fsize]='\0'; contents[fsize]='\0';
f.close(); f.close();
return contents; return contents;
} }
QString dateToString(bool includeTime) QCString dateToString(bool includeTime)
{ {
if (includeTime) if (includeTime)
{ {
return QDateTime::currentDateTime().toString(); return convertToQCString(QDateTime::currentDateTime().toString());
} }
else else
{ {
const QDate &d=QDate::currentDate(); const QDate &d=QDate::currentDate();
QString result; QCString result;
result.sprintf("%d %s %d", result.sprintf("%d %s %d",
d.day(), d.day(),
d.monthName(d.month()), convertToQCString(d.monthName(d.month())).data(),
d.year()); d.year());
return result; return result;
} }
//QDate date=dt.date(); //QDate date=dt.date();
//QTime time=dt.time(); //QTime time=dt.time();
//QString dtString; //QCString dtString;
//dtString.sprintf("%02d:%02d, %04d/%02d/%02d", //dtString.sprintf("%02d:%02d, %04d/%02d/%02d",
// time.hour(),time.minute(),date.year(),date.month(),date.day()); // time.hour(),time.minute(),date.year(),date.month(),date.day());
//return dtString; //return dtString;
...@@ -1440,11 +1502,11 @@ static int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0) ...@@ -1440,11 +1502,11 @@ static int minClassDistance(ClassDef *cd,ClassDef *bcd,int level=0)
//} //}
// strip any template specifiers that follow className in string s // strip any template specifiers that follow className in string s
static QString trimTemplateSpecifiers(const QString &className,const QString &s) static QCString trimTemplateSpecifiers(const QCString &className,const QCString &s)
{ {
// first we resolve any defines // first we resolve any defines
//int i=0,p,l; //int i=0,p,l;
//QString result; //QCString result;
//QRegExp r("[A-Z_a-z][A-Z_a-z0-9]*"); //QRegExp r("[A-Z_a-z][A-Z_a-z0-9]*");
//while ((p=r.match(s,i,&l))!=-1) //while ((p=r.match(s,i,&l))!=-1)
//{ //{
...@@ -1455,7 +1517,7 @@ static QString trimTemplateSpecifiers(const QString &className,const QString &s) ...@@ -1455,7 +1517,7 @@ static QString trimTemplateSpecifiers(const QString &className,const QString &s)
//if (i<(int)s.length()) result+=s.mid(i,s.length()-i); //if (i<(int)s.length()) result+=s.mid(i,s.length()-i);
// We strip the template arguments following className (if any) // We strip the template arguments following className (if any)
QString result=s.copy(); QCString result=s.copy();
int l=className.length(); int l=className.length();
if (l>0) // there is a class name if (l>0) // there is a class name
{ {
...@@ -1488,17 +1550,31 @@ static QString trimTemplateSpecifiers(const QString &className,const QString &s) ...@@ -1488,17 +1550,31 @@ static QString trimTemplateSpecifiers(const QString &className,const QString &s)
} }
// removes the (one and only) occurrence of name:: from s. // removes the (one and only) occurrence of name:: from s.
static QString trimScope(const QString &name,const QString &s) static QCString trimScope(const QCString &name,const QCString &s)
{ {
int spos=s.find(name+"::"); int scopeOffset=name.length();
if (spos!=-1) QCString result=s;
do // for each scope
{ {
return s.left(spos)+s.right(s.length()-spos-name.length()-2); QCString tmp;
} QCString scope=name.left(scopeOffset)+"::";
return s; //printf("Trying with scope=`%s'\n",scope.data());
int i,p=0;
while ((i=result.find(scope,p))!=-1) // for each occurrence
{
tmp+=result.mid(p,i-p); // add part before pattern
p=i+scope.length();
}
tmp+=result.right(result.length()-p); // add trailing part
scopeOffset=name.findRev("::",scopeOffset-1);
result = tmp;
} while (scopeOffset>0);
return result;
} }
static QString trimBaseClassScope(BaseClassList *bcl,const QString &s) static QCString trimBaseClassScope(BaseClassList *bcl,const QCString &s)
{ {
BaseClassListIterator bcli(*bcl); BaseClassListIterator bcli(*bcl);
BaseClassDef *bcd; BaseClassDef *bcd;
...@@ -1528,12 +1604,14 @@ static QString trimBaseClassScope(BaseClassList *bcl,const QString &s) ...@@ -1528,12 +1604,14 @@ static QString trimBaseClassScope(BaseClassList *bcl,const QString &s)
bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
const char *cl,const char *ns) const char *cl,const char *ns)
{ {
QString className=cl; QCString className=cl;
QString namespaceName=ns; QCString namespaceName=ns;
//printf("matchArguments(%s,%s) className=%s namespaceName=%s\n", //printf("matchArguments(%s,%s) className=%s namespaceName=%s\n",
// srcAl ? argListToString(srcAl).data() : "", // srcAl ? argListToString(srcAl).data() : "",
// dstAl ? argListToString(dstAl).data() : "", // dstAl ? argListToString(dstAl).data() : "",
// cl,ns); // cl,ns);
if (srcAl==0 || dstAl==0) if (srcAl==0 || dstAl==0)
{ {
return srcAl==dstAl; // at least one of the members is not a function return srcAl==dstAl; // at least one of the members is not a function
...@@ -1544,6 +1622,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, ...@@ -1544,6 +1622,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
Argument *a=new Argument; Argument *a=new Argument;
a->type = "void"; a->type = "void";
srcAl->append(a); srcAl->append(a);
return TRUE;
} }
if ( dstAl->count()==0 && srcAl->count()==1 && if ( dstAl->count()==0 && srcAl->count()==1 &&
srcAl->getFirst()->type=="void" ) srcAl->getFirst()->type=="void" )
...@@ -1555,6 +1634,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, ...@@ -1555,6 +1634,7 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
} }
if (srcAl->count() != dstAl->count()) if (srcAl->count() != dstAl->count())
{ {
//printf("Different number of arguments!\n");
return FALSE; // different number of arguments -> no match return FALSE; // different number of arguments -> no match
} }
if (srcAl->constSpecifier != dstAl->constSpecifier) if (srcAl->constSpecifier != dstAl->constSpecifier)
...@@ -1572,15 +1652,15 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl, ...@@ -1572,15 +1652,15 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
Argument *srcA,*dstA; Argument *srcA,*dstA;
for (;(srcA=srcAli.current(),dstA=dstAli.current());++srcAli,++dstAli) for (;(srcA=srcAli.current(),dstA=dstAli.current());++srcAli,++dstAli)
{ {
QString srcAType=trimTemplateSpecifiers(className,srcA->type); QCString srcAType=trimTemplateSpecifiers(className,srcA->type);
QString dstAType=trimTemplateSpecifiers(className,dstA->type); QCString dstAType=trimTemplateSpecifiers(className,dstA->type);
if (srcAType!=dstAType) // check if the argument only differs on name if (srcAType!=dstAType) // check if the argument only differs on name
{ {
//printf("`%s' <=> `%s'\n",srcAType.data(),dstAType.data()); //printf("scope=`%s': `%s' <=> `%s'\n",className.data(),srcAType.data(),dstAType.data());
QString srcScope; QCString srcScope;
QString dstScope; QCString dstScope;
// strip redundant scope specifiers // strip redundant scope specifiers
if (!className.isEmpty()) if (!className.isEmpty())
...@@ -1778,6 +1858,10 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl) ...@@ -1778,6 +1858,10 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl)
dstA->type = srcA->type.copy(); dstA->type = srcA->type.copy();
dstA->name = dstA->name.copy(); dstA->name = dstA->name.copy();
} }
else if (!srcA->name.isEmpty() && !dstA->name.isEmpty())
{
srcA->name = dstA->name.copy();
}
int i1=srcA->type.find("::"), int i1=srcA->type.find("::"),
i2=dstA->type.find("::"), i2=dstA->type.find("::"),
j1=srcA->type.length()-i1-2, j1=srcA->type.length()-i1-2,
...@@ -1801,335 +1885,523 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl) ...@@ -1801,335 +1885,523 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl)
// argListToString(srcAl).data(),argListToString(dstAl).data()); // argListToString(srcAl).data(),argListToString(dstAl).data());
} }
//---------------------------------------------------------------------- /*!
// searches for the class and member definitions corresponding with * Searches for a member definition given its name `memberName' as a string.
// memberName and className. * memberName may also include a (partial) scope to indicate the scope
// These classes are returned using `md' and `cd'. * in which the member is located.
// returns TRUE if the class and member both could be found *
* The parameter `scName' is a string representing the name of the scope in
bool getDefs(const QString &memberName,const QString &className, * which the link was found.
*
* In case of a function args contains a string representation of the
* argument list. Passing 0 means the member has no arguments.
* Passing "()" means any argument list will do, but "()" is preferred.
*
* The function returns TRUE if the member is known and documented or
* FALSE if it is not.
* If TRUE is returned parameter `md' contains a pointer to the member
* definition. Furthermore exactly one of the parameter `cd', `nd', or `fd'
* will be non-zero:
* - if `cd' is non zero, the member was found in a class pointed to by cd.
* - if `nd' is non zero, the member was found in a namespace pointed to by nd.
* - if `fd' is non zero, the member was found in the global namespace of
* file fd.
*/
bool getDefs(const QCString &scName,const QCString &memberName,
const char *args, const char *args,
MemberDef *&md, ClassDef *&cd, FileDef *&fd,NamespaceDef *&nd) MemberDef *&md, ClassDef *&cd, FileDef *&fd,NamespaceDef *&nd)
{ {
//printf("Search for %s::%s %s\n",className.data(),memberName.data(),args);
fd=0, md=0, cd=0, nd=0; fd=0, md=0, cd=0, nd=0;
if (memberName.length()==0) return FALSE; if (memberName.length()==0) return FALSE; /* empty name => nothing to link */
MemberName *mn;
if ((mn=memberNameDict[memberName]) && className.length()>0) QCString scopeName=scName.copy();
//printf("Search for name=%s args=%s in scope=%s\n",
// memberName.data(),args,scopeName.data());
int is,im,pm=0;
// strip common part of the scope from the scopeName
while ((is=scopeName.findRev("::"))!=-1 &&
(im=memberName.find("::",pm))!=-1 &&
(scopeName.right(scopeName.length()-is-2)==memberName.mid(pm,im-pm))
)
{
scopeName=scopeName.left(is);
pm=im+2;
}
//printf("result after scope corrections scope=%s name=%s\n",
// scopeName.data(),memberName.data());
QCString mName=memberName;
QCString mScope;
if ((im=memberName.findRev("::"))!=-1)
{
mScope=memberName.left(im);
mName=memberName.right(memberName.length()-im-2);
}
// handle special the case where both scope name and member scope are equal
if (mScope==scopeName) scopeName.resize(0);
//printf("mScope=`%s' mName=`%s'\n",mScope.data(),mName.data());
MemberName *mn = memberNameDict[mName];
if (mn && scopeName.length()+mScope.length()>0)
{ {
//printf(" >member name found\n"); //printf(" >member name found\n");
ClassDef *fcd=0; int scopeOffset=scopeName.length();
//printf("className=%s\n",className.data()); do
if ((fcd=getClass(className)) && fcd->hasDocumentation()) {
{ QCString className = scopeName.left(scopeOffset);
//printf(" >member class found\n"); if (!className.isEmpty() && !mScope.isEmpty())
MemberDef *mmd=mn->first();
int mdist=maxInheritanceDepth;
while (mmd)
{ {
if ((mmd->protection()!=Private || extractPrivateFlag) && className.append("::"+mScope);
mmd->hasDocumentation() }
/*mmd->detailsAreVisible()*/ else if (!mScope.isEmpty())
/* && (args==0 || matchArgumentsOld(mmd->argsString(),args)) */ {
) className=mScope.copy();
}
//printf("Trying class scope %s\n",className.data());
ClassDef *fcd=0;
if ((fcd=getClass(className)) && // is it a documented class
fcd->isVisibleExt()
)
{
//printf(" Found fcd=%p\n",fcd);
MemberDef *mmd=mn->first();
int mdist=maxInheritanceDepth;
while (mmd)
{ {
bool match=TRUE; if ((mmd->protection()!=Private || Config::extractPrivateFlag) &&
ArgumentList *argList=0; mmd->hasDocumentation()
if (args) /*mmd->detailsAreVisible()*/
{ /* && (args==0 || matchArgumentsOld(mmd->argsString(),args)) */
match=FALSE; )
argList=new ArgumentList;
stringToArgumentList(args,argList);
match=matchArguments(mmd->argumentList(),argList);
}
if (match)
{ {
ClassDef *mcd=mmd->memberClass(); bool match=TRUE;
int m=minClassDistance(fcd,mcd); ArgumentList *argList=0;
if (m<mdist && mcd->isVisible()) if (args)
{ {
mdist=m; argList=new ArgumentList;
cd=mcd; stringToArgumentList(args,argList);
md=mmd; match=matchArguments(mmd->argumentList(),argList);
}
if (match)
{
ClassDef *mcd=mmd->memberClass();
int m=minClassDistance(fcd,mcd);
if (m<mdist && mcd->isVisible())
{
mdist=m;
cd=mcd;
md=mmd;
}
}
if (argList)
{
delete argList;
} }
} }
if (argList) mmd=mn->next();
{
delete argList;
}
} }
mmd=mn->next(); if (mdist==maxInheritanceDepth && !strcmp(args,"()"))
} // no exact match found, but if args="()" an arbitrary member will do
if (mdist==maxInheritanceDepth && !strcmp(args,"()"))
// no exact match found, but if args="()" an arbitrary member will do
{
//printf(" >Searching for arbitrary member\n");
mmd=mn->first();
while (mmd)
{ {
if ((mmd->protection()!=Private || extractPrivateFlag) && //printf(" >Searching for arbitrary member\n");
( mmd=mn->last();
mmd->hasDocumentation() while (mmd)
/*mmd->detailsAreVisible()*/
|| mmd->isReference()
)
)
{ {
ClassDef *mcd=mmd->memberClass(); if ((mmd->protection()!=Private || Config::extractPrivateFlag) &&
//printf(" >Class %s found\n",mcd->name().data()); (
int m=minClassDistance(fcd,mcd); mmd->hasDocumentation()
if (m<mdist && mcd->isVisible()) /*mmd->detailsAreVisible()*/
|| mmd->isReference()
)
)
{ {
//printf("Class distance %d\n",m); ClassDef *mcd=mmd->memberClass();
mdist=m; //printf(" >Class %s found\n",mcd->name().data());
cd=mcd; int m=minClassDistance(fcd,mcd);
md=mmd; if (m<mdist && mcd->isVisible())
{
//printf("Class distance %d\n",m);
mdist=m;
cd=mcd;
md=mmd;
}
} }
mmd=mn->prev();
} }
mmd=mn->next();
} }
//printf(" >Succes=%d\n",mdist<maxInheritanceDepth);
if (mdist<maxInheritanceDepth) return TRUE; /* found match */
}
/* goto the parent scope */
if (scopeOffset==0)
{
scopeOffset=-1;
} }
//printf(" >Succes=%d\n",mdist<maxInheritanceDepth); else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1)
return mdist<maxInheritanceDepth; {
} scopeOffset=0;
}
} while (scopeOffset>=0);
// unknown or undocumented scope
} }
else // maybe an namespace or file member ? else // maybe an namespace or file member ?
{ {
MemberName *mn; //printf("Testing for global function scopeName=`%s' mScope=`%s' :: mName=`%s'\n",
if ((mn=functionNameDict[memberName])) // name is known // scopeName.data(),mScope.data(),mName.data());
//printf(" >member name found\n");
if ((mn=functionNameDict[mName])) // name is known
{ {
NamespaceDef *fnd=0; NamespaceDef *fnd=0;
if (className.length()>0 && (fnd=namespaceDict[className]) && int scopeOffset=scopeName.length();
fnd->hasDocumentation()) do
{ // inside a namespace {
MemberDef *mmd=mn->first(); QCString namespaceName = scopeName.left(scopeOffset);
while (mmd) if (!namespaceName.isEmpty() && !mScope.isEmpty())
{
namespaceName.append("::"+mScope);
}
else if (!mScope.isEmpty())
{ {
if (mmd->getNamespace()==fnd && mmd->hasDocumentation()) namespaceName=mScope.copy();
{ // namespace is found }
nd=fnd; if (namespaceName.length()>0 &&
md=mmd; (fnd=namespaceDict[namespaceName]) &&
return TRUE; fnd->isVisibleExt()
)
{
//printf("Function inside existing namespace `%s'\n",namespaceName.data());
bool found=FALSE;
MemberDef *mmd=mn->first();
while (mmd && !found)
{
//printf("mmd->getNamespace()=%p fnd=%p\n",
// mmd->getNamespace(),fnd);
if (mmd->getNamespace()==fnd &&
(mmd->isReference() || mmd->hasDocumentation())
)
{ // namespace is found
bool match=TRUE;
ArgumentList *argList=0;
if (args)
{
argList=new ArgumentList;
stringToArgumentList(args,argList);
match=matchArguments(mmd->argumentList(),argList);
}
if (match)
{
nd=fnd;
md=mmd;
found=TRUE;
}
if (args)
{
delete argList;
}
}
mmd=mn->next();
} }
mmd=mn->next(); if (!found && !strcmp(args,"()"))
// no exact match found, but if args="()" an arbitrary
// member will do
{
MemberDef *mmd=mn->last(); // searching backward will get
// the first defined!
while (mmd && !found)
{
if (mmd->getNamespace()==fnd &&
(mmd->isReference() || mmd->hasDocumentation())
)
{
nd=fnd;
md=mmd;
found=TRUE;
}
mmd=mn->prev();
}
}
if (found) return TRUE;
} }
} else // no scope => global function
// maybe a file member (e.g. global function or variable)
md=mn->first();
while (md)
{
if (/*md->detailsAreVisible()*/ md->hasDocumentation())
{ {
fd=md->getFileDef(); //printf("Function with global scope `%s'\n",namespaceName.data());
if (fd && fd->hasDocumentation()) md=mn->first();
while (md)
{
if (md->isReference() || md->hasDocumentation())
{
//printf("md->name()=`%s'\n",md->name().data());
fd=md->getFileDef();
if (fd && (fd->isReference() || fd->hasDocumentation()))
{
//printf("fd->name()=`%s'\n",fd->name().data());
bool match=TRUE;
ArgumentList *argList=0;
if (args)
{
argList=new ArgumentList;
stringToArgumentList(args,argList);
match=matchArguments(md->argumentList(),argList);
delete argList;
}
if (match) return TRUE;
}
}
md=mn->next();
}
if (!strcmp(args,"()"))
{ {
return TRUE; // no exact match found, but if args="()" an arbitrary
// member will do
md=mn->last();
while (md)
{
if (md->isReference() || md->hasDocumentation())
{
//printf("md->name()=`%s'\n",md->name().data());
fd=md->getFileDef();
if (fd && (fd->isReference() || fd->hasDocumentation()))
{
return TRUE;
}
}
md=mn->prev();
}
} }
} }
md=mn->next(); if (scopeOffset==0)
} {
scopeOffset=-1;
}
else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1)
{
scopeOffset=0;
}
} while (scopeOffset>=0);
}
else
{
//printf("Unknown function `%s'\n",mName.data());
} }
} }
return FALSE; return FALSE;
} }
//---------------------------------------------------------------------- /*!
// Generate a hypertext link to the class with name `clName'. * Searches for a scope definition given its name as a string via parameter
// If linkTxt is not null this text is used as the link, otherwise * `scope'.
// the name of the class will be used. If the class could be found a *
// hypertext link (in HTML) is written, otherwise the text of the link will * The parameter `docScope' is a string representing the name of the scope in
// be written. * which the `scope' string was found.
*
void generateClassRef(OutputList &ol,const char *clName,const char *linkTxt) * The function returns TRUE if the scope is known and documented or
* FALSE if it is not.
* If TRUE is returned exactly one of the parameter `cd', `nd'
* will be non-zero:
* - if `cd' is non zero, the scope was a class pointed to by cd.
* - if `nd' is non zero, the scope was a namespace pointed to by nd.
*/
bool getScopeDefs(const char *docScope,const char *scope,
ClassDef *&cd, NamespaceDef *&nd)
{ {
QString className=clName; cd=0;nd=0;
QString linkText=linkTxt ? linkTxt : (const char *)className;
if (className.length()==0) QCString scopeName=scope;
{ //printf("getScopeDefs: docScope=`%s' scope=`%s'\n",docScope,scope);
ol.docify(linkText); if (scopeName.length()==0) return FALSE;
return;
} QCString docScopeName=docScope;
ClassDef *cd=0; int scopeOffset=docScopeName.length();
NamespaceDef *nd=0;
if ((cd=getClass(className)) && cd->isVisible()) do // for each possible docScope (from largest to and including empty)
{
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,linkText);
if (!cd->isReference()) ol.writePageRef(cd->name(),0);
}
else if ((nd=namespaceDict[className]) && nd->hasDocumentation())
{ {
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,linkText); QCString fullName=scopeName.copy();
ol.writePageRef(nd->name(),0); if (scopeOffset>0) fullName.prepend(docScopeName.left(scopeOffset)+"::");
}
else if ((cd=getClass(fullName)) && cd->isVisibleExt())
ol.docify(linkText); {
return TRUE; // class link written => quit
}
else if ((nd=namespaceDict[fullName]) && nd->isVisibleExt())
{
return TRUE; // namespace link written => quit
}
if (scopeOffset==0)
{
scopeOffset=-1;
}
else if ((scopeOffset=docScopeName.findRev("::",scopeOffset-1))==-1)
{
scopeOffset=0;
}
} while (scopeOffset>=0);
return FALSE;
} }
//---------------------------------------------------------------------- /*!
// generate a reference to a class or member. * generate a reference to a class, namespace or member.
// `clName' is the name of the class that contains the documentation * `scName' is the name of the scope that contains the documentation
// string that is returned. * string that is returned.
// `name' is the name of the member or class that we want to link to. * `name' is the name that we want to link to.
// `name' may have five formats: * `name' may have five formats:
// 1) "ClassName" * 1) "ScopeName"
// 2) "memberName()" one of the (overloaded) function or define * 2) "memberName()" one of the (overloaded) function or define
// with name memberName. * with name memberName.
// 3) "memberName(...)" a specific (overloaded) function or define * 3) "memberName(...)" a specific (overloaded) function or define
// with name memberName * with name memberName
// 4) "::memberName a non-function member or define * 4) "::memberName a non-function member or define
// 5) ("ClassName::")+"memberName()" * 5) ("ScopeName::")+"memberName()"
// 6) ("ClassName::")+"memberName(...)" * 6) ("ScopeName::")+"memberName(...)"
// 7) ("ClassName::")+"memberName" * 7) ("ScopeName::")+"memberName"
* instead of :: the # symbol may also be used.
void generateRef(OutputList &ol,const char *clName, */
void generateRef(OutputList &ol,const char *scName,
const char *name,bool inSeeBlock,const char *rt) const char *name,bool inSeeBlock,const char *rt)
{ {
//printf("generateRef(clName=%s,name=%s,rt=%s)\n",clName,name,rt); //printf("generateRef(scName=%s,name=%s,rt=%s)\n",scName,name,rt);
// check if we have a plane name QCString tmpName = substitute(name,"#","::");
QString tmpName = substitute(name,"#","::"); QCString linkText = rt;
QString linkText = rt;
int scopePos=tmpName.findRev("::"); int scopePos=tmpName.findRev("::");
int bracePos=tmpName.find('('); int bracePos=tmpName.findRev('('); // reverse is needed for operator()(...)
if (scopePos==-1 && bracePos==-1) if (bracePos==-1) // simple name
{ {
if (!inSeeBlock) /* check for class link */ ClassDef *cd=0;
NamespaceDef *nd=0;
if (linkText.isNull()) linkText=tmpName;
// check if this is a class or namespace reference
if (scName!=tmpName && getScopeDefs(scName,name,cd,nd))
{ {
if (linkText.isNull()) linkText=tmpName; if (cd) // scope matches that of a class
// check if this is a class reference {
if (clName!=tmpName) ol.writeObjectLink(cd->getReference(),
generateClassRef(ol,name,linkText); cd->getOutputFileBase(),0,linkText);
else if (!cd->isReference())
ol.docify(linkText); ol.writePageRef(cd->name(),0);
}
else // scope matches that of a namespace
{
ol.writeObjectLink(nd->getReference(),
nd->getOutputFileBase(),0,linkText);
if (!nd->getReference())
ol.writePageRef(nd->name(),0);
}
// link has been written, stop now.
return; return;
} }
else /* check if it is a class, if not continue to search */ else if (scName==tmpName || (!inSeeBlock && scopePos==-1)) // nothing to link => output plain text
{ {
if (clName!=tmpName && getClass(tmpName)!=0) ol.docify(linkText);
{ // text has been written, stop now.
generateClassRef(ol,tmpName,linkText); return;
return;
}
} }
// continue search...
linkText = rt;
} }
// extract scope // extract scope
QString scopeContext=clName; QCString scopeStr=scName;
QString scopeUser;
if (scopePos>0) scopeUser=tmpName.left(scopePos);
//printf("scopeContext=%s scopeUser=%s\n",scopeContext.data(),scopeUser.data()); //printf("scopeContext=%s scopeUser=%s\n",scopeContext.data(),scopeUser.data());
// extract name // extract userscope+name
int startNamePos=scopePos!=-1 ? scopePos+2 : 0;
int endNamePos=bracePos!=-1 ? bracePos : tmpName.length(); int endNamePos=bracePos!=-1 ? bracePos : tmpName.length();
QString nameStr=tmpName.mid(startNamePos,endNamePos-startNamePos); QCString nameStr=tmpName.left(endNamePos);
// extract arguments // extract arguments
QString argsStr; QCString argsStr;
if (bracePos!=-1) argsStr=tmpName.right(tmpName.length()-bracePos); if (bracePos!=-1) argsStr=tmpName.right(tmpName.length()-bracePos);
// create a default link text if none was explicitly given // create a default link text if none was explicitly given
bool explicitLink=TRUE; bool explicitLink=TRUE;
if (linkText.isNull()) if (linkText.isNull())
{ {
if (!scopeUser.isEmpty()) linkText=scopeUser+"::"; //if (!scopeUser.isEmpty()) linkText=scopeUser+"::";
linkText+=nameStr; linkText=nameStr;
if (linkText.left(2)=="::") linkText=linkText.right(linkText.length()-2);
explicitLink=FALSE; explicitLink=FALSE;
} }
//printf("scope=`%s' name=`%s' arg=`%s' linkText=`%s'\n", //printf("scope=`%s' name=`%s' arg=`%s' linkText=`%s'\n",
// scopeStr.data(),nameStr.data(),argsStr.data(),linkText.data()); // scopeStr.data(),nameStr.data(),argsStr.data(),linkText.data());
//Define *d=0;
MemberDef *md = 0; MemberDef *md = 0;
ClassDef *cd = 0; ClassDef *cd = 0;
FileDef *fd = 0; FileDef *fd = 0;
NamespaceDef *nd = 0; NamespaceDef *nd = 0;
int scopeOffset=scopeContext.length();
do //printf("Try with scName=`%s' nameStr=`%s' argsStr=`%s'\n",
// scopeStr.data(),nameStr.data(),argsStr.data());
// check if nameStr is a member or global.
if (getDefs(scopeStr,nameStr,argsStr,md,cd,fd,nd))
{ {
QString totalScope=scopeUser.copy(); //printf("after getDefs nd=%p\n",nd);
if (scopeOffset>0) QCString anchor = (md->isReference() || md->hasDocumentation()) ? md->anchor() : 0;
QCString cName,aName;
if (cd) // nameStr is a member of cd
{ {
if (!totalScope.isEmpty()) totalScope.prepend("::"); //printf("addObjectLink(%s,%s,%s,%s)\n",cd->getReference(),
totalScope.prepend(scopeContext.left(scopeOffset)); // cd->getOutputFileBase(),anchor.data(),resultName.stripWhiteSpace().data());
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),
anchor,linkText.stripWhiteSpace());
cName=cd->name();
aName=md->anchor();
} }
//printf("Try with totalScope=`%s'\n",totalScope.data()); else if (nd) // nameStr is a member of nd
// check if nameStr is a member or global.
if (getDefs(nameStr,totalScope,argsStr,md,cd,fd,nd))
{ {
QString anchor = md->hasDocumentation() ? md->anchor() : 0; //printf("writing namespace link\n");
QString cName,aName; ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),
if (cd) // nameStr is a member of cd anchor,linkText.stripWhiteSpace());
{ cName=nd->name();
//printf("addObjectLink(%s,%s,%s,%s)\n",cd->getReference(), aName=md->anchor();
// cd->getOutputFileBase(),anchor.data(),resultName.stripWhiteSpace().data()); }
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(), else if (fd) // nameStr is a global in file fd
anchor,linkText.stripWhiteSpace()); {
cName=cd->name(); //printf("addFileLink(%s,%s,%s)\n",fd->getOutputFileBase(),anchor.data(),
aName=md->anchor(); // resultName.stripWhiteSpace().data());
} ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),
else if (nd) // nameStr is a member of nd anchor,linkText.stripWhiteSpace());
{ cName=fd->name();
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(), aName=md->anchor();
anchor,linkText.stripWhiteSpace()); }
cName=nd->name(); else // should not be reached
aName=md->anchor(); {
} //printf("add no link fd=cd=0\n");
else if (fd) // nameStr is a global in file fd ol.docify(linkText);
{ }
//printf("addFileLink(%s,%s,%s)\n",fd->getOutputFileBase(),anchor.data(),
// resultName.stripWhiteSpace().data());
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),
anchor,linkText.stripWhiteSpace());
cName=fd->name();
aName=md->anchor();
}
else // should not be reached
{
//printf("add no link fd=cd=0\n");
ol.docify(linkText);
}
// for functions we add the arguments if explicitly specified or else "()" // for functions we add the arguments if explicitly specified or else "()"
if (!rt && (md->isFunction() || md->isPrototype() || md->isSignal() || md->isSlot())) if (!rt && (md->isFunction() || md->isPrototype() || md->isSignal() || md->isSlot()))
{ {
if (argsStr.isNull()) if (argsStr.isNull())
ol.writeString("()"); ol.writeString("()");
else else
ol.docify(argsStr); ol.docify(argsStr);
} }
// generate the page reference (for LaTeX) // generate the page reference (for LaTeX)
if (cName.length()>0 || aName.length()>0) if (cName.length()>0 || aName.length()>0)
{
if (
(cd && !cd->isReference() && cd->isVisible()) ||
(fd && !fd->isReference()) ||
(nd /* TODO: && !nd->isReference() */)
)
{ {
if ( ol.writePageRef(cName,aName);
(cd && !cd->isReference() && cd->isVisible()) ||
(fd && !fd->isReference()) ||
(nd /* TODO: && !nd->isReference() */)
)
{
ol.writePageRef(cName,aName);
}
} }
return;
} }
// else if (!nameStr.isNull() && (d=defineDict[nameStr])) return;
// // check if nameStr is perhaps a define }
// {
// if (d->hasDocumentation() && d->fileDef)
// {
// ol.writeObjectLink(0,d->fileDef->getOutputFileBase(),d->anchor,
// linkText.stripWhiteSpace());
// if (!explicitLink) ol.docify(argsStr);
// }
// }
if (scopeOffset==0)
scopeOffset=-1;
else if ((scopeOffset=scopeContext.findRev("::",scopeOffset-1))==-1)
scopeOffset=0;
} while (scopeOffset>=0);
// nothing found // nothing found
if (rt) if (rt)
ol.docify(rt); ol.docify(rt);
...@@ -2150,9 +2422,9 @@ void generateRef(OutputList &ol,const char *clName, ...@@ -2150,9 +2422,9 @@ void generateRef(OutputList &ol,const char *clName,
void generateLink(OutputList &ol,const char *clName, void generateLink(OutputList &ol,const char *clName,
const char *lr,bool inSeeBlock,const char *lt) const char *lr,bool inSeeBlock,const char *lt)
{ {
QString linkRef=lr; QCString linkRef=lr;
//PageInfo *pi=0; //PageInfo *pi=0;
//printf("generateLink(%s,%s)\n",lr,lt); //printf("generateLink(%s,%s,%s) inSeeBlock=%d\n",clName,lr,lt,inSeeBlock);
//FileInfo *fi=0; //FileInfo *fi=0;
FileDef *fd; FileDef *fd;
bool ambig; bool ambig;
...@@ -2172,7 +2444,7 @@ void generateLink(OutputList &ol,const char *clName, ...@@ -2172,7 +2444,7 @@ void generateLink(OutputList &ol,const char *clName,
void generateFileRef(OutputList &ol,const char *name,const char *text) void generateFileRef(OutputList &ol,const char *name,const char *text)
{ {
QString linkText = text ? text : name; QCString linkText = text ? text : name;
//FileInfo *fi; //FileInfo *fi;
FileDef *fd; FileDef *fd;
bool ambig; bool ambig;
...@@ -2186,14 +2458,14 @@ void generateFileRef(OutputList &ol,const char *name,const char *text) ...@@ -2186,14 +2458,14 @@ void generateFileRef(OutputList &ol,const char *name,const char *text)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
QString substituteClassNames(const QString &s) QCString substituteClassNames(const QCString &s)
{ {
int i=0,l,p; int i=0,l,p;
QString result; QCString result;
QRegExp r("[a-z_A-Z][a-z_A-Z0-9]*"); QRegExp r("[a-z_A-Z][a-z_A-Z0-9]*");
while ((p=r.match(s,i,&l))!=-1) while ((p=r.match(s,i,&l))!=-1)
{ {
QString *subst; QCString *subst;
if (p>i) result+=s.mid(i,p-i); if (p>i) result+=s.mid(i,p-i);
if ((subst=substituteDict[s.mid(p,l)])) if ((subst=substituteDict[s.mid(p,l)]))
{ {
...@@ -2211,14 +2483,14 @@ QString substituteClassNames(const QString &s) ...@@ -2211,14 +2483,14 @@ QString substituteClassNames(const QString &s)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
QString convertSlashes(const QString &s,bool dots) QCString convertSlashes(const QCString &s,bool dots)
{ {
QString result; QCString result;
int i,l=s.length(); int i,l=s.length();
for (i=0;i<l;i++) for (i=0;i<l;i++)
if (s.at(i)!='/' && (!dots || s.at(i)!='.')) if (s.at(i)!='/' && (!dots || s.at(i)!='.'))
{ {
if (caseSensitiveNames) if (Config::caseSensitiveNames)
{ {
result+=s[i]; result+=s[i];
} }
...@@ -2235,10 +2507,10 @@ QString convertSlashes(const QString &s,bool dots) ...@@ -2235,10 +2507,10 @@ QString convertSlashes(const QString &s,bool dots)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// substitute all occurences of `src' in `s' by `dst' // substitute all occurences of `src' in `s' by `dst'
QString substitute(const char *s,const char *src,const char *dst) QCString substitute(const char *s,const char *src,const char *dst)
{ {
QString input=s; QCString input=s;
QString output; QCString output;
int i=0,p; int i=0,p;
while ((p=input.find(src,i))!=-1) while ((p=input.find(src,i))!=-1)
{ {
...@@ -2255,8 +2527,8 @@ QString substitute(const char *s,const char *src,const char *dst) ...@@ -2255,8 +2527,8 @@ QString substitute(const char *s,const char *src,const char *dst)
FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig)
{ {
ambig=FALSE; ambig=FALSE;
QString name=n; QCString name=n;
QString path; QCString path;
if (name.isNull()) return 0; if (name.isNull()) return 0;
int slashPos=QMAX(name.findRev('/'),name.findRev('\\')); int slashPos=QMAX(name.findRev('/'),name.findRev('\\'));
if (slashPos!=-1) if (slashPos!=-1)
...@@ -2298,8 +2570,8 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig) ...@@ -2298,8 +2570,8 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig)
void showFileDefMatches(const FileNameDict *fnDict,const char *n) void showFileDefMatches(const FileNameDict *fnDict,const char *n)
{ {
QString name=n; QCString name=n;
QString path; QCString path;
int slashPos=QMAX(name.findRev('/'),name.findRev('\\')); int slashPos=QMAX(name.findRev('/'),name.findRev('\\'));
if (slashPos!=-1) if (slashPos!=-1)
{ {
...@@ -2323,10 +2595,10 @@ void showFileDefMatches(const FileNameDict *fnDict,const char *n) ...@@ -2323,10 +2595,10 @@ void showFileDefMatches(const FileNameDict *fnDict,const char *n)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void setFileNameForSections(QList<QString> *anchorList,const char *fileName) void setFileNameForSections(QList<QCString> *anchorList,const char *fileName)
{ {
if (!anchorList) return; if (!anchorList) return;
QString *s=anchorList->first(); QCString *s=anchorList->first();
while (s) while (s)
{ {
SectionInfo *si; SectionInfo *si;
......
...@@ -41,46 +41,47 @@ extern void writeMemberDocs(OutputList &ol, ...@@ -41,46 +41,47 @@ extern void writeMemberDocs(OutputList &ol,
MemberList *ml,const char *scopeName,MemberDef::MemberType m); MemberList *ml,const char *scopeName,MemberDef::MemberType m);
extern void setAnchors(char id,MemberList *ml); extern void setAnchors(char id,MemberList *ml);
//extern int countMemberDocs(MemberList *ml,MemberDef::MemberType m); //extern int countMemberDocs(MemberList *ml,MemberDef::MemberType m);
extern QString fileToString(const char *name); extern QCString fileToString(const char *name);
extern QString dateToString(bool); extern QCString dateToString(bool);
//extern OutputList linkifyText(const char *clName,const char *name, //extern OutputList linkifyText(const char *clName,const char *name,
// const char *text); // const char *text);
extern bool getDefs(const QString &memberName,const QString &className, extern bool getDefs(const QCString &scopeName,const QCString &memberName,
const char *, MemberDef *&md, ClassDef *&cd,FileDef *&fd, const char *, MemberDef *&md, ClassDef *&cd,FileDef *&fd,
NamespaceDef *&nd); NamespaceDef *&nd);
extern void generateRef(OutputList &ol,const char *, extern void generateRef(OutputList &ol,const char *,
const char *,bool inSeeBlock,const char * =0); const char *,bool inSeeBlock,const char * =0);
extern void generateLink(OutputList &ol,const char *, extern void generateLink(OutputList &ol,const char *,
const char *,bool inSeeBlock,const char *); const char *,bool inSeeBlock,const char *);
extern void generateClassRef(OutputList &ol,const char *clName, //extern void generateClassRef(OutputList &ol,const char *clName,
const char *linkTxt=0); // const char *linkTxt=0);
extern void generateFileRef(OutputList &ol,const char *, extern void generateFileRef(OutputList &ol,const char *,
const char *linkTxt=0); const char *linkTxt=0);
extern bool matchArguments(ArgumentList *,ArgumentList *, extern bool matchArguments(ArgumentList *,ArgumentList *,
const char *cl=0,const char *ns=0); const char *cl=0,const char *ns=0);
extern void mergeArguments(ArgumentList *,ArgumentList *); extern void mergeArguments(ArgumentList *,ArgumentList *);
extern QString substituteClassNames(const QString &s); extern QCString substituteClassNames(const QCString &s);
extern QString convertSlashes(const QString &s,bool dots=FALSE); extern QCString convertSlashes(const QCString &s,bool dots=FALSE);
extern QString substitute(const char *s,const char *src,const char *dst); extern QCString substitute(const char *s,const char *src,const char *dst);
extern QString resolveDefines(const char *n); extern QCString resolveDefines(const char *n);
extern ClassDef *getClass(const char *key); extern ClassDef *getClass(const char *key);
//extern int strcscmp(const char *s1,const char *s2); //extern int strcscmp(const char *s1,const char *s2);
extern FileDef *findFileDef(const FileNameDict *fnDict,const char *n, extern FileDef *findFileDef(const FileNameDict *fnDict,const char *n,
bool &ambig); bool &ambig);
extern void showFileDefMatches(const FileNameDict *fnDict,const char *n); extern void showFileDefMatches(const FileNameDict *fnDict,const char *n);
extern int guessSection(const char *name); extern int guessSection(const char *name);
//extern QString nameToFile(const char *name); //extern QCString nameToFile(const char *name);
extern bool isId(char c); extern bool isId(char c);
extern QString removeRedundantWhiteSpace(const QString &s); extern QCString removeRedundantWhiteSpace(const QCString &s);
extern void startTitle(OutputList &ol); extern void startTitle(OutputList &ol);
extern void endTitle(OutputList &ol,const char *name); extern void endTitle(OutputList &ol,const char *name);
void startFile(OutputList &ol,const char *name, void startFile(OutputList &ol,const char *name,
const char *title,bool external=FALSE); const char *title,bool external=FALSE);
void endFile(OutputList &ol,bool external=FALSE); void endFile(OutputList &ol,bool external=FALSE);
void writeQuickLinks(OutputList &ol,bool compact,bool external=FALSE); void writeQuickLinks(OutputList &ol,bool compact,bool external=FALSE);
QString argListToString(ArgumentList *al); QCString argListToString(ArgumentList *al);
QString generateMarker(int id); QCString generateMarker(int id);
void writeExample(OutputList &ol,ExampleList *el); void writeExample(OutputList &ol,ExampleList *el);
void setFileNameForSections(QList<QString> *anchorList,const char *fileName); void setFileNameForSections(QList<QCString> *anchorList,const char *fileName);
QCString stripAnnonymousScope(const QCString &s);
#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