Commit 535ddc3b authored by dimitri's avatar dimitri

Release-1.3-rc3-20030330

parent 5eeee0ed
DOXYGEN Version 1.3-rc3-20030317 DOXYGEN Version 1.3-rc3-20030330
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (17 March 2003) Dimitri van Heesch (30 March 2003)
DOXYGEN Version 1.3_rc3_20030317 DOXYGEN Version 1.3_rc3_20030330
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) (17 March 2003) Dimitri van Heesch (dimitri@stack.nl) (30 March 2003)
1.3-rc3-20030317 1.3-rc3-20030330
...@@ -153,6 +153,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -153,6 +153,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_man_extension MAN_EXTENSION \refitem cfg_man_extension MAN_EXTENSION
\refitem cfg_man_links MAN_LINKS \refitem cfg_man_links MAN_LINKS
\refitem cfg_man_output MAN_OUTPUT \refitem cfg_man_output MAN_OUTPUT
\refitem cfg_max_dot_graph_depth MAX_DOT_GRAPH_DEPTH
\refitem cfg_max_dot_graph_height MAX_DOT_GRAPH_HEIGHT \refitem cfg_max_dot_graph_height MAX_DOT_GRAPH_HEIGHT
\refitem cfg_max_dot_graph_width MAX_DOT_GRAPH_WIDTH \refitem cfg_max_dot_graph_width MAX_DOT_GRAPH_WIDTH
\refitem cfg_max_initializer_lines MAX_INITIALIZER_LINES \refitem cfg_max_initializer_lines MAX_INITIALIZER_LINES
...@@ -1493,6 +1494,21 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -1493,6 +1494,21 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
the specified constraint. Beware that most browsers cannot cope with very the specified constraint. Beware that most browsers cannot cope with very
large images. large images.
\anchor cfg_max_dot_graph_depth
<dt>\c MAX_DOT_GRAPH_DEPTH <dd>
\addindex MAX_DOT_GRAPH_DEPTH
The \c MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
graphs generated by dot. A depth value of 3 means that only nodes reachable
from the root by following a path via at most 3 edges will be shown. Nodes that
lay further from the root node will be omitted. Note that setting this option to
1 or 2 may greatly reduce the computation time needed for large code bases. Also
note that a graph may be further truncated if the graph's image dimensions are
not sufficient to fit the graph (see
\ref cfg_max_dot_graph_width "MAX_DOT_GRAPH_WIDTH" and
\ref cfg_max_dot_graph_height "MAX_DOT_GRAPH_HEIGHT").
If 0 is used fot the depth value (the default), the graph is
not depth constraint.
\anchor cfg_max_dot_graph_width \anchor cfg_max_dot_graph_width
<dt>\c MAX_DOT_GRAPH_WIDTH <dd> <dt>\c MAX_DOT_GRAPH_WIDTH <dd>
\addindex MAX_DOT_GRAPH_WIDTH \addindex MAX_DOT_GRAPH_WIDTH
...@@ -1512,8 +1528,9 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -1512,8 +1528,9 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\anchor cfg_dot_cleanup \anchor cfg_dot_cleanup
<dt>\c DOT_CLEANUP <dd> <dt>\c DOT_CLEANUP <dd>
\addindex DOT_CLEANUP \addindex DOT_CLEANUP
This tag can be used to cleanup any mess DOT left behind. If the \c DOT_CLEANUP tag is set to \c YES (the default) doxygen will
If left blank, "NO" is assumed. remove the intermedate dot files that are used to generate the various graphs.
</dl> </dl>
\section config_search Search engine options \section config_search Search engine options
......
...@@ -344,7 +344,7 @@ $(TARGET): $(OBJECTS) $(OBJMOC) ...@@ -344,7 +344,7 @@ $(TARGET): $(OBJECTS) $(OBJMOC)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) -Bdynamic $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) -Bdynamic
\endverbatim \endverbatim
<b>GNU 2.7.2.x compiler problems</b> <b>GCC compiler problems</b>
Older versions of the GNU compiler have problems with constant strings Older versions of the GNU compiler have problems with constant strings
containing characters with character codes larger than 127. Therefore containing characters with character codes larger than 127. Therefore
...@@ -357,6 +357,9 @@ On some platforms (such as OpenBSD) using some versions of gcc with ...@@ -357,6 +357,9 @@ On some platforms (such as OpenBSD) using some versions of gcc with
such as config.cpp. As a workaround use --debug as a configure option such as config.cpp. As a workaround use --debug as a configure option
or omit the -O2 for the particular files in the Makefile. or omit the -O2 for the particular files in the Makefile.
Gcc versions before 2.95 may produce broken binaries due to bugs in
these compilers.
<b>Dot problems</b> <b>Dot problems</b>
Due to a change in the way image maps are generated, older versions Due to a change in the way image maps are generated, older versions
......
...@@ -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.14-20020317), 28 languages Currently (version 1.3-rc3-20030327), 28 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian, Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish, Czech, Danish, Dutch, English, Finnish,
......
...@@ -213,7 +213,7 @@ local int huft_build(uIntf *b, uInt n, uInt s, const uIntf *d, const uIntf *e, i ...@@ -213,7 +213,7 @@ local int huft_build(uIntf *b, uInt n, uInt s, const uIntf *d, const uIntf *e, i
/* compute minimum size table less than or equal to l bits */ /* compute minimum size table less than or equal to l bits */
z = g - w; z = g - w;
z = z > (uInt)l ? l : z; /* table size upper limit */ z = z > (uInt)l ? (uInt)l : z; /* table size upper limit */
if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
{ /* too few codes for k-w bit table */ { /* too few codes for k-w bit table */
f -= a + 1; /* deduct codes from patterns left */ f -= a + 1; /* deduct codes from patterns left */
...@@ -445,6 +445,8 @@ int inflate_trees_fixed(uIntf *bl, uIntf *bd, inflate_huft **tl, inflate_huft ** ...@@ -445,6 +445,8 @@ int inflate_trees_fixed(uIntf *bl, uIntf *bd, inflate_huft **tl, inflate_huft **
ZFREE(z, c); ZFREE(z, c);
fixed_built = 1; fixed_built = 1;
} }
#else
z=z; // DvH: added to avoid compiler warning
#endif #endif
*bl = fixed_bl; *bl = fixed_bl;
*bd = fixed_bd; *bd = fixed_bd;
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3_rc3_20030317 Version: 1.3_rc3_20030330
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
......
...@@ -593,4 +593,7 @@ Q_EXPORT void qObsolete( const char *obj, const char *oldfunc ); ...@@ -593,4 +593,7 @@ Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
Q_EXPORT void qObsolete( const char *message ); Q_EXPORT void qObsolete( const char *message );
#endif #endif
// DvH: added to avoid warnings on recent gcc versions
#define Q_DELETE_VOID_UNDEFINED
#endif // QGLOBAL_H #endif // QGLOBAL_H
...@@ -925,6 +925,7 @@ struct QMultiByteUnicodeTable { ...@@ -925,6 +925,7 @@ struct QMultiByteUnicodeTable {
QMultiByteUnicodeTable* multibyte; QMultiByteUnicodeTable* multibyte;
}; };
#ifndef QT_NO_CODECS
static int getByte(char* &cursor) static int getByte(char* &cursor)
{ {
int byte = 0; int byte = 0;
...@@ -939,7 +940,6 @@ static int getByte(char* &cursor) ...@@ -939,7 +940,6 @@ static int getByte(char* &cursor)
return byte&0xff; return byte&0xff;
} }
#ifndef QT_NO_CODECS
class QTextCodecFromIOD; class QTextCodecFromIOD;
class QTextCodecFromIODDecoder : public QTextDecoder { class QTextCodecFromIODDecoder : public QTextDecoder {
......
...@@ -1032,7 +1032,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1032,7 +1032,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("HAVE_DOT") && Config_getBool("CLASS_GRAPH")) if (Config_getBool("HAVE_DOT") && Config_getBool("CLASS_GRAPH"))
// write class diagram using dot // write class diagram using dot
{ {
DotClassGraph inheritanceGraph(this,DotClassGraph::Inheritance); DotClassGraph inheritanceGraph(this,DotClassGraph::Inheritance,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial()) if (!inheritanceGraph.isTrivial())
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
...@@ -1067,7 +1067,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1067,7 +1067,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("HAVE_DOT") && Config_getBool("COLLABORATION_GRAPH")) if (Config_getBool("HAVE_DOT") && Config_getBool("COLLABORATION_GRAPH"))
{ {
DotClassGraph usageImplGraph(this,DotClassGraph::Implementation); DotClassGraph usageImplGraph(this,DotClassGraph::Implementation,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!usageImplGraph.isTrivial()) if (!usageImplGraph.isTrivial())
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
......
...@@ -1217,6 +1217,12 @@ void Config::check() ...@@ -1217,6 +1217,12 @@ void Config::check()
} }
PUTENV(buf); PUTENV(buf);
} }
int &depth = Config_getInt("MAX_DOT_GRAPH_DEPTH");
if (depth==0)
{
depth=1000;
}
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA") && Config_getBool("INLINE_INFO")) if (Config_getBool("OPTIMIZE_OUTPUT_JAVA") && Config_getBool("INLINE_INFO"))
{ {
...@@ -2518,6 +2524,18 @@ void Config::create() ...@@ -2518,6 +2524,18 @@ void Config::create()
"large images. \n", "large images. \n",
100,30000,1024 100,30000,1024
); );
ci = addInt(
"MAX_DOT_GRAPH_DEPTH",
"The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the \n"
"graphs generated by dot. A depth value of 3 means that only nodes reachable \n"
"from the root by following a path via at most 3 edges will be shown. Nodes that \n"
"lay further from the root node will be omitted. Note that setting this option to \n"
"1 or 2 may greatly reduce the computation time needed for large code bases. Also \n"
"note that a graph may be further truncated if the graph's image dimensions are \n"
"not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). \n"
"If 0 is used fot the depth value (the default), the graph is not depth constraint. \n",
0,1000,0
);
ci->addDependency("HAVE_DOT"); ci->addDependency("HAVE_DOT");
cb = addBool( cb = addBool(
"GENERATE_LEGEND", "GENERATE_LEGEND",
......
...@@ -450,14 +450,16 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t) ...@@ -450,14 +450,16 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
t << " cp-documentation = <<_EnD_oF_dEf_TeXt_" << endl t << " cp-documentation = <<_EnD_oF_dEf_TeXt_" << endl
<< cd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl; << cd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance); DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance,
Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial()) if (!inheritanceGraph.isTrivial())
{ {
t << " cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_" << endl; t << " cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_" << endl;
inheritanceGraph.writeDEF(t); inheritanceGraph.writeDEF(t);
t << endl << "_EnD_oF_dEf_TeXt_;" << endl; t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
} }
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation); DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation,
Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!collaborationGraph.isTrivial()) if (!collaborationGraph.isTrivial())
{ {
t << " cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_" << endl; t << " cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_" << endl;
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "cmdmapper.h" #include "cmdmapper.h"
#include "printdocvisitor.h" #include "printdocvisitor.h"
#include "message.h" #include "message.h"
#include "section.h"
#define DBG(x) do {} while(0) #define DBG(x) do {} while(0)
//#define DBG(x) printf x //#define DBG(x) printf x
...@@ -58,10 +59,11 @@ static const char *sectionLevelToName[] = ...@@ -58,10 +59,11 @@ static const char *sectionLevelToName[] =
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// global variables during a call to validatingParseDoc // global variables during a call to validatingParseDoc
static bool g_hasParamCommand; static bool g_hasParamCommand;
static MemberDef * g_memberDef; static MemberDef * g_memberDef;
static QDict<void> g_paramsFound; static QDict<void> g_paramsFound;
static bool g_isExample; static bool g_isExample;
static SectionDict *g_sectionDict;
// include file state // include file state
static QString g_includeFileText; static QString g_includeFileText;
...@@ -703,6 +705,10 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children) ...@@ -703,6 +705,10 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
} }
else // compound link else // compound link
{ {
if (compound->definitionType()==Definition::TypeFile)
{
name=g_token->name;
}
children.append(new children.append(new
DocLinkedWord(parent,name, DocLinkedWord(parent,name,
compound->getReference(), compound->getReference(),
...@@ -1153,6 +1159,10 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor) ...@@ -1153,6 +1159,10 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
{ {
m_file = sec->fileName; m_file = sec->fileName;
m_anchor = sec->label; m_anchor = sec->label;
if (g_sectionDict && g_sectionDict->find(id)==0)
{
g_sectionDict->insert(id,sec);
}
} }
else else
{ {
...@@ -1458,6 +1468,10 @@ void DocSecRefItem::parse() ...@@ -1458,6 +1468,10 @@ void DocSecRefItem::parse()
{ {
m_file = sec->fileName; m_file = sec->fileName;
m_anchor = sec->label; m_anchor = sec->label;
if (g_sectionDict && g_sectionDict->find(m_target)==0)
{
g_sectionDict->insert(m_target,sec);
}
} }
else else
{ {
...@@ -4339,6 +4353,7 @@ reparsetoken: ...@@ -4339,6 +4353,7 @@ reparsetoken:
break; break;
} }
} }
retval=0;
endparagraph: endparagraph:
handlePendingStyleCommands(this,m_children); handlePendingStyleCommands(this,m_children);
DocNode *n = g_nodeStack.pop(); DocNode *n = g_nodeStack.pop();
...@@ -4369,6 +4384,10 @@ int DocSection::parse() ...@@ -4369,6 +4384,10 @@ int DocSection::parse()
m_anchor = sec->label; m_anchor = sec->label;
m_title = sec->title; m_title = sec->title;
if (m_title.isEmpty()) m_title = sec->label; if (m_title.isEmpty()) m_title = sec->label;
if (g_sectionDict && g_sectionDict->find(m_id)==0)
{
g_sectionDict->insert(m_id,sec);
}
} }
} }
...@@ -4611,7 +4630,8 @@ void DocRoot::parse() ...@@ -4611,7 +4630,8 @@ void DocRoot::parse()
DocNode *validatingParseDoc(const char *fileName,int startLine, DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context,MemberDef *md, const char *context,MemberDef *md,
const char *input,bool isExample) const char *input,bool isExample,
SectionDict *sections)
{ {
//printf("========== validating %s at line %d\n",fileName,startLine); //printf("========== validating %s at line %d\n",fileName,startLine);
...@@ -4633,6 +4653,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -4633,6 +4653,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_hasParamCommand = FALSE; g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE); g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear(); g_paramsFound.clear();
g_sectionDict = sections;
doctokenizerYYlineno=startLine; doctokenizerYYlineno=startLine;
doctokenizerYYinit(input,g_fileName); doctokenizerYYinit(input,g_fileName);
......
...@@ -33,6 +33,7 @@ class MemberDef; ...@@ -33,6 +33,7 @@ class MemberDef;
class PageInfo; class PageInfo;
class Definition; class Definition;
class MemberGroup; class MemberGroup;
class SectionDict;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -51,7 +52,8 @@ class MemberGroup; ...@@ -51,7 +52,8 @@ class MemberGroup;
*/ */
DocNode *validatingParseDoc(const char *fileName,int startLine, DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context, MemberDef *md, const char *context, MemberDef *md,
const char *input,bool isExample); const char *input,bool isExample,
SectionDict *sections=0);
/*! Main entry point for parsing simple text fragments. These /*! Main entry point for parsing simple text fragments. These
* fragments are limited to words, whitespace and symbols. * fragments are limited to words, whitespace and symbols.
......
...@@ -288,7 +288,7 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG}) ...@@ -288,7 +288,7 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 ("::"|"#")?{SCOPEMASK} LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile") CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK} LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
WORD1 [^ \t\n\r\\@<>()\[\]:;\?{}&$#,.]+|"{"|"}" WORD1 [^ \t\n\r\\@<>()\[\]:;\?{}&$#,.]+|"{"|"}"|("\""[^"\n]*"\"")
WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?" WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"
WORD1NQ [^ \t\n\r\\@<>()\[\]:;\?{}&$#,."]+ WORD1NQ [^ \t\n\r\\@<>()\[\]:;\?{}&$#,."]+
WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?" WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"
...@@ -603,7 +603,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]* ...@@ -603,7 +603,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
return 0; return 0;
} }
<St_Ref>("#"|"::")?({ID}[.#:-])*{ID} { <St_Ref>("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID} {
g_token->name=yytext; g_token->name=yytext;
return TK_WORD; return TK_WORD;
} }
......
...@@ -775,7 +775,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) ...@@ -775,7 +775,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
DotNode *node; DotNode *node;
for (;(node=dnli2.current());++dnli2) for (;(node=dnli2.current());++dnli2)
{ {
if (node->m_subgraphId==n->m_subgraphId) node->write(t,BITMAP,FALSE,TRUE); if (node->m_subgraphId==n->m_subgraphId)
node->write(t,BITMAP,FALSE,TRUE,1000,TRUE);
} }
t << "}" << endl; t << "}" << endl;
f.close(); f.close();
...@@ -1062,7 +1063,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, ...@@ -1062,7 +1063,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
} }
m_usedNodes->insert(className,bn); m_usedNodes->insert(className,bn);
//printf(" add new child node `%s' to %s\n",className.data(),n->m_label.data()); //printf(" add new child node `%s' to %s\n",className.data(),n->m_label.data());
if (distance<m_recDepth) buildGraph(cd,bn,distance+1,base);
// we use <=, i.s.o < to cause one more level than intended which is used to
// detect truncated nodes
if (distance<=m_recDepth) buildGraph(cd,bn,distance+1,base);
} }
} }
...@@ -1374,7 +1378,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out, ...@@ -1374,7 +1378,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
} }
baseName = convertNameToFile(diskName()); baseName = convertNameToFile(diskName());
findMaximalDotGraph(m_startNode,m_maxDistance,baseName, findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName,
thisDir,format,!isTBRank,m_graphType==Inheritance); thisDir,format,!isTBRank,m_graphType==Inheritance);
if (format==BITMAP) // run dot to create a bitmap image if (format==BITMAP) // run dot to create a bitmap image
...@@ -1548,15 +1552,19 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance) ...@@ -1548,15 +1552,19 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
n->addChild(bn,0,0,0); n->addChild(bn,0,0,0);
bn->addParent(n); bn->addParent(n);
m_usedNodes->insert(in,bn); m_usedNodes->insert(in,bn);
if (bfd) buildGraph(bn,bfd,distance+1);
// we use <=, i.s.o < to cause one more level than intended which is used to
// detect truncated nodes
if (bfd && distance<=m_recDepth) buildGraph(bn,bfd,distance+1);
} }
} }
} }
} }
DotInclDepGraph::DotInclDepGraph(FileDef *fd,bool inverse) DotInclDepGraph::DotInclDepGraph(FileDef *fd,int maxRecursionDepth,bool inverse)
{ {
m_maxDistance = 0; m_maxDistance = 0;
m_recDepth = maxRecursionDepth;
m_inverse = inverse; m_inverse = inverse;
ASSERT(fd!=0); ASSERT(fd!=0);
m_diskName = fd->getFileBase().copy(); m_diskName = fd->getFileBase().copy();
...@@ -1610,7 +1618,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out, ...@@ -1610,7 +1618,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
QCString mapName=m_startNode->m_label.copy(); QCString mapName=m_startNode->m_label.copy();
if (m_inverse) mapName+="dep"; if (m_inverse) mapName+="dep";
findMaximalDotGraph(m_startNode,m_maxDistance,baseName,thisDir,format, findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName,thisDir,format,
FALSE,FALSE,!m_inverse); FALSE,FALSE,!m_inverse);
if (format==BITMAP) if (format==BITMAP)
......
...@@ -76,7 +76,7 @@ class DotNode ...@@ -76,7 +76,7 @@ class DotNode
void removeChild(DotNode *n); void removeChild(DotNode *n);
void removeParent(DotNode *n); void removeParent(DotNode *n);
void write(QTextStream &t,GraphOutputFormat f,bool topDown,bool toChildren, void write(QTextStream &t,GraphOutputFormat f,bool topDown,bool toChildren,
int maxDistance=1000,bool backArrows=TRUE); int maxDistance,bool backArrows);
int m_subgraphId; int m_subgraphId;
void clearWriteFlag(); void clearWriteFlag();
void writeXML(QTextStream &t,bool isClassGraph); void writeXML(QTextStream &t,bool isClassGraph);
...@@ -125,7 +125,7 @@ class DotClassGraph ...@@ -125,7 +125,7 @@ class DotClassGraph
{ {
public: public:
enum GraphType { Interface, Implementation, Inheritance }; enum GraphType { Interface, Implementation, Inheritance };
DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth=1000); DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth);
~DotClassGraph(); ~DotClassGraph();
bool isTrivial() const; bool isTrivial() const;
QCString writeGraph(QTextStream &t,GraphOutputFormat f,const char *path, QCString writeGraph(QTextStream &t,GraphOutputFormat f,const char *path,
...@@ -152,7 +152,7 @@ class DotClassGraph ...@@ -152,7 +152,7 @@ class DotClassGraph
class DotInclDepGraph class DotInclDepGraph
{ {
public: public:
DotInclDepGraph(FileDef *fd,bool inverse=FALSE); DotInclDepGraph(FileDef *fd,int maxRecusionDepth,bool inverse=FALSE);
~DotInclDepGraph(); ~DotInclDepGraph();
QCString writeGraph(QTextStream &t, GraphOutputFormat f,const char *path, QCString writeGraph(QTextStream &t, GraphOutputFormat f,const char *path,
bool writeImageMap=TRUE); bool writeImageMap=TRUE);
...@@ -168,6 +168,7 @@ class DotInclDepGraph ...@@ -168,6 +168,7 @@ class DotInclDepGraph
QCString m_diskName; QCString m_diskName;
int m_maxDistance; int m_maxDistance;
bool m_inverse; bool m_inverse;
int m_recDepth;
}; };
void generateGraphLegend(const char *path); void generateGraphLegend(const char *path);
......
...@@ -2939,9 +2939,11 @@ static void findUsedClassesForClass(Entry *root, ...@@ -2939,9 +2939,11 @@ static void findUsedClassesForClass(Entry *root,
//printf("findUsedClassesForClass(%s)=%s\n",masterCd->name().data(),type.data()); //printf("findUsedClassesForClass(%s)=%s\n",masterCd->name().data(),type.data());
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec)) while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec))
{ {
//printf("Found used class %s\n",usedClassName.data());
// the name could be a type definition, resolve it // the name could be a type definition, resolve it
// TODO: recursive typedef resolution // TODO: recursive typedef resolution
QCString typeName = resolveTypeDef(masterCd,usedClassName); QCString typeName = resolveTypeDef(masterCd,usedClassName);
//printf("Found resolved class %s\n",typeName.data());
// add any template arguments to the class // add any template arguments to the class
QCString usedName = usedClassName+templSpec; QCString usedName = usedClassName+templSpec;
...@@ -2993,34 +2995,10 @@ static void findUsedClassesForClass(Entry *root, ...@@ -2993,34 +2995,10 @@ static void findUsedClassesForClass(Entry *root,
if (!found) if (!found)
{ {
ClassDef *usedCd=0; ClassDef *usedCd=findClassWithinClassContext(masterCd,usedName);
#if 0 //printf("Looking for used class: result=%p master=%p\n",usedCd,masterCd);
Definition *scope=masterCd->getOuterScope();
do
{
// TODO: also consider using declarations and directives
// as done for inheritance relations.
QCString scopeName;
if (scope) scopeName=scope->qualifiedName();
if (!scopeName.isEmpty())
{
usedCd=getResolvedClass(masterCd,scopeName+"::"+usedName,0,&templSpec);
if (usedCd==0) usedCd=getResolvedClass(masterCd,scopeName+"::"+usedClassName,0,&templSpec);
//printf("Search for class %s result=%p\n",(scopeName+"::"+usedName).data(),usedCd);
}
else
{
usedCd=getResolvedClass(masterCd,usedName,0,&templSpec);
if (usedCd==0) usedCd=getResolvedClass(masterCd,usedClassName,0,&templSpec);
//printf("Search for class %s result=%p\n",usedName.data(),usedCd);
}
if (scope) scope=scope->getOuterScope();
} while (scope && usedCd==0);
#endif
usedCd = findClassWithinClassContext(masterCd,usedName);
if (usedCd && usedCd!=masterCd) if (usedCd /*&& usedCd!=masterCd*/)
{ {
found=TRUE; found=TRUE;
Debug::print(Debug::Classes,0," Adding used class `%s'\n", usedCd->name().data()); Debug::print(Debug::Classes,0," Adding used class `%s'\n", usedCd->name().data());
...@@ -6109,7 +6087,7 @@ static void findMainPage(Entry *root) ...@@ -6109,7 +6087,7 @@ static void findMainPage(Entry *root)
indexName, root->doc,title); indexName, root->doc,title);
//setFileNameForSections(root->anchors,"index",Doxygen::mainPage); //setFileNameForSections(root->anchors,"index",Doxygen::mainPage);
Doxygen::mainPage->fileName = indexName; Doxygen::mainPage->fileName = indexName;
Doxygen::mainPage->addSections(root->anchors); //Doxygen::mainPage->addSections(root->anchors);
// a page name is a label as well! // a page name is a label as well!
SectionInfo *si=new SectionInfo( SectionInfo *si=new SectionInfo(
...@@ -6253,7 +6231,7 @@ static void generatePageDocs() ...@@ -6253,7 +6231,7 @@ static void generatePageDocs()
{ {
scName=pi->context->name(); scName=pi->context->name();
} }
outputList->parseDoc(pi->defFileName,pi->defLine,scName,0,pi->doc,FALSE); outputList->parseDoc(pi->defFileName,pi->defLine,scName,0,pi->doc,FALSE,pi->sectionDict);
outputList->endTextBlock(); outputList->endTextBlock();
endFile(*outputList); endFile(*outputList);
//outputList->enable(OutputGenerator::Man); //outputList->enable(OutputGenerator::Man);
...@@ -6293,7 +6271,7 @@ static void buildExampleList(Entry *root) ...@@ -6293,7 +6271,7 @@ static void buildExampleList(Entry *root)
PageInfo *pi=new PageInfo(root->fileName,root->startLine, PageInfo *pi=new PageInfo(root->fileName,root->startLine,
root->name,root->doc,root->args); root->name,root->doc,root->args);
pi->fileName = convertNameToFile(pi->name+"-example"); pi->fileName = convertNameToFile(pi->name+"-example");
pi->addSections(root->anchors); //pi->addSections(root->anchors);
Doxygen::exampleSDict->inSort(root->name,pi); Doxygen::exampleSDict->inSort(root->name,pi);
addExampleToGroups(root,pi); addExampleToGroups(root,pi);
......
...@@ -63,6 +63,7 @@ static const char *defaultStyleSheet = ...@@ -63,6 +63,7 @@ static const char *defaultStyleSheet =
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n" "DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n" "DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"BODY { background: white; color: black }\n" "BODY { background: white; color: black }\n"
"EM.mdesc { font-size: smaller }\n"
"TD.indexkey { \n" "TD.indexkey { \n"
" background-color: #eeeeff; \n" " background-color: #eeeeff; \n"
" font-weight: bold; \n" " font-weight: bold; \n"
...@@ -791,11 +792,11 @@ void HtmlGenerator::startMemberDescription() ...@@ -791,11 +792,11 @@ void HtmlGenerator::startMemberDescription()
DBG_HTML(t << "<!-- startMemberDescription -->" << endl) DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS")) if (Config_getBool("HTML_ALIGN_MEMBERS"))
{ {
t << "<tr><td>&nbsp;</td><td><font size=-1><em>"; t << "<tr><td>&nbsp;</td><td><em class=\"mdesc\">";
} }
else else
{ {
t << "<dl class=\"el\"><dd><font size=-1><em>"; t << "<dl class=\"el\"><dd><em class=\"mdesc\">";
} }
} }
...@@ -804,11 +805,11 @@ void HtmlGenerator::endMemberDescription() ...@@ -804,11 +805,11 @@ void HtmlGenerator::endMemberDescription()
DBG_HTML(t << "<!-- endMemberDescription -->" << endl) DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS")) if (Config_getBool("HTML_ALIGN_MEMBERS"))
{ {
t << "</em></font><br><br></td></tr>" << endl; t << "</em><br><br></td></tr>" << endl;
} }
else else
{ {
t << "<br><br></em></font></dl>"; t << "<br><br></em></dl>";
} }
} }
...@@ -1046,7 +1047,7 @@ void HtmlGenerator::startParameterName(bool oneArgOnly) ...@@ -1046,7 +1047,7 @@ void HtmlGenerator::startParameterName(bool oneArgOnly)
{ {
t << "1\" valign=\"top"; t << "1\" valign=\"top";
} }
t << "\" nowrap>&nbsp;"; t << "\" nowrap>"; //&nbsp;";
} }
void HtmlGenerator::endParameterName(bool last,bool emptyList) void HtmlGenerator::endParameterName(bool last,bool emptyList)
...@@ -1057,7 +1058,7 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList) ...@@ -1057,7 +1058,7 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList)
if (emptyList) if (emptyList)
{ {
t << " </td>" << endl; t << " </td>" << endl;
t << " <td class=\"md\" valign=\"top\">)&nbsp;</td>" << endl; t << " <td class=\"md\" valign=\"top\">&nbsp;)&nbsp;</td>" << endl;
t << " <td class=\"md\" nowrap>"; t << " <td class=\"md\" nowrap>";
} }
else else
......
...@@ -2763,7 +2763,8 @@ void writeIndex(OutputList &ol) ...@@ -2763,7 +2763,8 @@ void writeIndex(OutputList &ol)
if (Doxygen::mainPage) if (Doxygen::mainPage)
{ {
Doxygen::insideMainPage=TRUE; Doxygen::insideMainPage=TRUE;
ol.parseDoc(defFileName,defLine,0,0,Doxygen::mainPage->doc,FALSE); ol.parseDoc(defFileName,defLine,0,0,
Doxygen::mainPage->doc,FALSE,Doxygen::mainPage->sectionDict);
if (!Config_getString("GENERATE_TAGFILE").isEmpty()) if (!Config_getString("GENERATE_TAGFILE").isEmpty())
{ {
...@@ -2936,7 +2937,8 @@ void writeIndex(OutputList &ol) ...@@ -2936,7 +2937,8 @@ void writeIndex(OutputList &ol)
// ol.endSection(si->label,FALSE); // ol.endSection(si->label,FALSE);
//} //}
ol.startTextBlock(); ol.startTextBlock();
ol.parseDoc(defFileName,defLine,0,0,Doxygen::mainPage->doc,FALSE); ol.parseDoc(defFileName,defLine,0,0,
Doxygen::mainPage->doc,FALSE,Doxygen::mainPage->sectionDict);
ol.endTextBlock(); ol.endTextBlock();
endFile(ol); endFile(ol);
ol.enable(OutputGenerator::Man); ol.enable(OutputGenerator::Man);
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "translator_nl.h" #include "translator_nl.h"
#endif #endif
#ifdef LANG_SE #ifdef LANG_SE
#include "translator_se.h" //#include "translator_se.h"
#endif #endif
#ifdef LANG_CZ #ifdef LANG_CZ
#include "translator_cz.h" #include "translator_cz.h"
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
#include "translator_es.h" #include "translator_es.h"
#endif #endif
#ifdef LANG_FI #ifdef LANG_FI
#include "translator_fi.h" //#include "translator_fi.h"
#endif #endif
#ifdef LANG_RU #ifdef LANG_RU
#include "translator_ru.h" #include "translator_ru.h"
...@@ -112,6 +112,16 @@ ...@@ -112,6 +112,16 @@
Translator *theTranslator=0; Translator *theTranslator=0;
static const char obsoleteMsg[] =
"---------\n"
"ERROR: The selected language is no longer supported!\n"
"If you want doxygen to produce output in this language \n"
"you are kindly requested to help bringing the documentation \n"
"up to date. Please read the development section of the manual \n"
"for more information or contact Petr Prikryl (Prikryl@skil.cz).\n"
"Thanks in advance!\n"
"---------\n";
bool setTranslator(const char *langName) bool setTranslator(const char *langName)
{ {
if (L_EQUAL("english")) if (L_EQUAL("english"))
...@@ -128,7 +138,9 @@ bool setTranslator(const char *langName) ...@@ -128,7 +138,9 @@ bool setTranslator(const char *langName)
#ifdef LANG_SE #ifdef LANG_SE
else if (L_EQUAL("swedish")) else if (L_EQUAL("swedish"))
{ {
theTranslator=new TranslatorSwedish; //theTranslator=new TranslatorSwedish;
theTranslator=new TranslatorEnglish;
err(obsoleteMsg);
} }
#endif #endif
#ifdef LANG_CZ #ifdef LANG_CZ
...@@ -174,7 +186,9 @@ bool setTranslator(const char *langName) ...@@ -174,7 +186,9 @@ bool setTranslator(const char *langName)
#ifdef LANG_FI #ifdef LANG_FI
else if (L_EQUAL("finnish")) else if (L_EQUAL("finnish"))
{ {
theTranslator=new TranslatorFinnish; //theTranslator=new TranslatorFinnish;
theTranslator=new TranslatorEnglish;
err(obsoleteMsg);
} }
#endif #endif
#ifdef LANG_RU #ifdef LANG_RU
......
...@@ -179,103 +179,100 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -179,103 +179,100 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this); MemberListIterator mli(*this);
for ( ; (md=mli.current()); ++mli ) for ( ; (md=mli.current()); ++mli )
{ {
//printf(">>> Member `%s' type=%d\n",md->name().data(),md->memberType()); if (md->isBriefSectionVisible())
switch(md->memberType())
{ {
case MemberDef::Define: // fall through //printf(">>> Member `%s' type=%d\n",md->name().data(),md->memberType());
case MemberDef::Prototype: // fall through switch(md->memberType())
case MemberDef::Typedef: // fall through
case MemberDef::Variable: // fall through
case MemberDef::Function: // fall through
case MemberDef::Signal: // fall through
case MemberDef::Slot: // fall through
case MemberDef::DCOP: // fall through
case MemberDef::Property: // fall through
case MemberDef::Event:
{
if (md->isBriefSectionVisible())
{
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
}
break;
}
case MemberDef::Enumeration:
{ {
if (first) ol.startMemberList(),first=FALSE; case MemberDef::Define: // fall through
int enumVars=0; case MemberDef::Prototype: // fall through
MemberListIterator vmli(*this); case MemberDef::Typedef: // fall through
MemberDef *vmd; case MemberDef::Variable: // fall through
QCString name(md->name()); case MemberDef::Function: // fall through
int i=name.findRev("::"); case MemberDef::Signal: // fall through
if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?) case MemberDef::Slot: // fall through
if (name[0]=='@') // anonymous enum => append variables case MemberDef::DCOP: // fall through
{ case MemberDef::Property: // fall through
for ( ; (vmd=vmli.current()) ; ++vmli) case MemberDef::Event:
{ {
QCString vtype=vmd->typeString(); if (first) ol.startMemberList(),first=FALSE;
if ((vtype.find(name))!=-1) md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
{ break;
enumVars++;
vmd->setAnonymousEnumType(md);
}
} }
} case MemberDef::Enumeration:
// if this is an anoymous enum and there are variable of this
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (enumVars==0) // show enum here
{
ol.startMemberItem(0);
ol.writeString("enum ");
ol.insertMemberAlign();
//ol+=typeDecl; // append the enum values.
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); if (first) ol.startMemberList(),first=FALSE;
ol.parseDoc( int enumVars=0;
md->briefFile(),md->briefLine(), MemberListIterator vmli(*this);
cd?cd->name().data():0,md, MemberDef *vmd;
md->briefDescription(), QCString name(md->name());
FALSE int i=name.findRev("::");
); if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
if (md->isDetailedSectionLinkable()) if (name[0]=='@') // anonymous enum => append variables
{ {
ol.disableAllBut(OutputGenerator::Html); for ( ; (vmd=vmli.current()) ; ++vmli)
ol.endEmphasis();
ol.docify(" ");
if (md->getGroupDef()!=0 && gd==0) // forward link to group
{ {
ol.startTextLink(md->getGroupDef()->getOutputFileBase(), QCString vtype=vmd->typeString();
md->anchor()); if ((vtype.find(name))!=-1)
{
enumVars++;
vmd->setAnonymousEnumType(md);
}
} }
else }
// if this is an anoymous enum and there are variables of this
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (enumVars==0) // show enum here
{
ol.startMemberItem(0);
ol.writeString("enum ");
ol.insertMemberAlign();
//ol+=typeDecl; // append the enum values.
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startTextLink(0,md->anchor()); ol.startMemberDescription();
ol.parseDoc(
md->briefFile(),md->briefLine(),
cd?cd->name().data():0,md,
md->briefDescription(),
FALSE
);
if (md->isDetailedSectionLinkable())
{
ol.disableAllBut(OutputGenerator::Html);
ol.endEmphasis();
ol.docify(" ");
if (md->getGroupDef()!=0 && gd==0) // forward link to group
{
ol.startTextLink(md->getGroupDef()->getOutputFileBase(),
md->anchor());
}
else
{
ol.startTextLink(0,md->anchor());
}
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.enableAll();
}
ol.endMemberDescription();
} }
ol.parseText(theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.enableAll();
} }
ol.endMemberDescription(); md->warnIfUndocumented();
break;
} }
} case MemberDef::Friend:
md->warnIfUndocumented(); {
break; if (first) ol.startMemberList(),first=FALSE;
} md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
case MemberDef::Friend: break;
{ }
if (md->isBriefSectionVisible()) case MemberDef::EnumValue:
{ break;
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
}
break;
} }
case MemberDef::EnumValue:
break;
} }
} }
......
...@@ -193,7 +193,8 @@ void OutputList::popGeneratorState() ...@@ -193,7 +193,8 @@ void OutputList::popGeneratorState()
void OutputList::parseDoc(const char *fileName,int startLine, void OutputList::parseDoc(const char *fileName,int startLine,
const char * clName,MemberDef * md, const char * clName,MemberDef * md,
const QCString &docStr,bool isExample) const QCString &docStr,bool isExample,
SectionDict *sections)
{ {
int count=0; int count=0;
OutputGenerator *og=outputs->first(); OutputGenerator *og=outputs->first();
...@@ -205,7 +206,7 @@ void OutputList::parseDoc(const char *fileName,int startLine, ...@@ -205,7 +206,7 @@ void OutputList::parseDoc(const char *fileName,int startLine,
if (count==0) return; // no output formats enabled. if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseDoc(fileName,startLine, DocNode *root = validatingParseDoc(fileName,startLine,
clName,md,docStr,isExample); clName,md,docStr,isExample,sections);
og=outputs->first(); og=outputs->first();
while (og) while (og)
......
...@@ -36,6 +36,7 @@ class ClassDiagram; ...@@ -36,6 +36,7 @@ class ClassDiagram;
class DotClassGraph; class DotClassGraph;
class DotInclDepGraph; class DotInclDepGraph;
class DotGfxHierarchyTable; class DotGfxHierarchyTable;
class SectionDict;
class OutputList : public OutputDocInterface class OutputList : public OutputDocInterface
{ {
...@@ -61,7 +62,7 @@ class OutputList : public OutputDocInterface ...@@ -61,7 +62,7 @@ class OutputList : public OutputDocInterface
void parseDoc(const char *fileName,int startLine, void parseDoc(const char *fileName,int startLine,
const char *clName,MemberDef *md,const QCString &docStr, const char *clName,MemberDef *md,const QCString &docStr,
bool isExample); bool isExample,SectionDict *sections=0);
void parseText(const QCString &textStr); void parseText(const QCString &textStr);
......
...@@ -27,8 +27,14 @@ class PageInfo ...@@ -27,8 +27,14 @@ class PageInfo
public: public:
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) : PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
defFileName(f), defLine(l), name(n), defFileName(f), defLine(l), name(n),
doc(d), title(t), context(0), sectionDict(0),specialListItems(0),m_inGroup(0) doc(d), title(t), context(0),specialListItems(0),m_inGroup(0)
{} {
sectionDict = new SectionDict(17);
}
~PageInfo()
{
delete sectionDict;
}
// where the page definition was found // where the page definition was found
QCString defFileName; QCString defFileName;
...@@ -51,33 +57,33 @@ class PageInfo ...@@ -51,33 +57,33 @@ class PageInfo
bool isReference() const { return !reference.isEmpty(); } bool isReference() const { return !reference.isEmpty(); }
QCString getReference() const { return reference; } QCString getReference() const { return reference; }
void addSections(QList<QCString> *anchorList) //void addSections(QList<QCString> *anchorList)
{ //{
if (anchorList) // if (anchorList)
{ // {
QCString *s=anchorList->first(); // QCString *s=anchorList->first();
while (s) // while (s)
{ // {
SectionInfo *si=0; // SectionInfo *si=0;
if (!s->isEmpty() && (si=Doxygen::sectionDict[*s])) // if (!s->isEmpty() && (si=Doxygen::sectionDict[*s]))
{ // {
//printf("Add section `%s' to definition `%s'\n", // //printf("Add section `%s' to definition `%s'\n",
// si->label.data(),n.data()); // // si->label.data(),n.data());
if (sectionDict==0) // if (sectionDict==0)
{ // {
sectionDict = new SectionDict(17); // sectionDict = new SectionDict(17);
} // }
if (sectionDict->find(*s)==0) // if (sectionDict->find(*s)==0)
{ // {
sectionDict->insert(*s,si); // sectionDict->insert(*s,si);
} // }
si->pageRef = this; // si->pageRef = this;
si->fileName = fileName; // si->fileName = fileName;
} // }
s=anchorList->next(); // s=anchorList->next();
} // }
} // }
} //}
void findSectionsInDocumentation() void findSectionsInDocumentation()
{ {
docFindSections(doc,this,0,0,defFileName); docFindSections(doc,this,0,0,defFileName);
......
...@@ -292,15 +292,15 @@ void RTFDocVisitor::visit(DocVerbatim *s) ...@@ -292,15 +292,15 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample"); m_t << rtf_Style_Reset << getStyle("CodeExample");
parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile()); parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
m_t << "\\par" << endl; //m_t << "\\par" << endl;
m_t << "}" << endl; m_t << "}" << endl;
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
m_t << "{" << endl; m_t << "{" << endl;
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample"); m_t << rtf_Style_Reset << getStyle("CodeExample");
filter(s->text()); filter(s->text(),TRUE);
m_t << "\\par" << endl; //m_t << "\\par" << endl;
m_t << "}" << endl; m_t << "}" << endl;
break; break;
case DocVerbatim::HtmlOnly: case DocVerbatim::HtmlOnly:
...@@ -572,14 +572,17 @@ void RTFDocVisitor::visitPost(DocSimpleListItem *) ...@@ -572,14 +572,17 @@ void RTFDocVisitor::visitPost(DocSimpleListItem *)
void RTFDocVisitor::visitPre(DocSection *s) void RTFDocVisitor::visitPre(DocSection *s)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "{" // start section m_t << "\\par" << endl <<
"{{" // start section
<< rtf_Style_Reset; << rtf_Style_Reset;
QString heading; QString heading;
int level = QMIN(s->level()+2,4); int level = QMIN(s->level()+1,4);
heading.sprintf("Heading%d",level); heading.sprintf("Heading%d",level);
// set style // set style
m_t << rtf_Style[heading]->reference; m_t << rtf_Style[heading]->reference << endl;
// make table of contents entry // make table of contents entry
filter(s->title());
m_t << endl << "\\par" << "}" << endl;
m_t << "{\\tc\\tcl" << level << " \\v "; m_t << "{\\tc\\tcl" << level << " \\v ";
filter(s->title()); filter(s->title());
m_t << "}" << endl; m_t << "}" << endl;
...@@ -588,8 +591,7 @@ void RTFDocVisitor::visitPre(DocSection *s) ...@@ -588,8 +591,7 @@ void RTFDocVisitor::visitPre(DocSection *s)
void RTFDocVisitor::visitPost(DocSection *) void RTFDocVisitor::visitPost(DocSection *)
{ {
if (m_hide) return; if (m_hide) return;
m_t << "\\par" << endl; m_t << "}" << endl; // end section
m_t << "}"; // end section
} }
void RTFDocVisitor::visitPre(DocHtmlList *l) void RTFDocVisitor::visitPre(DocHtmlList *l)
...@@ -686,15 +688,15 @@ void RTFDocVisitor::visitPre(DocHtmlTable *) ...@@ -686,15 +688,15 @@ void RTFDocVisitor::visitPre(DocHtmlTable *)
m_t << "\\par" << endl; m_t << "\\par" << endl;
} }
void RTFDocVisitor::visitPost(DocHtmlTable *t) void RTFDocVisitor::visitPost(DocHtmlTable *)
{ {
if (m_hide) return; if (m_hide) return;
if (!t->hasCaption()) //if (!t->hasCaption())
{ //{
m_t << endl; // m_t << endl;
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl; // m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
m_t << "{\\row }" << endl; // m_t << "{\\row }" << endl;
} //}
m_t << "\\pard" << endl; m_t << "\\pard" << endl;
} }
...@@ -724,7 +726,7 @@ void RTFDocVisitor::visitPre(DocHtmlRow *r) ...@@ -724,7 +726,7 @@ void RTFDocVisitor::visitPre(DocHtmlRow *r)
"\\clbrdrb\\brdrs\\brdrw10 " "\\clbrdrb\\brdrs\\brdrw10 "
"\\clbrdrr \\brdrs\\brdrw10 " "\\clbrdrr \\brdrs\\brdrw10 "
"\\cltxlrtb " "\\cltxlrtb "
"\\cellx" << (i*columnWidth) << endl; "\\cellx" << ((i+1)*columnWidth) << endl;
} }
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl; m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
} }
...@@ -1091,7 +1093,7 @@ static char* getMultiByte(int c) ...@@ -1091,7 +1093,7 @@ static char* getMultiByte(int c)
return s; return s;
} }
void RTFDocVisitor::filter(const char *str) void RTFDocVisitor::filter(const char *str,bool verbatim)
{ {
if (str) if (str)
{ {
...@@ -1121,6 +1123,15 @@ void RTFDocVisitor::filter(const char *str) ...@@ -1121,6 +1123,15 @@ void RTFDocVisitor::filter(const char *str)
case '{': m_t << "\\{"; break; case '{': m_t << "\\{"; break;
case '}': m_t << "\\}"; break; case '}': m_t << "\\}"; break;
case '\\': m_t << "\\\\"; break; case '\\': m_t << "\\\\"; break;
case '\n': if (verbatim)
{
m_t << "\\par" << endl;
}
else
{
m_t << '\n';
}
break;
default: m_t << (char)c; default: m_t << (char)c;
} }
pc = c; pc = c;
......
...@@ -132,7 +132,7 @@ class RTFDocVisitor : public DocVisitor ...@@ -132,7 +132,7 @@ class RTFDocVisitor : public DocVisitor
// helper functions // helper functions
//-------------------------------------- //--------------------------------------
void filter(const char *str); void filter(const char *str,bool verbatim=FALSE);
void startLink(const QString &ref,const QString &file, void startLink(const QString &ref,const QString &file,
const QString &anchor); const QString &anchor);
void endLink(const QString &ref); void endLink(const QString &ref);
......
...@@ -823,7 +823,7 @@ void RTFGenerator::lastIndexPage() ...@@ -823,7 +823,7 @@ void RTFGenerator::lastIndexPage()
t <<"\\sect \\sbkpage \\pgndec \\pgnrestart\n"; t <<"\\sect \\sbkpage \\pgndec \\pgnrestart\n";
t <<"\\sect \\sectd \\sbknone\n"; t <<"\\sect \\sectd \\sbknone\n";
// set footer // set new footer with arabic numbers
t <<"{\\footer "<< rtf_Style["Footer"]->reference << "{\\chpgn}}\n"; t <<"{\\footer "<< rtf_Style["Footer"]->reference << "{\\chpgn}}\n";
//t << rtf_Style["Heading1"]->reference << "\n"; //t << rtf_Style["Heading1"]->reference << "\n";
...@@ -1970,7 +1970,7 @@ void RTFGenerator::endTextBlock() ...@@ -1970,7 +1970,7 @@ void RTFGenerator::endTextBlock()
newParagraph(); newParagraph();
DBG_RTF(t << "{\\comment endTextBlock}" << endl) DBG_RTF(t << "{\\comment endTextBlock}" << endl)
t << "}" << endl; t << "}" << endl;
m_omitParagraph = TRUE; //m_omitParagraph = TRUE;
} }
void RTFGenerator::newParagraph() void RTFGenerator::newParagraph()
......
...@@ -467,9 +467,11 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName, ...@@ -467,9 +467,11 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
MemberDef *tmd=0; MemberDef *tmd=0;
for (;(tmd=mni.current());++mni) for (;(tmd=mni.current());++mni)
{ {
//printf("Found member %s scope=%p mContext=%p\n",tmd->name().data(), //printf("Found member %s resScope=%s outerScope=%s mContext=%p\n",
// tmd->getOuterScope(),mContext); // tmd->name().data(), resScope->name().data(),
if (tmd->isTypedef() && tmd->getOuterScope()==resScope) // tmd->getOuterScope()->name().data(), mContext);
if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
/*! TODO: look if resScope is visible within tmd->getOuterScope() */
{ {
md=tmd; md=tmd;
} }
...@@ -2739,6 +2741,10 @@ bool generateLink(OutputDocInterface &od,const char *clName, ...@@ -2739,6 +2741,10 @@ bool generateLink(OutputDocInterface &od,const char *clName,
{ {
linkText=((GroupDef *)compound)->groupTitle(); // use group's title as link linkText=((GroupDef *)compound)->groupTitle(); // use group's title as link
} }
else if (compound->definitionType()==Definition::TypeFile)
{
linkText=lt; // use text "as is"
}
od.writeObjectLink(compound->getReference(), od.writeObjectLink(compound->getReference(),
compound->getOutputFileBase(),anchor,linkText); compound->getOutputFileBase(),anchor,linkText);
if (!compound->isReference()) if (!compound->isReference())
...@@ -2761,6 +2767,7 @@ bool generateLink(OutputDocInterface &od,const char *clName, ...@@ -2761,6 +2767,7 @@ bool generateLink(OutputDocInterface &od,const char *clName,
void generateFileRef(OutputDocInterface &od,const char *name,const char *text) void generateFileRef(OutputDocInterface &od,const char *name,const char *text)
{ {
//printf("generateFileRef(%s,%s)\n",name,text);
QCString linkText = text ? text : name; QCString linkText = text ? text : name;
//FileInfo *fi; //FileInfo *fi;
FileDef *fd; FileDef *fd;
...@@ -3581,7 +3588,8 @@ found: ...@@ -3581,7 +3588,8 @@ found:
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
PageInfo *addRelatedPage(const char *name,const QCString &ptitle, PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,QList<QCString> *anchors, const QCString &doc,
QList<QCString> * /*anchors*/,
const char *fileName,int startLine, const char *fileName,int startLine,
const QList<ListItemInfo> *sli, const QList<ListItemInfo> *sli,
GroupDef *gd, GroupDef *gd,
...@@ -3634,7 +3642,7 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle, ...@@ -3634,7 +3642,7 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
pageName=pi->name.lower(); pageName=pi->name.lower();
//setFileNameForSections(anchors,pageName,pi); //setFileNameForSections(anchors,pageName,pi);
pi->fileName = pageName; pi->fileName = pageName;
pi->addSections(anchors); //pi->addSections(anchors);
//printf("Appending page `%s'\n",baseName.data()); //printf("Appending page `%s'\n",baseName.data());
Doxygen::pageSDict->append(baseName,pi); Doxygen::pageSDict->append(baseName,pi);
......
...@@ -978,14 +978,16 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) ...@@ -978,14 +978,16 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
t << " <detaileddescription>" << endl; t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd->name(),0,cd->documentation()); writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd->name(),0,cd->documentation());
t << " </detaileddescription>" << endl; t << " </detaileddescription>" << endl;
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance); DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance,
Config_getBool("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial()) if (!inheritanceGraph.isTrivial())
{ {
t << " <inheritancegraph>" << endl; t << " <inheritancegraph>" << endl;
inheritanceGraph.writeXML(t); inheritanceGraph.writeXML(t);
t << " </inheritancegraph>" << endl; t << " </inheritancegraph>" << endl;
} }
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation); DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation,
Config_getBool("MAX_DOT_GRAPH_DEPTH"));
if (!collaborationGraph.isTrivial()) if (!collaborationGraph.isTrivial())
{ {
t << " <collaborationgraph>" << endl; t << " <collaborationgraph>" << endl;
......
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