Commit a81ce474 authored by Dimitri van Heesch's avatar Dimitri van Heesch

+ The graphical class hierarchy was not properly generated when

  template classes were used.
+ Template specialization could not be documented using the
  \class command. This is now fixed. Example:
  /*!
   * \class T<A,int>
   * My template specialization of template T.
   */
+ Fixed a bug when parsing M$-IDL code, containing
  helpstring("bla") attributes. The attributes of a method are no longer
  shown in the documentation (the attributes of method arguments
  still visible however).
+ Improved the search algorithm that tries to connect classes with their
  base classes. It should now (hopefully) work correct in all cases
  where nested classes and/or namespaces are used.
+ Fixed a scanner problem that could cause doxygen to get
  confused after parsing struct initializers.
+ the DOTFONTPATH environment variable is now automatically set
  for Windows. This should make any "missing doxfont.ttf"
  messages disappear.
+ the extra LaTeX packages specified with EXTRA_PACKAGES can now
  also be used when generating formulas for HTML.
+ The documentation of a parameters that is part of a member definition,
  is now used in the documentation as well.
+ Fixed a HTML output bug in the class/file group-pages.
+ Links to example files generated with \link ... \endlink where not
  correct.
+ made the bullet list generation more robust. A space is now required
  after the - sign. A list can now start a paragraph.
+ the configure script now detects whether or not dot is installed.
+ The VERBATIM_HEADERS option didn't have any effect any more.
  It should now works again as advertised.
+ The IGNORE_PREFIX option can now also deal with a list of prefixes.
+ @verbatim ... @endverbatim blocks did not work.
+ new option SHOW_INCLUDE_FILES, which can be set to NO to turn of the
  list of include files that is generated for each documented file.
+ new option STRIP_CODE_COMMENTS, which can be set to NO to keep any
  special comment blocks in the generated code fragments.
