summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp4
-rw-r--r--src/config.l18
-rw-r--r--src/defgen.cpp6
-rw-r--r--src/docparser.cpp31
-rw-r--r--src/docparser.h4
-rw-r--r--src/doctokenizer.l4
-rw-r--r--src/dot.cpp20
-rw-r--r--src/dot.h7
-rw-r--r--src/doxygen.cpp38
-rw-r--r--src/htmlgen.cpp13
-rw-r--r--src/index.cpp6
-rw-r--r--src/language.cpp22
-rw-r--r--src/memberlist.cpp165
-rw-r--r--src/outputlist.cpp5
-rw-r--r--src/outputlist.h3
-rw-r--r--src/page.h64
-rw-r--r--src/rtfdocvisitor.cpp45
-rw-r--r--src/rtfdocvisitor.h2
-rw-r--r--src/rtfgen.cpp4
-rw-r--r--src/util.cpp18
-rw-r--r--src/xmlgen.cpp6
21 files changed, 279 insertions, 206 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 39e37f5..a24ffe5 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1032,7 +1032,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("HAVE_DOT") && Config_getBool("CLASS_GRAPH"))
// write class diagram using dot
{
- DotClassGraph inheritanceGraph(this,DotClassGraph::Inheritance);
+ DotClassGraph inheritanceGraph(this,DotClassGraph::Inheritance,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial())
{
ol.pushGeneratorState();
@@ -1067,7 +1067,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
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())
{
ol.pushGeneratorState();
diff --git a/src/config.l b/src/config.l
index 7823412..b569d5d 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1217,6 +1217,12 @@ void Config::check()
}
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"))
{
@@ -2518,6 +2524,18 @@ void Config::create()
"large images. \n",
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");
cb = addBool(
"GENERATE_LEGEND",
diff --git a/src/defgen.cpp b/src/defgen.cpp
index 2aed0bf..2216dd9 100644
--- a/src/defgen.cpp
+++ b/src/defgen.cpp
@@ -450,14 +450,16 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
t << " cp-documentation = <<_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())
{
t << " cp-inheritancegraph = <<_EnD_oF_dEf_TeXt_" << endl;
inheritanceGraph.writeDEF(t);
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())
{
t << " cp-collaborationgraph = <<_EnD_oF_dEf_TeXt_" << endl;
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 846d19c..08e21cf 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -37,6 +37,7 @@
#include "cmdmapper.h"
#include "printdocvisitor.h"
#include "message.h"
+#include "section.h"
#define DBG(x) do {} while(0)
//#define DBG(x) printf x
@@ -58,10 +59,11 @@ static const char *sectionLevelToName[] =
//---------------------------------------------------------------------------
// global variables during a call to validatingParseDoc
-static bool g_hasParamCommand;
-static MemberDef * g_memberDef;
-static QDict<void> g_paramsFound;
-static bool g_isExample;
+static bool g_hasParamCommand;
+static MemberDef * g_memberDef;
+static QDict<void> g_paramsFound;
+static bool g_isExample;
+static SectionDict *g_sectionDict;
// include file state
static QString g_includeFileText;
@@ -703,6 +705,10 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
}
else // compound link
{
+ if (compound->definitionType()==Definition::TypeFile)
+ {
+ name=g_token->name;
+ }
children.append(new
DocLinkedWord(parent,name,
compound->getReference(),
@@ -1153,6 +1159,10 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
{
m_file = sec->fileName;
m_anchor = sec->label;
+ if (g_sectionDict && g_sectionDict->find(id)==0)
+ {
+ g_sectionDict->insert(id,sec);
+ }
}
else
{
@@ -1458,6 +1468,10 @@ void DocSecRefItem::parse()
{
m_file = sec->fileName;
m_anchor = sec->label;
+ if (g_sectionDict && g_sectionDict->find(m_target)==0)
+ {
+ g_sectionDict->insert(m_target,sec);
+ }
}
else
{
@@ -4339,6 +4353,7 @@ reparsetoken:
break;
}
}
+ retval=0;
endparagraph:
handlePendingStyleCommands(this,m_children);
DocNode *n = g_nodeStack.pop();
@@ -4369,6 +4384,10 @@ int DocSection::parse()
m_anchor = sec->label;
m_title = sec->title;
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()
DocNode *validatingParseDoc(const char *fileName,int startLine,
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);
@@ -4633,6 +4653,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
+ g_sectionDict = sections;
doctokenizerYYlineno=startLine;
doctokenizerYYinit(input,g_fileName);
diff --git a/src/docparser.h b/src/docparser.h
index e8e9403..15d931c 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -33,6 +33,7 @@ class MemberDef;
class PageInfo;
class Definition;
class MemberGroup;
+class SectionDict;
//---------------------------------------------------------------------------
@@ -51,7 +52,8 @@ class MemberGroup;
*/
DocNode *validatingParseDoc(const char *fileName,int startLine,
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
* fragments are limited to words, whitespace and symbols.
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index f8f363a..7655b54 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -288,7 +288,7 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
-WORD1 [^ \t\n\r\\@<>()\[\]:;\?{}&$#,.]+|"{"|"}"
+WORD1 [^ \t\n\r\\@<>()\[\]:;\?{}&$#,.]+|"{"|"}"|("\""[^"\n]*"\"")
WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"
WORD1NQ [^ \t\n\r\\@<>()\[\]:;\?{}&$#,."]+
WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"
@@ -603,7 +603,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
return 0;
}
-<St_Ref>("#"|"::")?({ID}[.#:-])*{ID} {
+<St_Ref>("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID} {
g_token->name=yytext;
return TK_WORD;
}
diff --git a/src/dot.cpp b/src/dot.cpp
index 928692b..ac0f645 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -775,7 +775,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
DotNode *node;
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;
f.close();
@@ -1062,7 +1063,10 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
}
m_usedNodes->insert(className,bn);
//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,
}
baseName = convertNameToFile(diskName());
- findMaximalDotGraph(m_startNode,m_maxDistance,baseName,
+ findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName,
thisDir,format,!isTBRank,m_graphType==Inheritance);
if (format==BITMAP) // run dot to create a bitmap image
@@ -1548,15 +1552,19 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
n->addChild(bn,0,0,0);
bn->addParent(n);
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_recDepth = maxRecursionDepth;
m_inverse = inverse;
ASSERT(fd!=0);
m_diskName = fd->getFileBase().copy();
@@ -1610,7 +1618,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
QCString mapName=m_startNode->m_label.copy();
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);
if (format==BITMAP)
diff --git a/src/dot.h b/src/dot.h
index 5646482..ae3ce60 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -76,7 +76,7 @@ class DotNode
void removeChild(DotNode *n);
void removeParent(DotNode *n);
void write(QTextStream &t,GraphOutputFormat f,bool topDown,bool toChildren,
- int maxDistance=1000,bool backArrows=TRUE);
+ int maxDistance,bool backArrows);
int m_subgraphId;
void clearWriteFlag();
void writeXML(QTextStream &t,bool isClassGraph);
@@ -125,7 +125,7 @@ class DotClassGraph
{
public:
enum GraphType { Interface, Implementation, Inheritance };
- DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth=1000);
+ DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth);
~DotClassGraph();
bool isTrivial() const;
QCString writeGraph(QTextStream &t,GraphOutputFormat f,const char *path,
@@ -152,7 +152,7 @@ class DotClassGraph
class DotInclDepGraph
{
public:
- DotInclDepGraph(FileDef *fd,bool inverse=FALSE);
+ DotInclDepGraph(FileDef *fd,int maxRecusionDepth,bool inverse=FALSE);
~DotInclDepGraph();
QCString writeGraph(QTextStream &t, GraphOutputFormat f,const char *path,
bool writeImageMap=TRUE);
@@ -168,6 +168,7 @@ class DotInclDepGraph
QCString m_diskName;
int m_maxDistance;
bool m_inverse;
+ int m_recDepth;
};
void generateGraphLegend(const char *path);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index c72fe21..15dc65e 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2939,9 +2939,11 @@ static void findUsedClassesForClass(Entry *root,
//printf("findUsedClassesForClass(%s)=%s\n",masterCd->name().data(),type.data());
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec))
{
+ //printf("Found used class %s\n",usedClassName.data());
// the name could be a type definition, resolve it
// TODO: recursive typedef resolution
QCString typeName = resolveTypeDef(masterCd,usedClassName);
+ //printf("Found resolved class %s\n",typeName.data());
// add any template arguments to the class
QCString usedName = usedClassName+templSpec;
@@ -2993,34 +2995,10 @@ static void findUsedClassesForClass(Entry *root,
if (!found)
{
- ClassDef *usedCd=0;
-#if 0
- 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);
+ ClassDef *usedCd=findClassWithinClassContext(masterCd,usedName);
+ //printf("Looking for used class: result=%p master=%p\n",usedCd,masterCd);
- if (usedCd && usedCd!=masterCd)
+ if (usedCd /*&& usedCd!=masterCd*/)
{
found=TRUE;
Debug::print(Debug::Classes,0," Adding used class `%s'\n", usedCd->name().data());
@@ -6109,7 +6087,7 @@ static void findMainPage(Entry *root)
indexName, root->doc,title);
//setFileNameForSections(root->anchors,"index",Doxygen::mainPage);
Doxygen::mainPage->fileName = indexName;
- Doxygen::mainPage->addSections(root->anchors);
+ //Doxygen::mainPage->addSections(root->anchors);
// a page name is a label as well!
SectionInfo *si=new SectionInfo(
@@ -6253,7 +6231,7 @@ static void generatePageDocs()
{
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();
endFile(*outputList);
//outputList->enable(OutputGenerator::Man);
@@ -6293,7 +6271,7 @@ static void buildExampleList(Entry *root)
PageInfo *pi=new PageInfo(root->fileName,root->startLine,
root->name,root->doc,root->args);
pi->fileName = convertNameToFile(pi->name+"-example");
- pi->addSections(root->anchors);
+ //pi->addSections(root->anchors);
Doxygen::exampleSDict->inSort(root->name,pi);
addExampleToGroups(root,pi);
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 516b05e..20998ad 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -63,6 +63,7 @@ static const char *defaultStyleSheet =
"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"
"BODY { background: white; color: black }\n"
+"EM.mdesc { font-size: smaller }\n"
"TD.indexkey { \n"
" background-color: #eeeeff; \n"
" font-weight: bold; \n"
@@ -791,11 +792,11 @@ void HtmlGenerator::startMemberDescription()
DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
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
{
- t << "<dl class=\"el\"><dd><font size=-1><em>";
+ t << "<dl class=\"el\"><dd><em class=\"mdesc\">";
}
}
@@ -804,11 +805,11 @@ void HtmlGenerator::endMemberDescription()
DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
- t << "</em></font><br><br></td></tr>" << endl;
+ t << "</em><br><br></td></tr>" << endl;
}
else
{
- t << "<br><br></em></font></dl>";
+ t << "<br><br></em></dl>";
}
}
@@ -1046,7 +1047,7 @@ void HtmlGenerator::startParameterName(bool oneArgOnly)
{
t << "1\" valign=\"top";
}
- t << "\" nowrap>&nbsp;";
+ t << "\" nowrap>"; //&nbsp;";
}
void HtmlGenerator::endParameterName(bool last,bool emptyList)
@@ -1057,7 +1058,7 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList)
if (emptyList)
{
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>";
}
else
diff --git a/src/index.cpp b/src/index.cpp
index 95698b6..c24714b 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -2763,7 +2763,8 @@ void writeIndex(OutputList &ol)
if (Doxygen::mainPage)
{
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())
{
@@ -2936,7 +2937,8 @@ void writeIndex(OutputList &ol)
// ol.endSection(si->label,FALSE);
//}
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();
endFile(ol);
ol.enable(OutputGenerator::Man);
diff --git a/src/language.cpp b/src/language.cpp
index 5a2b9d2..eb2dcb9 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -26,7 +26,7 @@
#include "translator_nl.h"
#endif
#ifdef LANG_SE
-#include "translator_se.h"
+//#include "translator_se.h"
#endif
#ifdef LANG_CZ
#include "translator_cz.h"
@@ -47,7 +47,7 @@
#include "translator_es.h"
#endif
#ifdef LANG_FI
-#include "translator_fi.h"
+//#include "translator_fi.h"
#endif
#ifdef LANG_RU
#include "translator_ru.h"
@@ -112,6 +112,16 @@
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)
{
if (L_EQUAL("english"))
@@ -128,7 +138,9 @@ bool setTranslator(const char *langName)
#ifdef LANG_SE
else if (L_EQUAL("swedish"))
{
- theTranslator=new TranslatorSwedish;
+ //theTranslator=new TranslatorSwedish;
+ theTranslator=new TranslatorEnglish;
+ err(obsoleteMsg);
}
#endif
#ifdef LANG_CZ
@@ -174,7 +186,9 @@ bool setTranslator(const char *langName)
#ifdef LANG_FI
else if (L_EQUAL("finnish"))
{
- theTranslator=new TranslatorFinnish;
+ //theTranslator=new TranslatorFinnish;
+ theTranslator=new TranslatorEnglish;
+ err(obsoleteMsg);
}
#endif
#ifdef LANG_RU
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index aea2f27..fe4da71 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -179,103 +179,100 @@ void MemberList::writePlainDeclarations(OutputList &ol,
MemberListIterator mli(*this);
for ( ; (md=mli.current()); ++mli )
{
- //printf(">>> Member `%s' type=%d\n",md->name().data(),md->memberType());
- switch(md->memberType())
+ if (md->isBriefSectionVisible())
{
- case MemberDef::Define: // fall through
- case MemberDef::Prototype: // fall through
- 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:
+ //printf(">>> Member `%s' type=%d\n",md->name().data(),md->memberType());
+ switch(md->memberType())
{
- if (first) ol.startMemberList(),first=FALSE;
- int enumVars=0;
- MemberListIterator vmli(*this);
- MemberDef *vmd;
- QCString name(md->name());
- int i=name.findRev("::");
- if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
- if (name[0]=='@') // anonymous enum => append variables
- {
- for ( ; (vmd=vmli.current()) ; ++vmli)
+ case MemberDef::Define: // fall through
+ case MemberDef::Prototype: // fall through
+ 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:
{
- QCString vtype=vmd->typeString();
- if ((vtype.find(name))!=-1)
- {
- enumVars++;
- vmd->setAnonymousEnumType(md);
- }
+ if (first) ol.startMemberList(),first=FALSE;
+ md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
+ break;
}
- }
- // 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"))
+ case MemberDef::Enumeration:
{
- ol.startMemberDescription();
- ol.parseDoc(
- md->briefFile(),md->briefLine(),
- cd?cd->name().data():0,md,
- md->briefDescription(),
- FALSE
- );
- if (md->isDetailedSectionLinkable())
+ if (first) ol.startMemberList(),first=FALSE;
+ int enumVars=0;
+ MemberListIterator vmli(*this);
+ MemberDef *vmd;
+ QCString name(md->name());
+ int i=name.findRev("::");
+ if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
+ if (name[0]=='@') // anonymous enum => append variables
{
- ol.disableAllBut(OutputGenerator::Html);
- ol.endEmphasis();
- ol.docify(" ");
- if (md->getGroupDef()!=0 && gd==0) // forward link to group
+ for ( ; (vmd=vmli.current()) ; ++vmli)
{
- ol.startTextLink(md->getGroupDef()->getOutputFileBase(),
- md->anchor());
+ QCString vtype=vmd->typeString();
+ 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;
}
- }
- md->warnIfUndocumented();
- break;
- }
- case MemberDef::Friend:
- {
- if (md->isBriefSectionVisible())
- {
- if (first) ol.startMemberList(),first=FALSE;
- md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
- }
- break;
+ case MemberDef::Friend:
+ {
+ if (first) ol.startMemberList(),first=FALSE;
+ md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
+ break;
+ }
+ case MemberDef::EnumValue:
+ break;
}
- case MemberDef::EnumValue:
- break;
}
}
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index d943415..7a074c7 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -193,7 +193,8 @@ void OutputList::popGeneratorState()
void OutputList::parseDoc(const char *fileName,int startLine,
const char * clName,MemberDef * md,
- const QCString &docStr,bool isExample)
+ const QCString &docStr,bool isExample,
+ SectionDict *sections)
{
int count=0;
OutputGenerator *og=outputs->first();
@@ -205,7 +206,7 @@ void OutputList::parseDoc(const char *fileName,int startLine,
if (count==0) return; // no output formats enabled.
DocNode *root = validatingParseDoc(fileName,startLine,
- clName,md,docStr,isExample);
+ clName,md,docStr,isExample,sections);
og=outputs->first();
while (og)
diff --git a/src/outputlist.h b/src/outputlist.h
index b21ae50..4b6f9fe 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -36,6 +36,7 @@ class ClassDiagram;
class DotClassGraph;
class DotInclDepGraph;
class DotGfxHierarchyTable;
+class SectionDict;
class OutputList : public OutputDocInterface
{
@@ -61,7 +62,7 @@ class OutputList : public OutputDocInterface
void parseDoc(const char *fileName,int startLine,
const char *clName,MemberDef *md,const QCString &docStr,
- bool isExample);
+ bool isExample,SectionDict *sections=0);
void parseText(const QCString &textStr);
diff --git a/src/page.h b/src/page.h
index 3177c42..7190188 100644
--- a/src/page.h
+++ b/src/page.h
@@ -27,8 +27,14 @@ class PageInfo
public:
PageInfo(const char *f, int l,const char *n,const char *d,const char *t) :
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
QCString defFileName;
@@ -51,33 +57,33 @@ class PageInfo
bool isReference() const { return !reference.isEmpty(); }
QCString getReference() const { return reference; }
- void addSections(QList<QCString> *anchorList)
- {
- if (anchorList)
- {
- QCString *s=anchorList->first();
- while (s)
- {
- SectionInfo *si=0;
- if (!s->isEmpty() && (si=Doxygen::sectionDict[*s]))
- {
- //printf("Add section `%s' to definition `%s'\n",
- // si->label.data(),n.data());
- if (sectionDict==0)
- {
- sectionDict = new SectionDict(17);
- }
- if (sectionDict->find(*s)==0)
- {
- sectionDict->insert(*s,si);
- }
- si->pageRef = this;
- si->fileName = fileName;
- }
- s=anchorList->next();
- }
- }
- }
+ //void addSections(QList<QCString> *anchorList)
+ //{
+ // if (anchorList)
+ // {
+ // QCString *s=anchorList->first();
+ // while (s)
+ // {
+ // SectionInfo *si=0;
+ // if (!s->isEmpty() && (si=Doxygen::sectionDict[*s]))
+ // {
+ // //printf("Add section `%s' to definition `%s'\n",
+ // // si->label.data(),n.data());
+ // if (sectionDict==0)
+ // {
+ // sectionDict = new SectionDict(17);
+ // }
+ // if (sectionDict->find(*s)==0)
+ // {
+ // sectionDict->insert(*s,si);
+ // }
+ // si->pageRef = this;
+ // si->fileName = fileName;
+ // }
+ // s=anchorList->next();
+ // }
+ // }
+ //}
void findSectionsInDocumentation()
{
docFindSections(doc,this,0,0,defFileName);
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 3d1a127..e10b3f1 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -292,15 +292,15 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
parseCode(m_ci,s->context(),s->text().latin1(),s->isExample(),s->exampleFile());
- m_t << "\\par" << endl;
+ //m_t << "\\par" << endl;
m_t << "}" << endl;
break;
case DocVerbatim::Verbatim:
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
- filter(s->text());
- m_t << "\\par" << endl;
+ filter(s->text(),TRUE);
+ //m_t << "\\par" << endl;
m_t << "}" << endl;
break;
case DocVerbatim::HtmlOnly:
@@ -572,14 +572,17 @@ void RTFDocVisitor::visitPost(DocSimpleListItem *)
void RTFDocVisitor::visitPre(DocSection *s)
{
if (m_hide) return;
- m_t << "{" // start section
+ m_t << "\\par" << endl <<
+ "{{" // start section
<< rtf_Style_Reset;
QString heading;
- int level = QMIN(s->level()+2,4);
+ int level = QMIN(s->level()+1,4);
heading.sprintf("Heading%d",level);
// set style
- m_t << rtf_Style[heading]->reference;
+ m_t << rtf_Style[heading]->reference << endl;
// make table of contents entry
+ filter(s->title());
+ m_t << endl << "\\par" << "}" << endl;
m_t << "{\\tc\\tcl" << level << " \\v ";
filter(s->title());
m_t << "}" << endl;
@@ -588,8 +591,7 @@ void RTFDocVisitor::visitPre(DocSection *s)
void RTFDocVisitor::visitPost(DocSection *)
{
if (m_hide) return;
- m_t << "\\par" << endl;
- m_t << "}"; // end section
+ m_t << "}" << endl; // end section
}
void RTFDocVisitor::visitPre(DocHtmlList *l)
@@ -686,15 +688,15 @@ void RTFDocVisitor::visitPre(DocHtmlTable *)
m_t << "\\par" << endl;
}
-void RTFDocVisitor::visitPost(DocHtmlTable *t)
+void RTFDocVisitor::visitPost(DocHtmlTable *)
{
if (m_hide) return;
- if (!t->hasCaption())
- {
- m_t << endl;
- m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
- m_t << "{\\row }" << endl;
- }
+ //if (!t->hasCaption())
+ //{
+ // m_t << endl;
+ // m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
+ // m_t << "{\\row }" << endl;
+ //}
m_t << "\\pard" << endl;
}
@@ -724,7 +726,7 @@ void RTFDocVisitor::visitPre(DocHtmlRow *r)
"\\clbrdrb\\brdrs\\brdrw10 "
"\\clbrdrr \\brdrs\\brdrw10 "
"\\cltxlrtb "
- "\\cellx" << (i*columnWidth) << endl;
+ "\\cellx" << ((i+1)*columnWidth) << endl;
}
m_t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
}
@@ -1091,7 +1093,7 @@ static char* getMultiByte(int c)
return s;
}
-void RTFDocVisitor::filter(const char *str)
+void RTFDocVisitor::filter(const char *str,bool verbatim)
{
if (str)
{
@@ -1121,6 +1123,15 @@ void RTFDocVisitor::filter(const char *str)
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;
}
pc = c;
diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h
index 7a6bbc8..96a0736 100644
--- a/src/rtfdocvisitor.h
+++ b/src/rtfdocvisitor.h
@@ -132,7 +132,7 @@ class RTFDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const char *str,bool verbatim=FALSE);
void startLink(const QString &ref,const QString &file,
const QString &anchor);
void endLink(const QString &ref);
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 88d0f62..e92eef6 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -823,7 +823,7 @@ void RTFGenerator::lastIndexPage()
t <<"\\sect \\sbkpage \\pgndec \\pgnrestart\n";
t <<"\\sect \\sectd \\sbknone\n";
- // set footer
+ // set new footer with arabic numbers
t <<"{\\footer "<< rtf_Style["Footer"]->reference << "{\\chpgn}}\n";
//t << rtf_Style["Heading1"]->reference << "\n";
@@ -1970,7 +1970,7 @@ void RTFGenerator::endTextBlock()
newParagraph();
DBG_RTF(t << "{\\comment endTextBlock}" << endl)
t << "}" << endl;
- m_omitParagraph = TRUE;
+ //m_omitParagraph = TRUE;
}
void RTFGenerator::newParagraph()
diff --git a/src/util.cpp b/src/util.cpp
index 75ca37f..494a333 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -467,9 +467,11 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
MemberDef *tmd=0;
for (;(tmd=mni.current());++mni)
{
- //printf("Found member %s scope=%p mContext=%p\n",tmd->name().data(),
- // tmd->getOuterScope(),mContext);
- if (tmd->isTypedef() && tmd->getOuterScope()==resScope)
+ //printf("Found member %s resScope=%s outerScope=%s mContext=%p\n",
+ // tmd->name().data(), resScope->name().data(),
+ // tmd->getOuterScope()->name().data(), mContext);
+ if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
+ /*! TODO: look if resScope is visible within tmd->getOuterScope() */
{
md=tmd;
}
@@ -2739,6 +2741,10 @@ bool generateLink(OutputDocInterface &od,const char *clName,
{
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(),
compound->getOutputFileBase(),anchor,linkText);
if (!compound->isReference())
@@ -2761,6 +2767,7 @@ bool generateLink(OutputDocInterface &od,const char *clName,
void generateFileRef(OutputDocInterface &od,const char *name,const char *text)
{
+ //printf("generateFileRef(%s,%s)\n",name,text);
QCString linkText = text ? text : name;
//FileInfo *fi;
FileDef *fd;
@@ -3581,7 +3588,8 @@ found:
//----------------------------------------------------------------------------
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 QList<ListItemInfo> *sli,
GroupDef *gd,
@@ -3634,7 +3642,7 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
pageName=pi->name.lower();
//setFileNameForSections(anchors,pageName,pi);
pi->fileName = pageName;
- pi->addSections(anchors);
+ //pi->addSections(anchors);
//printf("Appending page `%s'\n",baseName.data());
Doxygen::pageSDict->append(baseName,pi);
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 25ca501..86cd12f 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -978,14 +978,16 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd->name(),0,cd->documentation());
t << " </detaileddescription>" << endl;
- DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
+ DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance,
+ Config_getBool("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial())
{
t << " <inheritancegraph>" << endl;
inheritanceGraph.writeXML(t);
t << " </inheritancegraph>" << endl;
}
- DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
+ DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation,
+ Config_getBool("MAX_DOT_GRAPH_DEPTH"));
if (!collaborationGraph.isTrivial())
{
t << " <collaborationgraph>" << endl;