summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2001-08-19 18:13:14 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2001-08-19 18:13:14 (GMT)
commit8f7c9d9ba3b6c4e87c87deb6775d4bf642939e77 (patch)
tree3ff0575884709cdc92f9e462441672f3549ab054 /src
parentb5cbb79d114ed13945bc882ac8eef1c2be967bbf (diff)
downloadDoxygen-8f7c9d9ba3b6c4e87c87deb6775d4bf642939e77.zip
Doxygen-8f7c9d9ba3b6c4e87c87deb6775d4bf642939e77.tar.gz
Doxygen-8f7c9d9ba3b6c4e87c87deb6775d4bf642939e77.tar.bz2
Release-1.2.9-20010819
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp4
-rw-r--r--src/code.l8
-rw-r--r--src/config.l18
-rw-r--r--src/doc.l106
-rw-r--r--src/dot.cpp20
-rw-r--r--src/dot.h2
-rw-r--r--src/doxygen.cpp27
-rw-r--r--src/doxygen.h2
-rw-r--r--src/htmlgen.cpp33
-rw-r--r--src/htmlgen.h9
-rw-r--r--src/lang_cfg.h23
-rw-r--r--src/language.cpp93
-rw-r--r--src/latexgen.cpp41
-rw-r--r--src/latexgen.h9
-rw-r--r--src/mangen.cpp12
-rw-r--r--src/mangen.h8
-rw-r--r--src/memberdef.cpp41
-rw-r--r--src/memberdef.h2
-rw-r--r--src/memberlist.cpp117
-rw-r--r--src/outputgen.h11
-rw-r--r--src/outputlist.cpp1
-rw-r--r--src/outputlist.h9
-rw-r--r--src/rtfgen.cpp50
-rw-r--r--src/rtfgen.h8
-rw-r--r--src/scanner.l37
-rw-r--r--src/translator_it.h37
-rw-r--r--src/translator_ru.h32
-rw-r--r--src/xmlgen.cpp48
28 files changed, 642 insertions, 166 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 5f93e7a..ebb22e4 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1072,7 +1072,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write examples
if (exampleFlag)
{
- ol.startDescList();
+ ol.startDescList(BaseOutputDocInterface::Examples);
ol.startBold();
parseText(ol,theTranslator->trExamples()+": ");
ol.endBold();
@@ -1199,6 +1199,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
{
msg("Generating docs for nested compound %s...\n",innerCd->name().data());
innerCd->writeDocumentation(ol);
+ innerCd->writeMemberList(ol);
}
}
}
@@ -1541,6 +1542,7 @@ bool ClassDef::isLinkableInProject() const
{
return !name().isEmpty() && /* no name */
//m_isTemplBaseClass==-1 && /* template base class */
+ !m_artificial &&
name().find('@')==-1 && /* anonymous compound */
(m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && /* private */
hasDocumentation() && /* documented */
diff --git a/src/code.l b/src/code.l
index 1c6506c..c07841b 100644
--- a/src/code.l
+++ b/src/code.l
@@ -36,8 +36,8 @@
#define YY_NEVER_INTERACTIVE 1
-#define SCOPEBLOCK (void *)1
-#define INNERBLOCK (void *)2
+#define SCOPEBLOCK (int *)4
+#define INNERBLOCK (int *)8
/*! local class definition, used for classes that are defined
* inside code fragments.
@@ -109,7 +109,7 @@ static QCString g_parmName;
static bool g_inClass;
static QCString g_classScope;
static QCString g_realScope;
-static QStack<void> g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks
+static QStack<int> g_scopeStack; // 1 if bracket starts a scope, 2 for internal blocks
static CodeClassDef g_ccd;
static CodeVarDef g_cvd;
static bool g_exampleBlock;
@@ -939,7 +939,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
}
else
{
- g_scopeStack.push((void *)2);
+ g_scopeStack.push(INNERBLOCK);
}
BEGIN( Body );
}
diff --git a/src/config.l b/src/config.l
index cdaeb66..6725e9d 100644
--- a/src/config.l
+++ b/src/config.l
@@ -1413,11 +1413,6 @@ void Config::create()
"Doxygen uses this value to replace tabs by spaces in code fragments. \n",
1,16,8
);
- cl = addList(
- "ENABLED_SECTIONS",
- "The ENABLED_SECTIONS tag can be used to enable conditional \n"
- "documentation sections, marked by \\if sectionname ... \\endif. \n"
- );
cb = addBool(
"GENERATE_TODOLIST",
"The GENERATE_TODOLIST tag can be used to enable (YES) or \n"
@@ -1448,6 +1443,11 @@ void Config::create()
"will result in a user defined paragraph with heading \"Side Effects:\". \n"
"You can put \\n's in the value part of an alias to insert newlines. \n"
);
+ cl = addList(
+ "ENABLED_SECTIONS",
+ "The ENABLED_SECTIONS tag can be used to enable conditional \n"
+ "documentation sections, marked by \\if sectionname ... \\endif. \n"
+ );
ci = addInt(
"MAX_INITIALIZER_LINES",
"The MAX_INITIALIZER_LINES tag determines the maximum number of lines \n"
@@ -2076,6 +2076,14 @@ void Config::create()
);
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("HAVE_DOT");
+ cl = addList(
+ "DOTFILE_DIRS",
+ "The DOTFILE_DIRS tag can be used to specify one or more directories that \n"
+ "contain dot files that are included in the documentation (see the \n"
+ "\\dotfile command). \n"
+ );
+ cl->setWidgetType(ConfigList::Dir);
+ cl->addDependency("HAVE_DOT");
ci = addInt(
"MAX_DOT_GRAPH_WIDTH",
"The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width \n"
diff --git a/src/doc.l b/src/doc.l
index 683c219..0b25480 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -95,6 +95,8 @@ static bool insidePre = FALSE;
static int depthIf;
static QCString curImageName;
static QCString curImageCaption;
+static QCString curDotFileName;
+static QCString curDotFileCaption;
static QCString internalRefFile;
static QCString internalRefAnchor;
static QStack<char> currentListIndent; // indent stack of all list items
@@ -674,9 +676,10 @@ enum ImageTypes
IT_RTF
};
-// search for an image in the imageNameDict and if found
-// copies the image to the output directory (which is the
-// html directory if type==0 or the latex directory if type==1)
+/*! search for an image in the imageNameDict and if found
+ * copies the image to the output directory (which is the
+ * html directory if type==0 or the latex directory if type==1)
+ */
static QCString findAndCopyImage(const char *fileName,ImageTypes type)
{
QCString result;
@@ -794,6 +797,39 @@ void writeImage(ImageTypes it,const char *size)
outDoc->popGeneratorState();
}
+// search for a dot file in the dotFileNameDict, and if found
+// generates the graph in the output directories.
+static void writeDotFile(const char *fileName, const char *captionText)
+{
+ bool ambig;
+ FileDef *fd;
+ bool hasCaption = captionText!=0;
+
+ if ((fd=findFileDef(Doxygen::dotFileNameDict,fileName,ambig)))
+ {
+ outDoc->startDotFile(fd->absFilePath(),hasCaption);
+ if (hasCaption)
+ {
+ scanString(captionText);
+ }
+ outDoc->endDotFile(hasCaption);
+ }
+ else if (ambig)
+ {
+ QCString text;
+ text.sprintf("Warning: dot file name %s is ambigious.\n",fileName);
+ text+="Possible candidates:\n";
+ text+=showFileDefMatches(Doxygen::dotFileNameDict,fileName);
+ warn(yyFileName,yyLineNr,text);
+ }
+ else
+ {
+ warn(yyFileName,yyLineNr,
+ "Warning: dot file %s is not found in DOTFILE_DIRS! ",fileName
+ );
+ }
+}
+
/* ----------------------------------------------------------------- */
#undef YY_INPUT
@@ -928,6 +964,8 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
%x DocLatexImageOpt
%x DocRtfImageName
%x DocRtfImageOpt
+%x DocDotFile
+%x DocDotFileOpt
%%
@@ -1131,7 +1169,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (b) endBlock();
inParBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Par);
outDoc->startBold();
outDoc->docify(title);
outDoc->endBold();
@@ -1151,7 +1189,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inWarningBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Warning);
outDoc->startBold();
scanString(theTranslator->trWarning()+": ");
outDoc->endBold();
@@ -1170,7 +1208,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inRemarkBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Remark);
outDoc->startBold();
scanString(theTranslator->trRemarks()+": ");
outDoc->endBold();
@@ -1189,7 +1227,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inAttentionBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Attention);
outDoc->startBold();
scanString(theTranslator->trAttention()+": ");
outDoc->endBold();
@@ -1208,7 +1246,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inNoteBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Note);
outDoc->startBold();
scanString(theTranslator->trNote()+": ");
outDoc->endBold();
@@ -1227,7 +1265,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inPreBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Pre);
outDoc->startBold();
scanString(theTranslator->trPrecondition()+": ");
outDoc->endBold();
@@ -1246,7 +1284,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inPostBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Post);
outDoc->startBold();
scanString(theTranslator->trPostcondition()+": ");
outDoc->endBold();
@@ -1265,7 +1303,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inInvarBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Invar);
outDoc->startBold();
scanString(theTranslator->trInvariant()+": ");
outDoc->endBold();
@@ -1284,7 +1322,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inVersionBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Version);
outDoc->startBold();
scanString(theTranslator->trVersion()+": ");
outDoc->endBold();
@@ -1303,7 +1341,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inSinceBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Since);
outDoc->startBold();
scanString(theTranslator->trSince()+": ");
outDoc->endBold();
@@ -1322,7 +1360,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inDateBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Date);
outDoc->startBold();
scanString(theTranslator->trDate()+": ");
outDoc->endBold();
@@ -1345,7 +1383,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Todo);
outDoc->startBold();
outDoc->writeObjectLink(0,"todo",item->listAnchor,theTranslator->trTodo()+": ");
outDoc->endBold();
@@ -1367,7 +1405,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Test);
outDoc->startBold();
outDoc->writeObjectLink(0,"test",item->listAnchor,theTranslator->trTest()+": ");
outDoc->endBold();
@@ -1389,7 +1427,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Bug);
outDoc->startBold();
outDoc->writeObjectLink(0,"bug",item->listAnchor,theTranslator->trBug()+": ");
outDoc->endBold();
@@ -1407,7 +1445,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inDeprecatedBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Deprecated);
outDoc->startBold();
scanString(theTranslator->trDeprecated()+": ");
outDoc->endBold();
@@ -1428,7 +1466,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
endArgumentList();
if (inBlock()) endBlock();
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::RCS);
outDoc->startBold();
scanString(tagName+": ");
outDoc->endBold();
@@ -1445,7 +1483,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inAuthorBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Author);
outDoc->startBold();
bool singular = ((QString)yytext).find('s')==-1;
scanString(theTranslator->trAuthor(TRUE,singular)+": ");
@@ -1465,7 +1503,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inReturnBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::Return);
outDoc->startBold();
scanString(theTranslator->trReturns()+": ");
outDoc->endBold();
@@ -1480,7 +1518,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock();
inSeeBlock=TRUE;
currentListIndent.push("D");
- outDoc->startDescList();
+ outDoc->startDescList(BaseOutputDocInterface::See);
outDoc->startBold();
scanString(theTranslator->trSeeAlso()+": ");
outDoc->endBold();
@@ -1832,6 +1870,30 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->enableAll();
BEGIN(DocScan);
}
+<DocScan>{CMD}"dotfile"{B}* {
+ BEGIN(DocDotFile);
+ }
+<DocDotFile>{FILE} {
+ curDotFileName = stripQuotes(yytext);
+ curDotFileCaption.resize(0);
+ if (curDotFileName.isEmpty())
+ {
+ BEGIN(DocScan);
+ }
+ else
+ {
+ BEGIN(DocDotFileOpt);
+ }
+ }
+<DocDotFileOpt>\n {
+ writeDotFile(curDotFileName,curDotFileCaption);
+ BEGIN(DocScan);
+ }
+<DocDotFileOpt>\"[^\n"]*\" {
+ curDotFileCaption = stripQuotes(yytext);
+ writeDotFile(curDotFileName,curDotFileCaption);
+ BEGIN(DocScan);
+ }
<DocScan>{CMD}"code"({BN}*"\n"|{B}*) {
outDoc->startCodeFragment();
codeBlock.resize(0);
diff --git a/src/dot.cpp b/src/dot.cpp
index bd13f75..e9b739b 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1506,3 +1506,23 @@ void generateGraphLegend(const char *path)
QDir::setCurrent(oldDir);
}
+
+void writeDotGraphFromFile(const char *inFile,const char *outFile,
+ GraphOutputFormat format)
+{
+ QCString dotArgs(4096);
+ if (format==GIF)
+ {
+ dotArgs.sprintf("-Tgif \"%s\" -o \"%s.gif\"",inFile,outFile);
+ }
+ else // format==EPS
+ {
+ dotArgs.sprintf("-Tps \"%s\" -o \"%s.eps\"",inFile,outFile);
+ }
+ QCString dotExe = Config_getString("DOT_PATH")+"dot";
+ //printf("Running: %s %s\n",dotExe.data(),dotArgs.data());
+ if (iSystem(dotExe,dotArgs)!=0)
+ {
+ err("Problems running dot. Check your installation!\n");
+ }
+}
diff --git a/src/dot.h b/src/dot.h
index 9b64998..7539dbe 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -160,4 +160,6 @@ class DotInclDepGraph
};
void generateGraphLegend(const char *path);
+void writeDotGraphFromFile(const char *inFile,const char *outFile,
+ GraphOutputFormat format);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 6771f9c..b0d7dab 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -98,7 +98,7 @@ StringDict Doxygen::aliasDict(257); // aliases
FileNameDict *Doxygen::includeNameDict; // include names
FileNameDict *Doxygen::exampleNameDict; // examples
FileNameDict *Doxygen::imageNameDict; // images
-//TypedefDict Doxygen::typedefDict(1009); // all typedefs
+FileNameDict *Doxygen::dotFileNameDict; // dot files
StringDict Doxygen::namespaceAliasDict(257); // all namespace aliases
StringDict Doxygen::tagDestinationDict(257); // all tag locations
// a member group
@@ -140,7 +140,7 @@ void clearAll()
Doxygen::includeNameDict->clear();
Doxygen::exampleNameDict->clear();
Doxygen::imageNameDict->clear();
- //Doxygen::typedefDict.clear();
+ Doxygen::dotFileNameDict->clear();
Doxygen::groupDict.clear();
Doxygen::formulaDict.clear();
Doxygen::formulaNameDict.clear();
@@ -159,8 +159,8 @@ void statistics()
Doxygen::exampleNameDict->statistics();
fprintf(stderr,"--- imageNameDict stats ----\n");
Doxygen::imageNameDict->statistics();
- //fprintf(stderr,"--- classDict stats ----\n");
- //Doxygen::classSDict.statistics();
+ fprintf(stderr,"--- dotFileNameDict stats ----\n");
+ Doxygen::dotFileNameDict->statistics();
fprintf(stderr,"--- namespaceDict stats ----\n");
Doxygen::namespaceDict.statistics();
fprintf(stderr,"--- memberNameDict stats ----\n");
@@ -6698,10 +6698,11 @@ void readConfiguration(int argc, char **argv)
void parseInput()
{
- Doxygen::inputNameDict = new FileNameDict(1009);
- Doxygen::includeNameDict = new FileNameDict(1009);
- Doxygen::exampleNameDict = new FileNameDict(1009);
- Doxygen::imageNameDict = new FileNameDict(257);
+ Doxygen::inputNameDict = new FileNameDict(1009);
+ Doxygen::includeNameDict = new FileNameDict(1009);
+ Doxygen::exampleNameDict = new FileNameDict(1009);
+ Doxygen::imageNameDict = new FileNameDict(257);
+ Doxygen::dotFileNameDict = new FileNameDict(257);
if (!Config_getString("DOC_URL").isEmpty())
{
@@ -6768,6 +6769,16 @@ void parseInput()
s=imagePathList.next();
}
+ msg("Searching for dot files...\n");
+ QStrList &dotFileList=Config_getList("DOTFILE_DIRS");
+ s=dotFileList.first();
+ while (s)
+ {
+ readFileOrDirectory(s,0,Doxygen::dotFileNameDict,0,0,
+ 0,0,0);
+ s=dotFileList.next();
+ }
+
msg("Searching for files to exclude\n");
QStrList &excludeList = Config_getList("EXCLUDE");
s=excludeList.first();
diff --git a/src/doxygen.h b/src/doxygen.h
index 8b80676..de5372d 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -68,6 +68,7 @@ class Doxygen
static FileNameDict *exampleNameDict;
static FileNameDict *inputNameDict;
static FileNameDict *imageNameDict;
+ static FileNameDict *dotFileNameDict;
static QStrList tagfileList;
static MemberNameList memberNameList;
static MemberNameList functionNameList;
@@ -79,7 +80,6 @@ class Doxygen
static QTextStream tagFile;
static SectionDict sectionDict;
static FileNameList inputNameList;
- //static TypedefDict typedefDict;
static StringDict namespaceAliasDict;
static GroupList groupList;
static GroupDict groupDict;
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index a69d631..568906a 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -858,6 +858,39 @@ void HtmlGenerator::endImage(bool hasCaption)
t << "</div>" << endl;
}
+void HtmlGenerator::startDotFile(const char *name,bool hasCaption)
+{
+ QCString baseName=name;
+ int i;
+ if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
+ {
+ baseName=baseName.right(baseName.length()-i-1);
+ }
+ QCString outName = Config_getString("HTML_OUTPUT")+
+#ifdef _WIN32
+ "\\"
+#else
+ "/"
+#endif
+ +baseName;
+ writeDotGraphFromFile(name,outName,GIF);
+ t << "<div align=\"center\">" << endl;
+ t << "<img src=\"" << baseName << ".gif\" alt=\"" << baseName << "\">" << endl;
+ if (hasCaption)
+ {
+ t << "<p><strong>";
+ }
+}
+
+void HtmlGenerator::endDotFile(bool hasCaption)
+{
+ if (hasCaption)
+ {
+ t << "</strong></p>" << endl;
+ }
+ t << "</div>" << endl;
+}
+
void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *)
{
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 6f60593..dd58281 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -176,11 +176,10 @@ class HtmlGenerator : public OutputGenerator
void writeRing(char c) { t << "&" << c << "ring;"; }
void writeSharpS() { t << "&szlig;"; }
void writeCCedil(char c) { t << "&" << c << "cedil;"; }
- void startDescList() { t << "<dl compact><dt><b>" << endl; }
+ void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; }
void endDescList() { t << "</dl>"; }
- void startParamList(ParamListTypes)
- { startDescList(); }
- void endParamList() { endDescList(); }
+ void startParamList(ParamListTypes) { t << "<dl compact><dt><b>" << endl; }
+ void endParamList() { t << "</dl>"; }
void endDescTitle() { t << "</b>"; }
void writeDescItem() { t << "<dd>" << endl; }
void startSection(const char *,const char *,bool);
@@ -204,6 +203,8 @@ class HtmlGenerator : public OutputGenerator
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
+ void startDotFile(const char *,bool);
+ void endDotFile(bool);
void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; }
diff --git a/src/lang_cfg.h b/src/lang_cfg.h
new file mode 100644
index 0000000..581905b
--- /dev/null
+++ b/src/lang_cfg.h
@@ -0,0 +1,23 @@
+#define LANG_NL
+#define LANG_SE
+#define LANG_CZ
+#define LANG_FR
+#define LANG_IT
+#define LANG_DE
+#define LANG_JP
+#define LANG_ES
+#define LANG_FI
+#define LANG_RU
+#define LANG_HR
+#define LANG_PL
+#define LANG_PT
+#define LANG_HU
+#define LANG_KR
+#define LANG_RO
+#define LANG_SI
+#define LANG_CN
+#define LANG_NO
+#define LANG_BR
+#define LANG_DK
+#define LANG_SK
+#define LANG_UA
diff --git a/src/language.cpp b/src/language.cpp
index 4f804f2..33da153 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -17,34 +17,81 @@
#include "message.h"
#include "language.h"
+#include "lang_cfg.h"
#include "translator.h"
#include "translator_en.h"
#if !defined(ENGLISH_ONLY)
#include "translator_adapter.h"
+#ifdef LANG_NL
#include "translator_nl.h"
+#endif
+#ifdef LANG_SE
#include "translator_se.h"
+#endif
+#ifdef LANG_CZ
#include "translator_cz.h"
+#endif
+#ifdef LANG_FR
#include "translator_fr.h"
+#endif
+#ifdef LANG_IT
#include "translator_it.h"
+#endif
+#ifdef LANG_DE
#include "translator_de.h"
+#endif
+#ifdef LANG_JP
#include "translator_jp.h"
+#endif
+#ifdef LANG_ES
#include "translator_es.h"
+#endif
+#ifdef LANG_FI
#include "translator_fi.h"
+#endif
+#ifdef LANG_RU
#include "translator_ru.h"
+#endif
+#ifdef LANG_HR
#include "translator_hr.h"
+#endif
+#ifdef LANG_PL
#include "translator_pl.h"
+#endif
+#ifdef LANG_PT
#include "translator_pt.h"
+#endif
+#ifdef LANG_HU
#include "translator_hu.h"
+#endif
+#ifdef LANG_KR
#include "translator_kr.h"
+#endif
+#ifdef LANG_RO
#include "translator_ro.h"
+#endif
+#ifdef LANG_SI
#include "translator_si.h"
+#endif
+#ifdef LANG_CN
#include "translator_cn.h"
+#endif
+#ifdef LANG_NO
#include "translator_no.h"
+#endif
+#ifdef LANG_BR
#include "translator_br.h"
+#endif
+#ifdef LANG_DK
#include "translator_dk.h"
+#endif
+#ifdef LANG_SK
#include "translator_sk.h"
+#endif
+#ifdef LANG_UA
#include "translator_ua.h"
#endif
+#endif
#define L_EQUAL(a) !stricmp(langName,a)
@@ -57,99 +104,145 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorEnglish;
}
#if !defined(ENGLISH_ONLY)
+#ifdef LANG_NL
else if (L_EQUAL("dutch"))
{
theTranslator=new TranslatorDutch;
}
+#endif
+#ifdef LANG_SE
else if (L_EQUAL("swedish"))
{
theTranslator=new TranslatorSwedish;
}
+#endif
+#ifdef LANG_CZ
else if (L_EQUAL("czech"))
{
theTranslator=new TranslatorCzech;
}
+#endif
+#ifdef LANG_FR
else if (L_EQUAL("french"))
{
theTranslator=new TranslatorFrench;
}
+#endif
+#ifdef LANG_IT
else if (L_EQUAL("italian"))
{
theTranslator=new TranslatorItalian;
}
+#endif
+#ifdef LANG_DE
else if (L_EQUAL("german"))
{
theTranslator=new TranslatorGerman;
}
+#endif
+#ifdef LANG_JP
else if (L_EQUAL("japanese"))
{
theTranslator=new TranslatorJapanese;
}
+#endif
+#ifdef LANG_ES
else if (L_EQUAL("spanish"))
{
theTranslator=new TranslatorSpanish;
}
+#endif
+#ifdef LANG_FI
else if (L_EQUAL("finnish"))
{
theTranslator=new TranslatorFinnish;
}
+#endif
+#ifdef LANG_RU
else if (L_EQUAL("russian"))
{
theTranslator=new TranslatorRussian;
}
+#endif
+#ifdef LANG_HR
else if (L_EQUAL("croatian"))
{
theTranslator=new TranslatorCroatian;
}
+#endif
+#ifdef LANG_PL
else if (L_EQUAL("polish"))
{
theTranslator=new TranslatorPolish;
}
+#endif
+#ifdef LANG_PT
else if (L_EQUAL("portuguese"))
{
theTranslator=new TranslatorPortuguese;
}
+#endif
+#ifdef LANG_HU
else if (L_EQUAL("hungarian"))
{
theTranslator=new TranslatorHungarian;
}
+#endif
+#ifdef LANG_KR
else if (L_EQUAL("korean"))
{
theTranslator=new TranslatorKorean;
}
+#endif
+#ifdef LANG_RO
else if (L_EQUAL("romanian"))
{
theTranslator=new TranslatorRomanian;
}
+#endif
+#ifdef LANG_SI
else if (L_EQUAL("slovene"))
{
theTranslator=new TranslatorSlovene;
}
+#endif
+#ifdef LANG_CN
else if (L_EQUAL("chinese"))
{
theTranslator=new TranslatorChinese;
}
+#endif
+#ifdef LANG_NO
else if (L_EQUAL("norwegian"))
{
theTranslator=new TranslatorNorwegian;
}
+#endif
+#ifdef LANG_BR
else if (L_EQUAL("brazilian"))
{
theTranslator=new TranslatorBrazilian;
}
+#endif
+#ifdef LANG_DK
else if (L_EQUAL("danish"))
{
theTranslator=new TranslatorDanish;
}
+#endif
+#ifdef LANG_SK
else if (L_EQUAL("slovak"))
{
theTranslator=new TranslatorSlovak;
}
+#endif
+#ifdef LANG_UA
else if (L_EQUAL("ukrainian"))
{
theTranslator=new TranslatorUkrainian;
}
#endif
+#endif
else // use the default language (i.e. english)
{
theTranslator=new TranslatorEnglish;
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 7ffa258..7e072ac 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -223,8 +223,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
"\\usepackage{fancyhdr}\n"
"\\usepackage{graphicx}\n"
"\\usepackage{float}\n"
- "\\usepackage{alltt}\n"
- "\\usepackage{doxygen}\n";
+ "\\usepackage{alltt}\n";
if (Config_getBool("PDF_HYPERLINKS"))
{
t << "\\usepackage{times}" << endl;
@@ -254,6 +253,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
t << sLanguageSupportCommand;
}
+ t << "\\usepackage{doxygen}\n";
QStrList &extraPackages = Config_getList("EXTRA_PACKAGES");
const char *s=extraPackages.first();
while (s)
@@ -1553,6 +1553,43 @@ void LatexGenerator::endImage(bool hasCaption)
}
}
+void LatexGenerator::startDotFile(const char *name,bool hasCaption)
+{
+ QCString baseName=name;
+ int i;
+ if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
+ {
+ baseName=baseName.right(baseName.length()-i-1);
+ }
+ QCString outName = Config_getString("LATEX_OUTPUT")+
+#ifdef _WIN32
+ "\\"
+#else
+ "/"
+#endif
+ +baseName;
+ writeDotGraphFromFile(name,outName,EPS);
+ if (hasCaption)
+ t << "\\begin{figure}[H]" << endl;
+ else
+ t << "\\mbox{";
+ t << "\\includegraphics";
+ t << "{" << baseName << ".eps}";
+ if (hasCaption)
+ t << "\\caption{";
+ else
+ t << "}" << endl;
+}
+
+void LatexGenerator::endDotFile(bool hasCaption)
+{
+ if (hasCaption)
+ {
+ t << "}" << endl;
+ t << "\\end{figure}" << endl;
+ }
+}
+
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
diff --git a/src/latexgen.h b/src/latexgen.h
index 51d2b61..c527e6f 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -183,11 +183,10 @@ class LatexGenerator : public OutputGenerator
void writeCCedil(char c) { t << "\\c{" << c << "}"; }
void startMemberDescription() { t << "\\begin{CompactList}\\small\\item\\em "; }
void endMemberDescription() { t << "\\item\\end{CompactList}"; }
- void startDescList() { t << "\\begin{Desc}\n\\item["; }
+ void startDescList(SectionTypes) { t << "\\begin{Desc}\n\\item["; }
void endDescList() { t << "\\end{Desc}" << endl; }
- void startParamList(ParamListTypes)
- { startDescList(); }
- void endParamList() { endDescList(); }
+ void startParamList(ParamListTypes) { t << "\\begin{Desc}\n\\item["; }
+ void endParamList() { t << "\\end{Desc}" << endl; }
void endDescTitle() { t << "]"; }
void writeDescItem() { t << "\\par" << endl; }
void startSection(const char *,const char *,bool);
@@ -212,6 +211,8 @@ class LatexGenerator : public OutputGenerator
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
+ void startDotFile(const char *,bool);
+ void endDotFile(bool);
void startDescTable()
{ t << "\\begin{description}" << endl; }
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 36d23e1..b721a44 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -308,7 +308,17 @@ void ManGenerator::writeChar(char c)
paragraph=FALSE;
}
-void ManGenerator::startDescList()
+void ManGenerator::startDescList(SectionTypes)
+{
+ if (!firstCol)
+ { t << endl << ".PP" << endl;
+ firstCol=TRUE; paragraph=TRUE;
+ col=0;
+ }
+ paragraph=FALSE;
+}
+
+void ManGenerator::startParamList(ParamListTypes)
{
if (!firstCol)
{ t << endl << ".PP" << endl;
diff --git a/src/mangen.h b/src/mangen.h
index 4a03abb..30fdea0 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -170,10 +170,10 @@ class ManGenerator : public OutputGenerator
firstCol=FALSE; }
void startMemberDescription() { t << "\n.RI \"\\fI"; firstCol=FALSE; }
void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; }
- void startDescList();
+ void startDescList(SectionTypes);
void endDescList() {}
- void startParamList(ParamListTypes) { startDescList(); }
- void endParamList() { endDescList(); }
+ void startParamList(ParamListTypes);
+ void endParamList() {}
void endDescTitle();
void writeDescItem();
void startSection(const char *,const char *,bool);
@@ -198,6 +198,8 @@ class ManGenerator : public OutputGenerator
void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) t << " "; }
void startImage(const char *,const char *,bool) {}
void endImage(bool) {}
+ void startDotFile(const char *,bool) {}
+ void endDotFile(bool) {}
void startDescTable() {}
void endDescTable() {}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index f230ea6..4341c52 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -813,8 +813,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
linkifyText(TextGeneratorOLImpl(ol),cname,name(),bitfields.simplifyWhiteSpace());
}
- else if (!init.isEmpty() && initLines==0 && // one line initializer
- ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
+ else if (hasOneLineInitializer()
+ //!init.isEmpty() && initLines==0 && // one line initializer
+ //((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
) // add initializer
{
if (!isDefine())
@@ -889,7 +890,8 @@ bool MemberDef::isDetailedSectionLinkable() const
)
) ||
// has a multi-line initialization block
- (initLines>0 && initLines<maxInitLines) ||
+ //(initLines>0 && initLines<maxInitLines) ||
+ hasMultiLineInitializer() ||
// has one or more documented arguments
(argList!=0 && argList->hasDocumentation());
@@ -1081,8 +1083,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.startMemberDocName();
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef);
writeDefArgumentList(ol,cd,scopeName,this);
- if (!init.isEmpty() && initLines==0 && // one line initializer
- ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
+ if (hasOneLineInitializer()
+ //!init.isEmpty() && initLines==0 && // one line initializer
+ // ((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
) // add initializer
{
if (!isDefine())
@@ -1160,9 +1163,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.popGeneratorState();
/* write multi-line initializer (if any) */
- if (initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
- || initLines<userInitLines // explicitly enabled
- )
+ if (hasMultiLineInitializer()
+ //initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
+ // || initLines<userInitLines // explicitly enabled
+ // )
)
{
//printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data());
@@ -1205,10 +1209,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (argList && argList->hasDocumentation())
{
//printf("***** argumentList is documented\n");
- ol.startDescList();
- ol.startBold();
+ ol.startParamList(BaseOutputDocInterface::Param);
parseText(ol,theTranslator->trParameters()+": ");
- ol.endBold();
ol.endDescTitle();
ol.writeDescItem();
ol.startDescTable();
@@ -1244,7 +1246,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (first)
{
//ol.newParagraph();
- ol.startDescList();
+ ol.startDescList(BaseOutputDocInterface::EnumValues);
ol.startBold();
parseText(ol,theTranslator->trEnumerationValues());
ol.docify(":");
@@ -1441,7 +1443,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// write the list of examples that use this member
if (hasExamples())
{
- ol.startDescList();
+ ol.startDescList(BaseOutputDocInterface::Examples);
ol.startBold();
parseText(ol,theTranslator->trExamples()+": ");
//ol.writeBoldString("Examples: ");
@@ -1637,3 +1639,16 @@ MemberDef *MemberDef::createTemplateInstanceMember(
return imd;
}
+bool MemberDef::hasOneLineInitializer() const
+{
+ return !init.isEmpty() && initLines==0 && // one line initializer
+ ((maxInitLines>0 && userInitLines==-1) || userInitLines>0); // enabled by default or explicitly
+}
+
+bool MemberDef::hasMultiLineInitializer() const
+{
+ return initLines>0 &&
+ ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
+ || initLines<userInitLines // explicitly enabled
+ );
+}
diff --git a/src/memberdef.h b/src/memberdef.h
index 7e8c773..9b9280e 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -119,6 +119,8 @@ class MemberDef : public Definition
bool isExplicit() const { return (memSpec&Entry::Explicit)!=0; }
bool isMutable() const { return (memSpec&Entry::Mutable)!=0; }
bool isExternal() const { return explExt; }
+ bool hasOneLineInitializer() const;
+ bool hasMultiLineInitializer() const;
// output info
bool isLinkableInProject() const;
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 6e1b4fd..c591ffc 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -228,67 +228,92 @@ void MemberList::writePlainDeclarations(OutputList &ol,
int enumMemCount=0;
- uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE");
- typeDecl.docify("{ ");
QList<MemberDef> *fmdl=md->enumFieldList();
+ uint numVisibleEnumValues=0;
if (fmdl)
{
MemberDef *fmd=fmdl->first();
while (fmd)
{
- /* in html we start a new line after a number of items */
- if (fmdl->count()>enumValuesPerLine
- && (enumMemCount%enumValuesPerLine)==0
- )
+ if (fmd->isBriefSectionVisible()) numVisibleEnumValues++;
+ fmd=fmdl->next();
+ }
+ }
+ if (numVisibleEnumValues==0 && !md->isBriefSectionVisible()) break;
+ if (numVisibleEnumValues>0)
+ {
+ uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE");
+ typeDecl.docify("{ ");
+ if (fmdl)
+ {
+ MemberDef *fmd=fmdl->first();
+ bool fmdVisible = fmd->isBriefSectionVisible();
+ while (fmd)
{
- typeDecl.pushGeneratorState();
- typeDecl.disableAllBut(OutputGenerator::Html);
- typeDecl.lineBreak();
- typeDecl.writeString("&nbsp;&nbsp;");
- typeDecl.popGeneratorState();
- }
+ /* in html we start a new line after a number of items */
+ if (numVisibleEnumValues>enumValuesPerLine
+ && (enumMemCount%enumValuesPerLine)==0
+ )
+ {
+ typeDecl.pushGeneratorState();
+ typeDecl.disableAllBut(OutputGenerator::Html);
+ typeDecl.lineBreak();
+ typeDecl.writeString("&nbsp;&nbsp;");
+ typeDecl.popGeneratorState();
+ }
- if (fmd->hasDocumentation()) // enum value has docs
- {
- if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ if (fmdVisible)
{
- Doxygen::tagFile << " <member kind=\"enumvalue\">" << endl;
- Doxygen::tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl;
- Doxygen::tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
- Doxygen::tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
- Doxygen::tagFile << " </member>" << endl;
+ if (fmd->hasDocumentation()) // enum value has docs
+ {
+ if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ {
+ Doxygen::tagFile << " <member kind=\"enumvalue\">" << endl;
+ Doxygen::tagFile << " <name>" << convertToXML(fmd->name()) << "</name>" << endl;
+ Doxygen::tagFile << " <anchor>" << convertToXML(fmd->anchor()) << "</anchor>" << endl;
+ Doxygen::tagFile << " <arglist>" << convertToXML(fmd->argsString()) << "</arglist>" << endl;
+ Doxygen::tagFile << " </member>" << endl;
+ }
+ fmd->writeLink(typeDecl,cd,nd,fd,gd);
+ }
+ else // no docs for this enum value
+ {
+ typeDecl.startBold();
+ typeDecl.docify(fmd->name());
+ typeDecl.endBold();
+ }
+ if (fmd->hasOneLineInitializer()) // enum value has initializer
+ {
+ typeDecl.writeString(" = ");
+ parseText(typeDecl,fmd->initializer());
+ }
+ }
+
+ bool prevVisible = fmdVisible;
+ fmd=fmdl->next();
+ if (fmd && (fmdVisible=fmd->isBriefSectionVisible()))
+ {
+ typeDecl.writeString(", ");
+ }
+ if (prevVisible)
+ {
+ typeDecl.disable(OutputGenerator::Man);
+ typeDecl.writeString("\n"); // to prevent too long lines in LaTeX
+ typeDecl.enable(OutputGenerator::Man);
+ enumMemCount++;
}
- fmd->writeLink(typeDecl,cd,nd,fd,gd);
- }
- else // no docs for this enum value
- {
- typeDecl.startBold();
- typeDecl.docify(fmd->name());
- typeDecl.endBold();
}
- if (!fmd->initializer().isEmpty()) // enum value has initializer
+ if (numVisibleEnumValues>enumValuesPerLine)
{
- typeDecl.writeString(" = ");
- parseText(typeDecl,fmd->initializer());
+ typeDecl.pushGeneratorState();
+ typeDecl.disableAllBut(OutputGenerator::Html);
+ typeDecl.lineBreak();
+ typeDecl.popGeneratorState();
}
-
- fmd=fmdl->next();
- if (fmd) typeDecl.writeString(", ");
- typeDecl.disable(OutputGenerator::Man);
- typeDecl.writeString("\n"); // to prevent too long lines in LaTeX
- typeDecl.enable(OutputGenerator::Man);
- enumMemCount++;
- }
- if (fmdl->count()>enumValuesPerLine)
- {
- typeDecl.pushGeneratorState();
- typeDecl.disableAllBut(OutputGenerator::Html);
- typeDecl.lineBreak();
- typeDecl.popGeneratorState();
}
+ typeDecl.docify(" }");
+ md->setEnumDecl(typeDecl);
}
- typeDecl.docify(" }");
- md->setEnumDecl(typeDecl);
int enumVars=0;
MemberListIterator vmli(*this);
MemberDef *vmd;
diff --git a/src/outputgen.h b/src/outputgen.h
index 8d05ef5..8818a3e 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -41,6 +41,13 @@ class BaseOutputDocInterface
{
public:
enum ParamListTypes { Param, RetVal, Exception };
+ enum SectionTypes { See, Return, Author, Version,
+ Since, Date, Bug, Note,
+ Warning, Par, Deprecated, Pre,
+ Post, Invar, Remark, Attention,
+ Todo, Test, RCS, EnumValues,
+ Examples
+ };
/*! Start of a bullet list: e.g. \c <ul> in html. writeListItem() is
* Used for the bullet items.
@@ -207,7 +214,7 @@ class BaseOutputDocInterface
virtual void writeRing(char) = 0;
virtual void writeSharpS() = 0;
virtual void writeCCedil(char) = 0;
- virtual void startDescList() = 0;
+ virtual void startDescList(SectionTypes t) = 0;
virtual void endDescList() = 0;
virtual void startParamList(ParamListTypes t) = 0;
virtual void endParamList() = 0;
@@ -227,6 +234,8 @@ class BaseOutputDocInterface
virtual void writeNonBreakableSpace(int) = 0;
virtual void startImage(const char *,const char *,bool) = 0;
virtual void endImage(bool) = 0;
+ virtual void startDotFile(const char *,bool) = 0;
+ virtual void endDotFile(bool) = 0;
virtual void startDescTable() = 0;
virtual void endDescTable() = 0;
virtual void startDescTableTitle() = 0;
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 06d2ebc..9688dde 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -262,6 +262,7 @@ FORALL1(DotClassGraph &a1,a1)
FORALL1(DotInclDepGraph &a1,a1)
FORALL1(DotGfxHierarchyTable &a1,a1)
FORALL1(ParamListTypes a1,a1)
+FORALL1(SectionTypes a1,a1)
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
FORALL1(bool a1,a1)
FORALL2(bool a1,int a2,a1,a2)
diff --git a/src/outputlist.h b/src/outputlist.h
index b96fc80..96e07aa 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -306,8 +306,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberDescription); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
- void startDescList()
- { forall(&OutputGenerator::startDescList); }
+ void startDescList(SectionTypes t)
+ { forall(&OutputGenerator::startDescList,t); }
void endDescList()
{ forall(&OutputGenerator::endDescList); }
void startParamList(ParamListTypes t)
@@ -361,6 +361,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startImage,n,s,c); }
void endImage(bool c)
{ forall(&OutputGenerator::endImage,c); }
+ void startDotFile(const char *n,bool c)
+ { forall(&OutputGenerator::startDotFile,n,c); }
+ void endDotFile(bool c)
+ { forall(&OutputGenerator::endDotFile,c); }
void startDescTable()
{ forall(&OutputGenerator::startDescTable); }
@@ -456,6 +460,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO1(DotInclDepGraph &);
FORALLPROTO1(DotGfxHierarchyTable &);
FORALLPROTO1(ParamListTypes);
+ FORALLPROTO1(SectionTypes);
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
FORALLPROTO1(bool);
FORALLPROTO2(bool,int);
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index e79646b..e912f26 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1926,7 +1926,7 @@ void RTFGenerator::endMemberDescription()
t << "\\par}" << endl;
}
-void RTFGenerator::startDescList()
+void RTFGenerator::startDescList(SectionTypes)
{
DBG_RTF(t << "{\\comment (startDescList)}" << endl)
t << "{";
@@ -1942,6 +1942,24 @@ void RTFGenerator::endDescTitle()
t << Rtf_Style_Reset << Rtf_DList_DepthStyle();
}
+void RTFGenerator::startParamList(ParamListTypes)
+{
+ DBG_RTF(t << "{\\comment (startParamList)}" << endl)
+ t << "{";
+ newParagraph();
+}
+
+void RTFGenerator::endParamList()
+{
+ DBG_RTF(t << "{\\comment (endParamList)}" << endl)
+ newParagraph();
+ t << "}";
+ decrementIndentLevel();
+ m_omitParagraph = TRUE;
+ //t << Rtf_Style_Reset << styleStack.top() << endl;
+}
+
+
void RTFGenerator::writeDescItem()
{
DBG_RTF(t << "{\\comment (writeDescItem) }" << endl)
@@ -2209,6 +2227,36 @@ void RTFGenerator::endImage(bool)
// not yet implemented
}
+void RTFGenerator::startDotFile(const char *name,bool)
+{
+ QCString baseName=name;
+ int i;
+ if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
+ {
+ baseName=baseName.right(baseName.length()-i-1);
+ }
+ QCString outName = Config_getString("RTF_OUTPUT")+
+#ifdef _WIN32
+ "\\"
+#else
+ "/"
+#endif
+ +baseName;
+ writeDotGraphFromFile(name,outName,GIF);
+ newParagraph();
+ t << "{" << endl;
+ t << Rtf_Style_Reset << endl;
+ t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE ";
+ t << outName;
+ t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
+ t << "}" << endl;
+}
+
+void RTFGenerator::endDotFile(bool)
+{
+ // not yet implemented
+}
+
void RTFGenerator::startDescTable()
{
DBG_RTF(t << "{\\comment (startDescTable) }" << endl)
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 16d2b35..6e1209d 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -166,10 +166,10 @@ class RTFGenerator : public OutputGenerator
void startMemberDescription();
void endMemberDescription();
- void startDescList();
+ void startDescList(SectionTypes);
void endDescList();
- void startParamList(ParamListTypes) { startDescList(); }
- void endParamList() { endDescList(); }
+ void startParamList(ParamListTypes);
+ void endParamList();
void endDescTitle();
void writeDescItem();
void startSection(const char *,const char *,bool);
@@ -194,6 +194,8 @@ class RTFGenerator : public OutputGenerator
void writeNonBreakableSpace(int);
void startImage(const char *,const char *,bool);
void endImage(bool);
+ void startDotFile(const char *,bool);
+ void endDotFile(bool);
void startDescTable();
void endDescTable();
diff --git a/src/scanner.l b/src/scanner.l
index 52326e8..6d49da4 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -149,6 +149,7 @@ static bool insideFormula;
static bool insideTryBlock=FALSE;
static int depthIf;
+static int initializerSharpCount;
//-----------------------------------------------------------------------------
@@ -1320,6 +1321,7 @@ TITLE [tT][iI][tT][lL][eE]
<FindMembers>"=" {
current->bodyLine = yyLineNr;
lastInitializerContext = YY_START;
+ initializerSharpCount=0;
BEGIN(ReadInitializer);
}
/* Read initializer rules */
@@ -1339,8 +1341,15 @@ TITLE [tT][iI][tT][lL][eE]
}
<ReadInitializer>[;,] {
//printf(">> initializer `%s' <<\n",current->initializer.data());
- unput(*yytext);
- BEGIN(lastInitializerContext);
+ if (initializerSharpCount==0)
+ {
+ unput(*yytext);
+ BEGIN(lastInitializerContext);
+ }
+ else
+ {
+ current->initializer+=*yytext;
+ }
}
<ReadInitializer>\" {
if (insideIDL && insideCppQuote)
@@ -1355,9 +1364,23 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN(CopyString);
}
}
-<ReadInitializer>"'"\\[0-7]{1,3}"'"
-<ReadInitializer>"'"\\."'"
-<ReadInitializer>"'".{1,4}"'"
+<ReadInitializer>"<<" {
+ current->initializer+=yytext;
+ }
+<ReadInitializer>">>" {
+ current->initializer+=yytext;
+ }
+<ReadInitializer>\< {
+ initializerSharpCount++;
+ current->initializer+=*yytext;
+ }
+<ReadInitializer>\> {
+ initializerSharpCount--;
+ current->initializer+=*yytext;
+ }
+<ReadInitializer>"'"\\[0-7]{1,3}"'" |
+<ReadInitializer>"'"\\."'" |
+<ReadInitializer>"'".{1,4}"'" { current->initializer+=yytext; }
<ReadInitializer>\n {
current->initializer+=*yytext;
yyLineNr++;
@@ -1547,6 +1570,7 @@ TITLE [tT][iI][tT][lL][eE]
}
<FindFields>"=" {
lastInitializerContext = YY_START;
+ initializerSharpCount=0;
BEGIN(ReadInitializer);
}
<FindFields>"," {
@@ -1760,6 +1784,7 @@ TITLE [tT][iI][tT][lL][eE]
}
<MemberSpec>"=" {
lastInitializerContext=YY_START;
+ initializerSharpCount=0;
BEGIN(ReadInitializer);
/* BEGIN(MemberSpecSkip); */
}
@@ -3834,7 +3859,7 @@ TITLE [tT][iI][tT][lL][eE]
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->doc+=yytext;
}
-<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
+<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,SkipSection>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue)
{
diff --git a/src/translator_it.h b/src/translator_it.h
index 169998f..615e797 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -22,6 +22,8 @@
* Initial Italian Translation by Ahmed Aldo Faisal
* Revised and completed by Alessandro Falappa (since June 1999)
* Updates:
+ * 2001/08: corrected the translation fixing the issues reported by the translator.pl script
+ * translated new items used since version 1.2.7
* 2001/05: adopted new translation mechanism (trough adapters),
* translated new items used since version 1.2.5 and 1.2.6,
* revised those function returning strings in OPTIMIZE_OTPUT_FOR_C case,
@@ -57,7 +59,7 @@
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
-class TranslatorItalian : public TranslatorAdapter_1_2_7
+class TranslatorItalian : public Translator
{
public:
@@ -168,12 +170,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
QCString trDefinedIn()
{ return "definito in"; }
- /*! put as in introduction in the verbatim header file of a class.
- * parameter f is the name of the include file.
- */
- QCString trVerbatimText(const char *f)
- { return (QCString)"Questo Х il contenuto integrale del file include "+f+"."; }
-
// quick reference sections
/*! This is put above each page as a link to the list of all groups of
@@ -462,10 +458,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
QCString trEnumerationValues()
{ return "Valori dei tipi enumerati"; }
- /*! This is used in man pages as the author section. */
- QCString trAuthor()
- { return "Autore"; }
-
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
@@ -523,12 +515,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
}
}
- /*! This is used in the documentation of a group before the list of
- * links to documented files
- */
- QCString trFiles()
- { return "File"; }
-
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
@@ -576,10 +562,6 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
QCString trDate()
{ return "Data"; }
- /*! this text is generated when the \\author command is used. */
- QCString trAuthors()
- { return "Autore(i)"; }
-
/*! this text is generated when the \\return command is used. */
QCString trReturns()
{ return "Restituisce"; }
@@ -1313,6 +1295,19 @@ class TranslatorItalian : public TranslatorAdapter_1_2_7
result+=(singular ? "e" : "i");
return result;
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.7
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is generated when the \\author command is used and
+ * for the author section in man pages. */
+ virtual QCString trAuthor(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Autor" : "autor"));
+ result+=(singular ? "e" : "i");
+ return result;
+ }
};
#endif
diff --git a/src/translator_ru.h b/src/translator_ru.h
index 64c5b6d..392c684 100644
--- a/src/translator_ru.h
+++ b/src/translator_ru.h
@@ -43,6 +43,8 @@
* Compounds переведено как классы, см Строустрап.
*
* Определения помеченные ?? являются спорными.
+ *
+ * Благодарности: Vitaly A. Repin <vitaly@radio.hop.stu.neva.ru>
*/
#ifndef TRANSLATOR_RU_H
@@ -678,13 +680,13 @@ class TranslatorRussian : public Translator
}
virtual QCString trPublicMembers()
- { return decode("Публичные члены"); }
+ { return decode("Открытые члены"); }
virtual QCString trPublicSlots()
- { return decode("Публичные слоты"); }
+ { return decode("Открытые слоты"); }
virtual QCString trSignals()
{ return decode("Сигналы"); }
virtual QCString trStaticPublicMembers()
- { return decode("Публичные статические члены"); }
+ { return decode("Открытые статические члены"); }
virtual QCString trProtectedMembers()
{ return decode("Защищенные члены"); }
virtual QCString trProtectedSlots()
@@ -692,11 +694,11 @@ class TranslatorRussian : public Translator
virtual QCString trStaticProtectedMembers()
{ return decode("Защищенные статические члены"); }
virtual QCString trPrivateMembers()
- { return decode("Приватные члены"); }
+ { return decode("Закрытые члены"); }
virtual QCString trPrivateSlots()
- { return decode("Приватные слоты"); }
+ { return decode("Закрытые слоты"); }
virtual QCString trStaticPrivateMembers()
- { return decode("Приватные статические члены"); }
+ { return decode("Закрытые статические члены"); }
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
@@ -957,7 +959,7 @@ class TranslatorRussian : public Translator
}
virtual QCString trPublicTypes()
{
- return decode("Публичные типы");
+ return decode("Открытые типы");
}
virtual QCString trPublicAttribs()
{
@@ -972,7 +974,7 @@ class TranslatorRussian : public Translator
}
virtual QCString trStaticPublicAttribs()
{
- return decode("Статические публичные данные");
+ return decode("Статические открытые данные");
}
virtual QCString trProtectedTypes()
{
@@ -988,15 +990,15 @@ class TranslatorRussian : public Translator
}
virtual QCString trPrivateTypes()
{
- return decode("Приватные типы");
+ return decode("Закрытые типы");
}
virtual QCString trPrivateAttribs()
{
- return decode("Приватные данные");
+ return decode("Закрытые данные");
}
virtual QCString trStaticPrivateAttribs()
{
- return decode("Приватные статические данные");
+ return decode("Закрытые статические данные");
}
@@ -1065,11 +1067,11 @@ class TranslatorRussian : public Translator
"class Truncated : public Invisible { };\n\n"
"/* Недокументированный класс */\n"
"class Undocumented { };\n\n"
- "/*! Публичное наследование */\n"
+ "/*! Открытое наследование */\n"
"class PublicBase : public Truncated { };\n\n"
"/*! Защищенное наследование */\n"
"class ProtectedBase { };\n\n"
- "/*! Приватное наследование */\n"
+ "/*! Закрытое наследование */\n"
"class PrivateBase { };\n\n"
"/*! Класс, используемый классом Inherited */\n"
"class Used { };\n\n"
@@ -1099,10 +1101,10 @@ class TranslatorRussian : public Translator
"</ul>\n"
"Стрелки имеют следующее значение:\n"
"<ul>\n"
- "<li>Темносиняя стрелка используется для изображения отношения публичного наследования "
+ "<li>Темносиняя стрелка используется для изображения отношения открытого наследования "
"между двумя классами.\n"
"<li>Темнозеленая стрелка используется при защищенном наследовании.\n"
- "<li>Темнокрасная стрелка используется при приватном наследовании.\n"
+ "<li>Темнокрасная стрелка используется при закрытом наследовании.\n"
"<li>Фиолетовая стрелка используется, если класс содержится в"
"другом класе или используется другим классом."
"Со стрелкой указывается переменная, "
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 736ae0a..7c9b09d 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -33,6 +33,35 @@
#include <qfile.h>
#include <qtextstream.h>
+static QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t)
+{
+ switch (t)
+ {
+ case BaseOutputDocInterface::See: return "see";
+ case BaseOutputDocInterface::Return: return "return";
+ case BaseOutputDocInterface::Author: return "author";
+ case BaseOutputDocInterface::Version: return "version";
+ case BaseOutputDocInterface::Since: return "since";
+ case BaseOutputDocInterface::Date: return "date";
+ case BaseOutputDocInterface::Bug: return "bug";
+ case BaseOutputDocInterface::Note: return "note";
+ case BaseOutputDocInterface::Warning: return "warning";
+ case BaseOutputDocInterface::Par: return "par";
+ case BaseOutputDocInterface::Deprecated: return "deprecated";
+ case BaseOutputDocInterface::Pre: return "pre";
+ case BaseOutputDocInterface::Post: return "post";
+ case BaseOutputDocInterface::Invar: return "invariant";
+ case BaseOutputDocInterface::Remark: return "remark";
+ case BaseOutputDocInterface::Attention: return "attention";
+ case BaseOutputDocInterface::Todo: return "todo";
+ case BaseOutputDocInterface::Test: return "test";
+ case BaseOutputDocInterface::RCS: return "rcs";
+ case BaseOutputDocInterface::EnumValues: return "enumvalues";
+ case BaseOutputDocInterface::Examples: return "examples";
+ }
+ return "illegal";
+}
+
static inline void writeXMLString(QTextStream &t,const char *s)
{
t << convertToXML(s);
@@ -320,9 +349,10 @@ class XMLGenerator : public OutputDocInterface
m_t << "</term></varlistentry><listitem>";
startNestedPar();
}
- void startDescList()
+ void startDescList(SectionTypes st)
{
- m_t << "<simplesect><title>";
+ m_t << "<simplesect kind=\"" << sectionTypeToString(st);
+ m_t << "\"><title>";
}
void endDescList()
{
@@ -350,6 +380,7 @@ class XMLGenerator : public OutputDocInterface
{
m_t << "</title>";
if (!m_inParamList) startNestedPar();
+ printf("endDescTitle %d\n",m_inParamList);
}
void writeDescItem() { }
void startDescTable() { }
@@ -559,6 +590,15 @@ class XMLGenerator : public OutputDocInterface
{
m_t << "</image>";
}
+ void startDotFile(const char *name,bool caption)
+ {
+ m_t << "<dotfile name=\"" << name << "\" "
+ << "caption=\"" << (caption ? "1" : "0") << "\">"; // non docbook
+ }
+ void endDotFile(bool)
+ {
+ m_t << "</dotfile>";
+ }
void startTextLink(const char *name,const char *anchor)
{
m_t << "<ulink url=\"" << name << "#" << anchor << "\">";
@@ -636,6 +676,7 @@ class XMLGenerator : public OutputDocInterface
m_b.open( IO_WriteOnly );
m_t.setDevice(&m_b);
m_t.setEncoding(QTextStream::Latin1);
+ m_inParamList = FALSE;
}
/*! copy constructor */
XMLGenerator(const XMLGenerator *xg)
@@ -908,7 +949,8 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
// detailed documentation
// detailed member documentation
- if (cd->name().find('@')!=-1) return; // skip anonymous compounds
+ if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
+ if (cd->templateMaster()!=0) return; // skip generated template instances.
t << " <compounddef id=\""
<< cd->getOutputFileBase() << "\" kind=\""
<< cd->compoundTypeString() << "\">" << endl;