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