parent ddbc18f5
DOXYGEN Version 1.1.0
DOXYGEN Version 1.1.0-20000220
CONTENTS
--------
......@@ -15,8 +15,8 @@ INSTALLATION INSTRUCTIONS FOR UNIX:
1. Unpack the archive, unless you already have:
gunzip doxygen-1.1.0.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.0.src.tar # unpack it
gunzip doxygen-1.1.0-20000220.src.tar.gz # uncompress the archive
tar xf doxygen-1.1.0-20000220.src.tar # unpack it
2. Run the configure script:
......@@ -252,4 +252,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (13 February 2000)
Dimitri van Heesch (20 February 2000)
DOXYGEN Version 1.1.0
DOXYGEN Version 1.1.0-20000220
Please read INSTALL for compilation instructions.
......@@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at
Enjoy,
Dimitri van Heesch (13 February 2000)
Dimitri van Heesch (20 February 2000)
1.1.0
1.1.0-20000220
......@@ -19,6 +19,7 @@ bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
f_debug=NO
f_shared=YES
f_make=NO
f_dot=NO
f_perl=NO
f_plf_auto=NO
f_prefix=/usr
......@@ -51,6 +52,9 @@ while test -n "$1"; do
--make)
shift; f_make=$1
;;
--dot)
shift; f_dot=$1
;;
--perl)
shift; f_perl=$1
;;
......@@ -72,10 +76,10 @@ done
if test "$f_help" = y; then
cat <<EOF
Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
[--perl name] [--make name] [--platform target] [--prefix dir]
[--install name] [--english-only]
[--perl name] [--make name] [--dot name] [--platform target]
[--prefix dir] [--install name] [--english-only]
Options:ll
Options:
--help Print this help
......@@ -91,6 +95,10 @@ Options:ll
--make name Use \`name' as the name of the GNU make tool
[default: autodetect]
--dot name Use \`name' as the name of the dot tool that
is part of the Graphviz package.
[default: autodetect]
--platform target Do not detect platform but use \`target' instead.
See PLATFORMS for a list of possibilities
......@@ -241,6 +249,27 @@ if test "$f_make" = NO; then
fi
echo "using $f_make"
# - check for dot ------------------------------------------------------------
echo -n " Checking for dot... "
if test "$f_dot" = NO; then
dot_dirs="$bin_dirs"
dot_prog=NO
for j in $dot_dirs; do
if test -x "$j/dot"; then
dot_prog="$j/dot"
break 2
fi
done
f_dot="$dot_prog"
fi
if test "$f_dot" = NO; then
echo "not found!";
else
echo "using $f_dot"
fi
# - check for perl ------------------------------------------------------------
echo -n " Checking for perl... "
......@@ -294,6 +323,12 @@ DOXYDOCS = ..
export TMAKEPATH
EOF
if test "$f_dot" != NO; then
cat >> .makeconfig <<EOF
HAVE_DOT = $f_dot
EOF
fi
touch .tmakeconfig
if test "$f_shared" = NO; then
cat >> .tmakeconfig <<EOF
......@@ -302,7 +337,7 @@ EOF
fi
if test "$f_english" = YES; then
cat >> .tmakeconfig << EOF
cat >> .tmakeconfig <<EOF
TMAKE_CXXFLAGS = -DENGLISH_ONLY
EOF
fi
......
......@@ -120,7 +120,9 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_repeat_brief REPEAT_BRIEF
<li> \refitem cfg_search_includes SEARCH_INCLUDES
<li> \refitem cfg_searchengine SEARCHENGINE
<li> \refitem cfg_show_include_files SHOW_INCLUDE_FILES
<li> \refitem cfg_source_browser SOURCE_BROWSER
<li> \refitem cfg_strip_code_comments STRIP_CODE_COMMENTS
<li> \refitem cfg_strip_from_path STRIP_FROM_PATH
<li> \refitem cfg_rtf_hyperlinks RTF_HYPERLINKS
<li> \refitem cfg_rtf_output RTF_OUTPUT
......@@ -292,6 +294,13 @@ followed by the descriptions of the tags grouped by category.
Setting the \c INLINE_SOURCES tag to \c YES will include the body
of functions, classes and enums directly into the documentation.
\anchor cfg_strip_code_comments
<dt>\c STRIP_CODE_COMMENTS <dd>
\addindex STRIP_CODE_COMMENTS
Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
doxygen to hide any special comment blocks from generated source code
fragments. Normal C and C++ comments will always remain visible.
\anchor cfg_case_sense_names
<dt>\c CASE_SENSE_NAMES <dd>
\addindex CASE_SENSE_NAMES
......@@ -309,6 +318,13 @@ followed by the descriptions of the tags grouped by category.
which an include is specified. Set to NO to disable this.
\sa Section \ref cmdclass "\\class".
\anchor cfg_show_include_files
<dt>\c SHOW_INCLUDE_FILES <dd>
\addindex SHOW_INCLUDE_FILES
If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
will put list of the files that are included by a file in the documentation
of that file.
\anchor cfg_javadoc_autobrief
<dt>\c JAVADOC_AUTOBRIEF <dd>
\addindex JAVADOC_AUTOBRIEF
......@@ -559,10 +575,11 @@ used to specify the number of columns in which this list will be split (can be a
\anchor cfg_ignore_prefix
<dt>\c IGNORE_PREFIX <dd>
In case all classes in a project start with a common prefix, all
classes will be put under the same header in the alphabetical index.
The \c IGNORE_PREFIX tag can be use to specify a prefix that should be ignored
while generating the index headers.
In case all classes in a project start with a common prefix, all classes will
be put under the same header in the alphabetical index.
The \c IGNORE_PREFIX tag can be used to specify a prefix
(or a list of prefixes) that should be ignored while generating the index
headers.
</dl>
......
......@@ -103,8 +103,6 @@ tools should be installed.
the Graph visualization toolkit version 1.5</a><br>
Needed for the include dependency graphs, the graphical inheritance graphs,
and the collaboration graphs.<br>
<b>Note:</b> For windows you will have to set the <code>DOTFONTPATH</code> environment
variable to include the current directory (e.g. <code>DOTFONTPATH=.</code>)
<li><a href="http://msdn.microsoft.com/workshop/author/htmlhelp">
the HTML help workshop</a> (for Windows only)<br>
Needed for compiling compressed HTML output (a.k.a. the new Windows help format).
......
......@@ -20,12 +20,12 @@ all: class/html/index.html \
template/html/index.html \
tag/html/index.html \
group/html/index.html \
diagram/html/index.html
diagrams/html/index.html
clean:
rm -rf class define enum file func page relates author \
par overload example include qtstyle jdstyle structcmd \
autolink tag restypedef afterdoc template
autolink tag restypedef afterdoc template tag group diagrams
class/html/index.html: class.h class.cfg
$(DOXYGEN)/bin/doxygen class.cfg
......@@ -92,5 +92,7 @@ template/html/index.html: templ.cpp templ.cfg
group/html/index.html: group.cpp group.cfg
$(DOXYGEN)/bin/doxygen group.cfg
diagram/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
diagrams/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
ifneq ($(HAVE_DOT),)
$(DOXYGEN)/bin/doxygen diagrams.cfg
endif
......@@ -16,20 +16,19 @@ all: class/html/index.html \
jdstyle/html/index.html \
structcmd/html/index.html \
autolink/html/index.html \
tag/html/index.html \
restypedef/html/index.html \
afterdoc/html/index.html \
template/html/index.html \
tag/html/index.html \
group/html/index.html \
diagram/html/index.html
diagrams/html/index.html
clean:
deltree /y class define enum file
deltree /y func page relates author
deltree /y par overload example include qtstyle
deltree /y jdstyle structcmd autolink tag resdefine
deltree /y restypedef
deltree /y jdstyle structcmd autolink resdefine
deltree /y restypedef afterdoc template tag group diagrams
class/html/index.html: class.h class.cfg
$(DOXYDIR)\doxygen class.cfg
......@@ -98,5 +97,5 @@ template/html/index.html: templ.cpp templ.cfg
group/html/index.html: group.cpp group.cfg
$(DOXYDIR)\doxygen group.cfg
diagram/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
diagrams/html/index.html: diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg
$(DOXYDIR)\doxygen diagrams.cfg
......@@ -2,7 +2,7 @@
#
# $Id$
#
# Copyright (C) 1997-1999 by Dimitri van Heesch.
# Copyright (C) 1997-2000 by Dimitri van Heesch.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby
......
......@@ -331,8 +331,12 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (incInfo)
{
QCString nm=incInfo->includeName.isEmpty() ?
incInfo->fileDef->docName().data() :
(incInfo->fileDef ?
incInfo->fileDef->docName().data() : ""
) :
incInfo->includeName.data();
if (!nm.isEmpty())
{
ol.startTypewriter();
ol.docify("#include ");
if (incInfo->local)
......@@ -344,7 +348,14 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.docify(nm);
ol.disableAllBut(OutputGenerator::Html);
ol.enable(OutputGenerator::Html);
if (incInfo->fileDef)
{
ol.writeObjectLink(0,incInfo->fileDef->includeName(),0,nm);
}
else
{
ol.docify(nm);
}
ol.popGeneratorState();
if (incInfo->local)
ol.docify("\"");
......@@ -353,6 +364,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endTypewriter();
ol.newParagraph();
}
}
if (!Config::genTagFile.isEmpty()) tagFile << ">" << name() << ":";
......@@ -1340,12 +1352,14 @@ void ClassDef::determineImplUsageRelation()
//printf("in class %s found var type=`%s' name=`%s'\n",
// name().data(),type.data(),md->name().data());
int p=0,i,l;
while ((i=re.match(type,p,&l))!=-1) // for each class name in the type
bool found=FALSE;
while ((i=re.match(type,p,&l))!=-1 && !found) // for each class name in the type
{
ClassDef *cd=getClass(name()+"::"+type.mid(i,l));
if (cd==0) cd=getClass(type.mid(i,l)); // TODO: also try inbetween scopes!
if (cd && cd->isLinkable()) // class exists and is linkable
{
found=TRUE;
if (usesImplClassDict==0) usesImplClassDict = new UsesClassDict(257);
UsesClassDef *ucd=usesImplClassDict->find(cd->name());
if (ucd==0)
......
......@@ -16,6 +16,7 @@
#include "classlist.h"
#include "config.h"
#include "util.h"
ClassList::ClassList() : QList<ClassDef>()
{
......@@ -30,10 +31,12 @@ int ClassList::compareItems(GCI item1, GCI item2)
ClassDef *c1=(ClassDef *)item1;
ClassDef *c2=(ClassDef *)item2;
int prefixLength = Config::ignorePrefix.length();
int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
return strcmp(c1->name().data()+i1,c2->name().data()+i2);
//int prefixLength = Config::ignorePrefix.length();
//int i1 = c1->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
//int i2 = c2->name().left(prefixLength)==Config::ignorePrefix ? prefixLength : 0;
return strcmp(c1->name().data()+getPrefixIndex(c1->name()),
c2->name().data()+getPrefixIndex(c2->name())
);
}
ClassListIterator::ClassListIterator(const ClassList &cllist) :
......
......@@ -2510,34 +2510,12 @@ YY_RULE_SETUP
#line 887 "code.l"
YY_BREAK
/*
<SkipSpecialComment>"//"
<SkipSpecialComment>[ \t]*"* /" {
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>[ \t]*"* /"[ \t\n]*"\n"/"/ *" {
//g_code->codify("\n");
//QCString lineText=yytext;
//g_yyLineNr+=lineText.contains('\n');
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>.
<SkipSpecialComment>\n {
codifyLines(yytext);
}
<SkipSpecialCxxComment>.* /\n {
codifyLines(yytext);
BEGIN( lastDContext ) ;
}
<SkipSpecialCxxComment>.
<SkipSpecialCxxComment>\n {
codifyLines(yytext);
}
*/
case 67:
YY_RULE_SETUP
#line 912 "code.l"
#line 888 "code.l"
{ // remove special one-line comment
if (Config::stripCommentsFlag)
{
g_yyLineNr+=((QCString)yytext).contains('\n');
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
......@@ -2545,11 +2523,18 @@ YY_RULE_SETUP
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
}
YY_BREAK
case 68:
YY_RULE_SETUP
#line 920 "code.l"
#line 903 "code.l"
{ // remove special one-line comment
if (Config::stripCommentsFlag)
{
g_yyLineNr++;
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
......@@ -2557,57 +2542,100 @@ YY_RULE_SETUP
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
}
YY_BREAK
case 69:
YY_RULE_SETUP
#line 928 "code.l"
#line 918 "code.l"
{ // strip special one-line comment
if (Config::stripCommentsFlag)
{
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
}
else
{
codifyLines(yytext);
}
}
YY_BREAK
case 70:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 932 "code.l"
#line 929 "code.l"
{
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
g_yyLineNr++;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
codifyLines(yytext);
BEGIN(SkipComment);
}
}
YY_BREAK
case 71:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 937 "code.l"
#line 943 "code.l"
{ // special C comment block at a new line
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
}
YY_BREAK
case 72:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 941 "code.l"
#line 956 "code.l"
{ // special C comment block half way a line
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
}
YY_BREAK
case 73:
YY_RULE_SETUP
#line 945 "code.l"
{}
#line 969 "code.l"
{ if (!Config::stripCommentsFlag)
{
g_code->codify(yytext);
}
}
YY_BREAK
case 74:
YY_RULE_SETUP
#line 946 "code.l"
#line 974 "code.l"
{
g_code->codify(yytext);
g_lastCContext = YY_START ;
......@@ -2616,7 +2644,7 @@ YY_RULE_SETUP
YY_BREAK
case 75:
YY_RULE_SETUP
#line 951 "code.l"
#line 979 "code.l"
{
g_code->codify(yytext);
g_lastCContext = YY_START ;
......@@ -2625,14 +2653,14 @@ YY_RULE_SETUP
YY_BREAK
case 76:
YY_RULE_SETUP
#line 956 "code.l"
#line 984 "code.l"
{
codifyLines(yytext);
}
YY_BREAK
case 77:
YY_RULE_SETUP
#line 959 "code.l"
#line 987 "code.l"
{
g_code->codify(yytext);
}
......@@ -2648,7 +2676,7 @@ YY_RULE_SETUP
*/
case 78:
YY_RULE_SETUP
#line 972 "code.l"
#line 1000 "code.l"
ECHO;
YY_BREAK
case YY_STATE_EOF(INITIAL):
......@@ -3547,7 +3575,7 @@ int main()
return 0;
}
#endif
#line 972 "code.l"
#line 1000 "code.l"
/*@ ----------------------------------------------------------------------------
......
......@@ -885,31 +885,9 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
<RemoveSpecialCComment>"//"|"/*"
<RemoveSpecialCComment>\n { g_yyLineNr++; }
<RemoveSpecialCComment>.
/*
<SkipSpecialComment>"//"
<SkipSpecialComment>[ \t]*"* /" {
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>[ \t]*"* /"[ \t\n]*"\n"/"/ *" {
//g_code->codify("\n");
//QCString lineText=yytext;
//g_yyLineNr+=lineText.contains('\n');
BEGIN( lastDContext ) ;
}
<SkipSpecialComment>.
<SkipSpecialComment>\n {
codifyLines(yytext);
}
<SkipSpecialCxxComment>.* /\n {
codifyLines(yytext);
BEGIN( lastDContext ) ;
}
<SkipSpecialCxxComment>.
<SkipSpecialCxxComment>\n {
codifyLines(yytext);
}
*/
<*>\n({B}*"//"[!/][^\n]*\n)* { // remove special one-line comment
if (Config::stripCommentsFlag)
{
g_yyLineNr+=((QCString)yytext).contains('\n');
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
......@@ -917,7 +895,14 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
}
<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment
if (Config::stripCommentsFlag)
{
g_yyLineNr++;
g_code->endCodeLine();
if (g_yyLineNr<g_inputLines)
......@@ -925,24 +910,67 @@ SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID})
startCodeLine(*g_code);
}
}
else
{
codifyLines(yytext);
}
}
<*>"//"[!/][^\n]*\n { // strip special one-line comment
if (Config::stripCommentsFlag)
{
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
}
else
{
codifyLines(yytext);
}
}
<*>\n{B}*"/*"[!*]/[^/*] {
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
g_yyLineNr++;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
codifyLines(yytext);
BEGIN(SkipComment);
}
}
<*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
}
<*>"/*"[!*]/[^/*] { // special C comment block half way a line
if (Config::stripCommentsFlag)
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
}
<*>"/*"("!"?)"*/" {}
else
{
g_lastCContext = YY_START ;
g_code->codify(yytext);
BEGIN(SkipComment);
}
}
<*>"/*"("!"?)"*/" { if (!Config::stripCommentsFlag)
{
g_code->codify(yytext);
}
}
<*>"/*" {
g_code->codify(yytext);
g_lastCContext = YY_START ;
......
This diff is collapsed.
......@@ -53,7 +53,7 @@ struct Config
static QCString paperType; // the page type to generate docs for
static QCString manExtension; // extension the man page files
static QCString htmlStyleSheet; // user defined cascading style sheet
static QCString ignorePrefix; // prefix to ignore for the alphabetical index
static QStrList ignorePrefixList; // list of prefixes to ignore for the alphabetical index
static QStrList includePath; // list of include paths
static QStrList examplePath; // list of example paths
static QStrList imagePath; // list of image paths
......@@ -112,6 +112,8 @@ struct Config
static bool generateRTF; // generate RTF flag
static bool compactRTFFlag; // generate more compact RTF
static bool rtfHyperFlag; // generate hyper links in RTF
static bool showIncFileFlag; // show include file in file documentation?
static bool stripCommentsFlag; // strip special comments from code fragments?
};
#endif
......@@ -20,6 +20,7 @@
* includes
*/
#include <stdio.h>
#include <stdlib.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>
......@@ -84,7 +85,7 @@ QCString Config::inputFilter;
QCString Config::paperType;
QCString Config::manExtension;
QCString Config::htmlStyleSheet;
QCString Config::ignorePrefix;
QStrList Config::ignorePrefixList;
QStrList Config::includePath;
QStrList Config::examplePath;
QStrList Config::imagePath;
......@@ -141,6 +142,8 @@ bool Config::inlineInfoFlag = TRUE;
bool Config::collGraphFlag = TRUE;
bool Config::includeGraphFlag = TRUE;
bool Config::gfxHierarchyFlag = TRUE;
bool Config::showIncFileFlag = TRUE;
bool Config::stripCommentsFlag = TRUE;
int Config::tabSize = 8;
int Config::colsInAlphaIndex = 5;
......@@ -219,7 +222,7 @@ static int yyread(char *buf,int max_size)
<Start>"TAB_SIZE"[ \t]*"=" { BEGIN(GetString); s=&tabSizeString; s->resize(0); }
<Start>"HTML_STYLESHEET"[ \t]*"=" { BEGIN(GetString); s=&Config::htmlStyleSheet; s->resize(0); }
<Start>"COLS_IN_ALPHA_INDEX"[ \t]*"=" { BEGIN(GetString); s=&colsInAlphaIndexString; s->resize(0); }
<Start>"IGNORE_PREFIX"[ \t]*"=" { BEGIN(GetString); s=&Config::ignorePrefix; s->resize(0); }
<Start>"IGNORE_PREFIX"[ \t]*"=" { BEGIN(GetStrList); l=&Config::ignorePrefixList; l->clear(); elemStr=""; }
<Start>"INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::includePath; l->clear(); elemStr=""; }
<Start>"EXAMPLE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::examplePath; l->clear(); elemStr=""; }
<Start>"IMAGE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&Config::imagePath; l->clear(); elemStr=""; }
......@@ -276,6 +279,8 @@ static int yyread(char *buf,int max_size)
<Start>"GENERATE_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateRTF; }
<Start>"COMPACT_RTF"[ \t]*"=" { BEGIN(GetBool); b=&Config::compactRTFFlag; }
<Start>"RTF_HYPERLINKS"[ \t]*"=" { BEGIN(GetBool); b=&Config::rtfHyperFlag; }
<Start>"SHOW_INCLUDE_FILES"[ \t]*"=" { BEGIN(GetBool); b=&Config::showIncFileFlag; }
<Start>"STRIP_CODE_COMMENTS"[ \t]*"=" { BEGIN(GetBool); b=&Config::stripCommentsFlag; }
<Start>[a-z_A-Z0-9]+ { err("Warning: ignoring unknown tag `%s' at line %d\n",yytext,yyLineNr); }
<GetString,GetBool>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n {
......@@ -433,7 +438,7 @@ void Config::init()
Config::paperType = "a4wide";
Config::manExtension = ".3";
Config::htmlStyleSheet.resize(0);
Config::ignorePrefix.resize(0);
Config::ignorePrefixList.clear();
Config::includePath.clear();
Config::examplePath.clear();
Config::imagePath.clear();
......@@ -492,6 +497,8 @@ void Config::init()
Config::collGraphFlag = TRUE;
Config::includeGraphFlag = TRUE;
Config::gfxHierarchyFlag = TRUE;
Config::showIncFileFlag = TRUE;
Config::stripCommentsFlag = TRUE;
}
void writeTemplateConfig(QFile *f,bool sl)
......@@ -695,6 +702,15 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "INLINE_SOURCES = NO\n";
if (!sl)
{
t << "\n";
t << "# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct\n";
t << "# doxygen to hide any special comment blocks from generated source code\n";
t << "# fragments. Normal C and C++ comments will always remain visible.\n";
t << "\n";
}
t << "STRIP_CODE_COMMENTS = YES\n";
if (!sl)
{
t << "\n";
t << "# If the CASE_SENSE_NAMES tag is set to NO (the default) then Doxygen\n";
......@@ -715,6 +731,15 @@ void writeTemplateConfig(QFile *f,bool sl)
}
t << "VERBATIM_HEADERS = YES\n";
if (!sl)
{
t << "\n";
t << "# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen\n";
t << "# will put list of the files that are included by a file in the documentation\n";
t << "# of that file.\n";
t << "\n";
}
t << "SHOW_INCLUDE_FILES = YES\n";
if (!sl)
{
t << "\n";
t << "# If the JAVADOC_AUTOBRIEF tag is set to YES (the default) then Doxygen\n";
......@@ -945,8 +970,8 @@ void writeTemplateConfig(QFile *f,bool sl)
t << "\n";
t << "# In case all classes in a project start with a common prefix, all\n";
t << "# classes will be put under the same header in the alphabetical index.\n";
t << "# The IGNORE_PREFIX tag can be use to specify a prefix that should be ignored\n";
t << "# while generating the index headers.\n";
t << "# The IGNORE_PREFIX tag can be used to specify one or more prefixes that\n";
t << "# should be ignored while generating the index headers.\n";
t << "\n";
}
t << "IGNORE_PREFIX = \n";
......@@ -1649,6 +1674,11 @@ void checkConfig()
}
}
}
#if defined(_WIN32)
if (Config::haveDotFlag) _putenv("DOTFONTPATH=.");
#endif
}
void parseConfig(const QCString &s)
......
......@@ -43,12 +43,13 @@ QCString Definition::nameToFile(const char *name)
{
switch(c)
{
case ':': result+="_c_"; break;
case ':': result+="_"; break;
case '<': result+="_lt"; break;
case '>': result+="_gt"; break;
case '*': result+="_ast"; break;
case '&': result+="_amp"; break;
case '|': result+="_p_"; break;
case '!': result+="_e_"; break;
case ',': result+="_x_"; break;
case ' ': break;
default:
......
......@@ -259,10 +259,6 @@ void DotNode::deleteNode()
// do not access cn after this!
}
}
//printf("delete node %s from memory (c=%d,p=%d)\n",
// m_label.data(),
// m_children?m_children->count():0,
// m_parents?m_parents->count():0);
delete this;
}
......@@ -413,25 +409,17 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
QDir::setCurrent(d.absPath());
QDir thisDir;
//QFile ind("inherit.html");
//if (ind.open(IO_WriteOnly))
//{
// QTextStream ti(&ind);
//ti << "<html><head><title>Class Hierarchy</title></head>" << endl;
//ti << "<body bgcolor=#ffffff>" << endl;
out << "<table border=0 cellspacing=10 cellpadding=0>" << endl;
QListIterator<DotNode> dnli(*m_rootSubgraphs);
DotNode *n;
for (dnli.toFirst();(n=dnli.current());++dnli)
{
//printf("Node %s color=%d (c=%d,p=%d)\n",
// n->m_label.data(),n->m_subgraphId,
// n->m_children?n->m_children->count():0,
// n->m_parents?n->m_parents->count():0);
QCString baseName;
baseName.sprintf("inherit_graph_%s",n->m_label.data());
QCString diskName=n->m_url.copy();
int i=diskName.find('$'); /* should not return -1 */
if (i!=-1) diskName=diskName.right(diskName.length()-i-1);
baseName.sprintf("inherit_graph_%s",diskName.data());
QCString dotName=baseName+".dot";
QCString gifName=baseName+".gif";
QCString mapName=baseName+".map";
......@@ -477,9 +465,6 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
thisDir.remove(mapName);
}
out << "</table>" << endl;
// ti << "</body></html>" << endl;
// ind.close();
//}
QDir::setCurrent(oldDir);
}
......
......@@ -67,8 +67,8 @@ class DotNode
void colorConnectedNodes(int curColor);
const DotNode *findRoot() const; // only works for acyclic graphs!
int m_number;
QCString m_label;
QCString m_url;
QCString m_label; //!< label text
QCString m_url; //!< url of the node (format: remove$local)
QList<DotNode> *m_parents; //!< list of parent nodes (incoming arrows)
QList<DotNode> *m_children; //!< list of child nodes (outgoing arrows)
QList<EdgeInfo> *m_edgeInfo; //!< edge info for each child
......
......@@ -339,42 +339,29 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
fd=ifd;
}
// if a file is found, we mark it as a source file.
if (fd)
{
//printf("Adding file %s used by %s\n",fd->name().data(),cd->name().data());
//printf("fd->name()=%s fd->absFilePath()=%s\n",fd->name().data(),
// fd->absFilePath().data());
// set include file definition
//cd->setIncludeFile(fd);
// set include supplied name
//cd->setIncludeName(root->includeName);
QCString iName = !root->includeName.isEmpty() ?
root->includeName.data() : root->includeFile.data();
bool local=FALSE;
if (!iName.isEmpty())
if (!iName.isEmpty()) // user specified include file
{
local = iName.at(0)=='"';
local = iName.at(0)=='"'; // is it a local include file
if (local || iName.at(0)=='<')
{
iName=iName.mid(1,iName.length()-2);
iName=iName.mid(1,iName.length()-2); // strip quotes or brackets
}
}
fd->setGenerateSource(TRUE);
if (Config::verbatimHeaderFlag) // generate code for header
{
cd->setIncludeFile(fd,iName,local);
//if (cd->name().find('@')==-1)
//{
// fd->setIncludeName(cd->getOutputFileBase()+"-include");
//}
//if (!fd->absFilePath().isEmpty() &&
// includeDict[fd->absFilePath()]==0) // include not inserted earlier
//{
// includeFiles.inSort(fd);
// includeDict.insert(fd->absFilePath(),fd);
//}
fd->setGenerateSource(TRUE);
}
else // put #include in the class documentation without link
{
cd->setIncludeFile(0,iName,local);
}
}
}
}
......@@ -1609,16 +1596,28 @@ void transferFunctionDocumentation()
//----------------------------------------------------------------------
bool findBaseClassRelation(Entry *root,ClassDef *cd,const char *scopePrefix,
bool insertUndocumented)
static bool findBaseClassRelation(Entry *root,ClassDef *cd,
BaseInfo *bi,
bool insertUndocumented
)
{
// The base class could ofcouse also be a non-nested class
QList<BaseInfo> *baseList=root->extends;
BaseInfo *bi=baseList->first();
bool foundAny=FALSE;
while (bi) // for each base class
Entry *parentNode=root->parent;
bool lastParent=FALSE;
do // for each parent scope, starting with the largest scope
// (in case of nested classes)
{
QCString scopeName= parentNode ? parentNode->name.data() : "";
int scopeOffset=scopeName.length();
do // try all parent scope prefixes, starting with the largest scope
{
//printf("scopePrefix=`%s' bi->name=`%s'\n",
// scopeName.left(scopeOffset).data(),bi->name.data());
QCString baseClassName=removeRedundantWhiteSpace(bi->name);
if (scopeOffset>0)
{
QCString baseClassName=removeRedundantWhiteSpace(scopePrefix+bi->name);
baseClassName.prepend(scopeName.left(scopeOffset)+"::");
}
ClassDef *baseClass=getClass(baseClassName);
if (baseClassName!=root->name) // check for base class with the same name,
// look in the outer scope for a match
......@@ -1629,6 +1628,7 @@ bool findBaseClassRelation(Entry *root,ClassDef *cd,const char *scopePrefix,
// (bi->prot==Private)?"private":((bi->prot==Protected)?"protected":"public"),
// (bi->virt==Normal)?"normal":"virtual"
// );
int i;
QCString templSpec;
if (baseClass==0 && (i=baseClassName.find('<'))!=-1)
......@@ -1685,11 +1685,12 @@ bool findBaseClassRelation(Entry *root,ClassDef *cd,const char *scopePrefix,
}
if (found)
{
//printf(">>> Documented base class = %s\n",bi->name.data());
// 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);
foundAny=TRUE;
return TRUE;
}
else if (insertUndocumented)
{
......@@ -1706,11 +1707,35 @@ bool findBaseClassRelation(Entry *root,ClassDef *cd,const char *scopePrefix,
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
//classDict.insert(resolveDefines(bi->name),baseClass);
classDict.insert(baseClassName,baseClass);
return TRUE;
}
else
{
//printf(">>> base class %s not found!\n",bi->name.data());
}
bi=baseList->next();
}
return foundAny;
if (scopeOffset==0)
{
scopeOffset=-1;
}
else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1)
{
scopeOffset=0;
}
//printf("new scopeOffset=`%d'",scopeOffset);
} while (scopeOffset>=0);
if (parentNode==0)
{
lastParent=TRUE;
}
else
{
parentNode=parentNode->parent;
}
} while (lastParent);
return FALSE;
}
//----------------------------------------------------------------------
......@@ -1743,20 +1768,19 @@ void computeClassRelations(Entry *root)
cd->visited=TRUE; // mark class as used
if (root->extends->count()>0) // there are base classes
{
Entry *p=root->parent;
bool found=FALSE;
// For nested classes (or classes inside namespaces) the base class
// could also be nested (or inside a namespace)!
// To find the correct scope, we try to prepend the scope to the base
// name, starting with the largest, most inner scope.
while (p && p->section&Entry::SCOPE_MASK &&
!(found=findBaseClassRelation(root,cd,p->name+"::",FALSE)))
p=p->parent;
// For classes with global scope the same search is preformed
if (!found)
// The base class could ofcouse also be a non-nested class
QList<BaseInfo> *baseList=root->extends;
BaseInfo *bi=baseList->first();
while (bi) // for each base class
{
// find a documented base class in the correct scope
if (!findBaseClassRelation(root,cd,bi,FALSE))
{
findBaseClassRelation(root,cd,0,TRUE);
} // class not nested
// no documented base class -> try to find an undocumented one
findBaseClassRelation(root,cd,bi,TRUE);
}
bi=baseList->next();
}
} // class has no base classes
} // else class is already found
}
......
#
# $Id$
#
# Copyright (C) 1997-1999 by Dimitri van Heesch.
# Copyright (C) 1997-2000 by Dimitri van Heesch.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation under the terms of the GNU General Public License is hereby
......
......@@ -126,6 +126,8 @@ void FileDef::writeDocumentation(OutputList &ol)
}
ol.writeSynopsis();
if (Config::showIncFileFlag)
{
ol.startTextBlock(TRUE);
QListIterator<IncludeInfo> ili(*includeList);
IncludeInfo *ii;
......@@ -166,6 +168,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.enableAll();
}
ol.endTextBlock();
}
if (Config::haveDotFlag && Config::includeGraphFlag)
{
......
......@@ -27,6 +27,7 @@
#include "image.h"
#include "util.h"
#include "message.h"
#include "config.h"
Formula::Formula(const char *text)
{
......@@ -66,6 +67,12 @@ void FormulaList::generateBitmaps(const char *path)
QTextStream t(&f);
t << "\\documentclass{article}" << endl;
t << "\\usepackage{epsf}" << endl; // for those who want to include images
const char *s=Config::extraPackageList.first();
while (s)
{
t << "\\usepackage{" << s << "}\n";
s=Config::extraPackageList.next();
}
t << "\\pagestyle{empty}" << endl;
t << "\\begin{document}" << endl;
int page=0;
......
......@@ -102,9 +102,9 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
if (fileList->count()>0)
{
ol.startMemberHeader();
ol.startGroupHeader();
parseText(ol,theTranslator->trFiles());
ol.endMemberHeader();
ol.endGroupHeader();
ol.startIndexList();
FileDef *fd=fileList->first();
while (fd)
......@@ -123,9 +123,9 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
if (!found)
{
ol.startMemberHeader();
ol.startGroupHeader();
parseText(ol,theTranslator->trCompounds());
ol.endMemberHeader();
ol.endGroupHeader();
ol.startIndexList();
found=TRUE;
}
......
......@@ -495,7 +495,7 @@ void writeFileIndex(OutputList &ol)
}
//----------------------------------------------------------------------------
#if 0
void writeSourceIndex(OutputList &ol)
{
ol.disableAllBut(OutputGenerator::Html);
......@@ -561,6 +561,7 @@ void writeSourceIndex(OutputList &ol)
endFile(ol);
ol.enable(OutputGenerator::Man);
}
#endif
//----------------------------------------------------------------------------
int countNamespaces()
......@@ -723,13 +724,11 @@ void writeAlphabeticalClassList(OutputList &ol)
ClassDef *cd;
char startLetter=0;
int headerItems=0;
int prefixLength = Config::ignorePrefix.length();
for (;(cd=cli.current());++cli)
{
if (cd->isLinkableInProject())
{
int index = cd->name().left(prefixLength)==Config::ignorePrefix ?
prefixLength : 0;
int index = getPrefixIndex(cd->name());
if (cd->name().at(index)!=startLetter) // new begin letter => new header
{
startLetter=cd->name().at(index);
......@@ -762,8 +761,7 @@ void writeAlphabeticalClassList(OutputList &ol)
{
if (cd->isLinkableInProject())
{
int index = cd->name().left(prefixLength)==Config::ignorePrefix ?
prefixLength : 0;
int index = getPrefixIndex(cd->name());
if (cd->name().at(index)!=startLetter)
{
// insert a new header using a dummy class pointer.
......@@ -811,8 +809,7 @@ void writeAlphabeticalClassList(OutputList &ol)
if (cd)
{
//printf("head ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>");
int index = cd->name().left(prefixLength)==Config::ignorePrefix ?
prefixLength : 0;
int index = getPrefixIndex(cd->name());
startLetter=cd->name().at(index);
char s[2]; s[0]=startLetter; s[1]=0;
ol.writeIndexHeading(s);
......
This diff is collapsed.
This diff is collapsed.
......@@ -1130,6 +1130,14 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl)
srcA->type = dstA->type.left(i2+2)+srcA->type;
srcA->name = dstA->name.copy();
}
if (srcA->docs.isEmpty() && !dstA->docs.isEmpty())
{
srcA->docs = dstA->docs.copy();
}
else if (dstA->docs.isEmpty() && !srcA->docs.isEmpty())
{
dstA->docs = srcA->docs.copy();
}
}
//printf("result mergeArguments `%s', `%s'\n",
// argListToString(srcAl).data(),argListToString(dstAl).data());
......@@ -1694,20 +1702,21 @@ bool generateLink(OutputList &ol,const char *clName,
//FileInfo *fi=0;
FileDef *fd;
GroupDef *gd;
PageInfo *pi;
bool ambig;
if (linkRef.isEmpty()) // no reference name!
{
ol.docify(lt);
return FALSE;
}
else if ((pageDict[linkRef])) // link to a page
else if ((pi=pageDict[linkRef])) // link to a page
{
ol.writeObjectLink(0,linkRef,0,lt);
ol.writeObjectLink(0,pi->name,0,lt);
return TRUE;
}
else if ((exampleDict[linkRef])) // link to an example
else if ((pi=exampleDict[linkRef])) // link to an example
{
ol.writeObjectLink(0,linkRef+"-example",0,lt);
ol.writeObjectLink(0,convertSlashes(pi->name,TRUE)+"-example",0,lt);
return TRUE;
}
else if ((gd=groupDict[linkRef])) // link to a group
......@@ -1915,3 +1924,24 @@ QCString substituteKeywords(const QCString &s,const char *title)
//----------------------------------------------------------------------
/*! Returns the character index within \a name of the first prefix
* in Config::ignorePrefixList that matches \a name at the left hand side,
* or zero if no match was found
*/
int getPrefixIndex(const QCString &name)
{
char *s = Config::ignorePrefixList.first();
while (s)
{
const char *ps=s;
const char *pd=name.data();
int i=0;
while (*ps!=0 && *pd!=0 && *ps==*pd) ps++,pd++,i++;
if (*ps==0 && *pd!=0)
{
return i;
}
s = Config::ignorePrefixList.next();
}
return 0;
}
......@@ -78,7 +78,6 @@ bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name);
void writePageRef(OutputList &ol,const char *cn,const char *mn);
QCString substituteKeywords(const QCString &s,const char *title);
//void pushGeneratorState(OutputList &ol);
//void popGeneratorState(OutputList &ol);
int getPrefixIndex(const QCString &name);
#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