Commit 5a7cb538 authored by dimitri's avatar dimitri

Release-1.2.16

parent 697375af
DOXYGEN Version 1.2.15-20020512 DOXYGEN Version 1.2.16
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (12 May 2002) Dimitri van Heesch (20 May 2002)
DOXYGEN Version 1.2.15_20020512 DOXYGEN Version 1.2.16
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (12 May 2002) Dimitri van Heesch (dimitri@stack.nl) (20 May 2002)
1.2.15-20020512 1.2.16
...@@ -51,3 +51,4 @@ DOC_ABSPATH = ...@@ -51,3 +51,4 @@ DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/ BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS = EXT_DOC_PATHS =
PDF_HYPERLINKS = YES PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
all: doxygen_manual.pdf all: doxygen_manual.pdf
doxygen_manual.pdf: doxygen_manual.ps #doxygen_manual.pdf: doxygen_manual.ps
ps2pdf doxygen_manual.ps doxygen_manual.pdf # ps2pdf doxygen_manual.ps doxygen_manual.pdf
doxygen_manual.ps: doxygen_manual.dvi #doxygen_manual.ps: doxygen_manual.dvi
dvips -o doxygen_manual.ps doxygen_manual.dvi # dvips -o doxygen_manual.ps doxygen_manual.dvi
doxygen_manual.dvi: doxygen_manual.tex doxygen.sty doxygen_manual.pdf: doxygen_manual.tex doxygen.sty
echo "Running latex..." echo "Running latex..."
latex doxygen_manual.tex pdflatex doxygen_manual.tex
echo "Running makeindex..." echo "Running makeindex..."
makeindex doxygen_manual.idx makeindex doxygen_manual.idx
echo "Rerunning latex...." echo "Rerunning latex...."
latex doxygen_manual.tex pdflatex doxygen_manual.tex
clean: clean:
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.pdf
...@@ -79,6 +79,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -79,6 +79,7 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_cols_in_alpha_index COLS_IN_ALPHA_INDEX <li> \refitem cfg_cols_in_alpha_index COLS_IN_ALPHA_INDEX
<li> \refitem cfg_compact_latex COMPACT_LATEX <li> \refitem cfg_compact_latex COMPACT_LATEX
<li> \refitem cfg_compact_rtf COMPACT_RTF <li> \refitem cfg_compact_rtf COMPACT_RTF
<li> \refitem cfg_details_at_top DETAILS_AT_TOP
<li> \refitem cfg_disable_index DISABLE_INDEX <li> \refitem cfg_disable_index DISABLE_INDEX
<li> \refitem cfg_distribute_group_doc DISTRIBUTE_GROUP_DOC <li> \refitem cfg_distribute_group_doc DISTRIBUTE_GROUP_DOC
<li> \refitem cfg_doc_abspath DOC_ABSPATH <li> \refitem cfg_doc_abspath DOC_ABSPATH
...@@ -400,6 +401,14 @@ followed by the descriptions of the tags grouped by category. ...@@ -400,6 +401,14 @@ followed by the descriptions of the tags grouped by category.
comment as the brief description. If set to NO (the default), the comment as the brief description. If set to NO (the default), the
Javadoc-style will behave just like the Qt-style comments. Javadoc-style will behave just like the Qt-style comments.
\anchor cfg_details_at_top
<dt>\c DETAILS_AT_TOP <dd>
\addindex DETAILS_AT_TOP
If the DETAILS_AT_TOP tag is set to YES then Doxygen
will output the detailed description near the top, like JavaDoc.
If set to NO, the detailed description appears after the member
documentation.
\anchor cfg_inherit_docs \anchor cfg_inherit_docs
<dt>\c INHERIT_DOCS <dd> <dt>\c INHERIT_DOCS <dd>
\addindex INHERIT_DOCS \addindex INHERIT_DOCS
......
...@@ -63,40 +63,32 @@ In both cases the intermediate *'s are optional, so ...@@ -63,40 +63,32 @@ In both cases the intermediate *'s are optional, so
is also valid. is also valid.
<li> A third alternative is to use a block of at least two C++ comment <li> A third alternative is to use a block of at least two C++ comment
lines, where the first starts with an additional slash or an lines, where each line starts with an additional slash or an
exclamation mark. Here are examples of the two cases: exclamation mark. Here are examples of the two cases:
\verbatim \verbatim
/// ///
// ... text ... /// ... text ...
// ///
\endverbatim \endverbatim
or or
\verbatim \verbatim
//! //!
// ... text ... //!... text ...
// //!
\endverbatim \endverbatim
<li> <li>
One could also repeat the special markers for each line as shown in Some people like to make their comment blocks more visible in the
the following examples: documentation. For this purpose you can use the following:
\verbatim
///
/// ... text ....
///
\endverbatim
or
\verbatim \verbatim
//! /////////////////////////////////////////////////
//! ... text ... /// ... text ...
//! /////////////////////////////////////////////////
\endverbatim \endverbatim
</ol> </ol>
...@@ -117,7 +109,8 @@ Here is an example: ...@@ -117,7 +109,8 @@ Here is an example:
*/ */
\endverbatim \endverbatim
<li>If \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" is set to YES in the configuration file, <li>If \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" is set to \c YES
in the configuration file,
then using JavaDoc style comment then using JavaDoc style comment
blocks will automatically start a brief description which ends at the blocks will automatically start a brief description which ends at the
first dot followed by a space or new line. Here is an example: first dot followed by a space or new line. Here is an example:
...@@ -127,6 +120,11 @@ Here is an example: ...@@ -127,6 +120,11 @@ Here is an example:
* here. * here.
*/ */
\endverbatim \endverbatim
The option has the same effect for multi-line special C++ comments:
\verbatim
/// Brief description which ends at this dot. Details follow
/// here.
\endverbatim
<li>A third option is to use a special C++ style comment which does not <li>A third option is to use a special C++ style comment which does not
span more than one line. Here are two examples: span more than one line. Here are two examples:
...@@ -145,7 +143,9 @@ or ...@@ -145,7 +143,9 @@ or
\endverbatim \endverbatim
Note the blank line in the last example, which is required to separate the Note the blank line in the last example, which is required to separate the
brief description from the block containing the detailed description. brief description from the block containing the detailed description. The
\ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" should also be set to \c NO
for this case.
</ol> </ol>
...@@ -215,7 +215,7 @@ implementer of the members more direct access to the documentation. ...@@ -215,7 +215,7 @@ implementer of the members more direct access to the documentation.
As a compromise the brief description could be placed before the As a compromise the brief description could be placed before the
declaration and the detailed description before the member definition. declaration and the detailed description before the member definition.
\subsection memberdoc Documenting members afterwards \subsection memberdoc Putting documentation after members
If you want to document the members of a file, struct, union, class, or enum, If you want to document the members of a file, struct, union, class, or enum,
and you want to put the documentation for these members inside the compound, and you want to put the documentation for these members inside the compound,
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
% Documents produced by Doxygen are derivative works derived from the % Documents produced by Doxygen are derivative works derived from the
% input used in their production; they are not affected by this license. % input used in their production; they are not affected by this license.
\documentclass[a4paper,ps2pdf]{article} \documentclass[a4paper]{article}
\usepackage{a4wide} \usepackage{a4wide}
\usepackage{makeidx} \usepackage{makeidx}
\usepackage{fancyhdr} \usepackage{fancyhdr}
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
\usepackage{multicol} \usepackage{multicol}
\usepackage{times} \usepackage{times}
\usepackage{alltt} \usepackage{alltt}
\usepackage[pagebackref=true, \usepackage[pdftex,
pagebackref=true,
colorlinks=true, colorlinks=true,
linkcolor=blue linkcolor=blue
]{hyperref} ]{hyperref}
......
...@@ -195,7 +195,10 @@ more than 16K input character in one go. I've seen this happening ...@@ -195,7 +195,10 @@ more than 16K input character in one go. I've seen this happening
on a very large generated file (>16K lines), where the built-in preprocessor on a very large generated file (>16K lines), where the built-in preprocessor
converted it into an empty file (with >16K of newlines). Another case converted it into an empty file (with >16K of newlines). Another case
where this might happen is if you have lines in your code with more than where this might happen is if you have lines in your code with more than
16K characters. 16K characters.
If you have ran into such a case and want me to fix it, you
should send me a code fragment that triggers the message.
<li><b>How did doxygen get it's name?</b> <li><b>How did doxygen get it's name?</b>
......
...@@ -212,15 +212,14 @@ Now install doxygen as described above. ...@@ -212,15 +212,14 @@ Now install doxygen as described above.
<b>Bison problems</b> <b>Bison problems</b>
Versions 1.31 and 1.32 of bison contain a "bug" that results in a Versions 1.31 to 1.34 of bison contain a "bug" that results in a
compiler error like this: compiler errors like this:
ce_parse.cpp:348: member `class CPPValue yyalloc::yyvs' with ce_parse.cpp:348: member `class CPPValue yyalloc::yyvs' with
constructor not allowed in union constructor not allowed in union
There is no real solution to this problem, but it is discussed on the This problem has been solved in version 1.35 (versions before 1.31
bison mailing list. I recomment to use version 1.29 until the problems will also work).
with bison are resolved.
<b>Latex problems</b> <b>Latex problems</b>
......
...@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means ...@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time. languages other than English (the default) at configuration time.
Currently (version 1.2.15-20020430), 26 languages Currently (version 1.2.15-20020512), 26 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Chinesetraditional, Croatian, Czech, Brazilian Portuguese, Chinese, Chinesetraditional, Croatian, Czech,
Danish, Dutch, English, Finnish, French, Danish, Dutch, English, Finnish, French,
......
...@@ -28,7 +28,7 @@ So if you have the following code fragment ...@@ -28,7 +28,7 @@ So if you have the following code fragment
#define VERSION 200 #define VERSION 200
#define CONST_STRING const char * #define CONST_STRING const char *
#if VERSION >= 200 #if VERSION < 200
static CONST_STRING version = "2.xx"; static CONST_STRING version = "2.xx";
#else #else
static CONST_STRING version = "1.xx"; static CONST_STRING version = "1.xx";
...@@ -46,8 +46,13 @@ Then by default doxygen will feed the following to its parser: ...@@ -46,8 +46,13 @@ Then by default doxygen will feed the following to its parser:
You can disable all preprocessing by setting You can disable all preprocessing by setting
\ref cfg_enable_preprocessing "ENABLE_PREPROCESSING" to \c \ref cfg_enable_preprocessing "ENABLE_PREPROCESSING" to \c
NO in the configuation file. In the case above doxygen will then reads NO in the configuation file. In the case above doxygen will then read
both statements! both statements, i.e:
\verbatim
static CONST_STRING version = "2.xx";
static CONST_STRING version = "1.xx";
\endverbatim
In case you want to expand the \c CONST_STRING macro, you should set the In case you want to expand the \c CONST_STRING macro, you should set the
\ref cfg_macro_expansion "MACRO_EXPANSION" tag in the config file \ref cfg_macro_expansion "MACRO_EXPANSION" tag in the config file
......
...@@ -104,6 +104,6 @@ If you send only a (vague) description of a bug, you are usually not very ...@@ -104,6 +104,6 @@ If you send only a (vague) description of a bug, you are usually not very
helpful and will costs me much more time to figure out what you mean. helpful and will costs me much more time to figure out what you mean.
In the worst-case your bug report may even be completely ignored by me! In the worst-case your bug report may even be completely ignored by me!
My e-mail address: <a href="mailto:dimitri@stack.nl">dimitri@stack.nl</a> My e-mail address: dimitri@stack.nl
*/ */
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.15_20020512 Version: 1.2.16
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -2318,8 +2318,8 @@ void ClassDef::addMembersToTemplateInstance(ClassDef *cd,const char *templSpec) ...@@ -2318,8 +2318,8 @@ void ClassDef::addMembersToTemplateInstance(ClassDef *cd,const char *templSpec)
//printf("%s->setMemberClass(%p)\n",imd->name().data(),this); //printf("%s->setMemberClass(%p)\n",imd->name().data(),this);
imd->setMemberClass(this); imd->setMemberClass(this);
imd->setTemplateMaster(md); imd->setTemplateMaster(md);
//imd->setDocumentation(md->documentation()); imd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
//imd->setBriefDescription(md->briefDescription()); imd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
imd->setMemberSpecifiers(md->getMemberSpecifiers()); imd->setMemberSpecifiers(md->getMemberSpecifiers());
insertMember(imd); insertMember(imd);
//printf("Adding member=%s %s%s to class %s templSpec %s\n", //printf("Adding member=%s %s%s to class %s templSpec %s\n",
......
...@@ -1701,7 +1701,12 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" ...@@ -1701,7 +1701,12 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_memCallContext = YY_START; g_memCallContext = YY_START;
BEGIN( MemberCall ); BEGIN( MemberCall );
} }
<SkipComment>"//" { <SkipComment>"/*"("!"?)"*/" {
g_code->codify(yytext);
endFontClass();
BEGIN( g_lastCContext ) ;
}
<SkipComment>"//"|"/*" {
g_code->codify(yytext); g_code->codify(yytext);
} }
<SkipComment>[^*/\n]+ { <SkipComment>[^*/\n]+ {
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <stdlib.h> #include <stdlib.h>
#include "bufstr.h" #include "bufstr.h"
#include "debug.h"
#include "message.h"
static BufStr *g_inBuf; static BufStr *g_inBuf;
static BufStr *g_outBuf; static BufStr *g_outBuf;
...@@ -97,12 +99,17 @@ static int yyread(char *buf,int max_size) ...@@ -97,12 +99,17 @@ static int yyread(char *buf,int max_size)
<Scan>\n { /* new line */ <Scan>\n { /* new line */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
<Scan>("//!"|"///").*\n/[ \t]*"//" { /* start C++ style special comment block */ <Scan>("//!"|"///").*\n/[ \t]*"//"[\/!][^\/] { /* start C++ style special comment block */
copyToOutput("/*!",3); int i=3;
copyToOutput(yytext+3,yyleng-3); if (yytext[2]=='/')
{
while (i<yyleng && yytext[i]=='/') i++;
}
copyToOutput("/**",3);
copyToOutput(yytext+i,yyleng-i);
BEGIN(SComment); BEGIN(SComment);
} }
<Scan>"//".*\n { /* one line C++ comment */ <Scan>"//"[\/!].*\n { /* one line C++ comment */
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
} }
<Scan>"/*" { /* start of a C comment */ <Scan>"/*" { /* start of a C comment */
...@@ -155,10 +162,22 @@ static int yyread(char *buf,int max_size) ...@@ -155,10 +162,22 @@ static int yyread(char *buf,int max_size)
copyToOutput(yytext,yyleng); copyToOutput(yytext,yyleng);
BEGIN(Scan); BEGIN(Scan);
} }
<SComment>^[ \t]*"//".*/\n { /* second line of special comment */ <SComment>^[ \t]*"///"[\/]*\n {
replaceCommentMarker(yytext,yyleng);
}
<SComment>^[ \t]*"///"[^\/\n].*/\n {
replaceCommentMarker(yytext,yyleng);
}
<SComment>^[ \t]*"//!".*/\n { /* second line of special comment */
replaceCommentMarker(yytext,yyleng); replaceCommentMarker(yytext,yyleng);
} }
<SComment>\n[ \t]*"//".*/\n { /* other line of special comment */ <SComment>\n[ \t]*"///"[\/]*\n {
replaceCommentMarker(yytext,yyleng);
}
<SComment>\n[ \t]*"///"[^\/\n].*/\n {
replaceCommentMarker(yytext,yyleng);
}
<SComment>\n[ \t]*"//!".*/\n { /* other line of special comment */
replaceCommentMarker(yytext,yyleng); replaceCommentMarker(yytext,yyleng);
} }
<SComment>\n { /* end of special comment */ <SComment>\n { /* end of special comment */
...@@ -176,6 +195,10 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf) ...@@ -176,6 +195,10 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf)
g_inBufPos = 0; g_inBufPos = 0;
BEGIN(Scan); BEGIN(Scan);
yylex(); yylex();
if (Debug::isFlagSet(Debug::CommentCnv))
{
msg("-------------\n%s\n-------------\n",g_outBuf->data());
}
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -48,6 +48,8 @@ static int labelToEnumValue(const char *l) ...@@ -48,6 +48,8 @@ static int labelToEnumValue(const char *l)
return Debug::Preprocessor; return Debug::Preprocessor;
else if (label=="Classes") else if (label=="Classes")
return Debug::Classes; return Debug::Classes;
else if (label=="CommentCnv")
return Debug::CommentCnv;
else else
return 0; return 0;
} }
......
...@@ -27,7 +27,8 @@ class Debug ...@@ -27,7 +27,8 @@ class Debug
Functions = 0x00000002, Functions = 0x00000002,
Variables = 0x00000004, Variables = 0x00000004,
Preprocessor = 0x00000008, Preprocessor = 0x00000008,
Classes = 0x00000010 Classes = 0x00000010,
CommentCnv = 0x00000020
}; };
static void print(DebugMask mask,int prio,const char *fmt,...); static void print(DebugMask mask,int prio,const char *fmt,...);
static void setFlag(const char *label); static void setFlag(const char *label);
......
...@@ -2772,6 +2772,13 @@ static bool findClassRelation( ...@@ -2772,6 +2772,13 @@ static bool findClassRelation(
//} //}
//printf("\n"); //printf("\n");
QCString biName=bi->name;
bool explicitGlobalScope=FALSE;
if (biName.left(2)=="::") // explicit global scope
{
biName=biName.right(biName.length()-2);
explicitGlobalScope=TRUE;
}
Entry *parentNode=root->parent; Entry *parentNode=root->parent;
bool lastParent=FALSE; bool lastParent=FALSE;
...@@ -2779,13 +2786,13 @@ static bool findClassRelation( ...@@ -2779,13 +2786,13 @@ static bool findClassRelation(
// (in case of nested classes) // (in case of nested classes)
{ {
QCString scopeName= parentNode ? parentNode->name.data() : ""; QCString scopeName= parentNode ? parentNode->name.data() : "";
int scopeOffset=scopeName.length(); int scopeOffset=explicitGlobalScope ? 0 : scopeName.length();
do // try all parent scope prefixes, starting with the largest scope do // try all parent scope prefixes, starting with the largest scope
{ {
//printf("scopePrefix=`%s' bi->name=`%s'\n", //printf("scopePrefix=`%s' biName=`%s'\n",
// scopeName.left(scopeOffset).data(),bi->name.data()); // scopeName.left(scopeOffset).data(),biName.data());
QCString baseClassName=bi->name; QCString baseClassName=biName;
if (scopeOffset>0) if (scopeOffset>0)
{ {
baseClassName.prepend(scopeName.left(scopeOffset)+"::"); baseClassName.prepend(scopeName.left(scopeOffset)+"::");
...@@ -2794,7 +2801,7 @@ static bool findClassRelation( ...@@ -2794,7 +2801,7 @@ static bool findClassRelation(
(removeRedundantWhiteSpace(baseClassName)); (removeRedundantWhiteSpace(baseClassName));
bool baseClassIsTypeDef; bool baseClassIsTypeDef;
QCString templSpec; QCString templSpec;
ClassDef *baseClass=getResolvedClass(cd,baseClassName,&baseClassIsTypeDef,&templSpec); ClassDef *baseClass=getResolvedClass(explicitGlobalScope ? 0 : cd,baseClassName,&baseClassIsTypeDef,&templSpec);
//printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd); //printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd);
//printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n", //printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n",
// root->name.data(), // root->name.data(),
...@@ -2807,7 +2814,7 @@ static bool findClassRelation( ...@@ -2807,7 +2814,7 @@ static bool findClassRelation(
// ) // Check for base class with the same name. // ) // Check for base class with the same name.
// // If found then look in the outer scope for a match // // If found then look in the outer scope for a match
// // and prevent recursion. // // and prevent recursion.
if (!isRecursiveBaseClass(root->name,baseClassName)) if (!isRecursiveBaseClass(root->name,baseClassName) || explicitGlobalScope)
{ {
Debug::print( Debug::print(
Debug::Classes,0," class relation %s inherited by %s found (%s and %s)\n", Debug::Classes,0," class relation %s inherited by %s found (%s and %s)\n",
...@@ -2849,6 +2856,7 @@ static bool findClassRelation( ...@@ -2849,6 +2856,7 @@ static bool findClassRelation(
} }
} }
//printf("cd=%p baseClass=%p\n",cd,baseClass);
bool found=baseClass!=0 && (baseClass!=cd || mode==TemplateInstances); bool found=baseClass!=0 && (baseClass!=cd || mode==TemplateInstances);
NamespaceDef *nd=cd->getNamespaceDef(); NamespaceDef *nd=cd->getNamespaceDef();
if (!found && (i=baseClassName.findRev("::"))!=-1) if (!found && (i=baseClassName.findRev("::"))!=-1)
...@@ -2887,7 +2895,7 @@ static bool findClassRelation( ...@@ -2887,7 +2895,7 @@ static bool findClassRelation(
ClassDef *ucd; ClassDef *ucd;
for (cli.toFirst(); (ucd=cli.current()) && !found; ++cli) for (cli.toFirst(); (ucd=cli.current()) && !found; ++cli)
{ {
if (rightScopeMatch(ucd->name(),bi->name)) if (rightScopeMatch(ucd->name(),biName))
{ {
baseClass = ucd; baseClass = ucd;
found = TRUE; found = TRUE;
...@@ -2921,7 +2929,7 @@ static bool findClassRelation( ...@@ -2921,7 +2929,7 @@ static bool findClassRelation(
ClassDef *ucd; ClassDef *ucd;
for (cli.toFirst(); (ucd=cli.current()) && !found; ++cli) for (cli.toFirst(); (ucd=cli.current()) && !found; ++cli)
{ {
if (rightScopeMatch(ucd->name(),bi->name)) if (rightScopeMatch(ucd->name(),biName))
{ {
baseClass = ucd; baseClass = ucd;
found = TRUE; found = TRUE;
...@@ -2939,7 +2947,7 @@ static bool findClassRelation( ...@@ -2939,7 +2947,7 @@ static bool findClassRelation(
ClassDef *ucd; ClassDef *ucd;
for (cli.toFirst(); (ucd=cli.current()) && !found; ++cli) for (cli.toFirst(); (ucd=cli.current()) && !found; ++cli)
{ {
if (rightScopeMatch(ucd->name(),bi->name)) if (rightScopeMatch(ucd->name(),biName))
{ {
baseClass = ucd; baseClass = ucd;
found = TRUE; found = TRUE;
...@@ -2949,10 +2957,10 @@ static bool findClassRelation( ...@@ -2949,10 +2957,10 @@ static bool findClassRelation(
} }
} }
} }
bool isATemplateArgument = templateNames!=0 && templateNames->find(bi->name)!=0; bool isATemplateArgument = templateNames!=0 && templateNames->find(biName)!=0;
if (/*!isATemplateArgument &&*/ found) if (found)
{ {
Debug::print(Debug::Classes,0," Documented class `%s' templSpec=%s\n",bi->name.data(),templSpec.data()); Debug::print(Debug::Classes,0," Documented class `%s' templSpec=%s\n",biName.data(),templSpec.data());
// add base class to this class // add base class to this class
// if templSpec is not empty then we should "instantiate" // if templSpec is not empty then we should "instantiate"
...@@ -2971,7 +2979,7 @@ static bool findClassRelation( ...@@ -2971,7 +2979,7 @@ static bool findClassRelation(
else if (mode==DocumentedOnly) else if (mode==DocumentedOnly)
{ {
QCString usedName; QCString usedName;
if (baseClassIsTypeDef) usedName=bi->name; if (baseClassIsTypeDef) usedName=biName;
cd->insertBaseClass(baseClass,usedName,bi->prot,bi->virt,templSpec); cd->insertBaseClass(baseClass,usedName,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->insertSubClass(cd,bi->prot,bi->virt,templSpec); baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec);
...@@ -2982,7 +2990,7 @@ static bool findClassRelation( ...@@ -2982,7 +2990,7 @@ static bool findClassRelation(
{ {
Debug::print(Debug::Classes,0, Debug::print(Debug::Classes,0,
" New undocumented base class `%s' baseClassName=%s\n", " New undocumented base class `%s' baseClassName=%s\n",
bi->name.data(),baseClassName.data() biName.data(),baseClassName.data()
); );
baseClass=0; baseClass=0;
if (isATemplateArgument) if (isATemplateArgument)
...@@ -3004,7 +3012,7 @@ static bool findClassRelation( ...@@ -3004,7 +3012,7 @@ static bool findClassRelation(
if (isArtificial) baseClass->setClassIsArtificial(); if (isArtificial) baseClass->setClassIsArtificial();
} }
// add base class to this class // add base class to this class
cd->insertBaseClass(baseClass,bi->name,bi->prot,bi->virt,templSpec); cd->insertBaseClass(baseClass,biName,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->insertSubClass(cd,bi->prot,bi->virt,templSpec); baseClass->insertSubClass(cd,bi->prot,bi->virt,templSpec);
// the undocumented base was found in this file // the undocumented base was found in this file
...@@ -3014,8 +3022,22 @@ static bool findClassRelation( ...@@ -3014,8 +3022,22 @@ static bool findClassRelation(
} }
else else
{ {
Debug::print(Debug::Classes,0," Base class `%s' not found\n",bi->name.data()); Debug::print(Debug::Classes,0," Base class `%s' not found\n",biName.data());
}
}
else
{
if (mode!=TemplateInstances)
{
warn(root->fileName,root->startLine,
"Detected potential recursive class relation "
"between class %s and base class %s!\n",
root->name.data(),baseClassName.data()
);
} }
// for mode==TemplateInstance this case is quite common and
// indicates a relation between a template class and a template
// instance with the same name.
} }
if (scopeOffset==0) if (scopeOffset==0)
{ {
......
...@@ -1757,7 +1757,10 @@ void LatexGenerator::startDotFile(const char *name,bool hasCaption) ...@@ -1757,7 +1757,10 @@ void LatexGenerator::startDotFile(const char *name,bool hasCaption)
+baseName; +baseName;
writeDotGraphFromFile(name,outName,EPS); writeDotGraphFromFile(name,outName,EPS);
if (hasCaption) if (hasCaption)
{
t << "\\begin{figure}[H]" << endl; t << "\\begin{figure}[H]" << endl;
t << "\\begin{center}" << endl;
}
else else
t << "\\mbox{"; t << "\\mbox{";
t << "\\includegraphics"; t << "\\includegraphics";
...@@ -1781,6 +1784,7 @@ void LatexGenerator::endDotFile(bool hasCaption) ...@@ -1781,6 +1784,7 @@ void LatexGenerator::endDotFile(bool hasCaption)
if (hasCaption) if (hasCaption)
{ {
t << "}" << endl; t << "}" << endl;
t << "\\end{center}" << endl;
t << "\\end{figure}" << endl; t << "\\end{figure}" << endl;
} }
} }
......
...@@ -1549,16 +1549,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1549,16 +1549,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
else // define is a guard => hide else // define is a guard => hide
{ {
//printf("Found a guard %s\n",yytext); //printf("Found a guard %s\n",yytext);
Define *def=0; Define *def=g_fileDefineDict->find(g_defName);
if (g_includeStack.isEmpty()) //if (g_includeStack.isEmpty())
{ //{
addDefine(); // addDefine();
} //}
if ((def=g_fileDefineDict->find(g_defName))==0) if (def==0) // new define name for this file
{ {
g_fileDefineDict->insert(g_defName,newDefine()); g_fileDefineDict->insert(g_defName,newDefine());
} }
else if (def)// name already exists else // name already exists
{ {
if (def->undef) // undefined name if (def->undef) // undefined name
{ {
...@@ -1574,9 +1574,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1574,9 +1574,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
//printf("Error: define %s is defined more than once!\n",g_defName.data()); //printf("Error: define %s is defined more than once!\n",g_defName.data());
} }
} }
QCString tmp=(QCString)"#define "+g_defName;
outputArray(tmp.data(),tmp.length());
//outputChar('\n');
g_lastGuardName.resize(0); g_lastGuardName.resize(0);
BEGIN(Start); BEGIN(Start);
} }
......
...@@ -2652,18 +2652,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2652,18 +2652,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<BasesProt>{BN} { lineCount(); } <BasesProt>{BN} { lineCount(); }
<BasesProt>. { unput(*yytext); BEGIN(Bases); } <BasesProt>. { unput(*yytext); BEGIN(Bases); }
<Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID} { <Bases>("::")?{BN}*({ID}{BN}*"::"{BN}*)*{ID} {
QCString bName = yytext; //QCString bName = yytext;
bName = bName.stripWhiteSpace(); //bName = bName.stripWhiteSpace();
bool globalScope = bName.at(0)==':' && baseName.isEmpty(); //bool globalScope = bName.at(0)==':' && baseName.isEmpty();
if (!globalScope) //if (!globalScope)
baseName += bName; // baseName += bName;
else //else
baseName += (bName.data()+2); // baseName += (bName.data()+2);
baseName+=yytext;
current->args += ' '; current->args += ' ';
if (!globalScope) //if (!globalScope)
current->args += bName; // current->args += bName;
else //else
current->args += (bName.data()+2); // current->args += (bName.data()+2);
current->args += yytext;
} }
<Bases>{BN}*{ID}("."{ID})* { // Java style class <Bases>{BN}*{ID}("."{ID})* { // Java style class
QCString name = yytext; QCString name = yytext;
...@@ -4149,6 +4151,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4149,6 +4151,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->brief+=yytext; current->brief+=yytext;
} }
<LineDoc,AfterDocLine,CopyArgCommentLine>{CMD}("brief"|"short") {}
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=Doxygen::aliasDict[yytext+1]; QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue) if (pValue)
......
...@@ -2166,8 +2166,15 @@ bool getScopeDefs(const char *docScope,const char *scope, ...@@ -2166,8 +2166,15 @@ bool getScopeDefs(const char *docScope,const char *scope,
//printf("getScopeDefs: docScope=`%s' scope=`%s'\n",docScope,scope); //printf("getScopeDefs: docScope=`%s' scope=`%s'\n",docScope,scope);
if (scopeName.isEmpty()) return FALSE; if (scopeName.isEmpty()) return FALSE;
bool explicitGlobalScope=FALSE;
if (scopeName.at(0)==':' && scopeName.at(1)==':')
{
scopeName=scopeName.right(scopeName.length()-2);
explicitGlobalScope=TRUE;
}
QCString docScopeName=docScope; QCString docScopeName=docScope;
int scopeOffset=docScopeName.length(); int scopeOffset=explicitGlobalScope ? 0 : docScopeName.length();
do // for each possible docScope (from largest to and including empty) do // for each possible docScope (from largest to and including empty)
{ {
...@@ -2195,6 +2202,14 @@ bool getScopeDefs(const char *docScope,const char *scope, ...@@ -2195,6 +2202,14 @@ bool getScopeDefs(const char *docScope,const char *scope,
return FALSE; return FALSE;
} }
static bool isLowerCase(QCString &s)
{
char *p=s.data();
int c;
while ((c=*p++)) if (!islower(c)) return FALSE;
return TRUE;
}
/*! /*!
* generate a reference to a class, namespace or member. * generate a reference to a class, namespace or member.
* `scName' is the name of the scope that contains the documentation * `scName' is the name of the scope that contains the documentation
...@@ -2229,7 +2244,26 @@ bool generateRef(OutputDocInterface &od,const char *scName, ...@@ -2229,7 +2244,26 @@ bool generateRef(OutputDocInterface &od,const char *scName,
{ {
ClassDef *cd=0; ClassDef *cd=0;
NamespaceDef *nd=0; NamespaceDef *nd=0;
if (linkText.isEmpty()) linkText=tmpName;
if (linkText.isEmpty())
{
linkText=tmpName;
// strip :: prefix if present
if (linkText.at(0)==':' && linkText.at(1)==':')
{
linkText=linkText.right(linkText.length()-2);
}
}
if (scopePos==-1 && isLowerCase(tsName))
{ // link to lower case only name => do not try to autolink
od.docify(linkText);
// text has been written, stop now.
return FALSE;
}
//printf("scName=%s tmpName=%s\n",scName,tmpName.data());
// check if this is a class or namespace reference // check if this is a class or namespace reference
if (scName!=tmpName && getScopeDefs(scName,name,cd,nd)) if (scName!=tmpName && getScopeDefs(scName,name,cd,nd))
{ {
......
...@@ -224,9 +224,12 @@ class XMLGenerator : public OutputDocInterface ...@@ -224,9 +224,12 @@ class XMLGenerator : public OutputDocInterface
void docify(const char *s) void docify(const char *s)
{ {
XML_DB(("(docify \"%s\")\n",s)); if (m_outputEnabled)
startParMode(); {
writeXMLString(m_t,s); XML_DB(("(docify \"%s\")\n",s));
startParMode();
writeXMLString(m_t,s);
}
} }
void writeChar(char c) void writeChar(char c)
{ {
...@@ -779,10 +782,12 @@ class XMLGenerator : public OutputDocInterface ...@@ -779,10 +782,12 @@ class XMLGenerator : public OutputDocInterface
void startPageRef() void startPageRef()
{ {
XML_DB(("(startPageRef)\n")); XML_DB(("(startPageRef)\n"));
m_outputEnabled = FALSE;
} }
void endPageRef(const char *,const char *) void endPageRef(const char *,const char *)
{ {
XML_DB(("(endPageRef)\n")); XML_DB(("(endPageRef)\n"));
m_outputEnabled = TRUE;
} }
void writeLineNumber(const char *extRef,const char *compId, void writeLineNumber(const char *extRef,const char *compId,
const char *anchorId,int l) const char *anchorId,int l)
...@@ -886,6 +891,7 @@ class XMLGenerator : public OutputDocInterface ...@@ -886,6 +891,7 @@ class XMLGenerator : public OutputDocInterface
m_t.setDevice(&m_b); m_t.setDevice(&m_b);
m_t.setEncoding(QTextStream::Latin1); m_t.setEncoding(QTextStream::Latin1);
m_inParamList = FALSE; m_inParamList = FALSE;
m_outputEnabled = TRUE;
} }
/*! copy constructor */ /*! copy constructor */
XMLGenerator(const XMLGenerator *xg) XMLGenerator(const XMLGenerator *xg)
...@@ -902,6 +908,7 @@ class XMLGenerator : public OutputDocInterface ...@@ -902,6 +908,7 @@ class XMLGenerator : public OutputDocInterface
m_inParStack = xg->m_inParStack; m_inParStack = xg->m_inParStack;
m_inListStack = xg->m_inListStack; m_inListStack = xg->m_inListStack;
m_inParamList = xg->m_inParamList; m_inParamList = xg->m_inParamList;
m_outputEnabled = xg->m_outputEnabled;
} }
/*! destructor */ /*! destructor */
virtual ~XMLGenerator() virtual ~XMLGenerator()
...@@ -935,6 +942,7 @@ class XMLGenerator : public OutputDocInterface ...@@ -935,6 +942,7 @@ class XMLGenerator : public OutputDocInterface
ValStack<bool> m_inParStack; ValStack<bool> m_inParStack;
ValStack<bool> m_inListStack; ValStack<bool> m_inListStack;
bool m_inParamList; bool m_inParamList;
bool m_outputEnabled;
friend void writeXMLCodeBlock(QTextStream &t,FileDef *fd); friend void writeXMLCodeBlock(QTextStream &t,FileDef *fd);
}; };
......
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