summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt61
-rw-r--r--src/arguments.cpp17
-rw-r--r--src/arguments.h12
-rw-r--r--src/cite.cpp20
-rw-r--r--src/clangparser.cpp16
-rw-r--r--src/classdef.cpp219
-rw-r--r--src/classdef.h7
-rw-r--r--src/classlist.cpp14
-rw-r--r--src/cmdmapper.cpp3
-rw-r--r--src/cmdmapper.h5
-rw-r--r--src/code.l176
-rw-r--r--src/commentcnv.l20
-rw-r--r--src/commentscan.l9
-rw-r--r--src/condparser.cpp2
-rw-r--r--src/config.h609
-rw-r--r--src/config.xml23
-rwxr-xr-xsrc/configgen.py133
-rw-r--r--src/configimpl.h571
-rw-r--r--src/configimpl.l (renamed from src/config.l)585
-rw-r--r--src/configoptions.h4
-rw-r--r--src/constexp.l2
-rw-r--r--src/constexp.y3
-rw-r--r--src/context.cpp199
-rw-r--r--src/context.h1
-rw-r--r--src/declinfo.l2
-rw-r--r--src/defargs.l8
-rw-r--r--src/defgen.cpp2
-rw-r--r--src/define.cpp2
-rw-r--r--src/definition.cpp75
-rw-r--r--src/definition.h2
-rw-r--r--src/dia.cpp4
-rw-r--r--src/diagram.cpp4
-rw-r--r--src/dirdef.cpp217
-rw-r--r--src/dirdef.h2
-rw-r--r--src/docbookgen.cpp74
-rw-r--r--src/docbookvisitor.cpp49
-rw-r--r--src/docparser.cpp149
-rw-r--r--src/docparser.h3
-rw-r--r--src/docsets.cpp23
-rw-r--r--src/doctokenizer.l4
-rw-r--r--src/dot.cpp380
-rw-r--r--src/dot.h30
-rw-r--r--src/doxygen.cpp438
-rw-r--r--src/doxygen.h3
-rw-r--r--src/eclipsehelp.cpp10
-rw-r--r--src/entry.cpp4
-rw-r--r--src/filedef.cpp129
-rw-r--r--src/filedef.h17
-rw-r--r--src/filename.cpp20
-rw-r--r--src/fileparser.cpp6
-rw-r--r--src/formula.cpp13
-rw-r--r--src/fortrancode.l39
-rw-r--r--src/fortranscanner.l70
-rw-r--r--src/ftvhelp.cpp14
-rw-r--r--src/groupdef.cpp85
-rw-r--r--src/htags.cpp12
-rw-r--r--src/htmldocvisitor.cpp108
-rw-r--r--src/htmlentity.cpp4
-rw-r--r--src/htmlgen.cpp353
-rw-r--r--src/htmlgen.h39
-rw-r--r--src/htmlhelp.cpp37
-rw-r--r--src/htmlhelp.h1
-rw-r--r--src/image.cpp8
-rw-r--r--src/index.cpp291
-rw-r--r--src/latexdocvisitor.cpp133
-rw-r--r--src/latexgen.cpp331
-rw-r--r--src/latexgen.h37
-rw-r--r--src/layout.cpp28
-rw-r--r--src/lodepng.cpp20
-rw-r--r--src/mandocvisitor.cpp54
-rw-r--r--src/mangen.cpp39
-rw-r--r--src/mangen.h14
-rw-r--r--src/markdown.cpp306
-rw-r--r--src/memberdef.cpp269
-rw-r--r--src/memberdef.h2
-rw-r--r--src/membergroup.cpp6
-rw-r--r--src/membergroup.h2
-rw-r--r--src/memberlist.cpp211
-rw-r--r--src/memberlist.h20
-rw-r--r--src/message.cpp36
-rw-r--r--src/msc.cpp20
-rw-r--r--src/namespacedef.cpp84
-rw-r--r--src/outputgen.h10
-rw-r--r--src/outputlist.cpp1
-rw-r--r--src/outputlist.h22
-rw-r--r--src/pagedef.cpp23
-rw-r--r--src/perlmodgen.cpp65
-rw-r--r--src/plantuml.cpp37
-rw-r--r--src/portable.cpp25
-rw-r--r--src/portable.h1
-rw-r--r--src/pre.l36
-rw-r--r--src/printdocvisitor.h7
-rw-r--r--src/pycode.l47
-rw-r--r--src/pyscanner.l62
-rw-r--r--src/qhp.cpp18
-rw-r--r--src/resourcemgr.cpp9
-rw-r--r--src/resourcemgr.h4
-rw-r--r--src/rtfdocvisitor.cpp260
-rw-r--r--src/rtfdocvisitor.h12
-rw-r--r--src/rtfgen.cpp139
-rw-r--r--src/rtfgen.h10
-rw-r--r--src/scanner.l94
-rw-r--r--src/searchindex.cpp18
-rw-r--r--src/sortdict.h2
-rw-r--r--src/sqlcode.h37
-rw-r--r--src/sqlcode.l434
-rw-r--r--src/sqlite3gen.cpp356
-rw-r--r--src/sqlscanner.h65
-rw-r--r--src/tagreader.cpp14
-rw-r--r--src/tclscanner.l32
-rw-r--r--src/template.cpp317
-rw-r--r--src/template.h3
-rw-r--r--src/tooltip.cpp2
-rw-r--r--src/translator_am.h30
-rw-r--r--src/translator_ar.h28
-rw-r--r--src/translator_br.h28
-rw-r--r--src/translator_ca.h28
-rw-r--r--src/translator_cn.h28
-rw-r--r--src/translator_cz.h26
-rw-r--r--src/translator_de.h83
-rw-r--r--src/translator_dk.h28
-rw-r--r--src/translator_en.h36
-rw-r--r--src/translator_eo.h28
-rw-r--r--src/translator_es.h32
-rw-r--r--src/translator_fa.h24
-rw-r--r--src/translator_fi.h28
-rw-r--r--src/translator_fr.h28
-rw-r--r--src/translator_gr.h28
-rw-r--r--src/translator_hr.h12
-rw-r--r--src/translator_hu.h28
-rw-r--r--src/translator_id.h28
-rw-r--r--src/translator_it.h24
-rw-r--r--src/translator_jp.h26
-rw-r--r--src/translator_kr.h28
-rw-r--r--src/translator_lt.h28
-rw-r--r--src/translator_lv.h28
-rw-r--r--src/translator_mk.h28
-rw-r--r--src/translator_no.h28
-rw-r--r--src/translator_pl.h42
-rw-r--r--src/translator_pt.h26
-rw-r--r--src/translator_ro.h28
-rw-r--r--src/translator_ru.h28
-rw-r--r--src/translator_sc.h28
-rw-r--r--src/translator_si.h2
-rw-r--r--src/translator_sk.h24
-rw-r--r--src/translator_sr.h28
-rw-r--r--src/translator_sv.h532
-rw-r--r--src/translator_tr.h28
-rw-r--r--src/translator_tw.h28
-rw-r--r--src/translator_ua.h28
-rw-r--r--src/translator_vi.h28
-rw-r--r--src/translator_za.h28
-rw-r--r--src/types.h3
-rw-r--r--[-rwxr-xr-x]src/util.cpp609
-rw-r--r--[-rwxr-xr-x]src/util.h3
-rw-r--r--src/vhdlcode.l28
-rw-r--r--src/vhdldocgen.cpp25
-rw-r--r--src/vhdldocgen.h2
-rw-r--r--src/vhdljjparser.cpp5
-rw-r--r--src/xmlcode.l21
-rw-r--r--src/xmldocvisitor.cpp47
-rw-r--r--src/xmlgen.cpp38
162 files changed, 7339 insertions, 4277 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6763cf5..08c8439 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -36,6 +36,21 @@ file(GENERATE OUTPUT ${GENERATED_SRC}/version.cpp
)
set_source_files_properties(${GENERATED_SRC}/version.cpp PROPERTIES GENERATED 1)
+# configvalues.h
+add_custom_command(
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py
+ OUTPUT ${GENERATED_SRC}/configvalues.h
+)
+set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1)
+
+# configvalues.cpp
+add_custom_command(
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maps ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.cpp
+ DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py
+ OUTPUT ${GENERATED_SRC}/configvalues.cpp
+)
+set_source_files_properties(${GENERATED_SRC}/configvalues.cpp PROPERTIES GENERATED 1)
# configoptions.cpp
add_custom_command(
@@ -85,31 +100,33 @@ add_custom_command(
set_source_files_properties(${GENERATED_SRC}/layout_default.xml.h PROPERTIES GENERATED 1)
# Targets for flex/bison generated files
-FLEX_TARGET(scanner scanner.l ${GENERATED_SRC}/scanner.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PscannerYY")
-FLEX_TARGET(code code.l ${GENERATED_SRC}/code.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PcodeYY")
-FLEX_TARGET(pyscanner pyscanner.l ${GENERATED_SRC}/pyscanner.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PpyscannerYY")
-FLEX_TARGET(pycode pycode.l ${GENERATED_SRC}/pycode.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PpycodeYY")
-FLEX_TARGET(fortranscanner fortranscanner.l ${GENERATED_SRC}/fortranscanner.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PfortranscannerYY -i")
-FLEX_TARGET(fortrancode fortrancode.l ${GENERATED_SRC}/fortrancode.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PfortrancodeYY -i")
-FLEX_TARGET(vhdlcode vhdlcode.l ${GENERATED_SRC}/vhdlcode.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PvhdlcodeYY -i")
-FLEX_TARGET(tclscanner tclscanner.l ${GENERATED_SRC}/tclscanner.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PtclscannerYY -i")
-FLEX_TARGET(pre pre.l ${GENERATED_SRC}/pre.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PpreYY")
-FLEX_TARGET(declinfo declinfo.l ${GENERATED_SRC}/declinfo.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PdeclinfoYY")
-FLEX_TARGET(defargs defargs.l ${GENERATED_SRC}/defargs.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PdefargsYY")
-FLEX_TARGET(doctokenizer doctokenizer.l ${GENERATED_SRC}/doctokenizer.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PdoctokenizerYY")
-FLEX_TARGET(commentcnv commentcnv.l ${GENERATED_SRC}/commentcnv.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PcommentcnvYY")
-FLEX_TARGET(commentscan commentscan.l ${GENERATED_SRC}/commentscan.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PcommentscanYY")
-FLEX_TARGET(constexp constexp.l ${GENERATED_SRC}/constexp.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PconstexpYY")
-FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PxmlcodeYY")
-FLEX_TARGET(config config.l ${GENERATED_SRC}/config.cpp COMPILE_FLAGS "$(LEX_FLAGS) -PconfigYY")
-
-BISON_TARGET(vhdlparser vhdlparser.y ${GENERATED_SRC}/vhdlparser.cpp COMPILE_FLAGS "$(YACC_FLAGS) -l -p vhdlscannerYY")
-BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "$(YACC_FLAGS) -l -p constexpYY")
+FLEX_TARGET(scanner scanner.l ${GENERATED_SRC}/scanner.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(code code.l ${GENERATED_SRC}/code.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(pyscanner pyscanner.l ${GENERATED_SRC}/pyscanner.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(pycode pycode.l ${GENERATED_SRC}/pycode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(fortranscanner fortranscanner.l ${GENERATED_SRC}/fortranscanner.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(fortrancode fortrancode.l ${GENERATED_SRC}/fortrancode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(vhdlcode vhdlcode.l ${GENERATED_SRC}/vhdlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(tclscanner tclscanner.l ${GENERATED_SRC}/tclscanner.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(pre pre.l ${GENERATED_SRC}/pre.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(declinfo declinfo.l ${GENERATED_SRC}/declinfo.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(defargs defargs.l ${GENERATED_SRC}/defargs.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(doctokenizer doctokenizer.l ${GENERATED_SRC}/doctokenizer.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(commentcnv commentcnv.l ${GENERATED_SRC}/commentcnv.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(commentscan commentscan.l ${GENERATED_SRC}/commentscan.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(constexp constexp.l ${GENERATED_SRC}/constexp.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(sqlcode sqlcode.l ${GENERATED_SRC}/sqlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+FLEX_TARGET(configimpl configimpl.l ${GENERATED_SRC}/configimpl.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+
+BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS}")
add_library(doxycfg STATIC
${GENERATED_SRC}/lang_cfg.h
- ${GENERATED_SRC}/config.cpp
+ ${GENERATED_SRC}/configvalues.h
+ ${GENERATED_SRC}/configimpl.cpp
${GENERATED_SRC}/configoptions.cpp
+ ${GENERATED_SRC}/configvalues.cpp
portable.cpp
portable_c.c
)
@@ -121,6 +138,7 @@ add_library(_doxygen STATIC
${GENERATED_SRC}/layout_default.xml.h
${GENERATED_SRC}/version.cpp
${GENERATED_SRC}/ce_parse.h
+ ${GENERATED_SRC}/configvalues.h
${GENERATED_SRC}/resources.cpp
# generated by flex/bison
${GENERATED_SRC}/scanner.cpp
@@ -139,6 +157,7 @@ add_library(_doxygen STATIC
${GENERATED_SRC}/commentscan.cpp
${GENERATED_SRC}/constexp.cpp
${GENERATED_SRC}/xmlcode.cpp
+ ${GENERATED_SRC}/sqlcode.cpp
#
${GENERATED_SRC}/ce_parse.cpp
#
diff --git a/src/arguments.cpp b/src/arguments.cpp
index 095aa96..a828dab 100644
--- a/src/arguments.cpp
+++ b/src/arguments.cpp
@@ -33,6 +33,7 @@ ArgumentList *ArgumentList::deepCopy() const
argList->pureSpecifier = pureSpecifier;
argList->trailingReturnType = trailingReturnType;
argList->isDeleted = isDeleted;
+ argList->refQualifier = refQualifier;
return argList;
}
@@ -63,6 +64,7 @@ ArgumentList *ArgumentList::unmarshal(StorageIntf *s)
result->pureSpecifier = unmarshalBool(s);
result->trailingReturnType = unmarshalQCString(s);
result->isDeleted = unmarshalBool(s);
+ result->refQualifier = (RefQualifierType)unmarshalInt(s);
return result;
}
@@ -81,13 +83,13 @@ void ArgumentList::marshal(StorageIntf *s,ArgumentList *argList)
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
- marshalQCString(s,a->attrib);
- marshalQCString(s,a->type);
- marshalQCString(s,a->canType);
- marshalQCString(s,a->name);
- marshalQCString(s,a->array);
- marshalQCString(s,a->defval);
- marshalQCString(s,a->docs);
+ marshalQCString(s,a->attrib);
+ marshalQCString(s,a->type);
+ marshalQCString(s,a->canType);
+ marshalQCString(s,a->name);
+ marshalQCString(s,a->array);
+ marshalQCString(s,a->defval);
+ marshalQCString(s,a->docs);
marshalQCString(s,a->typeConstraint);
}
}
@@ -96,6 +98,7 @@ void ArgumentList::marshal(StorageIntf *s,ArgumentList *argList)
marshalBool(s,argList->pureSpecifier);
marshalQCString(s,argList->trailingReturnType);
marshalBool(s,argList->isDeleted);
+ marshalInt(s,(int)argList->refQualifier);
}
}
diff --git a/src/arguments.h b/src/arguments.h
index 555b573..3af7134 100644
--- a/src/arguments.h
+++ b/src/arguments.h
@@ -73,6 +73,13 @@ struct Argument
QCString typeConstraint; /*!< Used for Java generics: \<T extends C\> */
};
+enum RefQualifierType
+{
+ RefQualifierNone,
+ RefQualifierLValue,
+ RefQualifierRValue
+};
+
/*! \brief This class represents an function or template argument list.
*
* This class also stores some information about member that is typically
@@ -87,7 +94,8 @@ class ArgumentList : public QList<Argument>
constSpecifier(FALSE),
volatileSpecifier(FALSE),
pureSpecifier(FALSE),
- isDeleted(FALSE)
+ isDeleted(FALSE),
+ refQualifier(RefQualifierNone)
{ setAutoDelete(TRUE); }
/*! Destroys the argument list */
~ArgumentList() {}
@@ -105,6 +113,8 @@ class ArgumentList : public QList<Argument>
QCString trailingReturnType;
/*! method with =delete */
bool isDeleted;
+ /*! C++11 ref qualifier */
+ RefQualifierType refQualifier;
static ArgumentList *unmarshal(StorageIntf *s);
static void marshal(StorageIntf *s,ArgumentList *argList);
diff --git a/src/cite.cpp b/src/cite.cpp
index 3125f35..d934d0a 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -43,18 +43,18 @@ void CiteDict::writeLatexBibliography(FTextStream &t)
if (m_entries.isEmpty())
return;
- QCString style = Config_getString("LATEX_BIB_STYLE");
+ QCString style = Config_getString(LATEX_BIB_STYLE);
if (style.isEmpty())
style="plain";
QCString unit;
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
unit = "section";
else
unit = "chapter";
t << "% Bibliography\n"
"\\newpage\n"
"\\phantomsection\n";
- bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (!pdfHyperlinks)
{
t << "\\clearemptydoublepage\n";
@@ -62,7 +62,7 @@ void CiteDict::writeLatexBibliography(FTextStream &t)
}
t << "\\bibliographystyle{" << style << "}\n"
"\\bibliography{";
- QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
+ QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
int i = 0;
const char *bibdata = citeDataList.first();
while (bibdata)
@@ -107,7 +107,7 @@ void CiteDict::clear()
bool CiteDict::isEmpty() const
{
- QStrList &citeBibFiles = Config_getList("CITE_BIB_FILES");
+ QStrList &citeBibFiles = Config_getList(CITE_BIB_FILES);
return (citeBibFiles.count()==0 || m_entries.isEmpty());
}
@@ -120,7 +120,7 @@ void CiteDict::generatePage() const
// 1. generate file with markers and citations to OUTPUT_DIRECTORY
QFile f;
- QCString outputDir = Config_getString("OUTPUT_DIRECTORY");
+ QCString outputDir = Config_getString(OUTPUT_DIRECTORY);
QCString citeListFile = outputDir+"/citelist.doc";
f.setName(citeListFile);
if (!f.open(IO_WriteOnly))
@@ -154,7 +154,7 @@ void CiteDict::generatePage() const
// so bibtex can find them without path (bibtex doesn't support paths or
// filenames with spaces!)
// Strictly not required when only latex is generated
- QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
+ QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
QCString bibOutputDir = outputDir+"/"+bibTmpDir;
QCString bibOutputFiles = "";
QDir thisDir;
@@ -251,11 +251,11 @@ void CiteDict::generatePage() const
// 8. for latex we just copy the bib files to the output and let
// latex do this work.
- if (Config_getBool("GENERATE_LATEX"))
+ if (Config_getBool(GENERATE_LATEX))
{
// copy bib files to the latex output dir
- QStrList &citeDataList = Config_getList("CITE_BIB_FILES");
- QCString latexOutputDir = Config_getString("LATEX_OUTPUT")+"/";
+ QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
+ QCString latexOutputDir = Config_getString(LATEX_OUTPUT)+"/";
int i = 0;
const char *bibdata = citeDataList.first();
while (bibdata)
diff --git a/src/clangparser.cpp b/src/clangparser.cpp
index 9913b12..67e754b 100644
--- a/src/clangparser.cpp
+++ b/src/clangparser.cpp
@@ -64,7 +64,7 @@ class ClangParser::Private
static QCString detab(const QCString &s)
{
- static int tabSize = Config_getInt("TAB_SIZE");
+ static int tabSize = Config_getInt(TAB_SIZE);
GrowBuf out;
int size = s.length();
const char *data = s.data();
@@ -157,9 +157,9 @@ void ClangParser::determineInputFilesInSameTu(QStrList &files)
void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
{
- static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
- static QStrList &includePath = Config_getList("INCLUDE_PATH");
- static QStrList clangOptions = Config_getList("CLANG_OPTIONS");
+ static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
+ static QStrList &includePath = Config_getList(INCLUDE_PATH);
+ static QStrList clangOptions = Config_getList(CLANG_OPTIONS);
if (!clangAssistedParsing) return;
//printf("ClangParser::start(%s)\n",fileName);
p->fileName = fileName;
@@ -230,7 +230,7 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
// provide the input and and its dependencies as unsaved files so we can
// pass the filtered versions
argv[argc++]=strdup(fileName);
- static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
+ static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
//printf("source %s ----------\n%s\n-------------\n\n",
// fileName,p->source.data());
uint numUnsavedFiles = filesInTranslationUnit.count()+1;
@@ -339,7 +339,7 @@ void ClangParser::switchToFile(const char *fileName)
void ClangParser::finish()
{
- static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return;
if (p->tu)
{
@@ -381,7 +381,7 @@ QCString ClangParser::lookup(uint line,const char *symbol)
//printf("ClangParser::lookup(%d,%s)\n",line,symbol);
QCString result;
if (symbol==0) return result;
- static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return result;
int sl = strlen(symbol);
@@ -615,7 +615,7 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
Definition *d,
const char *text)
{
- static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS");
+ static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance()->addTooltip(d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 7d9e118..111d59b 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -62,6 +62,15 @@ class ClassDefImpl
*/
QCString fileName;
+ /*! file name used for the list of all members */
+ QCString memberListFileName;
+
+ /*! file name used for the collaboration diagram */
+ QCString collabFileName;
+
+ /*! file name used for the inheritance graph */
+ QCString inheritFileName;
+
/*! Include information about the header file should be included
* in the documentation. 0 by default, set by setIncludeFile().
*/
@@ -221,7 +230,7 @@ void ClassDefImpl::init(const char *defFileName, const char *name,
constraintClassDict=0;
memberGroupSDict = 0;
innerClasses = 0;
- subGrouping=Config_getBool("SUBGROUPING");
+ subGrouping=Config_getBool(SUBGROUPING);
templateInstances = 0;
variableInstances = 0;
templateMaster =0;
@@ -232,7 +241,7 @@ void ClassDefImpl::init(const char *defFileName, const char *name,
membersMerged = FALSE;
categoryOf = 0;
usedOnly = FALSE;
- isSimple = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ isSimple = Config_getBool(INLINE_SIMPLE_STRUCTS);
arrowOperator = 0;
taggedInnerClasses = 0;
tagLessRef = 0;
@@ -296,6 +305,13 @@ ClassDef::ClassDef(
m_impl->compType = ct;
m_impl->isJavaEnum = isJavaEnum;
m_impl->init(defFileName,name(),compoundTypeString(),fName);
+ m_impl->memberListFileName = convertNameToFile(compoundTypeString()+name()+"-members");
+ m_impl->collabFileName = convertNameToFile(m_impl->fileName+"_coll_graph");
+ m_impl->inheritFileName = convertNameToFile(m_impl->fileName+"_inherit_graph");
+ if (!lref)
+ {
+ m_impl->fileName = convertNameToFile(m_impl->fileName);
+ }
}
// destroy the class definition
@@ -306,14 +322,14 @@ ClassDef::~ClassDef()
QCString ClassDef::getMemberListFileName() const
{
- return convertNameToFile(compoundTypeString()+name()+"-members");
+ return m_impl->memberListFileName;
}
QCString ClassDef::displayName(bool includeScope) const
{
- //static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
+ //static bool optimizeOutputForJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
SrcLangExt lang = getLanguage();
- //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString n;
if (lang==SrcLangExt_VHDL)
{
@@ -374,7 +390,7 @@ void ClassDef::insertSubClass(ClassDef *cd,Protection p,
Specifier s,const char *t)
{
//printf("*** insert sub class %s into %s\n",cd->name().data(),name().data());
- static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (!extractPrivate && cd->protection()==Private) return;
if (m_impl->inheritedBy==0)
{
@@ -557,7 +573,9 @@ void ClassDef::internalInsertMember(MemberDef *md,
break;
case Public:
addMemberToList(MemberListType_pubTypes,md,TRUE);
- isSimple=QCString(md->typeString()).find(")(")==-1;
+ isSimple=!md->isEnumerate() &&
+ !md->isEnumValue() &&
+ QCString(md->typeString()).find(")(")==-1; // func ptr typedef
break;
case Private:
addMemberToList(MemberListType_priTypes,md,TRUE);
@@ -682,7 +700,7 @@ void ClassDef::internalInsertMember(MemberDef *md,
//::addClassMemberNameToIndex(md);
if (addToAllList &&
- !(Config_getBool("HIDE_FRIEND_COMPOUNDS") &&
+ !(Config_getBool(HIDE_FRIEND_COMPOUNDS) &&
md->isFriend() &&
(QCString(md->typeString())=="friend class" ||
QCString(md->typeString())=="friend struct" ||
@@ -718,7 +736,7 @@ void ClassDef::insertMember(MemberDef *md)
// compute the anchors for all members
void ClassDef::computeAnchors()
{
- //ClassDef *context = Config_getBool("INLINE_INHERITED_MEMB") ? this : 0;
+ //ClassDef *context = Config_getBool(INLINE_INHERITED_MEMB) ? this : 0;
//const char *letters = "abcdefghijklmnopqrstuvwxyz0123456789";
QListIterator<MemberList> mli(m_impl->memberLists);
MemberList *ml;
@@ -938,6 +956,10 @@ void ClassDef::writeBriefDescription(OutputList &ol,bool exampleFlag)
if (hasBriefDescription())
{
ol.startParagraph();
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.writeString(" - ");
+ ol.popGeneratorState();
ol.generateDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
ol.pushGeneratorState();
@@ -958,7 +980,7 @@ void ClassDef::writeBriefDescription(OutputList &ol,bool exampleFlag)
void ClassDef::writeDetailedDocumentationBody(OutputList &ol)
{
- static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
ol.startTextBlock();
@@ -1006,8 +1028,8 @@ void ClassDef::writeDetailedDocumentationBody(OutputList &ol)
bool ClassDef::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
- static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().isEmpty() ||
(sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()));
@@ -1103,7 +1125,7 @@ void ClassDef::showUsedFiles(OutputList &ol)
ol.startItemListItem();
QCString path=fd->getPath();
- if (Config_getBool("FULL_PATH_NAMES"))
+ if (Config_getBool(FULL_PATH_NAMES))
{
ol.docify(stripFromPath(path));
}
@@ -1184,8 +1206,8 @@ void ClassDef::writeInheritanceGraph(OutputList &ol)
const int count=countInheritanceNodes();
bool renderDiagram = FALSE;
- if (Config_getBool("HAVE_DOT") &&
- (Config_getBool("CLASS_DIAGRAMS") || Config_getBool("CLASS_GRAPH")))
+ if (Config_getBool(HAVE_DOT) &&
+ (Config_getBool(CLASS_DIAGRAMS) || Config_getBool(CLASS_GRAPH)))
// write class diagram using dot
{
DotClassGraph inheritanceGraph(this,DotNode::Inheritance);
@@ -1200,7 +1222,7 @@ void ClassDef::writeInheritanceGraph(OutputList &ol)
renderDiagram = TRUE;
}
}
- else if (Config_getBool("CLASS_DIAGRAMS") && count>0)
+ else if (Config_getBool(CLASS_DIAGRAMS) && count>0)
// write class diagram using build-in generator
{
ClassDiagram diagram(this); // create a diagram of this class.
@@ -1305,7 +1327,7 @@ void ClassDef::writeInheritanceGraph(OutputList &ol)
void ClassDef::writeCollaborationGraph(OutputList &ol)
{
- if (Config_getBool("HAVE_DOT") /*&& Config_getBool("COLLABORATION_GRAPH")*/)
+ if (Config_getBool(HAVE_DOT) /*&& Config_getBool(COLLABORATION_GRAPH)*/)
{
DotClassGraph usageImplGraph(this,DotNode::Collaboration);
if (!usageImplGraph.isTrivial())
@@ -1340,7 +1362,7 @@ QCString ClassDef::includeStatement() const
void ClassDef::writeIncludeFiles(OutputList &ol)
{
- if (m_impl->incInfo /*&& Config_getBool("SHOW_INCLUDE_FILES")*/)
+ if (m_impl->incInfo /*&& Config_getBool(SHOW_INCLUDE_FILES)*/)
{
QCString nm=m_impl->incInfo->includeName.isEmpty() ?
(m_impl->incInfo->fileDef ?
@@ -1389,7 +1411,7 @@ void ClassDef::writeAllMembersLink(OutputList &ol)
{
// write link to list of all members (HTML only)
if (m_impl->allMemberNameInfoSDict &&
- !Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
+ !Config_getBool(OPTIMIZE_OUTPUT_FOR_C)
)
{
ol.pushGeneratorState();
@@ -1448,7 +1470,7 @@ void ClassDef::writeInlineClasses(OutputList &ol)
void ClassDef::startMemberDocumentation(OutputList &ol)
{
//printf("%s: ClassDef::startMemberDocumentation()\n",name().data());
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.disable(OutputGenerator::Html);
Doxygen::suppressDocWarnings = TRUE;
@@ -1458,7 +1480,7 @@ void ClassDef::startMemberDocumentation(OutputList &ol)
void ClassDef::endMemberDocumentation(OutputList &ol)
{
//printf("%s: ClassDef::endMemberDocumentation()\n",name().data());
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.enable(OutputGenerator::Html);
Doxygen::suppressDocWarnings = FALSE;
@@ -1474,7 +1496,7 @@ void ClassDef::startMemberDeclarations(OutputList &ol)
void ClassDef::endMemberDeclarations(OutputList &ol)
{
//printf("%s: ClassDef::endMemberDeclarations()\n",name().data());
- static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
+ static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
{
ol.startMemberHeader("inherited");
@@ -1493,7 +1515,7 @@ void ClassDef::writeAuthorSection(OutputList &ol)
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
- ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
+ ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
ol.popGeneratorState();
}
@@ -1523,7 +1545,7 @@ void ClassDef::writeSummaryLinks(OutputList &ol)
}
else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
m_impl->allMemberNameInfoSDict &&
- !Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
+ !Config_getBool(OPTIMIZE_OUTPUT_FOR_C)
)
{
ol.writeSummaryLink(getMemberListFileName(),"all-members-list",theTranslator->trListOfAllMembers(),first);
@@ -1593,7 +1615,7 @@ void ClassDef::writeTagFile(FTextStream &tagFile)
ClassDef *cd=ibcd->classDef;
if (cd && cd->isLinkable())
{
- if (!Config_getString("GENERATE_TAGFILE").isEmpty())
+ if (!Config_getString(GENERATE_TAGFILE).isEmpty())
{
tagFile << " <base";
if (ibcd->prot==Protected)
@@ -1690,7 +1712,7 @@ void ClassDef::writeInlineDocumentation(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
{ // only HTML only
ol.writeAnchor(0,anchor());
- ol.startMemberDoc(0,0,0,0,FALSE);
+ ol.startMemberDoc(0,0,anchor(),name(),1,1,FALSE);
ol.startMemberDocName(FALSE);
ol.parseText(s);
ol.endMemberDocName();
@@ -1793,9 +1815,9 @@ void ClassDef::writeMoreLink(OutputList &ol,const QCString &anchor)
{
// TODO: clean up this mess by moving it to
// the output generators...
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- static bool rtfHyperlinks = Config_getBool("RTF_HYPERLINKS");
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ static bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
// HTML only
ol.pushGeneratorState();
@@ -1834,9 +1856,9 @@ void ClassDef::writeMoreLink(OutputList &ol,const QCString &anchor)
bool ClassDef::visibleInParentsDeclList() const
{
- static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
- static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
- static bool extractLocalClasses = Config_getBool("EXTRACT_LOCAL_CLASSES");
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ static bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
+ static bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
bool linkable = isLinkable();
return (!isAnonymous() && !isExtension() &&
(protection()!=::Private || extractPrivate) &&
@@ -1846,10 +1868,10 @@ bool ClassDef::visibleInParentsDeclList() const
void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *header,bool localNames)
{
- //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
SrcLangExt lang = getLanguage();
- if (visibleInParentsDeclList() && hasDocumentation())
+ if (visibleInParentsDeclList())
{
if (!found) // first class
{
@@ -1906,7 +1928,7 @@ void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *heade
ol.endMemberItem();
// add the brief description if available
- if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
@@ -2102,7 +2124,7 @@ QCString ClassDef::title() const
}
else
{
- if (Config_getBool("HIDE_COMPOUND_REFERENCE"))
+ if (Config_getBool(HIDE_COMPOUND_REFERENCE))
{
pageTitle = displayName();
}
@@ -2119,9 +2141,9 @@ QCString ClassDef::title() const
// write all documentation for this class
void ClassDef::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
- //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString pageTitle = title();
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_ClassVisible,!generateTreeView);
@@ -2143,7 +2165,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
endFileWithNavPath(this,ol);
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
writeMemberPages(ol);
}
@@ -2174,7 +2196,7 @@ void ClassDef::writeMemberPages(OutputList &ol)
void ClassDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
- static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
+ static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
@@ -2249,9 +2271,9 @@ void ClassDef::writeDocumentationForInnerClasses(OutputList &ol)
// write the list of all (inherited) members for this class
void ClassDef::writeMemberList(OutputList &ol)
{
- static bool cOpt = Config_getBool("OPTIMIZE_OUTPUT_FOR_C");
- //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool cOpt = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
+ //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
if (m_impl->allMemberNameInfoSDict==0 || cOpt) return;
// only for HTML
ol.pushGeneratorState();
@@ -2354,7 +2376,7 @@ void ClassDef::writeMemberList(OutputList &ol)
memberWritten=TRUE;
}
else if (!cd->isArtificial() &&
- !Config_getBool("HIDE_UNDOC_MEMBERS") &&
+ !Config_getBool(HIDE_UNDOC_MEMBERS) &&
(protectionLevelVisible(md->protection()) || md->isFriend())
) // no documentation,
// generate link to the class instead.
@@ -2426,7 +2448,7 @@ void ClassDef::writeMemberList(OutputList &ol)
if (
(prot!=Public || (virt!=Normal && getLanguage()!=SrcLangExt_ObjC) ||
md->isFriend() || md->isRelated() || md->isExplicit() ||
- md->isMutable() || (md->isInline() && Config_getBool("INLINE_INFO")) ||
+ md->isMutable() || (md->isInline() && Config_getBool(INLINE_INFO)) ||
md->isSignal() || md->isSlot() ||
(getLanguage()==SrcLangExt_IDL &&
(md->isOptional() || md->isAttribute() || md->isUNOProperty())) ||
@@ -2444,7 +2466,7 @@ void ClassDef::writeMemberList(OutputList &ol)
else if (md->isRelated()) sl.append("related");
else
{
- if (Config_getBool("INLINE_INFO") && md->isInline())
+ if (Config_getBool(INLINE_INFO) && md->isInline())
sl.append("inline");
if (md->isExplicit()) sl.append("explicit");
if (md->isMutable()) sl.append("mutable");
@@ -2529,7 +2551,7 @@ bool ClassDef::hasExamples() const
void ClassDef::addTypeConstraint(const QCString &typeConstraint,const QCString &type)
{
//printf("addTypeContraint(%s,%s)\n",type.data(),typeConstraint.data());
- static bool hideUndocRelation = Config_getBool("HIDE_UNDOC_RELATIONS");
+ static bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
if (typeConstraint.isEmpty() || type.isEmpty()) return;
ClassDef *cd = getResolvedClass(this,getFileDef(),typeConstraint);
if (cd==0 && !hideUndocRelation)
@@ -2706,9 +2728,9 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup,
/*! a link to this class is possible within this project */
bool ClassDef::isLinkableInProject() const
{
- static bool extractLocal = Config_getBool("EXTRACT_LOCAL_CLASSES");
- static bool extractStatic = Config_getBool("EXTRACT_STATIC");
- static bool hideUndoc = Config_getBool("HIDE_UNDOC_CLASSES");
+ static bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
+ static bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ static bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
if (m_impl->templateMaster)
{
return m_impl->templateMaster->isLinkableInProject();
@@ -2742,9 +2764,9 @@ bool ClassDef::isLinkable() const
/*! the class is visible in a class diagram, or class hierarchy */
bool ClassDef::isVisibleInHierarchy()
{
- static bool allExternals = Config_getBool("ALLEXTERNALS");
- static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
- static bool extractStatic = Config_getBool("EXTRACT_STATIC");
+ static bool allExternals = Config_getBool(ALLEXTERNALS);
+ static bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
+ static bool extractStatic = Config_getBool(EXTRACT_STATIC);
return // show all classes or a subclass is visible
(allExternals || hasNonReferenceSuperClass()) &&
@@ -2845,15 +2867,15 @@ void ClassDef::mergeMembers()
{
if (m_impl->membersMerged) return;
- //static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ //static bool optimizeOutputForJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
SrcLangExt lang = getLanguage();
QCString sep=getLanguageSpecificSeparator(lang,TRUE);
int sepLen = sep.length();
m_impl->membersMerged=TRUE;
//printf(" mergeMembers for %s\n",name().data());
- bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB" );
+ bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (baseClasses())
{
//printf(" => has base classes!\n");
@@ -3094,7 +3116,7 @@ void ClassDef::mergeMembers()
*/
void ClassDef::mergeCategory(ClassDef *category)
{
- static bool extractLocalMethods = Config_getBool("EXTRACT_LOCAL_METHODS");
+ static bool extractLocalMethods = Config_getBool(EXTRACT_LOCAL_METHODS);
bool makePrivate = category->isLocal();
// in case extract local methods is not enabled we don't add the methods
// of the category in case it is defined in the .m file.
@@ -3233,8 +3255,8 @@ void ClassDef::mergeCategory(ClassDef *category)
void ClassDef::addUsedClass(ClassDef *cd,const char *accessName,
Protection prot)
{
- static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
- static bool umlLook = Config_getBool("UML_LOOK");
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ static bool umlLook = Config_getBool(UML_LOOK);
if (prot==Private && !extractPrivate) return;
//printf("%s::addUsedClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
if (m_impl->usesImplClassDict==0)
@@ -3267,8 +3289,8 @@ void ClassDef::addUsedClass(ClassDef *cd,const char *accessName,
void ClassDef::addUsedByClass(ClassDef *cd,const char *accessName,
Protection prot)
{
- static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
- static bool umlLook = Config_getBool("UML_LOOK");
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ static bool umlLook = Config_getBool(UML_LOOK);
if (prot==Private && !extractPrivate) return;
//printf("%s::addUsedByClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
if (m_impl->usedByImplClassDict==0)
@@ -3532,8 +3554,8 @@ QCString ClassDef::compoundTypeString() const
QCString ClassDef::getOutputFileBase() const
{
- static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
- static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
if (!Doxygen::generatingXmlOutput)
{
Definition *scope=0;
@@ -3564,40 +3586,12 @@ QCString ClassDef::getOutputFileBase() const
// point to the template of which this class is an instance
return m_impl->templateMaster->getOutputFileBase();
}
- else if (isReference())
- {
- // point to the external location
- return m_impl->fileName;
- }
- else
- {
- // normal locally defined class
- return convertNameToFile(m_impl->fileName);
- }
+ return m_impl->fileName;
}
QCString ClassDef::getInstanceOutputFileBase() const
{
- if (isReference())
- {
- return m_impl->fileName;
- }
- else
- {
- return convertNameToFile(m_impl->fileName);
- }
-}
-
-QCString ClassDef::getFileBase() const
-{
- if (m_impl->templateMaster)
- {
- return m_impl->templateMaster->getFileBase();
- }
- else
- {
- return m_impl->fileName;
- }
+ return m_impl->fileName;
}
QCString ClassDef::getSourceFileBase() const
@@ -3855,8 +3849,8 @@ void ClassDef::getTemplateParameterLists(QList<ArgumentList> &lists) const
QCString ClassDef::qualifiedNameWithTemplateParameters(
QList<ArgumentList> *actualParams,int *actualParamIndex) const
{
- //static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
+ //static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ static bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
//printf("qualifiedNameWithTemplateParameters() localName=%s\n",localName().data());
QCString scName;
Definition *d=getOuterScope();
@@ -4034,8 +4028,8 @@ MemberList *ClassDef::getMemberList(MemberListType lt)
void ClassDef::addMemberToList(MemberListType lt,MemberDef *md,bool isBrief)
{
- static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
- static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
+ static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
MemberList *ml = createMemberList(lt);
ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
ml->append(md);
@@ -4090,7 +4084,7 @@ int ClassDef::countMemberDeclarations(MemberListType lt,ClassDef *inheritedFrom,
if (lt2!=1) count+=mg->countGroupedInheritedMembers((MemberListType)lt2);
}
}
- static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
+ static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (!inlineInheritedMembers) // show inherited members as separate lists
{
count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
@@ -4324,7 +4318,7 @@ void ClassDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QC
//printf(" writeDeclaration type=%d count=%d\n",lt2,ml2->numDecMembers());
ml2->writeDeclarations(ol,this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt);
}
- static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
+ static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (!inlineInheritedMembers) // show inherited members as separate lists
{
QPtrDict<void> visited(17);
@@ -4613,15 +4607,9 @@ QCString ClassDef::anchor() const
// point to the template of which this class is an instance
anc = m_impl->templateMaster->getOutputFileBase();
}
- else if (isReference())
- {
- // point to the external location
- anc = m_impl->fileName;
- }
else
{
- // normal locally defined class
- anc = convertNameToFile(m_impl->fileName);
+ anc = m_impl->fileName;
}
}
return anc;
@@ -4629,8 +4617,8 @@ QCString ClassDef::anchor() const
bool ClassDef::isEmbeddedInOuterScope() const
{
- static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
- static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
Definition *container = getOuterScope();
@@ -4750,3 +4738,14 @@ bool ClassDef::isAnonymous() const
{
return m_impl->isAnonymous;
}
+
+QCString ClassDef::collaborationGraphFileName() const
+{
+ return m_impl->collabFileName;
+}
+
+QCString ClassDef::inheritanceGraphFileName() const
+{
+ return m_impl->inheritFileName;
+}
+
diff --git a/src/classdef.h b/src/classdef.h
index 6cdd491..524bb96 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -108,7 +108,6 @@ class ClassDef : public Definition
/** Returns the unique base name (without extension) of the class's file on disk */
QCString getOutputFileBase() const;
QCString getInstanceOutputFileBase() const;
- QCString getFileBase() const;
/** Returns the base name for the source code file */
QCString getSourceFileBase() const;
@@ -130,6 +129,12 @@ class ClassDef : public Definition
/** returns TRUE if this class has a non-empty detailed description */
bool hasDetailedDescription() const;
+
+ /** returns the file name to use for the collaboration graph */
+ QCString collaborationGraphFileName() const;
+
+ /** returns the file name to use for the inheritance graph */
+ QCString inheritanceGraphFileName() const;
/** Returns the name as it is appears in the documentation */
QCString displayName(bool includeScope=TRUE) const;
diff --git a/src/classlist.cpp b/src/classlist.cpp
index 81b7d26..c752fd3 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -36,7 +36,7 @@ ClassList::~ClassList()
static int compItems(const ClassDef *c1,const ClassDef *c2)
{
- static bool b = Config_getBool("SORT_BY_SCOPE_NAME");
+ static bool b = Config_getBool(SORT_BY_SCOPE_NAME);
if (b)
{
return qstricmp(c1->name(), c2->name());
@@ -64,8 +64,8 @@ ClassListIterator::ClassListIterator(const ClassList &cllist) :
bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const
{
- static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
- static bool extractLocalClasses = Config_getBool("EXTRACT_LOCAL_CLASSES");
+ static bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
+ static bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
if (count()>0)
{
ClassSDict::Iterator sdi(*this);
@@ -94,7 +94,7 @@ bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const
void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
const char *header,bool localNames)
{
- static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (count()>0)
{
ClassSDict::Iterator sdi(*this);
@@ -118,10 +118,10 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
void ClassSDict::writeDocumentation(OutputList &ol,Definition * container)
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
- static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
- static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
+ static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
if (!inlineGroupedClasses && !inlineSimpleClasses) return;
if (count()>0)
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index 6784b3e..2c8effc 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -88,6 +88,8 @@ CommandMap cmdMap[] =
{ "secreflist", CMD_SECREFLIST },
{ "section", CMD_SECTION },
{ "snippet", CMD_SNIPPET },
+ { "snippetdoc", CMD_SNIPPETDOC },
+ { "snippetlineno", CMD_SNIPWITHLINES },
{ "subpage", CMD_SUBPAGE },
{ "subsection", CMD_SUBSECTION },
{ "subsubsection", CMD_SUBSUBSECTION },
@@ -130,6 +132,7 @@ CommandMap cmdMap[] =
{ "manonly", CMD_MANONLY },
{ "endmanonly", CMD_ENDMANONLY },
{ "includelineno", CMD_INCWITHLINES },
+ { "includedoc", CMD_INCLUDEDOC },
{ "inheritdoc", CMD_INHERITDOC },
{ "mscfile", CMD_MSCFILE },
{ "rtfonly", CMD_RTFONLY },
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index 92c906a..8cb529d 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -133,7 +133,10 @@ enum CommandType
CMD_SETSCOPE = 103,
CMD_PUNT = 104,
CMD_PLUS = 105,
- CMD_MINUS = 106
+ CMD_MINUS = 106,
+ CMD_INCLUDEDOC = 107,
+ CMD_SNIPPETDOC = 108,
+ CMD_SNIPWITHLINES= 109
};
enum HtmlTagType
diff --git a/src/code.l b/src/code.l
index ddf37d0..783cf7e 100644
--- a/src/code.l
+++ b/src/code.l
@@ -15,6 +15,8 @@
*
*/
%option never-interactive
+%option prefix="codeYY"
+
%{
/*
@@ -109,6 +111,7 @@ static int g_lastSpecialCContext;
static int g_lastStringContext;
static int g_lastSkipCppContext;
static int g_lastVerbStringContext;
+static int g_lastObjCCallContext;
static int g_memCallContext;
static int g_lastCContext;
static int g_skipInlineInitContext;
@@ -132,6 +135,7 @@ struct ObjCCallCtx
int id;
QCString methodName;
QCString objectTypeOrName;
+ QGString comment;
ClassDef *objectType;
MemberDef *objectVar;
MemberDef *method;
@@ -146,11 +150,13 @@ static int g_currentCtxId=0;
static int g_currentNameId=0;
static int g_currentObjId=0;
static int g_currentWordId=0;
+static int g_currentCommentId=0;
static QStack<ObjCCallCtx> g_contextStack;
static QIntDict<ObjCCallCtx> g_contextDict;
static QIntDict<QCString> g_nameDict;
static QIntDict<QCString> g_objectDict;
static QIntDict<QCString> g_wordDict;
+static QIntDict<QCString> g_commentDict;
static int g_braceCount=0;
static void saveObjCContext();
@@ -600,7 +606,7 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
Definition *d,
const char *text)
{
- static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS");
+ static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance()->addTooltip(d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
@@ -858,42 +864,51 @@ static bool getLinkInScope(const QCString &c, // scope
GroupDef *gd;
DBG_CTX((stderr,"getLinkInScope: trying `%s'::`%s' varOnly=%d\n",c.data(),m.data(),varOnly));
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef,FALSE,g_forceTagReference) &&
- md->isLinkable() && (!varOnly || md->isVariable()))
+ (!varOnly || md->isVariable()))
{
- //printf("found it %s!\n",md->qualifiedName().data());
- if (g_exampleBlock)
+ if (md->isLinkable())
{
- QCString anchor;
- anchor.sprintf("a%d",g_anchorCount);
- //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
- // g_exampleFile.data());
- if (md->addExample(anchor,g_exampleName,g_exampleFile))
+ //printf("found it %s!\n",md->qualifiedName().data());
+ if (g_exampleBlock)
{
- ol.writeCodeAnchor(anchor);
- g_anchorCount++;
+ QCString anchor;
+ anchor.sprintf("a%d",g_anchorCount);
+ //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
+ // g_exampleFile.data());
+ if (md->addExample(anchor,g_exampleName,g_exampleFile))
+ {
+ ol.writeCodeAnchor(anchor);
+ g_anchorCount++;
+ }
}
- }
-
- Definition *d = md->getOuterScope()==Doxygen::globalScope ?
- md->getFileDef() : md->getOuterScope();
- if (md->getGroupDef()) d = md->getGroupDef();
- if (d && d->isLinkable())
- {
- g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
- //printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
- // g_currentDefinition,g_currentMemberDef,g_insideBody);
- if (g_currentDefinition && g_currentMemberDef &&
- md!=g_currentMemberDef && g_insideBody && g_collectXRefs)
+ Definition *d = md->getOuterScope()==Doxygen::globalScope ?
+ md->getFileDef() : md->getOuterScope();
+ if (md->getGroupDef()) d = md->getGroupDef();
+ if (d && d->isLinkable())
{
- addDocCrossReference(g_currentMemberDef,md);
+ g_theCallContext.setScope(stripClassName(md->typeString(),md->getOuterScope()));
+ //printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
+ // g_currentDefinition,g_currentMemberDef,g_insideBody);
+
+ if (g_currentDefinition && g_currentMemberDef &&
+ md!=g_currentMemberDef && g_insideBody && g_collectXRefs)
+ {
+ addDocCrossReference(g_currentMemberDef,md);
+ }
+ //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
+
+ writeMultiLineCodeLink(ol,md, text ? text : memberText);
+ addToSearchIndex(text ? text : memberText);
+ return TRUE;
}
- //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data());
-
- writeMultiLineCodeLink(ol,md, text ? text : memberText);
- addToSearchIndex(text ? text : memberText);
- return TRUE;
- }
+ }
+ else // found member, but is is not linkable, so make sure content inside is not assign
+ // to the previous member, see bug762760
+ {
+ DBG_CTX((stderr,"unlinkable member %s\n",md->name().data()));
+ g_currentMemberDef = 0;
+ }
}
return FALSE;
}
@@ -1705,6 +1720,21 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
codifyLines(pWord->data());
}
}
+ else if (nc=='d') // comment block
+ {
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ QCString *pComment = g_commentDict.find(refId);
+ if (pComment)
+ {
+ startFontClass("comment");
+ codifyLines(pComment->data());
+ endFontClass();
+ }
+ }
else // illegal marker
{
ASSERT(!"invalid escape sequence");
@@ -1717,7 +1747,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
s[0]=c;s[1]=0;
codifyLines(s);
}
- }
+ }
//printf("%s %s]\n",ctx->objectTypeOrName.data(),ctx->methodName.data());
//printf("}=(type='%s',name='%s')",
// ctx->objectTypeOrName.data(),
@@ -1754,6 +1784,15 @@ static QCString escapeWord(const char *s)
return result;
}
+static QCString escapeComment(const char *s)
+{
+ QCString result;
+ result.sprintf("$d%d",g_currentCommentId);
+ g_commentDict.insert(g_currentCommentId,new QCString(s));
+ g_currentCommentId++;
+ return result;
+}
+
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
@@ -1827,6 +1866,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
%x ObjCCall
%x ObjCMName
%x ObjCSkipStr
+%x ObjCCallComment
%x OldStyleArgs
%x UsingName
%x RawString
@@ -2526,7 +2566,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
generateClassOrGlobalLink(*g_code,yytext);
g_name+=yytext;
}
-<Body>{SCOPENAME}/{BN}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
+<Body>{SCOPENAME}/{BN}*[:;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" , or int var : 5;
addType();
// changed this to generateFunctionLink, see bug 624514
//generateClassOrGlobalLink(*g_code,yytext,FALSE,TRUE);
@@ -2723,10 +2763,12 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_nameDict.setAutoDelete(TRUE);
g_objectDict.setAutoDelete(TRUE);
g_wordDict.setAutoDelete(TRUE);
+ g_commentDict.setAutoDelete(TRUE);
g_contextDict.clear();
g_nameDict.clear();
g_objectDict.clear();
g_wordDict.clear();
+ g_commentDict.clear();
g_currentCtxId = 0;
g_currentNameId = 0;
g_currentObjId = 0;
@@ -2811,13 +2853,13 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN(Body);
}
*/
-<ObjCCall,ObjCMName>"[" {
- saveObjCContext();
- g_currentCtx->format+=*yytext;
- BEGIN(ObjCCall);
- //printf("open\n");
- }
-<ObjCCall,ObjCMName>"]" {
+<ObjCCall,ObjCMName>"["|"{" {
+ saveObjCContext();
+ g_currentCtx->format+=*yytext;
+ BEGIN(ObjCCall);
+ //printf("open\n");
+ }
+<ObjCCall,ObjCMName>"]"|"}" {
g_currentCtx->format+=*yytext;
restoreObjCContext();
BEGIN(ObjCMName);
@@ -2829,6 +2871,23 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
//printf("close\n");
}
+<ObjCCall,ObjCMName>"//".* {
+ g_currentCtx->format+=escapeComment(yytext);
+ }
+<ObjCCall,ObjCMName>"/*" {
+ g_lastObjCCallContext = YY_START;
+ g_currentCtx->comment=yytext;
+ BEGIN(ObjCCallComment);
+ }
+<ObjCCallComment>"*/" {
+ g_currentCtx->comment+=yytext;
+ g_currentCtx->format+=escapeComment(g_currentCtx->comment);
+ BEGIN(g_lastObjCCallContext);
+ }
+<ObjCCallComment>[^*\n]+ { g_currentCtx->comment+=yytext; }
+<ObjCCallComment>"//"|"/*" { g_currentCtx->comment+=yytext; }
+<ObjCCallComment>\n { g_currentCtx->comment+=*yytext; }
+<ObjCCallComment>. { g_currentCtx->comment+=*yytext; }
<ObjCCall>{ID} {
g_currentCtx->format+=escapeObject(yytext);
if (g_braceCount==0)
@@ -2981,12 +3040,18 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
if (yytext[0]==')') // no a pointer cast
{
//printf("addVariable(%s,%s)\n",g_parmType.data(),g_parmName.data());
+ if (g_parmType.isEmpty())
+ {
+ g_parmType=g_parmName;
+ g_parmName.resize(0);
+ }
g_theVarContext.addVariable(g_parmType,g_parmName);
}
else
{
- g_parmType.resize(0);
+ g_parmType = g_parmName;
g_parmName.resize(0);
+ g_theVarContext.addVariable(g_parmType,g_parmName);
}
g_theCallContext.popScope();
g_inForEachExpression = FALSE;
@@ -3274,7 +3339,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<*>\n({B}*"//"[!/][^\n]*\n)+ { // remove special one-line comment
if (YY_START==SkipCPP) REJECT;
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_yyLineNr+=((QCString)yytext).contains('\n');
nextCodeLine();
@@ -3297,7 +3362,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN( g_lastSkipCppContext ) ;
}
<*>\n{B}*"//@"[{}].*\n { // remove one-line group marker
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_yyLineNr+=2;
nextCodeLine();
@@ -3315,7 +3380,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<*>\n{B}*"/*@"[{}] { // remove one-line group marker
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_lastSpecialCContext = YY_START;
g_yyLineNr++;
@@ -3334,7 +3399,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<*>^{B}*"//@"[{}].*\n { // remove one-line group marker
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_yyLineNr++;
nextCodeLine();
@@ -3347,7 +3412,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<*>^{B}*"/*@"[{}] { // remove multi-line group marker
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
@@ -3365,7 +3430,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<*>^{B}*"//"[!/][^\n]*\n { // remove special one-line comment
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_yyLineNr++;
//nextCodeLine();
@@ -3379,7 +3444,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<*>"//"[!/][^\n]*\n { // strip special one-line comment
if (YY_START==SkipComment || YY_START==SkipString) REJECT;
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
char c[2]; c[0]='\n'; c[1]=0;
codifyLines(c);
@@ -3398,7 +3463,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_forceTagReference = g_forceTagReference.mid(s+1,e-s-1);
}
<*>\n{B}*"/*"[!*]/[^/*] {
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_lastSpecialCContext = YY_START;
g_yyLineNr++;
@@ -3417,7 +3482,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<*>^{B}*"/*"[!*]/[^/*] { // special C comment block at a new line
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
@@ -3436,7 +3501,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<*>"/*"[!*]/[^/*] { // special C comment block half way a line
if (YY_START==SkipString) REJECT;
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_lastSpecialCContext = YY_START;
BEGIN(RemoveSpecialCComment);
@@ -3455,7 +3520,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<*>"/*"("!"?)"*/" {
if (YY_START==SkipString) REJECT;
- if (!Config_getBool("STRIP_CODE_COMMENTS"))
+ if (!Config_getBool(STRIP_CODE_COMMENTS))
{
startFontClass("comment");
g_code->codify(yytext);
@@ -3602,16 +3667,17 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
g_searchCtx = searchCtx;
g_collectXRefs = collectXRefs;
g_inFunctionTryBlock = FALSE;
- if (endLine!=-1)
- g_inputLines = endLine+1;
- else
- g_inputLines = countLines();
if (startLine!=-1)
g_yyLineNr = startLine;
else
g_yyLineNr = 1;
+ if (endLine!=-1)
+ g_inputLines = endLine+1;
+ else
+ g_inputLines = g_yyLineNr + countLines() - 1;
+
g_curlyCount = 0;
g_bodyCurlyCount = 0;
g_bracketCount = 0;
diff --git a/src/commentcnv.l b/src/commentcnv.l
index f65c073..6fea6c9 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -15,6 +15,8 @@
*
*/
%option never-interactive
+%option prefix="commentcnvYY"
+
%{
@@ -134,7 +136,7 @@ static void replaceCommentMarker(const char *s,int len)
static inline int computeIndent(const char *s)
{
int col=0;
- static int tabSize=Config_getInt("TAB_SIZE");
+ static int tabSize=Config_getInt(TAB_SIZE);
const char *p=s;
char c;
while ((c=*p++))
@@ -164,7 +166,7 @@ static inline void copyToOutput(const char *s,int len)
else if (len>0)
{
ADDARRAY(s,len);
- static int tabSize=Config_getInt("TAB_SIZE");
+ static int tabSize=Config_getInt(TAB_SIZE);
for (i=0;i<len;i++)
{
switch (s[i])
@@ -379,6 +381,12 @@ void replaceComment(int offset);
g_inRoseComment=TRUE;
BEGIN(SComment);
}
+<Scan>"//"[!\/]/.*\n[ \t]*"//"[|\/][ \t]*[@\\]"}" { // next line contains an end marker, see bug 752712
+ g_inSpecialComment=yytext[2]=='/' || yytext[2]=='!';
+ copyToOutput(yytext,(int)yyleng);
+ g_readLineCtx=YY_START;
+ BEGIN(ReadLine);
+ }
<Scan>"//"/.*\n { /* one line C++ comment */
g_inSpecialComment=yytext[2]=='/' || yytext[2]=='!';
copyToOutput(yytext,(int)yyleng);
@@ -459,7 +467,7 @@ void replaceComment(int offset);
}
BEGIN(VerbatimCode);
}
-<CComment,ReadLine>[\\@]("f$"|"f["|"f{"[a-z]*) {
+<CComment,ReadLine>[\\@]("f$"|"f["|"f{") {
copyToOutput(yytext,(int)yyleng);
g_blockName=&yytext[1];
if (g_blockName.at(1)=='[')
@@ -482,9 +490,9 @@ void replaceComment(int offset);
<Scan>. { /* any ather character */
copyToOutput(yytext,(int)yyleng);
}
-<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"docbookonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */
+<Verbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"f$"|"f]"|"f}") { /* end of verbatim block */
copyToOutput(yytext,(int)yyleng);
- if (yytext[1]=='f') // end of formula
+ if (&yytext[1]==g_blockName) // end of formula
{
BEGIN(g_lastCommentContext);
}
@@ -983,7 +991,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
g_outBuf = outBuf;
g_inBufPos = 0;
g_col = 0;
- g_mlBrief = Config_getBool("MULTILINE_CPP_IS_BRIEF");
+ g_mlBrief = Config_getBool(MULTILINE_CPP_IS_BRIEF);
g_skip = FALSE;
g_fileName = fileName;
g_lang = getLanguageFromFileName(fileName);
diff --git a/src/commentscan.l b/src/commentscan.l
index ffed075..fad09d9 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -14,6 +14,8 @@
*/
%option never-interactive
+%option prefix="commentscanYY"
+
%{
/*
@@ -254,6 +256,7 @@ static DocCmdMap docCmdMap[] =
{ "result", 0, TRUE },
{ "return", 0, TRUE },
{ "returns", 0, TRUE },
+ { "exception", 0, TRUE },
{ "retval", 0, TRUE },
{ "sa", 0, TRUE },
{ "see", 0, TRUE },
@@ -1153,7 +1156,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<Comment>{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command
QCString langId = QString(yytext).stripWhiteSpace().data()+2;
if (!langId.isEmpty() &&
- qstricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)!=0)
+ qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)!=0)
{ // enable language specific section
BEGIN(SkipLang);
}
@@ -2176,7 +2179,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<SkipLang>[\\@]"~"[a-zA-Z-]* { /* language switch */
QCString langId = &yytext[2];
if (langId.isEmpty() ||
- qstricmp(Config_getEnum("OUTPUT_LANGUAGE"),langId)==0)
+ qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)==0)
{ // enable language specific section
BEGIN(Comment);
}
@@ -2722,7 +2725,7 @@ static bool handleHideCallergraph(const QCString &)
static bool handleInternal(const QCString &)
{
- if (!Config_getBool("INTERNAL_DOCS"))
+ if (!Config_getBool(INTERNAL_DOCS))
{
// make sure some whitespace before a \internal command
// is not treated as "documentation"
diff --git a/src/condparser.cpp b/src/condparser.cpp
index b3bea3a..69f8d29 100644
--- a/src/condparser.cpp
+++ b/src/condparser.cpp
@@ -303,7 +303,7 @@ bool CondParser::evalOperator(int opId, bool lhs, bool rhs)
*/
bool CondParser::evalVariable(const char *varName)
{
- if (Config_getList("ENABLED_SECTIONS").find(varName)==-1) return FALSE;
+ if (Config_getList(ENABLED_SECTIONS).find(varName)==-1) return FALSE;
return TRUE;
}
diff --git a/src/config.h b/src/config.h
index 344e007..e86e950 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,13 +1,10 @@
/******************************************************************************
*
- *
- *
- *
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -19,558 +16,58 @@
#ifndef CONFIG_H
#define CONFIG_H
-#include <qstrlist.h>
-#include <qdict.h>
-#include <qlist.h>
-#include <qregexp.h>
-#include "ftextstream.h"
-
-
-/** Abstract base class for any configuration option.
- */
-class ConfigOption
-{
- friend class Config;
-
- public:
-
- /*! The type of option */
- enum OptionType
- {
- O_Info, //<! A section header
- O_List, //<! A list of items
- O_Enum, //<! A fixed set of items
- O_String, //<! A single item
- O_Int, //<! An integer value
- O_Bool, //<! A boolean value
- O_Obsolete, //<! An obsolete option
- O_Disabled //<! Disabled compile time option
- };
- enum
- {
- /*! Maximum length of an option in the config file. Used for
- * alignment purposes.
- */
- MAX_OPTION_LENGTH = 23
- };
- ConfigOption(OptionType t) : m_kind(t)
- {
- m_spaces.fill(' ',40);
- }
- virtual ~ConfigOption()
- {
- }
-
- /*! returns the kind of option this is. */
- OptionType kind() const { return m_kind; }
- QCString name() const { return m_name; }
- QCString docs() const { return m_doc; }
-
- QCString dependsOn() const { return m_dependency; }
- void addDependency(const char *dep) { m_dependency = dep; }
- void setEncoding(const QCString &e) { m_encoding = e; }
- void setUserComment(const QCString &u) { m_userComment += u; }
-
- protected:
- virtual void writeTemplate(FTextStream &t,bool sl,bool upd) = 0;
- virtual void convertStrToVal() {}
- virtual void substEnvVars() = 0;
- virtual void init() {}
-
- void writeBoolValue(FTextStream &t,bool v);
- void writeIntValue(FTextStream &t,int i);
- void writeStringValue(FTextStream &t,QCString &s);
- void writeStringList(FTextStream &t,QStrList &l);
-
- QCString m_spaces;
- QCString m_name;
- QCString m_doc;
- QCString m_dependency;
- QCString m_encoding;
- QCString m_userComment;
- OptionType m_kind;
-};
-
-/** Section marker for grouping the configuration options.
- */
-class ConfigInfo : public ConfigOption
-{
- public:
- ConfigInfo(const char *name,const char *doc)
- : ConfigOption(O_Info)
- {
- m_name = name;
- m_doc = doc;
- }
- void writeTemplate(FTextStream &t, bool sl,bool);
- void substEnvVars() {}
-};
-
-/** Class respresenting a list type option.
- */
-class ConfigList : public ConfigOption
-{
- public:
- enum WidgetType { String, File, Dir, FileAndDir };
- ConfigList(const char *name,const char *doc)
- : ConfigOption(O_List)
- {
- m_name = name;
- m_doc = doc;
- m_widgetType = String;
- }
- void addValue(const char *v) { m_value.append(v); }
- void setWidgetType(WidgetType w) { m_widgetType = w; }
- WidgetType widgetType() const { return m_widgetType; }
- QStrList *valueRef() { return &m_value; }
- void writeTemplate(FTextStream &t,bool sl,bool);
- void substEnvVars();
- void init() { m_value.clear(); }
- private:
- QStrList m_value;
- WidgetType m_widgetType;
-};
-
-/** Class representing an enum type option.
- */
-class ConfigEnum : public ConfigOption
-{
- public:
- ConfigEnum(const char *name,const char *doc,const char *defVal)
- : ConfigOption(O_Enum)
- {
- m_name = name;
- m_doc = doc;
- m_value = defVal;
- m_defValue = defVal;
- }
- void addValue(const char *v) { m_valueRange.append(v); }
- QStrListIterator iterator()
- {
- return QStrListIterator(m_valueRange);
- }
- QCString *valueRef() { return &m_value; }
- void substEnvVars();
- void writeTemplate(FTextStream &t,bool sl,bool);
- void init() { m_value = m_defValue.copy(); }
-
- private:
- QStrList m_valueRange;
- QCString m_value;
- QCString m_defValue;
-};
-
-/** Class representing a string type option.
- */
-class ConfigString : public ConfigOption
-{
- public:
- enum WidgetType { String, File, Dir, Image };
- ConfigString(const char *name,const char *doc)
- : ConfigOption(O_String)
- {
- m_name = name;
- m_doc = doc;
- m_widgetType = String;
- }
- ~ConfigString()
- {
- }
- void setWidgetType(WidgetType w) { m_widgetType = w; }
- WidgetType widgetType() const { return m_widgetType; }
- void setDefaultValue(const char *v) { m_defValue = v; }
- QCString *valueRef() { return &m_value; }
- void writeTemplate(FTextStream &t,bool sl,bool);
- void substEnvVars();
- void init() { m_value = m_defValue.copy(); }
-
- private:
- QCString m_value;
- QCString m_defValue;
- WidgetType m_widgetType;
-};
-
-/** Class representing an integer type option.
- */
-class ConfigInt : public ConfigOption
-{
- public:
- ConfigInt(const char *name,const char *doc,int minVal,int maxVal,int defVal)
- : ConfigOption(O_Int)
- {
- m_name = name;
- m_doc = doc;
- m_value = defVal;
- m_defValue = defVal;
- m_minVal = minVal;
- m_maxVal = maxVal;
- }
- QCString *valueStringRef() { return &m_valueString; }
- int *valueRef() { return &m_value; }
- int minVal() const { return m_minVal; }
- int maxVal() const { return m_maxVal; }
- void convertStrToVal();
- void substEnvVars();
- void writeTemplate(FTextStream &t,bool sl,bool upd);
- void init() { m_value = m_defValue; }
- private:
- int m_value;
- int m_defValue;
- int m_minVal;
- int m_maxVal;
- QCString m_valueString;
-};
-
-/** Class representing a Boolean type option.
- */
-class ConfigBool : public ConfigOption
-{
- public:
- ConfigBool(const char *name,const char *doc,bool defVal)
- : ConfigOption(O_Bool)
- {
- m_name = name;
- m_doc = doc;
- m_value = defVal;
- m_defValue = defVal;
- }
- QCString *valueStringRef() { return &m_valueString; }
- bool *valueRef() { return &m_value; }
- void convertStrToVal();
- void substEnvVars();
- void setValueString(const QCString &v) { m_valueString = v; }
- void writeTemplate(FTextStream &t,bool sl,bool upd);
- void init() { m_value = m_defValue; }
- private:
- bool m_value;
- bool m_defValue;
- QCString m_valueString;
-};
-
-/** Section marker for obsolete options
- */
-class ConfigObsolete : public ConfigOption
-{
- public:
- ConfigObsolete(const char *name) : ConfigOption(O_Obsolete)
- { m_name = name; }
- void writeTemplate(FTextStream &,bool,bool);
- void substEnvVars() {}
-};
-
-/** Section marker for compile time optional options
- */
-class ConfigDisabled : public ConfigOption
-{
- public:
- ConfigDisabled(const char *name) : ConfigOption(O_Disabled)
- { m_name = name; }
- void writeTemplate(FTextStream &,bool,bool);
- void substEnvVars() {}
-};
-
-
-// some convenience macros for access the config options
-#define Config_getString(val) Config::instance()->getString(__FILE__,__LINE__,val)
-#define Config_getInt(val) Config::instance()->getInt(__FILE__,__LINE__,val)
-#define Config_getList(val) Config::instance()->getList(__FILE__,__LINE__,val)
-#define Config_getEnum(val) Config::instance()->getEnum(__FILE__,__LINE__,val)
-#define Config_getBool(val) Config::instance()->getBool(__FILE__,__LINE__,val)
+class FTextStream;
+
+// note: this header file is generated from config.xml
+#include "configvalues.h"
+
+//! @{
+//! some convenience macros for accessing the config options
+//! mainly done like this for backward compatibility
+#if DYNAMIC_LOOKUP // for debug purposes
+#define Config_getString(val) (ConfigValues::instance().*((ConfigValues::InfoString*)ConfigValues::instance().get(#val))->item)
+#define Config_getBool(val) (ConfigValues::instance().*((ConfigValues::InfoBool*)ConfigValues::instance().get(#val))->item)
+#define Config_getInt(val) (ConfigValues::instance().*((ConfigValues::InfoInt*)ConfigValues::instance().get(#val))->item)
+#define Config_getEnum(val) (ConfigValues::instance().*((ConfigValues::InfoString*)ConfigValues::instance().get(#val))->item)
+#define Config_getList(val) (ConfigValues::instance().*((ConfigValues::InfoList*)ConfigValues::instance().get(#val))->item)
+#else // direct access
+#define Config_getString(val) (ConfigValues::instance().val)
+#define Config_getBool(val) (ConfigValues::instance().val)
+#define Config_getInt(val) (ConfigValues::instance().val)
+#define Config_getEnum(val) (ConfigValues::instance().val)
+#define Config_getList(val) (ConfigValues::instance().val)
+#endif
+//! @}
-/** Singleton for configuration variables.
- *
- * This object holds the global static variables
- * read from a user-supplied configuration file.
- * The static member instance() can be used to get
- * a pointer to the one and only instance.
- *
- * Set all variables to their default values by
- * calling Config::instance()->init()
- *
- */
-class Config
+/** \brief Public function to deal with the configuration file. */
+namespace Config
{
- public:
- /////////////////////////////
- // public API
- /////////////////////////////
-
- /*! Returns the one and only instance of this class */
- static Config *instance()
- {
- if (m_instance==0) m_instance = new Config;
- return m_instance;
- }
- /*! Delete the instance */
- static void deleteInstance()
- {
- delete m_instance;
- m_instance=0;
- }
-
- /*! Returns an iterator that can by used to iterate over the
- * configuration options.
- */
- QListIterator<ConfigOption> iterator()
- {
- return QListIterator<ConfigOption>(*m_options);
- }
-
- /*!
- * @name Getting configuration values.
- * @{
- */
-
- /*! Returns the value of the string option with name \a fileName.
- * The arguments \a num and \a name are for debugging purposes only.
- * There is a convenience function Config_getString() for this.
- */
- QCString &getString(const char *fileName,int num,const char *name) const;
-
- /*! Returns the value of the list option with name \a fileName.
- * The arguments \a num and \a name are for debugging purposes only.
- * There is a convenience function Config_getList() for this.
- */
- QStrList &getList(const char *fileName,int num,const char *name) const;
-
- /*! Returns the value of the enum option with name \a fileName.
- * The arguments \a num and \a name are for debugging purposes only.
- * There is a convenience function Config_getEnum() for this.
- */
- QCString &getEnum(const char *fileName,int num,const char *name) const;
-
- /*! Returns the value of the integer option with name \a fileName.
- * The arguments \a num and \a name are for debugging purposes only.
- * There is a convenience function Config_getInt() for this.
- */
- int &getInt(const char *fileName,int num,const char *name) const;
-
- /*! Returns the value of the boolean option with name \a fileName.
- * The arguments \a num and \a name are for debugging purposes only.
- * There is a convenience function Config_getBool() for this.
- */
- bool &getBool(const char *fileName,int num,const char *name) const;
-
- /*! Returns the ConfigOption corresponding with \a name or 0 if
- * the option is not supported.
- */
- ConfigOption *get(const char *name) const
- {
- return m_dict->find(name);
- }
- /* @} */
-
- /*!
- * @name Adding configuration options.
- * @{
- */
-
- /*! Starts a new configuration section with \a name and description \a doc.
- * \returns An object representing the option.
- */
- ConfigInfo *addInfo(const char *name,const char *doc)
- {
- ConfigInfo *result = new ConfigInfo(name,doc);
- m_options->append(result);
- return result;
- }
-
- /*! Adds a new string option with \a name and documentation \a doc.
- * \returns An object representing the option.
- */
- ConfigString *addString(const char *name,
- const char *doc)
- {
- ConfigString *result = new ConfigString(name,doc);
- m_options->append(result);
- m_dict->insert(name,result);
- return result;
- }
-
- /*! Adds a new enumeration option with \a name and documentation \a doc
- * and initial value \a defVal.
- * \returns An object representing the option.
- */
- ConfigEnum *addEnum(const char *name,
- const char *doc,
- const char *defVal)
- {
- ConfigEnum *result = new ConfigEnum(name,doc,defVal);
- m_options->append(result);
- m_dict->insert(name,result);
- return result;
- }
-
- /*! Adds a new string option with \a name and documentation \a doc.
- * \returns An object representing the option.
- */
- ConfigList *addList(const char *name,
- const char *doc)
- {
- ConfigList *result = new ConfigList(name,doc);
- m_options->append(result);
- m_dict->insert(name,result);
- return result;
- }
-
- /*! Adds a new integer option with \a name and documentation \a doc.
- * The integer has a range between \a minVal and \a maxVal and a
- * default value of \a defVal.
- * \returns An object representing the option.
- */
- ConfigInt *addInt(const char *name,
- const char *doc,
- int minVal,int maxVal,int defVal)
- {
- ConfigInt *result = new ConfigInt(name,doc,minVal,maxVal,defVal);
- m_options->append(result);
- m_dict->insert(name,result);
- return result;
- }
-
- /*! Adds a new boolean option with \a name and documentation \a doc.
- * The boolean has a default value of \a defVal.
- * \returns An object representing the option.
- */
- ConfigBool *addBool(const char *name,
- const char *doc,
- bool defVal)
- {
- ConfigBool *result = new ConfigBool(name,doc,defVal);
- m_options->append(result);
- m_dict->insert(name,result);
- return result;
- }
- /*! Adds an option that has become obsolete. */
- ConfigOption *addObsolete(const char *name)
- {
- ConfigObsolete *option = new ConfigObsolete(name);
- m_dict->insert(name,option);
- m_obsolete->append(option);
- return option;
- }
- /*! Adds an option that has been disabled at compile time. */
- ConfigOption *addDisabled(const char *name)
- {
- ConfigDisabled *option = new ConfigDisabled(name);
- m_dict->insert(name,option);
- m_disabled->append(option);
- return option;
- }
- /*! @} */
-
- /*! Writes a template configuration to stream \a t. If \a shortIndex
- * is \c TRUE the description of each configuration option will
- * be omitted.
- */
- void writeTemplate(FTextStream &t,bool shortIndex,bool updateOnly);
-
- void setHeader(const char *header) { m_header = header; }
-
- /////////////////////////////
- // internal API
- /////////////////////////////
-
- /*! Converts the string values read from the configuration file
- * to real values for non-string type options (like int, and bools)
- */
- void convertStrToVal();
-
- /*! Replaces references to environment variable by the actual value
- * of the environment variable.
- */
- void substituteEnvironmentVars();
-
- /*! Checks if the values of the variable are correct, adjusts them
- * if needed, and report any errors.
- */
- void check();
-
- /*! Initialize config variables to their default value */
- void init();
-
- /*! Parse a configuration data in string \a str.
- * \returns TRUE if successful, or FALSE if the string could not be
- * parsed.
- */
- //bool parseString(const char *fn,const char *str);
- bool parseString(const char *fn,const char *str,bool upd = FALSE);
-
- /*! Parse a configuration file with name \a fn.
- * \returns TRUE if successful, FALSE if the file could not be
- * opened or read.
- */
- bool parse(const char *fn,bool upd = FALSE);
-
- /*! Called from the constructor, will add doxygen's default options
- * to the configuration object
- */
- void create();
-
- /*! Append user start comment
- */
- void appendStartComment(const QCString &u)
- {
- m_startComment += u;
- }
- /*! Append user comment
- */
- void appendUserComment(const QCString &u)
- {
- m_userComment += u;
- }
- /*! Take the user start comment and reset it internally
- * \returns user start comment
- */
- QCString takeStartComment()
- {
- QCString result=m_startComment;
- m_startComment.resize(0);
- return result.replace(QRegExp("\r"),"");
- }
- /*! Take the user comment and reset it internally
- * \returns user comment
- */
- QCString takeUserComment()
- {
- QCString result=m_userComment;
- m_userComment.resize(0);
- return result.replace(QRegExp("\r"),"");
- }
-
- protected:
-
- Config()
- {
- m_options = new QList<ConfigOption>;
- m_obsolete = new QList<ConfigOption>;
- m_disabled = new QList<ConfigOption>;
- m_dict = new QDict<ConfigOption>(257);
- m_options->setAutoDelete(TRUE);
- m_obsolete->setAutoDelete(TRUE);
- m_disabled->setAutoDelete(TRUE);
- m_initialized = FALSE;
- create();
- }
- ~Config()
- {
- delete m_options;
- delete m_obsolete;
- delete m_disabled;
- delete m_dict;
- }
-
- private:
- void checkFileName(const char *);
- QList<ConfigOption> *m_options;
- QList<ConfigOption> *m_obsolete;
- QList<ConfigOption> *m_disabled;
- QDict<ConfigOption> *m_dict;
- static Config *m_instance;
- QCString m_startComment;
- QCString m_userComment;
- bool m_initialized;
- QCString m_header;
-};
+ /*! Initialize configuration variables to their default value */
+ void init();
+
+ /*! Writes a template configuration to stream \a t. If \a shortList
+ * is \c TRUE the description of each configuration option will
+ * be omitted.
+ */
+ void writeTemplate(FTextStream &t,bool shortList,bool updateOnly=FALSE);
+
+ /*! Parses a configuration file with name \a fn.
+ * \returns TRUE if successful, FALSE if the file could not be
+ * opened or read.
+ */
+ bool parse(const char *fileName,bool update=FALSE);
+
+ /*! Post processed the parsed data. Replaces raw string values by the actual values.
+ * and replaces environment variables.
+ * \param clearHeaderAndFooter set to TRUE when writing header and footer templates.
+ */
+ void postProcess(bool clearHeaderAndFooter);
+
+ /*! Check the validity of the parsed options and correct or warn the user where needed. */
+ void checkAndCorrect();
+
+ /*! Clean up any data */
+ void deinit();
+}
#endif
diff --git a/src/config.xml b/src/config.xml
index 0aa8fda..483eff1 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -617,6 +617,16 @@ Go to the <a href="commands.html">next</a> section or return to the
]]>
</docs>
</option>
+ <option type='int' id='TOC_INCLUDE_HEADINGS' minval='0' maxval='99' defval='0' depends='MARKDOWN_SUPPORT'>
+ <docs>
+<![CDATA[
+ When the \c TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings
+ up to that level are automatically included in the table of contents, even if
+ they do not have an id attribute.
+ \note This feature currently applies only to Markdown headings.
+]]>
+ </docs>
+ </option>
<option type='bool' id='AUTOLINK_SUPPORT' defval='1'>
<docs>
<![CDATA[
@@ -1327,6 +1337,9 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
<value name='*.py'/>
<value name='*.pyw'/>
<value name='*.f90'/>
+ <value name='*.f95'/>
+ <value name='*.f03'/>
+ <value name='*.f08'/>
<value name='*.f'/>
<value name='*.for'/>
<value name='*.tcl'/>
@@ -1334,8 +1347,6 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
<value name='*.vhdl'/>
<value name='*.ucf'/>
<value name='*.qsf'/>
- <value name='*.as'/>
- <value name='*.js'/>
</option>
<option type='bool' id='RECURSIVE' defval='0'>
<docs>
@@ -3403,6 +3414,14 @@ to be found in the default search path.
]]>
</docs>
</option>
+ <option type='string' id='PLANTUML_CFG_FILE' format='file' defval=''>
+ <docs>
+<![CDATA[
+ When using plantuml, the \c PLANTUML_CFG_FILE tag can be used to specify a configuration
+ file for plantuml.
+]]>
+ </docs>
+ </option>
<option type='list' id='PLANTUML_INCLUDE_PATH' format='dir' defval=''>
<docs>
<![CDATA[
diff --git a/src/configgen.py b/src/configgen.py
index 1647fa2..3b86954 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -353,6 +353,48 @@ def parseGroups(node):
if n.nodeType == Node.ELEMENT_NODE:
parseOption(n)
+def parseGroupMap(node):
+ map = { 'bool':'bool', 'string':'QCString', 'enum':'QCString', 'int':'int', 'list':'QStrList' }
+ for n in node.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ setting = n.getAttribute('setting')
+ if len(setting) > 0:
+ print("#if %s" % (setting))
+ type = n.getAttribute('type')
+ name = n.getAttribute('id')
+ if type in map:
+ print(" %-8s %s;" % (map[type],name))
+ if len(setting) > 0:
+ print("#endif")
+
+def parseGroupInit(node):
+ map = { 'bool':'Bool', 'string':'String', 'enum':'Enum', 'int':'Int', 'list':'List' }
+ for n in node.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ setting = n.getAttribute('setting')
+ if len(setting) > 0:
+ print("#if %s" % (setting))
+ type = n.getAttribute('type')
+ name = n.getAttribute('id')
+ if type in map:
+ print(" %-25s = ConfigImpl::instance()->get%s(__FILE__,__LINE__,\"%s\");" % (name,map[type],name))
+ if len(setting) > 0:
+ print("#endif")
+
+def parseGroupMapInit(node):
+ map = { 'bool':'Bool', 'string':'String', 'enum':'String', 'int':'Int', 'list':'List' }
+ for n in node.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ setting = n.getAttribute('setting')
+ if len(setting) > 0:
+ print("#if %s" % (setting))
+ type = n.getAttribute('type')
+ name = n.getAttribute('id')
+ if type in map:
+ print(" m_map.insert(\"%s\",new Info%s(&ConfigValues::%s));" % (name,map[type],name))
+ if len(setting) > 0:
+ print("#endif")
+
def parseGroupCDocs(node):
for n in node.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
@@ -556,8 +598,8 @@ def parseFooterDoc(node):
def main():
- if len(sys.argv)<3 or (not sys.argv[1] in ['-doc','-cpp','-wiz']):
- sys.exit('Usage: %s -doc|-cpp|-wiz config.xml' % sys.argv[0])
+ if len(sys.argv)<3 or (not sys.argv[1] in ['-doc','-cpp','-wiz','-maph','-maps']):
+ sys.exit('Usage: %s -doc|-cpp|-wiz|-maph|-maps config.xml' % sys.argv[0])
try:
doc = xml.dom.minidom.parse(sys.argv[2])
except Exception as inst:
@@ -597,6 +639,89 @@ def main():
if n.nodeType == Node.ELEMENT_NODE:
if (n.nodeName == "footer"):
parseFooterDoc(n)
+ elif (sys.argv[1] == "-maph"):
+ print("/* WARNING: This file is generated!")
+ print(" * Do not edit this file, but edit config.xml instead and run")
+ print(" * python configgen.py -map config.xml to regenerate this file!")
+ print(" */")
+ print("#ifndef CONFIGVALUES_H")
+ print("#define CONFIGVALUES_H")
+ print("")
+ print("#include <qdict.h>")
+ print("#include <qstrlist.h>")
+ print("#include <qcstring.h>")
+ print("#include \"settings.h\"")
+ print("")
+ print("class ConfigValues")
+ print("{")
+ print(" public:")
+ print(" static ConfigValues &instance() { static ConfigValues theInstance; return theInstance; }")
+ for n in elem.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ if (n.nodeName == "group"):
+ parseGroupMap(n)
+ print(" void init();")
+ print(" struct Info")
+ print(" {")
+ print(" enum Type { Bool, Int, String, List, Unknown };")
+ print(" Info(Type t) : type(t) {}")
+ print(" virtual ~Info() {}")
+ print(" Type type;")
+ print(" };")
+ print(" struct InfoBool : public Info")
+ print(" {")
+ print(" InfoBool(bool ConfigValues::*ptm) : Info(Info::Bool), item(ptm) {}")
+ print(" bool ConfigValues::*item;")
+ print(" };")
+ print(" struct InfoInt : public Info")
+ print(" {")
+ print(" InfoInt(int ConfigValues::*ptm) : Info(Info::Int), item(ptm) {}")
+ print(" int ConfigValues::*item;")
+ print(" };")
+ print(" struct InfoString : public Info")
+ print(" {")
+ print(" InfoString(QCString ConfigValues::*ptm) : Info(Info::String), item(ptm) {}")
+ print(" QCString ConfigValues::*item;")
+ print(" };")
+ print(" struct InfoList : public Info")
+ print(" {")
+ print(" InfoList(QStrList ConfigValues::*ptm) : Info(Info::List), item(ptm) {}")
+ print(" QStrList ConfigValues::*item;")
+ print(" };")
+ print(" const Info *get(const char *tag) const")
+ print(" {")
+ print(" return m_map.find(tag);")
+ print(" }")
+ print(" private:")
+ print(" ConfigValues();")
+ print(" QDict<Info> m_map;")
+ print("};")
+ print("")
+ print("#endif")
+ elif (sys.argv[1] == "-maps"):
+ print("/* WARNING: This file is generated!")
+ print(" * Do not edit this file, but edit config.xml instead and run")
+ print(" * python configgen.py -maps config.xml to regenerate this file!")
+ print(" */")
+ print("#include \"configvalues.h\"")
+ print("#include \"configimpl.h\"")
+ print("")
+ print("ConfigValues::ConfigValues() : m_map(257)")
+ print("{")
+ print(" m_map.setAutoDelete(TRUE);")
+ for n in elem.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ if (n.nodeName == "group"):
+ parseGroupMapInit(n)
+ print("}")
+ print("")
+ print("void ConfigValues::init()")
+ print("{")
+ for n in elem.childNodes:
+ if n.nodeType == Node.ELEMENT_NODE:
+ if (n.nodeName == "group"):
+ parseGroupInit(n)
+ print("}")
elif (sys.argv[1] == "-cpp"):
print("/* WARNING: This file is generated!")
print(" * Do not edit this file, but edit config.xml instead and run")
@@ -604,11 +729,11 @@ def main():
print(" */")
print("")
print("#include \"configoptions.h\"")
- print("#include \"config.h\"")
+ print("#include \"configimpl.h\"")
print("#include \"portable.h\"")
print("#include \"settings.h\"")
print("")
- print("void addConfigOptions(Config *cfg)")
+ print("void addConfigOptions(ConfigImpl *cfg)")
print("{")
print(" ConfigString *cs;")
print(" ConfigEnum *ce;")
diff --git a/src/configimpl.h b/src/configimpl.h
new file mode 100644
index 0000000..c901198
--- /dev/null
+++ b/src/configimpl.h
@@ -0,0 +1,571 @@
+/******************************************************************************
+ *
+ *
+ *
+ *
+ * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef CONFIGIMPL_H
+#define CONFIGIMPL_H
+
+#include <qstrlist.h>
+#include <qdict.h>
+#include <qlist.h>
+#include <qregexp.h>
+#include "ftextstream.h"
+
+
+/** Abstract base class for any configuration option.
+ */
+class ConfigOption
+{
+ friend class ConfigImpl;
+
+ public:
+
+ /*! The type of option */
+ enum OptionType
+ {
+ O_Info, //<! A section header
+ O_List, //<! A list of items
+ O_Enum, //<! A fixed set of items
+ O_String, //<! A single item
+ O_Int, //<! An integer value
+ O_Bool, //<! A boolean value
+ O_Obsolete, //<! An obsolete option
+ O_Disabled //<! Disabled compile time option
+ };
+ enum
+ {
+ /*! Maximum length of an option in the config file. Used for
+ * alignment purposes.
+ */
+ MAX_OPTION_LENGTH = 23
+ };
+ ConfigOption(OptionType t) : m_kind(t)
+ {
+ m_spaces.fill(' ',40);
+ }
+ virtual ~ConfigOption()
+ {
+ }
+
+ /*! returns the kind of option this is. */
+ OptionType kind() const { return m_kind; }
+ QCString name() const { return m_name; }
+ QCString docs() const { return m_doc; }
+
+ QCString dependsOn() const { return m_dependency; }
+ void addDependency(const char *dep) { m_dependency = dep; }
+ void setEncoding(const QCString &e) { m_encoding = e; }
+ void setUserComment(const QCString &u) { m_userComment += u; }
+
+ protected:
+ virtual void writeTemplate(FTextStream &t,bool sl,bool upd) = 0;
+ virtual void convertStrToVal() {}
+ virtual void substEnvVars() = 0;
+ virtual void init() {}
+
+ void writeBoolValue(FTextStream &t,bool v);
+ void writeIntValue(FTextStream &t,int i);
+ void writeStringValue(FTextStream &t,QCString &s);
+ void writeStringList(FTextStream &t,QStrList &l);
+
+ QCString m_spaces;
+ QCString m_name;
+ QCString m_doc;
+ QCString m_dependency;
+ QCString m_encoding;
+ QCString m_userComment;
+ OptionType m_kind;
+};
+
+/** Section marker for grouping the configuration options.
+ */
+class ConfigInfo : public ConfigOption
+{
+ public:
+ ConfigInfo(const char *name,const char *doc)
+ : ConfigOption(O_Info)
+ {
+ m_name = name;
+ m_doc = doc;
+ }
+ void writeTemplate(FTextStream &t, bool sl,bool);
+ void substEnvVars() {}
+};
+
+/** Class respresenting a list type option.
+ */
+class ConfigList : public ConfigOption
+{
+ public:
+ enum WidgetType { String, File, Dir, FileAndDir };
+ ConfigList(const char *name,const char *doc)
+ : ConfigOption(O_List)
+ {
+ m_name = name;
+ m_doc = doc;
+ m_widgetType = String;
+ }
+ void addValue(const char *v) { m_defaultValue.append(v); }
+ void setWidgetType(WidgetType w) { m_widgetType = w; }
+ WidgetType widgetType() const { return m_widgetType; }
+ QStrList *valueRef() { return &m_value; }
+ void writeTemplate(FTextStream &t,bool sl,bool);
+ void substEnvVars();
+ void init() { m_value = m_defaultValue; }
+ private:
+ QStrList m_value;
+ QStrList m_defaultValue;
+ WidgetType m_widgetType;
+};
+
+/** Class representing an enum type option.
+ */
+class ConfigEnum : public ConfigOption
+{
+ public:
+ ConfigEnum(const char *name,const char *doc,const char *defVal)
+ : ConfigOption(O_Enum)
+ {
+ m_name = name;
+ m_doc = doc;
+ m_value = defVal;
+ m_defValue = defVal;
+ }
+ void addValue(const char *v) { m_valueRange.append(v); }
+ QStrListIterator iterator()
+ {
+ return QStrListIterator(m_valueRange);
+ }
+ QCString *valueRef() { return &m_value; }
+ void substEnvVars();
+ void writeTemplate(FTextStream &t,bool sl,bool);
+ void init() { m_value = m_defValue.copy(); }
+
+ private:
+ QStrList m_valueRange;
+ QCString m_value;
+ QCString m_defValue;
+};
+
+/** Class representing a string type option.
+ */
+class ConfigString : public ConfigOption
+{
+ public:
+ enum WidgetType { String, File, Dir, Image };
+ ConfigString(const char *name,const char *doc)
+ : ConfigOption(O_String)
+ {
+ m_name = name;
+ m_doc = doc;
+ m_widgetType = String;
+ }
+ ~ConfigString()
+ {
+ }
+ void setWidgetType(WidgetType w) { m_widgetType = w; }
+ WidgetType widgetType() const { return m_widgetType; }
+ void setDefaultValue(const char *v) { m_defValue = v; }
+ QCString *valueRef() { return &m_value; }
+ void writeTemplate(FTextStream &t,bool sl,bool);
+ void substEnvVars();
+ void init() { m_value = m_defValue.copy(); }
+
+ private:
+ QCString m_value;
+ QCString m_defValue;
+ WidgetType m_widgetType;
+};
+
+/** Class representing an integer type option.
+ */
+class ConfigInt : public ConfigOption
+{
+ public:
+ ConfigInt(const char *name,const char *doc,int minVal,int maxVal,int defVal)
+ : ConfigOption(O_Int)
+ {
+ m_name = name;
+ m_doc = doc;
+ m_value = defVal;
+ m_defValue = defVal;
+ m_minVal = minVal;
+ m_maxVal = maxVal;
+ }
+ QCString *valueStringRef() { return &m_valueString; }
+ int *valueRef() { return &m_value; }
+ int minVal() const { return m_minVal; }
+ int maxVal() const { return m_maxVal; }
+ void convertStrToVal();
+ void substEnvVars();
+ void writeTemplate(FTextStream &t,bool sl,bool upd);
+ void init() { m_value = m_defValue; }
+ private:
+ int m_value;
+ int m_defValue;
+ int m_minVal;
+ int m_maxVal;
+ QCString m_valueString;
+};
+
+/** Class representing a Boolean type option.
+ */
+class ConfigBool : public ConfigOption
+{
+ public:
+ ConfigBool(const char *name,const char *doc,bool defVal)
+ : ConfigOption(O_Bool)
+ {
+ m_name = name;
+ m_doc = doc;
+ m_value = defVal;
+ m_defValue = defVal;
+ }
+ QCString *valueStringRef() { return &m_valueString; }
+ bool *valueRef() { return &m_value; }
+ void convertStrToVal();
+ void substEnvVars();
+ void setValueString(const QCString &v) { m_valueString = v; }
+ void writeTemplate(FTextStream &t,bool sl,bool upd);
+ void init() { m_value = m_defValue; }
+ private:
+ bool m_value;
+ bool m_defValue;
+ QCString m_valueString;
+};
+
+/** Section marker for obsolete options
+ */
+class ConfigObsolete : public ConfigOption
+{
+ public:
+ ConfigObsolete(const char *name) : ConfigOption(O_Obsolete)
+ { m_name = name; }
+ void writeTemplate(FTextStream &,bool,bool);
+ void substEnvVars() {}
+};
+
+/** Section marker for compile time optional options
+ */
+class ConfigDisabled : public ConfigOption
+{
+ public:
+ ConfigDisabled(const char *name) : ConfigOption(O_Disabled)
+ { m_name = name; }
+ void writeTemplate(FTextStream &,bool,bool);
+ void substEnvVars() {}
+};
+
+// some convenience macros for access the config options
+#define ConfigImpl_getString(val) ConfigImpl::instance()->getString(__FILE__,__LINE__,val)
+#define ConfigImpl_getInt(val) ConfigImpl::instance()->getInt(__FILE__,__LINE__,val)
+#define ConfigImpl_getList(val) ConfigImpl::instance()->getList(__FILE__,__LINE__,val)
+#define ConfigImpl_getEnum(val) ConfigImpl::instance()->getEnum(__FILE__,__LINE__,val)
+#define ConfigImpl_getBool(val) ConfigImpl::instance()->getBool(__FILE__,__LINE__,val)
+
+
+/** Singleton for configuration variables.
+ *
+ * This object holds the global static variables
+ * read from a user-supplied configuration file.
+ * The static member instance() can be used to get
+ * a pointer to the one and only instance.
+ *
+ * Set all variables to their default values by
+ * calling Config::instance()->init()
+ *
+ */
+class ConfigImpl
+{
+ public:
+ /////////////////////////////
+ // public API
+ /////////////////////////////
+
+ /*! Returns the one and only instance of this class */
+ static ConfigImpl *instance()
+ {
+ if (m_instance==0) m_instance = new ConfigImpl;
+ return m_instance;
+ }
+ /*! Delete the instance */
+ static void deleteInstance()
+ {
+ delete m_instance;
+ m_instance=0;
+ }
+
+ /*! Returns an iterator that can by used to iterate over the
+ * configuration options.
+ */
+ QListIterator<ConfigOption> iterator()
+ {
+ return QListIterator<ConfigOption>(*m_options);
+ }
+
+ /*!
+ * @name Getting configuration values.
+ * @{
+ */
+
+ /*! Returns the value of the string option with name \a fileName.
+ * The arguments \a num and \a name are for debugging purposes only.
+ * There is a convenience function Config_getString() for this.
+ */
+ QCString &getString(const char *fileName,int num,const char *name) const;
+
+ /*! Returns the value of the list option with name \a fileName.
+ * The arguments \a num and \a name are for debugging purposes only.
+ * There is a convenience function Config_getList() for this.
+ */
+ QStrList &getList(const char *fileName,int num,const char *name) const;
+
+ /*! Returns the value of the enum option with name \a fileName.
+ * The arguments \a num and \a name are for debugging purposes only.
+ * There is a convenience function Config_getEnum() for this.
+ */
+ QCString &getEnum(const char *fileName,int num,const char *name) const;
+
+ /*! Returns the value of the integer option with name \a fileName.
+ * The arguments \a num and \a name are for debugging purposes only.
+ * There is a convenience function Config_getInt() for this.
+ */
+ int &getInt(const char *fileName,int num,const char *name) const;
+
+ /*! Returns the value of the boolean option with name \a fileName.
+ * The arguments \a num and \a name are for debugging purposes only.
+ * There is a convenience function Config_getBool() for this.
+ */
+ bool &getBool(const char *fileName,int num,const char *name) const;
+
+ /*! Returns the ConfigOption corresponding with \a name or 0 if
+ * the option is not supported.
+ */
+ ConfigOption *get(const char *name) const
+ {
+ return m_dict->find(name);
+ }
+ /* @} */
+
+ /*!
+ * @name Adding configuration options.
+ * @{
+ */
+
+ /*! Starts a new configuration section with \a name and description \a doc.
+ * \returns An object representing the option.
+ */
+ ConfigInfo *addInfo(const char *name,const char *doc)
+ {
+ ConfigInfo *result = new ConfigInfo(name,doc);
+ m_options->append(result);
+ return result;
+ }
+
+ /*! Adds a new string option with \a name and documentation \a doc.
+ * \returns An object representing the option.
+ */
+ ConfigString *addString(const char *name,
+ const char *doc)
+ {
+ ConfigString *result = new ConfigString(name,doc);
+ m_options->append(result);
+ m_dict->insert(name,result);
+ return result;
+ }
+
+ /*! Adds a new enumeration option with \a name and documentation \a doc
+ * and initial value \a defVal.
+ * \returns An object representing the option.
+ */
+ ConfigEnum *addEnum(const char *name,
+ const char *doc,
+ const char *defVal)
+ {
+ ConfigEnum *result = new ConfigEnum(name,doc,defVal);
+ m_options->append(result);
+ m_dict->insert(name,result);
+ return result;
+ }
+
+ /*! Adds a new string option with \a name and documentation \a doc.
+ * \returns An object representing the option.
+ */
+ ConfigList *addList(const char *name,
+ const char *doc)
+ {
+ ConfigList *result = new ConfigList(name,doc);
+ m_options->append(result);
+ m_dict->insert(name,result);
+ return result;
+ }
+
+ /*! Adds a new integer option with \a name and documentation \a doc.
+ * The integer has a range between \a minVal and \a maxVal and a
+ * default value of \a defVal.
+ * \returns An object representing the option.
+ */
+ ConfigInt *addInt(const char *name,
+ const char *doc,
+ int minVal,int maxVal,int defVal)
+ {
+ ConfigInt *result = new ConfigInt(name,doc,minVal,maxVal,defVal);
+ m_options->append(result);
+ m_dict->insert(name,result);
+ return result;
+ }
+
+ /*! Adds a new boolean option with \a name and documentation \a doc.
+ * The boolean has a default value of \a defVal.
+ * \returns An object representing the option.
+ */
+ ConfigBool *addBool(const char *name,
+ const char *doc,
+ bool defVal)
+ {
+ ConfigBool *result = new ConfigBool(name,doc,defVal);
+ m_options->append(result);
+ m_dict->insert(name,result);
+ return result;
+ }
+ /*! Adds an option that has become obsolete. */
+ ConfigOption *addObsolete(const char *name)
+ {
+ ConfigObsolete *option = new ConfigObsolete(name);
+ m_dict->insert(name,option);
+ m_obsolete->append(option);
+ return option;
+ }
+ /*! Adds an option that has been disabled at compile time. */
+ ConfigOption *addDisabled(const char *name)
+ {
+ ConfigDisabled *option = new ConfigDisabled(name);
+ m_dict->insert(name,option);
+ m_disabled->append(option);
+ return option;
+ }
+ /*! @} */
+
+ /*! Writes a template configuration to stream \a t. If \a shortIndex
+ * is \c TRUE the description of each configuration option will
+ * be omitted.
+ */
+ void writeTemplate(FTextStream &t,bool shortIndex,bool updateOnly);
+
+ void setHeader(const char *header) { m_header = header; }
+
+ /////////////////////////////
+ // internal API
+ /////////////////////////////
+
+ /*! Converts the string values read from the configuration file
+ * to real values for non-string type options (like int, and bools)
+ */
+ void convertStrToVal();
+
+ /*! Replaces references to environment variable by the actual value
+ * of the environment variable.
+ */
+ void substituteEnvironmentVars();
+
+ /*! Initialize config variables to their default value */
+ void init();
+
+ /*! Parse a configuration data in string \a str.
+ * \returns TRUE if successful, or FALSE if the string could not be
+ * parsed.
+ */
+ //bool parseString(const char *fn,const char *str);
+ bool parseString(const char *fn,const char *str,bool upd = FALSE);
+
+ /*! Parse a configuration file with name \a fn.
+ * \returns TRUE if successful, FALSE if the file could not be
+ * opened or read.
+ */
+ bool parse(const char *fn,bool upd = FALSE);
+
+ /*! Called from the constructor, will add doxygen's default options
+ * to the configuration object
+ */
+ void create();
+
+ /*! Append user start comment
+ */
+ void appendStartComment(const QCString &u)
+ {
+ m_startComment += u;
+ }
+ /*! Append user comment
+ */
+ void appendUserComment(const QCString &u)
+ {
+ m_userComment += u;
+ }
+ /*! Take the user start comment and reset it internally
+ * \returns user start comment
+ */
+ QCString takeStartComment()
+ {
+ QCString result=m_startComment;
+ m_startComment.resize(0);
+ return result.replace(QRegExp("\r"),"");
+ }
+ /*! Take the user comment and reset it internally
+ * \returns user comment
+ */
+ QCString takeUserComment()
+ {
+ QCString result=m_userComment;
+ m_userComment.resize(0);
+ return result.replace(QRegExp("\r"),"");
+ }
+
+ protected:
+
+ ConfigImpl()
+ {
+ m_options = new QList<ConfigOption>;
+ m_obsolete = new QList<ConfigOption>;
+ m_disabled = new QList<ConfigOption>;
+ m_dict = new QDict<ConfigOption>(257);
+ m_options->setAutoDelete(TRUE);
+ m_obsolete->setAutoDelete(TRUE);
+ m_disabled->setAutoDelete(TRUE);
+ m_initialized = FALSE;
+ create();
+ }
+ ~ConfigImpl()
+ {
+ delete m_options;
+ delete m_obsolete;
+ delete m_disabled;
+ delete m_dict;
+ }
+
+ private:
+ QList<ConfigOption> *m_options;
+ QList<ConfigOption> *m_obsolete;
+ QList<ConfigOption> *m_disabled;
+ QDict<ConfigOption> *m_dict;
+ static ConfigImpl *m_instance;
+ QCString m_startComment;
+ QCString m_userComment;
+ bool m_initialized;
+ QCString m_header;
+};
+
+#endif
diff --git a/src/config.l b/src/configimpl.l
index 26e0283..df032a6 100644
--- a/src/config.l
+++ b/src/configimpl.l
@@ -10,6 +10,8 @@
*
*/
%option never-interactive
+%option prefix="configimplYY"
+
%{
/*
@@ -29,7 +31,7 @@
#include <qstack.h>
#include <qglobal.h>
-#include "config.h"
+#include "configimpl.h"
#include "version.h"
#include "portable.h"
#include "util.h"
@@ -38,22 +40,9 @@
#include "lang_cfg.h"
#include "configoptions.h"
-#undef Config_getString
-#undef Config_getInt
-#undef Config_getList
-#undef Config_getEnum
-#undef Config_getBool
-
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
-// use in-class definitions
-#define Config_getString(val) getString(__FILE__,__LINE__,val)
-#define Config_getInt(val) getInt(__FILE__,__LINE__,val)
-#define Config_getList(val) getList(__FILE__,__LINE__,val)
-#define Config_getEnum(val) getEnum(__FILE__,__LINE__,val)
-#define Config_getBool(val) getBool(__FILE__,__LINE__,val)
-
static const char *warning_str = "warning: ";
static const char *error_str = "error: ";
@@ -175,7 +164,7 @@ void ConfigOption::writeStringList(FTextStream &t,QStrList &l)
/* -----------------------------------------------------------------
*/
-Config *Config::m_instance = 0;
+ConfigImpl *ConfigImpl::m_instance = 0;
void ConfigInt::convertStrToVal()
{
@@ -216,7 +205,7 @@ void ConfigBool::convertStrToVal()
}
}
-QCString &Config::getString(const char *fileName,int num,const char *name) const
+QCString &ConfigImpl::getString(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
@@ -232,7 +221,7 @@ QCString &Config::getString(const char *fileName,int num,const char *name) const
return *((ConfigString *)opt)->valueRef();
}
-QStrList &Config::getList(const char *fileName,int num,const char *name) const
+QStrList &ConfigImpl::getList(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
@@ -248,7 +237,7 @@ QStrList &Config::getList(const char *fileName,int num,const char *name) const
return *((ConfigList *)opt)->valueRef();
}
-QCString &Config::getEnum(const char *fileName,int num,const char *name) const
+QCString &ConfigImpl::getEnum(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
@@ -264,7 +253,7 @@ QCString &Config::getEnum(const char *fileName,int num,const char *name) const
return *((ConfigEnum *)opt)->valueRef();
}
-int &Config::getInt(const char *fileName,int num,const char *name) const
+int &ConfigImpl::getInt(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
@@ -280,7 +269,7 @@ int &Config::getInt(const char *fileName,int num,const char *name) const
return *((ConfigInt *)opt)->valueRef();
}
-bool &Config::getBool(const char *fileName,int num,const char *name) const
+bool &ConfigImpl::getBool(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
@@ -439,10 +428,8 @@ static QStrList includePathList;
static QStack<ConfigFileState> includeStack;
static int includeDepth;
static bool config_upd = FALSE;
-
-static QCString encoding;
-
-static Config *config;
+static QCString encoding;
+static ConfigImpl *config;
/* -----------------------------------------------------------------
*/
@@ -858,7 +845,7 @@ static void readIncludeFile(const char *incName)
/*@ ----------------------------------------------------------------------------
*/
-void Config::writeTemplate(FTextStream &t,bool sl,bool upd)
+void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd)
{
/* print first lines of user comment that were at the beginning of the file, might have special meaning for editors */
if (m_startComment)
@@ -884,7 +871,7 @@ void Config::writeTemplate(FTextStream &t,bool sl,bool upd)
}
}
-void Config::convertStrToVal()
+void ConfigImpl::convertStrToVal()
{
QListIterator<ConfigOption> it = iterator();
ConfigOption *option;
@@ -1024,7 +1011,9 @@ void ConfigEnum::substEnvVars()
substEnvVarsInString(m_value);
}
-void Config::substituteEnvironmentVars()
+//---------------------------------------------
+
+void ConfigImpl::substituteEnvironmentVars()
{
QListIterator<ConfigOption> it = iterator();
ConfigOption *option;
@@ -1034,6 +1023,129 @@ void Config::substituteEnvironmentVars()
}
}
+void ConfigImpl::init()
+{
+ QListIterator<ConfigOption> it = iterator();
+ ConfigOption *option;
+ for (;(option=it.current());++it)
+ {
+ option->init();
+ }
+
+ // sanity check if all depends relations are valid
+ for (it.toFirst();(option=it.current());++it)
+ {
+ QCString depName = option->dependsOn();
+ if (!depName.isEmpty())
+ {
+ ConfigOption * opt = ConfigImpl::instance()->get(depName);
+ if (opt==0)
+ {
+ config_warn("Config option '%s' has invalid depends relation on unknown option '%s'\n",
+ option->name().data(),depName.data());
+ exit(1);
+ }
+ }
+ }
+}
+
+void ConfigImpl::create()
+{
+ if (m_initialized) return;
+ m_initialized = TRUE;
+ addConfigOptions(this);
+}
+
+static QCString configFileToString(const char *name)
+{
+ if (name==0 || name[0]==0) return 0;
+ QFile f;
+
+ bool fileOpened=FALSE;
+ if (name[0]=='-' && name[1]==0) // read from stdin
+ {
+ fileOpened=f.open(IO_ReadOnly,stdin);
+ if (fileOpened)
+ {
+ const int bSize=4096;
+ QCString contents(bSize);
+ int totalSize=0;
+ int size;
+ while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
+ {
+ totalSize+=bSize;
+ contents.resize(totalSize+bSize);
+ }
+ totalSize+=size+2;
+ contents.resize(totalSize);
+ contents.at(totalSize-2)='\n'; // to help the scanner
+ contents.at(totalSize-1)='\0';
+ return contents;
+ }
+ }
+ else // read from file
+ {
+ QFileInfo fi(name);
+ if (!fi.exists() || !fi.isFile())
+ {
+ config_err("file `%s' not found\n",name);
+ return "";
+ }
+ f.setName(name);
+ fileOpened=f.open(IO_ReadOnly);
+ if (fileOpened)
+ {
+ int fsize=f.size();
+ QCString contents(fsize+2);
+ f.readBlock(contents.rawData(),fsize);
+ f.close();
+ if (fsize==0 || contents[fsize-1]=='\n')
+ contents[fsize]='\0';
+ else
+ contents[fsize]='\n'; // to help the scanner
+ contents[fsize+1]='\0';
+ return contents;
+ }
+ }
+ if (!fileOpened)
+ {
+ config_err("cannot open file `%s' for reading\n",name);
+ exit(1);
+ }
+ return "";
+}
+
+bool ConfigImpl::parseString(const char *fn,const char *str,bool update)
+{
+ config = ConfigImpl::instance();
+ inputString = str;
+ inputPosition = 0;
+ yyFileName = fn;
+ yyLineNr = 1;
+ includeStack.setAutoDelete(TRUE);
+ includeStack.clear();
+ includeDepth = 0;
+ configimplYYrestart( configimplYYin );
+ BEGIN( PreStart );
+ config_upd = update;
+ configimplYYlex();
+ config_upd = FALSE;
+ inputString = 0;
+ return TRUE;
+}
+
+bool ConfigImpl::parse(const char *fn,bool update)
+{
+ int retval;
+ encoding = "UTF-8";
+ printlex(yy_flex_debug, TRUE, __FILE__, fn);
+ retval = parseString(fn,configFileToString(fn), update);
+ printlex(yy_flex_debug, FALSE, __FILE__, fn);
+ return retval;
+}
+
+//----------------------------------------------------------------------
+
static void cleanUpPaths(QStrList &str)
{
char *sfp = str.first();
@@ -1045,50 +1157,54 @@ static void cleanUpPaths(QStrList &str)
char c;
while ((c=*p))
{
- if (c=='\\') *p='/';
- p++;
+ if (c=='\\') *p='/';
+ p++;
}
}
QCString path = sfp;
if ((path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':')) ||
- path.at(path.length()-1)!='/'
+ path.at(path.length()-1)!='/'
)
{
QFileInfo fi(path);
if (fi.exists() && fi.isDir())
{
- int i = str.at();
- str.remove();
- if (str.at()==i) // did not remove last item
- str.insert(i,fi.absFilePath().utf8()+"/");
- else
- str.append(fi.absFilePath().utf8()+"/");
+ int i = str.at();
+ QString p = fi.absFilePath();
+ if (p.at(p.length()-1)!='/')
+ p.append('/');
+ str.remove();
+ if (str.at()==i) // did not remove last item
+ str.insert(i,p.utf8());
+ else
+ str.append(p.utf8());
}
}
sfp = str.next();
}
}
-void Config::checkFileName(const char *optionName)
+static void checkFileName(QCString &s,const char *optionName)
{
- QCString &s = Config_getString(optionName);
QCString val = s.stripWhiteSpace().lower();
if ((val=="yes" || val=="true" || val=="1" || val=="all") ||
- (val=="no" || val=="false" || val=="0" || val=="none"))
+ (val=="no" || val=="false" || val=="0" || val=="none"))
{
- config_err("file name expected for option %s, got %s instead. Ignoring...\n",optionName,s.data());
+ err("file name expected for option %s, got %s instead. Ignoring...\n",optionName,s.data());
s=""; // note the use of &s above: this will change the option value!
}
}
-void Config::check()
+#include "config.h"
+
+void Config::init()
{
- //if (!projectName.isEmpty())
- //{
- // projectName[0]=toupper(projectName[0]);
- //}
+ ConfigImpl::instance()->init();
+}
- QCString &warnFormat = Config_getString("WARN_FORMAT");
+void Config::checkAndCorrect()
+{
+ QCString &warnFormat = ConfigImpl_getString("WARN_FORMAT");
if (warnFormat.stripWhiteSpace().isEmpty())
{
warnFormat="$file:$line $text";
@@ -1097,59 +1213,63 @@ void Config::check()
{
if (warnFormat.find("$file")==-1)
{
- config_warn("warning format does not contain a $file tag!\n");
+ warn_uncond("warning format does not contain a $file tag!\n");
+
}
if (warnFormat.find("$line")==-1)
{
- config_warn("warning format does not contain a $line tag!\n");
+ warn_uncond("warning format does not contain a $line tag!\n");
}
if (warnFormat.find("$text")==-1)
{
- config_warn("warning format foes not contain a $text tag!\n");
+ warn_uncond("warning format foes not contain a $text tag!\n");
}
}
- QCString &manExtension = Config_getString("MAN_EXTENSION");
-
+ QCString &manExtension = ConfigImpl_getString("MAN_EXTENSION");
+
// set default man page extension if non is given by the user
if (manExtension.isEmpty())
{
manExtension=".3";
}
-
- QCString &paperType = Config_getEnum("PAPER_TYPE");
- paperType=paperType.lower().stripWhiteSpace();
+
+ QCString &paperType = ConfigImpl_getEnum("PAPER_TYPE");
+ paperType=paperType.lower().stripWhiteSpace();
if (paperType.isEmpty() || paperType=="a4wide")
{
paperType = "a4";
}
- if (paperType!="a4" && paperType!="letter" &&
+ if (paperType!="a4" && paperType!="letter" &&
paperType!="legal" && paperType!="executive")
{
- config_err("Unknown page type specified\n");
+ err("Unknown page type specified\n");
paperType="a4";
}
-
- QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
+
+ QCString &outputLanguage=ConfigImpl_getEnum("OUTPUT_LANGUAGE");
outputLanguage=outputLanguage.stripWhiteSpace();
if (outputLanguage.isEmpty())
{
outputLanguage = "English";
}
- QCString &htmlFileExtension=Config_getString("HTML_FILE_EXTENSION");
+ QCString &htmlFileExtension=ConfigImpl_getString("HTML_FILE_EXTENSION");
htmlFileExtension=htmlFileExtension.stripWhiteSpace();
if (htmlFileExtension.isEmpty())
{
htmlFileExtension = ".html";
}
-
+
// expand the relative stripFromPath values
- QStrList &stripFromPath = Config_getList("STRIP_FROM_PATH");
+ QStrList &stripFromPath = ConfigImpl_getList("STRIP_FROM_PATH");
char *sfp = stripFromPath.first();
if (sfp==0) // by default use the current path
{
- stripFromPath.append(QDir::currentDirPath().utf8()+"/");
+ QString p = QDir::currentDirPath();
+ if (p.at(p.length()-1)!='/')
+ p.append('/');
+ stripFromPath.append(p.utf8());
}
else
{
@@ -1157,49 +1277,49 @@ void Config::check()
}
// expand the relative stripFromPath values
- QStrList &stripFromIncPath = Config_getList("STRIP_FROM_INC_PATH");
+ QStrList &stripFromIncPath = ConfigImpl_getList("STRIP_FROM_INC_PATH");
cleanUpPaths(stripFromIncPath);
-
+
// Test to see if HTML header is valid
- QCString &headerFile = Config_getString("HTML_HEADER");
+ QCString &headerFile = ConfigImpl_getString("HTML_HEADER");
if (!headerFile.isEmpty())
{
QFileInfo fi(headerFile);
if (!fi.exists())
{
- config_err("tag HTML_HEADER: header file `%s' "
+ err("tag HTML_HEADER: header file `%s' "
"does not exist\n",headerFile.data());
exit(1);
}
}
// Test to see if HTML footer is valid
- QCString &footerFile = Config_getString("HTML_FOOTER");
+ QCString &footerFile = ConfigImpl_getString("HTML_FOOTER");
if (!footerFile.isEmpty())
{
QFileInfo fi(footerFile);
if (!fi.exists())
{
- config_err("tag HTML_FOOTER: footer file `%s' "
+ err("tag HTML_FOOTER: footer file `%s' "
"does not exist\n",footerFile.data());
exit(1);
}
}
// Test to see if MathJax code file is valid
- if (Config_getBool("USE_MATHJAX"))
+ if (ConfigImpl_getBool("USE_MATHJAX"))
{
- QCString &MathJaxCodefile = Config_getString("MATHJAX_CODEFILE");
+ QCString &MathJaxCodefile = ConfigImpl_getString("MATHJAX_CODEFILE");
if (!MathJaxCodefile.isEmpty())
{
QFileInfo fi(MathJaxCodefile);
if (!fi.exists())
{
- config_err("tag MATHJAX_CODEFILE file `%s' "
+ err("tag MATHJAX_CODEFILE file `%s' "
"does not exist\n",MathJaxCodefile.data());
exit(1);
}
}
- QCString &path = Config_getString("MATHJAX_RELPATH");
+ QCString &path = ConfigImpl_getString("MATHJAX_RELPATH");
if (!path.isEmpty() && path.at(path.length()-1)!='/')
{
path+="/";
@@ -1208,43 +1328,43 @@ void Config::check()
}
// Test to see if LaTeX header is valid
- QCString &latexHeaderFile = Config_getString("LATEX_HEADER");
+ QCString &latexHeaderFile = ConfigImpl_getString("LATEX_HEADER");
if (!latexHeaderFile.isEmpty())
{
QFileInfo fi(latexHeaderFile);
if (!fi.exists())
{
- config_err("tag LATEX_HEADER: header file `%s' "
+ err("tag LATEX_HEADER: header file `%s' "
"does not exist\n",latexHeaderFile.data());
exit(1);
}
}
// Test to see if LaTeX footer is valid
- QCString &latexFooterFile = Config_getString("LATEX_FOOTER");
+ QCString &latexFooterFile = ConfigImpl_getString("LATEX_FOOTER");
if (!latexFooterFile.isEmpty())
{
QFileInfo fi(latexFooterFile);
if (!fi.exists())
{
- config_err("tag LATEX_FOOTER: footer file `%s' "
+ err("tag LATEX_FOOTER: footer file `%s' "
"does not exist\n",latexFooterFile.data());
exit(1);
}
}
// check include path
- QStrList &includePath = Config_getList("INCLUDE_PATH");
+ QStrList &includePath = ConfigImpl_getList("INCLUDE_PATH");
char *s=includePath.first();
while (s)
{
QFileInfo fi(s);
- if (!fi.exists()) config_warn("tag INCLUDE_PATH: include path `%s' "
+ if (!fi.exists()) warn_uncond("tag INCLUDE_PATH: include path `%s' "
"does not exist\n",s);
s=includePath.next();
}
// check aliases
- QStrList &aliasList = Config_getList("ALIASES");
+ QStrList &aliasList = ConfigImpl_getList("ALIASES");
s=aliasList.first();
while (s)
{
@@ -1254,33 +1374,33 @@ void Config::check()
alias=alias.stripWhiteSpace();
if (alias.find(re1)!=0 && alias.find(re2)!=0)
{
- config_err("Illegal alias format `%s'. Use \"name=value\" or \"name(n)=value\", where n is the number of arguments\n",
+ err("Illegal alias format `%s'. Use \"name=value\" or \"name(n)=value\", where n is the number of arguments\n",
alias.data());
}
s=aliasList.next();
}
// check if GENERATE_TREEVIEW and GENERATE_HTMLHELP are both enabled
- if (Config_getBool("GENERATE_TREEVIEW") && Config_getBool("GENERATE_HTMLHELP"))
+ if (ConfigImpl_getBool("GENERATE_TREEVIEW") && ConfigImpl_getBool("GENERATE_HTMLHELP"))
{
- config_err("When enabling GENERATE_HTMLHELP the tree view (GENERATE_TREEVIEW) should be disabled. I'll do it for you.\n");
- Config_getBool("GENERATE_TREEVIEW")=FALSE;
+ err("When enabling GENERATE_HTMLHELP the tree view (GENERATE_TREEVIEW) should be disabled. I'll do it for you.\n");
+ ConfigImpl_getBool("GENERATE_TREEVIEW")=FALSE;
}
- if (Config_getBool("SEARCHENGINE") && Config_getBool("GENERATE_HTMLHELP"))
+ if (ConfigImpl_getBool("SEARCHENGINE") && ConfigImpl_getBool("GENERATE_HTMLHELP"))
{
- config_err("When enabling GENERATE_HTMLHELP the search engine (SEARCHENGINE) should be disabled. I'll do it for you.\n");
- Config_getBool("SEARCHENGINE")=FALSE;
+ err("When enabling GENERATE_HTMLHELP the search engine (SEARCHENGINE) should be disabled. I'll do it for you.\n");
+ ConfigImpl_getBool("SEARCHENGINE")=FALSE;
}
// check if SEPARATE_MEMBER_PAGES and INLINE_GROUPED_CLASSES are both enabled
- if (Config_getBool("SEPARATE_MEMBER_PAGES") && Config_getBool("INLINE_GROUPED_CLASSES"))
+ if (ConfigImpl_getBool("SEPARATE_MEMBER_PAGES") && ConfigImpl_getBool("INLINE_GROUPED_CLASSES"))
{
- config_err("When enabling INLINE_GROUPED_CLASSES the SEPARATE_MEMBER_PAGES option should be disabled. I'll do it for you.\n");
- Config_getBool("SEPARATE_MEMBER_PAGES")=FALSE;
+ err("When enabling INLINE_GROUPED_CLASSES the SEPARATE_MEMBER_PAGES option should be disabled. I'll do it for you.\n");
+ ConfigImpl_getBool("SEPARATE_MEMBER_PAGES")=FALSE;
}
-
+
// check dot image format
- QCString &dotImageFormat=Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString &dotImageFormat=ConfigImpl_getEnum("DOT_IMAGE_FORMAT");
dotImageFormat=dotImageFormat.stripWhiteSpace();
if (dotImageFormat.isEmpty())
{
@@ -1288,21 +1408,21 @@ void Config::check()
}
//else if (dotImageFormat!="gif" && dotImageFormat!="png" && dotImageFormat!="jpg")
//{
- // config_err("Invalid value for DOT_IMAGE_FORMAT: `%s'. Using the default.\n",dotImageFormat.data());
+ // err("Invalid value for DOT_IMAGE_FORMAT: `%s'. Using the default.\n",dotImageFormat.data());
// dotImageFormat = "png";
//}
- QCString &dotFontName=Config_getString("DOT_FONTNAME");
+ QCString &dotFontName=ConfigImpl_getString("DOT_FONTNAME");
if (dotFontName=="FreeSans" || dotFontName=="FreeSans.ttf")
{
- config_warn("doxygen no longer ships with the FreeSans font.\n"
+ warn_uncond("doxygen no longer ships with the FreeSans font.\n"
"You may want to clear or change DOT_FONTNAME.\n"
"Otherwise you run the risk that the wrong font is being used for dot generated graphs.\n");
}
-
-
+
+
// check dot path
- QCString &dotPath = Config_getString("DOT_PATH");
+ QCString &dotPath = ConfigImpl_getString("DOT_PATH");
if (!dotPath.isEmpty())
{
QFileInfo fi(dotPath);
@@ -1315,7 +1435,7 @@ void Config::check()
QFileInfo dp(dotPath+"/dot"+portable_commandExtension());
if (!dp.exists() || !dp.isFile())
{
- config_warn("the dot tool could not be found at %s\n",dotPath.data());
+ warn_uncond("the dot tool could not be found at %s\n",dotPath.data());
dotPath="";
}
else
@@ -1334,13 +1454,13 @@ void Config::check()
}
// check mscgen path
- QCString &mscgenPath = Config_getString("MSCGEN_PATH");
+ QCString &mscgenPath = ConfigImpl_getString("MSCGEN_PATH");
if (!mscgenPath.isEmpty())
{
QFileInfo dp(mscgenPath+"/mscgen"+portable_commandExtension());
if (!dp.exists() || !dp.isFile())
{
- config_warn("the mscgen tool could not be found at %s\n",mscgenPath.data());
+ warn_uncond("the mscgen tool could not be found at %s\n",mscgenPath.data());
mscgenPath="";
}
else
@@ -1358,7 +1478,7 @@ void Config::check()
}
// check plantuml path
- QCString &plantumlJarPath = Config_getString("PLANTUML_JAR_PATH");
+ QCString &plantumlJarPath = ConfigImpl_getString("PLANTUML_JAR_PATH");
if (!plantumlJarPath.isEmpty())
{
QFileInfo pu(plantumlJarPath);
@@ -1371,7 +1491,7 @@ void Config::check()
}
else
{
- config_err("Jar file plantuml.jar not found at location "
+ err("Jar file plantuml.jar not found at location "
"specified via PLANTUML_JAR_PATH: '%s'\n",plantumlJarPath.data());
plantumlJarPath="";
}
@@ -1382,20 +1502,20 @@ void Config::check()
}
else
{
- config_err("path specified via PLANTUML_JAR_PATH does not exist or not a directory: %s\n",
+ err("path specified via PLANTUML_JAR_PATH does not exist or not a directory: %s\n",
plantumlJarPath.data());
plantumlJarPath="";
}
}
// check dia path
- QCString &diaPath = Config_getString("DIA_PATH");
+ QCString &diaPath = ConfigImpl_getString("DIA_PATH");
if (!diaPath.isEmpty())
{
QFileInfo dp(diaPath+"/dia"+portable_commandExtension());
if (!dp.exists() || !dp.isFile())
{
- config_warn("dia could not be found at %s\n",diaPath.data());
+ warn_uncond("dia could not be found at %s\n",diaPath.data());
diaPath="";
}
else
@@ -1413,7 +1533,7 @@ void Config::check()
}
// check input
- QStrList &inputSources=Config_getList("INPUT");
+ QStrList &inputSources=ConfigImpl_getList("INPUT");
if (inputSources.count()==0)
{
// use current dir as the default
@@ -1427,74 +1547,83 @@ void Config::check()
QFileInfo fi(s);
if (!fi.exists())
{
- config_warn("tag INPUT: input source `%s' does not exist\n",s);
+ warn_uncond("tag INPUT: input source `%s' does not exist\n",s);
}
s=inputSources.next();
}
}
- initFilePattern();
+ // add default file patterns if needed
+ QStrList &filePatternList = ConfigImpl_getList("FILE_PATTERNS");
+ if (filePatternList.isEmpty())
+ {
+ ConfigOption * opt = ConfigImpl::instance()->get("FILE_PATTERNS");
+ if (opt->kind()==ConfigOption::O_List)
+ {
+ ((ConfigList*)opt)->init();
+ }
+ }
// add default pattern if needed
- QStrList &examplePatternList = Config_getList("EXAMPLE_PATTERNS");
+ QStrList &examplePatternList = ConfigImpl_getList("EXAMPLE_PATTERNS");
if (examplePatternList.isEmpty())
{
examplePatternList.append("*");
}
// if no output format is enabled, warn the user
- if (!Config_getBool("GENERATE_HTML") &&
- !Config_getBool("GENERATE_LATEX") &&
- !Config_getBool("GENERATE_MAN") &&
- !Config_getBool("GENERATE_RTF") &&
- !Config_getBool("GENERATE_XML") &&
- !Config_getBool("GENERATE_PERLMOD") &&
- !Config_getBool("GENERATE_RTF") &&
- !Config_getBool("GENERATE_DOCBOOK") &&
- !Config_getBool("GENERATE_AUTOGEN_DEF") &&
- Config_getString("GENERATE_TAGFILE").isEmpty()
+ if (!ConfigImpl_getBool("GENERATE_HTML") &&
+ !ConfigImpl_getBool("GENERATE_LATEX") &&
+ !ConfigImpl_getBool("GENERATE_MAN") &&
+ !ConfigImpl_getBool("GENERATE_RTF") &&
+ !ConfigImpl_getBool("GENERATE_XML") &&
+ !ConfigImpl_getBool("GENERATE_PERLMOD") &&
+ !ConfigImpl_getBool("GENERATE_RTF") &&
+ !ConfigImpl_getBool("GENERATE_DOCBOOK") &&
+ !ConfigImpl_getBool("GENERATE_AUTOGEN_DEF") &&
+ ConfigImpl_getString("GENERATE_TAGFILE").isEmpty()
)
{
- config_warn("No output formats selected! Set at least one of the main GENERATE_* options to YES.\n");
+ warn_uncond("No output formats selected! Set at least one of the main GENERATE_* options to YES.\n");
}
// check HTMLHELP creation requirements
- if (!Config_getBool("GENERATE_HTML") &&
- Config_getBool("GENERATE_HTMLHELP"))
+ if (!ConfigImpl_getBool("GENERATE_HTML") &&
+ ConfigImpl_getBool("GENERATE_HTMLHELP"))
{
- config_warn("GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n");
+ warn_uncond("GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n");
}
// check QHP creation requirements
- if (Config_getBool("GENERATE_QHP"))
+ if (ConfigImpl_getBool("GENERATE_QHP"))
{
- if (Config_getString("QHP_NAMESPACE").isEmpty())
+ if (ConfigImpl_getString("QHP_NAMESPACE").isEmpty())
{
- config_err("GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n");
- Config_getString("QHP_NAMESPACE")="org.doxygen.doc";
+ err("GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n");
+ ConfigImpl_getString("QHP_NAMESPACE")="org.doxygen.doc";
}
- if (Config_getString("QHP_VIRTUAL_FOLDER").isEmpty())
+ if (ConfigImpl_getString("QHP_VIRTUAL_FOLDER").isEmpty())
{
- config_err("GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n");
- Config_getString("QHP_VIRTUAL_FOLDER")="doc";
+ err("GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n");
+ ConfigImpl_getString("QHP_VIRTUAL_FOLDER")="doc";
}
}
- if (Config_getBool("OPTIMIZE_OUTPUT_JAVA") && Config_getBool("INLINE_INFO"))
+ if (ConfigImpl_getBool("OPTIMIZE_OUTPUT_JAVA") && ConfigImpl_getBool("INLINE_INFO"))
{
- // don't show inline info for Java output, since Java has no inline
+ // don't show inline info for Java output, since Java has no inline
// concept.
- Config_getBool("INLINE_INFO")=FALSE;
+ ConfigImpl_getBool("INLINE_INFO")=FALSE;
}
- int &depth = Config_getInt("MAX_DOT_GRAPH_DEPTH");
+ int &depth = ConfigImpl_getInt("MAX_DOT_GRAPH_DEPTH");
if (depth==0)
{
depth=1000;
}
- int &hue = Config_getInt("HTML_COLORSTYLE_HUE");
+ int &hue = ConfigImpl_getInt("HTML_COLORSTYLE_HUE");
if (hue<0)
{
hue=0;
@@ -1504,7 +1633,7 @@ void Config::check()
hue=hue%360;
}
- int &sat = Config_getInt("HTML_COLORSTYLE_SAT");
+ int &sat = ConfigImpl_getInt("HTML_COLORSTYLE_SAT");
if (sat<0)
{
sat=0;
@@ -1513,7 +1642,7 @@ void Config::check()
{
sat=255;
}
- int &gamma = Config_getInt("HTML_COLORSTYLE_GAMMA");
+ int &gamma = ConfigImpl_getInt("HTML_COLORSTYLE_GAMMA");
if (gamma<40)
{
gamma=40;
@@ -1523,16 +1652,16 @@ void Config::check()
gamma=240;
}
- QCString mathJaxFormat = Config_getEnum("MATHJAX_FORMAT");
+ QCString mathJaxFormat = ConfigImpl_getEnum("MATHJAX_FORMAT");
if (!mathJaxFormat.isEmpty() && mathJaxFormat!="HTML-CSS" &&
mathJaxFormat!="NativeMML" && mathJaxFormat!="SVG")
{
- config_err("Unsupported value for MATHJAX_FORMAT: Should be one of HTML-CSS, NativeMML, or SVG\n");
- Config_getEnum("MATHJAX_FORMAT")="HTML-CSS";
+ err("Unsupported value for MATHJAX_FORMAT: Should be one of HTML-CSS, NativeMML, or SVG\n");
+ ConfigImpl_getEnum("MATHJAX_FORMAT")="HTML-CSS";
}
// add default words if needed
- QStrList &annotationFromBrief = Config_getList("ABBREVIATE_BRIEF");
+ QStrList &annotationFromBrief = ConfigImpl_getList("ABBREVIATE_BRIEF");
if (annotationFromBrief.isEmpty())
{
annotationFromBrief.append("The $name class");
@@ -1549,21 +1678,21 @@ void Config::check()
}
// some default settings for vhdl
- if (Config_getBool("OPTIMIZE_OUTPUT_VHDL") &&
- (Config_getBool("INLINE_INHERITED_MEMB") ||
- Config_getBool("INHERIT_DOCS") ||
- !Config_getBool("HIDE_SCOPE_NAMES") ||
- !Config_getBool("EXTRACT_PRIVATE") ||
- !Config_getBool("EXTRACT_PACKAGE")
+ if (ConfigImpl_getBool("OPTIMIZE_OUTPUT_VHDL") &&
+ (ConfigImpl_getBool("INLINE_INHERITED_MEMB") ||
+ ConfigImpl_getBool("INHERIT_DOCS") ||
+ !ConfigImpl_getBool("HIDE_SCOPE_NAMES") ||
+ !ConfigImpl_getBool("EXTRACT_PRIVATE") ||
+ !ConfigImpl_getBool("EXTRACT_PACKAGE")
)
)
{
- bool b1 = Config_getBool("INLINE_INHERITED_MEMB");
- bool b2 = Config_getBool("INHERIT_DOCS");
- bool b3 = Config_getBool("HIDE_SCOPE_NAMES");
- bool b4 = Config_getBool("EXTRACT_PRIVATE");
- bool b5 = Config_getBool("SKIP_FUNCTION_MACROS");
- bool b6 = Config_getBool("EXTRACT_PACKAGE");
+ bool b1 = ConfigImpl_getBool("INLINE_INHERITED_MEMB");
+ bool b2 = ConfigImpl_getBool("INHERIT_DOCS");
+ bool b3 = ConfigImpl_getBool("HIDE_SCOPE_NAMES");
+ bool b4 = ConfigImpl_getBool("EXTRACT_PRIVATE");
+ bool b5 = ConfigImpl_getBool("SKIP_FUNCTION_MACROS");
+ bool b6 = ConfigImpl_getBool("EXTRACT_PACKAGE");
const char *s1,*s2,*s3,*s4,*s5,*s6;
if (b1) s1=" INLINE_INHERITED_MEMB = NO (was YES)\n"; else s1="";
if (b2) s2=" INHERIT_DOCS = NO (was YES)\n"; else s2="";
@@ -1573,19 +1702,19 @@ void Config::check()
if (!b6) s6=" EXTRACT_PACKAGE = YES (was NO)\n"; else s6="";
- config_warn("enabling OPTIMIZE_OUTPUT_VHDL assumes the following settings:\n"
+ warn_uncond("enabling OPTIMIZE_OUTPUT_VHDL assumes the following settings:\n"
"%s%s%s%s%s%s",s1,s2,s3,s4,s5,s6
);
- Config_getBool("INLINE_INHERITED_MEMB") = FALSE;
- Config_getBool("INHERIT_DOCS") = FALSE;
- Config_getBool("HIDE_SCOPE_NAMES") = TRUE;
- Config_getBool("EXTRACT_PRIVATE") = TRUE;
- Config_getBool("ENABLE_PREPROCESSING") = FALSE;
- Config_getBool("EXTRACT_PACKAGE") = TRUE;
- }
+ ConfigImpl_getBool("INLINE_INHERITED_MEMB") = FALSE;
+ ConfigImpl_getBool("INHERIT_DOCS") = FALSE;
+ ConfigImpl_getBool("HIDE_SCOPE_NAMES") = TRUE;
+ ConfigImpl_getBool("EXTRACT_PRIVATE") = TRUE;
+ ConfigImpl_getBool("ENABLE_PREPROCESSING") = FALSE;
+ ConfigImpl_getBool("EXTRACT_PACKAGE") = TRUE;
+ }
- checkFileName("GENERATE_TAGFILE");
+ checkFileName(ConfigImpl_getString("GENERATE_TAGFILE"),"GENERATE_TAGFILE");
#if 0 // TODO: this breaks test 25; SOURCEBROWSER = NO and SOURCE_TOOLTIPS = YES.
// So this and other regressions should be analysed and fixed before this can be enabled
@@ -1599,140 +1728,50 @@ void Config::check()
{
ConfigOption * dep = Config::instance()->get(depName);
if (dep->kind()==ConfigOption::O_Bool &&
- Config_getBool(depName)==FALSE) // dependent option is disabled
+ ConfigImpl_getBool("depName")==FALSE) // dependent option is disabled
{
if (option->kind()==ConfigOption::O_Bool)
{
printf("disabling option %s\n",option->name().data());
- Config_getBool(option->name())=FALSE; // also disable this option
+ ConfigImpl_getBool("option->name("))=FALSE; // also disable this option
}
}
}
}
#endif
+
+ ConfigValues::instance().init();
+
}
-void Config::init()
+void Config::writeTemplate(FTextStream &t,bool shortList,bool update)
{
- QListIterator<ConfigOption> it = iterator();
- ConfigOption *option;
- for (;(option=it.current());++it)
- {
- option->init();
- }
-
- // sanity check if all depends relations are valid
- for (it.toFirst();(option=it.current());++it)
- {
- QCString depName = option->dependsOn();
- if (!depName.isEmpty())
- {
- ConfigOption * opt = Config::instance()->get(depName);
- if (opt==0)
- {
- config_warn("Config option '%s' has invalid depends relation on unknown option '%s'\n",
- option->name().data(),depName.data());
- exit(1);
- }
- }
- }
+ ConfigImpl::instance()->writeTemplate(t,shortList,update);
}
-void Config::create()
+bool Config::parse(const char *fileName,bool update)
{
- if (m_initialized) return;
- m_initialized = TRUE;
- addConfigOptions(this);
+ return ConfigImpl::instance()->parse(fileName,update);
}
-static QCString configFileToString(const char *name)
+void Config::postProcess(bool clearHeaderAndFooter)
{
- if (name==0 || name[0]==0) return 0;
- QFile f;
+ ConfigImpl::instance()->substituteEnvironmentVars();
+ ConfigImpl::instance()->convertStrToVal();
- bool fileOpened=FALSE;
- if (name[0]=='-' && name[1]==0) // read from stdin
+ // avoid bootstrapping issues when the config file already
+ // refers to the files that we are supposed to parse.
+ if (clearHeaderAndFooter)
{
- fileOpened=f.open(IO_ReadOnly,stdin);
- if (fileOpened)
- {
- const int bSize=4096;
- QCString contents(bSize);
- int totalSize=0;
- int size;
- while ((size=f.readBlock(contents.rawData()+totalSize,bSize))==bSize)
- {
- totalSize+=bSize;
- contents.resize(totalSize+bSize);
- }
- totalSize+=size+2;
- contents.resize(totalSize);
- contents.at(totalSize-2)='\n'; // to help the scanner
- contents.at(totalSize-1)='\0';
- return contents;
- }
- }
- else // read from file
- {
- QFileInfo fi(name);
- if (!fi.exists() || !fi.isFile())
- {
- config_err("file `%s' not found\n",name);
- return "";
- }
- f.setName(name);
- fileOpened=f.open(IO_ReadOnly);
- if (fileOpened)
- {
- int fsize=f.size();
- QCString contents(fsize+2);
- f.readBlock(contents.rawData(),fsize);
- f.close();
- if (fsize==0 || contents[fsize-1]=='\n')
- contents[fsize]='\0';
- else
- contents[fsize]='\n'; // to help the scanner
- contents[fsize+1]='\0';
- return contents;
- }
- }
- if (!fileOpened)
- {
- config_err("cannot open file `%s' for reading\n",name);
- exit(1);
+ ConfigImpl_getString("HTML_HEADER")="";
+ ConfigImpl_getString("HTML_FOOTER")="";
+ ConfigImpl_getString("LATEX_HEADER")="";
+ ConfigImpl_getString("LATEX_FOOTER")="";
}
- return "";
}
-bool Config::parseString(const char *fn,const char *str,bool update)
+void Config::deinit()
{
- config = Config::instance();
- inputString = str;
- inputPosition = 0;
- yyFileName = fn;
- yyLineNr = 1;
- includeStack.setAutoDelete(TRUE);
- includeStack.clear();
- includeDepth = 0;
- configYYrestart( configYYin );
- BEGIN( PreStart );
- config_upd = update;
- configYYlex();
- config_upd = FALSE;
- inputString = 0;
- return TRUE;
+ ConfigImpl::instance()->deleteInstance();
}
-bool Config::parse(const char *fn,bool update)
-{
- int retval;
- encoding = "UTF-8";
- printlex(yy_flex_debug, TRUE, __FILE__, fn);
- retval = parseString(fn,configFileToString(fn), update);
- printlex(yy_flex_debug, FALSE, __FILE__, fn);
- return retval;
-}
-
-extern "C" { // some bogus code to keep the compiler happy
- //int configYYwrap() { return 1 ; }
-}
diff --git a/src/configoptions.h b/src/configoptions.h
index 3979f7a..ec14bd2 100644
--- a/src/configoptions.h
+++ b/src/configoptions.h
@@ -16,8 +16,8 @@
#ifndef CONFIGOPTIONS
#define CONFIGOPTIONS
-class Config;
+class ConfigImpl;
-void addConfigOptions(Config *cfg);
+void addConfigOptions(ConfigImpl *cfg);
#endif
diff --git a/src/constexp.l b/src/constexp.l
index e3ff3f1..8a7db04 100644
--- a/src/constexp.l
+++ b/src/constexp.l
@@ -16,6 +16,8 @@
*
*/
%option never-interactive
+%option prefix="constexpYY"
+
%{
#include "constexp.h"
diff --git a/src/constexp.y b/src/constexp.y
index c63fa5e..f87ebf3 100644
--- a/src/constexp.y
+++ b/src/constexp.y
@@ -42,6 +42,9 @@ int constexpYYlex();
%}
+%no-lines
+%name-prefix="constexpYY"
+
%token TOK_QUESTIONMARK
%token TOK_COLON
%token TOK_OR
diff --git a/src/context.cpp b/src/context.cpp
index 2412010..e5d98c1 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -35,6 +35,7 @@
#include "docparser.h"
#include "htmlgen.h"
#include "htmldocvisitor.h"
+#include "htmlhelp.h"
#include "latexgen.h"
#include "latexdocvisitor.h"
#include "dot.h"
@@ -46,12 +47,11 @@
#include "arguments.h"
#include "groupdef.h"
#include "searchindex.h"
+#include "resourcemgr.h"
// TODO: pass the current file to Dot*::writeGraph, so the user can put dot graphs in other
// files as well
-#define ADD_PROPERTY(name) addProperty(#name,this,&Private::name);
-
enum ContextOutputFormat
{
ContextOutputFormat_Unspecified=0,
@@ -332,22 +332,31 @@ TemplateVariant ConfigContext::get(const char *name) const
TemplateVariant result;
if (name)
{
- ConfigOption *option = Config::instance()->get(name);
+ const ConfigValues::Info *option = ConfigValues::instance().get(name);
if (option)
{
- switch (option->kind())
- {
- case ConfigOption::O_Bool:
- return TemplateVariant(*((ConfigBool*)option)->valueRef());
- case ConfigOption::O_Int:
- return TemplateVariant(*((ConfigInt*)option)->valueRef());
- case ConfigOption::O_Enum:
- return TemplateVariant(*((ConfigEnum*)option)->valueRef());
- case ConfigOption::O_String:
- return TemplateVariant(*((ConfigString*)option)->valueRef());
- case ConfigOption::O_List:
- return p->fetchList(name,((ConfigList*)option)->valueRef());
- break;
+ switch (option->type)
+ {
+ case ConfigValues::Info::Bool:
+ {
+ bool b = ConfigValues::instance().*((ConfigValues::InfoBool*)option)->item;
+ return TemplateVariant(b);
+ }
+ case ConfigValues::Info::Int:
+ {
+ int i = ConfigValues::instance().*((ConfigValues::InfoInt*)option)->item;
+ return TemplateVariant(i);
+ }
+ case ConfigValues::Info::String:
+ {
+ QCString s = ConfigValues::instance().*((ConfigValues::InfoString*)option)->item;
+ return TemplateVariant(s);
+ }
+ case ConfigValues::Info::List:
+ {
+ const QStrList &l = ConfigValues::instance().*((ConfigValues::InfoList*)option)->item;
+ return p->fetchList(name,&l);
+ }
default:
break;
}
@@ -396,7 +405,7 @@ class DoxygenContext::Private
private:
struct Cachable
{
- Cachable() { maxJaxCodeFile=fileToString(Config_getString("MATHJAX_CODEFILE")); }
+ Cachable() { maxJaxCodeFile=fileToString(Config_getString(MATHJAX_CODEFILE)); }
QCString maxJaxCodeFile;
};
mutable Cachable m_cache;
@@ -722,12 +731,12 @@ class TranslateContext::Private
}
TemplateVariant fileMembersDescription() const
{
- static bool extractAll = Config_getBool("EXTRACT_ALL");
+ static bool extractAll = Config_getBool(EXTRACT_ALL);
return theTranslator->trFileMembersDescription(extractAll);
}
TemplateVariant namespaceMembersDescription() const
{
- static bool extractAll = Config_getBool("EXTRACT_ALL");
+ static bool extractAll = Config_getBool(EXTRACT_ALL);
return theTranslator->trNamespaceMemberDescription(extractAll);
}
TemplateVariant classHierarchyDescription() const
@@ -744,8 +753,8 @@ class TranslateContext::Private
}
TemplateVariant classMembersDescription() const
{
- static bool extractAll = Config_getBool("EXTRACT_ALL");
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ static bool extractAll = Config_getBool(EXTRACT_ALL);
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
if (fortranOpt)
{
return theTranslator->trCompoundMembersDescriptionFortran(extractAll);
@@ -893,17 +902,17 @@ class TranslateContext::Private
}
TemplateVariant fileListDescription() const
{
- bool extractAll = Config_getBool("EXTRACT_ALL");
+ bool extractAll = Config_getBool(EXTRACT_ALL);
return theTranslator->trFileListDescription(extractAll);
}
TemplateVariant modulesDescription() const
{
- bool extractAll = Config_getBool("EXTRACT_ALL");
+ bool extractAll = Config_getBool(EXTRACT_ALL);
return theTranslator->trModulesListDescription(extractAll);
}
TemplateVariant namespaceListDescription() const
{
- bool extractAll = Config_getBool("EXTRACT_ALL");
+ bool extractAll = Config_getBool(EXTRACT_ALL);
return theTranslator->trNamespaceListDescription(extractAll);
}
TemplateVariant directories() const
@@ -916,8 +925,8 @@ class TranslateContext::Private
}
TemplateVariant functions() const
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
return fortranOpt ? theTranslator->trSubprograms() :
vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
theTranslator->trFunctions();
@@ -998,6 +1007,10 @@ class TranslateContext::Private
{
return theTranslator->trExamplesDescription();
}
+ TemplateVariant langString() const
+ {
+ return HtmlHelp::getLanguageString();
+ }
Private()
{
static bool init=FALSE;
@@ -1187,13 +1200,15 @@ class TranslateContext::Private
s_inst.addProperty("extendsClass", &Private::extendsClass);
//%% string examplesDescription
s_inst.addProperty("examplesDescription",&Private::examplesDescription);
+ //%% string langstring
+ s_inst.addProperty("langString", &Private::langString);
init=TRUE;
}
- m_javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- m_fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- m_vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ m_javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ m_fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ m_vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
}
TemplateVariant get(const char *n) const
{
@@ -1296,7 +1311,7 @@ static TemplateVariant parseCode(MemberDef *md,const QCString &scopeName,const Q
static TemplateVariant parseCode(FileDef *fd,const QCString &relPath)
{
- static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
+ static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
ParserInterface *pIntf = Doxygen::parserManager->getParser(fd->getDefFileExtension());
pIntf->resetCodeParserState();
QGString s;
@@ -1430,7 +1445,7 @@ class DefinitionContext
}
QCString relPathAsString() const
{
- static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
+ static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
return createSubdirs ? QCString("../../") : QCString("");
}
virtual TemplateVariant relPath() const
@@ -1507,6 +1522,7 @@ class DefinitionContext
case SrcLangExt_Fortran: result="fortran"; break;
case SrcLangExt_VHDL: result="vhdl"; break;
case SrcLangExt_XML: result="xml"; break;
+ case SrcLangExt_SQL: result="sql"; break;
case SrcLangExt_Tcl: result="tcl"; break;
case SrcLangExt_Markdown: result="markdown"; break;
}
@@ -1910,9 +1926,9 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
TemplateVariant hasInheritanceDiagram() const
{
bool result=FALSE;
- static bool haveDot = Config_getBool("HAVE_DOT");
- static bool classDiagrams = Config_getBool("CLASS_DIAGRAMS");
- static bool classGraph = Config_getBool("CLASS_GRAPH");
+ static bool haveDot = Config_getBool(HAVE_DOT);
+ static bool classDiagrams = Config_getBool(CLASS_DIAGRAMS);
+ static bool classGraph = Config_getBool(CLASS_GRAPH);
if (haveDot && (classDiagrams || classGraph))
{
DotClassGraph *cg = getClassGraph();
@@ -1927,9 +1943,9 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
TemplateVariant inheritanceDiagram() const
{
QGString result;
- static bool haveDot = Config_getBool("HAVE_DOT");
- static bool classDiagrams = Config_getBool("CLASS_DIAGRAMS");
- static bool classGraph = Config_getBool("CLASS_GRAPH");
+ static bool haveDot = Config_getBool(HAVE_DOT);
+ static bool classDiagrams = Config_getBool(CLASS_DIAGRAMS);
+ static bool classGraph = Config_getBool(CLASS_GRAPH);
if (haveDot && (classDiagrams || classGraph))
{
DotClassGraph *cg = getClassGraph();
@@ -1974,7 +1990,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
t << "<img src=\"";
t << relPathAsString() << m_classDef->getOutputFileBase();
t << ".png\" usemap=\"#" << convertToId(name) << "_map\" alt=\"\"/>" << endl;
- t << "<map id=\"" << convertToId(name) << "_map\" name=\"" << name << "_map\">" << endl;
+ t << "<map id=\"" << convertToId(name) << "_map\" name=\"" << convertToId(name) << "_map\">" << endl;
d.writeImage(t,g_globals.outputDir,
relPathAsString(),
m_classDef->getOutputFileBase());
@@ -2006,12 +2022,12 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
}
TemplateVariant hasCollaborationDiagram() const
{
- static bool haveDot = Config_getBool("HAVE_DOT");
+ static bool haveDot = Config_getBool(HAVE_DOT);
return haveDot && !getCollaborationGraph()->isTrivial();
}
TemplateVariant collaborationDiagram() const
{
- static bool haveDot = Config_getBool("HAVE_DOT");
+ static bool haveDot = Config_getBool(HAVE_DOT);
QGString result;
if (haveDot)
{
@@ -3009,13 +3025,13 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
}
TemplateVariant hasIncludeGraph() const
{
- static bool haveDot = Config_getBool("HAVE_DOT");
+ static bool haveDot = Config_getBool(HAVE_DOT);
DotInclDepGraph *incGraph = getIncludeGraph();
return (haveDot && !incGraph->isTooBig() && !incGraph->isTrivial());
}
TemplateVariant includeGraph() const
{
- static bool haveDot = Config_getBool("HAVE_DOT");
+ static bool haveDot = Config_getBool(HAVE_DOT);
QGString result;
if (haveDot)
{
@@ -3061,13 +3077,13 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
}
TemplateVariant hasIncludedByGraph() const
{
- static bool haveDot = Config_getBool("HAVE_DOT");
+ static bool haveDot = Config_getBool(HAVE_DOT);
DotInclDepGraph *incGraph = getIncludedByGraph();
return (haveDot && !incGraph->isTooBig() && !incGraph->isTrivial());
}
TemplateVariant includedByGraph() const
{
- static bool haveDot = Config_getBool("HAVE_DOT");
+ static bool haveDot = Config_getBool(HAVE_DOT);
QGString result;
if (haveDot)
{
@@ -3470,8 +3486,8 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
TemplateVariant hasDirGraph() const
{
bool result=FALSE;
- static bool haveDot = Config_getBool("HAVE_DOT");
- static bool dirGraph = Config_getBool("DIRECTORY_GRAPH");
+ static bool haveDot = Config_getBool(HAVE_DOT);
+ static bool dirGraph = Config_getBool(DIRECTORY_GRAPH);
if (haveDot && dirGraph)
{
DotDirDeps *graph = getDirDepsGraph();
@@ -3482,8 +3498,8 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
TemplateVariant dirGraph() const
{
QGString result;
- static bool haveDot = Config_getBool("HAVE_DOT");
- static bool dirGraph = Config_getBool("DIRECTORY_GRAPH");
+ static bool haveDot = Config_getBool(HAVE_DOT);
+ static bool dirGraph = Config_getBool(DIRECTORY_GRAPH);
if (haveDot && dirGraph)
{
DotDirDeps *graph = getDirDepsGraph();
@@ -3785,7 +3801,7 @@ class TextGeneratorLatex : public TextGeneratorIntf
const char *anchor,const char *text
) const
{
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (!ref && pdfHyperlinks)
{
m_ts << "\\hyperlink{";
@@ -3798,7 +3814,7 @@ class TextGeneratorLatex : public TextGeneratorIntf
}
else
{
- m_ts << "{\\bf ";
+ m_ts << "\\textbf{ ";
filterLatexString(m_ts,text);
m_ts << "}";
}
@@ -3954,6 +3970,8 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
s_inst.addProperty("parameters", &Private::parameters);
s_inst.addProperty("hasConstQualifier", &Private::hasConstQualifier);
s_inst.addProperty("hasVolatileQualifier",&Private::hasVolatileQualifier);
+ s_inst.addProperty("hasRefQualifierLValue", &Private::hasRefQualifierLValue);
+ s_inst.addProperty("hasRefQualifierRValue", &Private::hasRefQualifierRValue);
s_inst.addProperty("trailingReturnType", &Private::trailingReturnType);
s_inst.addProperty("extraTypeChars", &Private::extraTypeChars);
s_inst.addProperty("templateDecls", &Private::templateDecls);
@@ -4556,6 +4574,16 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
ArgumentList *al = getDefArgList();
return al ? al->volatileSpecifier : FALSE;
}
+ TemplateVariant hasRefQualifierLValue() const
+ {
+ ArgumentList *al = getDefArgList();
+ return al ? al->refQualifier==RefQualifierLValue : FALSE;
+ }
+ TemplateVariant hasRefQualifierRValue() const
+ {
+ ArgumentList *al = getDefArgList();
+ return al ? al->refQualifier==RefQualifierRValue : FALSE;
+ }
TemplateVariant trailingReturnType() const
{
ArgumentList *al = getDefArgList();
@@ -4881,7 +4909,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
TemplateVariant hasCallGraph() const
{
- static bool haveDot = Config_getBool("HAVE_DOT");
+ static bool haveDot = Config_getBool(HAVE_DOT);
if (m_memberDef->hasCallGraph() && haveDot &&
(m_memberDef->isFunction() || m_memberDef->isSlot() || m_memberDef->isSignal()))
{
@@ -4941,7 +4969,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
TemplateVariant hasCallerGraph() const
{
- static bool haveDot = Config_getBool("HAVE_DOT");
+ static bool haveDot = Config_getBool(HAVE_DOT);
if (m_memberDef->hasCallerGraph() && haveDot &&
(m_memberDef->isFunction() || m_memberDef->isSlot() || m_memberDef->isSignal()))
{
@@ -5200,8 +5228,8 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
TemplateVariant hasGroupGraph() const
{
bool result=FALSE;
- static bool haveDot = Config_getBool("HAVE_DOT");
- static bool groupGraphs = Config_getBool("GROUP_GRAPHS");
+ static bool haveDot = Config_getBool(HAVE_DOT);
+ static bool groupGraphs = Config_getBool(GROUP_GRAPHS);
if (haveDot && groupGraphs)
{
DotGroupCollaboration *graph = getGroupGraph();
@@ -5212,8 +5240,8 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
TemplateVariant groupGraph() const
{
QGString result;
- static bool haveDot = Config_getBool("HAVE_DOT");
- static bool groupGraphs = Config_getBool("GROUP_GRAPHS");
+ static bool haveDot = Config_getBool(HAVE_DOT);
+ static bool groupGraphs = Config_getBool(GROUP_GRAPHS);
if (haveDot && groupGraphs)
{
DotGroupCollaboration *graph = getGroupGraph();
@@ -5792,8 +5820,8 @@ class ClassIndexContext::Private
}
TemplateVariant title() const
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
if (fortranOpt)
{
return theTranslator->trDataTypes();
@@ -5879,7 +5907,7 @@ static int computeNumNodesAtLevel(const TemplateStructIntf *s,int level,int maxL
static int computePreferredDepth(const TemplateListIntf *list,int maxDepth)
{
- int preferredNumEntries = Config_getInt("HTML_INDEX_NUM_ENTRIES");
+ int preferredNumEntries = Config_getInt(HTML_INDEX_NUM_ENTRIES);
int preferredDepth=1;
if (preferredNumEntries>0)
{
@@ -5991,7 +6019,7 @@ class ClassHierarchyContext::Private
}
TemplateVariant title() const
{
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
if (vhdlOpt)
{
return VhdlDocGen::trDesignUnitHierarchy();
@@ -6227,7 +6255,7 @@ class NestingNodeContext::Private
}
QCString relPathAsString() const
{
- static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
+ static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
return createSubdirs ? QCString("../../") : QCString("");
}
TemplateVariant brief() const
@@ -6512,7 +6540,7 @@ class NestingContext::Private : public GenericNodeListContext
GroupDef *gd;
for (gli.toFirst();(gd=gli.current());++gli)
{
- static bool externalGroups = Config_getBool("EXTERNAL_GROUPS");
+ static bool externalGroups = Config_getBool(EXTERNAL_GROUPS);
if (!gd->isASubGroup() && gd->isVisible() &&
(!gd->isReference() || externalGroups)
)
@@ -6744,8 +6772,8 @@ class ClassTreeContext::Private
}
TemplateVariant title() const
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
if (fortranOpt)
{
return theTranslator->trCompoundListFortran();
@@ -6912,9 +6940,9 @@ class NamespaceTreeContext::Private
}
TemplateVariant title() const
{
- static bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
if (javaOpt || vhdlOpt)
{
return theTranslator->trPackages();
@@ -7668,7 +7696,7 @@ class NavPathElemContext::Private
}
QCString relPathAsString() const
{
- static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
+ static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
return createSubdirs ? QCString("../../") : QCString("");
}
TemplateVariant externalReference() const
@@ -8302,8 +8330,8 @@ class InheritanceGraphContext::Private
TemplateVariant graph() const
{
QGString result;
- static bool haveDot = Config_getBool("HAVE_DOT");
- static bool graphicalHierarchy = Config_getBool("GRAPHICAL_HIERARCHY");
+ static bool haveDot = Config_getBool(HAVE_DOT);
+ static bool graphicalHierarchy = Config_getBool(GRAPHICAL_HIERARCHY);
if (haveDot && graphicalHierarchy)
{
FTextStream t(&result);
@@ -8637,7 +8665,7 @@ class AllMembersListContext::Private : public GenericNodeListContext
{
if (ml)
{
- static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
+ static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
MemberNameInfoSDict::Iterator mnii(*ml);
MemberNameInfo *mni;
for (mnii.toFirst();(mni=mnii.current());++mnii)
@@ -10157,18 +10185,19 @@ void generateOutputViaTemplate()
//%% string space
ctx->set("space"," ");
- //if (Config_getBool("GENERATE_HTML"))
+ //if (Config_getBool(GENERATE_HTML))
{ // render HTML output
+ e.setTemplateDir("templates/html"); // TODO: make template part user configurable
Template *tpl = e.loadByName("htmllayout.tpl",1);
if (tpl)
{
g_globals.outputFormat = ContextOutputFormat_Html;
g_globals.dynSectionId = 0;
- g_globals.outputDir = Config_getString("HTML_OUTPUT");
+ g_globals.outputDir = Config_getString(HTML_OUTPUT);
QDir dir(g_globals.outputDir);
createSubDirs(dir);
HtmlEscaper htmlEsc;
- ctx->setEscapeIntf(Config_getString("HTML_FILE_EXTENSION"),&htmlEsc);
+ ctx->setEscapeIntf(Config_getString(HTML_FILE_EXTENSION),&htmlEsc);
HtmlSpaceless spl;
ctx->setSpacelessIntf(&spl);
ctx->setOutputDirectory(g_globals.outputDir);
@@ -10180,15 +10209,16 @@ void generateOutputViaTemplate()
// TODO: clean index before each run...
- //if (Config_getBool("GENERATE_LATEX"))
+ //if (Config_getBool(GENERATE_LATEX))
if (0)
{ // render LaTeX output
+ e.setTemplateDir("templates/latex"); // TODO: make template part user configurable
Template *tpl = e.loadByName("latexlayout.tpl",1);
if (tpl)
{
g_globals.outputFormat = ContextOutputFormat_Latex;
g_globals.dynSectionId = 0;
- g_globals.outputDir = Config_getString("LATEX_OUTPUT");
+ g_globals.outputDir = Config_getString(LATEX_OUTPUT);
QDir dir(g_globals.outputDir);
createSubDirs(dir);
LatexEscaper latexEsc;
@@ -10232,3 +10262,20 @@ void generateOutputViaTemplate()
#endif
}
+void generateTemplateFiles(const char *templateDir)
+{
+ if (!templateDir) return;
+ QDir thisDir;
+ if (!thisDir.exists(templateDir) && !thisDir.mkdir(templateDir))
+ {
+ err("Failed to create output directory '%s'\n",templateDir);
+ return;
+ }
+ QCString outDir = QCString(templateDir)+"/html";
+ if (!thisDir.exists(outDir) && !thisDir.mkdir(outDir))
+ {
+ err("Failed to create output directory '%s'\n",templateDir);
+ return;
+ }
+ ResourceMgr::instance().writeCategory("html",outDir);
+}
diff --git a/src/context.h b/src/context.h
index 7c98222..e082c4b 100644
--- a/src/context.h
+++ b/src/context.h
@@ -1347,5 +1347,6 @@ class SearchIndicesContext : public RefCountedContext, public TemplateListIntf
//----------------------------------------------------
void generateOutputViaTemplate();
+void generateTemplateFiles(const char *templateDir);
#endif
diff --git a/src/declinfo.l b/src/declinfo.l
index 0f24d9e..a91f832 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -15,6 +15,8 @@
*
*/
%option never-interactive
+%option prefix="declinfoYY"
+
%{
/*
diff --git a/src/defargs.l b/src/defargs.l
index 603f238..a55ad27 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -40,6 +40,8 @@
* further determine the correct separation.
*/
%option never-interactive
+%option prefix="defargsYY"
+
%{
/*
@@ -477,6 +479,12 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
<FuncQual>"volatile" {
g_argList->volatileSpecifier=TRUE;
}
+<FuncQual>"&" {
+ g_argList->refQualifier=RefQualifierLValue;
+ }
+<FuncQual>"&&" {
+ g_argList->refQualifier=RefQualifierRValue;
+ }
<FuncQual,TrailingReturn>"="{B}*"0" {
g_argList->pureSpecifier=TRUE;
BEGIN(FuncQual);
diff --git a/src/defgen.cpp b/src/defgen.cpp
index 90ae0a2..cd69ab2 100644
--- a/src/defgen.cpp
+++ b/src/defgen.cpp
@@ -557,7 +557,7 @@ void generateDEFForFile(FileDef *fd,FTextStream &t)
void generateDEF()
{
- QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
+ QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY);
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath().utf8();
diff --git a/src/define.cpp b/src/define.cpp
index 121f5cb..b5d9170 100644
--- a/src/define.cpp
+++ b/src/define.cpp
@@ -50,5 +50,5 @@ Define::~Define()
bool Define::hasDocumentation()
{
- return definition && (doc || Config_getBool("EXTRACT_ALL"));
+ return definition && (doc || Config_getBool(EXTRACT_ALL));
}
diff --git a/src/definition.cpp b/src/definition.cpp
index d04dd59..68201da 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -149,7 +149,7 @@ void DefinitionImpl::init(const char *df, const char *n)
static bool matchExcludedSymbols(const char *name)
{
- static QStrList &exclSyms = Config_getList("EXCLUDE_SYMBOLS");
+ static QStrList &exclSyms = Config_getList(EXCLUDE_SYMBOLS);
if (exclSyms.count()==0) return FALSE; // nothing specified
const char *pat = exclSyms.first();
QCString symName = name;
@@ -206,7 +206,7 @@ static bool matchExcludedSymbols(const char *name)
void Definition::addToMap(const char *name,Definition *d)
{
- bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString symbolName = name;
int index=computeQualifiedIndex(symbolName);
if (!vhdlOpt && index!=-1) symbolName=symbolName.mid(index+2);
@@ -526,7 +526,7 @@ void Definition::writeDocAnchorsToTagFile(FTextStream &tagFile)
SectionInfo *si;
for (;(si=sdi.current());++sdi)
{
- if (!si->generated)
+ if (!si->generated && si->ref.isEmpty())
{
//printf("write an entry!\n");
if (definitionType()==TypeMember) tagFile << " ";
@@ -631,7 +631,7 @@ static bool lastCharIsMultibyte(const QCString &s)
void Definition::_setBriefDescription(const char *b,const char *briefFile,int briefLine)
{
- static QCString outputLanguage = Config_getEnum("OUTPUT_LANGUAGE");
+ static QCString outputLanguage = Config_getEnum(OUTPUT_LANGUAGE);
static bool needsDot = outputLanguage!="Japanese" &&
outputLanguage!="Chinese" &&
outputLanguage!="Korean";
@@ -728,8 +728,8 @@ void Definition::setInbodyDocumentation(const char *d,const char *inbodyFile,int
bool readCodeFragment(const char *fileName,
int &startLine,int &endLine,QCString &result)
{
- static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
- static int tabSize = Config_getInt("TAB_SIZE");
+ static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
+ static int tabSize = Config_getInt(TAB_SIZE);
//printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine);
if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name
QCString filter = getFileFilter(fileName,TRUE);
@@ -878,6 +878,7 @@ bool readCodeFragment(const char *fileName,
}
}
result = transcodeCharacterStringToUTF8(result);
+ if (!result.isEmpty() && result.at(result.length()-1)!='\n') result += "\n";
//fprintf(stderr,"readCodeFragement(%d-%d)=%s\n",startLine,endLine,result.data());
return found;
}
@@ -886,7 +887,7 @@ QCString Definition::getSourceFileBase() const
{
ASSERT(definitionType()!=Definition::TypeFile); // file overloads this method
QCString fn;
- static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
+ static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
if (sourceBrowser &&
m_impl->body && m_impl->body->startLine!=-1 && m_impl->body->fileDef)
{
@@ -917,8 +918,8 @@ QCString Definition::getSourceAnchor() const
/*! Write a reference to the source code defining this definition */
void Definition::writeSourceDef(OutputList &ol,const char *)
{
- static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
- static bool rtfSourceCode = Config_getBool("RTF_SOURCE_CODE");
+ static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE);
+ static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE);
ol.pushGeneratorState();
//printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
QCString fn = getSourceFileBase();
@@ -932,7 +933,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
QCString lineStr;
lineStr.sprintf("%d",m_impl->body->startLine);
QCString anchorStr = getSourceAnchor();
- ol.startParagraph();
+ ol.startParagraph("definition");
if (lineMarkerPos<fileMarkerPos) // line marker before file marker
{
// write text left from linePos marker
@@ -1066,7 +1067,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
}
else
{
- err("translation error: invalid markers in trDefinedInSourceFile()\n");
+ err("translation error: invalid markers in trDefinedAtLineInSourceFile()\n");
}
}
ol.popGeneratorState();
@@ -1096,7 +1097,7 @@ bool Definition::hasSources() const
/*! Write code of this definition into the documentation */
void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
{
- static bool inlineSources = Config_getBool("INLINE_SOURCES");
+ static bool inlineSources = Config_getBool(INLINE_SOURCES);
ol.pushGeneratorState();
//printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
// m_startBodyLine,m_endBodyLine,m_bodyDef);
@@ -1142,16 +1143,16 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool /*funcOnly*/)
{
- static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
- static bool rtfSourceCode = Config_getBool("RTF_SOURCE_CODE");
- static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
- static bool refLinkSource = Config_getBool("REFERENCES_LINK_SOURCE");
+ static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE);
+ static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE);
+ static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ static bool refLinkSource = Config_getBool(REFERENCES_LINK_SOURCE);
ol.pushGeneratorState();
if (members)
{
members->sort();
- ol.startParagraph();
+ ol.startParagraph("reference");
ol.parseText(text);
ol.docify(" ");
@@ -1276,7 +1277,7 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName,
void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName)
{
- if (Config_getBool("REFERENCED_BY_RELATION"))
+ if (Config_getBool(REFERENCED_BY_RELATION))
{
_writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_impl->sourceRefByDict,FALSE);
}
@@ -1284,7 +1285,7 @@ void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName)
void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
{
- if (Config_getBool("REFERENCES_RELATION"))
+ if (Config_getBool(REFERENCES_RELATION))
{
_writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_impl->sourceRefsDict,TRUE);
}
@@ -1292,8 +1293,8 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
bool Definition::hasDocumentation() const
{
- static bool extractAll = Config_getBool("EXTRACT_ALL");
- //static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
+ static bool extractAll = Config_getBool(EXTRACT_ALL);
+ //static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
bool hasDocs =
(m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs
(m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description
@@ -1507,19 +1508,6 @@ QList<ListItemInfo> *Definition::xrefListItems() const
return m_impl->xrefListItems;
}
-
-QCString Definition::convertNameToFile(const char *name,bool allowDots) const
-{
- if (!m_impl->ref.isEmpty())
- {
- return name;
- }
- else
- {
- return ::convertNameToFile(name,allowDots);
- }
-}
-
QCString Definition::pathFragment() const
{
QCString result;
@@ -1741,7 +1729,7 @@ QCString abbreviate(const char *s,const char *name)
result=result.left(result.length()-1);
// strip any predefined prefix
- QStrList &briefDescAbbrev = Config_getList("ABBREVIATE_BRIEF");
+ QStrList &briefDescAbbrev = Config_getList(ABBREVIATE_BRIEF);
const char *p = briefDescAbbrev.first();
while (p)
{
@@ -1888,6 +1876,21 @@ GroupList *Definition::partOfGroups() const
return m_impl->partOfGroups;
}
+bool Definition::isLinkableViaGroup() const
+{
+ GroupList *gl = partOfGroups();
+ if (gl)
+ {
+ GroupListIterator gli(*gl);
+ GroupDef *gd;
+ for (gli.toFirst();(gd=gli.current());++gli)
+ {
+ if (gd->isLinkable()) return TRUE;
+ }
+ }
+ return FALSE;
+}
+
Definition *Definition::getOuterScope() const
{
return m_impl->outerScope;
@@ -1941,7 +1944,7 @@ void Definition::_setSymbolName(const QCString &name)
bool Definition::hasBriefDescription() const
{
- static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC");
+ static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
return !briefDescription().isEmpty() && briefMemberDesc;
}
diff --git a/src/definition.h b/src/definition.h
index 6277c6c..48c572d 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -257,6 +257,7 @@ class Definition : public DefinitionIntf
SrcLangExt getLanguage() const;
GroupList *partOfGroups() const;
+ bool isLinkableViaGroup() const;
QList<ListItemInfo> *xrefListItems() const;
@@ -326,7 +327,6 @@ class Definition : public DefinitionIntf
// --- actions ----
//-----------------------------------------------------------------------------------
- QCString convertNameToFile(const char *name,bool allowDots=FALSE) const;
void writeSourceDef(OutputList &ol,const char *scopeName);
void writeInlineCode(OutputList &ol,const char *scopeName);
void writeSourceRefs(OutputList &ol,const char *scopeName);
diff --git a/src/dia.cpp b/src/dia.cpp
index 347acba..5adbc7c 100644
--- a/src/dia.cpp
+++ b/src/dia.cpp
@@ -37,7 +37,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
// go to the html output directory (i.e. path)
QDir::setCurrent(outDir);
//printf("Going to dir %s\n",QDir::currentDirPath().data());
- QCString diaExe = Config_getString("DIA_PATH")+"dia"+portable_commandExtension();
+ QCString diaExe = Config_getString(DIA_PATH)+"dia"+portable_commandExtension();
QCString diaArgs;
QCString extension;
diaArgs+="-n ";
@@ -69,7 +69,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
goto error;
}
portable_sysTimerStop();
- if ( (format==DIA_EPS) && (Config_getBool("USE_PDFLATEX")) )
+ if ( (format==DIA_EPS) && (Config_getBool(USE_PDFLATEX)) )
{
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 8a6ccf6..42792ad 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -321,7 +321,7 @@ QCString DiagramItem::label() const
{
result=classDef->displayName();
}
- if (Config_getBool("HIDE_SCOPE_NAMES")) result=stripScope(result);
+ if (Config_getBool(HIDE_SCOPE_NAMES)) result=stripScope(result);
return result;
}
@@ -1332,7 +1332,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
super->drawConnectors(t,0,FALSE,FALSE,baseRows,superRows,0,0);
f1.close();
- if (Config_getBool("USE_PDFLATEX"))
+ if (Config_getBool(USE_PDFLATEX))
{
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index ddd0c37..0a63c1e 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -20,7 +20,7 @@ static int g_dirCount=0;
DirDef::DirDef(const char *path) : Definition(path,1,1,path), visited(FALSE)
{
- bool fullPathNames = Config_getBool("FULL_PATH_NAMES");
+ bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
// get display name (stipping the paths mentioned in STRIP_FROM_PATH)
// get short name (last part of path)
m_shortName = path;
@@ -67,17 +67,23 @@ bool DirDef::isLinkable() const
void DirDef::addSubDir(DirDef *subdir)
{
- m_subdirs.inSort(subdir);
+ m_subdirs.append(subdir);
subdir->setOuterScope(this);
subdir->m_parent=this;
}
void DirDef::addFile(FileDef *fd)
{
- m_fileList->inSort(fd);
+ m_fileList->append(fd);
fd->setDirDef(this);
}
+void DirDef::sort()
+{
+ m_subdirs.sort();
+ m_fileList->sort();
+}
+
static QCString encodeDirName(const QCString &anchor)
{
// convert to md5 hash
@@ -119,7 +125,7 @@ QCString DirDef::getOutputFileBase() const
void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
- if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
+ if ((!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF)) ||
!documentation().isEmpty())
{
ol.pushGeneratorState();
@@ -135,12 +141,12 @@ void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.endGroupHeader();
// repeat brief description
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
}
// separator between brief and details
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
+ if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
{
ol.pushGeneratorState();
@@ -164,20 +170,24 @@ void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title)
void DirDef::writeBriefDescription(OutputList &ol)
{
- if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (hasBriefDescription())
{
DocRoot *rootNode = validatingParseDoc(
briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.writeString(" - ");
+ ol.popGeneratorState();
ol.writeDoc(rootNode,this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.writeString(" \n");
ol.enable(OutputGenerator::RTF);
- if (Config_getBool("REPEAT_BRIEF") ||
+ if (Config_getBool(REPEAT_BRIEF) ||
!documentation().isEmpty()
)
{
@@ -198,7 +208,7 @@ void DirDef::writeBriefDescription(OutputList &ol)
void DirDef::writeDirectoryGraph(OutputList &ol)
{
// write graph dependency graph
- if (Config_getBool("DIRECTORY_GRAPH") && Config_getBool("HAVE_DOT"))
+ if (Config_getBool(DIRECTORY_GRAPH) && Config_getBool(HAVE_DOT))
{
DotDirDeps dirDep(this);
if (!dirDep.isTrivial())
@@ -217,37 +227,48 @@ void DirDef::writeDirectoryGraph(OutputList &ol)
void DirDef::writeSubDirList(OutputList &ol)
{
+ int numSubdirs = 0;
+ QListIterator<DirDef> it(m_subdirs);
+ DirDef *dd;
+ for (it.toFirst();(dd=it.current());++it)
+ {
+ if (dd->hasDocumentation() || dd->getFiles()->count()>0)
+ {
+ numSubdirs++;
+ }
+ }
+
// write subdir list
- if (m_subdirs.count()>0)
+ if (numSubdirs>0)
{
ol.startMemberHeader("subdirs");
ol.parseText(theTranslator->trDir(TRUE,FALSE));
ol.endMemberHeader();
ol.startMemberList();
- QListIterator<DirDef> it(m_subdirs);
- DirDef *dd;
- for (;(dd=it.current());++it)
+ for (it.toFirst();(dd=it.current());++it)
{
- if (!dd->hasDocumentation()) continue;
- ol.startMemberDeclaration();
- ol.startMemberItem(dd->getOutputFileBase(),0);
- ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
- ol.insertMemberAlign();
- ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
- ol.endMemberItem();
- if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (dd->hasDocumentation() || dd->getFiles()->count()==0)
{
- ol.startMemberDescription(dd->getOutputFileBase());
- ol.generateDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),
- FALSE, // indexWords
- FALSE, // isExample
- 0, // exampleName
- TRUE, // single line
- TRUE // link from index
- );
- ol.endMemberDescription();
+ ol.startMemberDeclaration();
+ ol.startMemberItem(dd->getOutputFileBase(),0);
+ ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
+ ol.insertMemberAlign();
+ ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
+ ol.endMemberItem();
+ if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
+ {
+ ol.startMemberDescription(dd->getOutputFileBase());
+ ol.generateDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),
+ FALSE, // indexWords
+ FALSE, // isExample
+ 0, // exampleName
+ TRUE, // single line
+ TRUE // link from index
+ );
+ ol.endMemberDescription();
+ }
+ ol.endMemberDeclaration(0,0);
}
- ol.endMemberDeclaration(0,0);
}
ol.endMemberList();
@@ -256,8 +277,19 @@ void DirDef::writeSubDirList(OutputList &ol)
void DirDef::writeFileList(OutputList &ol)
{
+ int numFiles = 0;
+ QListIterator<FileDef> it(*m_fileList);
+ FileDef *fd;
+ for (it.toFirst();(fd=it.current());++it)
+ {
+ if (fd->hasDocumentation())
+ {
+ numFiles++;
+ }
+ }
+
// write file list
- if (m_fileList->count()>0)
+ if (numFiles>0)
{
ol.startMemberHeader("files");
ol.parseText(theTranslator->trFile(TRUE,FALSE));
@@ -267,47 +299,49 @@ void DirDef::writeFileList(OutputList &ol)
FileDef *fd;
for (;(fd=it.current());++it)
{
- if (!fd->hasDocumentation()) continue;
- ol.startMemberDeclaration();
- ol.startMemberItem(fd->getOutputFileBase(),0);
- ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
- ol.insertMemberAlign();
- if (fd->isLinkable())
+ if (fd->hasDocumentation())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
- }
- else
- {
- ol.startBold();
- ol.docify(fd->name());
- ol.endBold();
- }
- if (fd->generateSourceFile())
- {
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
- ol.docify(" ");
- ol.startTextLink(fd->includeName(),0);
- ol.docify("[");
- ol.parseText(theTranslator->trCode());
- ol.docify("]");
- ol.endTextLink();
- ol.popGeneratorState();
- }
- ol.endMemberItem();
- if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
- {
- ol.startMemberDescription(fd->getOutputFileBase());
- ol.generateDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),
- FALSE, // indexWords
- FALSE, // isExample
- 0, // exampleName
- TRUE, // single line
- TRUE // link from index
- );
- ol.endMemberDescription();
+ ol.startMemberDeclaration();
+ ol.startMemberItem(fd->getOutputFileBase(),0);
+ ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
+ ol.insertMemberAlign();
+ if (fd->isLinkable())
+ {
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ }
+ else
+ {
+ ol.startBold();
+ ol.docify(fd->name());
+ ol.endBold();
+ }
+ if (fd->generateSourceFile())
+ {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.docify(" ");
+ ol.startTextLink(fd->includeName(),0);
+ ol.docify("[");
+ ol.parseText(theTranslator->trCode());
+ ol.docify("]");
+ ol.endTextLink();
+ ol.popGeneratorState();
+ }
+ ol.endMemberItem();
+ if (!fd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
+ {
+ ol.startMemberDescription(fd->getOutputFileBase());
+ ol.generateDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),
+ FALSE, // indexWords
+ FALSE, // isExample
+ 0, // exampleName
+ TRUE, // single line
+ TRUE // link from index
+ );
+ ol.endMemberDescription();
+ }
+ ol.endMemberDeclaration(0,0);
}
- ol.endMemberDeclaration(0,0);
}
ol.endMemberList();
}
@@ -330,7 +364,7 @@ QCString DirDef::shortTitle() const
bool DirDef::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
return (!briefDescription().isEmpty() && repeatBrief) || !documentation().isEmpty();
}
@@ -383,7 +417,7 @@ void DirDef::writeTagFile(FTextStream &tagFile)
void DirDef::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
ol.pushGeneratorState();
QCString title=theTranslator->trDirReference(m_dispName);
@@ -593,11 +627,20 @@ void DirDef::computeDependencies()
//printf(" %d: add dependency %s->%s\n",count++,name().data(),usedDir->name().data());
addUsesDependency(usedDir,fd,ii->fileDef,FALSE);
}
- }
+ }
}
}
}
}
+ if (m_usedDirs)
+ {
+ QDictIterator<UsedDir> udi(*m_usedDirs);
+ UsedDir *udir;
+ for (udi.toFirst();(udir=udi.current());++udi)
+ {
+ udir->sort();
+ }
+ }
}
bool DirDef::isParentOf(DirDef *dir) const
@@ -620,8 +663,9 @@ bool DirDef::depGraphIsTrivial() const
int FilePairDict::compareValues(const FilePair *left,const FilePair *right) const
{
int orderHi = qstricmp(left->source()->name(),right->source()->name());
+ if (orderHi!=0) return orderHi;
int orderLo = qstricmp(left->destination()->name(),right->destination()->name());
- return orderHi==0 ? orderLo : orderHi;
+ return orderLo;
}
//----------------------------------------------------------------------
@@ -639,10 +683,15 @@ UsedDir::~UsedDir()
void UsedDir::addFileDep(FileDef *srcFd,FileDef *dstFd)
{
- m_filePairs.inSort(srcFd->getOutputFileBase()+dstFd->getOutputFileBase(),
+ m_filePairs.append(srcFd->getOutputFileBase()+dstFd->getOutputFileBase(),
new FilePair(srcFd,dstFd));
}
+void UsedDir::sort()
+{
+ m_filePairs.sort();
+}
+
FilePair *UsedDir::findFilePair(const char *name)
{
QCString n=name;
@@ -658,7 +707,7 @@ DirDef *DirDef::createNewDir(const char *path)
//printf("Adding new dir %s\n",path);
dir = new DirDef(path);
//printf("createNewDir %s short=%s\n",path,dir->shortName().data());
- Doxygen::directories->inSort(path,dir);
+ Doxygen::directories->append(path,dir);
}
return dir;
}
@@ -679,7 +728,7 @@ bool DirDef::matchPath(const QCString &path,QStrList &l)
}
/*! strip part of \a path if it matches
- * one of the paths in the Config_getList("STRIP_FROM_PATH") list
+ * one of the paths in the Config_getList(STRIP_FROM_PATH) list
*/
DirDef *DirDef::mergeDirectoryInTree(const QCString &path)
{
@@ -689,7 +738,7 @@ DirDef *DirDef::mergeDirectoryInTree(const QCString &path)
while ((i=path.find('/',p))!=-1)
{
QCString part=path.left(i+1);
- if (!matchPath(part,Config_getList("STRIP_FROM_PATH")) && (part!="/" && part!="//"))
+ if (!matchPath(part,Config_getList(STRIP_FROM_PATH)) && (part!="/" && part!="//"))
{
dir=createNewDir(part);
}
@@ -731,7 +780,7 @@ static void writePartialFilePath(OutputList &ol,const DirDef *root,const FileDef
void DirRelation::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
@@ -903,7 +952,6 @@ void buildDirectories()
DirSDict::Iterator sdi(*Doxygen::directories);
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
- //printf("New dir %s\n",dir->displayName().data());
QCString name = dir->name();
int i=name.findRev('/',name.length()-2);
if (i>0)
@@ -918,6 +966,11 @@ void buildDirectories()
}
}
}
+ for (sdi.toFirst();(dir=sdi.current());++sdi)
+ {
+ dir->sort();
+ }
+ Doxygen::directories->sort();
computeCommonDirPrefix();
}
@@ -947,7 +1000,7 @@ void generateDirDocs(OutputList &ol)
{
dir->writeDocumentation(ol);
}
- if (Config_getBool("DIRECTORY_GRAPH"))
+ if (Config_getBool(DIRECTORY_GRAPH))
{
SDict<DirRelation>::Iterator rdi(Doxygen::dirRelations);
DirRelation *dr;
diff --git a/src/dirdef.h b/src/dirdef.h
index 611ba3e..2fb04f5 100644
--- a/src/dirdef.h
+++ b/src/dirdef.h
@@ -76,6 +76,7 @@ class DirDef : public Definition
static DirDef *mergeDirectoryInTree(const QCString &path);
bool visited;
void setDiskName(const QCString &name) { m_diskName = name; }
+ void sort();
private:
friend void computeDirDependencies();
@@ -138,6 +139,7 @@ class UsedDir
const FilePairDict &filePairs() const { return m_filePairs; }
const DirDef *dir() const { return m_dir; }
bool inherited() const { return m_inherited; }
+ void sort();
private:
DirDef *m_dir;
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
index ac00e1f..345629e 100644
--- a/src/docbookgen.cpp
+++ b/src/docbookgen.cpp
@@ -116,7 +116,7 @@ inline void writeDocbookCodeString(FTextStream &t,const char *s, int &col)
{
case '\t':
{
- static int tabSize = Config_getInt("TAB_SIZE");
+ static int tabSize = Config_getInt(TAB_SIZE);
int spacesToNextTabStop = tabSize - (col%tabSize);
col+=spacesToNextTabStop;
while (spacesToNextTabStop--) t << "&#32;";
@@ -355,7 +355,7 @@ void writeDocbookCodeBlock(FTextStream &t,FileDef *fd)
DocbookCodeGenerator *docbookGen = new DocbookCodeGenerator(t);
pIntf->parseCode(*docbookGen, // codeOutIntf
0, // scopeName
- fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES")),
+ fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES)),
langExt, // lang
FALSE, // isExampleBlock
0, // exampleName
@@ -372,7 +372,7 @@ void writeDocbookCodeBlock(FTextStream &t,FileDef *fd)
static QCString classOutputFileBase(ClassDef *cd)
{
- //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
//if (inlineGroupedClasses && cd->partOfGroups()!=0)
return cd->getOutputFileBase();
//else
@@ -381,7 +381,7 @@ static QCString classOutputFileBase(ClassDef *cd)
static QCString memberOutputFileBase(MemberDef *md)
{
- //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
//if (inlineGroupedClasses && md->getClassDef() && md->getClassDef()->partOfGroups()!=0)
// return md->getClassDef()->getDocbookOutputFileBase();
//else
@@ -663,7 +663,7 @@ static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *de
writeDocbookString(t,emd->name());
t << "</term>" << endl;
t << " <listitem>" << endl;
- if(Config_getBool("REPEAT_BRIEF"))
+ if(Config_getBool(REPEAT_BRIEF))
{
t << " <para>";
writeDocbookString(t,emd->briefDescription());
@@ -706,7 +706,7 @@ static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *de
}
t << "_1" << md->anchor() << "\">" << endl;
t << " <title>" << convertToXML(md->definition()) << "</title>";
- if(Config_getBool("REPEAT_BRIEF"))
+ if(Config_getBool(REPEAT_BRIEF))
{
t << " <emphasis>";
writeDocbookString(t,md->briefDescription());
@@ -730,7 +730,7 @@ static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *de
}
t << "_1" << md->anchor() << "\">" << endl;
t << " <title>" << convertToXML(md->definition()) << " " << convertToXML(md->argsString()) << "</title>";
- if(Config_getBool("REPEAT_BRIEF"))
+ if(Config_getBool(REPEAT_BRIEF))
{
t << " <emphasis>";
writeDocbookString(t,md->briefDescription());
@@ -795,7 +795,7 @@ static void generateDocbookForMember(MemberDef *md,FTextStream &t,Definition *de
}
t << "_1" << md->anchor() << "\">" << endl;
t << " <title>" << convertToXML(md->definition()) << "</title>";
- if(Config_getBool("REPEAT_BRIEF"))
+ if(Config_getBool(REPEAT_BRIEF))
{
t << " <emphasis>";
writeDocbookString(t,md->briefDescription());
@@ -849,7 +849,7 @@ static void generateDocbookSection(Definition *d,FTextStream &t,MemberList *ml,c
{
for (mli.toFirst();(md=mli.current());++mli)
{
- if (md->documentation().isEmpty() && !Config_getBool("REPEAT_BRIEF"))
+ if (md->documentation().isEmpty() && !Config_getBool(REPEAT_BRIEF))
{
continue;
}
@@ -892,7 +892,7 @@ static void generateDocbookSection(Definition *d,FTextStream &t,MemberList *ml,c
// to prevent this duplication in the Docbook output, we filter those here.
if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
{
- if (detailed && md->documentation().isEmpty() && !Config_getBool("REPEAT_BRIEF"))
+ if (detailed && md->documentation().isEmpty() && !Config_getBool(REPEAT_BRIEF))
{
continue;
}
@@ -1137,7 +1137,7 @@ static void generateDocbookForClass(ClassDef *cd,FTextStream &ti)
//Add the file Documentation info to index file
ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
- QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString outputDirectory = Config_getString(DOCBOOK_OUTPUT);
QCString fileName=outputDirectory+"/"+ classOutputFileBase(cd)+".xml";
QCString relPath = relativePathToRoot(fileName);
QFile f(fileName);
@@ -1194,18 +1194,18 @@ static void generateDocbookForClass(ClassDef *cd,FTextStream &ti)
}
}
- if (Config_getBool("HAVE_DOT") && (Config_getBool("CLASS_DIAGRAMS") || Config_getBool("CLASS_GRAPH")))
+ if (Config_getBool(HAVE_DOT) && (Config_getBool(CLASS_DIAGRAMS) || Config_getBool(CLASS_GRAPH)))
{
t << "<para>Inheritance diagram for " << convertToXML(cd->name()) << "</para>" << endl;
DotClassGraph inheritanceGraph(cd,DotNode::Inheritance);
- inheritanceGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString("DOCBOOK_OUTPUT"),fileName,relPath,TRUE,FALSE);
+ inheritanceGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,TRUE,FALSE);
}
- if (Config_getBool("HAVE_DOT") && Config_getBool("COLLABORATION_GRAPH"))
+ if (Config_getBool(HAVE_DOT) && Config_getBool(COLLABORATION_GRAPH))
{
t << "<para>Collaboration diagram for " << convertToXML(cd->name()) << "</para>" << endl;
DotClassGraph collaborationGraph(cd,DotNode::Collaboration);
- collaborationGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString("DOCBOOK_OUTPUT"),fileName,relPath,TRUE,FALSE);
+ collaborationGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,TRUE,FALSE);
}
writeInnerClasses(cd->getClassSDict(),t);
@@ -1233,7 +1233,7 @@ static void generateDocbookForClass(ClassDef *cd,FTextStream &ti)
}
}
- if(Config_getBool("REPEAT_BRIEF"))
+ if(Config_getBool(REPEAT_BRIEF))
{
if (cd->briefDescription())
{
@@ -1316,7 +1316,7 @@ static void generateDocbookForNamespace(NamespaceDef *nd,FTextStream &ti)
//Add the file Documentation info to index file
ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
- QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString outputDirectory = Config_getString(DOCBOOK_OUTPUT);
QCString fileName=outputDirectory+"/"+nd->getOutputFileBase()+".xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -1356,7 +1356,7 @@ static void generateDocbookForNamespace(NamespaceDef *nd,FTextStream &ti)
}
}
- if(Config_getBool("REPEAT_BRIEF"))
+ if(Config_getBool(REPEAT_BRIEF))
{
if (nd->briefDescription())
{
@@ -1402,7 +1402,7 @@ static void generateDocbookForFile(FileDef *fd,FTextStream &ti)
//Add the file Documentation info to index file
ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
- QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString outputDirectory = Config_getString(DOCBOOK_OUTPUT);
QCString fileName=outputDirectory+"/"+fd->getOutputFileBase()+".xml";
QCString relPath = relativePathToRoot(fileName);
@@ -1449,19 +1449,19 @@ static void generateDocbookForFile(FileDef *fd,FTextStream &ti)
t << "</programlisting>" << endl;
}
}
- if (Config_getBool("HAVE_DOT"))
+ if (Config_getBool(HAVE_DOT))
{
- if (Config_getBool("INCLUDE_GRAPH"))
+ if (Config_getBool(INCLUDE_GRAPH))
{
t << "<para>Include dependency diagram for " << convertToXML(fd->name()) << "</para>" << endl;
DotInclDepGraph idepGraph(fd, FALSE);
- idepGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString("DOCBOOK_OUTPUT"),fileName,relPath,FALSE);
+ idepGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,FALSE);
}
- if (Config_getBool("INCLUDED_BY_GRAPH"))
+ if (Config_getBool(INCLUDED_BY_GRAPH))
{
t << "<para>Included by dependency diagram for " << convertToXML(fd->name()) << "</para>" << endl;
DotInclDepGraph ibdepGraph(fd, TRUE);
- ibdepGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString("DOCBOOK_OUTPUT"),fileName,relPath,FALSE);
+ ibdepGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,FALSE);
}
}
@@ -1499,7 +1499,7 @@ static void generateDocbookForFile(FileDef *fd,FTextStream &ti)
t << " <title>" << theTranslator->trDetailedDescription() << "</title>" << endl;
writeDocbookDocBlock(t,fd->briefFile(),fd->briefLine(),fd,0,fd->briefDescription());
writeDocbookDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation());
- if (Config_getBool("FULL_PATH_NAMES"))
+ if (Config_getBool(FULL_PATH_NAMES))
{
t << " <para>Definition in file " << fd->getDefFileName() << "</para>" << endl;
}
@@ -1509,7 +1509,7 @@ static void generateDocbookForFile(FileDef *fd,FTextStream &ti)
}
t << " </simplesect>" << endl;
- if (Config_getBool("DOCBOOK_PROGRAMLISTING"))
+ if (Config_getBool(DOCBOOK_PROGRAMLISTING))
{
t << " <literallayout><computeroutput>" << endl;
writeDocbookCodeBlock(t,fd);
@@ -1542,7 +1542,7 @@ static void generateDocbookForGroup(GroupDef *gd,FTextStream &ti)
ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
}
- QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString outputDirectory = Config_getString(DOCBOOK_OUTPUT);
QCString fileName=outputDirectory+"/"+gd->getOutputFileBase()+".xml";
QCString relPath = relativePathToRoot(fileName);
@@ -1559,11 +1559,11 @@ static void generateDocbookForGroup(GroupDef *gd,FTextStream &ti)
t << " <title>" << convertToXML(gd->groupTitle()) << "</title>" << endl;
- if (Config_getBool("GROUP_GRAPHS") && Config_getBool("HAVE_DOT"))
+ if (Config_getBool(GROUP_GRAPHS) && Config_getBool(HAVE_DOT))
{
t << "<para>Collaboration diagram for " << convertToXML(gd->groupTitle()) << "</para>" << endl;
DotGroupCollaboration collaborationGraph(gd);
- collaborationGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString("DOCBOOK_OUTPUT"),fileName,relPath,FALSE);
+ collaborationGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,FALSE);
}
if (gd->briefDescription())
@@ -1630,7 +1630,7 @@ static void generateDocbookForDir(DirDef *dd,FTextStream &ti)
//Add the file Documentation info to index file
ti << " <xi:include href=\"" << fileDocbook << "\" xmlns:xi=\"http://www.w3.org/2001/XInclude\"/>" << endl;
- QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString outputDirectory = Config_getString(DOCBOOK_OUTPUT);
QCString fileName=outputDirectory+"/"+dd->getOutputFileBase()+".xml";
QFile f(fileName);
QCString relPath = relativePathToRoot(fileName);
@@ -1648,11 +1648,11 @@ static void generateDocbookForDir(DirDef *dd,FTextStream &ti)
t << " <title>";
t << theTranslator->trDirReference(dd->displayName());
t << "</title>" << endl;
- if (Config_getBool("DIRECTORY_GRAPH") && Config_getBool("HAVE_DOT"))
+ if (Config_getBool(DIRECTORY_GRAPH) && Config_getBool(HAVE_DOT))
{
t << "<para>Directory dependency diagram for " << convertToXML(dd->displayName()) << "</para>" << endl;
DotDirDeps dirdepGraph(dd);
- dirdepGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString("DOCBOOK_OUTPUT"),fileName,relPath,FALSE);
+ dirdepGraph.writeGraph(t,GOF_BITMAP,EOF_DocBook,Config_getString(DOCBOOK_OUTPUT),fileName,relPath,FALSE);
}
writeInnerDirs(&dd->subDirs(),t);
@@ -1686,7 +1686,7 @@ static void generateDocbookForPage(PageDef *pd,FTextStream &ti,bool isExample)
pageName="mainpage"; // to prevent overwriting the generated index page.
}
- QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString outputDirectory = Config_getString(DOCBOOK_OUTPUT);
QCString fileName=outputDirectory+"/"+pageName+".xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -1767,7 +1767,7 @@ void generateDocbook()
// + related pages
// - examples
- QCString outputDirectory = Config_getString("DOCBOOK_OUTPUT");
+ QCString outputDirectory = Config_getString(DOCBOOK_OUTPUT);
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath().utf8();
@@ -1808,7 +1808,7 @@ void generateDocbook()
createSubDirs(docbookDir);
QCString fileName=outputDirectory+"/index.xml";
- QCString dbk_projectName = Config_getString("PROJECT_NAME");
+ QCString dbk_projectName = Config_getString(PROJECT_NAME);
QFile f(fileName);
f.setName(fileName);
@@ -1921,7 +1921,7 @@ void generateDocbook()
// FILE DOCUMENTATION
- static bool showFiles = Config_getBool("SHOW_FILES");
+ static bool showFiles = Config_getBool(SHOW_FILES);
if (showFiles)
{
FileNameListIterator fnli(*Doxygen::inputNameList);
@@ -1953,7 +1953,7 @@ void generateDocbook()
}
// DIRECTORY DOCUMENTATION
- if (Config_getBool("DIRECTORY_GRAPH") && Config_getBool("HAVE_DOT"))
+ if (Config_getBool(DIRECTORY_GRAPH) && Config_getBool(HAVE_DOT))
{
DirDef *dir;
DirSDict::Iterator sdi(*Doxygen::directories);
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index 70e9c53..ab10da0 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -242,7 +242,7 @@ void DocbookDocVisitor::visit(DocVerbatim *s)
m_t << "<para>" << endl;
name.sprintf("%s%d", "dot_inline_dotgraph_", dotindex);
baseName.sprintf("%s%d",
- (Config_getString("DOCBOOK_OUTPUT")+"/inline_dotgraph_").data(),
+ (Config_getString(DOCBOOK_OUTPUT)+"/inline_dotgraph_").data(),
dotindex++
);
QFile file(baseName+".dot");
@@ -265,7 +265,7 @@ void DocbookDocVisitor::visit(DocVerbatim *s)
m_t << "<para>" << endl;
name.sprintf("%s%d", "msc_inline_mscgraph_", mscindex);
baseName.sprintf("%s%d",
- (Config_getString("DOCBOOK_OUTPUT")+"/inline_mscgraph_").data(),
+ (Config_getString(DOCBOOK_OUTPUT)+"/inline_mscgraph_").data(),
mscindex++
);
QFile file(baseName+".msc");
@@ -284,7 +284,7 @@ void DocbookDocVisitor::visit(DocVerbatim *s)
break;
case DocVerbatim::PlantUML:
{
- static QCString docbookOutput = Config_getString("DOCBOOK_OUTPUT");
+ static QCString docbookOutput = Config_getString(DOCBOOK_OUTPUT);
QCString baseName = writePlantUMLSource(docbookOutput,s->exampleFile(),s->text());
QCString shortName = baseName;
int i;
@@ -359,6 +359,33 @@ void DocbookDocVisitor::visit(DocInclude *inc)
);
m_t << "</computeroutput></literallayout>";
break;
+ case DocInclude::SnipWithLines:
+ {
+ QFileInfo cfi( inc->file() );
+ FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ m_t << "<literallayout><computeroutput>";
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile(),
+ &fd,
+ lineBlock(inc->text(),inc->blockId()),
+ -1, // endLine
+ FALSE, // inlineFragment
+ 0, // memberDef
+ TRUE // show line number
+ );
+ m_t << "</computeroutput></literallayout>";
+ }
+ break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
}
@@ -913,7 +940,7 @@ void DocbookDocVisitor::visitPost(DocImage *img)
m_file=fd->absFilePath();
}
QFile inImage(m_file);
- QFile outImage(Config_getString("DOCBOOK_OUTPUT")+"/"+baseName.data());
+ QFile outImage(Config_getString(DOCBOOK_OUTPUT)+"/"+baseName.data());
if (inImage.open(IO_ReadOnly))
{
if (outImage.open(IO_WriteOnly))
@@ -1220,7 +1247,7 @@ void DocbookDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_BITMAP);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
visitCaption(this, s->children());
@@ -1235,7 +1262,7 @@ void DocbookDocVisitor::writePlantUMLFile(const QCString &baseName, DocVerbatim
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
generatePlantUMLOutput(baseName,outDir,PUML_BITMAP);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
visitCaption(this, s->children());
@@ -1259,7 +1286,7 @@ void DocbookDocVisitor::startMscFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("msc_");
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
m_t << "<para>" << endl;
visitPreStart(m_t, hasCaption, baseName + ".png", width, height);
@@ -1280,7 +1307,7 @@ void DocbookDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_BITMAP);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
visitCaption(this, s->children());
@@ -1304,7 +1331,7 @@ void DocbookDocVisitor::startDiaFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("dia_");
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
m_t << "<para>" << endl;
visitPreStart(m_t, hasCaption, baseName + ".png", width, height);
@@ -1325,7 +1352,7 @@ void DocbookDocVisitor::writeDotFile(const QCString &baseName, DocVerbatim *s)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
writeDotGraphFromFile(baseName+".dot",outDir,shortName,GOF_BITMAP);
visitPreStart(m_t, s->hasCaption(), baseName + ".dot", s->width(),s->height());
visitCaption(this, s->children());
@@ -1349,7 +1376,7 @@ void DocbookDocVisitor::startDotFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("dot_");
- QCString outDir = Config_getString("DOCBOOK_OUTPUT");
+ QCString outDir = Config_getString(DOCBOOK_OUTPUT);
QCString imgExt = getDotImageExtension();
writeDotGraphFromFile(fileName,outDir,baseName,GOF_BITMAP);
m_t << "<para>" << endl;
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 099213d..2602f78 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -123,6 +123,7 @@ struct DocParserContext
QStack<DocStyleChange> initialStyleStack;
QList<Definition> copyStack;
QCString fileName;
+ int lineNo;
QCString relPath;
bool hasParamCommand;
@@ -144,7 +145,6 @@ struct DocParserContext
static QStack<DocParserContext> g_parserStack;
//---------------------------------------------------------------------------
-
static void docParserPushContext(bool saveParamInfo=TRUE)
{
//QCString indent;
@@ -163,6 +163,7 @@ static void docParserPushContext(bool saveParamInfo=TRUE)
ctx->initialStyleStack = g_initialStyleStack;
ctx->copyStack = g_copyStack;
ctx->fileName = g_fileName;
+ ctx->lineNo = doctokenizerYYlineno;
ctx->relPath = g_relPath;
if (saveParamInfo)
@@ -201,6 +202,7 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
g_initialStyleStack = ctx->initialStyleStack;
g_copyStack = ctx->copyStack;
g_fileName = ctx->fileName;
+ doctokenizerYYlineno = ctx->lineNo;
g_relPath = ctx->relPath;
if (!keepParamInfo)
@@ -282,20 +284,20 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
switch(type)
{
case DocImage::Html:
- if (!Config_getBool("GENERATE_HTML")) return result;
- outputDir = Config_getString("HTML_OUTPUT");
+ if (!Config_getBool(GENERATE_HTML)) return result;
+ outputDir = Config_getString(HTML_OUTPUT);
break;
case DocImage::Latex:
- if (!Config_getBool("GENERATE_LATEX")) return result;
- outputDir = Config_getString("LATEX_OUTPUT");
+ if (!Config_getBool(GENERATE_LATEX)) return result;
+ outputDir = Config_getString(LATEX_OUTPUT);
break;
case DocImage::DocBook:
- if (!Config_getBool("GENERATE_DOCBOOK")) return result;
- outputDir = Config_getString("DOCBOOK_OUTPUT");
+ if (!Config_getBool(GENERATE_DOCBOOK)) return result;
+ outputDir = Config_getString(DOCBOOK_OUTPUT);
break;
case DocImage::Rtf:
- if (!Config_getBool("GENERATE_RTF")) return result;
- outputDir = Config_getString("RTF_OUTPUT");
+ if (!Config_getBool(GENERATE_RTF)) return result;
+ outputDir = Config_getString(RTF_OUTPUT);
break;
}
QCString outputFile = outputDir+"/"+result;
@@ -336,11 +338,11 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
"could not open image %s",qPrint(fileName));
}
- if (type==DocImage::Latex && Config_getBool("USE_PDFLATEX") &&
+ if (type==DocImage::Latex && Config_getBool(USE_PDFLATEX) &&
fd->name().right(4)==".eps"
)
{ // we have an .eps image in pdflatex mode => convert it to a pdf.
- QCString outputDir = Config_getString("LATEX_OUTPUT");
+ QCString outputDir = Config_getString(LATEX_OUTPUT);
QCString baseName = fd->name().left(fd->name().length()-4);
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
@@ -385,7 +387,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
*/
static void checkArgumentName(const QCString &name,bool isParam)
{
- if (!Config_getBool("WARN_IF_DOC_ERROR")) return;
+ if (!Config_getBool(WARN_IF_DOC_ERROR)) return;
if (g_memberDef==0) return; // not a member
ArgumentList *al=g_memberDef->isDocsForDefinition() ?
g_memberDef->argumentList() :
@@ -454,7 +456,7 @@ static void checkArgumentName(const QCString &name,bool isParam)
*/
static void checkUndocumentedParams()
{
- if (g_memberDef && g_hasParamCommand && Config_getBool("WARN_IF_DOC_ERROR"))
+ if (g_memberDef && g_hasParamCommand && Config_getBool(WARN_IF_DOC_ERROR))
{
ArgumentList *al=g_memberDef->isDocsForDefinition() ?
g_memberDef->argumentList() :
@@ -526,7 +528,7 @@ static void checkUndocumentedParams()
*/
static void detectNoDocumentedParams()
{
- if (g_memberDef && Config_getBool("WARN_NO_PARAMDOC"))
+ if (g_memberDef && Config_getBool(WARN_NO_PARAMDOC))
{
ArgumentList *al = g_memberDef->argumentList();
ArgumentList *declAl = g_memberDef->declArgumentList();
@@ -1054,7 +1056,7 @@ static void handleUnclosedStyleCommands()
static void handleLinkedWord(DocNode *parent,QList<DocNode> &children,bool ignoreAutoLinkFlag=FALSE)
{
QCString name = linkToText(SrcLangExt_Unknown,g_token->name,TRUE);
- static bool autolinkSupport = Config_getBool("AUTOLINK_SUPPORT");
+ static bool autolinkSupport = Config_getBool(AUTOLINK_SUPPORT);
if (!autolinkSupport && !ignoreAutoLinkFlag) // no autolinking -> add as normal word
{
children.append(new DocWord(parent,name));
@@ -1264,9 +1266,6 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, QList<DocN
if (tok==TK_WORD && (g_token->name=="width=" || g_token->name=="height="))
{
// special case: no title, but we do have a size indicator
- doctokenizerYYsetStateTitleAttrValue();
- // strip =
- g_token->name = g_token->name.left(g_token->name.length()-1);
break;
}
if (!defaultHandleToken(parent,tok,children))
@@ -1293,21 +1292,32 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, QList<DocN
{
tok=doctokenizerYYlex();
}
- while (tok==TK_WORD) // there are values following the title
+ while (tok==TK_WHITESPACE || tok==TK_WORD) // there are values following the title
{
- if (g_token->name=="width")
- {
- width = g_token->chars;
- }
- else if (g_token->name=="height")
- {
- height = g_token->chars;
- }
- else
+ if(tok == TK_WORD)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Unknown option '%s' after \\%s command, expected 'width' or 'height'",
- qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data());
+ if (g_token->name=="width=" || g_token->name=="height=")
+ {
+ doctokenizerYYsetStateTitleAttrValue();
+ g_token->name = g_token->name.left(g_token->name.length()-1);
+ }
+
+ if (g_token->name=="width")
+ {
+ width = g_token->chars;
+ }
+ else if (g_token->name=="height")
+ {
+ height = g_token->chars;
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Unknown option '%s' after \\%s command, expected 'width' or 'height'",
+ qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data());
+ break;
+ }
}
+
tok=doctokenizerYYlex();
}
doctokenizerYYsetStatePara();
@@ -1760,11 +1770,11 @@ static void readTextFileByName(const QCString &file,QCString &text)
QFileInfo fi(file);
if (fi.exists())
{
- text = fileToString(file,Config_getBool("FILTER_SOURCE_FILES"));
+ text = fileToString(file,Config_getBool(FILTER_SOURCE_FILES));
return;
}
}
- QStrList &examplePathList = Config_getList("EXAMPLE_PATH");
+ QStrList &examplePathList = Config_getList(EXAMPLE_PATH);
char *s=examplePathList.first();
while (s)
{
@@ -1772,7 +1782,7 @@ static void readTextFileByName(const QCString &file,QCString &text)
QFileInfo fi(absFileName);
if (fi.exists())
{
- text = fileToString(absFileName,Config_getBool("FILTER_SOURCE_FILES"));
+ text = fileToString(absFileName,Config_getBool(FILTER_SOURCE_FILES));
return;
}
s=examplePathList.next();
@@ -1783,7 +1793,7 @@ static void readTextFileByName(const QCString &file,QCString &text)
FileDef *fd;
if ((fd=findFileDef(Doxygen::exampleNameDict,file,ambig)))
{
- text = fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"));
+ text = fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES));
}
else if (ambig)
{
@@ -1921,6 +1931,7 @@ void DocInclude::parse()
readTextFileByName(m_file,m_text);
break;
case Snippet:
+ case SnipWithLines:
readTextFileByName(m_file,m_text);
// check here for the existence of the blockId inside the file, so we
// only generate the warning once.
@@ -1931,6 +1942,11 @@ void DocInclude::parse()
m_blockId.data(),m_file.data(),count);
}
break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
}
@@ -2162,10 +2178,10 @@ bool DocXRefItem::parse()
if (refList &&
(
// either not a built-in list or the list is enabled
- (m_key!="todo" || Config_getBool("GENERATE_TODOLIST")) &&
- (m_key!="test" || Config_getBool("GENERATE_TESTLIST")) &&
- (m_key!="bug" || Config_getBool("GENERATE_BUGLIST")) &&
- (m_key!="deprecated" || Config_getBool("GENERATE_DEPRECATEDLIST"))
+ (m_key!="todo" || Config_getBool(GENERATE_TODOLIST)) &&
+ (m_key!="test" || Config_getBool(GENERATE_TESTLIST)) &&
+ (m_key!="bug" || Config_getBool(GENERATE_BUGLIST)) &&
+ (m_key!="deprecated" || Config_getBool(GENERATE_DEPRECATEDLIST))
)
)
{
@@ -2599,7 +2615,7 @@ void DocRef::parse()
DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //context)
{
- static uint numBibFiles = Config_getList("CITE_BIB_FILES").count();
+ static uint numBibFiles = Config_getList(CITE_BIB_FILES).count();
m_parent = parent;
//printf("DocCite::DocCite(target=%s)\n",target.data());
ASSERT(!target.isEmpty());
@@ -5132,7 +5148,6 @@ endref:
doctokenizerYYsetStatePara();
}
-
void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
{
DBG(("handleInclude(%s)\n",qPrint(cmdName)));
@@ -5160,7 +5175,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
}
QCString fileName = g_token->name;
QCString blockId;
- if (t==DocInclude::Snippet)
+ if (t==DocInclude::Snippet || t==DocInclude::SnipWithLines || t==DocInclude::SnippetDoc)
{
if (fileName == "this") fileName=g_fileName;
doctokenizerYYsetStateSnippet();
@@ -5174,9 +5189,31 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
}
blockId = "["+g_token->name+"]";
}
- DocInclude *inc = new DocInclude(this,fileName,g_context,t,g_isExample,g_exampleName,blockId);
- m_children.append(inc);
- inc->parse();
+
+ // This is the only place to handle the \includedoc and \snippetdoc commands,
+ // as the content is included here as if it is really here.
+ if (t==DocInclude::IncludeDoc || t==DocInclude::SnippetDoc)
+ {
+ QCString inc_text;
+ int inc_line = 1;
+ readTextFileByName(fileName,inc_text);
+ if (t==DocInclude::SnippetDoc)
+ {
+ inc_line = lineBlock(inc_text, blockId);
+ inc_text = extractBlock(inc_text, blockId);
+ }
+ docParserPushContext();
+ g_fileName = fileName;
+ doctokenizerYYlineno=inc_line;
+ internalValidatingParseDoc(this,m_children,inc_text);
+ docParserPopContext();
+ }
+ else
+ {
+ DocInclude *inc = new DocInclude(this,fileName,g_context,t,g_isExample,g_exampleName,blockId);
+ m_children.append(inc);
+ inc->parse();
+ }
}
void DocPara::handleSection(const QCString &cmdName)
@@ -5411,15 +5448,15 @@ int DocPara::handleCommand(const QCString &cmdName)
break;
case CMD_LI:
{
- DocSimpleList *sl=new DocSimpleList(this);
- m_children.append(sl);
+ DocSimpleList *sl=new DocSimpleList(this);
+ m_children.append(sl);
retval = sl->parse();
}
break;
case CMD_SECTION:
{
handleSection(cmdName);
- retval = RetVal_Section;
+ retval = RetVal_Section;
}
break;
case CMD_SUBSECTION:
@@ -5543,7 +5580,7 @@ int DocPara::handleCommand(const QCString &cmdName)
break;
case CMD_STARTUML:
{
- static QCString jarPath = Config_getString("PLANTUML_JAR_PATH");
+ static QCString jarPath = Config_getString(PLANTUML_JAR_PATH);
doctokenizerYYsetStatePlantUMLOpt();
retval = doctokenizerYYlex();
QCString plantFile(g_token->sectionId);
@@ -5665,6 +5702,15 @@ int DocPara::handleCommand(const QCString &cmdName)
case CMD_SNIPPET:
handleInclude(cmdName,DocInclude::Snippet);
break;
+ case CMD_SNIPWITHLINES:
+ handleInclude(cmdName,DocInclude::SnipWithLines);
+ break;
+ case CMD_INCLUDEDOC:
+ handleInclude(cmdName,DocInclude::IncludeDoc);
+ break;
+ case CMD_SNIPPETDOC:
+ handleInclude(cmdName,DocInclude::SnippetDoc);
+ break;
case CMD_SKIP:
handleIncludeOperator(cmdName,DocIncOperator::Skip);
break;
@@ -5964,7 +6010,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
{
if (paramName.isEmpty())
{
- if (Config_getBool("WARN_NO_PARAMDOC"))
+ if (Config_getBool(WARN_NO_PARAMDOC))
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"empty 'name' attribute for <param%s> tag.",tagId==XML_PARAM?"":"type");
}
@@ -6152,8 +6198,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
case XML_INHERITDOC:
handleInheritDoc();
break;
-
- default:
+ default:
// we should not get here!
ASSERT(0);
break;
@@ -7190,7 +7235,7 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
//g_token = new TokenInfo;
// store parser state so we can re-enter this function if needed
- //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
docParserPushContext();
if (ctx && ctx!=Doxygen::globalScope &&
diff --git a/src/docparser.h b/src/docparser.h
index e2751d8..f5167dc 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -483,7 +483,8 @@ class DocVerbatim : public DocNode
class DocInclude : public DocNode
{
public:
- enum Type { Include, DontInclude, VerbInclude, HtmlInclude, LatexInclude, IncWithLines, Snippet };
+ enum Type { Include, DontInclude, VerbInclude, HtmlInclude, LatexInclude,
+ IncWithLines, Snippet , IncludeDoc, SnippetDoc, SnipWithLines};
DocInclude(DocNode *parent,const QCString &file,
const QCString context, Type t,
bool isExample,const QCString exampleFile,
diff --git a/src/docsets.cpp b/src/docsets.cpp
index 9772d4e..29b7616 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -43,22 +43,22 @@ DocSets::~DocSets()
void DocSets::initialize()
{
// -- get config options
- QCString projectName = Config_getString("PROJECT_NAME");
+ QCString projectName = Config_getString(PROJECT_NAME);
if (projectName.isEmpty()) projectName="root";
- QCString bundleId = Config_getString("DOCSET_BUNDLE_ID");
+ QCString bundleId = Config_getString(DOCSET_BUNDLE_ID);
if (bundleId.isEmpty()) bundleId="org.doxygen.Project";
- QCString feedName = Config_getString("DOCSET_FEEDNAME");
+ QCString feedName = Config_getString(DOCSET_FEEDNAME);
if (feedName.isEmpty()) feedName="FeedName";
- QCString publisherId = Config_getString("DOCSET_PUBLISHER_ID");
+ QCString publisherId = Config_getString(DOCSET_PUBLISHER_ID);
if (publisherId.isEmpty()) publisherId="PublisherId";
- QCString publisherName = Config_getString("DOCSET_PUBLISHER_NAME");
+ QCString publisherName = Config_getString(DOCSET_PUBLISHER_NAME);
if (publisherName.isEmpty()) publisherName="PublisherName";
- QCString projectNumber = Config_getString("PROJECT_NUMBER");
+ QCString projectNumber = Config_getString(PROJECT_NUMBER);
if (projectNumber.isEmpty()) projectNumber="ProjectNumber";
// -- write Makefile
{
- QCString mfName = Config_getString("HTML_OUTPUT") + "/Makefile";
+ QCString mfName = Config_getString(HTML_OUTPUT) + "/Makefile";
QFile makefile(mfName);
if (!makefile.open(IO_WriteOnly))
{
@@ -109,7 +109,7 @@ void DocSets::initialize()
// -- write Info.plist
{
- QCString plName = Config_getString("HTML_OUTPUT") + "/Info.plist";
+ QCString plName = Config_getString(HTML_OUTPUT) + "/Info.plist";
QFile plist(plName);
if (!plist.open(IO_WriteOnly))
{
@@ -145,14 +145,14 @@ void DocSets::initialize()
}
// -- start Nodes.xml
- QCString notes = Config_getString("HTML_OUTPUT") + "/Nodes.xml";
+ QCString notes = Config_getString(HTML_OUTPUT) + "/Nodes.xml";
m_nf = new QFile(notes);
if (!m_nf->open(IO_WriteOnly))
{
err("Could not open file %s for writing\n",notes.data());
exit(1);
}
- //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index";
+ //QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
QCString indexName="index";
m_nts.setDevice(m_nf);
m_nts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
@@ -166,7 +166,7 @@ void DocSets::initialize()
m_firstNode.resize(m_dc);
m_firstNode.at(0)=TRUE;
- QCString tokens = Config_getString("HTML_OUTPUT") + "/Tokens.xml";
+ QCString tokens = Config_getString(HTML_OUTPUT) + "/Tokens.xml";
m_tf = new QFile(tokens);
if (!m_tf->open(IO_WriteOnly))
{
@@ -331,6 +331,7 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,
case SrcLangExt_Fortran: lang="fortran"; break; // Fortran
case SrcLangExt_VHDL: lang="vhdl"; break; // VHDL
case SrcLangExt_XML: lang="xml"; break; // DBUS XML
+ case SrcLangExt_SQL: lang="sql"; break; // Sql
case SrcLangExt_Tcl: lang="tcl"; break; // Tcl
case SrcLangExt_Markdown:lang="markdown"; break; // Markdown
case SrcLangExt_Unknown: lang="unknown"; break; // should not happen!
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 3169fc0..a89570e 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -17,6 +17,8 @@
*/
%option never-interactive
+%option prefix="doctokenizerYY"
+
%{
#include <ctype.h>
@@ -128,7 +130,7 @@ static int computeIndent(const char *str,int length)
{
int i;
int indent=0;
- static int tabSize=Config_getInt("TAB_SIZE");
+ static int tabSize=Config_getInt(TAB_SIZE);
for (i=0;i<length;i++)
{
if (str[i]=='\t')
diff --git a/src/dot.cpp b/src/dot.cpp
index 2f245f6..4189748 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -232,7 +232,7 @@ static EdgeProperties umlEdgeProps =
static QCString getDotFontName()
{
- static QCString dotFontName = Config_getString("DOT_FONTNAME");
+ static QCString dotFontName = Config_getString(DOT_FONTNAME);
if (dotFontName.isEmpty())
{
//dotFontName="FreeSans.ttf";
@@ -243,14 +243,14 @@ static QCString getDotFontName()
static int getDotFontSize()
{
- static int dotFontSize = Config_getInt("DOT_FONTSIZE");
+ static int dotFontSize = Config_getInt(DOT_FONTSIZE);
if (dotFontSize<4) dotFontSize=4;
return dotFontSize;
}
static void writeGraphHeader(FTextStream &t,const QCString &title=QCString())
{
- static bool interactiveSVG = Config_getBool("INTERACTIVE_SVG");
+ static bool interactiveSVG = Config_getBool(INTERACTIVE_SVG);
t << "digraph ";
if (title.isEmpty())
{
@@ -266,7 +266,7 @@ static void writeGraphHeader(FTextStream &t,const QCString &title=QCString())
{
t << " // INTERACTIVE_SVG=YES\n";
}
- if (Config_getBool("DOT_TRANSPARENT"))
+ if (Config_getBool(DOT_TRANSPARENT))
{
t << " bgcolor=\"transparent\";" << endl;
}
@@ -397,55 +397,13 @@ static bool convertMapFile(FTextStream &t,const char *mapName,
return TRUE;
}
-static QArray<int> s_newNumber;
-static int s_max_newNumber=0;
-
-inline int reNumberNode(int number, bool doReNumbering)
-{
- if (!doReNumbering)
- {
- return number;
- }
- else
- {
- int s = s_newNumber.size();
- if (number>=s)
- {
- int ns=0;
- ns = s * 3 / 2 + 5; // new size
- if (number>=ns) // number still doesn't fit
- {
- ns = number * 3 / 2 + 5;
- }
- s_newNumber.resize(ns);
- for (int i=s;i<ns;i++) // clear new part of the array
- {
- s_newNumber.at(i)=0;
- }
- }
- int i = s_newNumber.at(number);
- if (i == 0) // not yet mapped
- {
- i = ++s_max_newNumber; // start from 1
- s_newNumber.at(number) = i;
- }
- return i;
- }
-}
-
-static void resetReNumbering()
-{
- s_max_newNumber=0;
- s_newNumber.resize(s_max_newNumber);
-}
-
static QCString g_dotFontPath;
static void setDotFontPath(const char *path)
{
ASSERT(g_dotFontPath.isEmpty());
g_dotFontPath = portable_getenv("DOTFONTPATH");
- QCString newFontPath = Config_getString("DOT_FONTPATH");
+ QCString newFontPath = Config_getString(DOT_FONTPATH);
QCString spath = path;
if (!newFontPath.isEmpty() && !spath.isEmpty())
{
@@ -519,7 +477,7 @@ static bool writeVecGfxFigure(FTextStream &out,const QCString &baseName,
const QCString &figureName)
{
int width=400,height=550;
- static bool usePdfLatex = Config_getBool("USE_PDFLATEX");
+ static bool usePdfLatex = Config_getBool(USE_PDFLATEX);
if (usePdfLatex)
{
if (!readBoundingBox(figureName+".pdf",&width,&height,FALSE))
@@ -713,7 +671,7 @@ static bool insertMapFile(FTextStream &out,const QCString &mapFile,
static void removeDotGraph(const QCString &dotName)
{
- static bool dotCleanUp = Config_getBool("DOT_CLEANUP");
+ static bool dotCleanUp = Config_getBool(DOT_CLEANUP);
if (dotCleanUp)
{
QDir d;
@@ -792,13 +750,13 @@ int DotNodeList::compareValues(const DotNode *n1,const DotNode *n2) const
DotRunner::DotRunner(const QCString &file,const QCString &path,
bool checkResult,const QCString &imageName)
- : m_dotExe(Config_getString("DOT_PATH")+"dot"),
+ : m_dotExe(Config_getString(DOT_PATH)+"dot"),
m_file(file), m_path(path),
m_checkResult(checkResult), m_imageName(imageName),
m_imgExt(getDotImageExtension())
{
- static bool dotCleanUp = Config_getBool("DOT_CLEANUP");
- static bool dotMultiTargets = Config_getBool("DOT_MULTI_TARGETS");
+ static bool dotCleanUp = Config_getBool(DOT_CLEANUP);
+ static bool dotMultiTargets = Config_getBool(DOT_MULTI_TARGETS);
m_cleanUp = dotCleanUp;
m_multiTargets = dotMultiTargets;
m_jobs.setAutoDelete(TRUE);
@@ -946,7 +904,7 @@ int DotFilePatcher::addSVGObject(const QCString &baseName,
bool DotFilePatcher::run()
{
//printf("DotFilePatcher::run(): %s\n",m_patchFile.data());
- static bool interactiveSVG = Config_getBool("INTERACTIVE_SVG");
+ static bool interactiveSVG = Config_getBool(INTERACTIVE_SVG);
bool isSVGFile = m_patchFile.right(4)==".svg";
int graphId = -1;
QCString relPath;
@@ -1233,7 +1191,7 @@ DotManager::DotManager() : m_dotMaps(1009)
m_dotMaps.setAutoDelete(TRUE);
m_queue = new DotRunnerQueue;
int i;
- int numThreads = QMIN(32,Config_getInt("DOT_NUM_THREADS"));
+ int numThreads = QMIN(32,Config_getInt(DOT_NUM_THREADS));
if (numThreads!=1)
{
if (numThreads==0) numThreads = QMAX(2,QThread::idealThreadCount()+1);
@@ -1333,19 +1291,19 @@ bool DotManager::run()
QListIterator<DotRunner> li(m_dotRuns);
bool setPath=FALSE;
- if (Config_getBool("GENERATE_HTML"))
+ if (Config_getBool(GENERATE_HTML))
{
- setDotFontPath(Config_getString("HTML_OUTPUT"));
+ setDotFontPath(Config_getString(HTML_OUTPUT));
setPath=TRUE;
}
- else if (Config_getBool("GENERATE_LATEX"))
+ else if (Config_getBool(GENERATE_LATEX))
{
- setDotFontPath(Config_getString("LATEX_OUTPUT"));
+ setDotFontPath(Config_getString(LATEX_OUTPUT));
setPath=TRUE;
}
- else if (Config_getBool("GENERATE_RTF"))
+ else if (Config_getBool(GENERATE_RTF))
{
- setDotFontPath(Config_getString("RTF_OUTPUT"));
+ setDotFontPath(Config_getString(RTF_OUTPUT));
setPath=TRUE;
}
portable_sysTimerStart();
@@ -1673,7 +1631,7 @@ static void writeBoxMemberList(FTextStream &t,
if (mma->getClassDef() == scope &&
(skipNames==0 || skipNames->find(mma->name())==0))
{
- static int limit = Config_getInt("UML_LIMIT_NUM_FIELDS");
+ static int limit = Config_getInt(UML_LIMIT_NUM_FIELDS);
if (limit>0 && (totalCount>limit*3/2 && count>=limit))
{
t << theTranslator->trAndMore(QCString().sprintf("%d",totalCount-count)) << "\\l";
@@ -1722,16 +1680,16 @@ static QCString stripProtectionPrefix(const QCString &s)
void DotNode::writeBox(FTextStream &t,
GraphType gt,
GraphOutputFormat /*format*/,
- bool hasNonReachableChildren,
- bool reNumber)
+ bool hasNonReachableChildren
+ )
{
const char *labCol =
m_url.isEmpty() ? "grey75" : // non link
(
(hasNonReachableChildren) ? "red" : "black"
);
- t << " Node" << reNumberNode(m_number,reNumber) << " [label=\"";
- static bool umlLook = Config_getBool("UML_LOOK");
+ t << " Node" << m_number << " [label=\"";
+ static bool umlLook = Config_getBool(UML_LOOK);
if (m_classDef && umlLook && (gt==Inheritance || gt==Collaboration))
{
@@ -1763,7 +1721,7 @@ void DotNode::writeBox(FTextStream &t,
}
//printf("DotNode::writeBox for %s\n",m_classDef->name().data());
- static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
t << "{" << convertLabel(m_label);
t << "\\n|";
writeBoxMemberList(t,'+',m_classDef->getMemberList(MemberListType_pubAttribs),m_classDef,FALSE,&arrowNames);
@@ -1819,7 +1777,7 @@ void DotNode::writeBox(FTextStream &t,
}
else
{
- static bool dotTransparent = Config_getBool("DOT_TRANSPARENT");
+ static bool dotTransparent = Config_getBool(DOT_TRANSPARENT);
if (!dotTransparent)
{
t << ",color=\"" << labCol << "\", fillcolor=\"";
@@ -1856,24 +1814,23 @@ void DotNode::writeArrow(FTextStream &t,
GraphOutputFormat format,
DotNode *cn,
EdgeInfo *ei,
- bool topDown,
- bool pointBack,
- bool reNumber
+ bool topDown,
+ bool pointBack
)
{
t << " Node";
- if (topDown)
- t << reNumberNode(cn->number(),reNumber);
- else
- t << reNumberNode(m_number,reNumber);
+ if (topDown)
+ t << cn->number();
+ else
+ t << m_number;
t << " -> Node";
- if (topDown)
- t << reNumberNode(m_number,reNumber);
- else
- t << reNumberNode(cn->number(),reNumber);
+ if (topDown)
+ t << m_number;
+ else
+ t << cn->number();
t << " [";
- static bool umlLook = Config_getBool("UML_LOOK");
+ static bool umlLook = Config_getBool(UML_LOOK);
const EdgeProperties *eProps = umlLook ? &umlEdgeProps : &normalEdgeProps;
QCString aStyle = eProps->arrowStyleMap[ei->m_color];
bool umlUseArrow = aStyle=="odiamond";
@@ -1908,14 +1865,13 @@ void DotNode::write(FTextStream &t,
GraphOutputFormat format,
bool topDown,
bool toChildren,
- bool backArrows,
- bool reNumber
+ bool backArrows
)
{
//printf("DotNode::write(%d) name=%s this=%p written=%d visible=%d\n",m_distance,m_label.data(),this,m_written,m_visible);
if (m_written) return; // node already written to the output
if (!m_visible) return; // node is not visible
- writeBox(t,gt,format,m_truncated==Truncated,reNumber);
+ writeBox(t,gt,format,m_truncated==Truncated);
m_written=TRUE;
QList<DotNode> *nl = toChildren ? m_children : m_parents;
if (nl)
@@ -1930,9 +1886,9 @@ void DotNode::write(FTextStream &t,
if (cn->isVisible())
{
//printf("write arrow %s%s%s\n",label().data(),backArrows?"<-":"->",cn->label().data());
- writeArrow(t,gt,format,cn,dnli2.current(),topDown,backArrows,reNumber);
+ writeArrow(t,gt,format,cn,dnli2.current(),topDown,backArrows);
}
- cn->write(t,gt,format,topDown,toChildren,backArrows,reNumber);
+ cn->write(t,gt,format,topDown,toChildren,backArrows);
}
}
else // render parents
@@ -1950,11 +1906,10 @@ void DotNode::write(FTextStream &t,
pn,
pn->m_edgeInfo->at(pn->m_children->findRef(this)),
FALSE,
- backArrows,
- reNumber
+ backArrows
);
}
- pn->write(t,gt,format,TRUE,FALSE,backArrows,reNumber);
+ pn->write(t,gt,format,TRUE,FALSE,backArrows);
}
}
}
@@ -2229,6 +2184,20 @@ void DotNode::colorConnectedNodes(int curColor)
}
}
+void DotNode::renumberNodes(int &number)
+{
+ m_number = number++;
+ if (m_children)
+ {
+ QListIterator<DotNode> dnlic(*m_children);
+ DotNode *cn;
+ for (dnlic.toFirst();(cn=dnlic.current());++dnlic)
+ {
+ cn->renumberNodes(number);
+ }
+ }
+}
+
const DotNode *DotNode::findDocNode() const
{
if (!m_url.isEmpty()) return this;
@@ -2266,15 +2235,13 @@ const DotNode *DotNode::findDocNode() const
//--------------------------------------------------------------------
-int DotGfxHierarchyTable::m_curNodeNumber;
-
void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out,
const char *path,const char *fileName,int id) const
{
QDir d(path);
QCString baseName;
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
baseName.sprintf("inherit_graph_%d",id);
QCString imgName = baseName+"."+ imgExt;
QCString mapName = baseName+".map";
@@ -2300,11 +2267,10 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out,
{
if (node->m_subgraphId==n->m_subgraphId)
{
- node->write(md5stream,DotNode::Hierarchy,GOF_BITMAP,FALSE,TRUE,TRUE,TRUE);
+ node->write(md5stream,DotNode::Hierarchy,GOF_BITMAP,FALSE,TRUE,TRUE);
}
}
writeGraphFooter(md5stream);
- resetReNumbering();
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
@@ -2321,7 +2287,6 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out,
FTextStream t(&f);
t << theGraph;
f.close();
- resetReNumbering();
DotRunner *dotRun = new DotRunner(dotName,d.absPath().data(),TRUE,absImgName);
dotRun->addJob(imgFmt,absImgName);
@@ -2512,9 +2477,8 @@ void DotGfxHierarchyTable::addClassList(ClassSDict *cl)
}
}
-DotGfxHierarchyTable::DotGfxHierarchyTable()
+DotGfxHierarchyTable::DotGfxHierarchyTable() : m_curNodeNumber(0)
{
- m_curNodeNumber=0;
m_rootNodes = new QList<DotNode>;
m_usedNodes = new QDict<DotNode>(1009);
m_usedNodes->setAutoDelete(TRUE);
@@ -2556,15 +2520,17 @@ DotGfxHierarchyTable::DotGfxHierarchyTable()
}
//printf("Number of independent subgraphs: %d\n",curColor);
- //QListIterator<DotNode> dnli2(*m_rootSubgraphs);
- //DotNode *n;
- //for (dnli2.toFirst();(n=dnli2.current());++dnli2)
- //{
- // printf("Node %s color=%d (c=%d,p=%d)\n",
- // n->m_label.data(),n->m_subgraphId,
- // n->m_children?n->m_children->count():0,
- // n->m_parents?n->m_parents->count():0);
- //}
+ QListIterator<DotNode> dnli2(*m_rootSubgraphs);
+ DotNode *n;
+ for (dnli2.toFirst();(n=dnli2.current());++dnli2)
+ {
+ //printf("Node %s color=%d (c=%d,p=%d)\n",
+ // n->m_label.data(),n->m_subgraphId,
+ // n->m_children?n->m_children->count():0,
+ // n->m_parents?n->m_parents->count():0);
+ int number=0;
+ n->renumberNodes(number);
+ }
}
DotGfxHierarchyTable::~DotGfxHierarchyTable()
@@ -2585,16 +2551,19 @@ DotGfxHierarchyTable::~DotGfxHierarchyTable()
//--------------------------------------------------------------------
-int DotClassGraph::m_curNodeNumber = 0;
-
void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
const char *label,const char *usedName,const char *templSpec,bool base,int distance)
{
- if (Config_getBool("HIDE_UNDOC_CLASSES") && !cd->isLinkable()) return;
+ if (Config_getBool(HIDE_UNDOC_CLASSES) && !cd->isLinkable()) return;
int edgeStyle = (label || prot==EdgeInfo::Orange || prot==EdgeInfo::Orange2) ? EdgeInfo::Dashed : EdgeInfo::Solid;
QCString className;
- if (usedName) // name is a typedef
+ if (cd->isAnonymous())
+ {
+ className="anonymous:";
+ className+=label;
+ }
+ else if (usedName) // name is a typedef
{
className=usedName;
}
@@ -2627,7 +2596,7 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
else // new class
{
QCString displayName=className;
- if (Config_getBool("HIDE_SCOPE_NAMES")) displayName=stripScope(displayName);
+ if (Config_getBool(HIDE_SCOPE_NAMES)) displayName=stripScope(displayName);
QCString tmp_url;
if (cd->isLinkable() && !cd->isHidden())
{
@@ -2714,7 +2683,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
// despite being marked visible in the child loop
while ((childQueue.count()>0 || parentQueue.count()>0) && maxNodes>0)
{
- static int maxDistance = Config_getInt("MAX_DOT_GRAPH_DEPTH");
+ static int maxDistance = Config_getInt(MAX_DOT_GRAPH_DEPTH);
if (childQueue.count()>0)
{
DotNode *n = childQueue.take(0);
@@ -2777,7 +2746,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
}
}
}
- if (Config_getBool("UML_LOOK")) return FALSE; // UML graph are always top to bottom
+ if (Config_getBool(UML_LOOK)) return FALSE; // UML graph are always top to bottom
int maxWidth=0;
int maxHeight=(int)QMAX(childTreeWidth.size(),parentTreeWidth.size());
uint i;
@@ -2798,7 +2767,7 @@ bool DotClassGraph::determineVisibleNodes(DotNode *rootNode,
void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,bool base,int distance)
{
- static bool templateRelations = Config_getBool("TEMPLATE_RELATIONS");
+ static bool templateRelations = Config_getBool(TEMPLATE_RELATIONS);
//printf("DocClassGraph::buildGraph(%s,distance=%d,base=%d)\n",
// cd->name().data(),distance,base);
// ---- Add inheritance relations
@@ -2822,9 +2791,9 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,bool base,int distance)
if (m_graphType == DotNode::Collaboration)
{
// ---- Add usage relations
-
- UsesClassDict *dict =
- base ? cd->usedImplementationClasses() :
+
+ UsesClassDict *dict =
+ base ? cd->usedImplementationClasses() :
cd->usedByImplementationClasses()
;
if (dict)
@@ -2931,6 +2900,13 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,bool base,int distance)
}
}
+int DotClassGraph::m_curNodeNumber = 0;
+
+void DotClassGraph::resetNumbering()
+{
+ m_curNodeNumber = 0;
+}
+
DotClassGraph::DotClassGraph(ClassDef *cd,DotNode::GraphType t)
{
//printf("--------------- DotClassGraph::DotClassGraph `%s'\n",cd->displayName().data());
@@ -2964,7 +2940,7 @@ DotClassGraph::DotClassGraph(ClassDef *cd,DotNode::GraphType t)
if (t==DotNode::Inheritance) buildGraph(cd,m_startNode,FALSE,1);
//}
- static int maxNodes = Config_getInt("DOT_GRAPH_MAX_NODES");
+ static int maxNodes = Config_getInt(DOT_GRAPH_MAX_NODES);
//int directChildNodes = 1;
//if (m_startNode->m_children!=0)
// directChildNodes+=m_startNode->m_children->count();
@@ -2977,12 +2953,13 @@ DotClassGraph::DotClassGraph(ClassDef *cd,DotNode::GraphType t)
openNodeQueue.append(m_startNode);
determineTruncatedNodes(openNodeQueue,t==DotNode::Inheritance);
- m_diskName = cd->getFileBase().copy();
+ m_collabFileName = cd->collaborationGraphFileName();
+ m_inheritFileName = cd->inheritanceGraphFileName();
}
bool DotClassGraph::isTrivial() const
{
- static bool umlLook = Config_getBool("UML_LOOK");
+ static bool umlLook = Config_getBool(UML_LOOK);
if (m_graphType==DotNode::Inheritance)
return m_startNode->m_children==0 && m_startNode->m_parents==0;
else
@@ -2991,7 +2968,7 @@ bool DotClassGraph::isTrivial() const
bool DotClassGraph::isTooBig() const
{
- static int maxNodes = Config_getInt("DOT_GRAPH_MAX_NODES");
+ static int maxNodes = Config_getInt(DOT_GRAPH_MAX_NODES);
int numNodes = 0;
numNodes+= m_startNode->m_children ? m_startNode->m_children->count() : 0;
if (m_graphType==DotNode::Inheritance)
@@ -3020,8 +2997,6 @@ QCString computeMd5Signature(DotNode *root,
QCString &graphStr
)
{
- bool reNumber=TRUE;
-
//printf("computeMd5Signature\n");
QGString buf;
FTextStream md5stream(&buf);
@@ -3036,8 +3011,7 @@ QCString computeMd5Signature(DotNode *root,
format,
gt!=DotNode::CallGraph && gt!=DotNode::Dependency,
TRUE,
- backArrows,
- reNumber);
+ backArrows);
if (renderParents && root->m_parents)
{
QListIterator<DotNode> dnli(*root->m_parents);
@@ -3052,8 +3026,7 @@ QCString computeMd5Signature(DotNode *root,
pn, // child node
pn->m_edgeInfo->at(pn->m_children->findRef(root)), // edge info
FALSE, // topDown?
- backArrows, // point back?
- reNumber // renumber nodes
+ backArrows // point back?
);
}
pn->write(md5stream, // stream
@@ -3061,8 +3034,7 @@ QCString computeMd5Signature(DotNode *root,
format, // output format
TRUE, // topDown?
FALSE, // toChildren?
- backArrows, // backward pointing arrows?
- reNumber // renumber nodes?
+ backArrows // backward pointing arrows?
);
}
}
@@ -3071,10 +3043,6 @@ QCString computeMd5Signature(DotNode *root,
QCString sigStr(33);
MD5Buffer((const unsigned char *)buf.data(),buf.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.rawData(),33);
- if (reNumber)
- {
- resetReNumbering();
- }
graphStr=buf.data();
//printf("md5: %s | file: %s\n",sigStr,baseName.data());
return sigStr;
@@ -3104,27 +3072,6 @@ static bool updateDotGraph(DotNode *root,
return checkAndUpdateMd5Signature(baseName,md5); // graph needs to be regenerated
}
-QCString DotClassGraph::diskName() const
-{
- QCString result=m_diskName.copy();
- switch (m_graphType)
- {
- case DotNode::Collaboration:
- result+="_coll_graph";
- break;
- //case Interface:
- // result+="_intf_graph";
- // break;
- case DotNode::Inheritance:
- result+="_inherit_graph";
- break;
- default:
- ASSERT(0);
- break;
- }
- return result;
-}
-
QCString DotClassGraph::writeGraph(FTextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
@@ -3141,7 +3088,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
{
err("Output dir %s does not exist!\n",path); exit(1);
}
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
QCString baseName;
QCString mapName;
@@ -3149,22 +3096,20 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
{
case DotNode::Collaboration:
mapName="coll_map";
+ baseName=m_collabFileName;
break;
- //case Interface:
- // mapName="intf_map";
- // break;
case DotNode::Inheritance:
mapName="inherit_map";
+ baseName=m_inheritFileName;
break;
default:
ASSERT(0);
break;
}
- baseName = convertNameToFile(diskName());
// derive target file names from baseName
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
QCString absBaseName = d.absPath().utf8()+"/"+baseName;
QCString absDotName = absBaseName+".dot";
QCString absMapName = absBaseName+".map";
@@ -3334,8 +3279,6 @@ void DotClassGraph::writeDEF(FTextStream &t)
//--------------------------------------------------------------------
-int DotInclDepGraph::m_curNodeNumber = 0;
-
void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
{
QList<IncludeInfo> *includeFiles =
@@ -3356,7 +3299,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,FileDef *fd,int distance)
doc = bfd->isLinkable() && !bfd->isHidden();
src = bfd->generateSourceFile();
}
- if (doc || src || !Config_getBool("HIDE_UNDOC_RELATIONS"))
+ if (doc || src || !Config_getBool(HIDE_UNDOC_RELATIONS))
{
QCString url="";
if (bfd) url=bfd->getOutputFileBase().copy();
@@ -3404,7 +3347,7 @@ void DotInclDepGraph::determineVisibleNodes(QList<DotNode> &queue, int &maxNodes
{
while (queue.count()>0 && maxNodes>0)
{
- static int maxDistance = Config_getInt("MAX_DOT_GRAPH_DEPTH");
+ static int maxDistance = Config_getInt(MAX_DOT_GRAPH_DEPTH);
DotNode *n = queue.take(0);
if (!n->isVisible() && n->distance()<=maxDistance) // not yet processed
{
@@ -3449,13 +3392,20 @@ void DotInclDepGraph::determineTruncatedNodes(QList<DotNode> &queue)
}
}
+int DotInclDepGraph::m_curNodeNumber = 0;
+
+void DotInclDepGraph::resetNumbering()
+{
+ m_curNodeNumber = 0;
+}
DotInclDepGraph::DotInclDepGraph(FileDef *fd,bool inverse)
{
m_inverse = inverse;
ASSERT(fd!=0);
- m_diskName = fd->getFileBase().copy();
- QCString tmp_url=fd->getReference()+"$"+fd->getFileBase();
+ m_inclDepFileName = fd->includeDependencyGraphFileName();
+ m_inclByDepFileName = fd->includedByDependencyGraphFileName();
+ QCString tmp_url=fd->getReference()+"$"+fd->getOutputFileBase();
m_startNode = new DotNode(m_curNodeNumber++,
fd->docName(),
"",
@@ -3467,7 +3417,7 @@ DotInclDepGraph::DotInclDepGraph(FileDef *fd,bool inverse)
m_usedNodes->insert(fd->absFilePath(),m_startNode);
buildGraph(m_startNode,fd,1);
- static int nodes = Config_getInt("DOT_GRAPH_MAX_NODES");
+ static int nodes = Config_getInt(DOT_GRAPH_MAX_NODES);
int maxNodes = nodes;
//int directChildNodes = 1;
//if (m_startNode->m_children!=0)
@@ -3487,14 +3437,6 @@ DotInclDepGraph::~DotInclDepGraph()
delete m_usedNodes;
}
-QCString DotInclDepGraph::diskName() const
-{
- QCString result=m_diskName.copy();
- if (m_inverse) result+="_dep";
- result+="_incl";
- return convertNameToFile(result);
-}
-
QCString DotInclDepGraph::writeGraph(FTextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
@@ -3511,17 +3453,22 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out,
{
err("Output dir %s does not exist!\n",path); exit(1);
}
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
- QCString baseName=m_diskName;
- if (m_inverse) baseName+="_dep";
- baseName+="_incl";
- baseName=convertNameToFile(baseName);
+ QCString baseName;
+ if (m_inverse)
+ {
+ baseName=m_inclByDepFileName;
+ }
+ else
+ {
+ baseName=m_inclDepFileName;
+ }
QCString mapName=escapeCharsInString(m_startNode->m_label,FALSE);
if (m_inverse) mapName+="dep";
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
QCString absBaseName = d.absPath().utf8()+"/"+baseName;
QCString absDotName = absBaseName+".dot";
QCString absMapName = absBaseName+".map";
@@ -3635,7 +3582,7 @@ bool DotInclDepGraph::isTrivial() const
bool DotInclDepGraph::isTooBig() const
{
- static int maxNodes = Config_getInt("DOT_GRAPH_MAX_NODES");
+ static int maxNodes = Config_getInt(DOT_GRAPH_MAX_NODES);
int numNodes = m_startNode->m_children ? m_startNode->m_children->count() : 0;
return numNodes>=maxNodes;
}
@@ -3662,8 +3609,6 @@ void DotInclDepGraph::writeDocbook(FTextStream &t)
//-------------------------------------------------------------
-int DotCallGraph::m_curNodeNumber = 0;
-
void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance)
{
MemberSDict *refs = m_inverse ? md->getReferencedByMembers() : md->getReferencesMembers();
@@ -3688,7 +3633,7 @@ void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance)
else
{
QCString name;
- if (Config_getBool("HIDE_SCOPE_NAMES"))
+ if (Config_getBool(HIDE_SCOPE_NAMES))
{
name = rmd->getOuterScope()==m_scope ?
rmd->name() : rmd->qualifiedName();
@@ -3721,7 +3666,7 @@ void DotCallGraph::determineVisibleNodes(QList<DotNode> &queue, int &maxNodes)
{
while (queue.count()>0 && maxNodes>0)
{
- static int maxDistance = Config_getInt("MAX_DOT_GRAPH_DEPTH");
+ static int maxDistance = Config_getInt(MAX_DOT_GRAPH_DEPTH);
DotNode *n = queue.take(0);
if (!n->isVisible() && n->distance()<=maxDistance) // not yet processed
{
@@ -3766,7 +3711,12 @@ void DotCallGraph::determineTruncatedNodes(QList<DotNode> &queue)
}
}
+int DotCallGraph::m_curNodeNumber = 0;
+void DotCallGraph::resetNumbering()
+{
+ m_curNodeNumber = 0;
+}
DotCallGraph::DotCallGraph(MemberDef *md,bool inverse)
{
@@ -3777,7 +3727,7 @@ DotCallGraph::DotCallGraph(MemberDef *md,bool inverse)
uniqueId = md->getReference()+"$"+
md->getOutputFileBase()+"#"+md->anchor();
QCString name;
- if (Config_getBool("HIDE_SCOPE_NAMES"))
+ if (Config_getBool(HIDE_SCOPE_NAMES))
{
name = md->name();
}
@@ -3796,7 +3746,7 @@ DotCallGraph::DotCallGraph(MemberDef *md,bool inverse)
m_usedNodes->insert(uniqueId,m_startNode);
buildGraph(m_startNode,md,1);
- static int nodes = Config_getInt("DOT_GRAPH_MAX_NODES");
+ static int nodes = Config_getInt(DOT_GRAPH_MAX_NODES);
int maxNodes = nodes;
//int directChildNodes = 1;
//if (m_startNode->m_children!=0)
@@ -3828,13 +3778,13 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma
{
err("Output dir %s does not exist!\n",path); exit(1);
}
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
QCString baseName = m_diskName + (m_inverse ? "_icgraph" : "_cgraph");
QCString mapName = baseName;
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
QCString absBaseName = d.absPath().utf8()+"/"+baseName;
QCString absDotName = absBaseName+".dot";
QCString absMapName = absBaseName+".map";
@@ -3953,7 +3903,7 @@ bool DotCallGraph::isTrivial() const
bool DotCallGraph::isTooBig() const
{
- static int maxNodes = Config_getInt("DOT_GRAPH_MAX_NODES");
+ static int maxNodes = Config_getInt(DOT_GRAPH_MAX_NODES);
int numNodes = m_startNode->m_children ? m_startNode->m_children->count() : 0;
return numNodes>=maxNodes;
}
@@ -3985,13 +3935,13 @@ QCString DotDirDeps::writeGraph(FTextStream &out,
{
err("Output dir %s does not exist!\n",path); exit(1);
}
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
QCString baseName=m_dir->getOutputFileBase()+"_dep";
QCString mapName=escapeCharsInString(baseName,FALSE);
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
QCString absBaseName = d.absPath().utf8()+"/"+baseName;
QCString absDotName = absBaseName+".dot";
QCString absMapName = absBaseName+".map";
@@ -4156,7 +4106,7 @@ void generateGraphLegend(const char *path)
QCString absBaseName = (QCString)path+"/graph_legend";
QCString absDotName = absBaseName+".dot";
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
QCString imgName = "graph_legend."+imgExt;
QCString absImgName = absBaseName+"."+imgExt;
if (checkAndUpdateMd5Signature(absBaseName,sigStr) ||
@@ -4188,7 +4138,7 @@ void generateGraphLegend(const char *path)
if (imgExt=="svg")
{
DotManager::instance()->addSVGObject(
- absBaseName+Config_getString("HTML_FILE_EXTENSION"),
+ absBaseName+Config_getString(HTML_FILE_EXTENSION),
"graph_legend",
absImgName,QCString());
}
@@ -4205,7 +4155,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
}
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
QCString imgName = (QCString)outFile+"."+imgExt;
QCString absImgName = d.absPath().utf8()+"/"+imgName;
QCString absOutFile = d.absPath().utf8()+"/"+outFile;
@@ -4215,7 +4165,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
dotRun.addJob(imgFmt,absImgName);
else // format==GOF_EPS
{
- if (Config_getBool("USE_PDFLATEX"))
+ if (Config_getBool(USE_PDFLATEX))
{
dotRun.addJob("pdf",absOutFile+".pdf");
}
@@ -4261,7 +4211,7 @@ void writeDotImageMapFromFile(FTextStream &t,
QCString mapName = baseName+".map";
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
QCString imgName = baseName+"."+imgExt;
QCString absOutFile = d.absPath().utf8()+"/"+mapName;
@@ -4298,12 +4248,18 @@ void writeDotImageMapFromFile(FTextStream &t,
//-------------------------------------------------------------
+int DotGroupCollaboration::m_curNodeNumber = 0;
+
+void DotGroupCollaboration::resetNumbering()
+{
+ m_curNodeNumber = 0;
+}
+
DotGroupCollaboration::DotGroupCollaboration(GroupDef* gd)
{
- m_curNodeId = 0;
QCString tmp_url = gd->getReference()+"$"+gd->getOutputFileBase();
m_usedNodes = new QDict<DotNode>(1009);
- m_rootNode = new DotNode(m_curNodeId++, gd->groupTitle(), "", tmp_url, TRUE );
+ m_rootNode = new DotNode(m_curNodeNumber++, gd->groupTitle(), "", tmp_url, TRUE );
m_rootNode->markAsVisible();
m_usedNodes->insert(gd->name(), m_rootNode );
m_edges.setAutoDelete(TRUE);
@@ -4337,7 +4293,7 @@ void DotGroupCollaboration::buildGraph(GroupDef* gd)
{ // add node
tmp_url = d->getReference()+"$"+d->getOutputFileBase();
QCString tooltip = d->briefDescriptionAsTooltip();
- nnode = new DotNode(m_curNodeId++, d->groupTitle(), tooltip, tmp_url );
+ nnode = new DotNode(m_curNodeNumber++, d->groupTitle(), tooltip, tmp_url );
nnode->markAsVisible();
m_usedNodes->insert(d->name(), nnode );
}
@@ -4358,7 +4314,7 @@ void DotGroupCollaboration::buildGraph(GroupDef* gd)
{ // add node
tmp_url = def->getReference()+"$"+def->getOutputFileBase();
QCString tooltip = def->briefDescriptionAsTooltip();
- nnode = new DotNode(m_curNodeId++, def->groupTitle(), tooltip, tmp_url );
+ nnode = new DotNode(m_curNodeNumber++, def->groupTitle(), tooltip, tmp_url );
nnode->markAsVisible();
m_usedNodes->insert(def->name(), nnode );
}
@@ -4500,7 +4456,7 @@ void DotGroupCollaboration::addCollaborationMember(
{ // add node
tmp_str = d->getReference()+"$"+d->getOutputFileBase();
QCString tooltip = d->briefDescriptionAsTooltip();
- nnode = new DotNode(m_curNodeId++, d->groupTitle(), tooltip, tmp_str );
+ nnode = new DotNode(m_curNodeNumber++, d->groupTitle(), tooltip, tmp_str );
nnode->markAsVisible();
m_usedNodes->insert(d->name(), nnode );
}
@@ -4522,7 +4478,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
{
err("Output dir %s does not exist!\n",path); exit(1);
}
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
QGString theGraph;
FTextStream md5stream(&theGraph);
@@ -4539,7 +4495,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
// write other nodes.
for (dni.toFirst();(pn=dni.current());++dni)
{
- pn->write(md5stream,DotNode::Inheritance,graphFormat,TRUE,FALSE,FALSE,FALSE);
+ pn->write(md5stream,DotNode::Inheritance,graphFormat,TRUE,FALSE,FALSE);
}
// write edges
@@ -4551,13 +4507,12 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
}
writeGraphFooter(md5stream);
- resetReNumbering();
uchar md5_sig[16];
QCString sigStr(33);
MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.rawData(),33);
QCString imgExt = getDotImageExtension();
- QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgFmt = Config_getEnum(DOT_IMAGE_FORMAT);
QCString baseName = m_diskName;
QCString imgName = baseName+"."+imgExt;
QCString absPath = d.absPath().data();
@@ -4751,7 +4706,7 @@ void DotGroupCollaboration::writeGraphHeader(FTextStream &t,
}
t << endl;
t << "{" << endl;
- if (Config_getBool("DOT_TRANSPARENT"))
+ if (Config_getBool(DOT_TRANSPARENT))
{
t << " bgcolor=\"transparent\";" << endl;
}
@@ -4764,7 +4719,7 @@ void DotGroupCollaboration::writeGraphHeader(FTextStream &t,
void writeDotDirDepGraph(FTextStream &t,DirDef *dd,bool linkRelations)
{
t << "digraph \"" << dd->displayName() << "\" {\n";
- if (Config_getBool("DOT_TRANSPARENT"))
+ if (Config_getBool(DOT_TRANSPARENT))
{
t << " bgcolor=transparent;\n";
}
@@ -4854,7 +4809,7 @@ void writeDotDirDepGraph(FTextStream &t,DirDef *dd,bool linkRelations)
<< usedDir->shortName() << "\"";
if (usedDir->isCluster())
{
- if (!Config_getBool("DOT_TRANSPARENT"))
+ if (!Config_getBool(DOT_TRANSPARENT))
{
t << " fillcolor=\"white\" style=\"filled\"";
}
@@ -4907,3 +4862,12 @@ void writeDotDirDepGraph(FTextStream &t,DirDef *dd,bool linkRelations)
t << "}\n";
}
+
+void resetDotNodeNumbering()
+{
+ DotClassGraph::resetNumbering();
+ DotInclDepGraph::resetNumbering();
+ DotCallGraph::resetNumbering();
+ DotGroupCollaboration::resetNumbering();
+}
+
diff --git a/src/dot.h b/src/dot.h
index e12d547..dce1a3a 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -78,7 +78,7 @@ class DotNode
void removeParent(DotNode *n);
int findParent( DotNode *n );
void write(FTextStream &t,GraphType gt,GraphOutputFormat f,
- bool topDown,bool toChildren,bool backArrows,bool reNumber);
+ bool topDown,bool toChildren,bool backArrows);
int m_subgraphId;
void clearWriteFlag();
void writeXML(FTextStream &t,bool isClassGraph);
@@ -89,13 +89,14 @@ class DotNode
bool isVisible() const { return m_visible; }
TruncState isTruncated() const { return m_truncated; }
int distance() const { return m_distance; }
+ void renumberNodes(int &number);
private:
void colorConnectedNodes(int curColor);
void writeBox(FTextStream &t,GraphType gt,GraphOutputFormat f,
- bool hasNonReachableChildren, bool reNumber=FALSE);
+ bool hasNonReachableChildren);
void writeArrow(FTextStream &t,GraphType gt,GraphOutputFormat f,DotNode *cn,
- EdgeInfo *ei,bool topDown, bool pointBack=TRUE, bool reNumber=FALSE);
+ EdgeInfo *ei,bool topDown, bool pointBack=TRUE);
void setDistance(int distance);
const DotNode *findDocNode() const; // only works for acyclic graphs!
void markAsVisible(bool b=TRUE) { m_visible=b; }
@@ -160,7 +161,7 @@ class DotGfxHierarchyTable
QList<DotNode> *m_rootNodes;
QDict<DotNode> *m_usedNodes;
- static int m_curNodeNumber;
+ int m_curNodeNumber;
DotNodeList *m_rootSubgraphs;
};
@@ -179,7 +180,7 @@ class DotClassGraph
void writeXML(FTextStream &t);
void writeDocbook(FTextStream &t);
void writeDEF(FTextStream &t);
- QCString diskName() const;
+ static void resetNumbering();
private:
void buildGraph(ClassDef *cd,DotNode *n,bool base,int distance);
@@ -193,7 +194,8 @@ class DotClassGraph
QDict<DotNode> * m_usedNodes;
static int m_curNodeNumber;
DotNode::GraphType m_graphType;
- QCString m_diskName;
+ QCString m_collabFileName;
+ QCString m_inheritFileName;
bool m_lrRank;
};
@@ -211,6 +213,8 @@ class DotInclDepGraph
QCString diskName() const;
void writeXML(FTextStream &t);
void writeDocbook(FTextStream &t);
+ static void resetNumbering();
+
private:
void buildGraph(DotNode *n,FileDef *fd,int distance);
void determineVisibleNodes(QList<DotNode> &queue,int &maxNodes);
@@ -219,7 +223,8 @@ class DotInclDepGraph
DotNode *m_startNode;
QDict<DotNode> *m_usedNodes;
static int m_curNodeNumber;
- QCString m_diskName;
+ QCString m_inclDepFileName;
+ QCString m_inclByDepFileName;
bool m_inverse;
};
@@ -238,10 +243,11 @@ class DotCallGraph
bool isTooBig() const;
void determineVisibleNodes(QList<DotNode> &queue, int &maxNodes);
void determineTruncatedNodes(QList<DotNode> &queue);
-
+ static void resetNumbering();
+
private:
DotNode *m_startNode;
- static int m_curNodeNumber;
+ static int m_curNodeNumber;
QDict<DotNode> *m_usedNodes;
bool m_inverse;
QCString m_diskName;
@@ -312,6 +318,8 @@ class DotGroupCollaboration
bool writeImageMap=TRUE,int graphId=-1) const;
void buildGraph(GroupDef* gd);
bool isTrivial() const;
+ static void resetNumbering();
+
private :
void addCollaborationMember( Definition* def, QCString& url, EdgeType eType );
void addMemberList( class MemberList* ml );
@@ -320,7 +328,7 @@ class DotGroupCollaboration
const QCString& _label, const QCString& _url );
DotNode *m_rootNode;
- int m_curNodeId;
+ static int m_curNodeNumber;
QDict<DotNode> *m_usedNodes;
QCString m_diskName;
QList<Edge> m_edges;
@@ -488,4 +496,6 @@ void writeDotImageMapFromFile(FTextStream &t,
const QCString& relPath,const QCString& baseName,
const QCString& context,int graphId=-1);
+void resetDotNodeNumbering();
+
#endif
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index a3a3d2a..d3554cf 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -72,6 +72,7 @@
#include "pyscanner.h"
#include "fortranscanner.h"
#include "xmlscanner.h"
+#include "sqlscanner.h"
#include "tclscanner.h"
#include "code.h"
#include "objcache.h"
@@ -766,7 +767,7 @@ static void organizeSubGroups(EntryNav *rootNav)
static void buildFileList(EntryNav *rootNav)
{
if (((rootNav->section()==Entry::FILEDOC_SEC) ||
- ((rootNav->section() & Entry::FILE_MASK) && Config_getBool("EXTRACT_ALL"))) &&
+ ((rootNav->section() & Entry::FILE_MASK) && Config_getBool(EXTRACT_ALL))) &&
!rootNav->name().isEmpty() && !rootNav->tagInfo() // skip any file coming from tag files
)
{
@@ -845,13 +846,13 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
if (
(!root->doc.stripWhiteSpace().isEmpty() ||
!root->brief.stripWhiteSpace().isEmpty() ||
- Config_getBool("EXTRACT_ALL")
+ Config_getBool(EXTRACT_ALL)
) && root->protection!=Private
)
{
//printf(">>>>>> includeFile=%s\n",root->includeFile.data());
- bool local=Config_getBool("FORCE_LOCAL_INCLUDES");
+ bool local=Config_getBool(FORCE_LOCAL_INCLUDES);
QCString includeFile = root->includeFile;
if (!includeFile.isEmpty() && includeFile.at(0)=='"')
{
@@ -915,7 +916,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
iName=fd->name();
}
}
- else if (!Config_getList("STRIP_FROM_INC_PATH").isEmpty())
+ else if (!Config_getList(STRIP_FROM_INC_PATH).isEmpty())
{
iName=stripFromIncludePath(fd->absFilePath());
}
@@ -1491,7 +1492,7 @@ static void resolveClassNestingRelations()
void distributeClassGroupRelations()
{
- //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
//if (!inlineGroupedClasses) return;
//printf("** distributeClassGroupRelations()\n");
@@ -2052,10 +2053,16 @@ static void findUsingDeclarations(EntryNav *rootNav)
// file scope).
QCString name = substitute(root->name,".","::"); //Java/C# scope->internal
- usingCd = getClass(name);
+ usingCd = getClass(name); // try direct lookup first, this is needed to get
+ // builtin STL classes to properly resolve, e.g.
+ // vector -> std::vector
if (usingCd==0)
{
- usingCd = Doxygen::hiddenClasses->find(name);
+ usingCd = getResolvedClass(nd,fd,name); // try via resolving (see also bug757509)
+ }
+ if (usingCd==0)
+ {
+ usingCd = Doxygen::hiddenClasses->find(name); // check if it is already hidden
}
//printf("%s -> %p\n",root->name.data(),usingCd);
@@ -2270,7 +2277,7 @@ static MemberDef *addVariableToClass(
QCString def;
if (!root->type.isEmpty())
{
- if (related || mtype==MemberType_Friend || Config_getBool("HIDE_SCOPE_NAMES"))
+ if (related || mtype==MemberType_Friend || Config_getBool(HIDE_SCOPE_NAMES))
{
if (root->spec&Entry::Alias) // turn 'typedef B A' into 'using A = B'
{
@@ -2295,7 +2302,7 @@ static MemberDef *addVariableToClass(
}
else
{
- if (Config_getBool("HIDE_SCOPE_NAMES"))
+ if (Config_getBool(HIDE_SCOPE_NAMES))
{
def=name+root->args;
}
@@ -2437,7 +2444,7 @@ static MemberDef *addVariableToFile(
FileDef *fd = rootNav->fileDef();
// see if we have a typedef that should hide a struct or union
- if (mtype==MemberType_Typedef && Config_getBool("TYPEDEF_HIDES_STRUCT"))
+ if (mtype==MemberType_Typedef && Config_getBool(TYPEDEF_HIDES_STRUCT))
{
QCString type = root->type;
type.stripPrefix("typedef ");
@@ -2480,7 +2487,7 @@ static MemberDef *addVariableToFile(
// determine the definition of the global variable
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@' &&
- !Config_getBool("HIDE_SCOPE_NAMES")
+ !Config_getBool(HIDE_SCOPE_NAMES)
)
// variable is inside a namespace, so put the scope before the name
{
@@ -2586,7 +2593,7 @@ static MemberDef *addVariableToFile(
}
Debug::print(Debug::Variables,0,
- " new variable, nd=%s!\n",nd?qPrint(nd->name()):"<global>");
+ " new variable, nd=%s tagInfo=%p!\n",nd?qPrint(nd->name()):"<global>",rootNav->tagInfo());
// new global variable, enum value or typedef
MemberDef *md=new MemberDef(
fileName,root->startLine,root->startColumn,
@@ -2654,7 +2661,10 @@ static MemberDef *addVariableToFile(
*/
static int findFunctionPtr(const QCString &type,int lang, int *pLength=0)
{
- if (lang == SrcLangExt_Fortran) return -1; // Fortran does not have function pointers
+ if (lang == SrcLangExt_Fortran || lang == SrcLangExt_VHDL)
+ {
+ return -1; // Fortran and VHDL do not have function pointers
+ }
static const QRegExp re("([^)]*[\\*\\^][^)]*)");
int i=-1,l;
int bb=type.find('<');
@@ -2861,11 +2871,6 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
//printf("root->type=%s root->args=%s\n",root->type.data(),root->args.data());
}
}
- else if (root->type.find("typedef ")!=-1 && root->type.right(2)=="()") // typedef void (func)(int)
- {
- root->type=root->type.left(root->type.length()-1);
- root->args.prepend(") ");
- }
}
QCString scope,name=removeRedundantWhiteSpace(root->name);
@@ -2959,7 +2964,7 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
//int anonyScopes = 0;
//bool added=FALSE;
- static bool inlineSimpleStructs = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
if (si!=-1 && !inlineSimpleStructs) // anonymous scope or type
{
QCString pScope;
@@ -3322,7 +3327,7 @@ static void addMethodToClass(EntryNav *rootNav,ClassDef *cd,
// for PHP we use Class::method and Namespace\method
scopeSeparator="::";
}
- if (!root->relates.isEmpty() || isFriend || Config_getBool("HIDE_SCOPE_NAMES"))
+ if (!root->relates.isEmpty() || isFriend || Config_getBool(HIDE_SCOPE_NAMES))
{
if (!root->type.isEmpty())
{
@@ -4306,7 +4311,7 @@ static void findUsedClassesForClass(EntryNav *rootNav,
if (!found && !type.isEmpty()) // used class is not documented in any scope
{
ClassDef *usedCd = Doxygen::hiddenClasses->find(type);
- if (usedCd==0 && !Config_getBool("HIDE_UNDOC_RELATIONS"))
+ if (usedCd==0 && !Config_getBool(HIDE_UNDOC_RELATIONS))
{
if (type.right(2)=="(*" || type.right(2)=="(^") // type is a function pointer
{
@@ -4381,8 +4386,8 @@ static void findBaseClassesForClass(
{
// 1.8.2: decided to show inheritance relations even if not documented,
// we do make them artificial, so they do not appear in the index
- //if (!Config_getBool("HIDE_UNDOC_RELATIONS"))
- bool b = Config_getBool("HIDE_UNDOC_RELATIONS") ? TRUE : isArtificial;
+ //if (!Config_getBool(HIDE_UNDOC_RELATIONS))
+ bool b = Config_getBool(HIDE_UNDOC_RELATIONS) ? TRUE : isArtificial;
//{
// no documented base class -> try to find an undocumented one
findClassRelation(rootNav,context,instanceCd,&tbi,templateNames,Undocumented,b);
@@ -4810,7 +4815,7 @@ static bool findClassRelation(
usedName=biName;
//printf("***** usedName=%s templSpec=%s\n",usedName.data(),templSpec.data());
}
- static bool sipSupport = Config_getBool("SIP_SUPPORT");
+ static bool sipSupport = Config_getBool(SIP_SUPPORT);
if (sipSupport) bi->prot=Public;
if (!cd->isSubClass(baseClass)) // check for recursion, see bug690787
{
@@ -5057,9 +5062,9 @@ static void computeClassRelations()
{
if (!root->name.isEmpty() && root->name.find('@')==-1 && // normal name
(guessSection(root->fileName)==Entry::HEADER_SEC ||
- Config_getBool("EXTRACT_LOCAL_CLASSES")) && // not defined in source file
+ Config_getBool(EXTRACT_LOCAL_CLASSES)) && // not defined in source file
protectionLevelVisible(root->protection) && // hidden by protection
- !Config_getBool("HIDE_UNDOC_CLASSES") // undocumented class are visible
+ !Config_getBool(HIDE_UNDOC_CLASSES) // undocumented class are visible
)
warn_undoc(
root->fileName,root->startLine,
@@ -5590,7 +5595,7 @@ static bool findGlobalMember(EntryNav *rootNav,
if (root->type!="friend class" &&
root->type!="friend struct" &&
root->type!="friend union" &&
- (!Config_getBool("TYPEDEF_HIDES_STRUCT") ||
+ (!Config_getBool(TYPEDEF_HIDES_STRUCT) ||
root->type.find("typedef ")==-1)
)
{
@@ -5999,7 +6004,7 @@ static void findMember(EntryNav *rootNav,
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
// rebuild the function declaration (needed to get the scope right).
- if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config_getBool("HIDE_SCOPE_NAMES"))
+ if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config_getBool(HIDE_SCOPE_NAMES))
{
if (!funcType.isEmpty())
{
@@ -6323,7 +6328,7 @@ static void findMember(EntryNav *rootNav,
}
}
}
- static bool strictProtoMatching = Config_getBool("STRICT_PROTO_MATCHING");
+ static bool strictProtoMatching = Config_getBool(STRICT_PROTO_MATCHING);
if (!strictProtoMatching)
{
if (candidates==1 && ucd && umd)
@@ -6760,7 +6765,7 @@ static void findMember(EntryNav *rootNav,
localObjCMethod:
ClassDef *cd;
//printf("scopeName=`%s' className=`%s'\n",scopeName.data(),className.data());
- if (Config_getBool("EXTRACT_LOCAL_METHODS") && (cd=getClass(scopeName)))
+ if (Config_getBool(EXTRACT_LOCAL_METHODS) && (cd=getClass(scopeName)))
{
Debug::print(Debug::FindMembers,0,"4. Local objective C method %s\n"
" scopeName=%s className=%s\n",qPrint(root->name),qPrint(scopeName),qPrint(className));
@@ -7133,7 +7138,7 @@ static void findEnums(EntryNav *rootNav)
if (nd && !nd->name().isEmpty() && nd->name().at(0)!='@')
{
- if (isRelated || Config_getBool("HIDE_SCOPE_NAMES"))
+ if (isRelated || Config_getBool(HIDE_SCOPE_NAMES))
{
md->setDefinition(name+baseType);
}
@@ -7165,7 +7170,7 @@ static void findEnums(EntryNav *rootNav)
}
else if (cd)
{
- if (isRelated || Config_getBool("HIDE_SCOPE_NAMES"))
+ if (isRelated || Config_getBool(HIDE_SCOPE_NAMES))
{
md->setDefinition(name+baseType);
}
@@ -7819,7 +7824,7 @@ static void generateFileSources()
if (Doxygen::inputNameList->count()>0)
{
#if USE_LIBCLANG
- static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (clangAssistedParsing)
{
QDict<void> g_processedFiles(10007);
@@ -8560,7 +8565,7 @@ static void findDefineDocumentation(EntryNav *rootNav)
}
else if (!root->doc.isEmpty() || !root->brief.isEmpty()) // define not found
{
- static bool preEnabled = Config_getBool("ENABLE_PREPROCESSING");
+ static bool preEnabled = Config_getBool(ENABLE_PREPROCESSING);
if (preEnabled)
{
warn(root->fileName,root->startLine,
@@ -8673,7 +8678,7 @@ static void buildPageList(EntryNav *rootNav)
QCString title=root->args.stripWhiteSpace();
if (title.isEmpty()) title=theTranslator->trMainPage();
- //QCString name = Config_getBool("GENERATE_TREEVIEW")?"main":"index";
+ //QCString name = Config_getBool(GENERATE_TREEVIEW)?"main":"index";
QCString name = "index";
addRefItem(root->sli,
name,
@@ -8700,7 +8705,7 @@ static void findMainPage(EntryNav *rootNav)
Entry *root = rootNav->entry();
//printf("Found main page! \n======\n%s\n=======\n",root->doc.data());
QCString title=root->args.stripWhiteSpace();
- //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index";
+ //QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
QCString indexName="index";
Doxygen::mainPage = new PageDef(root->docFile,root->docLine,
indexName, root->brief+root->doc+root->inbodyDocs,title);
@@ -9112,7 +9117,7 @@ static void generateConfigFile(const char *configFile,bool shortList,
if (fileOpened)
{
FTextStream t(&f);
- Config::instance()->writeTemplate(t,shortList,updateOnly);
+ Config::writeTemplate(t,shortList,updateOnly);
if (!writeToStdout)
{
if (!updateOnly)
@@ -9189,7 +9194,7 @@ static void readTagFile(Entry *root,const char *tl)
//----------------------------------------------------------------------------
static void copyLatexStyleSheet()
{
- QStrList latexExtraStyleSheet = Config_getList("LATEX_EXTRA_STYLESHEET");
+ QStrList latexExtraStyleSheet = Config_getList(LATEX_EXTRA_STYLESHEET);
for (uint i=0; i<latexExtraStyleSheet.count(); ++i)
{
QCString fileName(latexExtraStyleSheet.at(i));
@@ -9202,7 +9207,7 @@ static void copyLatexStyleSheet()
}
else
{
- QCString destFileName = Config_getString("LATEX_OUTPUT")+"/"+fi.fileName().data();
+ QCString destFileName = Config_getString(LATEX_OUTPUT)+"/"+fi.fileName().data();
if (!checkExtension(fi.fileName().data(), latexStyleExtension))
{
destFileName += latexStyleExtension;
@@ -9216,7 +9221,7 @@ static void copyLatexStyleSheet()
//----------------------------------------------------------------------------
static void copyStyleSheet()
{
- QCString &htmlStyleSheet = Config_getString("HTML_STYLESHEET");
+ QCString &htmlStyleSheet = Config_getString(HTML_STYLESHEET);
if (!htmlStyleSheet.isEmpty())
{
QFileInfo fi(htmlStyleSheet);
@@ -9227,11 +9232,11 @@ static void copyStyleSheet()
}
else
{
- QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data();
+ QCString destFileName = Config_getString(HTML_OUTPUT)+"/"+fi.fileName().data();
copyFile(htmlStyleSheet,destFileName);
}
}
- QStrList htmlExtraStyleSheet = Config_getList("HTML_EXTRA_STYLESHEET");
+ QStrList htmlExtraStyleSheet = Config_getList(HTML_EXTRA_STYLESHEET);
for (uint i=0; i<htmlExtraStyleSheet.count(); ++i)
{
QCString fileName(htmlExtraStyleSheet.at(i));
@@ -9248,16 +9253,16 @@ static void copyStyleSheet()
}
else
{
- QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data();
+ QCString destFileName = Config_getString(HTML_OUTPUT)+"/"+fi.fileName().data();
copyFile(fileName, destFileName);
}
}
}
}
-static void copyLogo()
+static void copyLogo(const QCString &outputOption)
{
- QCString &projectLogo = Config_getString("PROJECT_LOGO");
+ QCString &projectLogo = Config_getString(PROJECT_LOGO);
if (!projectLogo.isEmpty())
{
QFileInfo fi(projectLogo);
@@ -9268,16 +9273,15 @@ static void copyLogo()
}
else
{
- QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data();
+ QCString destFileName = outputOption+"/"+fi.fileName().data();
copyFile(projectLogo,destFileName);
Doxygen::indexList->addImageFile(fi.fileName().data());
}
}
}
-static void copyExtraFiles(const QCString& filesOption,const QCString &outputOption)
+static void copyExtraFiles(QStrList files,const QString &filesOption,const QCString &outputOption)
{
- QStrList files = Config_getList(filesOption);
uint i;
for (i=0; i<files.count(); ++i)
{
@@ -9288,11 +9292,11 @@ static void copyExtraFiles(const QCString& filesOption,const QCString &outputOpt
QFileInfo fi(fileName);
if (!fi.exists())
{
- err("Extra file '%s' specified in " + filesOption + " does not exist!\n", fileName.data());
+ err("Extra file '%s' specified in %s does not exist!\n", fileName.data(),filesOption.data());
}
else
{
- QCString destFileName = Config_getString(outputOption)+"/"+fi.fileName().data();
+ QCString destFileName = outputOption+"/"+fi.fileName().data();
Doxygen::indexList->addImageFile(fi.fileName().utf8());
copyFile(fileName, destFileName);
}
@@ -9325,7 +9329,7 @@ static void parseFile(ParserInterface *parser,
bool sameTu,QStrList &filesInSameTu)
{
#if USE_LIBCLANG
- static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
#else
static bool clangAssistedParsing = FALSE;
#endif
@@ -9344,7 +9348,7 @@ static void parseFile(ParserInterface *parser,
QFileInfo fi(fileName);
BufStr preBuf(fi.size()+4096);
- if (Config_getBool("ENABLE_PREPROCESSING") &&
+ if (Config_getBool(ENABLE_PREPROCESSING) &&
parser->needsPreprocessing(extension))
{
BufStr inBuf(fi.size()+4096);
@@ -9387,7 +9391,7 @@ static void parseFile(ParserInterface *parser,
static void parseFiles(Entry *root,EntryNav *rootNav)
{
#if USE_LIBCLANG
- static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (clangAssistedParsing)
{
QDict<void> g_processedFiles(10007);
@@ -9599,7 +9603,7 @@ int readDir(QFileInfo *fi,
}
}
else if (cfi->isFile() &&
- (!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) &&
+ (!Config_getBool(EXCLUDE_SYMLINKS) || !cfi->isSymLink()) &&
(patList==0 || patternMatch(*cfi,patList)) &&
!patternMatch(*cfi,exclPatList) &&
(killDict==0 || killDict->find(cfi->absFilePath().utf8())==0)
@@ -9634,7 +9638,7 @@ int readDir(QFileInfo *fi,
if (killDict) killDict->insert(cfi->absFilePath().utf8(),(void *)0x8);
}
else if (recursive &&
- (!Config_getBool("EXCLUDE_SYMLINKS") || !cfi->isSymLink()) &&
+ (!Config_getBool(EXCLUDE_SYMLINKS) || !cfi->isSymLink()) &&
cfi->isDir() &&
!patternMatch(*cfi,exclPatList) &&
cfi->fileName().at(0)!='.') // skip "." ".." and ".dir"
@@ -9690,7 +9694,7 @@ int readFileOrDirectory(const char *s,
warn_uncond("source %s is not a readable file or directory... skipping.\n",s);
}
}
- else if (!Config_getBool("EXCLUDE_SYMLINKS") || !fi.isSymLink())
+ else if (!Config_getBool(EXCLUDE_SYMLINKS) || !fi.isSymLink())
{
if (fi.isFile())
{
@@ -9750,7 +9754,7 @@ int readFileOrDirectory(const char *s,
void readFormulaRepository()
{
- QFile f(Config_getString("HTML_OUTPUT")+"/formula.repository");
+ QFile f(Config_getString(HTML_OUTPUT)+"/formula.repository");
if (f.open(IO_ReadOnly)) // open repository
{
msg("Reading formula repository...\n");
@@ -9832,7 +9836,7 @@ void readAliases()
{
// add aliases to a dictionary
Doxygen::aliasDict.setAutoDelete(TRUE);
- QStrList &aliasList = Config_getList("ALIASES");
+ QStrList &aliasList = Config_getList(ALIASES);
const char *s=aliasList.first();
while (s)
{
@@ -9985,6 +9989,8 @@ void initDoxygen()
setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8
setlocale(LC_NUMERIC,"C");
+ portable_correct_path();
+
Doxygen::runningTime.start();
initPreprocessor();
@@ -9997,6 +10003,7 @@ void initDoxygen()
Doxygen::parserManager->registerParser("fortranfixed", new FortranLanguageScannerFixed);
Doxygen::parserManager->registerParser("vhdl", new VHDLLanguageScanner);
Doxygen::parserManager->registerParser("xml", new XMLScanner);
+ Doxygen::parserManager->registerParser("sql", new SQLScanner);
Doxygen::parserManager->registerParser("tcl", new TclLanguageScanner);
Doxygen::parserManager->registerParser("md", new MarkdownFileParser);
@@ -10019,7 +10026,6 @@ void initDoxygen()
Doxygen::functionNameSDict->setAutoDelete(TRUE);
Doxygen::groupSDict = new GroupSDict(17);
Doxygen::groupSDict->setAutoDelete(TRUE);
- Doxygen::globalScope = new NamespaceDef("<globalScope>",1,1,"<globalScope>");
Doxygen::namespaceSDict = new NamespaceSDict(20);
Doxygen::namespaceSDict->setAutoDelete(TRUE);
Doxygen::classSDict = new ClassSDict(1009);
@@ -10032,15 +10038,6 @@ void initDoxygen()
Doxygen::pageSDict->setAutoDelete(TRUE);
Doxygen::exampleSDict = new PageSDict(1009); // all examples
Doxygen::exampleSDict->setAutoDelete(TRUE);
- Doxygen::inputNameDict = new FileNameDict(10007);
- Doxygen::includeNameDict = new FileNameDict(10007);
- Doxygen::exampleNameDict = new FileNameDict(1009);
- Doxygen::exampleNameDict->setAutoDelete(TRUE);
- Doxygen::imageNameDict = new FileNameDict(257);
- Doxygen::imageNameDict->setAutoDelete(TRUE);
- Doxygen::dotFileNameDict = new FileNameDict(257);
- Doxygen::mscFileNameDict = new FileNameDict(257);
- Doxygen::diaFileNameDict = new FileNameDict(257);
Doxygen::memGrpInfoDict.setAutoDelete(TRUE);
Doxygen::tagDestinationDict.setAutoDelete(TRUE);
Doxygen::dirRelations.setAutoDelete(TRUE);
@@ -10053,6 +10050,17 @@ void initDoxygen()
Doxygen::sectionDict = new SectionDict(257);
Doxygen::sectionDict->setAutoDelete(TRUE);
+ // initialisation of these globals depends on
+ // configuration switches so we need to postpone these
+ Doxygen::globalScope = 0;
+ Doxygen::inputNameDict = 0;
+ Doxygen::includeNameDict = 0;
+ Doxygen::exampleNameDict = 0;
+ Doxygen::imageNameDict = 0;
+ Doxygen::dotFileNameDict = 0;
+ Doxygen::mscFileNameDict = 0;
+ Doxygen::diaFileNameDict = 0;
+
/**************************************************************************
* Initialize some global constants
**************************************************************************/
@@ -10064,7 +10072,6 @@ void initDoxygen()
g_compoundKeywordDict.insert("union",(void *)8);
g_compoundKeywordDict.insert("interface",(void *)8);
g_compoundKeywordDict.insert("exception",(void *)8);
-
}
void cleanUpDoxygen()
@@ -10255,26 +10262,17 @@ void readConfiguration(int argc, char **argv)
}
else if (qstricmp(formatName,"html")==0)
{
+ Config::init();
if (optind+4<argc || QFileInfo("Doxyfile").exists())
+ // explicit config file mentioned or default found on disk
{
QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
- if (!Config::instance()->parse(df))
+ if (!Config::parse(df)) // parse the config file
{
err("error opening or reading configuration file %s!\n",argv[optind+4]);
cleanUpDoxygen();
exit(1);
}
- Config::instance()->substituteEnvironmentVars();
- Config::instance()->convertStrToVal();
- // avoid bootstrapping issues when the config file already
- // refers to the files that we are supposed to parse.
- Config_getString("HTML_HEADER")="";
- Config_getString("HTML_FOOTER")="";
- Config::instance()->check();
- }
- else
- {
- Config::instance()->init();
}
if (optind+3>=argc)
{
@@ -10282,8 +10280,10 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen();
exit(1);
}
+ Config::postProcess(TRUE);
+ Config::checkAndCorrect();
- QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
+ QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))
{
warn_uncond("Output language %s not supported! Using English instead.\n", outputLanguage.data());
@@ -10309,24 +10309,16 @@ void readConfiguration(int argc, char **argv)
}
else if (qstricmp(formatName,"latex")==0)
{
+ Config::init();
if (optind+4<argc || QFileInfo("Doxyfile").exists())
{
QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
- if (!Config::instance()->parse(df))
+ if (!Config::parse(df))
{
err("error opening or reading configuration file %s!\n",argv[optind+4]);
cleanUpDoxygen();
exit(1);
}
- Config::instance()->substituteEnvironmentVars();
- Config::instance()->convertStrToVal();
- Config_getString("LATEX_HEADER")="";
- Config_getString("LATEX_FOOTER")="";
- Config::instance()->check();
- }
- else // use default config
- {
- Config::instance()->init();
}
if (optind+3>=argc)
{
@@ -10334,8 +10326,10 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen();
exit(1);
}
+ Config::postProcess(TRUE);
+ Config::checkAndCorrect();
- QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
+ QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))
{
warn_uncond("Output language %s not supported! Using English instead.\n", outputLanguage.data());
@@ -10420,7 +10414,14 @@ void readConfiguration(int argc, char **argv)
* Parse or generate the config file *
**************************************************************************/
- Config::instance()->init();
+ Config::init();
+
+ if (genConfig && g_useOutputTemplate)
+ {
+ generateTemplateFiles("templates");
+ cleanUpDoxygen();
+ exit(0);
+ }
if (genConfig)
{
@@ -10469,7 +10470,7 @@ void readConfiguration(int argc, char **argv)
}
- if (!Config::instance()->parse(configName,updateConfig))
+ if (!Config::parse(configName,updateConfig))
{
err("could not open or read configuration file %s!\n",configName);
cleanUpDoxygen();
@@ -10493,23 +10494,32 @@ void readConfiguration(int argc, char **argv)
void checkConfiguration()
{
- Config::instance()->substituteEnvironmentVars();
- Config::instance()->convertStrToVal();
- Config::instance()->check();
-
+ Config::postProcess(FALSE);
+ Config::checkAndCorrect();
initWarningFormat();
}
/** adjust globals that depend on configuration settings. */
void adjustConfiguration()
{
- QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
+ Doxygen::globalScope = new NamespaceDef("<globalScope>",1,1,"<globalScope>");
+ Doxygen::inputNameDict = new FileNameDict(10007);
+ Doxygen::includeNameDict = new FileNameDict(10007);
+ Doxygen::exampleNameDict = new FileNameDict(1009);
+ Doxygen::exampleNameDict->setAutoDelete(TRUE);
+ Doxygen::imageNameDict = new FileNameDict(257);
+ Doxygen::imageNameDict->setAutoDelete(TRUE);
+ Doxygen::dotFileNameDict = new FileNameDict(257);
+ Doxygen::mscFileNameDict = new FileNameDict(257);
+ Doxygen::diaFileNameDict = new FileNameDict(257);
+
+ QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))
{
warn_uncond("Output language %s not supported! Using English instead.\n",
outputLanguage.data());
}
- QStrList &includePath = Config_getList("INCLUDE_PATH");
+ QStrList &includePath = Config_getList(INCLUDE_PATH);
char *s=includePath.first();
while (s)
{
@@ -10519,23 +10529,23 @@ void adjustConfiguration()
}
/* Set the global html file extension. */
- Doxygen::htmlFileExtension = Config_getString("HTML_FILE_EXTENSION");
+ Doxygen::htmlFileExtension = Config_getString(HTML_FILE_EXTENSION);
Doxygen::xrefLists->setAutoDelete(TRUE);
- Doxygen::parseSourcesNeeded = Config_getBool("CALL_GRAPH") ||
- Config_getBool("CALLER_GRAPH") ||
- Config_getBool("REFERENCES_RELATION") ||
- Config_getBool("REFERENCED_BY_RELATION");
+ Doxygen::parseSourcesNeeded = Config_getBool(CALL_GRAPH) ||
+ Config_getBool(CALLER_GRAPH) ||
+ Config_getBool(REFERENCES_RELATION) ||
+ Config_getBool(REFERENCED_BY_RELATION);
- Doxygen::markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
+ Doxygen::markdownSupport = Config_getBool(MARKDOWN_SUPPORT);
/**************************************************************************
* Add custom extension mappings
**************************************************************************/
- QStrList &extMaps = Config_getList("EXTENSION_MAPPING");
+ QStrList &extMaps = Config_getList(EXTENSION_MAPPING);
char *mapping = extMaps.first();
while (mapping)
{
@@ -10562,7 +10572,7 @@ void adjustConfiguration()
// add predefined macro name to a dictionary
- QStrList &expandAsDefinedList =Config_getList("EXPAND_AS_DEFINED");
+ QStrList &expandAsDefinedList =Config_getList(EXPAND_AS_DEFINED);
s=expandAsDefinedList.first();
while (s)
{
@@ -10577,7 +10587,7 @@ void adjustConfiguration()
readAliases();
// store number of spaces in a tab into Doxygen::spaces
- int &tabSize = Config_getInt("TAB_SIZE");
+ int &tabSize = Config_getInt(TAB_SIZE);
Doxygen::spaces.resize(tabSize+1);
int sp;for (sp=0;sp<tabSize;sp++) Doxygen::spaces.at(sp)=' ';
Doxygen::spaces.at(tabSize)='\0';
@@ -10603,7 +10613,7 @@ static void stopDoxygen(int)
static void writeTagFile()
{
- QCString &generateTagFile = Config_getString("GENERATE_TAGFILE");
+ QCString &generateTagFile = Config_getString(GENERATE_TAGFILE);
if (generateTagFile.isEmpty()) return;
QFile tag(generateTagFile);
@@ -10661,7 +10671,7 @@ static void writeTagFile()
if (Doxygen::mainPage) Doxygen::mainPage->writeTagFile(tagFile);
/*
- if (Doxygen::mainPage && !Config_getString("GENERATE_TAGFILE").isEmpty())
+ if (Doxygen::mainPage && !Config_getString(GENERATE_TAGFILE).isEmpty())
{
tagFile << " <compound kind=\"page\">" << endl
<< " <name>"
@@ -10700,11 +10710,10 @@ static void exitDoxygen()
}
static QCString createOutputDirectory(const QCString &baseDirName,
- const char *formatDirOption,
+ QCString &formatDirName,
const char *defaultDirName)
{
// Note the & on the next line, we modify the formatDirOption!
- QCString &formatDirName = Config_getString(formatDirOption);
if (formatDirName.isEmpty())
{
formatDirName = baseDirName + defaultDirName;
@@ -10725,14 +10734,14 @@ static QCString createOutputDirectory(const QCString &baseDirName,
static QCString getQchFileName()
{
- QCString const & qchFile = Config_getString("QCH_FILE");
+ QCString const & qchFile = Config_getString(QCH_FILE);
if (!qchFile.isEmpty())
{
return qchFile;
}
- QCString const & projectName = Config_getString("PROJECT_NAME");
- QCString const & versionText = Config_getString("PROJECT_NUMBER");
+ QCString const & projectName = Config_getString(PROJECT_NAME);
+ QCString const & versionText = Config_getString(PROJECT_NUMBER);
return QCString("../qch/")
+ (projectName.isEmpty() ? QCString("index") : projectName)
@@ -10742,21 +10751,21 @@ static QCString getQchFileName()
void searchInputFiles()
{
- QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
- bool alwaysRecursive = Config_getBool("RECURSIVE");
+ QStrList &exclPatterns = Config_getList(EXCLUDE_PATTERNS);
+ bool alwaysRecursive = Config_getBool(RECURSIVE);
StringDict excludeNameDict(1009);
excludeNameDict.setAutoDelete(TRUE);
// gather names of all files in the include path
g_s.begin("Searching for include files...\n");
- QStrList &includePathList = Config_getList("INCLUDE_PATH");
+ QStrList &includePathList = Config_getList(INCLUDE_PATH);
char *s=includePathList.first();
while (s)
{
- QStrList &pl = Config_getList("INCLUDE_FILE_PATTERNS");
+ QStrList &pl = Config_getList(INCLUDE_FILE_PATTERNS);
if (pl.count()==0)
{
- pl = Config_getList("FILE_PATTERNS");
+ pl = Config_getList(FILE_PATTERNS);
}
readFileOrDirectory(s,0,Doxygen::includeNameDict,0,&pl,
&exclPatterns,0,0,
@@ -10766,20 +10775,20 @@ void searchInputFiles()
g_s.end();
g_s.begin("Searching for example files...\n");
- QStrList &examplePathList = Config_getList("EXAMPLE_PATH");
+ QStrList &examplePathList = Config_getList(EXAMPLE_PATH);
s=examplePathList.first();
while (s)
{
readFileOrDirectory(s,0,Doxygen::exampleNameDict,0,
- &Config_getList("EXAMPLE_PATTERNS"),
+ &Config_getList(EXAMPLE_PATTERNS),
0,0,0,
- (alwaysRecursive || Config_getBool("EXAMPLE_RECURSIVE")));
+ (alwaysRecursive || Config_getBool(EXAMPLE_RECURSIVE)));
s=examplePathList.next();
}
g_s.end();
g_s.begin("Searching for images...\n");
- QStrList &imagePathList=Config_getList("IMAGE_PATH");
+ QStrList &imagePathList=Config_getList(IMAGE_PATH);
s=imagePathList.first();
while (s)
{
@@ -10791,7 +10800,7 @@ void searchInputFiles()
g_s.end();
g_s.begin("Searching for dot files...\n");
- QStrList &dotFileList=Config_getList("DOTFILE_DIRS");
+ QStrList &dotFileList=Config_getList(DOTFILE_DIRS);
s=dotFileList.first();
while (s)
{
@@ -10803,7 +10812,7 @@ void searchInputFiles()
g_s.end();
g_s.begin("Searching for msc files...\n");
- QStrList &mscFileList=Config_getList("MSCFILE_DIRS");
+ QStrList &mscFileList=Config_getList(MSCFILE_DIRS);
s=mscFileList.first();
while (s)
{
@@ -10815,7 +10824,7 @@ void searchInputFiles()
g_s.end();
g_s.begin("Searching for dia files...\n");
- QStrList &diaFileList=Config_getList("DIAFILE_DIRS");
+ QStrList &diaFileList=Config_getList(DIAFILE_DIRS);
s=diaFileList.first();
while (s)
{
@@ -10827,11 +10836,11 @@ void searchInputFiles()
g_s.end();
g_s.begin("Searching for files to exclude\n");
- QStrList &excludeList = Config_getList("EXCLUDE");
+ QStrList &excludeList = Config_getList(EXCLUDE);
s=excludeList.first();
while (s)
{
- readFileOrDirectory(s,0,0,0,&Config_getList("FILE_PATTERNS"),
+ readFileOrDirectory(s,0,0,0,&Config_getList(FILE_PATTERNS),
0,0,&excludeNameDict,
alwaysRecursive,
FALSE);
@@ -10845,7 +10854,7 @@ void searchInputFiles()
g_s.begin("Searching INPUT for files to process...\n");
QDict<void> *killDict = new QDict<void>(10007);
- QStrList &inputList=Config_getList("INPUT");
+ QStrList &inputList=Config_getList(INPUT);
g_inputFiles.setAutoDelete(TRUE);
s=inputList.first();
while (s)
@@ -10862,7 +10871,7 @@ void searchInputFiles()
Doxygen::inputNameList,
Doxygen::inputNameDict,
&excludeNameDict,
- &Config_getList("FILE_PATTERNS"),
+ &Config_getList(FILE_PATTERNS),
&exclPatterns,
&g_inputFiles,0,
alwaysRecursive,
@@ -10885,7 +10894,7 @@ void parseInput()
/**************************************************************************
* Make sure the output directory exists
**************************************************************************/
- QCString &outputDirectory = Config_getString("OUTPUT_DIRECTORY");
+ QCString &outputDirectory = Config_getString(OUTPUT_DIRECTORY);
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath().utf8();
@@ -10920,7 +10929,7 @@ void parseInput()
Doxygen::symbolStorage = new Store;
// also scale lookup cache with SYMBOL_CACHE_SIZE
- int cacheSize = Config_getInt("LOOKUP_CACHE_SIZE");
+ int cacheSize = Config_getInt(LOOKUP_CACHE_SIZE);
if (cacheSize<0) cacheSize=0;
if (cacheSize>9) cacheSize=9;
uint lookupSize = 65536 << cacheSize;
@@ -10950,43 +10959,43 @@ void parseInput()
**************************************************************************/
QCString htmlOutput;
- bool &generateHtml = Config_getBool("GENERATE_HTML");
+ bool &generateHtml = Config_getBool(GENERATE_HTML);
if (generateHtml || g_useOutputTemplate /* TODO: temp hack */)
- htmlOutput = createOutputDirectory(outputDirectory,"HTML_OUTPUT","/html");
+ htmlOutput = createOutputDirectory(outputDirectory,Config_getString(HTML_OUTPUT),"/html");
QCString docbookOutput;
- bool &generateDocbook = Config_getBool("GENERATE_DOCBOOK");
+ bool &generateDocbook = Config_getBool(GENERATE_DOCBOOK);
if (generateDocbook)
- docbookOutput = createOutputDirectory(outputDirectory,"DOCBOOK_OUTPUT","/docbook");
+ docbookOutput = createOutputDirectory(outputDirectory,Config_getString(DOCBOOK_OUTPUT),"/docbook");
QCString xmlOutput;
- bool &generateXml = Config_getBool("GENERATE_XML");
+ bool &generateXml = Config_getBool(GENERATE_XML);
if (generateXml)
- xmlOutput = createOutputDirectory(outputDirectory,"XML_OUTPUT","/xml");
+ xmlOutput = createOutputDirectory(outputDirectory,Config_getString(XML_OUTPUT),"/xml");
QCString latexOutput;
- bool &generateLatex = Config_getBool("GENERATE_LATEX");
+ bool &generateLatex = Config_getBool(GENERATE_LATEX);
if (generateLatex)
- latexOutput = createOutputDirectory(outputDirectory,"LATEX_OUTPUT","/latex");
+ latexOutput = createOutputDirectory(outputDirectory,Config_getString(LATEX_OUTPUT),"/latex");
QCString rtfOutput;
- bool &generateRtf = Config_getBool("GENERATE_RTF");
+ bool &generateRtf = Config_getBool(GENERATE_RTF);
if (generateRtf)
- rtfOutput = createOutputDirectory(outputDirectory,"RTF_OUTPUT","/rtf");
+ rtfOutput = createOutputDirectory(outputDirectory,Config_getString(RTF_OUTPUT),"/rtf");
QCString manOutput;
- bool &generateMan = Config_getBool("GENERATE_MAN");
+ bool &generateMan = Config_getBool(GENERATE_MAN);
if (generateMan)
- manOutput = createOutputDirectory(outputDirectory,"MAN_OUTPUT","/man");
+ manOutput = createOutputDirectory(outputDirectory,Config_getString(MAN_OUTPUT),"/man");
//QCString sqlOutput;
- //bool &generateSql = Config_getBool("GENERATE_SQLITE3");
+ //bool &generateSql = Config_getBool(GENERATE_SQLITE3);
//if (generateSql)
// sqlOutput = createOutputDirectory(outputDirectory,"SQLITE3_OUTPUT","/sqlite3");
- if (Config_getBool("HAVE_DOT"))
+ if (Config_getBool(HAVE_DOT))
{
- QCString curFontPath = Config_getString("DOT_FONTPATH");
+ QCString curFontPath = Config_getString(DOT_FONTPATH);
if (curFontPath.isEmpty())
{
portable_getenv("DOTFONTPATH");
@@ -11011,7 +11020,7 @@ void parseInput()
**************************************************************************/
LayoutDocManager::instance().init();
- QCString &layoutFileName = Config_getString("LAYOUT_FILE");
+ QCString &layoutFileName = Config_getString(LAYOUT_FILE);
bool defaultLayoutUsed = FALSE;
if (layoutFileName.isEmpty())
{
@@ -11037,7 +11046,7 @@ void parseInput()
**************************************************************************/
// prevent search in the output directories
- QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
+ QStrList &exclPatterns = Config_getList(EXCLUDE_PATTERNS);
if (generateHtml) exclPatterns.append(htmlOutput);
if (generateDocbook) exclPatterns.append(docbookOutput);
if (generateXml) exclPatterns.append(xmlOutput);
@@ -11049,7 +11058,7 @@ void parseInput()
// Notice: the order of the function calls below is very important!
- if (Config_getBool("GENERATE_HTML"))
+ if (Config_getBool(GENERATE_HTML))
{
readFormulaRepository();
}
@@ -11071,7 +11080,7 @@ void parseInput()
rootNav->setEntry(root);
msg("Reading and parsing tag files\n");
- QStrList &tagFileList = Config_getList("TAGFILES");
+ QStrList &tagFileList = Config_getList(TAGFILES);
char *s=tagFileList.first();
while (s)
{
@@ -11084,7 +11093,7 @@ void parseInput()
* Parse source files *
**************************************************************************/
- if (Config_getBool("BUILTIN_STL_SUPPORT"))
+ if (Config_getBool(BUILTIN_STL_SUPPORT))
{
addSTLClasses(rootNav);
}
@@ -11210,7 +11219,7 @@ void parseInput()
findUsedTemplateInstances();
g_s.end();
- if (Config_getBool("INLINE_SIMPLE_STRUCTS"))
+ if (Config_getBool(INLINE_SIMPLE_STRUCTS))
{
g_s.begin("Searching for tag less structs...\n");
findTagLessClasses();
@@ -11221,14 +11230,10 @@ void parseInput()
flushCachedTemplateRelations();
g_s.end();
- g_s.begin("Creating members for template instances...\n");
- createTemplateInstanceMembers();
- g_s.end();
-
g_s.begin("Computing class relations...\n");
computeTemplateClassRelations();
flushUnresolvedRelations();
- if (Config_getBool("OPTIMIZE_OUTPUT_VHDL"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
{
VhdlDocGen::computeVhdlComponentRelations();
}
@@ -11249,6 +11254,12 @@ void parseInput()
transferFunctionDocumentation();
g_s.end();
+ // moved to after finding and copying documentation,
+ // as this introduces new members see bug 722654
+ g_s.begin("Creating members for template instances...\n");
+ createTemplateInstanceMembers();
+ g_s.end();
+
g_s.begin("Building page list...\n");
buildPageList(rootNav);
g_s.end();
@@ -11300,7 +11311,7 @@ void parseInput()
addMembersToMemberGroup();
g_s.end();
- if (Config_getBool("DISTRIBUTE_GROUP_DOC"))
+ if (Config_getBool(DISTRIBUTE_GROUP_DOC))
{
g_s.begin("Distributing member group documentation.\n");
distributeMemberGroupDocumentation();
@@ -11311,7 +11322,7 @@ void parseInput()
computeMemberReferences();
g_s.end();
- if (Config_getBool("INHERIT_DOCS"))
+ if (Config_getBool(INHERIT_DOCS))
{
g_s.begin("Inheriting documentation...\n");
inheritDocumentation();
@@ -11337,7 +11348,7 @@ void parseInput()
sortMemberLists();
g_s.end();
- if (Config_getBool("DIRECTORY_GRAPH"))
+ if (Config_getBool(DIRECTORY_GRAPH))
{
g_s.begin("Computing dependencies between directories...\n");
computeDirDependencies();
@@ -11394,10 +11405,10 @@ void generateOutput()
initSearchIndexer();
- bool generateHtml = Config_getBool("GENERATE_HTML");
- bool generateLatex = Config_getBool("GENERATE_LATEX");
- bool generateMan = Config_getBool("GENERATE_MAN");
- bool generateRtf = Config_getBool("GENERATE_RTF");
+ bool generateHtml = Config_getBool(GENERATE_HTML);
+ bool generateLatex = Config_getBool(GENERATE_LATEX);
+ bool generateMan = Config_getBool(GENERATE_MAN);
+ bool generateRtf = Config_getBool(GENERATE_RTF);
g_outputList = new OutputList(TRUE);
@@ -11407,11 +11418,11 @@ void generateOutput()
HtmlGenerator::init();
// add HTML indexers that are enabled
- bool generateHtmlHelp = Config_getBool("GENERATE_HTMLHELP");
- bool generateEclipseHelp = Config_getBool("GENERATE_ECLIPSEHELP");
- bool generateQhp = Config_getBool("GENERATE_QHP");
- bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
- bool generateDocSet = Config_getBool("GENERATE_DOCSET");
+ bool generateHtmlHelp = Config_getBool(GENERATE_HTMLHELP);
+ bool generateEclipseHelp = Config_getBool(GENERATE_ECLIPSEHELP);
+ bool generateQhp = Config_getBool(GENERATE_QHP);
+ bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ bool generateDocSet = Config_getBool(GENERATE_DOCSET);
if (generateEclipseHelp) Doxygen::indexList->addIndex(new EclipseHelp);
if (generateHtmlHelp) Doxygen::indexList->addIndex(new HtmlHelp);
if (generateQhp) Doxygen::indexList->addIndex(new Qhp);
@@ -11435,10 +11446,10 @@ void generateOutput()
g_outputList->add(new RTFGenerator);
RTFGenerator::init();
}
- if (Config_getBool("USE_HTAGS"))
+ if (Config_getBool(USE_HTAGS))
{
Htags::useHtags = TRUE;
- QCString htmldir = Config_getString("HTML_OUTPUT");
+ QCString htmldir = Config_getString(HTML_OUTPUT);
if (!Htags::execute(htmldir))
err("USE_HTAGS is YES but htags(1) failed. \n");
if (!Htags::loadFilemap(htmldir))
@@ -11449,17 +11460,17 @@ void generateOutput()
* Generate documentation *
**************************************************************************/
- if (generateHtml) writeDoxFont(Config_getString("HTML_OUTPUT"));
- if (generateLatex) writeDoxFont(Config_getString("LATEX_OUTPUT"));
- if (generateRtf) writeDoxFont(Config_getString("RTF_OUTPUT"));
+ if (generateHtml) writeDoxFont(Config_getString(HTML_OUTPUT));
+ if (generateLatex) writeDoxFont(Config_getString(LATEX_OUTPUT));
+ if (generateRtf) writeDoxFont(Config_getString(RTF_OUTPUT));
g_s.begin("Generating style sheet...\n");
//printf("writing style info\n");
g_outputList->writeStyleInfo(0); // write first part
g_s.end();
- static bool searchEngine = Config_getBool("SEARCHENGINE");
- static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
+ static bool searchEngine = Config_getBool(SEARCHENGINE);
+ static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
g_s.begin("Generating search indices...\n");
if (searchEngine && !serverBasedSearch && (generateHtml || g_useOutputTemplate))
@@ -11472,7 +11483,7 @@ void generateOutput()
// what categories we find in this function.
if (generateHtml && searchEngine)
{
- QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search";
+ QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search";
QDir searchDir(searchDirName);
if (!searchDir.exists() && !searchDir.mkdir(searchDirName))
{
@@ -11519,7 +11530,7 @@ void generateOutput()
generateNamespaceDocs();
g_s.end();
- if (Config_getBool("GENERATE_LEGEND"))
+ if (Config_getBool(GENERATE_LEGEND))
{
g_s.begin("Generating graph info page...\n");
writeGraphInfo(*g_outputList);
@@ -11531,14 +11542,14 @@ void generateOutput()
g_s.end();
if (Doxygen::formulaList->count()>0 && generateHtml
- && !Config_getBool("USE_MATHJAX"))
+ && !Config_getBool(USE_MATHJAX))
{
g_s.begin("Generating bitmaps for formulas in HTML...\n");
- Doxygen::formulaList->generateBitmaps(Config_getString("HTML_OUTPUT"));
+ Doxygen::formulaList->generateBitmaps(Config_getString(HTML_OUTPUT));
g_s.end();
}
- if (Config_getBool("SORT_GROUP_NAMES"))
+ if (Config_getBool(SORT_GROUP_NAMES))
{
Doxygen::groupSDict->sort();
GroupSDict::Iterator gli(*Doxygen::groupSDict);
@@ -11562,17 +11573,17 @@ void generateOutput()
writeTagFile();
g_s.end();
- if (Config_getBool("DOT_CLEANUP"))
+ if (Config_getBool(DOT_CLEANUP))
{
if (generateHtml)
- removeDoxFont(Config_getString("HTML_OUTPUT"));
+ removeDoxFont(Config_getString(HTML_OUTPUT));
if (generateRtf)
- removeDoxFont(Config_getString("RTF_OUTPUT"));
+ removeDoxFont(Config_getString(RTF_OUTPUT));
if (generateLatex)
- removeDoxFont(Config_getString("LATEX_OUTPUT"));
+ removeDoxFont(Config_getString(LATEX_OUTPUT));
}
- if (Config_getBool("GENERATE_XML"))
+ if (Config_getBool(GENERATE_XML))
{
g_s.begin("Generating XML output...\n");
Doxygen::generatingXmlOutput=TRUE;
@@ -11587,20 +11598,20 @@ void generateOutput()
g_s.end();
}
- if (Config_getBool("GENERATE_DOCBOOK"))
+ if (Config_getBool(GENERATE_DOCBOOK))
{
g_s.begin("Generating Docbook output...\n");
generateDocbook();
g_s.end();
}
- if (Config_getBool("GENERATE_AUTOGEN_DEF"))
+ if (Config_getBool(GENERATE_AUTOGEN_DEF))
{
g_s.begin("Generating AutoGen DEF output...\n");
generateDEF();
g_s.end();
}
- if (Config_getBool("GENERATE_PERLMOD"))
+ if (Config_getBool(GENERATE_PERLMOD))
{
g_s.begin("Generating Perl module output...\n");
generatePerlMod();
@@ -11612,19 +11623,19 @@ void generateOutput()
if (Doxygen::searchIndex->kind()==SearchIndexIntf::Internal) // write own search index
{
HtmlGenerator::writeSearchPage();
- Doxygen::searchIndex->write(Config_getString("HTML_OUTPUT")+"/search/search.idx");
+ Doxygen::searchIndex->write(Config_getString(HTML_OUTPUT)+"/search/search.idx");
}
else // write data for external search index
{
HtmlGenerator::writeExternalSearchPage();
- QCString searchDataFile = Config_getString("SEARCHDATA_FILE");
+ QCString searchDataFile = Config_getString(SEARCHDATA_FILE);
if (searchDataFile.isEmpty())
{
searchDataFile="searchdata.xml";
}
if (!portable_isAbsolutePath(searchDataFile))
{
- searchDataFile.prepend(Config_getString("OUTPUT_DIRECTORY")+"/");
+ searchDataFile.prepend(Config_getString(OUTPUT_DIRECTORY)+"/");
}
Doxygen::searchIndex->write(searchDataFile);
}
@@ -11636,14 +11647,14 @@ void generateOutput()
if (generateRtf)
{
g_s.begin("Combining RTF output...\n");
- if (!RTFGenerator::preProcessFileInplace(Config_getString("RTF_OUTPUT"),"refman.rtf"))
+ if (!RTFGenerator::preProcessFileInplace(Config_getString(RTF_OUTPUT),"refman.rtf"))
{
err("An error occurred during post-processing the RTF files!\n");
}
g_s.end();
}
- if (Config_getBool("HAVE_DOT"))
+ if (Config_getBool(HAVE_DOT))
{
g_s.begin("Running dot...\n");
DotManager::instance()->run();
@@ -11655,24 +11666,29 @@ void generateOutput()
{
FTVHelp::generateTreeViewImages();
copyStyleSheet();
- copyLogo();
- copyExtraFiles("HTML_EXTRA_FILES","HTML_OUTPUT");
+ copyLogo(Config_getString(HTML_OUTPUT));
+ copyExtraFiles(Config_getList(HTML_EXTRA_FILES),"HTML_EXTRA_FILES",Config_getString(HTML_OUTPUT));
}
if (generateLatex)
{
copyLatexStyleSheet();
- copyExtraFiles("LATEX_EXTRA_FILES","LATEX_OUTPUT");
+ copyLogo(Config_getString(LATEX_OUTPUT));
+ copyExtraFiles(Config_getList(LATEX_EXTRA_FILES),"LATEX_EXTRA_FILES",Config_getString(LATEX_OUTPUT));
+ }
+ if (generateRtf)
+ {
+ copyLogo(Config_getString(RTF_OUTPUT));
}
if (generateHtml &&
- Config_getBool("GENERATE_HTMLHELP") &&
- !Config_getString("HHC_LOCATION").isEmpty())
+ Config_getBool(GENERATE_HTMLHELP) &&
+ !Config_getString(HHC_LOCATION).isEmpty())
{
g_s.begin("Running html help compiler...\n");
QString oldDir = QDir::currentDirPath();
- QDir::setCurrent(Config_getString("HTML_OUTPUT"));
+ QDir::setCurrent(Config_getString(HTML_OUTPUT));
portable_sysTimerStart();
- if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", Debug::isFlagSet(Debug::ExtCmd)))
+ if (portable_system(Config_getString(HHC_LOCATION), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1)
{
err("failed to run html help compiler on index.hhp\n");
}
@@ -11681,8 +11697,8 @@ void generateOutput()
g_s.end();
}
if ( generateHtml &&
- Config_getBool("GENERATE_QHP") &&
- !Config_getString("QHG_LOCATION").isEmpty())
+ Config_getBool(GENERATE_QHP) &&
+ !Config_getString(QHG_LOCATION).isEmpty())
{
g_s.begin("Running qhelpgenerator...\n");
QCString const qhpFileName = Qhp::getQhpFileName();
@@ -11690,9 +11706,9 @@ void generateOutput()
QCString const args = QCString().sprintf("%s -o \"%s\"", qhpFileName.data(), qchFileName.data());
QString const oldDir = QDir::currentDirPath();
- QDir::setCurrent(Config_getString("HTML_OUTPUT"));
+ QDir::setCurrent(Config_getString(HTML_OUTPUT));
portable_sysTimerStart();
- if (portable_system(Config_getString("QHG_LOCATION"), args.data(), FALSE))
+ if (portable_system(Config_getString(QHG_LOCATION), args.data(), FALSE))
{
err("failed to run qhelpgenerator on index.qhp\n");
}
@@ -11708,7 +11724,7 @@ void generateOutput()
Doxygen::lookupCache->hits(),
Doxygen::lookupCache->misses());
cacheParam = computeIdealCacheParam(Doxygen::lookupCache->misses()*2/3); // part of the cache is flushed, hence the 2/3 correction factor
- if (cacheParam>Config_getInt("LOOKUP_CACHE_SIZE"))
+ if (cacheParam>Config_getInt(LOOKUP_CACHE_SIZE))
{
msg("Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
}
@@ -11737,7 +11753,7 @@ void generateOutput()
Doxygen::symbolStorage->close();
QDir thisDir;
thisDir.remove(Doxygen::objDBFileName);
- Config::deleteInstance();
+ Config::deinit();
QTextCodec::deleteAllCodecs();
delete Doxygen::symbolMap;
delete Doxygen::clangUsrMap;
diff --git a/src/doxygen.h b/src/doxygen.h
index 2195a35..b3467c1 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -1,8 +1,5 @@
/******************************************************************************
*
- *
- *
- *
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp
index db5ed4f..bf150b4 100644
--- a/src/eclipsehelp.cpp
+++ b/src/eclipsehelp.cpp
@@ -64,11 +64,11 @@ void EclipseHelp::openedTag()
void EclipseHelp::initialize()
{
// -- read path prefix from the configuration
- //m_pathprefix = Config_getString("ECLIPSE_PATHPREFIX");
+ //m_pathprefix = Config_getString(ECLIPSE_PATHPREFIX);
//if (m_pathprefix.isEmpty()) m_pathprefix = "html/";
// -- open the contents file
- QCString name = Config_getString("HTML_OUTPUT") + "/toc.xml";
+ QCString name = Config_getString(HTML_OUTPUT) + "/toc.xml";
m_tocfile = new QFile(name);
if (!m_tocfile->open(IO_WriteOnly))
{
@@ -81,7 +81,7 @@ void EclipseHelp::initialize()
//m_tocstream.setEncoding(FTextStream::UnicodeUTF8);
// -- write the opening tag
- QCString title = Config_getString("PROJECT_NAME");
+ QCString title = Config_getString(PROJECT_NAME);
if (title.isEmpty())
{
title = "Doxygen generated documentation";
@@ -111,11 +111,11 @@ void EclipseHelp::finalize()
m_tocfile->close();
delete m_tocfile; m_tocfile = 0;
- QCString name = Config_getString("HTML_OUTPUT") + "/plugin.xml";
+ QCString name = Config_getString(HTML_OUTPUT) + "/plugin.xml";
QFile pluginFile(name);
if (pluginFile.open(IO_WriteOnly))
{
- QString docId = Config_getString("ECLIPSE_DOC_ID");
+ QString docId = Config_getString(ECLIPSE_DOC_ID);
FTextStream t(&pluginFile);
t << "<plugin name=\"" << docId << "\" id=\"" << docId << "\"" << endl;
t << " version=\"1.0.0\" provider-name=\"Doxygen\">" << endl;
diff --git a/src/entry.cpp b/src/entry.cpp
index bf45f87..9d15ec8 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -216,8 +216,8 @@ void Entry::addSubEntry(Entry *current)
void Entry::reset()
{
- static bool entryCallGraph = Config_getBool("CALL_GRAPH");
- static bool entryCallerGraph = Config_getBool("CALLER_GRAPH");
+ static bool entryCallGraph = Config_getBool(CALL_GRAPH);
+ static bool entryCallerGraph = Config_getBool(CALLER_GRAPH);
//printf("Entry::reset()\n");
name.resize(0);
type.resize(0);
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 2a09c41..2cfe37a 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -82,9 +82,8 @@ FileDef::FileDef(const char *p,const char *nm,
m_path=p;
m_filePath=m_path+nm;
m_fileName=nm;
- m_diskName=dn;
- if (m_diskName.isEmpty()) m_diskName=nm;
setReference(lref);
+ setDiskName(dn?dn:nm);
m_classSDict = 0;
m_includeList = 0;
m_includeDict = 0;
@@ -99,14 +98,14 @@ FileDef::FileDef(const char *p,const char *nm,
m_isSource = guessSection(nm)==Entry::SOURCE_SEC;
m_docname = nm;
m_dir = 0;
- if (Config_getBool("FULL_PATH_NAMES"))
+ if (Config_getBool(FULL_PATH_NAMES))
{
m_docname.prepend(stripFromPath(m_path.copy()));
}
setLanguage(getLanguageFromFileName(name()));
m_memberGroupSDict = 0;
acquireFileVersion();
- m_subGrouping=Config_getBool("SUBGROUPING");
+ m_subGrouping=Config_getBool(SUBGROUPING);
}
/*! destroy the file definition */
@@ -125,6 +124,22 @@ FileDef::~FileDef()
delete m_memberGroupSDict;
}
+void FileDef::setDiskName(const QCString &name)
+{
+ if (isReference())
+ {
+ m_outputDiskName = name;
+ m_inclDepFileName = name+"_incl";
+ m_inclByDepFileName = name+"_dep_incl";
+ }
+ else
+ {
+ m_outputDiskName = convertNameToFile(name);
+ m_inclDepFileName = convertNameToFile(name+"_incl");
+ m_inclByDepFileName = convertNameToFile(name+"_dep_incl");
+ }
+}
+
/*! Compute the HTML anchor names for all members in the class */
void FileDef::computeAnchors()
{
@@ -172,8 +187,8 @@ void FileDef::findSectionsInDocumentation()
bool FileDef::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
- static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().stripWhiteSpace().isEmpty() || // avail empty section
(sourceBrowser && getStartBodyLine()!=-1 && getBodyDef())
@@ -303,11 +318,11 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.endGroupHeader();
ol.startTextBlock();
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
}
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
+ if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
{
ol.pushGeneratorState();
@@ -325,20 +340,20 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
}
//printf("Writing source ref for file %s\n",name().data());
- if (Config_getBool("SOURCE_BROWSER"))
+ if (Config_getBool(SOURCE_BROWSER))
{
//if Latex enabled and LATEX_SOURCE_CODE isn't -> skip, bug_738548
ol.pushGeneratorState();
- if (ol.isEnabled(OutputGenerator::Latex) && !Config_getBool("LATEX_SOURCE_CODE"))
+ if (ol.isEnabled(OutputGenerator::Latex) && !Config_getBool(LATEX_SOURCE_CODE))
{
ol.disable(OutputGenerator::Latex);
}
- if (ol.isEnabled(OutputGenerator::RTF) && !Config_getBool("RTF_SOURCE_CODE"))
+ if (ol.isEnabled(OutputGenerator::RTF) && !Config_getBool(RTF_SOURCE_CODE))
{
ol.disable(OutputGenerator::RTF);
}
- ol.startParagraph();
+ ol.startParagraph("definition");
QCString refText = theTranslator->trDefinedInSourceFile();
int fileMarkerPos = refText.find("@0");
if (fileMarkerPos!=-1) // should always pass this.
@@ -349,6 +364,10 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
+ else
+ {
+ err("translation error: invalid marker in trDefinedInSourceFile()\n");
+ }
ol.endParagraph();
//Restore settings, bug_738548
ol.popGeneratorState();
@@ -359,7 +378,7 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
void FileDef::writeBriefDescription(OutputList &ol)
{
- if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (hasBriefDescription())
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
@@ -367,13 +386,17 @@ void FileDef::writeBriefDescription(OutputList &ol)
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.writeString(" - ");
+ ol.popGeneratorState();
ol.writeDoc(rootNode,this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.writeString(" \n");
ol.enable(OutputGenerator::RTF);
- if (Config_getBool("REPEAT_BRIEF") ||
+ if (Config_getBool(REPEAT_BRIEF) ||
!documentation().isEmpty()
)
{
@@ -461,7 +484,7 @@ void FileDef::writeIncludeFiles(OutputList &ol)
void FileDef::writeIncludeGraph(OutputList &ol)
{
- if (Config_getBool("HAVE_DOT") /*&& Config_getBool("INCLUDE_GRAPH")*/)
+ if (Config_getBool(HAVE_DOT) /*&& Config_getBool(INCLUDE_GRAPH)*/)
{
//printf("Graph for file %s\n",name().data());
DotInclDepGraph incDepGraph(this,FALSE);
@@ -479,13 +502,13 @@ void FileDef::writeIncludeGraph(OutputList &ol)
ol.enableAll();
ol.endTextBlock(TRUE);
}
- //incDepGraph.writeGraph(Config_getString("HTML_OUTPUT"),fd->getOutputFileBase());
+ //incDepGraph.writeGraph(Config_getString(HTML_OUTPUT),fd->getOutputFileBase());
}
}
void FileDef::writeIncludedByGraph(OutputList &ol)
{
- if (Config_getBool("HAVE_DOT") /*&& Config_getBool("INCLUDED_BY_GRAPH")*/)
+ if (Config_getBool(HAVE_DOT) /*&& Config_getBool(INCLUDED_BY_GRAPH)*/)
{
//printf("Graph for file %s\n",name().data());
DotInclDepGraph incDepGraph(this,TRUE);
@@ -503,7 +526,7 @@ void FileDef::writeIncludedByGraph(OutputList &ol)
ol.enableAll();
ol.endTextBlock(TRUE);
}
- //incDepGraph.writeGraph(Config_getString("HTML_OUTPUT"),fd->getOutputFileBase());
+ //incDepGraph.writeGraph(Config_getString(HTML_OUTPUT),fd->getOutputFileBase());
}
}
@@ -561,7 +584,7 @@ void FileDef::endMemberDeclarations(OutputList &ol)
void FileDef::startMemberDocumentation(OutputList &ol)
{
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.disable(OutputGenerator::Html);
Doxygen::suppressDocWarnings = TRUE;
@@ -570,7 +593,7 @@ void FileDef::startMemberDocumentation(OutputList &ol)
void FileDef::endMemberDocumentation(OutputList &ol)
{
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.enable(OutputGenerator::Html);
Doxygen::suppressDocWarnings = FALSE;
@@ -604,7 +627,7 @@ void FileDef::writeAuthorSection(OutputList &ol)
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
- ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
+ ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
ol.popGeneratorState();
}
@@ -653,11 +676,11 @@ void FileDef::writeSummaryLinks(OutputList &ol)
*/
void FileDef::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
//funcList->countDecMembers();
//QCString fn = name();
- //if (Config_getBool("FULL_PATH_NAMES"))
+ //if (Config_getBool(FULL_PATH_NAMES))
//{
// fn.prepend(stripFromPath(getPath().copy()));
//}
@@ -839,7 +862,7 @@ void FileDef::writeDocumentation(OutputList &ol)
endFileWithNavPath(this,ol);
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
MemberList *ml = getMemberList(MemberListType_allMembersList);
if (ml) ml->sort();
@@ -867,7 +890,7 @@ void FileDef::writeMemberPages(OutputList &ol)
void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
- static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
+ static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
@@ -911,10 +934,10 @@ void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
/*! Write a source listing of this file to the output */
void FileDef::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
- static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
- static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
- static bool rtfSourceCode = Config_getBool("RTF_SOURCE_CODE");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
+ static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE);
+ static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE);
DevNullCodeDocInterface devNullIntf;
QCString title = m_docname;
if (!m_fileVersion.isEmpty())
@@ -967,7 +990,7 @@ void FileDef::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu)
(void)sameTu;
(void)filesInSameTu;
#if USE_LIBCLANG
- static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (clangAssistedParsing &&
(getLanguage()==SrcLangExt_Cpp || getLanguage()==SrcLangExt_ObjC))
{
@@ -1026,12 +1049,12 @@ void FileDef::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu)
void FileDef::parseSource(bool sameTu,QStrList &filesInSameTu)
{
- static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
+ static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
DevNullCodeDocInterface devNullIntf;
(void)sameTu;
(void)filesInSameTu;
#if USE_LIBCLANG
- static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING");
+ static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (clangAssistedParsing &&
(getLanguage()==SrcLangExt_Cpp || getLanguage()==SrcLangExt_ObjC))
{
@@ -1158,7 +1181,7 @@ void FileDef::insertClass(ClassDef *cd)
{
m_classSDict = new ClassSDict(17);
}
- if (Config_getBool("SORT_BRIEF_DOCS"))
+ if (Config_getBool(SORT_BRIEF_DOCS))
{
m_classSDict->inSort(cd->name(),cd);
}
@@ -1179,7 +1202,7 @@ void FileDef::insertNamespace(NamespaceDef *nd)
{
m_namespaceSDict = new NamespaceSDict;
}
- if (Config_getBool("SORT_BRIEF_DOCS"))
+ if (Config_getBool(SORT_BRIEF_DOCS))
{
m_namespaceSDict->inSort(nd->name(),nd);
}
@@ -1192,7 +1215,7 @@ void FileDef::insertNamespace(NamespaceDef *nd)
QCString FileDef::name() const
{
- if (Config_getBool("FULL_PATH_NAMES"))
+ if (Config_getBool(FULL_PATH_NAMES))
return m_fileName;
else
return Definition::name();
@@ -1395,8 +1418,8 @@ bool FileDef::isIncluded(const QCString &name) const
bool FileDef::generateSourceFile() const
{
- static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
- static bool verbatimHeaders = Config_getBool("VERBATIM_HEADERS");
+ static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ static bool verbatimHeaders = Config_getBool(VERBATIM_HEADERS);
QCString extension = name().right(4);
return !isReference() &&
(sourceBrowser ||
@@ -1736,7 +1759,7 @@ bool FileDef::isDocumentationFile() const
void FileDef::acquireFileVersion()
{
- QCString vercmd = Config_getString("FILE_VERSION_FILTER");
+ QCString vercmd = Config_getString(FILE_VERSION_FILTER);
if (!vercmd.isEmpty() && !m_filePath.isEmpty() &&
m_filePath!="generated" && m_filePath!="graph_legend")
{
@@ -1769,17 +1792,22 @@ void FileDef::acquireFileVersion()
QCString FileDef::getSourceFileBase() const
-{
+{
if (Htags::useHtags)
{
return Htags::path2URL(m_filePath);
}
else
{
- return convertNameToFile(m_diskName)+"_source";
+ return m_outputDiskName+"_source";
}
}
+QCString FileDef::getOutputFileBase() const
+{
+ return m_outputDiskName;
+}
+
/*! Returns the name of the verbatim copy of this file (if any). */
QCString FileDef::includeName() const
{
@@ -1806,8 +1834,8 @@ MemberList *FileDef::createMemberList(MemberListType lt)
void FileDef::addMemberToList(MemberListType lt,MemberDef *md)
{
- static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
- static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
+ static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
MemberList *ml = createMemberList(lt);
ml->setNeedsSorting(
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
@@ -1852,7 +1880,7 @@ MemberList *FileDef::getMemberList(MemberListType lt) const
void FileDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title)
{
- static bool optVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool optVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
MemberList * ml = getMemberList(lt);
if (ml)
{
@@ -1876,8 +1904,8 @@ void FileDef::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QC
bool FileDef::isLinkableInProject() const
{
- static bool showFiles = Config_getBool("SHOW_FILES");
- return hasDocumentation() && !isReference() && showFiles;
+ static bool showFiles = Config_getBool(SHOW_FILES);
+ return hasDocumentation() && !isReference() && (showFiles || isLinkableViaGroup());
}
static void getAllIncludeFilesRecursively(
@@ -1916,3 +1944,14 @@ QCString FileDef::fileVersion() const
{
return m_fileVersion;
}
+
+QCString FileDef::includeDependencyGraphFileName() const
+{
+ return m_inclDepFileName;
+}
+
+QCString FileDef::includedByDependencyGraphFileName() const
+{
+ return m_inclByDepFileName;
+}
+
diff --git a/src/filedef.h b/src/filedef.h
index 712128c..9167249 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -63,8 +63,6 @@ struct IncludeInfo
*/
class FileDef : public Definition
{
- friend class FileName;
-
public:
//enum FileType { Source, Header, Unknown };
@@ -80,17 +78,18 @@ class FileDef : public Definition
QCString displayName(bool=TRUE) const { return name(); }
QCString fileName() const { return m_fileName; }
- QCString getOutputFileBase() const
- { return convertNameToFile(m_diskName); }
+ QCString getOutputFileBase() const;
QCString anchor() const { return QCString(); }
- QCString getFileBase() const { return m_diskName; }
-
QCString getSourceFileBase() const;
/*! Returns the name of the verbatim copy of this file (if any). */
QCString includeName() const;
+
+ QCString includeDependencyGraphFileName() const;
+
+ QCString includedByDependencyGraphFileName() const;
/*! Returns the absolute path including the file name. */
QCString absFilePath() const { return m_filePath; }
@@ -153,8 +152,8 @@ class FileDef : public Definition
void writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu);
void parseSource(bool sameTu,QStrList &filesInSameTu);
void finishParsing();
+ void setDiskName(const QCString &name);
- friend void generatedFileNames();
void insertMember(MemberDef *md);
void insertClass(ClassDef *cd);
void insertNamespace(NamespaceDef *nd);
@@ -219,7 +218,9 @@ class FileDef : public Definition
SDict<Definition> *m_usingDeclList;
QCString m_path;
QCString m_filePath;
- QCString m_diskName;
+ QCString m_inclDepFileName;
+ QCString m_inclByDepFileName;
+ QCString m_outputDiskName;
QCString m_fileName;
QCString m_docname;
QIntDict<Definition> *m_srcDefDict;
diff --git a/src/filename.cpp b/src/filename.cpp
index aa51249..ae3b596 100644
--- a/src/filename.cpp
+++ b/src/filename.cpp
@@ -49,7 +49,7 @@ void FileName::generateDiskNames()
{
// name if unique, so diskname is simply the name
//printf("!!!!!!!! Unique disk name=%s for fd=%s\n",name.data(),fd->diskname.data());
- fd->m_diskName=name;
+ fd->setDiskName(name);
}
}
else if (count>1) // multiple occurrences of the same file name
@@ -62,21 +62,22 @@ void FileName::generateDiskNames()
for (it.toFirst();(fd=it.current()) && fd->isReference();++it) { }
if (fd)
{
- char c=fd->m_path.at(i);
+ char c=fd->getPath().at(i);
if (c=='/') j=i; // remember last position of dirname
++it;
while ((fd=it.current()) && !found)
{
+ QCString path = fd->getPath();
if (!fd->isReference())
{
//printf("i=%d j=%d fd->path=`%s' fd->name=`%s'\n",i,j,fd->path.left(i).data(),fd->name().data());
- if (i==(int)fd->m_path.length())
+ if (i==(int)path.length())
{
//warning("Input file %s found multiple times!\n"
// " The generated documentation for this file may not be correct!\n",fd->absFilePath().data());
found=TRUE;
}
- else if (fd->m_path[i]!=c)
+ else if (path[i]!=c)
{
found=TRUE;
}
@@ -91,10 +92,11 @@ void FileName::generateDiskNames()
//printf("fd->setName(%s)\n",(fd->path.right(fd->path.length()-j-1)+name).data());
if (!fd->isReference())
{
- QCString prefix = fd->m_path.right(fd->m_path.length()-j-1);
+ QCString path = fd->getPath();
+ QCString prefix = path.right(path.length()-j-1);
fd->setName(prefix+name);
- //printf("!!!!!!!! non unique disk name=%s for fd=%s\n",(prefix+name).data(),fd->diskname.data());
- fd->m_diskName=prefix+name;
+ //printf("!!!!!!!! non unique disk name=%s:%s\n",prefix.data(),name.data());
+ fd->setDiskName(prefix+name);
}
}
}
@@ -130,7 +132,7 @@ void FileNameList::generateDiskNames()
int FileNameList::compareValues(const FileName *f1, const FileName *f2) const
{
- return Config_getBool("FULL_PATH_NAMES") ?
+ return Config_getBool(FULL_PATH_NAMES) ?
qstricmp(f1->fullName(),f2->fullName()) :
qstricmp(f1->fileName(),f2->fileName());
}
@@ -142,7 +144,7 @@ FileNameListIterator::FileNameListIterator(const FileNameList &fnlist) :
static bool getCaseSenseNames()
{
- static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES");
+ static bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
return caseSenseNames;
}
diff --git a/src/fileparser.cpp b/src/fileparser.cpp
index b54b243..6883622 100644
--- a/src/fileparser.cpp
+++ b/src/fileparser.cpp
@@ -22,7 +22,7 @@ void FileParser::parseCode(CodeOutputInterface &codeOutIntf,
SrcLangExt, // lang
bool, // isExampleBlock
const char *, // exampleName
- FileDef *, // fileDef
+ FileDef * fileDef,
int startLine,
int endLine,
bool, // inlineFragment
@@ -40,8 +40,8 @@ void FileParser::parseCode(CodeOutputInterface &codeOutIntf,
int j=i;
while (j<length && input[j]!='\n') j++;
QCString lineStr = input.mid(i,j-i);
- codeOutIntf.startCodeLine(showLineNumbers);
- if (showLineNumbers) codeOutIntf.writeLineNumber(0,0,0,lineNr);
+ codeOutIntf.startCodeLine(fileDef != 0 && showLineNumbers);
+ if (fileDef != 0 && showLineNumbers) codeOutIntf.writeLineNumber(0,0,0,lineNr);
if (!lineStr.isEmpty()) codeOutIntf.codify(lineStr);
codeOutIntf.endCodeLine();
lineNr++;
diff --git a/src/formula.cpp b/src/formula.cpp
index 182ddaa..6fe617d 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -67,15 +67,10 @@ void FormulaList::generateBitmaps(const char *path)
if (f.open(IO_WriteOnly))
{
FTextStream t(&f);
- if (Config_getBool("LATEX_BATCHMODE")) t << "\\batchmode" << endl;
+ if (Config_getBool(LATEX_BATCHMODE)) t << "\\batchmode" << endl;
t << "\\documentclass{article}" << endl;
t << "\\usepackage{epsfig}" << endl; // for those who want to include images
- const char *s=Config_getList("EXTRA_PACKAGES").first();
- while (s)
- {
- t << "\\usepackage{" << s << "}\n";
- s=Config_getList("EXTRA_PACKAGES").next();
- }
+ writeExtraLatexPackages(t);
t << "\\pagestyle{empty}" << endl;
t << "\\begin{document}" << endl;
int page=0;
@@ -101,7 +96,7 @@ void FormulaList::generateBitmaps(const char *path)
{
//printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null");
- QCString latexCmd = Config_getString("LATEX_CMD_NAME");
+ QCString latexCmd = Config_getString(LATEX_CMD_NAME);
if (latexCmd.isEmpty()) latexCmd="latex";
portable_sysTimerStart();
if (portable_system(latexCmd,"_formulas.tex")!=0)
@@ -173,7 +168,7 @@ void FormulaList::generateBitmaps(const char *path)
// scale the image so that it is four times larger than needed.
// and the sizes are a multiple of four.
double scaleFactor = 16.0/3.0;
- int zoomFactor = Config_getInt("FORMULA_FONTSIZE");
+ int zoomFactor = Config_getInt(FORMULA_FONTSIZE);
if (zoomFactor<8 || zoomFactor>50) zoomFactor=10;
scaleFactor *= zoomFactor/10.0;
int gx = (((int)((x2-x1)*scaleFactor))+3)&~1;
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 82e78c1..e002b57 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -24,6 +24,9 @@
- references to variables
**/
%option never-interactive
+%option case-insensitive
+%option prefix="fortrancodeYY"
+
%{
/*
@@ -356,7 +359,7 @@ static void codifyLines(QCString str)
static void writeMultiLineCodeLink(CodeOutputInterface &ol,
Definition *d,const char *text)
{
- static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS");
+ static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance()->addTooltip(d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
@@ -484,7 +487,7 @@ static bool getFortranDefs(const QCString &memberName, const QCString &moduleNam
if (mn) // name is known
{
- MemberListIterator mli(*mn);
+ MemberNameIterator mli(*mn);
for (mli.toFirst();(md=mli.current());++mli) // all found functions with given name
{
FileDef *fd=md->getFileDef();
@@ -925,7 +928,12 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
startScope();
generateLink(*g_code,yytext);
}
-<Subprog>"(".* { // ignore rest of line
+<Subprog>"result"/{BS}"("[^)]*")" {
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
+ }
+<Subprog>"("[^)]*")" { // ignore rest of line
codifyLines(yytext);
}
<Subprog,Subprogend>"\n" { codifyLines(yytext);
@@ -1086,7 +1094,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
}
<DocBlock>"\n" { // comment block ends at the end of this line
// remove special comment (default config)
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_yyLineNr+=((QCString)docBlock).contains('\n');
g_yyLineNr+=1;
@@ -1123,6 +1131,16 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
codifyLines(yytext);
endFontClass();
}
+<*>"assignment"/{BS}"("{BS}"="{BS}")" {
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
+ }
+<*>"operator"/{BS}"("[^)]*")" {
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
+ }
/*------ preprocessor --------------------------------------------*/
<Start>"#".*\n {
@@ -1206,7 +1224,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
}
<*><<EOF>> {
if (YY_START == DocBlock) {
- if (!Config_getBool("STRIP_CODE_COMMENTS"))
+ if (!Config_getBool(STRIP_CODE_COMMENTS))
{
startFontClass("comment");
codifyLines(docBlock);
@@ -1248,16 +1266,17 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri
g_needsTermination = FALSE;
g_searchCtx = searchCtx;
g_collectXRefs = collectXRefs;
- if (endLine!=-1)
- g_inputLines = endLine+1;
- else
- g_inputLines = countLines();
-
if (startLine!=-1)
g_yyLineNr = startLine;
else
g_yyLineNr = 1;
+ if (endLine!=-1)
+ g_inputLines = endLine+1;
+ else
+ g_inputLines = g_yyLineNr + countLines() - 1;
+
+
g_exampleBlock = exBlock;
g_exampleName = exName;
g_sourceFileDef = fd;
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index bd1fe83..2f5567a 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -38,6 +38,9 @@
* - Must track yyLineNr when using REJECT, unput() or similar commands.
*/
%option never-interactive
+%option case-insensitive
+%option prefix="fortranscannerYY"
+
%{
#include <stdio.h>
@@ -214,7 +217,7 @@ static bool endScope(Entry *scope, bool isGlobalRoot=FALSE);
//static bool isTypeName(QCString name);
static void resolveModuleProcedures(QList<Entry> &moduleProcedures, Entry *current_root);
static int getAmpersandAtTheStart(const char *buf, int length);
-static int getAmpOrExclAtTheEnd(const char *buf, int length);
+static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch);
static void truncatePrepass(int index);
static void pushBuffer(QCString &buffer);
static void popBuffer();
@@ -322,13 +325,19 @@ SCOPENAME ({ID}{BS}"::"{BS})*
/*-----------------------------------------------------------------------------------*/
+<Prepass>^{BS}[&]*{BS}!.*\n { /* skip lines with just comment. Note code was in free format or has been converted to it */
+ lineCountPrepass ++;
+ }
+<Prepass>^{BS}\n { /* skip empty lines */
+ lineCountPrepass ++;
+ }
<*>^.*\n { // prepass: look for line continuations
functionLine = FALSE;
DBG_CTX((stderr, "---%s", yytext));
int indexStart = getAmpersandAtTheStart(yytext, (int)yyleng);
- int indexEnd = getAmpOrExclAtTheEnd(yytext, (int)yyleng);
+ int indexEnd = getAmpOrExclAtTheEnd(yytext, (int)yyleng, '\0');
if (indexEnd>=0 && yytext[indexEnd]!='&') //we are only interested in amp
indexEnd=-1;
@@ -686,9 +695,12 @@ private {
// in a scope of their own, even if multiple
// are group in one INTERFACE/END INTERFACE block.
//
- last_entry->endBodyLine = yyLineNr - 1;
if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
+ {
endScope(current_root);
+ last_entry->endBodyLine = yyLineNr - 1;
+ }
+ current_root->endBodyLine = yyLineNr - 1;
if (!endScope(current_root))
yyterminate();
@@ -1071,7 +1083,7 @@ private {
current->docLine = yyLineNr;
docBlockJavaStyle = FALSE;
docBlock.resize(0);
- docBlockJavaStyle = Config_getBool("JAVADOC_AUTOBRIEF");
+ docBlockJavaStyle = Config_getBool(JAVADOC_AUTOBRIEF);
startCommentBlock(TRUE);
yy_push_state(DocBackLine);
}
@@ -1126,7 +1138,7 @@ private {
docBlockJavaStyle = FALSE;
if (YY_START==SubprogBody) docBlockInBody = TRUE;
docBlock.resize(0);
- docBlockJavaStyle = Config_getBool("JAVADOC_AUTOBRIEF");
+ docBlockJavaStyle = Config_getBool(JAVADOC_AUTOBRIEF);
startCommentBlock(TRUE);
BEGIN(DocBlock);
//cout << "start DocBlock " << endl;
@@ -1273,13 +1285,15 @@ static int getAmpersandAtTheStart(const char *buf, int length)
}
/* Returns ampersand index, comment start index or -1 if neither exist.*/
-static int getAmpOrExclAtTheEnd(const char *buf, int length)
+static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch)
{
// Avoid ampersands in string and comments
int parseState = Start;
char quoteSymbol = 0;
int ampIndex = -1;
int commentIndex = -1;
+ quoteSymbol = ch;
+ if (ch != '\0') parseState = String;
for(int i=0; i<length && parseState!=Comment; i++)
{
@@ -1410,11 +1424,14 @@ static const char* prepassFixedForm(const char* contents)
int column=0;
int prevLineLength=0;
int prevLineAmpOrExclIndex=-1;
+ char prevQuote = '\0';
+ char thisQuote = '\0';
bool emptyLabel=TRUE;
bool commented=FALSE;
bool inSingle=FALSE;
bool inDouble=FALSE;
bool inBackslash=FALSE;
+ bool fullCommentLine=TRUE;
int newContentsSize = strlen(contents)+3; // \000, \n (when necessary) and one spare character (to avoid reallocation)
char* newContents = (char*)malloc(newContentsSize);
@@ -1428,12 +1445,22 @@ static const char* prepassFixedForm(const char* contents)
char c = contents[i];
switch(c) {
case '\n':
- prevLineLength=column;
- prevLineAmpOrExclIndex=getAmpOrExclAtTheEnd(&contents[i-prevLineLength+1], prevLineLength);
+ if (!fullCommentLine)
+ {
+ prevLineLength=column;
+ prevLineAmpOrExclIndex=getAmpOrExclAtTheEnd(&contents[i-prevLineLength+1], prevLineLength,prevQuote);
+ if (prevLineAmpOrExclIndex == -1) prevLineAmpOrExclIndex = column - 1;
+ }
+ else
+ {
+ prevLineLength+=column;
+ }
+ fullCommentLine=TRUE;
column=0;
emptyLabel=TRUE;
commented=FALSE;
newContents[j]=c;
+ prevQuote = thisQuote;
break;
case ' ':
case '\t':
@@ -1455,7 +1482,8 @@ static const char* prepassFixedForm(const char* contents)
case '\\':
if ((column <= fixedCommentAfter) && (column!=6) && !commented)
{
- // we have some special cases in respect to strings and exscaped string characters
+ // we have some special cases in respect to strings and escaped string characters
+ fullCommentLine=FALSE;
newContents[j]=c;
if (c == '\\')
{
@@ -1464,12 +1492,22 @@ static const char* prepassFixedForm(const char* contents)
}
else if (c == '\'')
{
- if (!inDouble) inSingle = !inSingle;
+ if (!inDouble)
+ {
+ inSingle = !inSingle;
+ if (inSingle) thisQuote = c;
+ else thisQuote = '\0';
+ }
break;
}
else if (c == '"')
{
- if (!inSingle) inDouble = !inDouble;
+ if (!inSingle)
+ {
+ inDouble = !inDouble;
+ if (inDouble) thisQuote = c;
+ else thisQuote = '\0';
+ }
break;
}
}
@@ -1494,6 +1532,7 @@ static const char* prepassFixedForm(const char* contents)
}
else
{
+ if (!commented) fullCommentLine=FALSE;
newContents[j]=c;
}
break;
@@ -1501,6 +1540,7 @@ static const char* prepassFixedForm(const char* contents)
// fallthrough
default:
if(column==6 && emptyLabel) { // continuation
+ if (!commented) fullCommentLine=FALSE;
if (c != '0') { // 0 not allowed as continuation character, see f95 standard paragraph 3.3.2.3
newContents[j]=' ';
@@ -1514,6 +1554,7 @@ static const char* prepassFixedForm(const char* contents)
} else {
newContents[j]=c; // , just handle like space
}
+ prevLineLength=0;
} else if ((column > fixedCommentAfter) && !commented) {
// first non commented non blank character after position fixedCommentAfter
if (c != '!') {
@@ -1524,6 +1565,7 @@ static const char* prepassFixedForm(const char* contents)
newContents[j]=c;
commented = TRUE;
} else {
+ if (!commented) fullCommentLine=FALSE;
newContents[j]=c;
emptyLabel=FALSE;
}
@@ -2249,7 +2291,7 @@ static void startCommentBlock(bool brief)
static void handleCommentBlock(const QCString &doc,bool brief)
{
bool needsEntry = FALSE;
- static bool hideInBodyDocs = Config_getBool("HIDE_IN_BODY_DOCS");
+ static bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS);
int position=0;
if (docBlockInBody && hideInBodyDocs)
{
@@ -2473,7 +2515,11 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra
//printf("---strlen=%d\n", strlen(fileBuf));
//clock_t start=clock();
+ //printf("Input fixed form string:\n%s\n", fileBuf);
+ //printf("===========================\n");
inputString = prepassFixedForm(fileBuf);
+ //printf("Resulting free form string:\n%s\n", inputString);
+ //printf("===========================\n");
//clock_t end=clock();
//printf("CPU time used=%f\n", ((double) (end-start))/CLOCKS_PER_SEC);
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index a70e243..7249574 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -490,7 +490,7 @@ static QCString convertFileId2Var(const QCString &fileId)
static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
const QList<FTVNode> &nl,int level,bool &first)
{
- static QCString htmlOutput = Config_getString("HTML_OUTPUT");
+ static QCString htmlOutput = Config_getString(HTML_OUTPUT);
QCString indentStr;
indentStr.fill(' ',level*2);
bool found=FALSE;
@@ -579,7 +579,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,FTextStream &t,
static void generateJSNavTree(const QList<FTVNode> &nodeList)
{
- QCString htmlOutput = Config_getString("HTML_OUTPUT");
+ QCString htmlOutput = Config_getString(HTML_OUTPUT);
QFile f(htmlOutput+"/navtreedata.js");
NavIndexEntryList navIndex;
if (f.open(IO_WriteOnly) /*&& fidx.open(IO_WriteOnly)*/)
@@ -591,7 +591,7 @@ static void generateJSNavTree(const QList<FTVNode> &nodeList)
t << "var NAVTREE =" << endl;
t << "[" << endl;
t << " [ ";
- QCString &projName = Config_getString("PROJECT_NAME");
+ QCString &projName = Config_getString(PROJECT_NAME);
if (projName.isEmpty())
{
if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty()) // Use title of main page as root
@@ -689,20 +689,18 @@ static void generateJSNavTree(const QList<FTVNode> &nodeList)
// new style images
void FTVHelp::generateTreeViewImages()
{
- QCString dname=Config_getString("HTML_OUTPUT");
+ QCString dname=Config_getString(HTML_OUTPUT);
const ResourceMgr &rm = ResourceMgr::instance();
rm.copyResource("doc.luma",dname);
rm.copyResource("folderopen.luma",dname);
rm.copyResource("folderclosed.luma",dname);
- rm.copyResource("arrowdown.luma",dname);
- rm.copyResource("arrowright.luma",dname);
rm.copyResource("splitbar.lum",dname);
}
// new style scripts
void FTVHelp::generateTreeViewScripts()
{
- QCString htmlOutput = Config_getString("HTML_OUTPUT");
+ QCString htmlOutput = Config_getString(HTML_OUTPUT);
// generate navtree.js & navtreeindex.js
generateJSNavTree(m_indentNodes[0]);
@@ -715,7 +713,7 @@ void FTVHelp::generateTreeViewScripts()
// write tree inside page
void FTVHelp::generateTreeViewInline(FTextStream &t)
{
- int preferredNumEntries = Config_getInt("HTML_INDEX_NUM_ENTRIES");
+ int preferredNumEntries = Config_getInt(HTML_INDEX_NUM_ENTRIES);
t << "<div class=\"directory\">\n";
QListIterator<FTVNode> li(m_indentNodes[0]);
FTVNode *n;
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 7a74c65..ccfa0df 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -61,7 +61,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t,
}
else
{
- fileName = (QCString)"group_"+na;
+ fileName = convertNameToFile(QCString("group_")+na);
}
setGroupTitle( t );
memberGroupSDict = new MemberGroupSDict;
@@ -71,7 +71,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t,
visited = 0;
groupScope = 0;
- m_subGrouping=Config_getBool("SUBGROUPING");
+ m_subGrouping=Config_getBool(SUBGROUPING);
}
GroupDef::~GroupDef()
@@ -137,7 +137,7 @@ void GroupDef::findSectionsInDocumentation()
void GroupDef::addFile(const FileDef *def)
{
- static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
+ static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
if (def->isHidden()) return;
updateLanguage(def);
if (sortBriefDocs)
@@ -148,7 +148,7 @@ void GroupDef::addFile(const FileDef *def)
bool GroupDef::addClass(const ClassDef *cd)
{
- static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
+ static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
if (cd->isHidden()) return FALSE;
updateLanguage(cd);
QCString qn = cd->name();
@@ -196,7 +196,7 @@ bool GroupDef::addClass(const ClassDef *cd)
bool GroupDef::addNamespace(const NamespaceDef *def)
{
- static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
+ static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
if (def->isHidden()) return FALSE;
updateLanguage(def);
if (namespaceSDict->find(def->name())==0)
@@ -213,7 +213,7 @@ bool GroupDef::addNamespace(const NamespaceDef *def)
void GroupDef::addDir(const DirDef *def)
{
if (def->isHidden()) return;
- if (Config_getBool("SORT_BRIEF_DOCS"))
+ if (Config_getBool(SORT_BRIEF_DOCS))
dirList->inSort(def);
else
dirList->append(def);
@@ -532,7 +532,7 @@ bool GroupDef::findGroup(const GroupDef *def) const
void GroupDef::addGroup(const GroupDef *def)
{
//printf("adding group `%s' to group `%s'\n",def->name().data(),name().data());
- //if (Config_getBool("SORT_MEMBER_DOCS"))
+ //if (Config_getBool(SORT_MEMBER_DOCS))
// groupList->inSort(def);
//else
groupList->append(def);
@@ -707,10 +707,11 @@ void GroupDef::writeTagFile(FTextStream &tagFile)
void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
{
- if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ if ((!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
|| !documentation().isEmpty() || !inbodyDocumentation().isEmpty()
)
{
+ ol.pushGeneratorState();
if (pageDict->count()!=countMembers()) // not only pages -> classical layout
{
ol.pushGeneratorState();
@@ -721,18 +722,23 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.disableAllBut(OutputGenerator::Html);
ol.writeAnchor(0,"details");
ol.popGeneratorState();
- ol.startGroupHeader();
- ol.parseText(title);
- ol.endGroupHeader();
}
+ else
+ {
+ ol.disableAllBut(OutputGenerator::Man); // always print title for man page
+ }
+ ol.startGroupHeader();
+ ol.parseText(title);
+ ol.endGroupHeader();
+ ol.popGeneratorState();
// repeat brief description
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
}
// write separator between brief and details
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
+ if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
{
ol.pushGeneratorState();
@@ -762,20 +768,24 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
void GroupDef::writeBriefDescription(OutputList &ol)
{
- if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (hasBriefDescription())
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.writeString(" - ");
+ ol.popGeneratorState();
ol.writeDoc(rootNode,this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
ol.writeString(" \n");
ol.enable(OutputGenerator::RTF);
- if (Config_getBool("REPEAT_BRIEF") ||
+ if (Config_getBool(REPEAT_BRIEF) ||
!documentation().isEmpty()
)
{
@@ -789,11 +799,12 @@ void GroupDef::writeBriefDescription(OutputList &ol)
}
delete rootNode;
}
+ ol.writeSynopsis();
}
void GroupDef::writeGroupGraph(OutputList &ol)
{
- if (Config_getBool("HAVE_DOT") /*&& Config_getBool("GROUP_GRAPHS")*/ )
+ if (Config_getBool(HAVE_DOT) /*&& Config_getBool(GROUP_GRAPHS)*/ )
{
DotGroupCollaboration graph(this);
if (!graph.isTrivial())
@@ -831,7 +842,7 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title)
ol.insertMemberAlign();
ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
ol.endMemberItem();
- if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (!fd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(fd->getOutputFileBase());
ol.generateDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
@@ -868,7 +879,7 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title)
ol.parseText(title);
ol.endMemberHeader();
ol.startMemberList();
- if (Config_getBool("SORT_GROUP_NAMES"))
+ if (Config_getBool(SORT_GROUP_NAMES))
{
groupList->sort();
}
@@ -886,7 +897,7 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title)
ol.insertMemberAlign();
ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
ol.endMemberItem();
- if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (!gd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(gd->getOutputFileBase());
ol.generateDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
@@ -919,7 +930,7 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title)
ol.insertMemberAlign();
ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
ol.endMemberItem();
- if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(dd->getOutputFileBase());
ol.generateDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE,0,TRUE,FALSE);
@@ -995,7 +1006,7 @@ void GroupDef::endMemberDeclarations(OutputList &ol)
void GroupDef::startMemberDocumentation(OutputList &ol)
{
//printf("** GroupDef::startMemberDocumentation()\n");
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
@@ -1006,7 +1017,7 @@ void GroupDef::startMemberDocumentation(OutputList &ol)
void GroupDef::endMemberDocumentation(OutputList &ol)
{
//printf("** GroupDef::endMemberDocumentation()\n");
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.popGeneratorState();
Doxygen::suppressDocWarnings = FALSE;
@@ -1021,7 +1032,7 @@ void GroupDef::writeAuthorSection(OutputList &ol)
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
- ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
+ ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
ol.popGeneratorState();
}
@@ -1072,7 +1083,7 @@ void GroupDef::writeSummaryLinks(OutputList &ol)
void GroupDef::writeDocumentation(OutputList &ol)
{
- //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ //static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
ol.pushGeneratorState();
startFile(ol,getOutputFileBase(),name(),title,HLI_Modules);
@@ -1091,7 +1102,6 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.endTitleHead(getOutputFileBase(),name());
- ol.parseText(title);
ol.popGeneratorState();
ol.endHeaderSection();
ol.startContents();
@@ -1234,7 +1244,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.popGeneratorState();
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
allMemberList->sort();
writeMemberPages(ol);
@@ -1262,7 +1272,7 @@ void GroupDef::writeMemberPages(OutputList &ol)
void GroupDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
- static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
+ static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
@@ -1509,16 +1519,9 @@ void addExampleToGroups(Entry *root,PageDef *eg)
}
}
-QCString GroupDef::getOutputFileBase() const
-{
- if (isReference())
- {
- return fileName;
- }
- else
- {
- return convertNameToFile(fileName);
- }
+QCString GroupDef::getOutputFileBase() const
+{
+ return fileName;
}
void GroupDef::addListReferences()
@@ -1571,8 +1574,8 @@ MemberList *GroupDef::createMemberList(MemberListType lt)
void GroupDef::addMemberToList(MemberListType lt,MemberDef *md)
{
- static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
- static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
+ static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
MemberList *ml = createMemberList(lt);
ml->setNeedsSorting(
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
@@ -1606,7 +1609,7 @@ MemberList *GroupDef::getMemberList(MemberListType lt) const
void GroupDef::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title)
{
- static bool optimizeVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
MemberList * ml = getMemberList(lt);
if (optimizeVhdl && ml)
@@ -1659,7 +1662,7 @@ void GroupDef::updateLanguage(const Definition *d)
bool GroupDef::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().isEmpty());
}
diff --git a/src/htags.cpp b/src/htags.cpp
index 460d54d..77b1f8d 100644
--- a/src/htags.cpp
+++ b/src/htags.cpp
@@ -36,12 +36,12 @@ static QDict<QCString> g_symbolDict(10007);
*/
bool Htags::execute(const QCString &htmldir)
{
- static QStrList &inputSource = Config_getList("INPUT");
- static bool quiet = Config_getBool("QUIET");
- static bool warnings = Config_getBool("WARNINGS");
- static QCString htagsOptions = ""; //Config_getString("HTAGS_OPTIONS");
- static QCString projectName = Config_getString("PROJECT_NAME");
- static QCString projectNumber = Config_getString("PROJECT_NUMBER");
+ static QStrList &inputSource = Config_getList(INPUT);
+ static bool quiet = Config_getBool(QUIET);
+ static bool warnings = Config_getBool(WARNINGS);
+ static QCString htagsOptions = ""; //Config_getString(HTAGS_OPTIONS);
+ static QCString projectName = Config_getString(PROJECT_NAME);
+ static QCString projectNumber = Config_getString(PROJECT_NUMBER);
QCString cwd = QDir::currentDirPath().utf8();
if (inputSource.isEmpty())
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 0533f87..d1fb06c 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -50,7 +50,7 @@ static QCString convertIndexWordToAnchor(const QString &word)
while ((c = *str++))
{
if ((c >= 'a' && c <= 'z') || // ALPHA
- (c >= 'A' && c <= 'A') || // ALPHA
+ (c >= 'A' && c <= 'Z') || // ALPHA
(c >= '0' && c <= '9') || // DIGIT
c == '-' ||
c == '.' ||
@@ -409,7 +409,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
forceEndParagraph(s);
fileName.sprintf("%s%d%s",
- (Config_getString("HTML_OUTPUT")+"/inline_dotgraph_").data(),
+ (Config_getString(HTML_OUTPUT)+"/inline_dotgraph_").data(),
dotindex++,
".dot"
);
@@ -423,14 +423,14 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
file.writeBlock( s->text(), s->text().length() );
file.close();
- m_t << "<div align=\"center\">" << endl;
+ m_t << "<div class=\"dotgraph\">" << endl;
writeDotFile(fileName,s->relPath(),s->context());
visitPreCaption(m_t, s);
visitCaption(this, s->children());
visitPostCaption(m_t, s);
m_t << "</div>" << endl;
- if (Config_getBool("DOT_CLEANUP")) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) file.remove();
}
forceStartParagraph(s);
}
@@ -443,7 +443,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d",
- (Config_getString("HTML_OUTPUT")+"/inline_mscgraph_").data(),
+ (Config_getString(HTML_OUTPUT)+"/inline_mscgraph_").data(),
mscindex++
);
QFile file(baseName+".msc");
@@ -460,14 +460,14 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
file.writeBlock( text, text.length() );
file.close();
- m_t << "<div align=\"center\">" << endl;
+ m_t << "<div class=\"mscgraph\">" << endl;
writeMscFile(baseName+".msc",s->relPath(),s->context());
visitPreCaption(m_t, s);
visitCaption(this, s->children());
visitPostCaption(m_t, s);
m_t << "</div>" << endl;
- if (Config_getBool("DOT_CLEANUP")) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) file.remove();
}
forceStartParagraph(s);
}
@@ -476,9 +476,9 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
{
forceEndParagraph(s);
- static QCString htmlOutput = Config_getString("HTML_OUTPUT");
+ static QCString htmlOutput = Config_getString(HTML_OUTPUT);
QCString baseName = writePlantUMLSource(htmlOutput,s->exampleFile(),s->text());
- m_t << "<div align=\"center\">" << endl;
+ m_t << "<div class=\"plantumlgraph\">" << endl;
writePlantUMLFile(baseName,s->relPath(),s->context());
visitPreCaption(m_t, s);
visitCaption(this, s->children());
@@ -578,6 +578,31 @@ void HtmlDocVisitor::visit(DocInclude *inc)
-1, // endLine
TRUE, // inlineFragment
0, // memberDef
+ FALSE, // show line number
+ m_ctx // search context
+ );
+ m_t << PREFRAG_END;
+ forceStartParagraph(inc);
+ }
+ break;
+ case DocInclude::SnipWithLines:
+ {
+ forceEndParagraph(inc);
+ m_t << PREFRAG_START;
+ QFileInfo cfi( inc->file() );
+ FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile(),
+ &fd,
+ lineBlock(inc->text(),inc->blockId()),
+ -1, // endLine
+ FALSE, // inlineFragment
+ 0, // memberDef
TRUE, // show line number
m_ctx // search context
);
@@ -585,6 +610,11 @@ void HtmlDocVisitor::visit(DocInclude *inc)
forceStartParagraph(inc);
}
break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
}
@@ -645,7 +675,7 @@ void HtmlDocVisitor::visit(DocFormula *f)
m_t << "<p class=\"formulaDsp\">" << endl;
}
- if (Config_getBool("USE_MATHJAX"))
+ if (Config_getBool(USE_MATHJAX))
{
QCString text = f->text();
bool closeInline = FALSE;
@@ -1312,7 +1342,7 @@ void HtmlDocVisitor::visitPre(DocHtmlTable *t)
}
else
{
- m_t << "<table " << htmlAttribsToString(t->attribs()) << ">\n";
+ m_t << "<table" << htmlAttribsToString(t->attribs()) << ">\n";
}
}
@@ -1357,10 +1387,6 @@ void HtmlDocVisitor::visitPost(DocHtmlCell *c)
void HtmlDocVisitor::visitPre(DocHtmlCaption *c)
{
if (m_hide) return;
- bool hasAlign = FALSE;
- HtmlAttribListIterator li(c->attribs());
- HtmlAttrib *att;
- QCString id;
m_t << "<caption" << htmlAttribsToString(c->attribs()) << ">";
}
@@ -1433,17 +1459,43 @@ void HtmlDocVisitor::visitPre(DocImage *img)
}
m_t << "<div class=\"image\">" << endl;
QCString url = img->url();
+ QCString sizeAttribs;
+ if (!img->width().isEmpty())
+ {
+ sizeAttribs+=" width=\""+img->width()+"\"";
+ }
+ if (!img->height().isEmpty())
+ {
+ sizeAttribs+=" height=\""+img->height()+"\"";
+ }
if (url.isEmpty())
{
- m_t << "<img src=\"" << img->relPath() << img->name() << "\" alt=\""
- << baseName << "\"" << htmlAttribsToString(img->attribs())
- << "/>" << endl;
+ if (img->name().right(4)==".svg")
+ {
+ m_t << "<object type=\"image/svg+xml\" data=\"" << img->relPath() << img->name()
+ << "\"" << sizeAttribs << htmlAttribsToString(img->attribs()) << ">" << baseName
+ << "</object>" << endl;
+ }
+ else
+ {
+ m_t << "<img src=\"" << img->relPath() << img->name() << "\" alt=\""
+ << baseName << "\"" << sizeAttribs << htmlAttribsToString(img->attribs())
+ << "/>" << endl;
+ }
}
else
{
- m_t << "<img src=\"" << correctURL(url,img->relPath()) << "\" "
- << htmlAttribsToString(img->attribs())
- << "/>" << endl;
+ if (url.right(4)==".svg")
+ {
+ m_t << "<object type=\"image/svg+xml\" data=\"" << correctURL(url,img->relPath())
+ << "\"" << sizeAttribs << htmlAttribsToString(img->attribs()) << "></object>" << endl;
+ }
+ else
+ {
+ m_t << "<img src=\"" << correctURL(url,img->relPath()) << "\""
+ << sizeAttribs << htmlAttribsToString(img->attribs())
+ << "/>" << endl;
+ }
}
if (img->hasCaption())
{
@@ -1604,7 +1656,7 @@ void HtmlDocVisitor::visitPost(DocSecRefList *s)
//void HtmlDocVisitor::visitPre(DocLanguage *l)
//{
-// QString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QString langId = Config_getEnum(OUTPUT_LANGUAGE);
// if (l->id().lower()!=langId.lower())
// {
// pushEnabled();
@@ -1614,7 +1666,7 @@ void HtmlDocVisitor::visitPost(DocSecRefList *s)
//
//void HtmlDocVisitor::visitPost(DocLanguage *l)
//{
-// QString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QString langId = Config_getEnum(OUTPUT_LANGUAGE);
// if (l->id().lower()!=langId.lower())
// {
// popEnabled();
@@ -1814,7 +1866,7 @@ void HtmlDocVisitor::visitPre(DocHtmlBlockQuote *b)
}
else
{
- m_t << "<blockquote " << htmlAttribsToString(b->attribs()) << ">\n";
+ m_t << "<blockquote" << htmlAttribsToString(b->attribs()) << ">\n";
}
}
@@ -1962,7 +2014,7 @@ void HtmlDocVisitor::writeDotFile(const QCString &fn,const QCString &relPath,
baseName=baseName.left(i);
}
baseName.prepend("dot_");
- QCString outDir = Config_getString("HTML_OUTPUT");
+ QCString outDir = Config_getString(HTML_OUTPUT);
writeDotGraphFromFile(fn,outDir,baseName,GOF_BITMAP);
writeDotImageMapFromFile(m_t,fn,outDir,relPath,baseName,context);
}
@@ -1982,7 +2034,7 @@ void HtmlDocVisitor::writeMscFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("msc_");
- QCString outDir = Config_getString("HTML_OUTPUT");
+ QCString outDir = Config_getString(HTML_OUTPUT);
QCString imgExt = getDotImageExtension();
MscOutputFormat mscFormat = MSC_BITMAP;
if ("svg" == imgExt)
@@ -2006,7 +2058,7 @@ void HtmlDocVisitor::writeDiaFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("dia_");
- QCString outDir = Config_getString("HTML_OUTPUT");
+ QCString outDir = Config_getString(HTML_OUTPUT);
writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
m_t << "<img src=\"" << relPath << baseName << ".png" << "\" />" << endl;
@@ -2026,7 +2078,7 @@ void HtmlDocVisitor::writePlantUMLFile(const QCString &fileName,
{
baseName=baseName.left(i);
}
- static QCString outDir = Config_getString("HTML_OUTPUT");
+ static QCString outDir = Config_getString(HTML_OUTPUT);
QCString imgExt = getDotImageExtension();
if (imgExt=="svg")
{
diff --git a/src/htmlentity.cpp b/src/htmlentity.cpp
index ff3c574..668c224 100644
--- a/src/htmlentity.cpp
+++ b/src/htmlentity.cpp
@@ -199,7 +199,7 @@ static struct htmlEntityInfo
{ SYM(oline), "\xe2\x80\xbe", "&oline;", "<oline/>", "&#8254;", "{$\\overline{\\,}$}", NULL, "\\u8254?", { NULL, DocSymbol::Perl_unknown }},
{ SYM(frasl), "\xe2\x81\x84", "&frasl;", "<frasl/>", "&#8260;", "/", NULL, "\\u8260?", { NULL, DocSymbol::Perl_unknown }},
{ SYM(weierp), "\xe2\x84\x98", "&weierp;", "<weierp/>", "&#8472;", "{$\\wp$}", NULL, "\\u8472?", { NULL, DocSymbol::Perl_unknown }},
- { SYM(image), "\xe2\x84\x91", "&image;", "<image/>", "&#8465;", "{$\\Im$}", NULL, "\\u8465?", { NULL, DocSymbol::Perl_unknown }},
+ { SYM(image), "\xe2\x84\x91", "&image;", "<imaginary/>", "&#8465;", "{$\\Im$}", NULL, "\\u8465?", { NULL, DocSymbol::Perl_unknown }},
{ SYM(real), "\xe2\x84\x9c", "&real;", "<real/>", "&#8476;", "{$\\Re$}", NULL, "\\u8476?", { NULL, DocSymbol::Perl_unknown }},
{ SYM(trade), "\xe2\x84\xa2", "&trade;", "<trademark/>", "&#8482;", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", DocSymbol::Perl_symbol }},
{ SYM(alefsym), "\xe2\x85\xb5", "&alefsym;", "<alefsym/>", "&#8501;", "{$\\aleph$}", NULL, "\\u8501?", { NULL, DocSymbol::Perl_unknown }},
@@ -297,7 +297,7 @@ static struct htmlEntityInfo
{ SYM(euro), "\xe2\x82\xac", "&euro;", "<euro/>", "&#8364;", "\\texteuro{}", NULL, "\\'80", { NULL, DocSymbol::Perl_unknown }},
// doxygen extension to the HTML4 table of HTML entities
- { SYM(tm), "\xe2\x84\xa2", "&trade;", "<trademark/>", "&#8482;", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", DocSymbol::Perl_symbol }},
+ { SYM(tm), "\xe2\x84\xa2", "&trade;", "<tm/>", "&#8482;", "\\texttrademark{}", "(TM)", "\\'99", { "trademark", DocSymbol::Perl_symbol }},
{ SYM(apos), "'", "'", "'", "&apos;", "\\textquotesingle{}", "'", "'", { "\\\'", DocSymbol::Perl_string }},
// doxygen commands represented as HTML entities
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 9e02dee..28a363b 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -52,6 +52,8 @@ static QCString g_footer;
static QCString g_mathjax_code;
+// note: this is only active if DISABLE_INDEX=YES, if DISABLE_INDEX is disabled, this
+// part will be rendered inside menu.js
static void writeClientSearchBox(FTextStream &t,const char *relPath)
{
t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
@@ -72,9 +74,11 @@ static void writeClientSearchBox(FTextStream &t,const char *relPath)
t << " </div>\n";
}
+// note: this is only active if DISABLE_INDEX=YES. if DISABLE_INDEX is disabled, this
+// part will be rendered inside menu.js
static void writeServerSearchBox(FTextStream &t,const char *relPath,bool highlightSearch)
{
- static bool externalSearch = Config_getBool("EXTERNAL_SEARCH");
+ static bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
t << " <div class=\"left\">\n";
t << " <form id=\"FSearchBox\" action=\"" << relPath;
@@ -228,21 +232,21 @@ static QCString substituteHtmlKeywords(const QCString &s,
QCString mathJaxJs;
QCString extraCssText;
- static QCString projectName = Config_getString("PROJECT_NAME");
- static bool timeStamp = Config_getBool("HTML_TIMESTAMP");
- static bool treeView = Config_getBool("GENERATE_TREEVIEW");
- static bool searchEngine = Config_getBool("SEARCHENGINE");
- static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
- static bool mathJax = Config_getBool("USE_MATHJAX");
- static QCString mathJaxFormat = Config_getEnum("MATHJAX_FORMAT");
- static bool disableIndex = Config_getBool("DISABLE_INDEX");
+ static QCString projectName = Config_getString(PROJECT_NAME);
+ static bool timeStamp = Config_getBool(HTML_TIMESTAMP);
+ static bool treeView = Config_getBool(GENERATE_TREEVIEW);
+ static bool searchEngine = Config_getBool(SEARCHENGINE);
+ static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
+ static bool mathJax = Config_getBool(USE_MATHJAX);
+ static QCString mathJaxFormat = Config_getEnum(MATHJAX_FORMAT);
+ static bool disableIndex = Config_getBool(DISABLE_INDEX);
static bool hasProjectName = !projectName.isEmpty();
- static bool hasProjectNumber = !Config_getString("PROJECT_NUMBER").isEmpty();
- static bool hasProjectBrief = !Config_getString("PROJECT_BRIEF").isEmpty();
- static bool hasProjectLogo = !Config_getString("PROJECT_LOGO").isEmpty();
+ static bool hasProjectNumber = !Config_getString(PROJECT_NUMBER).isEmpty();
+ static bool hasProjectBrief = !Config_getString(PROJECT_BRIEF).isEmpty();
+ static bool hasProjectLogo = !Config_getString(PROJECT_LOGO).isEmpty();
static bool titleArea = (hasProjectName || hasProjectBrief || hasProjectLogo || (disableIndex && searchEngine));
- cssFile = Config_getString("HTML_STYLESHEET");
+ cssFile = Config_getString(HTML_STYLESHEET);
if (cssFile.isEmpty())
{
cssFile = "doxygen.css";
@@ -261,7 +265,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
}
extraCssText = "";
- extraCssFile = Config_getList("HTML_EXTRA_STYLESHEET");
+ extraCssFile = Config_getList(HTML_EXTRA_STYLESHEET);
for (uint i=0; i<extraCssFile.count(); ++i)
{
QCString fileName(extraCssFile.at(i));
@@ -277,7 +281,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
if (timeStamp)
{
- generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), convertToHtml(Config_getString("PROJECT_NAME")));
+ generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), convertToHtml(Config_getString(PROJECT_NAME)));
}
else
{
@@ -292,7 +296,6 @@ static QCString substituteHtmlKeywords(const QCString &s,
"<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n"
"<script type=\"text/javascript\">\n"
" $(document).ready(initResizable);\n"
- " $(window).load(resizeHeight);\n"
"</script>";
}
@@ -305,19 +308,25 @@ static QCString substituteHtmlKeywords(const QCString &s,
}
searchCssJs += "<script type=\"text/javascript\" src=\"$relpath^search/search.js\"></script>\n";
- if (!serverBasedSearch)
+ if (!serverBasedSearch)
{
- searchCssJs += "<script type=\"text/javascript\">\n"
- " $(document).ready(function() { init_search(); });\n"
- "</script>";
+ if (disableIndex)
+ {
+ searchCssJs += "<script type=\"text/javascript\">\n"
+ " $(document).ready(function() { init_search(); });\n"
+ "</script>";
+ }
}
- else
+ else
{
- searchCssJs += "<script type=\"text/javascript\">\n"
- " $(document).ready(function() {\n"
- " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
- " });\n"
- "</script>\n";
+ if (disableIndex)
+ {
+ searchCssJs += "<script type=\"text/javascript\">\n"
+ " $(document).ready(function() {\n"
+ " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
+ " });\n"
+ "</script>\n";
+ }
// OPENSEARCH_PROVIDER {
searchCssJs += "<link rel=\"search\" href=\"" + relPath +
@@ -332,7 +341,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
if (mathJax)
{
- QCString path = Config_getString("MATHJAX_RELPATH");
+ QCString path = Config_getString(MATHJAX_RELPATH);
if (path.isEmpty() || path.left(2)=="..") // relative path
{
path.prepend(relPath);
@@ -340,7 +349,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
mathJaxJs = "<script type=\"text/x-mathjax-config\">\n"
" MathJax.Hub.Config({\n"
" extensions: [\"tex2jax.js\"";
- QStrList &mathJaxExtensions = Config_getList("MATHJAX_EXTENSIONS");
+ QStrList &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS);
const char *s = mathJaxExtensions.first();
while (s)
{
@@ -365,9 +374,9 @@ static QCString substituteHtmlKeywords(const QCString &s,
// first substitute generic keywords
QCString result = substituteKeywords(s,title,
- convertToHtml(Config_getString("PROJECT_NAME")),
- convertToHtml(Config_getString("PROJECT_NUMBER")),
- convertToHtml(Config_getString("PROJECT_BRIEF")));
+ convertToHtml(Config_getString(PROJECT_NAME)),
+ convertToHtml(Config_getString(PROJECT_NUMBER)),
+ convertToHtml(Config_getString(PROJECT_BRIEF)));
// additional HTML only keywords
result = substitute(result,"$navpath",navPath);
@@ -422,7 +431,7 @@ void HtmlCodeGenerator::setRelativePath(const QCString &path)
void HtmlCodeGenerator::codify(const char *str)
{
- static int tabSize = Config_getInt("TAB_SIZE");
+ static int tabSize = Config_getInt(TAB_SIZE);
if (str && m_streamSet)
{
const char *p=str;
@@ -671,7 +680,7 @@ void HtmlCodeGenerator::writeCodeAnchor(const char *anchor)
HtmlGenerator::HtmlGenerator() : OutputGenerator()
{
- dir=Config_getString("HTML_OUTPUT");
+ dir=Config_getString(HTML_OUTPUT);
m_emptySection=FALSE;
}
@@ -682,7 +691,7 @@ HtmlGenerator::~HtmlGenerator()
void HtmlGenerator::init()
{
- QCString dname=Config_getString("HTML_OUTPUT");
+ QCString dname=Config_getString(HTML_OUTPUT);
QDir d(dname);
if (!d.exists() && !d.mkdir(dname))
{
@@ -690,9 +699,9 @@ void HtmlGenerator::init()
exit(1);
}
//writeLogo(dname);
- if (!Config_getString("HTML_HEADER").isEmpty())
+ if (!Config_getString(HTML_HEADER).isEmpty())
{
- g_header=fileToString(Config_getString("HTML_HEADER"));
+ g_header=fileToString(Config_getString(HTML_HEADER));
//printf("g_header='%s'\n",g_header.data());
}
else
@@ -700,9 +709,9 @@ void HtmlGenerator::init()
g_header = ResourceMgr::instance().getAsString("header.html");
}
- if (!Config_getString("HTML_FOOTER").isEmpty())
+ if (!Config_getString(HTML_FOOTER).isEmpty())
{
- g_footer=fileToString(Config_getString("HTML_FOOTER"));
+ g_footer=fileToString(Config_getString(HTML_FOOTER));
//printf("g_footer='%s'\n",g_footer.data());
}
else
@@ -710,11 +719,11 @@ void HtmlGenerator::init()
g_footer = ResourceMgr::instance().getAsString("footer.html");
}
- if (Config_getBool("USE_MATHJAX"))
+ if (Config_getBool(USE_MATHJAX))
{
- if (!Config_getString("MATHJAX_CODEFILE").isEmpty())
+ if (!Config_getString(MATHJAX_CODEFILE).isEmpty())
{
- g_mathjax_code=fileToString(Config_getString("MATHJAX_CODEFILE"));
+ g_mathjax_code=fileToString(Config_getString(MATHJAX_CODEFILE));
//printf("g_mathjax_code='%s'\n",g_mathjax_code.data());
}
}
@@ -723,10 +732,14 @@ void HtmlGenerator::init()
ResourceMgr &mgr = ResourceMgr::instance();
mgr.copyResource("tabs.css",dname);
mgr.copyResource("jquery.js",dname);
- if (Config_getBool("INTERACTIVE_SVG"))
+ if (Config_getBool(INTERACTIVE_SVG))
{
mgr.copyResource("svgpan.js",dname);
}
+ if (!Config_getBool(DISABLE_INDEX))
+ {
+ mgr.copyResource("menu.js",dname);
+ }
{
QFile f(dname+"/dynsections.js");
@@ -734,7 +747,7 @@ void HtmlGenerator::init()
{
FTextStream t(&f);
t << mgr.getAsString("dynsections.js");
- if (Config_getBool("SOURCE_BROWSER") && Config_getBool("SOURCE_TOOLTIPS"))
+ if (Config_getBool(SOURCE_BROWSER) && Config_getBool(SOURCE_TOOLTIPS))
{
t << endl <<
"$(document).ready(function() {\n"
@@ -752,7 +765,7 @@ void HtmlGenerator::init()
void HtmlGenerator::writeTabData()
{
Doxygen::indexList->addStyleSheetFile("tabs.css");
- QCString dname=Config_getString("HTML_OUTPUT");
+ QCString dname=Config_getString(HTML_OUTPUT);
ResourceMgr &mgr = ResourceMgr::instance();
//writeColoredImgData(dname,colored_tab_data);
mgr.copyResource("tab_a.lum",dname);
@@ -780,7 +793,7 @@ void HtmlGenerator::writeTabData()
void HtmlGenerator::writeSearchData(const char *dir)
{
- static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
+ static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
//writeImgData(dir,serverBasedSearch ? search_server_data : search_client_data);
ResourceMgr &mgr = ResourceMgr::instance();
@@ -803,18 +816,21 @@ void HtmlGenerator::writeSearchData(const char *dir)
Doxygen::indexList->addImageFile("search/mag_sel.png");
}
- QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search";
+ QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search";
QFile f(searchDirName+"/search.css");
if (f.open(IO_WriteOnly))
{
FTextStream t(&f);
- QCString searchCss = replaceColorMarkers(mgr.getAsString("search.css"));
- searchCss = substitute(searchCss,"$doxygenversion",versionString);
- if (Config_getBool("DISABLE_INDEX"))
+ QCString searchCss;
+ if (Config_getBool(DISABLE_INDEX))
{
- // move up the search box if there are no tabs
- searchCss = substitute(searchCss,"margin-top: 8px;","margin-top: 0px;");
+ searchCss = mgr.getAsString("search_nomenu.css");
}
+ else
+ {
+ searchCss = mgr.getAsString("search.css");
+ }
+ searchCss = substitute(replaceColorMarkers(searchCss),"$doxygenversion",versionString);
t << searchCss;
Doxygen::indexList->addStyleSheetFile("search/search.css");
}
@@ -862,8 +878,8 @@ void HtmlGenerator::startFile(const char *name,const char *,
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
<< versionString << " -->" << endl;
- //static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
- static bool searchEngine = Config_getBool("SEARCHENGINE");
+ //static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ static bool searchEngine = Config_getBool(SEARCHENGINE);
if (searchEngine /*&& !generateTreeView*/)
{
t << "<script type=\"text/javascript\">\n";
@@ -877,8 +893,8 @@ void HtmlGenerator::startFile(const char *name,const char *,
void HtmlGenerator::writeSearchInfo(FTextStream &t,const QCString &relPath)
{
- static bool searchEngine = Config_getBool("SEARCHENGINE");
- static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
+ static bool searchEngine = Config_getBool(SEARCHENGINE);
+ static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
if (searchEngine && !serverBasedSearch)
{
(void)relPath;
@@ -907,13 +923,13 @@ void HtmlGenerator::writeSearchInfo()
QCString HtmlGenerator::writeLogoAsString(const char *path)
{
- static bool timeStamp = Config_getBool("HTML_TIMESTAMP");
+ static bool timeStamp = Config_getBool(HTML_TIMESTAMP);
QCString result;
if (timeStamp)
{
result += theTranslator->trGeneratedAt(
dateToString(TRUE),
- Config_getString("PROJECT_NAME")
+ Config_getString(PROJECT_NAME)
);
}
else
@@ -965,7 +981,7 @@ void HtmlGenerator::writeStyleInfo(int part)
//printf("writeStyleInfo(%d)\n",part);
if (part==0)
{
- if (Config_getString("HTML_STYLESHEET").isEmpty()) // write default style sheet
+ if (Config_getString(HTML_STYLESHEET).isEmpty()) // write default style sheet
{
//printf("write doxygen.css\n");
startPlainFile("doxygen.css");
@@ -980,11 +996,11 @@ void HtmlGenerator::writeStyleInfo(int part)
}
else // write user defined style sheet
{
- QCString cssname=Config_getString("HTML_STYLESHEET");
+ QCString cssname=Config_getString(HTML_STYLESHEET);
QFileInfo cssfi(cssname);
if (!cssfi.exists() || !cssfi.isFile() || !cssfi.isReadable())
{
- err("style sheet %s does not exist or is not readable!", Config_getString("HTML_STYLESHEET").data());
+ err("style sheet %s does not exist or is not readable!", Config_getString(HTML_STYLESHEET).data());
}
else
{
@@ -997,7 +1013,7 @@ void HtmlGenerator::writeStyleInfo(int part)
}
Doxygen::indexList->addStyleSheetFile(cssfi.fileName().utf8());
}
- static QStrList extraCssFile = Config_getList("HTML_EXTRA_STYLESHEET");
+ static QStrList extraCssFile = Config_getList(HTML_EXTRA_STYLESHEET);
for (uint i=0; i<extraCssFile.count(); ++i)
{
QCString fileName(extraCssFile.at(i));
@@ -1010,6 +1026,13 @@ void HtmlGenerator::writeStyleInfo(int part)
}
}
}
+
+ Doxygen::indexList->addStyleSheetFile("jquery.js");
+ Doxygen::indexList->addStyleSheetFile("dynsections.js");
+ if (Config_getBool(INTERACTIVE_SVG))
+ {
+ Doxygen::indexList->addStyleSheetFile("svgpan.js");
+ }
}
}
@@ -1017,7 +1040,7 @@ void HtmlGenerator::startDoxyAnchor(const char *,const char *,
const char *anchor, const char *,
const char *)
{
- t << "<a class=\"anchor\" id=\"" << anchor << "\"></a>";
+ t << "<a id=\"" << anchor << "\"></a>";
}
void HtmlGenerator::endDoxyAnchor(const char *,const char *)
@@ -1029,9 +1052,12 @@ void HtmlGenerator::endDoxyAnchor(const char *,const char *)
// t << endl << "<p>" << endl;
//}
-void HtmlGenerator::startParagraph()
+void HtmlGenerator::startParagraph(const char *classDef)
{
- t << endl << "<p>";
+ if (classDef)
+ t << endl << "<p class=\"" << classDef << "\">";
+ else
+ t << endl << "<p>";
}
void HtmlGenerator::endParagraph()
@@ -1137,7 +1163,7 @@ void HtmlGenerator::endTextLink()
void HtmlGenerator::startHtmlLink(const char *url)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
t << "<a ";
if (generateTreeView) t << "target=\"top\" ";
t << "href=\"";
@@ -1193,7 +1219,7 @@ void HtmlGenerator::startSection(const char *lab,const char *,SectionInfo::Secti
case SectionInfo::Paragraph: t << "\n\n<h5>"; break;
default: ASSERT(0); break;
}
- t << "<a class=\"anchor\" id=\"" << lab << "\"></a>";
+ t << "<a id=\"" << lab << "\"></a>";
}
void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
@@ -1258,7 +1284,7 @@ static void startSectionHeader(FTextStream &t,
const QCString &relPath,int sectionCount)
{
//t << "<!-- startSectionHeader -->";
- static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
+ static bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
if (dynamicSections)
{
t << "<div id=\"dynsection-" << sectionCount << "\" "
@@ -1283,7 +1309,7 @@ static void endSectionHeader(FTextStream &t)
static void startSectionSummary(FTextStream &t,int sectionCount)
{
//t << "<!-- startSectionSummary -->";
- static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
+ static bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
if (dynamicSections)
{
t << "<div id=\"dynsection-" << sectionCount << "-summary\" "
@@ -1295,7 +1321,7 @@ static void startSectionSummary(FTextStream &t,int sectionCount)
static void endSectionSummary(FTextStream &t)
{
//t << "<!-- endSectionSummary -->";
- static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
+ static bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
if (dynamicSections)
{
t << "</div>" << endl;
@@ -1305,7 +1331,7 @@ static void endSectionSummary(FTextStream &t)
static void startSectionContent(FTextStream &t,int sectionCount)
{
//t << "<!-- startSectionContent -->";
- static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
+ static bool dynamicSections = Config_getBool(HTML_DYNAMIC_SECTIONS);
if (dynamicSections)
{
t << "<div id=\"dynsection-" << sectionCount << "-content\" "
@@ -1343,8 +1369,7 @@ void HtmlGenerator::endClassDiagram(const ClassDiagram &d,
t << relPath << fileName << ".png\" usemap=\"#" << convertToId(name);
t << "_map\" alt=\"\"/>" << endl;
t << " <map id=\"" << convertToId(name);
- t << "_map\" name=\"";
- docify(name);
+ t << "_map\" name=\"" << convertToId(name);
t << "_map\">" << endl;
d.writeImage(t,dir,relPath,fileName);
@@ -1539,10 +1564,20 @@ void HtmlGenerator::endMemberDocList()
DBG_HTML(t << "<!-- endMemberDocList -->" << endl;)
}
-void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *,bool)
-{
+void HtmlGenerator::startMemberDoc( const char *clName, const char *memName,
+ const char *anchor, const char *title,
+ int memCount, int memTotal, bool showInline)
+{
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
-
+ t << "\n<h2 class=\"memtitle\">"
+ << "<span class=\"permalink\"><a href=\"#" << anchor << "\">&#9670;&nbsp;</a></span>"
+ << title;
+ if (memTotal>1)
+ {
+ t << " <span class=\"overload\">[" << memCount << "/" << memTotal <<"]</span>";
+ }
+ t << "</h2>"
+ << endl;
t << "\n<div class=\"memitem\">" << endl;
t << "<div class=\"memproto\">" << endl;
}
@@ -1685,8 +1720,8 @@ void HtmlGenerator::startDotGraph()
void HtmlGenerator::endDotGraph(const DotClassGraph &g)
{
- bool generateLegend = Config_getBool("GENERATE_LEGEND");
- bool umlLook = Config_getBool("UML_LOOK");
+ bool generateLegend = Config_getBool(GENERATE_LEGEND);
+ bool umlLook = Config_getBool(UML_LOOK);
endSectionHeader(t);
startSectionSummary(t,m_sectionCount);
endSectionSummary(t);
@@ -1837,6 +1872,46 @@ void HtmlGenerator::writeNonBreakableSpace(int n)
}
}
+void HtmlGenerator::startDescTable(const char *title)
+{
+ t << "<table class=\"fieldtable\">" << endl
+ << "<tr><th colspan=\"2\">" << title << "</th></tr>";
+}
+void HtmlGenerator::endDescTable()
+{
+ t << "</table>" << endl;
+}
+
+void HtmlGenerator::startDescTableRow()
+{
+ t << "<tr>";
+}
+
+void HtmlGenerator::endDescTableRow()
+{
+ t << "</tr>" << endl;
+}
+
+void HtmlGenerator::startDescTableTitle()
+{
+ t << "<td class=\"fieldname\">";
+}
+
+void HtmlGenerator::endDescTableTitle()
+{
+ t << "&#160;</td>";
+}
+
+void HtmlGenerator::startDescTableData()
+{
+ t << "<td class=\"fielddoc\">";
+}
+
+void HtmlGenerator::endDescTableData()
+{
+ t << "</td>";
+}
+
void HtmlGenerator::startSimpleSect(SectionTypes,
const char *filename,const char *anchor,
const char *title)
@@ -1936,8 +2011,8 @@ static void endQuickIndexItem(FTextStream &t,const char *l)
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
{
- static bool showFiles = Config_getBool("SHOW_FILES");
- static bool showNamespaces = Config_getBool("SHOW_NAMESPACES");
+ static bool showFiles = Config_getBool(SHOW_FILES);
+ static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
switch (kind)
{
case LayoutNavEntry::MainPage: return TRUE;
@@ -2032,8 +2107,8 @@ static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
}
if (hlEntry->parent()==LayoutDocManager::instance().rootNavEntry()) // first row is special as it contains the search box
{
- static bool searchEngine = Config_getBool("SEARCHENGINE");
- static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
+ static bool searchEngine = Config_getBool(SEARCHENGINE);
+ static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
if (searchEngine)
{
t << " <li>\n";
@@ -2070,59 +2145,47 @@ static void writeDefaultQuickLinks(FTextStream &t,bool compact,
const char *file,
const QCString &relPath)
{
+ static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
+ static bool searchEngine = Config_getBool(SEARCHENGINE);
+ static bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry();
- LayoutNavEntry::Kind kind = (LayoutNavEntry::Kind)-1;
- LayoutNavEntry::Kind altKind = (LayoutNavEntry::Kind)-1; // fall back for the old layout file
- bool highlightParent=FALSE;
- switch (hli) // map HLI enums to LayoutNavEntry::Kind enums
- {
- case HLI_Main: kind = LayoutNavEntry::MainPage; break;
- case HLI_Modules: kind = LayoutNavEntry::Modules; break;
- //case HLI_Directories: kind = LayoutNavEntry::Dirs; break;
- case HLI_Namespaces: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces; break;
- case HLI_Hierarchy: kind = LayoutNavEntry::ClassHierarchy; break;
- case HLI_Classes: kind = LayoutNavEntry::ClassIndex; altKind = LayoutNavEntry::Classes; break;
- case HLI_Annotated: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes; break;
- case HLI_Files: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files; break;
- case HLI_NamespaceMembers: kind = LayoutNavEntry::NamespaceMembers; break;
- case HLI_Functions: kind = LayoutNavEntry::ClassMembers; break;
- case HLI_Globals: kind = LayoutNavEntry::FileGlobals; break;
- case HLI_Pages: kind = LayoutNavEntry::Pages; break;
- case HLI_Examples: kind = LayoutNavEntry::Examples; break;
- case HLI_UserGroup: kind = LayoutNavEntry::UserGroup; break;
- case HLI_ClassVisible: kind = LayoutNavEntry::ClassList; altKind = LayoutNavEntry::Classes;
- highlightParent = TRUE; break;
- case HLI_NamespaceVisible: kind = LayoutNavEntry::NamespaceList; altKind = LayoutNavEntry::Namespaces;
- highlightParent = TRUE; break;
- case HLI_FileVisible: kind = LayoutNavEntry::FileList; altKind = LayoutNavEntry::Files;
- highlightParent = TRUE; break;
- case HLI_None: break;
- case HLI_Search: break;
- }
-
+
if (compact)
{
- // find highlighted index item
- LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : 0);
- if (!hlEntry && altKind!=(LayoutNavEntry::Kind)-1) { hlEntry=root->find(altKind); kind=altKind; }
- if (!hlEntry) // highlighted item not found in the index! -> just show the level 1 index...
+ QCString searchPage;
+ if (externalSearch)
{
- highlightParent=TRUE;
- hlEntry = root->children().getFirst();
- if (hlEntry==0)
- {
- return; // argl, empty index!
- }
+ searchPage = "search" + Doxygen::htmlFileExtension;
+ }
+ else
+ {
+ searchPage = "search.php";
}
- if (kind==LayoutNavEntry::UserGroup)
+ t << "<script type=\"text/javascript\" src=\"" << relPath << "menudata.js\"></script>" << endl;
+ t << "<script type=\"text/javascript\" src=\"" << relPath << "menu.js\"></script>" << endl;
+ t << "<script type=\"text/javascript\">" << endl;
+ t << "$(function() {" << endl;
+ t << " initMenu('" << relPath << "',"
+ << (searchEngine?"true":"false") << ","
+ << (serverBasedSearch?"true":"false") << ",'"
+ << searchPage << "','"
+ << theTranslator->trSearch() << "');" << endl;
+ if (Config_getBool(SEARCHENGINE))
{
- LayoutNavEntry *e = hlEntry->children().getFirst();
- if (e)
+ if (!serverBasedSearch)
{
- hlEntry = e;
+ t << " $(document).ready(function() { init_search(); });\n";
+ }
+ else
+ {
+ t << " $(document).ready(function() {\n"
+ << " if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }\n"
+ << " });\n";
}
}
- renderQuickLinksAsTabs(t,relPath,hlEntry,kind,highlightParent,hli==HLI_Search);
+ t << "});" << endl;
+ t << "</script>" << endl;
+ t << "<div id=\"main-nav\"></div>" << endl;
}
else
{
@@ -2137,7 +2200,7 @@ void HtmlGenerator::endQuickIndices()
QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpath)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
QCString result;
// write split bar
if (generateTreeView)
@@ -2192,10 +2255,10 @@ void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const char
// PHP based search script
void HtmlGenerator::writeSearchPage()
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
- static bool disableIndex = Config_getBool("DISABLE_INDEX");
- static QCString projectName = Config_getString("PROJECT_NAME");
- static QCString htmlOutput = Config_getString("HTML_OUTPUT");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ static bool disableIndex = Config_getBool(DISABLE_INDEX);
+ static QCString projectName = Config_getString(PROJECT_NAME);
+ static QCString htmlOutput = Config_getString(HTML_OUTPUT);
// OPENSEARCH_PROVIDER {
QCString configFileName = htmlOutput+"/search_config.php";
@@ -2241,7 +2304,7 @@ void HtmlGenerator::writeSearchPage()
t << "var searchBox = new SearchBox(\"searchBox\", \""
<< "search\",false,'" << theTranslator->trSearch() << "');\n";
t << "</script>\n";
- if (!Config_getBool("DISABLE_INDEX"))
+ if (!Config_getBool(DISABLE_INDEX))
{
writeDefaultQuickLinks(t,TRUE,HLI_Search,0,"");
}
@@ -2258,9 +2321,7 @@ void HtmlGenerator::writeSearchPage()
// Write empty navigation path, to make footer connect properly
if (generateTreeView)
{
- t << "</div><!-- doc-contents -->\n";
- //t << "<div id=\"nav-path\" class=\"navpath\">\n";
- //t << " <ul>\n";
+ t << "</div><!-- doc-content -->\n";
}
writePageFooter(t,"Search","","");
@@ -2280,8 +2341,9 @@ void HtmlGenerator::writeSearchPage()
void HtmlGenerator::writeExternalSearchPage()
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
- QCString fileName = Config_getString("HTML_OUTPUT")+"/search"+Doxygen::htmlFileExtension;
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ static bool disableIndex = Config_getBool(DISABLE_INDEX);
+ QCString fileName = Config_getString(HTML_OUTPUT)+"/search"+Doxygen::htmlFileExtension;
QFile f(fileName);
if (f.open(IO_WriteOnly))
{
@@ -2294,7 +2356,7 @@ void HtmlGenerator::writeExternalSearchPage()
t << "var searchBox = new SearchBox(\"searchBox\", \""
<< "search\",false,'" << theTranslator->trSearch() << "');\n";
t << "</script>\n";
- if (!Config_getBool("DISABLE_INDEX"))
+ if (!Config_getBool(DISABLE_INDEX))
{
writeDefaultQuickLinks(t,TRUE,HLI_Search,0,"");
t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"\" size=\"20\" accesskey=\"S\" onfocus=\"searchBox.OnSearchFieldFocus(true)\" onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
@@ -2323,12 +2385,13 @@ void HtmlGenerator::writeExternalSearchPage()
if (generateTreeView)
{
- t << "</div><!-- doc-contents -->" << endl;
+ t << "</div><!-- doc-content -->" << endl;
}
writePageFooter(t,"Search","","");
+
}
- QCString scriptName = Config_getString("HTML_OUTPUT")+"/search/search.js";
+ QCString scriptName = Config_getString(HTML_OUTPUT)+"/search/search.js";
QFile sf(scriptName);
if (sf.open(IO_WriteOnly))
{
@@ -2337,11 +2400,11 @@ void HtmlGenerator::writeExternalSearchPage()
<< "\"" << theTranslator->trSearchResults(0) << "\","
<< "\"" << theTranslator->trSearchResults(1) << "\","
<< "\"" << theTranslator->trSearchResults(2) << "\"];" << endl;
- t << "var serverUrl=\"" << Config_getString("SEARCHENGINE_URL") << "\";" << endl;
+ t << "var serverUrl=\"" << Config_getString(SEARCHENGINE_URL) << "\";" << endl;
t << "var tagMap = {" << endl;
bool first=TRUE;
// add search mappings
- QStrList &extraSearchMappings = Config_getList("EXTRA_SEARCH_MAPPINGS");
+ QStrList &extraSearchMappings = Config_getList(EXTRA_SEARCH_MAPPINGS);
char *ml=extraSearchMappings.first();
while (ml)
{
@@ -2474,14 +2537,16 @@ void HtmlGenerator::endInlineHeader()
t << "</h3></td></tr>" << endl;
}
-void HtmlGenerator::startMemberDocSimple()
+void HtmlGenerator::startMemberDocSimple(bool isEnum)
{
DBG_HTML(t << "<!-- startMemberDocSimple -->" << endl;)
t << "<table class=\"fieldtable\">" << endl;
- t << "<tr><th colspan=\"3\">" << theTranslator->trCompoundMembers() << "</th></tr>" << endl;
+ t << "<tr><th colspan=\"" << (isEnum?"2":"3") << "\">";
+ t << (isEnum? theTranslator->trEnumerationValues() :
+ theTranslator->trCompoundMembers()) << "</th></tr>" << endl;
}
-void HtmlGenerator::endMemberDocSimple()
+void HtmlGenerator::endMemberDocSimple(bool)
{
DBG_HTML(t << "<!-- endMemberDocSimple -->" << endl;)
t << "</table>" << endl;
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 924d04f..70e4b5f 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -140,7 +140,7 @@ class HtmlGenerator : public OutputGenerator
void startTitle() { t << "<div class=\"title\">"; }
void endTitle() { t << "</div>"; }
- void startParagraph();
+ void startParagraph(const char *classDef);
void endParagraph();
void writeString(const char *text);
void startIndexListItem();
@@ -225,7 +225,9 @@ class HtmlGenerator : public OutputGenerator
void endDescForItem() { t << "</dd>\n"; }
void lineBreak(const char *style);
void writeChar(char c);
- void startMemberDoc(const char *,const char *,const char *,const char *,bool);
+ void startMemberDoc(const char *clName, const char *memName,
+ const char *anchor, const char *title,
+ int memCount, int memTotal, bool showInline);
void endMemberDoc(bool);
void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name,
@@ -270,25 +272,16 @@ class HtmlGenerator : public OutputGenerator
void startContents();
void endContents();
void writeNonBreakableSpace(int);
-
- void startDescTable(const char *title)
- //{ t << "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\">" << endl; }
- { t << "<table class=\"fieldtable\">" << endl
- << "<tr><th colspan=\"2\">" << title << "</th></tr>";
- }
- void endDescTable()
- { t << "</table>" << endl; }
- void startDescTableTitle()
- //{ t << "<tr><td valign=\"top\"><em>"; }
- { t << "<tr><td class=\"fieldname\">"; }
- void endDescTableTitle()
- { t << "&#160;</td>"; }
- void startDescTableData()
- //{ t << "<td>" << endl; }
- { t << "<td class=\"fielddoc\">" << endl; }
- void endDescTableData()
- { t << "</td></tr>" << endl; }
-
+
+ void startDescTable(const char *title);
+ void endDescTable();
+ void startDescTableRow();
+ void endDescTableRow();
+ void startDescTableTitle();
+ void endDescTableTitle();
+ void startDescTableData();
+ void endDescTableData();
+
void startDotGraph();
void endDotGraph(const DotClassGraph &g);
void startInclDepGraph();
@@ -328,8 +321,8 @@ class HtmlGenerator : public OutputGenerator
void endConstraintDocs();
void endConstraintList();
- void startMemberDocSimple();
- void endMemberDocSimple();
+ void startMemberDocSimple(bool);
+ void endMemberDocSimple(bool);
void startInlineMemberType();
void endInlineMemberType();
void startInlineMemberName();
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index a283338..ad56de8 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -134,7 +134,8 @@ static QCString field2URL(const IndexField *f,bool checkReversed)
QCString result = f->url + Doxygen::htmlFileExtension;
if (!f->anchor.isEmpty() && (!checkReversed || f->reversed))
{
- result+="#"+f->anchor;
+ // HTML Help needs colons in link anchors to be escaped in the .hhk file.
+ result+="#"+substitute(f->anchor,":","%3A");
}
return result;
}
@@ -190,7 +191,7 @@ void HtmlHelpIndex::writeFields(FTextStream &t)
{ // finish old list at level 2
if (level2Started) t << " </UL>" << endl;
level2Started=FALSE;
-
+
// <Antony>
// Added this code so that an item with only one subitem is written
// without any subitem.
@@ -214,7 +215,7 @@ void HtmlHelpIndex::writeFields(FTextStream &t)
if (level2.isEmpty())
{
t << " <LI><OBJECT type=\"text/sitemap\">";
- t << "<param name=\"Local\" value=\"" << field2URL(f,TRUE);
+ t << "<param name=\"Local\" value=\"" << field2URL(f,FALSE);
t << "\">";
t << "<param name=\"Name\" value=\"" << m_help->recode(level1) << "\">"
"</OBJECT>\n";
@@ -302,7 +303,7 @@ static QDict<QCString> s_languageDict;
*/
void HtmlHelp::initialize()
{
- const char *str = Config_getString("CHM_INDEX_ENCODING");
+ const char *str = Config_getString(CHM_INDEX_ENCODING);
if (!str) str = "CP1250"; // use safe and likely default
m_fromUtf8 = portable_iconv_open(str,"UTF-8");
if (m_fromUtf8==(void *)(-1))
@@ -312,7 +313,7 @@ void HtmlHelp::initialize()
}
/* open the contents file */
- QCString fName = Config_getString("HTML_OUTPUT") + "/index.hhc";
+ QCString fName = Config_getString(HTML_OUTPUT) + "/index.hhc";
cf = new QFile(fName);
if (!cf->open(IO_WriteOnly))
{
@@ -329,7 +330,7 @@ void HtmlHelp::initialize()
"<UL>\n";
/* open the contents file */
- fName = Config_getString("HTML_OUTPUT") + "/index.hhk";
+ fName = Config_getString(HTML_OUTPUT) + "/index.hhk";
kf = new QFile(fName);
if (!kf->open(IO_WriteOnly))
{
@@ -446,7 +447,7 @@ void HtmlHelp::initialize()
}
-static QCString getLanguageString()
+QCString HtmlHelp::getLanguageString()
{
if (!theTranslator->idLanguage().isEmpty())
{
@@ -465,7 +466,7 @@ static QCString getLanguageString()
void HtmlHelp::createProjectFile()
{
/* Write the project file */
- QCString fName = Config_getString("HTML_OUTPUT") + "/index.hhp";
+ QCString fName = Config_getString(HTML_OUTPUT) + "/index.hhp";
QFile f(fName);
if (f.open(IO_WriteOnly))
{
@@ -473,9 +474,9 @@ void HtmlHelp::createProjectFile()
QCString indexName="index"+Doxygen::htmlFileExtension;
t << "[OPTIONS]\n";
- if (!Config_getString("CHM_FILE").isEmpty())
+ if (!Config_getString(CHM_FILE).isEmpty())
{
- t << "Compiled file=" << Config_getString("CHM_FILE") << "\n";
+ t << "Compiled file=" << Config_getString(CHM_FILE) << "\n";
}
t << "Compatibility=1.1\n"
"Full-text search=Yes\n"
@@ -484,9 +485,9 @@ void HtmlHelp::createProjectFile()
"Default topic=" << indexName << "\n"
"Index file=index.hhk\n"
"Language=" << getLanguageString() << endl;
- if (Config_getBool("BINARY_TOC")) t << "Binary TOC=YES\n";
- if (Config_getBool("GENERATE_CHI")) t << "Create CHI file=YES\n";
- t << "Title=" << recode(Config_getString("PROJECT_NAME")) << endl << endl;
+ if (Config_getBool(BINARY_TOC)) t << "Binary TOC=YES\n";
+ if (Config_getBool(GENERATE_CHI)) t << "Create CHI file=YES\n";
+ t << "Title=" << recode(Config_getString(PROJECT_NAME)) << endl << endl;
t << "[WINDOWS]" << endl;
@@ -500,15 +501,15 @@ void HtmlHelp::createProjectFile()
// are shown. They can only be shown in case of a binary toc.
// dee http://www.mif2go.com/xhtml/htmlhelp_0016_943addingtabsandtoolbarbuttonstohtmlhelp.htm#Rz108x95873
// Value has been taken from htmlhelp.h file of the HTML Help Workshop
- if (Config_getBool("BINARY_TOC"))
+ if (Config_getBool(BINARY_TOC))
{
- t << "main=\"" << recode(Config_getString("PROJECT_NAME")) << "\",\"index.hhc\","
+ t << "main=\"" << recode(Config_getString(PROJECT_NAME)) << "\",\"index.hhc\","
"\"index.hhk\",\"" << indexName << "\",\"" <<
indexName << "\",,,,,0x23520,,0x70387e,,,,,,,,0" << endl << endl;
}
else
{
- t << "main=\"" << recode(Config_getString("PROJECT_NAME")) << "\",\"index.hhc\","
+ t << "main=\"" << recode(Config_getString(PROJECT_NAME)) << "\",\"index.hhc\","
"\"index.hhk\",\"" << indexName << "\",\"" <<
indexName << "\",,,,,0x23520,,0x10387e,,,,,,,,0" << endl << endl;
}
@@ -637,7 +638,7 @@ void HtmlHelp::addContentsItem(bool isDir,
// Tried this and I didn't see any problems, when not using
// the resetting of file and anchor the TOC works better
// (prev / next button)
- //if(Config_getBool("BINARY_TOC") && isDir)
+ //if(Config_getBool(BINARY_TOC) && isDir)
//{
//file = 0;
//anchor = 0;
@@ -681,7 +682,7 @@ void HtmlHelp::addIndexItem(Definition *context,MemberDef *md,
{
if (md)
{
- static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
+ static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
if (context==0) // global member
{
if (md->getGroupDef())
diff --git a/src/htmlhelp.h b/src/htmlhelp.h
index 8191d03..9c3fa04 100644
--- a/src/htmlhelp.h
+++ b/src/htmlhelp.h
@@ -84,6 +84,7 @@ class HtmlHelp : public IndexIntf
void addIndexFile(const char *name);
void addImageFile(const char *);
void addStyleSheetFile(const char *) {}
+ static QCString getLanguageString();
private:
friend class HtmlHelpIndex;
diff --git a/src/image.cpp b/src/image.cpp
index adec5b3..afc67ef 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -209,9 +209,9 @@ static Color palette3[] =
Image::Image(int w,int h)
{
- static int hue = Config_getInt("HTML_COLORSTYLE_HUE");
- static int sat = Config_getInt("HTML_COLORSTYLE_SAT");
- static int gamma = Config_getInt("HTML_COLORSTYLE_GAMMA");
+ static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
+ static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
+ static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
double red1,green1,blue1;
double red2,green2,blue2;
@@ -399,7 +399,7 @@ bool Image::save(const char *fileName,int mode)
return FALSE;
}
#endif
- static bool useTransparency = Config_getBool("FORMULA_TRANSPARENT");
+ static bool useTransparency = Config_getBool(FORMULA_TRANSPARENT);
uchar* buffer;
size_t bufferSize;
LodePNG_Encoder encoder;
diff --git a/src/index.cpp b/src/index.cpp
index 272e86f..d52fa77 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -245,7 +245,7 @@ void startFile(OutputList &ol,const char *name,const char *manName,
const char *title,HighlightedItem hli,bool additionalIndices,
const char *altSidebarName)
{
- static bool disableIndex = Config_getBool("DISABLE_INDEX");
+ static bool disableIndex = Config_getBool(DISABLE_INDEX);
ol.startFile(name,manName,title);
ol.startQuickIndices();
if (!disableIndex)
@@ -258,12 +258,13 @@ void startFile(OutputList &ol,const char *name,const char *manName,
}
ol.writeSplitBar(altSidebarName ? altSidebarName : name);
ol.writeSearchInfo();
+ resetDotNodeNumbering();
}
void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
const QCString &navPath)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
if (!skipNavIndex)
@@ -281,7 +282,7 @@ void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
void endFileWithNavPath(Definition *d,OutputList &ol)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
QCString navPath;
if (generateTreeView)
{
@@ -338,8 +339,8 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
MemberList *enumList = md->enumFieldList();
bool isDir = enumList!=0 && md->isEnumerate();
bool isAnonymous = md->name().find('@')!=-1;
- static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
- static bool extractStatic = Config_getBool("EXTRACT_STATIC");
+ static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
+ static bool extractStatic = Config_getBool(EXTRACT_STATIC);
if (!isAnonymous &&
(!hideUndocMembers || md->hasDocumentation()) &&
(!md->isStatic() || extractStatic)
@@ -401,7 +402,7 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
{
if (cd->isLinkable() && (cd->partOfGroups()==0 || def->definitionType()==Definition::TypeGroup))
{
- static bool inlineSimpleStructs = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
bool isNestedClass = def->definitionType()==Definition::TypeClass;
addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(FALSE),cd->anchor(),
addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
@@ -585,7 +586,7 @@ static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv
return;
}
- static bool tocExpand = TRUE; //Config_getBool("TOC_EXPAND");
+ static bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
bool isDir = dd->subDirs().count()>0 || // there are subdirs
(tocExpand && // or toc expand and
dd->getFiles() && dd->getFiles()->count()>0 // there are files
@@ -635,7 +636,7 @@ static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv
FileDef *fd;
for (;(fd=it.current());++it)
{
- //static bool allExternals = Config_getBool("ALLEXTERNALS");
+ //static bool allExternals = Config_getBool(ALLEXTERNALS);
//if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
//{
// fileCount++;
@@ -693,7 +694,7 @@ static void writeDirTreeNode(OutputList &ol, DirDef *dd, int level, FTVHelp* ftv
FileDef *fd;
for (;(fd=it.current());++it)
{
- //static bool allExternals = Config_getBool("ALLEXTERNALS");
+ //static bool allExternals = Config_getBool(ALLEXTERNALS);
//if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
bool doc,src;
doc = fileVisibleInIndex(fd,src);
@@ -729,7 +730,7 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
}
- static bool fullPathNames = Config_getBool("FULL_PATH_NAMES");
+ static bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
startIndexHierarchy(ol,0);
if (fullPathNames)
{
@@ -753,7 +754,7 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
FileDef *fd;
for (;(fd=fni.current());++fni)
{
- static bool fullPathNames = Config_getBool("FULL_PATH_NAMES");
+ static bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
if (!fullPathNames || fd->getDirDef()==0) // top level file
{
bool doc,src;
@@ -970,7 +971,7 @@ static void writeHierarchicalIndex(OutputList &ol)
ol.startContents();
ol.startTextBlock();
- if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY"))
+ if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
{
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
@@ -1094,7 +1095,7 @@ static void writeSingleFileIndex(OutputList &ol,FileDef *fd)
if (nameOk && (doc || src) && !fd->isReference())
{
QCString path;
- if (Config_getBool("FULL_PATH_NAMES"))
+ if (Config_getBool(FULL_PATH_NAMES))
{
path=stripFromPath(fd->getPath().copy());
}
@@ -1178,9 +1179,9 @@ static void writeFileIndex(OutputList &ol)
startFile(ol,"files",0,title,HLI_Files);
startTitle(ol,0);
- //if (!Config_getString("PROJECT_NAME").isEmpty())
+ //if (!Config_getString(PROJECT_NAME).isEmpty())
//{
- // title.prepend(Config_getString("PROJECT_NAME")+" ");
+ // title.prepend(Config_getString(PROJECT_NAME)+" ");
//}
ol.parseText(title);
endTitle(ol,0,0);
@@ -1193,7 +1194,7 @@ static void writeFileIndex(OutputList &ol)
Doxygen::indexList->incContentsDepth();
}
- ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool("EXTRACT_ALL")));
+ ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool(EXTRACT_ALL)));
ol.endTextBlock();
// ---------------
@@ -1208,7 +1209,7 @@ static void writeFileIndex(OutputList &ol)
OutputNameList outputNameList;
outputNameList.setAutoDelete(TRUE);
- if (Config_getBool("FULL_PATH_NAMES"))
+ if (Config_getBool(FULL_PATH_NAMES))
{
// re-sort input files in (dir,file) output order instead of (file,dir) input order
FileNameListIterator fnli(*Doxygen::inputNameList);
@@ -1240,7 +1241,7 @@ static void writeFileIndex(OutputList &ol)
}
ol.startIndexList();
- if (Config_getBool("FULL_PATH_NAMES"))
+ if (Config_getBool(FULL_PATH_NAMES))
{
outputNameList.sort();
QListIterator<FileList> fnli(outputNameList);
@@ -1459,7 +1460,7 @@ static void writeNamespaceIndex(OutputList &ol)
endTitle(ol,0,0);
ol.startContents();
ol.startTextBlock();
- ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool("EXTRACT_ALL")));
+ ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
ol.endTextBlock();
bool first=TRUE;
@@ -1776,7 +1777,7 @@ static void writeAlphabeticalClassList(OutputList &ol)
int index = getPrefixIndex(cd->className());
//printf("name=%s index=%d %d\n",cd->className().data(),index,cd->protection());
- startLetter=getUtf8CodeToUpper(cd->className(),index);
+ startLetter=getUtf8CodeToLower(cd->className(),index);
indexLettersUsed.add(startLetter);
}
}
@@ -1801,7 +1802,7 @@ static void writeAlphabeticalClassList(OutputList &ol)
// the number of columns in the table
- const int columns = Config_getInt("COLS_IN_ALPHA_INDEX");
+ const int columns = Config_getInt(COLS_IN_ALPHA_INDEX);
int i,j;
int totalItems = headerItems*2 + annotatedClasses; // number of items in the table (headers span 2 items)
@@ -1827,7 +1828,7 @@ static void writeAlphabeticalClassList(OutputList &ol)
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
int index = getPrefixIndex(cd->className());
- startLetter=getUtf8Code(cd->className(),index);
+ startLetter=getUtf8CodeToLower(cd->className(),index);
// Do some sorting again, since the classes are sorted by name with
// prefix, which should be ignored really.
if (cd->getLanguage()==SrcLangExt_VHDL)
@@ -1901,7 +1902,7 @@ static void writeAlphabeticalClassList(OutputList &ol)
}
}
- ol.writeString("<table style=\"margin: 10px; white-space: nowrap;\" align=\"center\" width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
+ ol.writeString("<table class=\"classindex\">\n");
// generate table
for (i=0;i<=maxRows;i++) // foreach table row
{
@@ -2263,7 +2264,7 @@ void initClassMemberIndices()
void addClassMemberNameToIndex(MemberDef *md)
{
- static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS");
+ static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
ClassDef *cd=0;
@@ -2496,8 +2497,8 @@ struct CmhlInfo
static const CmhlInfo *getCmhlInfo(int hl)
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
static CmhlInfo cmhlInfo[] =
{
CmhlInfo("functions", theTranslator->trAll()),
@@ -2520,7 +2521,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
{
if (documentedClassMembers[hl]==0) return;
- static bool disableIndex = Config_getBool("DISABLE_INDEX");
+ static bool disableIndex = Config_getBool(DISABLE_INDEX);
bool multiPageIndex=FALSE;
if (documentedClassMembers[hl]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
@@ -2570,6 +2571,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
if (!disableIndex)
{
ol.writeQuickLinks(TRUE,HLI_Functions,0);
+#if 0
startQuickIndexList(ol);
// index item for global member list
@@ -2600,6 +2602,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
writeQuickMemberIndex(ol,g_memberIndexLetterUsed[hl],page,
getCmhlInfo(hl)->fname,multiPageIndex);
}
+#endif
}
ol.endQuickIndices();
ol.writeSplitBar(fileName);
@@ -2610,7 +2613,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
if (hl==CMHL_All)
{
ol.startTextBlock();
- ol.parseText(lne ? lne->intro() : theTranslator->trCompoundMembersDescription(Config_getBool("EXTRACT_ALL")));
+ ol.parseText(lne ? lne->intro() : theTranslator->trCompoundMembersDescription(Config_getBool(EXTRACT_ALL)));
ol.endTextBlock();
}
else
@@ -2671,8 +2674,8 @@ struct FmhlInfo
static const FmhlInfo *getFmhlInfo(int hl)
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
static FmhlInfo fmhlInfo[] =
{
FmhlInfo("globals", theTranslator->trAll()),
@@ -2693,7 +2696,7 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
{
if (documentedFileMembers[hl]==0) return;
- static bool disableIndex = Config_getBool("DISABLE_INDEX");
+ static bool disableIndex = Config_getBool(DISABLE_INDEX);
bool multiPageIndex=FALSE;
if (documentedFileMembers[hl]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
@@ -2742,6 +2745,7 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
if (!disableIndex)
{
ol.writeQuickLinks(TRUE,HLI_Globals,0);
+#if 0
startQuickIndexList(ol);
// index item for all file member lists
@@ -2770,6 +2774,7 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
writeQuickMemberIndex(ol,g_fileIndexLetterUsed[hl],page,
getFmhlInfo(hl)->fname,multiPageIndex);
}
+#endif
}
ol.endQuickIndices();
ol.writeSplitBar(fileName);
@@ -2780,7 +2785,7 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
if (hl==FMHL_All)
{
ol.startTextBlock();
- ol.parseText(lne ? lne->intro() : theTranslator->trFileMembersDescription(Config_getBool("EXTRACT_ALL")));
+ ol.parseText(lne ? lne->intro() : theTranslator->trFileMembersDescription(Config_getBool(EXTRACT_ALL)));
ol.endTextBlock();
}
else
@@ -2836,8 +2841,8 @@ struct NmhlInfo
static const NmhlInfo *getNmhlInfo(int hl)
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
static NmhlInfo nmhlInfo[] =
{
NmhlInfo("namespacemembers", theTranslator->trAll()),
@@ -2860,7 +2865,7 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
{
if (documentedNamespaceMembers[hl]==0) return;
- static bool disableIndex = Config_getBool("DISABLE_INDEX");
+ static bool disableIndex = Config_getBool(DISABLE_INDEX);
bool multiPageIndex=FALSE;
@@ -2910,6 +2915,7 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
if (!disableIndex)
{
ol.writeQuickLinks(TRUE,HLI_NamespaceMembers,0);
+#if 0
startQuickIndexList(ol);
// index item for all namespace member lists
@@ -2938,7 +2944,7 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
writeQuickMemberIndex(ol,g_namespaceIndexLetterUsed[hl],page,
getNmhlInfo(hl)->fname,multiPageIndex);
}
-
+#endif
}
ol.endQuickIndices();
ol.writeSplitBar(fileName);
@@ -2949,7 +2955,7 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
if (hl==NMHL_All)
{
ol.startTextBlock();
- ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceMemberDescription(Config_getBool("EXTRACT_ALL")));
+ ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceMemberDescription(Config_getBool(EXTRACT_ALL)));
ol.endTextBlock();
}
else
@@ -2964,6 +2970,7 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
g_namespaceIndexLetterUsed[hl],
Definition::TypeNamespace);
endFile(ol);
+ first=FALSE;
}
if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
ol.popGeneratorState();
@@ -2978,7 +2985,7 @@ static void writeNamespaceMemberIndex(OutputList &ol)
Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),0,"namespacemembers",0);
Doxygen::indexList->incContentsDepth();
}
- //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
writeNamespaceMemberIndexFiltered(ol,NMHL_All);
writeNamespaceMemberIndexFiltered(ol,NMHL_Functions);
writeNamespaceMemberIndexFiltered(ol,NMHL_Variables);
@@ -3084,7 +3091,7 @@ static void countRelatedPages(int &docPages,int &indexPages)
static bool mainPageHasOwnTitle()
{
- static QCString projectName = Config_getString("PROJECT_NAME");
+ static QCString projectName = Config_getString(PROJECT_NAME);
QCString title;
if (Doxygen::mainPage)
{
@@ -3244,14 +3251,14 @@ static int countDirs()
void writeGraphInfo(OutputList &ol)
{
- if (!Config_getBool("HAVE_DOT") || !Config_getBool("GENERATE_HTML")) return;
+ if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- generateGraphLegend(Config_getString("HTML_OUTPUT"));
+ generateGraphLegend(Config_getString(HTML_OUTPUT));
- bool &stripCommentsStateRef = Config_getBool("STRIP_CODE_COMMENTS");
+ bool &stripCommentsStateRef = Config_getBool(STRIP_CODE_COMMENTS);
bool oldStripCommentsState = stripCommentsStateRef;
- bool &createSubdirs = Config_getBool("CREATE_SUBDIRS");
+ bool &createSubdirs = Config_getBool(CREATE_SUBDIRS);
bool oldCreateSubdirs = createSubdirs;
// temporarily disable the stripping of comments for our own code example!
stripCommentsStateRef = FALSE;
@@ -3291,8 +3298,8 @@ void writeGraphInfo(OutputList &ol)
*/
static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
{
- //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- //bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
if (level>20)
{
warn(gd->getDefFileName(),gd->getDefLine(),
@@ -3306,7 +3313,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp*
*/
if (/*!gd->visited &&*/ (!gd->isASubGroup() || level>0) &&
gd->isVisible() &&
- (!gd->isReference() || Config_getBool("EXTERNAL_GROUPS")) // hide external groups by default
+ (!gd->isReference() || Config_getBool(EXTERNAL_GROUPS)) // hide external groups by default
)
{
//printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers());
@@ -3314,7 +3321,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp*
bool hasSubGroups = gd->getSubGroups()->count()>0;
bool hasSubPages = gd->getPages()->count()>0;
int numSubItems = 0;
- if (1 /*Config_getBool("TOC_EXPAND")*/)
+ if (1 /*Config_getBool(TOC_EXPAND)*/)
{
QListIterator<MemberList> mli(gd->getMemberLists());
MemberList *ml;
@@ -3560,7 +3567,7 @@ static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
#if 0
static void writeGroupTree(GroupDef *gd,FTVHelp *ftv,int level,bool addToIndex)
{
- static bool externalGroups = Config_getBool("EXTERNAL_GROUPS");
+ static bool externalGroups = Config_getBool(EXTERNAL_GROUPS);
/* Some groups should appear twice under different parent-groups.
* That is why we should not check if it was visited
*/
@@ -3689,7 +3696,7 @@ static void writeDirIndex(OutputList &ol)
ol.endTextBlock();
FTVHelp* ftv = 0;
- bool treeView=Config_getBool("USE_INLINE_TREES");
+ bool treeView=Config_getBool(USE_INLINE_TREES);
if (treeView)
{
ftv = new FTVHelp(FALSE);
@@ -3760,9 +3767,9 @@ static void writeUserGroupStubPage(OutputList &ol,LayoutNavEntry *lne)
static void writeIndex(OutputList &ol)
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
- static QCString projectName = Config_getString("PROJECT_NAME");
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ static QCString projectName = Config_getString(PROJECT_NAME);
// save old generator state
ol.pushGeneratorState();
@@ -3810,7 +3817,7 @@ static void writeIndex(OutputList &ol)
}
ol.startQuickIndices();
- if (!Config_getBool("DISABLE_INDEX"))
+ if (!Config_getBool(DISABLE_INDEX))
{
ol.writeQuickLinks(TRUE,HLI_Main,0);
}
@@ -3847,7 +3854,7 @@ static void writeIndex(OutputList &ol)
}
ol.startContents();
- if (Config_getBool("DISABLE_INDEX") && Doxygen::mainPage==0)
+ if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==0)
{
ol.writeQuickLinks(FALSE,HLI_Main,0);
}
@@ -3880,7 +3887,7 @@ static void writeIndex(OutputList &ol)
ol.startFile("refman",0,0);
ol.startIndexSection(isTitlePageStart);
- if (!Config_getString("LATEX_HEADER").isEmpty())
+ if (!Config_getString(LATEX_HEADER).isEmpty())
{
ol.disable(OutputGenerator::Latex);
}
@@ -3894,10 +3901,10 @@ static void writeIndex(OutputList &ol)
ol.parseText(projPrefix);
}
- if (!Config_getString("PROJECT_NUMBER").isEmpty())
+ if (!Config_getString(PROJECT_NUMBER).isEmpty())
{
ol.startProjectNumber();
- ol.generateDoc(defFileName,defLine,Doxygen::mainPage,0,Config_getString("PROJECT_NUMBER"),FALSE,FALSE);
+ ol.generateDoc(defFileName,defLine,Doxygen::mainPage,0,Config_getString(PROJECT_NUMBER),FALSE,FALSE);
ol.endProjectNumber();
}
ol.endIndexSection(isTitlePageStart);
@@ -3968,7 +3975,7 @@ static void writeIndex(OutputList &ol)
}
}
- if (!Config_getBool("LATEX_HIDE_INDICES"))
+ if (!Config_getBool(LATEX_HIDE_INDICES))
{
//if (indexedPages>0)
//{
@@ -4106,7 +4113,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry
break;
case LayoutNavEntry::Namespaces:
{
- static bool showNamespaces = Config_getBool("SHOW_NAMESPACES");
+ static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
if (showNamespaces)
{
if (documentedNamespaces>0 && addToIndex)
@@ -4125,7 +4132,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry
break;
case LayoutNavEntry::NamespaceList:
{
- static bool showNamespaces = Config_getBool("SHOW_NAMESPACES");
+ static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
if (showNamespaces)
{
msg("Generating namespace index...\n");
@@ -4161,7 +4168,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry
case LayoutNavEntry::ClassHierarchy:
msg("Generating hierarchical class index...\n");
writeHierarchicalIndex(ol);
- if (Config_getBool("HAVE_DOT") && Config_getBool("GRAPHICAL_HIERARCHY"))
+ if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
{
msg("Generating graphical class hierarchy...\n");
writeGraphicalClassHierarchy(ol);
@@ -4173,7 +4180,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry
break;
case LayoutNavEntry::Files:
{
- static bool showFiles = Config_getBool("SHOW_FILES");
+ static bool showFiles = Config_getBool(SHOW_FILES);
if (showFiles)
{
if (documentedHtmlFiles>0 && addToIndex)
@@ -4192,7 +4199,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry
break;
case LayoutNavEntry::FileList:
{
- static bool showFiles = Config_getBool("SHOW_FILES");
+ static bool showFiles = Config_getBool(SHOW_FILES);
if (showFiles)
{
msg("Generating file index...\n");
@@ -4276,8 +4283,166 @@ static void writeIndexHierarchyEntries(OutputList &ol,const QList<LayoutNavEntry
}
}
+static bool quickLinkVisible(LayoutNavEntry::Kind kind)
+{
+ static bool showFiles = Config_getBool(SHOW_FILES);
+ static bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
+ switch (kind)
+ {
+ case LayoutNavEntry::MainPage: return TRUE;
+ case LayoutNavEntry::User: return TRUE;
+ case LayoutNavEntry::UserGroup: return TRUE;
+ case LayoutNavEntry::Pages: return indexedPages>0;
+ case LayoutNavEntry::Modules: return documentedGroups>0;
+ case LayoutNavEntry::Namespaces: return documentedNamespaces>0 && showNamespaces;
+ case LayoutNavEntry::NamespaceList: return documentedNamespaces>0 && showNamespaces;
+ case LayoutNavEntry::NamespaceMembers: return documentedNamespaceMembers[NMHL_All]>0;
+ case LayoutNavEntry::Classes: return annotatedClasses>0;
+ case LayoutNavEntry::ClassList: return annotatedClasses>0;
+ case LayoutNavEntry::ClassIndex: return annotatedClasses>0;
+ case LayoutNavEntry::ClassHierarchy: return hierarchyClasses>0;
+ case LayoutNavEntry::ClassMembers: return documentedClassMembers[CMHL_All]>0;
+ case LayoutNavEntry::Files: return documentedHtmlFiles>0 && showFiles;
+ case LayoutNavEntry::FileList: return documentedHtmlFiles>0 && showFiles;
+ case LayoutNavEntry::FileGlobals: return documentedFileMembers[FMHL_All]>0;
+ //case LayoutNavEntry::Dirs: return documentedDirs>0;
+ case LayoutNavEntry::Examples: return Doxygen::exampleSDict->count()>0;
+ }
+ return FALSE;
+}
+
+template<class T>
+void renderMemberIndicesAsJs(FTextStream &t,
+ int total,const int *numDocumented,const LetterToIndexMap<MemberIndexList> *memberLists,
+ const T *(*getInfo)(int hl))
+{
+ // index items per category member lists
+ bool firstMember=TRUE;
+ for (int i=0;i<total;i++)
+ {
+ if (numDocumented[i]>0)
+ {
+ t << ",";
+ if (firstMember)
+ {
+ t << "children:[";
+ firstMember=FALSE;
+ }
+ t << endl << "{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
+ << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
+
+ // Check if we have many members, then add sub entries per letter...
+ // quick alphabetical index
+ bool quickIndex = numDocumented[i]>maxItemsBeforeQuickIndex;
+ if (quickIndex)
+ {
+ bool multiPageIndex=FALSE;
+ if (numDocumented[i]>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
+ {
+ multiPageIndex=TRUE;
+ }
+ t << ",children:[" << endl;
+ bool firstLetter=TRUE;
+ SIntDict<MemberIndexList>::Iterator it(memberLists[i]);
+ MemberIndexList *ml;
+ for (it.toFirst();(ml=it.current());++it)
+ {
+ if (!firstLetter) t << "," << endl;
+ uint letter = ml->letter();
+ QCString is = letterToLabel(letter);
+ QCString ci = QString(QChar(letter)).utf8();
+ QCString anchor;
+ QCString extension=Doxygen::htmlFileExtension;
+ QCString fullName = getInfo(i)->fname;
+ if (!multiPageIndex || firstLetter)
+ anchor=fullName+extension+"#index_";
+ else // other pages of multi page index
+ anchor=fullName+"_"+is+extension+"#index_";
+ t << "{text:\"" << convertToJSString(ci) << "\",url:\""
+ << convertToJSString(anchor+is) << "\"}";
+ firstLetter=FALSE;
+ }
+ t << "]";
+ }
+ t << "}";
+ }
+ }
+ if (!firstMember)
+ {
+ t << "]";
+ }
+}
+
+static bool renderQuickLinksAsJs(FTextStream &t,LayoutNavEntry *root,bool first)
+{
+ QListIterator<LayoutNavEntry> li(root->children());
+ LayoutNavEntry *entry;
+ int count=0;
+ for (li.toFirst();(entry=li.current());++li)
+ {
+ if (entry->visible() && quickLinkVisible(entry->kind())) count++;
+ }
+ if (count>0) // at least one item is visible
+ {
+ bool firstChild = TRUE;
+ if (!first) t << ",";
+ t << "children:[" << endl;
+ for (li.toFirst();(entry=li.current());++li)
+ {
+ if (entry->visible() && quickLinkVisible(entry->kind()))
+ {
+ if (!firstChild) t << "," << endl;
+ firstChild=FALSE;
+ QCString url = entry->url();
+ t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
+ << convertToJSString(url) << "\"";
+ bool hasChildren=FALSE;
+ if (entry->kind()==LayoutNavEntry::NamespaceMembers)
+ {
+ renderMemberIndicesAsJs(t,NMHL_Total,documentedNamespaceMembers,
+ g_namespaceIndexLetterUsed,getNmhlInfo);
+ }
+ else if (entry->kind()==LayoutNavEntry::ClassMembers)
+ {
+ renderMemberIndicesAsJs(t,CMHL_Total,documentedClassMembers,
+ g_memberIndexLetterUsed,getCmhlInfo);
+ }
+ else if (entry->kind()==LayoutNavEntry::FileGlobals)
+ {
+ renderMemberIndicesAsJs(t,FMHL_Total,documentedFileMembers,
+ g_fileIndexLetterUsed,getFmhlInfo);
+ }
+ else // recursive into child list
+ {
+ hasChildren = renderQuickLinksAsJs(t,entry,FALSE);
+ }
+ if (hasChildren) t << "]";
+ t << "}";
+ }
+ }
+ }
+ return count>0;
+}
+
+static void writeMenuData()
+{
+ if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
+ QCString outputDir = Config_getBool(HTML_OUTPUT);
+ QFile f(outputDir+"/menudata.js");
+ LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry();
+ if (f.open(IO_WriteOnly))
+ {
+ FTextStream t(&f);
+ t << "var menudata={";
+ bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
+ if (hasChildren) t << "]";
+ t << "}" << endl;
+ }
+}
+
void writeIndexHierarchy(OutputList &ol)
{
+ writeMenuData();
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry();
if (lne)
{
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 5e7278c..9016c25 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -34,37 +34,13 @@
#include "htmlentity.h"
#include "plantuml.h"
-static QCString escapeLabelName(const char *s)
-{
- QCString result;
- const char *p=s;
- char c;
- if (p)
- {
- while ((c=*p++))
- {
- switch (c)
- {
- case '%': result+="\\%"; break;
- case '|': result+="\\texttt{\"|}"; break;
- case '!': result+="\"!"; break;
- case '{': result+="\\lcurly{}"; break;
- case '}': result+="\\rcurly{}"; break;
- case '~': result+="````~"; break; // to get it a bit better in index together with other special characters
- default: result+=c;
- }
- }
- }
- return result;
-}
-
const int maxLevels=5;
static const char *secLabels[maxLevels] =
{ "section","subsection","subsubsection","paragraph","subparagraph" };
static const char *getSectionName(int level)
{
- static bool compactLatex = Config_getBool("COMPACT_LATEX");
+ static bool compactLatex = Config_getBool(COMPACT_LATEX);
int l = level;
if (compactLatex) l++;
if (Doxygen::insideMainPage) l--;
@@ -114,7 +90,7 @@ static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name,
if (hasCaption)
{
- t << "\n\\caption{";
+ t << "\n\\doxyfigcaption{";
}
}
@@ -236,7 +212,7 @@ void LatexDocVisitor::visit(DocSymbol *s)
void LatexDocVisitor::visit(DocURL *u)
{
if (m_hide) return;
- if (Config_getBool("PDF_HYPERLINKS"))
+ if (Config_getBool(PDF_HYPERLINKS))
{
m_t << "\\href{";
if (u->isEmail()) m_t << "mailto:";
@@ -343,7 +319,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
QCString fileName(4096);
fileName.sprintf("%s%d%s",
- (Config_getString("LATEX_OUTPUT")+"/inline_dotgraph_").data(),
+ (Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_").data(),
dotindex++,
".dot"
);
@@ -361,7 +337,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
visitCaption(this, s->children());
endDotFile(s->hasCaption());
- if (Config_getBool("DOT_CLEANUP")) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) file.remove();
}
}
break;
@@ -371,7 +347,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d",
- (Config_getString("LATEX_OUTPUT")+"/inline_mscgraph_").data(),
+ (Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_").data(),
mscindex++
);
QFile file(baseName+".msc");
@@ -389,13 +365,13 @@ void LatexDocVisitor::visit(DocVerbatim *s)
writeMscFile(baseName, s);
- if (Config_getBool("DOT_CLEANUP")) file.remove();
+ if (Config_getBool(DOT_CLEANUP)) file.remove();
}
}
break;
case DocVerbatim::PlantUML:
{
- QCString latexOutput = Config_getString("LATEX_OUTPUT");
+ QCString latexOutput = Config_getString(LATEX_OUTPUT);
QCString baseName = writePlantUMLSource(latexOutput,s->exampleFile(),s->text());
writePlantUMLFile(baseName, s);
@@ -408,10 +384,10 @@ void LatexDocVisitor::visit(DocAnchor *anc)
{
if (m_hide) return;
m_t << "\\label{" << stripPath(anc->file()) << "_" << anc->anchor() << "}%" << endl;
- if (!anc->file().isEmpty() && Config_getBool("PDF_HYPERLINKS"))
+ if (!anc->file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
{
- m_t << "\\hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor()
- << "}{}%" << endl;
+ m_t << "\\Hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor()
+ << "}%" << endl;
}
}
@@ -431,7 +407,14 @@ void LatexDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
- inc->exampleFile(), &fd);
+ inc->exampleFile(),
+ &fd, // fileDef,
+ -1, // start line
+ -1, // end line
+ FALSE, // inline fragment
+ 0, // memberDef
+ TRUE // show line numbers
+ );
m_t << "\\end{DoxyCodeInclude}" << endl;
}
break;
@@ -440,7 +423,14 @@ void LatexDocVisitor::visit(DocInclude *inc)
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
inc->text(),langExt,inc->isExample(),
- inc->exampleFile());
+ inc->exampleFile(),
+ 0, // fileDef
+ -1, // startLine
+ -1, // endLine
+ TRUE, // inlineFragment
+ 0, // memberDef
+ FALSE
+ );
m_t << "\\end{DoxyCodeInclude}\n";
break;
case DocInclude::DontInclude:
@@ -469,6 +459,33 @@ void LatexDocVisitor::visit(DocInclude *inc)
m_t << "\\end{DoxyCodeInclude}" << endl;
}
break;
+ case DocInclude::SnipWithLines:
+ {
+ QFileInfo cfi( inc->file() );
+ FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ m_t << "\n\\begin{DoxyCodeInclude}\n";
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile(),
+ &fd,
+ lineBlock(inc->text(),inc->blockId()),
+ -1, // endLine
+ FALSE, // inlineFragment
+ 0, // memberDef
+ TRUE // show line number
+ );
+ m_t << "\\end{DoxyCodeInclude}" << endl;
+ }
+ break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
}
@@ -515,8 +532,10 @@ void LatexDocVisitor::visit(DocFormula *f)
void LatexDocVisitor::visit(DocIndexEntry *i)
{
if (m_hide) return;
- m_t << "\\index{" << escapeLabelName(i->entry()) << "@{";
- escapeMakeIndexChars(i->entry());
+ m_t << "\\index{";
+ m_t << latexEscapeLabelName(i->entry(),false);
+ m_t << "@{";
+ m_t << latexEscapeIndexChars(i->entry(),false);
m_t << "}}";
}
@@ -786,7 +805,7 @@ void LatexDocVisitor::visitPost(DocSimpleListItem *)
void LatexDocVisitor::visitPre(DocSection *s)
{
if (m_hide) return;
- if (Config_getBool("PDF_HYPERLINKS"))
+ if (Config_getBool(PDF_HYPERLINKS))
{
m_t << "\\hypertarget{" << stripPath(s->file()) << "_" << s->anchor() << "}{}";
}
@@ -908,7 +927,7 @@ static void writeStartTableCommand(FTextStream &t,const DocNode *n,int cols)
}
else
{
- t << "\\tabulinesep=1mm\n\\begin{longtabu} spread 0pt [c]{*" << cols << "{|X[-1]}|}\n";
+ t << "\\tabulinesep=1mm\n\\begin{longtabu} spread 0pt [c]{*{" << cols << "}{|X[-1]}|}\n";
}
//return isNested ? "TabularNC" : "TabularC";
}
@@ -933,7 +952,7 @@ void LatexDocVisitor::visitPre(DocHtmlTable *t)
if (t->hasCaption())
{
DocHtmlCaption *c = t->caption();
- static bool pdfHyperLinks = Config_getBool("PDF_HYPERLINKS");
+ static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
if (!c->file().isEmpty() && pdfHyperLinks)
{
m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
@@ -1150,7 +1169,7 @@ void LatexDocVisitor::visitPre(DocHtmlCell *c)
}
if (c->isHeading())
{
- m_t << "{\\bf ";
+ m_t << "\\textbf{ ";
}
if (cs>1)
{
@@ -1195,7 +1214,7 @@ void LatexDocVisitor::visitPost(DocInternal *)
void LatexDocVisitor::visitPre(DocHRef *href)
{
if (m_hide) return;
- if (Config_getBool("PDF_HYPERLINKS"))
+ if (Config_getBool(PDF_HYPERLINKS))
{
m_t << "\\href{";
m_t << href->url();
@@ -1333,7 +1352,7 @@ void LatexDocVisitor::visitPre(DocSecRefItem *ref)
{
if (m_hide) return;
m_t << "\\item \\contentsline{section}{";
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (pdfHyperlinks)
{
m_t << "\\hyperlink{" << ref->file() << "_" << ref->anchor() << "}{" ;
@@ -1343,7 +1362,7 @@ void LatexDocVisitor::visitPre(DocSecRefItem *ref)
void LatexDocVisitor::visitPost(DocSecRefItem *ref)
{
if (m_hide) return;
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (pdfHyperlinks)
{
m_t << "}";
@@ -1541,13 +1560,13 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
m_t << "}" << endl;
bool anonymousEnum = x->file()=="@";
m_t << "\\item[";
- if (Config_getBool("PDF_HYPERLINKS") && !anonymousEnum)
+ if (Config_getBool(PDF_HYPERLINKS) && !anonymousEnum)
{
m_t << "\\hyperlink{" << stripPath(x->file()) << "_" << x->anchor() << "}{";
}
else
{
- m_t << "{\\bf ";
+ m_t << "\\textbf{ ";
}
m_insideItem=TRUE;
filter(x->title());
@@ -1629,7 +1648,7 @@ void LatexDocVisitor::filter(const char *str)
void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor,bool refToTable)
{
- static bool pdfHyperLinks = Config_getBool("PDF_HYPERLINKS");
+ static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
{
if (refToTable)
@@ -1655,14 +1674,14 @@ void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const Q
}
else // external link
{
- m_t << "{\\bf ";
+ m_t << "\\textbf{ ";
}
}
void LatexDocVisitor::endLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
m_t << "}";
- static bool pdfHyperLinks = Config_getBool("PDF_HYPERLINKS");
+ static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
if (ref.isEmpty() && !pdfHyperLinks)
{
m_t << "{";
@@ -1703,7 +1722,7 @@ void LatexDocVisitor::startDotFile(const QCString &fileName,
baseName=baseName.left(i);
}
baseName.prepend("dot_");
- QCString outDir = Config_getString("LATEX_OUTPUT");
+ QCString outDir = Config_getString(LATEX_OUTPUT);
QCString name = fileName;
writeDotGraphFromFile(name,outDir,baseName,GOF_EPS);
visitPreStart(m_t,hasCaption, baseName, width, height);
@@ -1733,7 +1752,7 @@ void LatexDocVisitor::startMscFile(const QCString &fileName,
}
baseName.prepend("msc_");
- QCString outDir = Config_getString("LATEX_OUTPUT");
+ QCString outDir = Config_getString(LATEX_OUTPUT);
writeMscGraphFromFile(fileName,outDir,baseName,MSC_EPS);
visitPreStart(m_t,hasCaption, baseName, width, height);
}
@@ -1753,7 +1772,7 @@ void LatexDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("LATEX_OUTPUT");
+ QCString outDir = Config_getString(LATEX_OUTPUT);
writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_EPS);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
visitCaption(this, s->children());
@@ -1779,7 +1798,7 @@ void LatexDocVisitor::startDiaFile(const QCString &fileName,
}
baseName.prepend("dia_");
- QCString outDir = Config_getString("LATEX_OUTPUT");
+ QCString outDir = Config_getString(LATEX_OUTPUT);
writeDiaGraphFromFile(fileName,outDir,baseName,DIA_EPS);
visitPreStart(m_t,hasCaption, baseName, width, height);
}
@@ -1799,7 +1818,7 @@ void LatexDocVisitor::writeDiaFile(const QCString &baseName, DocVerbatim *s)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("LATEX_OUTPUT");
+ QCString outDir = Config_getString(LATEX_OUTPUT);
writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_EPS);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(), s->height());
visitCaption(this, s->children());
@@ -1814,7 +1833,7 @@ void LatexDocVisitor::writePlantUMLFile(const QCString &baseName, DocVerbatim *s
{
shortName=shortName.right(shortName.length()-i-1);
}
- QCString outDir = Config_getString("LATEX_OUTPUT");
+ QCString outDir = Config_getString(LATEX_OUTPUT);
generatePlantUMLOutput(baseName,outDir,PUML_EPS);
visitPreStart(m_t, s->hasCaption(), shortName, s->width(), s->height());
visitCaption(this, s->children());
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 66a1f8e..8d338ae 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -43,13 +43,13 @@
LatexCodeGenerator::LatexCodeGenerator(FTextStream &t,const QCString &relPath,const QCString &sourceFileName)
: m_relPath(relPath), m_sourceFileName(sourceFileName), m_col(0)
{
- m_prettyCode=Config_getBool("LATEX_SOURCE_CODE");
+ m_prettyCode=Config_getBool(LATEX_SOURCE_CODE);
setTextStream(t);
}
-LatexCodeGenerator::LatexCodeGenerator() : m_col(0), m_streamSet(FALSE)
+LatexCodeGenerator::LatexCodeGenerator() : m_streamSet(FALSE), m_col(0)
{
- m_prettyCode=Config_getBool("LATEX_SOURCE_CODE");
+ m_prettyCode=Config_getBool(LATEX_SOURCE_CODE);
}
void LatexCodeGenerator::setTextStream(FTextStream &t)
@@ -76,7 +76,7 @@ void LatexCodeGenerator::codify(const char *str)
char c;
//char cs[5];
int spacesToNextTabStop;
- static int tabSize = Config_getInt("TAB_SIZE");
+ static int tabSize = Config_getInt(TAB_SIZE);
const int maxLineLen = 108;
QCString result(4*maxLineLen+1); // worst case for 1 line of 4-byte chars
int i;
@@ -161,8 +161,8 @@ void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
const char *anchor,const char *name,
const char *)
{
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
int l = qstrlen(name);
if (m_col+l>80)
{
@@ -188,8 +188,8 @@ void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
{
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (m_prettyCode)
{
QCString lineNumber;
@@ -199,11 +199,11 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
{
QCString lineAnchor;
lineAnchor.sprintf("_l%05d",l);
- lineAnchor.prepend(m_sourceFileName);
+ lineAnchor.prepend(stripExtensionGeneral(m_sourceFileName, ".tex"));
//if (!m_prettyCode) return;
if (usePDFLatex && pdfHyperlinks)
{
- m_t << "\\hypertarget{" << stripPath(lineAnchor) << "}{}";
+ m_t << "\\Hypertarget{" << stripPath(lineAnchor) << "}";
}
writeCodeLink(ref,fileName,anchor,lineNumber,0);
}
@@ -245,14 +245,14 @@ void LatexCodeGenerator::endFontClass()
LatexGenerator::LatexGenerator() : OutputGenerator()
{
- dir=Config_getString("LATEX_OUTPUT");
+ dir=Config_getString(LATEX_OUTPUT);
//printf("LatexGenerator::LatexGenerator() insideTabbing=FALSE\n");
insideTabbing=FALSE;
firstDescItem=TRUE;
disableLinks=FALSE;
m_indent=0;
templateMemberItem = FALSE;
- m_prettyCode=Config_getBool("LATEX_SOURCE_CODE");
+ m_prettyCode=Config_getBool(LATEX_SOURCE_CODE);
}
LatexGenerator::~LatexGenerator()
@@ -262,7 +262,7 @@ LatexGenerator::~LatexGenerator()
static void writeLatexMakefile()
{
bool generateBib = !Doxygen::citeDict->isEmpty();
- QCString dir=Config_getString("LATEX_OUTPUT");
+ QCString dir=Config_getString(LATEX_OUTPUT);
QCString fileName=dir+"/Makefile";
QFile file(fileName);
if (!file.open(IO_WriteOnly))
@@ -271,11 +271,11 @@ static void writeLatexMakefile()
exit(1);
}
// inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
- QCString latex_command = Config_getString("LATEX_CMD_NAME");
- QCString mkidx_command = Config_getString("MAKEINDEX_CMD_NAME");
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
// end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
FTextStream t(&file);
- if (!Config_getBool("USE_PDFLATEX")) // use plain old latex
+ if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
t << "all: refman.dvi" << endl
<< endl
@@ -354,10 +354,10 @@ static void writeLatexMakefile()
static void writeMakeBat()
{
#if defined(_MSC_VER)
- QCString dir=Config_getString("LATEX_OUTPUT");
+ QCString dir=Config_getString(LATEX_OUTPUT);
QCString fileName=dir+"/make.bat";
- QCString latex_command = Config_getString("LATEX_CMD_NAME");
- QCString mkidx_command = Config_getString("MAKEINDEX_CMD_NAME");
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
QFile file(fileName);
bool generateBib = !Doxygen::citeDict->isEmpty();
if (!file.open(IO_WriteOnly))
@@ -369,7 +369,7 @@ static void writeMakeBat()
t << "set Dir_Old=%cd%\n";
t << "cd /D %~dp0\n\n";
t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n";
- if (!Config_getBool("USE_PDFLATEX")) // use plain old latex
+ if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
t << latex_command << " refman.tex\n";
t << "echo ----\n";
@@ -437,7 +437,7 @@ static void writeMakeBat()
void LatexGenerator::init()
{
- QCString dir=Config_getString("LATEX_OUTPUT");
+ QCString dir=Config_getString(LATEX_OUTPUT);
QDir d(dir);
if (!d.exists() && !d.mkdir(dir))
{
@@ -456,12 +456,12 @@ static void writeDefaultHeaderPart1(FTextStream &t)
// part 1
// Handle batch mode
- if (Config_getBool("LATEX_BATCHMODE"))
+ if (Config_getBool(LATEX_BATCHMODE))
t << "\\batchmode\n";
// Set document class depending on configuration
QCString documentClass;
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
documentClass = "article";
else
documentClass = "book";
@@ -474,7 +474,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\usepackage{calc}\n"
"\\usepackage{doxygen}\n"
"\\usepackage[export]{adjustbox} % also loads graphicx\n";
- QStrList extraLatexStyle = Config_getList("LATEX_EXTRA_STYLESHEET");
+ QStrList extraLatexStyle = Config_getList(LATEX_EXTRA_STYLESHEET);
for (uint i=0; i<extraLatexStyle.count(); ++i)
{
QCString fileName(extraLatexStyle.at(i));
@@ -535,7 +535,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\n";
// Define page & text layout
- QCString paperName=Config_getEnum("PAPER_TYPE");
+ QCString paperName=Config_getEnum(PAPER_TYPE);
// "a4wide" package is obsolete (see bug 563698)
t << "% Page & text layout\n"
"\\usepackage{geometry}\n"
@@ -572,11 +572,11 @@ static void writeDefaultHeaderPart1(FTextStream &t)
// Headers & footers
QGString genString;
QCString generatedBy;
- static bool timeStamp = Config_getBool("LATEX_TIMESTAMP");
+ static bool timeStamp = Config_getBool(LATEX_TIMESTAMP);
FTextStream tg(&genString);
if (timeStamp)
{
- generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), Config_getString("PROJECT_NAME"));
+ generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), Config_getString(PROJECT_NAME));
}
else
{
@@ -599,7 +599,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\fancyfoot[CO]{\\fancyplain{}{}}\n"
"\\fancyfoot[RO]{\\fancyplain{}{}}\n"
"\\renewcommand{\\footrulewidth}{0.4pt}\n";
- if (!Config_getBool("COMPACT_LATEX"))
+ if (!Config_getBool(COMPACT_LATEX))
{
t << "\\renewcommand{\\chaptermark}[1]{%\n"
" \\markboth{#1}{}%\n"
@@ -619,24 +619,10 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\makeindex\n"
"\n";
- // User-specified packages
- QStrList &extraPackages = Config_getList("EXTRA_PACKAGES");
- if (!extraPackages.isEmpty()) {
- t << "% Packages requested by user\n";
- const char *pkgName=extraPackages.first();
- while (pkgName)
- {
- if ((pkgName[0] == '[') || (pkgName[0] == '{'))
- t << "\\usepackage" << pkgName << "\n";
- else
- t << "\\usepackage{" << pkgName << "}\n";
- pkgName=extraPackages.next();
- }
- t << "\n";
- }
+ writeExtraLatexPackages(t);
// Hyperlinks
- bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (pdfHyperlinks)
{
t << "% Hyperlinks (required, but should be loaded last)\n"
@@ -676,7 +662,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
// Front matter
t << "% Titlepage & ToC\n";
- bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ bool usePDFLatex = Config_getBool(USE_PDFLATEX);
if (pdfHyperlinks && usePDFLatex)
{
// To avoid duplicate page anchors due to reuse of same numbers for
@@ -687,7 +673,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
<< " pdfencoding=unicode\n"
<< " }\n";
}
- t << "\\pagenumbering{roman}\n"
+ t << "\\pagenumbering{alph}\n"
"\\begin{titlepage}\n"
"\\vspace*{7cm}\n"
"\\begin{center}%\n"
@@ -708,22 +694,23 @@ static void writeDefaultHeaderPart3(FTextStream &t)
// part 3
// Finalize project number
t << " Doxygen " << versionString << "}\\\\\n";
- if (Config_getBool("LATEX_TIMESTAMP"))
+ if (Config_getBool(LATEX_TIMESTAMP))
t << "\\vspace*{0.5cm}\n"
"{\\small " << dateToString(TRUE) << "}\\\\\n";
t << "\\end{center}\n"
"\\end{titlepage}\n";
- bool compactLatex = Config_getBool("COMPACT_LATEX");
+ bool compactLatex = Config_getBool(COMPACT_LATEX);
if (!compactLatex)
t << "\\clearemptydoublepage\n";
+ t << "\\pagenumbering{roman}\n";
// ToC
t << "\\tableofcontents\n";
if (!compactLatex)
t << "\\clearemptydoublepage\n";
t << "\\pagenumbering{arabic}\n";
- bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ bool usePDFLatex = Config_getBool(USE_PDFLATEX);
if (pdfHyperlinks && usePDFLatex)
{
// re-enable anchors again
@@ -749,7 +736,7 @@ static void writeDefaultFooter(FTextStream &t)
// Index
t << "% Index\n";
QCString unit;
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
{
unit = "section";
}
@@ -795,7 +782,7 @@ void LatexGenerator::writeStyleSheetFile(QFile &f)
void LatexGenerator::startFile(const char *name,const char *,const char *)
{
#if 0
- setEncoding(Config_getString("LATEX_OUTPUT_ENCODING"));
+ setEncoding(Config_getString(LATEX_OUTPUT_ENCODING));
#endif
QCString fileName=name;
relPath = relativePathToRoot(fileName);
@@ -824,8 +811,8 @@ void LatexGenerator::startProjectNumber()
void LatexGenerator::startIndexSection(IndexSections is)
{
- bool &compactLatex = Config_getBool("COMPACT_LATEX");
- QCString &latexHeader = Config_getString("LATEX_HEADER");
+ bool &compactLatex = Config_getBool(COMPACT_LATEX);
+ QCString &latexHeader = Config_getString(LATEX_HEADER);
switch (is)
{
case isTitlePageStart:
@@ -838,9 +825,9 @@ void LatexGenerator::startIndexSection(IndexSections is)
{
QCString header = fileToString(latexHeader);
t << substituteKeywords(header,"",
- convertToLaTeX(Config_getString("PROJECT_NAME")),
- convertToLaTeX(Config_getString("PROJECT_NUMBER")),
- convertToLaTeX(Config_getString("PROJECT_BRIEF")));
+ convertToLaTeX(Config_getString(PROJECT_NAME)),
+ convertToLaTeX(Config_getString(PROJECT_NUMBER)),
+ convertToLaTeX(Config_getString(PROJECT_BRIEF)));
}
}
break;
@@ -999,10 +986,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
void LatexGenerator::endIndexSection(IndexSections is)
{
- //static bool compactLatex = Config_getBool("COMPACT_LATEX");
- static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
- static QCString latexHeader = Config_getString("LATEX_HEADER");
- static QCString latexFooter = Config_getString("LATEX_FOOTER");
+ //static bool compactLatex = Config_getBool(COMPACT_LATEX);
+ static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ static QCString latexHeader = Config_getString(LATEX_HEADER);
+ static QCString latexFooter = Config_getString(LATEX_FOOTER);
switch (is)
{
case isTitlePageStart:
@@ -1015,10 +1002,10 @@ void LatexGenerator::endIndexSection(IndexSections is)
break;
case isMainPage:
{
- //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index";
+ //QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
QCString indexName="index";
t << "}\n\\label{index}";
- if (Config_getBool("PDF_HYPERLINKS")) t << "\\hypertarget{index}{}";
+ if (Config_getBool(PDF_HYPERLINKS)) t << "\\hypertarget{index}{}";
t << "\\input{" << indexName << "}\n";
}
break;
@@ -1236,9 +1223,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
{
QCString footer = fileToString(latexFooter);
t << substituteKeywords(footer,"",
- convertToLaTeX(Config_getString("PROJECT_NAME")),
- convertToLaTeX(Config_getString("PROJECT_NUMBER")),
- convertToLaTeX(Config_getString("PROJECT_BRIEF")));
+ convertToLaTeX(Config_getString(PROJECT_NAME)),
+ convertToLaTeX(Config_getString(PROJECT_NUMBER)),
+ convertToLaTeX(Config_getString(PROJECT_BRIEF)));
}
break;
}
@@ -1246,7 +1233,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
void LatexGenerator::writePageLink(const char *name, bool /*first*/)
{
- //bool &compactLatex = Config_getBool("COMPACT_LATEX");
+ //bool &compactLatex = Config_getBool(COMPACT_LATEX);
// next is remove for bug615957
//if (compactLatex || first) t << "\\input" ; else t << "\\include";
t << "\\input" ;
@@ -1269,7 +1256,7 @@ void LatexGenerator::newParagraph()
t << endl << endl;
}
-void LatexGenerator::startParagraph()
+void LatexGenerator::startParagraph(const char *)
{
t << endl << endl;
}
@@ -1305,13 +1292,13 @@ void LatexGenerator::endIndexItem(const char *ref,const char *fn)
//{
// t << "\\item\\contentsline{section}{";
// docify(text);
-// t << "}{\\pageref{" << text << "}}" << endl;
+// t << "}{\\pageref{" << stripPath(text) << "}}" << endl;
//}
void LatexGenerator::startHtmlLink(const char *url)
{
- if (Config_getBool("PDF_HYPERLINKS"))
+ if (Config_getBool(PDF_HYPERLINKS))
{
t << "\\href{";
t << url;
@@ -1327,7 +1314,7 @@ void LatexGenerator::endHtmlLink()
//void LatexGenerator::writeMailLink(const char *url)
//{
-// if (Config_getBool("PDF_HYPERLINKS"))
+// if (Config_getBool(PDF_HYPERLINKS))
// {
// t << "\\href{mailto:";
// t << url;
@@ -1349,7 +1336,7 @@ void LatexGenerator::writeStartAnnoItem(const char *,const char *,
void LatexGenerator::writeEndAnnoItem(const char *name)
{
- t << "}{\\pageref{" << name << "}}{}" << endl;
+ t << "}{\\pageref{" << stripPath(name) << "}}{}" << endl;
}
void LatexGenerator::startIndexKey()
@@ -1370,7 +1357,7 @@ void LatexGenerator::startIndexValue(bool hasBrief)
void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/)
{
//if (hasBrief) t << ")";
- t << "}{\\pageref{" << name << "}}{}" << endl;
+ t << "}{\\pageref{" << stripPath(name) << "}}{}" << endl;
}
//void LatexGenerator::writeClassLink(const char *,const char *,
@@ -1383,7 +1370,7 @@ void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/)
void LatexGenerator::startTextLink(const char *f,const char *anchor)
{
- if (!disableLinks && Config_getBool("PDF_HYPERLINKS"))
+ if (!disableLinks && Config_getBool(PDF_HYPERLINKS))
{
t << "\\hyperlink{";
if (f) t << stripPath(f);
@@ -1392,7 +1379,7 @@ void LatexGenerator::startTextLink(const char *f,const char *anchor)
}
else
{
- t << "{\\bf ";
+ t << "\\textbf{ ";
}
}
@@ -1404,7 +1391,7 @@ void LatexGenerator::endTextLink()
void LatexGenerator::writeObjectLink(const char *ref, const char *f,
const char *anchor, const char *text)
{
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (!disableLinks && !ref && pdfHyperlinks)
{
t << "\\hyperlink{";
@@ -1417,7 +1404,7 @@ void LatexGenerator::writeObjectLink(const char *ref, const char *f,
}
else
{
- t << "{\\bf ";
+ t << "\\textbf{ ";
docify(text);
t << "}";
}
@@ -1439,13 +1426,13 @@ void LatexGenerator::endPageRef(const char *clname, const char *anchor)
void LatexGenerator::startTitleHead(const char *fileName)
{
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
if (usePDFLatex && pdfHyperlinks && fileName)
{
t << "\\hypertarget{" << stripPath(fileName) << "}{}";
}
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
{
t << "\\subsection{";
}
@@ -1470,7 +1457,7 @@ void LatexGenerator::endTitleHead(const char *fileName,const char *name)
void LatexGenerator::startTitle()
{
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
{
t << "\\subsection{";
}
@@ -1482,7 +1469,7 @@ void LatexGenerator::startTitle()
void LatexGenerator::startGroupHeader(int extraIndentLevel)
{
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
{
extraIndentLevel++;
}
@@ -1514,7 +1501,7 @@ void LatexGenerator::endGroupHeader(int)
void LatexGenerator::startMemberHeader(const char *)
{
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
{
t << "\\subsubsection*{";
}
@@ -1535,8 +1522,10 @@ void LatexGenerator::startMemberDoc(const char *clname,
const char *memname,
const char *,
const char *title,
+ int memCount,
+ int memTotal,
bool showInline)
-{
+{
if (memname && memname[0]!='@')
{
t << "\\index{";
@@ -1563,19 +1552,19 @@ void LatexGenerator::startMemberDoc(const char *clname,
t << latexEscapeLabelName(clname,insideTabbing);
t << "@{";
t << latexEscapeIndexChars(clname,insideTabbing);
- t << "}";
+ t << "}";
}
t << "}" << endl;
}
static const char *levelLab[] = { "subsubsection","paragraph","subparagraph", "subparagraph" };
- static bool compactLatex = Config_getBool("COMPACT_LATEX");
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
+ static bool compactLatex = Config_getBool(COMPACT_LATEX);
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
int level=0;
if (showInline) level+=2;
if (compactLatex) level++;
- t << "\\" << levelLab[level];
+ t << "\\" << levelLab[level];
- t << "[{";
+ t << "{";
if (pdfHyperlinks)
{
t << "\\texorpdfstring{";
@@ -1585,56 +1574,61 @@ void LatexGenerator::startMemberDoc(const char *clname,
{
t << "}{" << latexEscapePDFString(title) << "}";
}
- t << "}]";
- t << "{\\setlength{\\rightskip}{0pt plus 5cm}";
- disableLinks=TRUE;
+ if (memTotal>1)
+ {
+ t << "\\hspace{0.1cm}{\\footnotesize\\ttfamily [" << memCount << "/" << memTotal << "]}";
+ }
+ t << "}";
+ t << "\n{\\footnotesize\\ttfamily ";
+ //disableLinks=TRUE;
}
void LatexGenerator::endMemberDoc(bool)
{
disableLinks=FALSE;
- t << "}";
- //if (Config_getBool("COMPACT_LATEX")) t << "\\hfill";
+ t << "}\n\n";
+ //if (Config_getBool(COMPACT_LATEX)) t << "\\hfill";
}
void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
const char *anchor, const char *,
const char *)
{
-}
-
-void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor)
-{
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
+ t << "\\mbox{";
if (usePDFLatex && pdfHyperlinks)
{
- t << "\\hypertarget{";
+ t << "\\Hypertarget{";
if (fName) t << stripPath(fName);
if (anchor) t << "_" << anchor;
- t << "}{}";
+ t << "}";
}
t << "\\label{";
if (fName) t << stripPath(fName);
if (anchor) t << "_" << anchor;
- t << "}" << endl;
+ t << "}} " << endl;
+}
+
+void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor)
+{
}
void LatexGenerator::writeAnchor(const char *fName,const char *name)
{
//printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name);
t << "\\label{" << stripPath(name) << "}" << endl;
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
if (usePDFLatex && pdfHyperlinks)
{
if (fName)
{
- t << "\\hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}{}" << endl;
+ t << "\\Hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}" << endl;
}
else
{
- t << "\\hypertarget{" << stripPath(name) << "}{}" << endl;
+ t << "\\Hypertarget{" << stripPath(name) << "}" << endl;
}
}
}
@@ -1669,14 +1663,14 @@ void LatexGenerator::addIndexItem(const char *s1,const char *s2)
void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type)
{
- static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
- static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
+ static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
if (usePDFLatex && pdfHyperlinks)
{
t << "\\hypertarget{" << stripPath(lab) << "}{}";
}
t << "\\";
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
{
switch(type)
{
@@ -1725,7 +1719,7 @@ void LatexGenerator::writeChar(char c)
void LatexGenerator::startClassDiagram()
{
- //if (Config_getBool("COMPACT_LATEX")) t << "\\subsubsection"; else t << "\\subsection";
+ //if (Config_getBool(COMPACT_LATEX)) t << "\\subsubsection"; else t << "\\subsection";
//t << "{";
}
@@ -1833,6 +1827,65 @@ void LatexGenerator::writeNonBreakableSpace(int)
}
}
+// ----------------------------------------------
+// nesting of functions below:
+// startDescTable()
+// - startDescTableRow()
+// - startDescTableTitle()
+// - endDescTabelTitle()
+// - startDescTableData()
+// - endDescTableData()
+// - endDescTableRow()
+// - startDescTableRow()
+// - ...
+// - endDescTableRow()
+// endDescTable()
+
+void LatexGenerator::startDescTable(const char *title)
+{
+ t << "\\begin{DoxyEnumFields}{" << title << "}" << endl;
+}
+
+void LatexGenerator::endDescTable()
+{
+ t << "\\end{DoxyEnumFields}" << endl;
+}
+
+void LatexGenerator::startDescTableRow()
+{
+ // this is needed to prevent the \hypertarget, \label, and \index commands from messing up
+ // the row height (based on http://tex.stackexchange.com/a/186102)
+ t << "\\raisebox{\\heightof{T}}[0pt][0pt]{";
+}
+
+void LatexGenerator::endDescTableRow()
+{
+}
+
+void LatexGenerator::startDescTableTitle()
+{
+ t << "}";
+}
+
+void LatexGenerator::endDescTableTitle()
+{
+}
+
+void LatexGenerator::startDescTableData()
+{
+ t << "&";
+}
+
+void LatexGenerator::endDescTableData()
+{
+ t << "\\\\\n\\hline\n" << endl;
+}
+
+void LatexGenerator::lastIndexPage()
+{
+}
+
+
void LatexGenerator::startMemberList()
{
if (!insideTabbing)
@@ -1854,9 +1907,9 @@ void LatexGenerator::endMemberList()
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
if (hasHeader) t << "\\begin{Indent}";
- t << "{\\bf ";
+ t << "\\textbf{ ";
// changed back to rev 756 due to bug 660501
- //if (Config_getBool("COMPACT_LATEX"))
+ //if (Config_getBool(COMPACT_LATEX))
//{
// t << "\\subparagraph*{";
//}
@@ -1900,7 +1953,7 @@ void LatexGenerator::startDotGraph()
void LatexGenerator::endDotGraph(const DotClassGraph &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
+ g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath);
}
void LatexGenerator::startInclDepGraph()
@@ -1909,7 +1962,7 @@ void LatexGenerator::startInclDepGraph()
void LatexGenerator::endInclDepGraph(const DotInclDepGraph &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
+ g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath);
}
void LatexGenerator::startGroupCollaboration()
@@ -1918,7 +1971,7 @@ void LatexGenerator::startGroupCollaboration()
void LatexGenerator::endGroupCollaboration(const DotGroupCollaboration &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
+ g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath);
}
void LatexGenerator::startCallGraph()
@@ -1927,7 +1980,7 @@ void LatexGenerator::startCallGraph()
void LatexGenerator::endCallGraph(const DotCallGraph &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
+ g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath);
}
void LatexGenerator::startDirDepGraph()
@@ -1936,7 +1989,7 @@ void LatexGenerator::startDirDepGraph()
void LatexGenerator::endDirDepGraph(const DotDirDeps &g)
{
- g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString("LATEX_OUTPUT"),fileName,relPath);
+ g.writeGraph(t,GOF_EPS,EOF_LaTeX,Config_getString(LATEX_OUTPUT),fileName,relPath);
}
void LatexGenerator::startDescription()
@@ -2005,7 +2058,7 @@ void LatexGenerator::startParameterList(bool openBracket)
{
/* start of ParameterType ParameterName list */
if (openBracket) t << "(";
- t << endl << "\\begin{DoxyParamCaption}" << endl;
+ t << "\\begin{DoxyParamCaption}";
}
void LatexGenerator::endParameterList()
@@ -2028,13 +2081,12 @@ void LatexGenerator::startParameterName(bool /*oneArgOnly*/)
t << "{";
}
-void LatexGenerator::endParameterName(bool last,bool /* emptyList */,bool closeBracket)
+void LatexGenerator::endParameterName(bool last,bool /*emptyList*/,bool closeBracket)
{
- t << "}" << endl;
-
+ t << " }";
if (last)
{
- t << "\\end{DoxyParamCaption}" << endl;
+ t << "\\end{DoxyParamCaption}";
if (closeBracket) t << ")";
}
}
@@ -2109,7 +2161,7 @@ void LatexGenerator::endCodeFragment()
void LatexGenerator::startInlineHeader()
{
- if (Config_getBool("COMPACT_LATEX"))
+ if (Config_getBool(COMPACT_LATEX))
{
t << "\\paragraph*{";
}
@@ -2132,38 +2184,57 @@ void LatexGenerator::lineBreak(const char *)
}
else
{
- t << "\\\\*\n";
+ t << "\\newline\n";
}
}
-void LatexGenerator::startMemberDocSimple()
+void LatexGenerator::startMemberDocSimple(bool isEnum)
{
- t << "\\begin{DoxyFields}{";
- docify(theTranslator->trCompoundMembers());
+ if (isEnum)
+ {
+ t << "\\begin{DoxyEnumFields}{";
+ docify(theTranslator->trEnumerationValues());
+ }
+ else
+ {
+ t << "\\begin{DoxyFields}{";
+ docify(theTranslator->trCompoundMembers());
+ }
t << "}" << endl;
}
-void LatexGenerator::endMemberDocSimple()
+void LatexGenerator::endMemberDocSimple(bool isEnum)
{
- t << "\\end{DoxyFields}" << endl;
+ if (isEnum)
+ {
+ t << "\\end{DoxyEnumFields}" << endl;
+ }
+ else
+ {
+ t << "\\end{DoxyFields}" << endl;
+ }
}
void LatexGenerator::startInlineMemberType()
{
+ insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks
}
void LatexGenerator::endInlineMemberType()
{
t << "&" << endl;
+ insideTabbing = FALSE;
}
void LatexGenerator::startInlineMemberName()
{
+ insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks
}
void LatexGenerator::endInlineMemberName()
{
t << "&" << endl;
+ insideTabbing = FALSE;
}
void LatexGenerator::startInlineMemberDoc()
diff --git a/src/latexgen.h b/src/latexgen.h
index 84382a7..430d250 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -135,7 +135,7 @@ class LatexGenerator : public OutputGenerator
void endTitle() { t << "}"; }
void newParagraph();
- void startParagraph();
+ void startParagraph(const char *classDef);
void endParagraph();
void writeString(const char *text);
void startIndexListItem() {}
@@ -208,7 +208,7 @@ class LatexGenerator : public OutputGenerator
void startDescItem();
void endDescItem();
void lineBreak(const char *style=0);
- void startMemberDoc(const char *,const char *,const char *,const char *,bool);
+ void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *);
@@ -259,23 +259,16 @@ class LatexGenerator : public OutputGenerator
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int);
-
- void startDescTable(const char *title)
- { startSimpleSect(EnumValues,0,0,title);
- startDescForItem();
- t << "\\begin{description}" << endl; }
- void endDescTable()
- { t << "\\end{description}" << endl;
- endDescForItem();
- endSimpleSect();
- }
- void startDescTableTitle()
- { t << "\\item[{\\em " << endl; }
- void endDescTableTitle()
- { t << "}]"; }
- void startDescTableData() {}
- void endDescTableData() {}
- void lastIndexPage() {}
+
+ void startDescTable(const char *title);
+ void endDescTable();
+ void startDescTableRow();
+ void endDescTableRow();
+ void startDescTableTitle();
+ void endDescTableTitle();
+ void startDescTableData();
+ void endDescTableData();
+ void lastIndexPage();
void startDotGraph();
void endDotGraph(const DotClassGraph &);
@@ -293,7 +286,7 @@ class LatexGenerator : public OutputGenerator
void endTextBlock(bool) {}
void startMemberDocPrefixItem() {}
- void endMemberDocPrefixItem() {}
+ void endMemberDocPrefixItem() { t << "\\\\" << endl; }
void startMemberDocName(bool) {}
void endMemberDocName() {}
void startParameterType(bool,const char *);
@@ -313,8 +306,8 @@ class LatexGenerator : public OutputGenerator
void endConstraintDocs();
void endConstraintList();
- void startMemberDocSimple();
- void endMemberDocSimple();
+ void startMemberDocSimple(bool);
+ void endMemberDocSimple(bool);
void startInlineMemberType();
void endInlineMemberType();
void startInlineMemberName();
diff --git a/src/layout.cpp b/src/layout.cpp
index 2835e77..fdc9f4c 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -57,10 +57,10 @@ static bool elemIsVisible(const QXmlAttributes &attrib,bool defVal=TRUE)
if (visible.at(0)=='$' && visible.length()>1)
{
QCString id = visible.mid(1);
- ConfigOption *opt = Config::instance()->get(id);
- if (opt && opt->kind()==ConfigOption::O_Bool)
+ const ConfigValues::Info *opt = ConfigValues::instance().get(id);
+ if (opt && opt->type==ConfigValues::Info::Bool)
{
- return *((ConfigBool *)opt)->valueRef();
+ return ConfigValues::instance().*((ConfigValues::InfoBool*)opt)->item;
}
else if (!opt)
{
@@ -120,7 +120,7 @@ QCString LayoutNavEntry::url() const
}
if (!found)
{
- msg("explicit link request to '%s' in layout file '%s' could not be resolved\n",qPrint(url.mid(5)),qPrint(Config_getString("LAYOUT_FILE")));
+ msg("explicit link request to '%s' in layout file '%s' could not be resolved\n",qPrint(url.mid(5)),qPrint(Config_getString(LAYOUT_FILE)));
}
}
//printf("LayoutNavEntry::url()=%s\n",url.data());
@@ -262,9 +262,9 @@ class LayoutParser : public QXmlDefaultHandler
m_part = -1; // invalid
m_rootNav = 0;
- //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- //bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
- //bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
// start & end handlers
m_sHandler.insert("doxygenlayout",
@@ -887,19 +887,19 @@ class LayoutParser : public QXmlDefaultHandler
{
// no MainPage node... add one as the first item of the root node...
new LayoutNavEntry(m_rootNav,LayoutNavEntry::MainPage, TRUE,
- /*Config_getBool("GENERATE_TREEVIEW") ? "main" :*/ "index",
+ /*Config_getBool(GENERATE_TREEVIEW) ? "main" :*/ "index",
theTranslator->trMainPage(),"",TRUE);
}
}
void startNavEntry(const QXmlAttributes &attrib)
{
- static bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
- static bool hasGraphicalHierarchy = Config_getBool("HAVE_DOT") &&
- Config_getBool("GRAPHICAL_HIERARCHY");
- static bool extractAll = Config_getBool("EXTRACT_ALL");
+ static bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ static bool hasGraphicalHierarchy = Config_getBool(HAVE_DOT) &&
+ Config_getBool(GRAPHICAL_HIERARCHY);
+ static bool extractAll = Config_getBool(EXTRACT_ALL);
static struct NavEntryMap
{
const char *typeStr; // type attribute name in the XML file
diff --git a/src/lodepng.cpp b/src/lodepng.cpp
index dbbced5..66335aa 100644
--- a/src/lodepng.cpp
+++ b/src/lodepng.cpp
@@ -622,7 +622,7 @@ static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigne
/*keep the coins with lowest weight, so that they add up to the amount of symbols - 1*/
vector_resized(&coins, numpresent - 1, Coin_cleanup);
- /*calculate the lenghts of each symbol, as the amount of times a coin of each symbol is used*/
+ /*calculate the lengths of each symbol, as the amount of times a coin of each symbol is used*/
for(i = 0; i < coins.size; i++)
{
Coin* coin = (Coin*)vector_get(&coins, i);
@@ -1114,7 +1114,7 @@ static unsigned encodeLZ77_brute(uivector* out, const unsigned char* in, size_t
size_t current_length = 1;
size_t backtest = backpos + 1;
size_t foretest = pos + 1;
- while(foretest < size && in[backtest] == in[foretest] && current_length < MAX_SUPPORTED_DEFLATE_LENGTH) /*maximum supporte length by deflate is max length*/
+ while(foretest < size && in[backtest] == in[foretest] && current_length < MAX_SUPPORTED_DEFLATE_LENGTH) /*maximum support length by deflate is max length*/
{
if(backpos >= pos) backpos -= current_offset; /*continue as if we work on the decoded bytes after pos by jumping back before pos*/
current_length++;
@@ -1213,7 +1213,7 @@ static unsigned encodeLZ77(uivector* out, const unsigned char* in, size_t size,
unsigned current_length = 0;
unsigned backtest = backpos;
unsigned foretest = pos;
- while(foretest < size && in[backtest] == in[foretest] && current_length < MAX_SUPPORTED_DEFLATE_LENGTH) /*maximum supporte length by deflate is max length*/
+ while(foretest < size && in[backtest] == in[foretest] && current_length < MAX_SUPPORTED_DEFLATE_LENGTH) /*maximum support length by deflate is max length*/
{
if(backpos >= pos) backpos -= current_offset; /*continue as if we work on the decoded bytes after pos by jumping back before pos*/
current_length++;
@@ -1330,7 +1330,7 @@ static unsigned deflateDynamic(ucvector* out, const unsigned char* data, size_t
after the BFINAL and BTYPE, the dynamic block consists out of the following:
- 5 bits HLIT, 5 bits HDIST, 4 bits HCLEN
- (HCLEN+4)*3 bits code lengths of code length alphabet
- - HLIT + 257 code lenghts of lit/length alphabet (encoded using the code length alphabet, + possible repetition codes 16, 17, 18)
+ - HLIT + 257 code lengths of lit/length alphabet (encoded using the code length alphabet, + possible repetition codes 16, 17, 18)
- HDIST + 1 code lengths of distance alphabet (encoded using the code length alphabet, + possible repetition codes 16, 17, 18)
- compressed data
- 256 (end code)
@@ -1346,7 +1346,7 @@ static unsigned deflateDynamic(ucvector* out, const unsigned char* data, size_t
uivector frequenciesD;
uivector amounts; /*the amounts in the "normal" order*/
uivector lldl;
- uivector lldll; /*lit/len & dist code lenghts*/
+ uivector lldll; /*lit/len & dist code lengths*/
uivector clcls;
unsigned BFINAL = 1; /*make only one block... the first and final one*/
@@ -1448,7 +1448,7 @@ static unsigned deflateDynamic(ucvector* out, const unsigned char* data, size_t
if(error) break;
if(!uivector_resize(&clcls, 19)) { error = 9927; break; }
- for(i = 0; i < 19; i++) clcls.data[i] = HuffmanTree_getLength(&codelengthcodes, CLCL[i]); /*lenghts of code length tree is in the order as specified by deflate*/
+ for(i = 0; i < 19; i++) clcls.data[i] = HuffmanTree_getLength(&codelengthcodes, CLCL[i]); /*lengths of code length tree is in the order as specified by deflate*/
while(clcls.data[clcls.size - 1] == 0 && clcls.size > 4)
{
if(!uivector_resize(&clcls, clcls.size - 1)) { error = 9928; break; } /*remove zeros at the end, but minimum size must be 4*/
@@ -1463,10 +1463,10 @@ static unsigned deflateDynamic(ucvector* out, const unsigned char* data, size_t
addBitsToStream(&bp, out, HDIST, 5);
addBitsToStream(&bp, out, HCLEN, 4);
- /*write the code lenghts of the code length alphabet*/
+ /*write the code lengths of the code length alphabet*/
for(i = 0; i < HCLEN + 4; i++) addBitsToStream(&bp, out, clcls.data[i], 3);
- /*write the lenghts of the lit/len AND the dist alphabet*/
+ /*write the lengths of the lit/len AND the dist alphabet*/
for(i = 0; i < lldl.size; i++)
{
addHuffmanSymbol(&bp, out, HuffmanTree_getCode(&codelengthcodes, lldl.data[i]), HuffmanTree_getLength(&codelengthcodes, lldl.data[i]));
@@ -1734,7 +1734,7 @@ const LodeZlib_DecompressSettings LodeZlib_defaultDecompressSettings = {0};
The two functions below (LodePNG_decompress and LodePNG_compress) directly call the
LodeZlib_decompress and LodeZlib_compress functions. The only purpose of the functions
below, is to provide the ability to let LodePNG use a different Zlib encoder by only
-changing the two functions below, instead of changing it inside the vareous places
+changing the two functions below, instead of changing it inside the various places
in the other LodePNG functions.
*out must be NULL and *outsize must be 0 initially, and after the function is done,
@@ -2813,7 +2813,7 @@ static unsigned postProcessScanlines(unsigned char* out, unsigned char* in, cons
if(error) return error;
removePaddingBits(out, in, w * bpp, ((w * bpp + 7) / 8) * 8, h);
}
- else error = unfilter(out, in, w, h, bpp); /*we can immediatly filter into the out buffer, no other steps needed*/
+ else error = unfilter(out, in, w, h, bpp); /*we can immediately filter into the out buffer, no other steps needed*/
}
else /*interlaceMethod is 1 (Adam7)*/
{
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index 0cc3959..2233cc6 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -237,7 +237,14 @@ void ManDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
- inc->exampleFile(), &fd);
+ inc->exampleFile(),
+ &fd, // fileDef,
+ -1, // start line
+ -1, // end line
+ FALSE, // inline fragment
+ 0, // memberDef
+ TRUE
+ );
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
@@ -253,7 +260,14 @@ void ManDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
- inc->exampleFile());
+ inc->exampleFile(),
+ 0, // fileDef
+ -1, // startLine
+ -1, // endLine
+ TRUE, // inlineFragment
+ 0, // memberDef
+ FALSE
+ );
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
@@ -292,6 +306,38 @@ void ManDocVisitor::visit(DocInclude *inc)
m_t << ".PP" << endl;
m_firstCol=TRUE;
break;
+ case DocInclude::SnipWithLines:
+ {
+ if (!m_firstCol) m_t << endl;
+ m_t << ".PP" << endl;
+ m_t << ".nf" << endl;
+ QFileInfo cfi( inc->file() );
+ FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile(),
+ &fd,
+ lineBlock(inc->text(),inc->blockId()),
+ -1, // endLine
+ FALSE, // inlineFragment
+ 0, // memberDef
+ TRUE // show line number
+ );
+ if (!m_firstCol) m_t << endl;
+ m_t << ".fi" << endl;
+ m_t << ".PP" << endl;
+ m_firstCol=TRUE;
+ }
+ break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
}
@@ -818,7 +864,7 @@ void ManDocVisitor::visitPost(DocSecRefList *)
//void ManDocVisitor::visitPre(DocLanguage *l)
//{
-// QString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QString langId = Config_getEnum(OUTPUT_LANGUAGE);
// if (l->id().lower()!=langId.lower())
// {
// pushEnabled();
@@ -828,7 +874,7 @@ void ManDocVisitor::visitPost(DocSecRefList *)
//
//void ManDocVisitor::visitPost(DocLanguage *l)
//{
-// QString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QString langId = Config_getEnum(OUTPUT_LANGUAGE);
// if (l->id().lower()!=langId.lower())
// {
// popEnabled();
diff --git a/src/mangen.cpp b/src/mangen.cpp
index a88ac26..17e6003 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -38,7 +38,7 @@ static QCString getExtension()
* in case of . missing, just ignore it
* in case number missing, just place a 3 in front of it
*/
- QCString ext = Config_getString("MAN_EXTENSION");
+ QCString ext = Config_getString(MAN_EXTENSION);
if (ext.isEmpty())
{
ext = "3";
@@ -66,7 +66,7 @@ static QCString getExtension()
static QCString getSubdir()
{
- QCString dir = Config_getString("MAN_SUBDIR");
+ QCString dir = Config_getString(MAN_SUBDIR);
if (dir.isEmpty())
{
dir = "man" + getExtension();
@@ -76,7 +76,7 @@ static QCString getSubdir()
ManGenerator::ManGenerator() : OutputGenerator()
{
- dir=Config_getString("MAN_OUTPUT") + "/" + getSubdir();
+ dir=Config_getString(MAN_OUTPUT) + "/" + getSubdir();
firstCol=TRUE;
paragraph=TRUE;
col=0;
@@ -107,7 +107,7 @@ ManGenerator::~ManGenerator()
void ManGenerator::init()
{
- QCString &manOutput = Config_getString("MAN_OUTPUT");
+ QCString &manOutput = Config_getString(MAN_OUTPUT);
QDir d(manOutput);
if (!d.exists() && !d.mkdir(manOutput))
@@ -181,17 +181,17 @@ void ManGenerator::endTitleHead(const char *,const char *name)
{
t << ".TH \"" << name << "\" " << getExtension() << " \""
<< dateToString(FALSE) << "\" \"";
- if (!Config_getString("PROJECT_NUMBER").isEmpty())
- t << "Version " << Config_getString("PROJECT_NUMBER") << "\" \"";
- if (Config_getString("PROJECT_NAME").isEmpty())
+ if (!Config_getString(PROJECT_NUMBER).isEmpty())
+ t << "Version " << Config_getString(PROJECT_NUMBER) << "\" \"";
+ if (Config_getString(PROJECT_NAME).isEmpty())
t << "Doxygen";
else
- t << Config_getString("PROJECT_NAME");
+ t << Config_getString(PROJECT_NAME);
t << "\" \\\" -*- nroff -*-" << endl;
t << ".ad l" << endl;
t << ".nh" << endl;
t << ".SH NAME" << endl;
- t << name << " \\- ";
+ t << name;
firstCol=FALSE;
paragraph=TRUE;
inHeader=TRUE;
@@ -208,7 +208,7 @@ void ManGenerator::newParagraph()
paragraph=TRUE;
}
-void ManGenerator::startParagraph()
+void ManGenerator::startParagraph(const char *)
{
if (!paragraph)
{
@@ -335,7 +335,7 @@ void ManGenerator::codify(const char *str)
{
case '.': t << "\\&."; break; // see bug652277
case '\t': spacesToNextTabStop =
- Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
+ Config_getInt(TAB_SIZE) - (col%Config_getInt(TAB_SIZE));
t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
break;
@@ -418,7 +418,7 @@ void ManGenerator::endCodeFragment()
col=0;
}
-void ManGenerator::startMemberDoc(const char *,const char *,const char *,const char *,bool)
+void ManGenerator::startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool)
{
if (!firstCol) t << endl;
t << ".SS \"";
@@ -431,7 +431,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
const char *)
{
// something to be done?
- if( !Config_getBool("MAN_LINKS") )
+ if( !Config_getBool(MAN_LINKS) )
{
return; // no
}
@@ -762,19 +762,26 @@ void ManGenerator::endInlineHeader()
firstCol = FALSE;
}
-void ManGenerator::startMemberDocSimple()
+void ManGenerator::startMemberDocSimple(bool isEnum)
{
if (!firstCol)
{
t << endl << ".PP" << endl;
}
t << "\\fB";
- docify(theTranslator->trCompoundMembers());
+ if (isEnum)
+ {
+ docify(theTranslator->trEnumerationValues());
+ }
+ else
+ {
+ docify(theTranslator->trCompoundMembers());
+ }
t << ":\\fP" << endl;
t << ".RS 4" << endl;
}
-void ManGenerator::endMemberDocSimple()
+void ManGenerator::endMemberDocSimple(bool)
{
if (!firstCol) t << endl;
t << ".RE" << endl;
diff --git a/src/mangen.h b/src/mangen.h
index 93111cf..b3b9f76 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -62,7 +62,7 @@ class ManGenerator : public OutputGenerator
void endTitle();
void newParagraph();
- void startParagraph();
+ void startParagraph(const char *classDef);
void endParagraph();
void writeString(const char *text);
void startIndexListItem() {}
@@ -144,7 +144,7 @@ class ManGenerator : public OutputGenerator
void endDescItem();
void lineBreak(const char *) { t << "\n.br" << endl; }
void writeChar(char c);
- void startMemberDoc(const char *,const char *,const char *,const char *,bool);
+ void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *) {}
@@ -160,8 +160,8 @@ class ManGenerator : public OutputGenerator
void endCenter() {}
void startSmall() {}
void endSmall() {}
- void startMemberDescription(const char *,const char *) { t << "\n.RI \"\\fI"; firstCol=FALSE; }
- void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; }
+ void startMemberDescription(const char *,const char *) { t << "\n.RI \""; firstCol=FALSE; }
+ void endMemberDescription() { t << "\""; firstCol=FALSE; }
void startMemberDeclaration() {}
void endMemberDeclaration(const char *,const char *) {}
void writeInheritedSectionTitle(const char *,const char *,const char *,
@@ -199,6 +199,8 @@ class ManGenerator : public OutputGenerator
void startDescTable(const char *t)
{ startSimpleSect(EnumValues,0,0,t); startDescForItem(); }
void endDescTable() { endDescForItem(); endSimpleSect(); }
+ void startDescTableRow() {}
+ void endDescTableRow() {}
void startDescTableTitle() { startItemListItem(); startBold(); startEmphasis(); endItemListItem(); }
void endDescTableTitle() { endEmphasis(); endBold(); }
void startDescTableData() { t << endl; firstCol=TRUE; }
@@ -244,8 +246,8 @@ class ManGenerator : public OutputGenerator
void endConstraintDocs();
void endConstraintList();
- void startMemberDocSimple();
- void endMemberDocSimple();
+ void startMemberDocSimple(bool);
+ void endMemberDocSimple(bool);
void startInlineMemberType();
void endInlineMemberType();
void startInlineMemberName();
diff --git a/src/markdown.cpp b/src/markdown.cpp
index f070125..67ceba2 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -36,6 +36,8 @@
#include <qregexp.h>
#include <qfileinfo.h>
#include <qdict.h>
+#include <qvector.h>
+#define USE_ORIGINAL_TABLES
#include "markdown.h"
#include "growbuf.h"
@@ -59,6 +61,11 @@
(data[i]>='0' && data[i]<='9') || \
(((unsigned char)data[i])>=0x80)) // unicode characters
+#define extraChar(i) \
+ (data[i]=='-' || data[i]=='+' || data[i]=='!' || \
+ data[i]=='?' || data[i]=='$' || data[i]=='@' || \
+ data[i]=='&' || data[i]=='*' || data[i]=='%')
+
// is character at position i in data allowed before an emphasis section
#define isOpenEmphChar(i) \
(data[i]=='\n' || data[i]==' ' || data[i]=='\'' || data[i]=='<' || \
@@ -81,6 +88,13 @@ struct LinkRef
QCString title;
};
+struct TableCell
+{
+ TableCell() : colSpan(false) {}
+ QCString cellText;
+ bool colSpan;
+};
+
typedef int (*action_t)(GrowBuf &out,const char *data,int offset,int size);
enum Alignment { AlignNone, AlignLeft, AlignCenter, AlignRight };
@@ -111,19 +125,22 @@ static void processInline(GrowBuf &out,const char *data,int size);
static QCString escapeSpecialChars(const QCString &s)
{
if (s.isEmpty()) return "";
+ bool insideQuote=FALSE;
GrowBuf growBuf;
const char *p=s;
- char c;
+ char c,pc='\0';
while ((c=*p++))
{
switch (c)
{
- case '<': growBuf.addStr("\\<"); break;
- case '>': growBuf.addStr("\\>"); break;
- case '\\': growBuf.addStr("\\\\"); break;
- case '@': growBuf.addStr("\\@"); break;
- default: growBuf.addChar(c); break;
+ case '"': if (pc!='\\') { insideQuote=!insideQuote; } growBuf.addChar(c); break;
+ case '<': if (!insideQuote) { growBuf.addChar('\\'); } growBuf.addChar('<'); break;
+ case '>': if (!insideQuote) { growBuf.addChar('\\'); } growBuf.addChar('>'); break;
+ case '\\': if (!insideQuote) { growBuf.addChar('\\'); } growBuf.addChar('\\'); break;
+ case '@': if (!insideQuote) { growBuf.addChar('\\'); } growBuf.addChar('@'); break;
+ default: growBuf.addChar(c); break;
}
+ pc=c;
}
growBuf.addChar(0);
return growBuf.get();
@@ -589,8 +606,8 @@ static int processHtmlTag(GrowBuf &out,const char *data,int offset,int size)
static int processEmphasis(GrowBuf &out,const char *data,int offset,int size)
{
if ((offset>0 && !isOpenEmphChar(-1)) || // invalid char before * or _
- (size>1 && data[0]!=data[1] && !isIdChar(1)) || // invalid char after * or _
- (size>2 && data[0]==data[1] && !isIdChar(2))) // invalid char after ** or __
+ (size>1 && data[0]!=data[1] && !(isIdChar(1) || extraChar(1) || data[1]=='[')) || // invalid char after * or _
+ (size>2 && data[0]==data[1] && !(isIdChar(2) || extraChar(2) || data[2]=='['))) // invalid char after ** or __
{
return 0;
}
@@ -838,7 +855,7 @@ static int processLink(GrowBuf &out,const char *data,int,int size)
out.addStr("@image html ");
out.addStr(link.mid(fd ? 0 : 5));
if (!explicitTitle && !content.isEmpty())
- {
+ {
out.addStr(" \"");
out.addStr(content);
out.addStr("\"");
@@ -901,7 +918,8 @@ static int processLink(GrowBuf &out,const char *data,int,int size)
out.addStr("\"");
}
out.addStr(">");
- out.addStr(content.simplifyWhiteSpace());
+ content = content.simplifyWhiteSpace();
+ processInline(out,content,content.length());
out.addStr("</a>");
}
else // avoid link to e.g. F[x](y)
@@ -1017,26 +1035,21 @@ static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int
if (size>1 && data[0]=='\\')
{
char c=data[1];
- if (c=='[' || c==']' || c=='*' || /* c=='+' || c=='-' || c=='.' || */
- c=='!' || c=='(' || c==')' || c=='`' || c=='_')
+ if (c=='[' || c==']' || c=='*' || c=='!' || c=='(' || c==')' || c=='`' || c=='_')
{
- if (c=='-' && size>3 && data[2]=='-' && data[3]=='-') // \---
- {
- out.addStr(&data[1],3);
- return 4;
- }
- else if (c=='-' && size>2 && data[2]=='-') // \--
- {
- out.addStr(&data[1],2);
- return 3;
- }
- else if (c=='-') // \-
- {
- out.addChar(c);
- }
out.addChar(data[1]);
return 2;
}
+ else if (c=='-' && size>3 && data[2]=='-' && data[3]=='-') // \---
+ {
+ out.addStr(&data[1],3);
+ return 4;
+ }
+ else if (c=='-' && size>2 && data[2]=='-') // \--
+ {
+ out.addStr(&data[1],2);
+ return 3;
+ }
}
return 0;
}
@@ -1230,7 +1243,7 @@ static int isHRuler(const char *data,int size)
return n>=3; // at least 3 characters needed for a hruler
}
-static QCString extractTitleId(QCString &title)
+static QCString extractTitleId(QCString &title, int level)
{
//static QRegExp r1("^[a-z_A-Z][a-z_A-Z0-9\\-]*:");
static QRegExp r2("\\{#[a-z_A-Z][a-z_A-Z0-9\\-]*\\}");
@@ -1243,6 +1256,14 @@ static QCString extractTitleId(QCString &title)
//printf("found id='%s' title='%s'\n",id.data(),title.data());
return id;
}
+ if ((level > 0) && (level <= Config_getInt(TOC_INCLUDE_HEADINGS)))
+ {
+ static int autoId = 0;
+ QCString id;
+ id.sprintf("autotoc_md%d",autoId++);
+ //printf("auto-generated id='%s' title='%s'\n",id.data(),title.data());
+ return id;
+ }
//printf("no id found in title '%s'\n",title.data());
return "";
}
@@ -1274,7 +1295,7 @@ static int isAtxHeader(const char *data,int size,
// store result
convertStringFragment(header,data+i,end-i);
- id = extractTitleId(header);
+ id = extractTitleId(header, level);
if (!id.isEmpty()) // strip #'s between title and id
{
i=header.length()-1;
@@ -1571,6 +1592,7 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
i = findTableColumns(data,size,start,end,columns);
+#ifdef USE_ORIGINAL_TABLES
out.addStr("<table>");
// write table header, in range [start..end]
@@ -1578,7 +1600,8 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
int headerStart = start;
int headerEnd = end;
-
+#endif
+
// read cell alignments
int ret = findTableColumns(data+i,size-i,start,end,cc);
k=0;
@@ -1619,6 +1642,8 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
// proceed to next line
i+=ret;
+#ifdef USE_ORIGINAL_TABLES
+
int m=headerStart;
for (k=0;k<columns;k++)
{
@@ -1682,6 +1707,161 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
}
out.addStr("</table> ");
+#else
+ // Store the table cell information by row then column. This
+ // allows us to handle row spanning.
+ QVector<QVector<TableCell> > tableContents;
+ tableContents.setAutoDelete(TRUE);
+
+ int headerStart = start;
+ int headerEnd = end;
+
+ int m=headerStart;
+ QVector<TableCell> *headerContents = new QVector<TableCell>(columns);
+ headerContents->setAutoDelete(TRUE);
+ for (k=0;k<columns;k++)
+ {
+ headerContents->insert(k, new TableCell);
+ while (m<=headerEnd && (data[m]!='|' || (m>0 && data[m-1]=='\\')))
+ {
+ headerContents->at(k)->cellText += data[m++];
+ }
+ m++;
+ // do the column span test before stripping white space
+ // || is spanning columns, | | is not
+ headerContents->at(k)->colSpan = headerContents->at(k)->cellText.isEmpty();
+ headerContents->at(k)->cellText = headerContents->at(k)->cellText.stripWhiteSpace();
+ }
+ // qvector doesn't have an append like std::vector, so we gotta do
+ // extra work
+ tableContents.resize(1);
+ tableContents.insert(0, headerContents);
+
+ // write table cells
+ int rowNum = 1;
+ while (i<size)
+ {
+ int ret = findTableColumns(data+i,size-i,start,end,cc);
+ if (cc!=columns) break; // end of table
+
+ j=start+i;
+ k=0;
+ QVector<TableCell> *rowContents = new QVector<TableCell>(columns);
+ rowContents->setAutoDelete(TRUE);
+ rowContents->insert(k, new TableCell);
+ while (j<=end+i)
+ {
+ if (j<=end+i && (data[j]=='|' && (j==0 || data[j-1]!='\\')))
+ {
+ // do the column span test before stripping white space
+ // || is spanning columns, | | is not
+ rowContents->at(k)->colSpan = rowContents->at(k)->cellText.isEmpty();
+ rowContents->at(k)->cellText = rowContents->at(k)->cellText.stripWhiteSpace();
+ k++;
+ rowContents->insert(k, new TableCell);
+ } // if (j<=end+i && (data[j]=='|' && (j==0 || data[j-1]!='\\')))
+ else
+ {
+ rowContents->at(k)->cellText += data[j];
+ } // else { if (j<=end+i && (data[j]=='|' && (j==0 || data[j-1]!='\\'))) }
+ j++;
+ } // while (j<=end+i)
+ // do the column span test before stripping white space
+ // || is spanning columns, | | is not
+ rowContents->at(k)->colSpan = rowContents->at(k)->cellText.isEmpty();
+ rowContents->at(k)->cellText = rowContents->at(k)->cellText.stripWhiteSpace();
+ // qvector doesn't have an append like std::vector, so we gotta do
+ // extra work
+ tableContents.resize(tableContents.size()+1);
+ tableContents.insert(rowNum++, rowContents);
+
+ // proceed to next line
+ i+=ret;
+ }
+
+
+ out.addStr("<table class=\"markdownTable\">\n");
+ QCString cellTag("th"), cellClass("class=\"markdownTableHead");
+ for (unsigned row = 0; row < tableContents.size(); row++)
+ {
+ out.addStr(" <tr class=\"markdownTable");
+ if (row)
+ {
+ out.addStr("Body\"");
+ if (row % 2)
+ {
+ out.addStr(" class=\"markdownTableRowOdd\">\n");
+ }
+ else
+ {
+ out.addStr(" class=\"markdownTableRowEven\">\n");
+ }
+ }
+ else
+ {
+ out.addStr("Head\">\n");
+ }
+ for (int c = 0; c < columns; c++)
+ {
+ // save the cell text for use after column span computation
+ QCString cellText(tableContents[row]->at(c)->cellText);
+
+ // Row span handling. Spanning rows will contain a caret ('^').
+ // If the current cell contains just a caret, this is part of an
+ // earlier row's span and the cell should not be added to the
+ // output.
+ if (tableContents[row]->at(c)->cellText == "^")
+ continue;
+ unsigned rowSpan = 1, spanRow = row+1;
+ while ((spanRow < tableContents.size()) &&
+ (tableContents[spanRow]->at(c)->cellText == "^"))
+ {
+ spanRow++;
+ rowSpan++;
+ }
+
+ out.addStr(" <" + cellTag + " " + cellClass);
+ // use appropriate alignment style
+ switch (columnAlignment[c])
+ {
+ case AlignLeft: out.addStr("Left\""); break;
+ case AlignRight: out.addStr("Right\""); break;
+ case AlignCenter: out.addStr("Center\""); break;
+ case AlignNone: out.addStr("None\""); break;
+ }
+
+ if (rowSpan > 1)
+ {
+ QCString spanStr;
+ spanStr.setNum(rowSpan);
+ out.addStr(" rowspan=\"" + spanStr + "\"");
+ }
+ // Column span handling, assumes that column spans will have
+ // empty strings, which would indicate the sequence "||", used
+ // to signify spanning columns.
+ unsigned colSpan = 1;
+ while ((c < columns-1) &&
+ tableContents[row]->at(c+1)->colSpan)
+ {
+ c++;
+ colSpan++;
+ }
+ if (colSpan > 1)
+ {
+ QCString spanStr;
+ spanStr.setNum(colSpan);
+ out.addStr(" colspan=\"" + spanStr + "\"");
+ }
+ // need at least one space on either side of the cell text in
+ // order for doxygen to do other formatting
+ out.addStr("> " + cellText + " </" + cellTag + ">\n");
+ }
+ cellTag = "td";
+ cellClass = "class=\"markdownTableBody";
+ out.addStr(" </tr>\n");
+ }
+ out.addStr("</table>\n");
+#endif
delete[] columnAlignment;
return i;
@@ -1835,7 +2015,7 @@ static int writeCodeBlock(GrowBuf &out,const char *data,int size,int refIndent)
int indent=0;
while (j<end && data[j]==' ') j++,indent++;
//printf("j=%d end=%d indent=%d refIndent=%d tabSize=%d data={%s}\n",
- // j,end,indent,refIndent,Config_getInt("TAB_SIZE"),QCString(data+i).left(end-i-1).data());
+ // j,end,indent,refIndent,Config_getInt(TAB_SIZE),QCString(data+i).left(end-i-1).data());
if (j==end-1) // empty line
{
emptyLines++;
@@ -2083,7 +2263,7 @@ static QCString processBlocks(const QCString &s,int indent)
while (pi<size && data[pi]==' ') pi++;
QCString header,id;
convertStringFragment(header,data+pi,i-pi-1);
- id = extractTitleId(header);
+ id = extractTitleId(header, level);
//printf("header='%s' is='%s'\n",header.data(),id.data());
if (!header.isEmpty())
{
@@ -2194,6 +2374,29 @@ static QCString processBlocks(const QCString &s,int indent)
return out.get();
}
+/** returns TRUE if input string docs starts with \@page or \@mainpage command */
+static bool isExplicitPage(const QCString &docs)
+{
+ int i=0;
+ const char *data = docs.data();
+ if (data)
+ {
+ int size=docs.size();
+ while (i<size && (data[i]==' ' || data[i]=='\n'))
+ {
+ i++;
+ }
+ if (i<size+1 &&
+ (data[i]=='\\' || data[i]=='@') &&
+ (qstrncmp(&data[i+1],"page ",5)==0 || qstrncmp(&data[i+1],"mainpage",8)==0)
+ )
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
static QCString extractPageTitle(QCString &docs,QCString &id)
{
int ln=0;
@@ -2224,7 +2427,7 @@ static QCString extractPageTitle(QCString &docs,QCString &id)
QCString lns;
lns.fill('\n',ln);
docs=lns+docs.mid(end2);
- id = extractTitleId(title);
+ id = extractTitleId(title, 0);
//printf("extractPageTitle(title='%s' docs='%s' id='%s')\n",title.data(),docs.data(),id.data());
return title;
}
@@ -2239,7 +2442,7 @@ static QCString extractPageTitle(QCString &docs,QCString &id)
static QCString detab(const QCString &s,int &refIndent)
{
- static int tabSize = Config_getInt("TAB_SIZE");
+ static int tabSize = Config_getInt(TAB_SIZE);
GrowBuf out;
int size = s.length();
const char *data = s.data();
@@ -2365,25 +2568,28 @@ void MarkdownFileParser::parseInput(const char *fileName,
QCString title=extractPageTitle(docs,id).stripWhiteSpace();
QCString titleFn = QFileInfo(fileName).baseName().utf8();
QCString fn = QFileInfo(fileName).fileName().utf8();
- static QCString mdfileAsMainPage = Config_getString("USE_MDFILE_AS_MAINPAGE");
+ static QCString mdfileAsMainPage = Config_getString(USE_MDFILE_AS_MAINPAGE);
if (id.isEmpty()) id = markdownFileNameToId(fileName);
- if (!mdfileAsMainPage.isEmpty() &&
- (fn==mdfileAsMainPage || // name reference
- QFileInfo(fileName).absFilePath()==
- QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path
- )
- {
- docs.prepend("@mainpage "+title+"\n");
- }
- else if (id=="mainpage" || id=="index")
+ if (!isExplicitPage(docs))
{
- if (title.isEmpty()) title = titleFn;
- docs.prepend("@mainpage "+title+"\n");
- }
- else
- {
- if (title.isEmpty()) title = titleFn;
- docs.prepend("@page "+id+" "+title+"\n");
+ if (!mdfileAsMainPage.isEmpty() &&
+ (fn==mdfileAsMainPage || // name reference
+ QFileInfo(fileName).absFilePath()==
+ QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path
+ )
+ {
+ docs.prepend("@mainpage "+title+"\n");
+ }
+ else if (id=="mainpage" || id=="index")
+ {
+ if (title.isEmpty()) title = titleFn;
+ docs.prepend("@mainpage "+title+"\n");
+ }
+ else
+ {
+ if (title.isEmpty()) title = titleFn;
+ docs.prepend("@page "+id+" "+title+"\n");
+ }
}
int lineNr=1;
int position=0;
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index c99bf3c..8f1573c 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -357,6 +357,14 @@ static bool writeDefArgumentList(OutputList &ol,Definition *scope,MemberDef *md)
{
ol.docify(" volatile");
}
+ if (defArgList->refQualifier==RefQualifierLValue)
+ {
+ ol.docify(" &");
+ }
+ else if (defArgList->refQualifier==RefQualifierRValue)
+ {
+ ol.docify(" &&");
+ }
if (!defArgList->trailingReturnType.isEmpty())
{
linkifyText(TextGeneratorOLImpl(ol), // out
@@ -658,7 +666,7 @@ void MemberDefImpl::init(Definition *def,
explExt=FALSE;
tspec=FALSE;
cachedAnonymousType=0;
- maxInitLines=Config_getInt("MAX_INITIALIZER_LINES");
+ maxInitLines=Config_getInt(MAX_INITIALIZER_LINES);
userInitLines=-1;
docEnumValues=FALSE;
// copy function template arguments (if any)
@@ -940,8 +948,8 @@ bool MemberDef::hasExamples()
QCString MemberDef::getOutputFileBase() const
{
- static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
- static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
+ static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
+ static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
QCString baseName;
//printf("Member: %s: templateMaster=%p group=%p classDef=%p nspace=%p fileDef=%p\n",
@@ -1053,7 +1061,7 @@ QCString MemberDef::anchor() const
void MemberDef::_computeLinkableInProject()
{
- static bool extractStatic = Config_getBool("EXTRACT_STATIC");
+ static bool extractStatic = Config_getBool(EXTRACT_STATIC);
m_isLinkableCached = 2; // linkable
//printf("MemberDef::isLinkableInProject(name=%s)\n",name().data());
if (isHidden())
@@ -1074,7 +1082,7 @@ void MemberDef::_computeLinkableInProject()
m_isLinkableCached = 1; // not a valid or a dummy name
return;
}
- if (!hasDocumentation() && !isReference())
+ if (!hasDocumentation() || isReference())
{
//printf("no docs or reference\n");
m_isLinkableCached = 1; // no documentation
@@ -1184,7 +1192,7 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *,
FileDef *fd,GroupDef *gd,bool onlyText)
{
SrcLangExt lang = getLanguage();
- static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
+ static bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
QCString sep = getLanguageSpecificSeparator(lang,TRUE);
QCString n = name();
if (!hideScopeNames)
@@ -1288,11 +1296,11 @@ ClassDef *MemberDef::getClassDefOfAnonymousType()
*/
bool MemberDef::isBriefSectionVisible() const
{
- static bool extractStatic = Config_getBool("EXTRACT_STATIC");
- static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
- static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC");
- static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
- static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS");
+ static bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
+ static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
//printf("Member %s grpId=%d docs=%s file=%s args=%s\n",
// name().data(),
@@ -1347,7 +1355,7 @@ bool MemberDef::isBriefSectionVisible() const
// hide member if it overrides a member in a superclass and has no
// documentation of its own
//bool visibleIfDocVirtual = !reimplements() ||
- // !Config_getBool("INHERIT_DOCS") ||
+ // !Config_getBool(INHERIT_DOCS) ||
// hasDocs;
// true if this member is a constructor or destructor
@@ -1422,7 +1430,12 @@ void MemberDef::writeDeclaration(OutputList &ol,
Definition *d=0;
ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something
if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
- if (!hasDocumentation()) return;
+ if (d==gd) // see bug 753608
+ {
+ if (getClassDef()) d = getClassDef();
+ else if (getNamespaceDef()) d = getNamespaceDef();
+ else if (getFileDef()) d = getFileDef();
+ }
//_writeTagData(compoundType);
_addToSearchIndex();
@@ -1517,12 +1530,17 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.writeNonBreakableSpace(3);
}
QCString varName=ltype.right(ltype.length()-ir).stripWhiteSpace();
- //printf(">>>>>> indDepth=%d ltype=`%s' varName=`%s'\n",indDepth,ltype.data(),varName.data());
+ //printf(">>>>>> ltype=`%s' varName=`%s'\n",ltype.data(),varName.data());
ol.docify("}");
if (varName.isEmpty() && (name().isEmpty() || name().at(0)=='@'))
{
ol.docify(";");
}
+ else if (!varName.isEmpty() && (varName.at(0)=='*' || varName.at(0)=='&'))
+ {
+ ol.docify(" ");
+ ol.docify(varName);
+ }
endAnonScopeNeeded=TRUE;
}
else
@@ -1598,11 +1616,13 @@ void MemberDef::writeDeclaration(OutputList &ol,
// *** write name
if (!name().isEmpty() && name().at(0)!='@') // hide anonymous stuff
{
- //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable());
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ static bool extractStatic = Config_getBool(EXTRACT_STATIC);
+ //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d hasDocumentation=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable(),hasDocumentation());
if (!(name().isEmpty() || name().at(0)=='@') && // name valid
(hasDocumentation() || isReference()) && // has docs
- !(m_impl->prot==Private && !Config_getBool("EXTRACT_PRIVATE") && m_impl->mtype!=MemberType_Friend) && // hidden due to protection
- !(isStatic() && m_impl->classDef==0 && !Config_getBool("EXTRACT_STATIC")) // hidden due to static-ness
+ !(m_impl->prot==Private && !extractPrivate && m_impl->mtype!=MemberType_Friend) && // hidden due to protection
+ !(isStatic() && m_impl->classDef==0 && !extractStatic) // hidden due to static-ness
)
{
if (m_impl->annMemb)
@@ -1653,7 +1673,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
}
else // index member
{
- //static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES");
+ //static bool separateMemPages = Config_getBool(SEPARATE_MEMBER_PAGES);
//QCString cfname = getOutputFileBase();
//QCString cfiname = d->getOutputFileBase();
//Doxygen::indexList->addIndexItem(
@@ -1728,7 +1748,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.endTypewriter();
}
- bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (isProperty() && (isSettable() || isGettable() ||
isPrivateSettable() || isPrivateGettable() ||
@@ -1794,7 +1814,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
// write brief description
if (!briefDescription().isEmpty() &&
- Config_getBool("BRIEF_MEMBER_DESC")
+ Config_getBool(BRIEF_MEMBER_DESC)
/* && !annMemb */
)
{
@@ -1808,12 +1828,13 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.writeDoc(rootNode,getOuterScope()?getOuterScope():d,this);
if (detailsVisible)
{
- static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
+ static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
//ol.endEmphasis();
ol.docify(" ");
- if (separateMemberPages ||
+ if (inheritedFrom ||
+ separateMemberPages ||
(m_impl->group!=0 && gd==0) ||
(m_impl->nspace!=0 && nd==0)
) // forward link to the page or group or namespace
@@ -1847,12 +1868,12 @@ void MemberDef::writeDeclaration(OutputList &ol,
bool MemberDef::isDetailedSectionLinkable() const
{
- static bool extractAll = Config_getBool("EXTRACT_ALL");
- static bool alwaysDetailedSec = Config_getBool("ALWAYS_DETAILED_SEC");
- static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
- static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC");
- static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
- static bool extractStatic = Config_getBool("EXTRACT_STATIC");
+ static bool extractAll = Config_getBool(EXTRACT_ALL);
+ static bool alwaysDetailedSec = Config_getBool(ALWAYS_DETAILED_SEC);
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
+ static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
+ static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
+ static bool extractStatic = Config_getBool(EXTRACT_STATIC);
// the member has details documentation for any of the following reasons
bool docFilter =
@@ -1899,7 +1920,7 @@ bool MemberDef::isDetailedSectionLinkable() const
// hide friend (class|struct|union) member if HIDE_FRIEND_COMPOUNDS
// is true
- bool friendCompoundFilter = !(Config_getBool("HIDE_FRIEND_COMPOUNDS") &&
+ bool friendCompoundFilter = !(Config_getBool(HIDE_FRIEND_COMPOUNDS) &&
isFriend() &&
(m_impl->type=="friend class" ||
m_impl->type=="friend struct" ||
@@ -1915,9 +1936,9 @@ bool MemberDef::isDetailedSectionLinkable() const
bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
{
- static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES");
- static bool inlineSimpleStructs = Config_getBool("INLINE_SIMPLE_STRUCTS");
- static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
+ static bool separateMemPages = Config_getBool(SEPARATE_MEMBER_PAGES);
+ static bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
+ static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
bool groupFilter = getGroupDef()==0 || inGroup || separateMemPages;
bool fileFilter = getNamespaceDef()==0 || !getNamespaceDef()->isLinkable() || !inFile;
bool simpleFilter = (hasBriefDescription() || !hideUndocMembers) && inlineSimpleStructs &&
@@ -1933,7 +1954,7 @@ bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
void MemberDef::getLabels(QStrList &sl,Definition *container) const
{
- static bool inlineInfo = Config_getBool("INLINE_INFO");
+ static bool inlineInfo = Config_getBool(INLINE_INFO);
Specifier lvirt=virtualness();
if ((!isObjCMethod() || isOptional() || isRequired()) &&
@@ -1953,7 +1974,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const
//ol.docify(" [");
SrcLangExt lang = getLanguage();
bool optVhdl = lang==SrcLangExt_VHDL;
- bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
+ bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (optVhdl)
{
sl.append(VhdlDocGen::trTypeString(getMemberSpecifiers()));
@@ -1964,7 +1985,7 @@ void MemberDef::getLabels(QStrList &sl,Definition *container) const
else if (isRelated()) sl.append("related");
else
{
- if (Config_getBool("INLINE_INFO") && isInline()) sl.append("inline");
+ if (Config_getBool(INLINE_INFO) && isInline()) sl.append("inline");
if (isExplicit()) sl.append("explicit");
if (isMutable()) sl.append("mutable");
if (isStatic()) sl.append("static");
@@ -2052,7 +2073,7 @@ void MemberDef::_writeCallGraph(OutputList &ol)
{
// write call graph
if (m_impl->hasCallGraph
- && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT")
+ && (isFunction() || isSlot() || isSignal()) && Config_getBool(HAVE_DOT)
)
{
DotCallGraph callGraph(this,FALSE);
@@ -2064,11 +2085,9 @@ void MemberDef::_writeCallGraph(OutputList &ol)
{
msg("Generating call graph for function %s\n",qPrint(qualifiedName()));
ol.disable(OutputGenerator::Man);
- ol.startParagraph();
ol.startCallGraph();
ol.parseText(theTranslator->trCallGraph());
ol.endCallGraph(callGraph);
- ol.endParagraph();
ol.enableAll();
}
}
@@ -2077,7 +2096,7 @@ void MemberDef::_writeCallGraph(OutputList &ol)
void MemberDef::_writeCallerGraph(OutputList &ol)
{
if (m_impl->hasCallerGraph
- && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT")
+ && (isFunction() || isSlot() || isSignal()) && Config_getBool(HAVE_DOT)
)
{
DotCallGraph callerGraph(this, TRUE);
@@ -2089,11 +2108,9 @@ void MemberDef::_writeCallerGraph(OutputList &ol)
{
msg("Generating caller graph for function %s\n",qPrint(qualifiedName()));
ol.disable(OutputGenerator::Man);
- ol.startParagraph();
ol.startCallGraph();
ol.parseText(theTranslator->trCallerGraph());
ol.endCallGraph(callerGraph);
- ol.endParagraph();
ol.enableAll();
}
}
@@ -2140,7 +2157,7 @@ void MemberDef::_writeReimplements(OutputList &ol)
{
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
0,bcd->displayName());
- if (bcd->isLinkableInProject()/* && !Config_getBool("PDF_HYPERLINKS")*/ )
+ if (bcd->isLinkableInProject()/* && !Config_getBool(PDF_HYPERLINKS)*/ )
{
writePageRef(ol,bcd->getOutputFileBase(),bcd->anchor());
}
@@ -2333,6 +2350,7 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
ol.startDescTable(theTranslator->trEnumerationValues());
}
+ ol.startDescTableRow();
ol.addIndexItem(fmd->name(),ciname);
ol.addIndexItem(ciname,fmd->name());
@@ -2382,6 +2400,7 @@ void MemberDef::_writeEnumValues(OutputList &ol,Definition *container,
fmd,fmd->documentation()+"\n",TRUE,FALSE);
}
ol.endDescTableData();
+ ol.endDescTableRow();
}
}
}
@@ -2479,7 +2498,7 @@ void MemberDef::_writeGroupInclude(OutputList &ol,bool inGroup)
{
// only write out the include file if this is not part of a class or file
// definition
- static bool showGroupedMembInc = Config_getBool("SHOW_GROUPED_MEMB_INC");
+ static bool showGroupedMembInc = Config_getBool(SHOW_GROUPED_MEMB_INC);
FileDef *fd = getFileDef();
QCString nm;
if (fd) nm = getFileDef()->docName();
@@ -2519,7 +2538,9 @@ void MemberDef::_writeGroupInclude(OutputList &ol,bool inGroup)
/*! Writes the "detailed documentation" section of this member to
* all active output formats.
*/
-void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
+void MemberDef::writeDocumentation(MemberList *ml,
+ int memCount,int memTotal,
+ OutputList &ol,
const char *scName,
Definition *container,
bool inGroup,
@@ -2535,8 +2556,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d sectionLinkable=%d\n",
// name().data(),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable());
- if ( !hasDocs ) return;
- if (isEnumValue() && !showEnumValues) return;
+ //if ( !hasDocs ) return;
+ //if (isEnumValue() && !showEnumValues) return;
SrcLangExt lang = getLanguage();
//printf("member=%s lang=%d\n",name().data(),lang);
@@ -2546,11 +2567,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
QCString scopeName = scName;
QCString memAnchor = anchor();
QCString ciname = container->name();
+ Definition *scopedContainer = container; // see bug 753608
if (container->definitionType()==TypeGroup)
{
- if (getClassDef()) scopeName=getClassDef()->displayName();
- else if (getNamespaceDef()) scopeName=getNamespaceDef()->displayName();
- else if (getFileDef()) scopeName=getFileDef()->displayName();
+ if (getClassDef()) { scopeName=getClassDef()->displayName(); scopedContainer=getClassDef(); }
+ else if (getNamespaceDef()) { scopeName=getNamespaceDef()->displayName(); scopedContainer=getNamespaceDef(); }
+ else if (getFileDef()) { scopeName=getFileDef()->displayName(); scopedContainer=getFileDef(); }
ciname = ((GroupDef *)container)->groupTitle();
}
else if (container->definitionType()==TypeFile && getNamespaceDef())
@@ -2598,7 +2620,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
else if (isFunction())
{
- title+=argsString();
+ title += "()";
}
int i=0,l;
static QRegExp r("@[0-9]+");
@@ -2609,12 +2631,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
bool htmlEndLabelTable=FALSE;
QStrList sl;
- getLabels(sl,container);
+ getLabels(sl,scopedContainer);
if ((isVariable() || isTypedef()) && (i=r.match(ldef,0,&l))!=-1)
{
// find enum type and insert it in the definition
- QListIterator<MemberDef> vmli(*ml);
+ MemberListIterator vmli(*ml);
MemberDef *vmd;
bool found=FALSE;
for ( ; (vmd=vmli.current()) && !found ; ++vmli)
@@ -2622,10 +2644,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
{
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
- ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline);
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.left(i));
+ ol.startMemberDoc(ciname,name(),memAnchor,name(),memCount,memTotal,showInline);
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,ldef.left(i));
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-i-l));
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,ldef.right(ldef.length()-i-l));
found=TRUE;
}
@@ -2634,7 +2656,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
//printf("Anonymous compound `%s'\n",cname.data());
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
- ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline);
+ ol.startMemberDoc(ciname,name(),memAnchor,name(),memCount,memTotal,showInline);
// search for the last anonymous compound name in the definition
int si=ldef.find(' '),pi,ei=i+l;
if (si==-1) si=0;
@@ -2650,17 +2672,17 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// last ei characters of ldef contain pointer/reference specifiers
int ni=ldef.find("::",si);
if (ni>=ei) ei=ni+2;
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-ei));
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,ldef.right(ldef.length()-ei));
}
}
else // not an enum value or anonymous compound
{
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
- ol.startMemberDoc(ciname,name(),memAnchor,title,showInline);
+ ol.startMemberDoc(ciname,name(),memAnchor,title,memCount,memTotal,showInline);
ClassDef *cd=getClassDef();
NamespaceDef *nd=getNamespaceDef();
- if (!Config_getBool("HIDE_SCOPE_NAMES"))
+ if (!Config_getBool(HIDE_SCOPE_NAMES))
{
bool first=TRUE;
SrcLangExt lang = getLanguage();
@@ -2760,12 +2782,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (optVhdl)
{
- hasParameterList=VhdlDocGen::writeVHDLTypeDocumentation(this,container,ol);
+ hasParameterList=VhdlDocGen::writeVHDLTypeDocumentation(this,scopedContainer,ol);
}
else
{
linkifyText(TextGeneratorOLImpl(ol),
- container,
+ scopedContainer,
getBodyDef(),
this,
substitute(ldef,"::",sep)
@@ -2782,12 +2804,12 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//ol.docify(" = ");
ol.docify(" ");
QCString init = m_impl->initializer.simplifyWhiteSpace();
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,init);
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,init);
}
else
{
ol.writeNonBreakableSpace(3);
- linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,m_impl->initializer);
+ linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,m_impl->initializer);
}
}
if (excpString()) // add exception list
@@ -2888,14 +2910,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
/* write brief description */
if (!brief.isEmpty() &&
- (Config_getBool("REPEAT_BRIEF") ||
- !Config_getBool("BRIEF_MEMBER_DESC")
+ (Config_getBool(REPEAT_BRIEF) ||
+ !Config_getBool(BRIEF_MEMBER_DESC)
)
)
{
ol.startParagraph();
ol.generateDoc(briefFile(),briefLine(),
- getOuterScope()?getOuterScope():container,this,
+ scopedContainer,this,
brief,FALSE,FALSE,0,TRUE,FALSE);
ol.endParagraph();
}
@@ -2912,22 +2934,22 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
else
{
- ol.generateDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE);
+ ol.generateDoc(docFile(),docLine(),scopedContainer,this,detailed+"\n",TRUE,FALSE);
}
if (!inbodyDocumentation().isEmpty())
{
ol.generateDoc(inbodyFile(),inbodyLine(),
- getOuterScope()?getOuterScope():container,this,
+ scopedContainer,this,
inbodyDocumentation()+"\n",TRUE,FALSE);
}
}
- else if (!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") ||
- !Config_getBool("BRIEF_MEMBER_DESC")))
+ else if (!brief.isEmpty() && (Config_getBool(REPEAT_BRIEF) ||
+ !Config_getBool(BRIEF_MEMBER_DESC)))
{
if (!inbodyDocumentation().isEmpty())
{
- ol.generateDoc(inbodyFile(),inbodyLine(),getOuterScope()?getOuterScope():container,this,inbodyDocumentation()+"\n",TRUE,FALSE);
+ ol.generateDoc(inbodyFile(),inbodyLine(),scopedContainer,this,inbodyDocumentation()+"\n",TRUE,FALSE);
}
}
@@ -2952,7 +2974,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// feed the result to the documentation parser
ol.generateDoc(
docFile(),docLine(),
- getOuterScope()?getOuterScope():container,
+ scopedContainer,
this, // memberDef
paramDocs, // docStr
TRUE, // indexWords
@@ -2961,7 +2983,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
- _writeEnumValues(ol,container,cfname,ciname,cname);
+ _writeEnumValues(ol,scopedContainer,cfname,ciname,cname);
_writeReimplements(ol);
_writeReimplementedBy(ol);
_writeCategoryRelation(ol);
@@ -2988,14 +3010,14 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.endIndent();
// enable LaTeX again
- //if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
+ //if (Config_getBool(EXTRACT_ALL) && !hasDocs) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
//------------------------------------------------
- if (!Config_getBool("EXTRACT_ALL") &&
- Config_getBool("WARN_IF_UNDOCUMENTED") &&
- Config_getBool("WARN_NO_PARAMDOC") &&
+ if (!Config_getBool(EXTRACT_ALL) &&
+ Config_getBool(WARN_IF_UNDOCUMENTED) &&
+ Config_getBool(WARN_NO_PARAMDOC) &&
!Doxygen::suppressDocWarnings)
{
if (!hasDocumentedParams())
@@ -3106,43 +3128,47 @@ void MemberDef::writeMemberDocSimple(OutputList &ol, Definition *container)
ClassDef *cd = m_impl->accessorClass;
//printf("===> %s::anonymous: %s\n",name().data(),cd?cd->name().data():"<none>");
- ol.startInlineMemberType();
- ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
+ if (container && container->definitionType()==Definition::TypeClass &&
+ !((ClassDef*)container)->isJavaEnum())
+ {
+ ol.startInlineMemberType();
+ ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
- QCString ts = fieldType();
+ QCString ts = fieldType();
- if (cd) // cd points to an anonymous struct pointed to by this member
- // so we add a link to it from the type column.
- {
- int i=0;
- const char *prefixes[] = { "struct ","union ","class ", 0 };
- const char **p = prefixes;
- while (*p)
+ if (cd) // cd points to an anonymous struct pointed to by this member
+ // so we add a link to it from the type column.
{
- int l=qstrlen(*p);
- if (ts.left(l)==*p)
+ int i=0;
+ const char *prefixes[] = { "struct ","union ","class ", 0 };
+ const char **p = prefixes;
+ while (*p)
{
- ol.writeString(*p);
- i=l;
+ int l=qstrlen(*p);
+ if (ts.left(l)==*p)
+ {
+ ol.writeString(*p);
+ i=l;
+ }
+ p++;
}
- p++;
+ ol.writeObjectLink(cd->getReference(),
+ cd->getOutputFileBase(),
+ cd->anchor(),ts.mid(i));
}
- ol.writeObjectLink(cd->getReference(),
- cd->getOutputFileBase(),
- cd->anchor(),ts.mid(i));
- }
- else // use standard auto linking
- {
- linkifyText(TextGeneratorOLImpl(ol), // out
- scope, // scope
- getBodyDef(), // fileScope
- this, // self
- ts, // text
- TRUE // autoBreak
- );
+ else // use standard auto linking
+ {
+ linkifyText(TextGeneratorOLImpl(ol), // out
+ scope, // scope
+ getBodyDef(), // fileScope
+ this, // self
+ ts, // text
+ TRUE // autoBreak
+ );
+ }
+ ol.endDoxyAnchor(cfname,memAnchor);
+ ol.endInlineMemberType();
}
- ol.endDoxyAnchor(cfname,memAnchor);
- ol.endInlineMemberType();
ol.startInlineMemberName();
ol.docify(doxyName);
@@ -3226,12 +3252,11 @@ void MemberDef::warnIfUndocumented()
t="group", d=gd;
else
t="file", d=fd;
- static bool extractAll = Config_getBool("EXTRACT_ALL");
+ static bool extractAll = Config_getBool(EXTRACT_ALL);
- //printf("warnIfUndoc: d->isLinkable()=%d isLinkable()=%d "
- // "isDocumentedFriendClass()=%d name()=%s prot=%d isReference=%d\n",
- // d->isLinkable(),isLinkable(),isDocumentedFriendClass(),
- // name().data(),m_impl->prot,isReference());
+ //printf("%s:warnIfUndoc: hasUserDocs=%d isFriendClass=%d protection=%d isRef=%d isDel=%d\n",
+ // name().data(),
+ // hasUserDocumentation(),isFriendClass(),protectionLevelVisible(m_impl->prot),isReference(),isDeleted());
if ((!hasUserDocumentation() && !extractAll) &&
!isFriendClass() &&
name().find('@')==-1 && d && d->name().find('@')==-1 &&
@@ -3239,7 +3264,7 @@ void MemberDef::warnIfUndocumented()
!isReference() && !isDeleted()
)
{
- warn_undoc(d->getDefFileName(),d->getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
+ warn_undoc(getDefFileName(),getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
qPrint(name()),qPrint(argsString()),qPrint(memberTypeName()),t,qPrint(d->name()));
}
}
@@ -3477,10 +3502,10 @@ void MemberDef::setInitializer(const char *initializer)
void MemberDef::addListReference(Definition *)
{
- static bool optimizeOutputForC = Config_getBool("OPTIMIZE_OUTPUT_FOR_C");
- //static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
- //static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ static bool optimizeOutputForC = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
+ //static bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
+ //static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
SrcLangExt lang = getLanguage();
visited=TRUE;
if (!isLinkableInProject()) return;
@@ -3796,7 +3821,7 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
typeDecl.writeChar(' ');
}
- uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE");
+ uint enumValuesPerLine = (uint)Config_getInt(ENUM_VALUES_PER_LINE);
if (numVisibleEnumValues>0 && enumValuesPerLine>0)
{
typeDecl.docify("{ ");
@@ -3933,9 +3958,9 @@ void MemberDef::enableCallerGraph(bool e)
bool MemberDef::protectionVisible() const
{
return m_impl->prot==Public ||
- (m_impl->prot==Private && Config_getBool("EXTRACT_PRIVATE")) ||
- (m_impl->prot==Protected && Config_getBool("EXTRACT_PROTECTED")) ||
- (m_impl->prot==Package && Config_getBool("EXTRACT_PACKAGE"));
+ (m_impl->prot==Private && Config_getBool(EXTRACT_PRIVATE)) ||
+ (m_impl->prot==Protected && Config_getBool(EXTRACT_PROTECTED)) ||
+ (m_impl->prot==Package && Config_getBool(EXTRACT_PACKAGE));
}
#endif
@@ -5098,7 +5123,7 @@ const ArgumentList *MemberDef::typeConstraints() const
bool MemberDef::isFriendToHide() const
{
- static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS");
+ static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
bool isFriendToHide = hideFriendCompounds &&
(m_impl->type=="friend class" ||
m_impl->type=="friend struct" ||
diff --git a/src/memberdef.h b/src/memberdef.h
index 19a37ea..cda1baf 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -380,7 +380,7 @@ class MemberDef : public Definition
void writeDeclaration(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup, ClassDef *inheritFrom=0,const char *inheritId=0);
- void writeDocumentation(MemberList *ml,OutputList &ol,
+ void writeDocumentation(MemberList *ml,int memCount,int memTotal,OutputList &ol,
const char *scopeName,Definition *container,
bool inGroup,bool showEnumValues=FALSE,bool
showInline=FALSE);
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index cbda94d..aaa504f 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -147,7 +147,8 @@ void MemberGroup::addGroupedInheritedMembers(OutputList &ol,ClassDef *cd,
for (li.toFirst();(md=li.current());++li)
{
//printf("matching %d == %d\n",lt,md->getSectionList(m_parent)->listType());
- if (lt==md->getSectionList(m_parent)->listType())
+ MemberList *ml = md->getSectionList(m_parent);
+ if (ml && lt==ml->listType())
{
MemberList ml(lt);
ml.append(md);
@@ -165,7 +166,8 @@ int MemberGroup::countGroupedInheritedMembers(MemberListType lt)
for (li.toFirst();(md=li.current());++li)
{
//printf("matching %d == %d\n",lt,md->getSectionList(m_parent)->listType());
- if (lt==md->getSectionList(m_parent)->listType())
+ MemberList *ml = md->getSectionList(m_parent);
+ if (ml && lt==ml->listType())
{
count++;
}
diff --git a/src/membergroup.h b/src/membergroup.h
index c42efc9..29fba07 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -141,7 +141,7 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
/** Data collected for a member group */
struct MemberGroupInfo
{
- MemberGroupInfo() : m_sli(0), docLine(-1) {}
+ MemberGroupInfo() : docLine(-1), m_sli(0) {}
~MemberGroupInfo() { delete m_sli; m_sli=0; }
void setRefItems(const QList<ListItemInfo> *sli);
QCString header;
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index b253682..5349030 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -76,7 +76,7 @@ MemberList::~MemberList()
int MemberList::compareValues(const MemberDef *c1, const MemberDef *c2) const
{
- static bool sortConstructorsFirst = Config_getBool("SORT_MEMBERS_CTORS_1ST");
+ static bool sortConstructorsFirst = Config_getBool(SORT_MEMBERS_CTORS_1ST);
if (sortConstructorsFirst) {
int ord1 = c1->isConstructor() ? 2 : (c1->isDestructor() ? 1 : 0);
int ord2 = c2->isConstructor() ? 2 : (c2->isDestructor() ? 1 : 0);
@@ -169,7 +169,7 @@ void MemberList::countDecMembers(bool countEnumValues,GroupDef *gd)
break;
case MemberType_Typedef: m_typeCnt++,m_numDecMembers++; break;
//case MemberType_Prototype: m_protoCnt++,m_numDecMembers++; break;
- case MemberType_Define: if (Config_getBool("EXTRACT_ALL") ||
+ case MemberType_Define: if (Config_getBool(EXTRACT_ALL) ||
md->argsString() ||
!md->initializer().isEmpty() ||
md->hasDocumentation()
@@ -233,11 +233,6 @@ void MemberList::countDocMembers(bool countEnumValues)
//printf("MemberList::countDocMembers()=%d memberGroupList=%p\n",m_numDocMembers,memberGroupList);
}
-bool MemberList::insert(uint index,const MemberDef *md)
-{
- return QList<MemberDef>::insert(index,md);
-}
-
void MemberList::inSort(const MemberDef *md)
{
QList<MemberDef>::inSort(md);
@@ -248,11 +243,67 @@ void MemberList::append(const MemberDef *md)
QList<MemberDef>::append(md);
}
-MemberListIterator::MemberListIterator(const QList<MemberDef> &l) :
+void MemberList::remove(const MemberDef *md)
+{
+ QList<MemberDef>::remove(md);
+}
+
+void MemberList::sort()
+{
+ QList<MemberDef>::sort();
+}
+
+uint MemberList::count() const
+{
+ return QList<MemberDef>::count();
+}
+
+int MemberList::findRef(const MemberDef *md) const
+{
+ return QList<MemberDef>::findRef(md);
+}
+
+MemberDef *MemberList::getFirst() const
+{
+ return QList<MemberDef>::getFirst();
+}
+
+MemberDef *MemberList::take(uint index)
+{
+ return QList<MemberDef>::take(index);
+}
+
+MemberListIterator::MemberListIterator(const MemberList &l) :
QListIterator<MemberDef>(l)
{
}
+int MemberList::countEnumValues(MemberDef *md,bool setAnonEnumType) const
+{
+ 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)
+ {
+ QCString vtype=vmd->typeString();
+ if ((vtype.find(name))!=-1)
+ {
+ enumVars++;
+ if (setAnonEnumType)
+ {
+ vmd->setAnonymousEnumType(md);
+ }
+ }
+ }
+ }
+ return enumVars;
+}
+
bool MemberList::declVisible() const
{
MemberListIterator mli(*this);
@@ -277,26 +328,9 @@ bool MemberList::declVisible() const
return TRUE;
case MemberType_Enumeration:
{
- 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)
- {
- QCString vtype=vmd->typeString();
- if ((vtype.find(name))!=-1)
- {
- enumVars++;
- }
- }
- }
// if this is an anonymous 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
+ if (countEnumValues(md,FALSE)==0) // show enum here
{
return TRUE;
}
@@ -324,6 +358,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
)
{
//printf("----- writePlainDeclaration() ----\n");
+ static bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
countDecMembers();
if (numDecMembers()==0)
{
@@ -367,28 +402,9 @@ void MemberList::writePlainDeclarations(OutputList &ol,
}
case MemberType_Enumeration:
{
- 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)
- {
- QCString vtype=vmd->typeString();
- if ((vtype.find(name))!=-1)
- {
- enumVars++;
- vmd->setAnonymousEnumType(md);
- }
- }
- }
// if this is an anonymous 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
- && md->hasDocumentation())
+ if (countEnumValues(md,TRUE)==0) // show enum here
{
//printf("Enum!!\n");
if (first)
@@ -410,7 +426,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
{
ol.endDoxyAnchor(md->getOutputFileBase(),md->anchor());
}
- if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (!md->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
DocRoot *rootNode = validatingParseDoc(
md->briefFile(),md->briefLine(),
@@ -524,7 +540,7 @@ void MemberList::writeDeclarations(OutputList &ol,
(void)showEnumValues; // unused
//printf("----- writeDeclaration() this=%p ---- inheritedFrom=%p\n",this,inheritedFrom);
- static bool optimizeVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool optimizeVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString inheritId;
countDecMembers(/*showEnumValues*/FALSE,gd); // count members shown in this section
@@ -672,13 +688,44 @@ void MemberList::writeDocumentation(OutputList &ol,
ol.endGroupHeader(showInline ? 2 : 0);
}
ol.startMemberDocList();
-
+
MemberListIterator mli(*this);
MemberDef *md;
- for ( ; (md=mli.current()) ; ++mli)
+
+ // count the number of overloaded members
+ QDict<uint> overloadTotalDict(67);
+ QDict<uint> overloadCountDict(67);
+ overloadTotalDict.setAutoDelete(TRUE);
+ overloadCountDict.setAutoDelete(TRUE);
+ for (mli.toFirst() ; (md=mli.current()) ; ++mli)
+ {
+ if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) &&
+ !(md->isEnumValue() && !showInline))
+ {
+ uint *pCount = overloadTotalDict.find(md->name());
+ if (pCount)
+ {
+ (*pCount)++;
+ }
+ else
+ {
+ overloadTotalDict.insert(md->name(),new uint(1));
+ overloadCountDict.insert(md->name(),new uint(1));
+ }
+ }
+ }
+
+ for (mli.toFirst() ; (md=mli.current()) ; ++mli)
{
- md->writeDocumentation(this,ol,scopeName,container,
- m_inGroup,showEnumValues,showInline);
+ if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) &&
+ !(md->isEnumValue() && !showInline))
+ {
+ uint overloadCount = *overloadTotalDict.find(md->name());
+ uint *pCount = overloadCountDict.find(md->name());
+ md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container,
+ m_inGroup,showEnumValues,showInline);
+ (*pCount)++;
+ }
}
if (memberGroupList)
{
@@ -701,27 +748,57 @@ void MemberList::writeSimpleDocumentation(OutputList &ol,
//printf("MemberList count=%d\n",numDocMembers());
if (numDocMembers()==0) return;
- ol.startMemberDocSimple();
+ ClassDef *cd = 0;
+ if (container && container->definitionType()==Definition::TypeClass)
+ {
+ cd = (ClassDef*)container;
+ }
+ ol.startMemberDocSimple(cd && cd->isJavaEnum());
MemberListIterator mli(*this);
MemberDef *md;
for ( ; (md=mli.current()) ; ++mli)
{
md->writeMemberDocSimple(ol,container);
}
- ol.endMemberDocSimple();
+ ol.endMemberDocSimple(cd && cd->isJavaEnum());
}
// separate member pages
void MemberList::writeDocumentationPage(OutputList &ol,
const char *scopeName, Definition *container)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+
+ // count the number of overloaded members
+ QDict<uint> overloadTotalDict(67);
+ QDict<uint> overloadCountDict(67);
+ overloadTotalDict.setAutoDelete(TRUE);
+ overloadCountDict.setAutoDelete(TRUE);
MemberListIterator mli(*this);
MemberDef *md;
- for ( ; (md=mli.current()) ; ++mli)
+ for (mli.toFirst() ; (md=mli.current()) ; ++mli)
{
if (md->isDetailedSectionLinkable())
{
+ uint *pCount = overloadTotalDict.find(md->name());
+ if (pCount)
+ {
+ (*pCount)++;
+ }
+ else
+ {
+ overloadTotalDict.insert(md->name(),new uint(1));
+ overloadCountDict.insert(md->name(),new uint(1));
+ }
+ }
+ }
+
+ for ( mli.toFirst() ; (md=mli.current()) ; ++mli)
+ {
+ if (md->isDetailedSectionLinkable())
+ {
+ uint overloadCount = *overloadTotalDict.find(md->name());
+ uint *pCount = overloadCountDict.find(md->name());
QCString diskName=md->getOutputFileBase();
QCString title=md->qualifiedName();
startFile(ol,diskName,md->name(),title,HLI_None,!generateTreeView,diskName);
@@ -734,7 +811,8 @@ void MemberList::writeDocumentationPage(OutputList &ol,
if (generateTreeView)
{
- md->writeDocumentation(this,ol,scopeName,container,m_inGroup);
+ md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container,m_inGroup);
+ (*pCount)++;
ol.endContents();
endFileWithNavPath(container,ol);
}
@@ -749,7 +827,8 @@ void MemberList::writeDocumentationPage(OutputList &ol,
ol.writeString(" </td>\n");
ol.writeString(" <td valign=\"top\" class=\"mempage\">\n");
- md->writeDocumentation(this,ol,scopeName,container,m_inGroup);
+ md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container,m_inGroup);
+ (*pCount)++;
ol.writeString(" </td>\n");
ol.writeString(" </tr>\n");
@@ -758,15 +837,15 @@ void MemberList::writeDocumentationPage(OutputList &ol,
endFile(ol);
}
}
- if (memberGroupList)
+ }
+ if (memberGroupList)
+ {
+ //printf("MemberList::writeDocumentation() -- member groups\n");
+ MemberGroupListIterator mgli(*memberGroupList);
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
{
- //printf("MemberList::writeDocumentation() -- member groups\n");
- MemberGroupListIterator mgli(*memberGroupList);
- MemberGroup *mg;
- for (;(mg=mgli.current());++mgli)
- {
- mg->writeDocumentationPage(ol,scopeName,container);
- }
+ mg->writeDocumentationPage(ol,scopeName,container);
}
}
}
diff --git a/src/memberlist.h b/src/memberlist.h
index c293d22..38f0e89 100644
--- a/src/memberlist.h
+++ b/src/memberlist.h
@@ -29,17 +29,27 @@ class MemberGroupList;
class StorageIntf;
/** A list of MemberDef objects. */
-class MemberList : public QList<MemberDef>
-{
+class MemberList : private QList<MemberDef>
+{
+ friend class MemberListIterator;
public:
MemberList();
MemberList(MemberListType lt);
~MemberList();
MemberListType listType() const { return m_listType; }
static QCString listTypeAsString(MemberListType type);
- bool insert(uint index,const MemberDef *md);
+
+ /* ---- standard QList methods ---- */
void inSort(const MemberDef *md);
void append(const MemberDef *md);
+ void remove(const MemberDef *md);
+ void sort();
+ uint count() const;
+ int findRef(const MemberDef *md) const;
+ MemberDef *getFirst() const;
+ MemberDef *take(uint index);
+
+
int varCount() const { ASSERT(m_numDecMembers!=-1); return m_varCnt; }
int funcCount() const { ASSERT(m_numDecMembers!=-1); return m_funcCnt; }
int enumCount() const { ASSERT(m_numDecMembers!=-1); return m_enumCnt; }
@@ -82,6 +92,7 @@ class MemberList : public QList<MemberDef>
private:
int compareValues(const MemberDef *item1,const MemberDef *item2) const;
+ int countEnumValues(MemberDef *md,bool setAnonEnumType) const;
int m_varCnt;
int m_funcCnt;
int m_enumCnt;
@@ -97,13 +108,14 @@ class MemberList : public QList<MemberDef>
bool m_inFile; // is this list part of a file definition
MemberListType m_listType;
bool m_needsSorting;
+ QDict<int> m_overloadCount;
};
/** An iterator for MemberDef objects in a MemberList. */
class MemberListIterator : public QListIterator<MemberDef>
{
public:
- MemberListIterator(const QList<MemberDef> &list);
+ MemberListIterator(const MemberList &list);
virtual ~MemberListIterator() {}
};
diff --git a/src/message.cpp b/src/message.cpp
index c61de68..2f3a06f 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -37,9 +37,9 @@ static FILE *warnFile = stderr;
void initWarningFormat()
{
-// int filePos = Config_getString("WARN_FORMAT").find("$file");
-// int linePos = Config_getString("WARN_FORMAT").find("$line");
-// int textPos = Config_getString("WARN_FORMAT").find("$text");
+// int filePos = Config_getString(WARN_FORMAT).find("$file");
+// int linePos = Config_getString(WARN_FORMAT).find("$line");
+// int textPos = Config_getString(WARN_FORMAT).find("$text");
//
// // sort items on position (there are 6 cases)
// warnFormatOrder = 1;
@@ -73,7 +73,7 @@ void initWarningFormat()
// substitute(
// substitute(
// substitute(
-// Config_getString("WARN_FORMAT"),
+// Config_getString(WARN_FORMAT),
// "$file","%s"
// ),
// "$text","%s"
@@ -86,18 +86,18 @@ void initWarningFormat()
// replace(QRegExp("\\$line"),"%d")+
// '\n';
- outputFormat = Config_getString("WARN_FORMAT");
+ outputFormat = Config_getString(WARN_FORMAT);
- if (!Config_getString("WARN_LOGFILE").isEmpty())
+ if (!Config_getString(WARN_LOGFILE).isEmpty())
{
- warnFile = portable_fopen(Config_getString("WARN_LOGFILE"),"w");
+ warnFile = portable_fopen(Config_getString(WARN_LOGFILE),"w");
}
if (!warnFile) // point it to something valid, because warn() relies on it
{
warnFile = stderr;
}
- if (Config_getBool("WARN_AS_ERROR"))
+ if (Config_getBool(WARN_AS_ERROR))
{
warning_str = error_str;
}
@@ -106,7 +106,7 @@ void initWarningFormat()
void msg(const char *fmt, ...)
{
- if (!Config_getBool("QUIET"))
+ if (!Config_getBool(QUIET))
{
if (Debug::isFlagSet(Debug::Time))
{
@@ -135,7 +135,7 @@ static void format_warn(const char *file,int line,const char *text)
}
}
// substitute markers by actual values
- bool warnAsError = Config_getBool("WARN_AS_ERROR");
+ bool warnAsError = Config_getBool(WARN_AS_ERROR);
QCString msgText =
substitute(
substitute(
@@ -164,9 +164,9 @@ static void format_warn(const char *file,int line,const char *text)
}
}
-static void do_warn(const char *tag, const char *file, int line, const char *prefix, const char *fmt, va_list args)
+static void do_warn(bool enabled, const char *file, int line, const char *prefix, const char *fmt, va_list args)
{
- if (tag && !Config_getBool(tag)) return; // warning type disabled
+ if (!enabled) return; // warning type disabled
const int bufSize = 40960;
char text[bufSize];
int l=0;
@@ -184,18 +184,18 @@ void warn(const char *file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- do_warn("WARNINGS", file, line, warning_str, fmt, args);
+ do_warn(Config_getBool(WARNINGS), file, line, warning_str, fmt, args);
va_end(args);
}
void va_warn(const char *file,int line,const char *fmt,va_list args)
{
- do_warn("WARNINGS", file, line, warning_str, fmt, args);
+ do_warn(Config_getBool(WARNINGS), file, line, warning_str, fmt, args);
}
void warn_simple(const char *file,int line,const char *text)
{
- if (!Config_getBool("WARNINGS")) return; // warning type disabled
+ if (!Config_getBool(WARNINGS)) return; // warning type disabled
format_warn(file,line,QCString(warning_str) + text);
}
@@ -203,7 +203,7 @@ void warn_undoc(const char *file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- do_warn("WARN_IF_UNDOCUMENTED", file, line, warning_str, fmt, args);
+ do_warn(Config_getBool(WARN_IF_UNDOCUMENTED), file, line, warning_str, fmt, args);
va_end(args);
}
@@ -211,7 +211,7 @@ void warn_doc_error(const char *file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- do_warn("WARN_IF_DOC_ERROR", file, line, warning_str, fmt, args);
+ do_warn(Config_getBool(WARN_IF_DOC_ERROR), file, line, warning_str, fmt, args);
va_end(args);
}
@@ -235,7 +235,7 @@ extern void err_full(const char *file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- do_warn(NULL, file, line, error_str, fmt, args);
+ do_warn(TRUE, file, line, error_str, fmt, args);
va_end(args);
}
diff --git a/src/msc.cpp b/src/msc.cpp
index 7f3c641..5b73d65 100644
--- a/src/msc.cpp
+++ b/src/msc.cpp
@@ -21,6 +21,7 @@
#include "message.h"
#include "docparser.h"
#include "doxygen.h"
+#include "index.h"
#include "util.h"
#include "ftextstream.h"
@@ -101,22 +102,22 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
// go to the html output directory (i.e. path)
QDir::setCurrent(outDir);
//printf("Going to dir %s\n",QDir::currentDirPath().data());
- QCString mscExe = Config_getString("MSCGEN_PATH")+"mscgen"+portable_commandExtension();
+ QCString mscExe = Config_getString(MSCGEN_PATH)+"mscgen"+portable_commandExtension();
QCString mscArgs;
- QCString extension;
+ QCString imgName = outFile;
switch (format)
{
case MSC_BITMAP:
mscArgs+="-T png";
- extension=".png";
+ imgName+=".png";
break;
case MSC_EPS:
mscArgs+="-T eps";
- extension=".eps";
+ imgName+=".eps";
break;
case MSC_SVG:
mscArgs+="-T svg";
- extension=".svg";
+ imgName+=".svg";
break;
default:
goto error; // I am not very fond of goto statements, but when in Rome...
@@ -125,8 +126,7 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
mscArgs+=inFile;
mscArgs+="\" -o \"";
- mscArgs+=outFile;
- mscArgs+=extension+"\"";
+ mscArgs+=imgName+"\"";
int exitCode;
// printf("*** running: %s %s outDir:%s %s\n",mscExe.data(),mscArgs.data(),outDir,outFile);
portable_sysTimerStart();
@@ -136,7 +136,7 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
goto error;
}
portable_sysTimerStop();
- if ( (format==MSC_EPS) && (Config_getBool("USE_PDFLATEX")) )
+ if ( (format==MSC_EPS) && (Config_getBool(USE_PDFLATEX)) )
{
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
@@ -149,6 +149,8 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
portable_sysTimerStop();
}
+ Doxygen::indexList->addImageFile(imgName);
+
error:
QDir::setCurrent(oldDir);
}
@@ -166,7 +168,7 @@ QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir,
QDir::setCurrent(outDir);
//printf("Going to dir %s\n",QDir::currentDirPath().data());
- QCString mscExe = Config_getString("MSCGEN_PATH")+"mscgen"+portable_commandExtension();
+ QCString mscExe = Config_getString(MSCGEN_PATH)+"mscgen"+portable_commandExtension();
QCString mscArgs = "-T ismap -i \"";
mscArgs+=inFile;
mscArgs+="\" -o \"";
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 948c86a..29f68a4 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -42,7 +42,14 @@ NamespaceDef::NamespaceDef(const char *df,int dl,int dc,
{
if (fName)
{
- fileName = stripExtension(fName);
+ if (lref)
+ {
+ fileName = stripExtension(fName);
+ }
+ else
+ {
+ fileName = convertNameToFile(stripExtension(fName));
+ }
}
else
{
@@ -58,7 +65,7 @@ NamespaceDef::NamespaceDef(const char *df,int dl,int dc,
memberGroupSDict = new MemberGroupSDict;
memberGroupSDict->setAutoDelete(TRUE);
visited=FALSE;
- m_subGrouping=Config_getBool("SUBGROUPING");
+ m_subGrouping=Config_getBool(SUBGROUPING);
if (type && !strcmp("module", type))
{
m_type = MODULE;
@@ -90,8 +97,14 @@ NamespaceDef::~NamespaceDef()
void NamespaceDef::setFileName(const QCString &fn)
{
- fileName="namespace";
- fileName+=fn;
+ if (isReference())
+ {
+ fileName = "namespace"+fn;
+ }
+ else
+ {
+ fileName = convertNameToFile("namespace"+fn);
+ }
}
void NamespaceDef::distributeMemberGroupDocumentation()
@@ -129,7 +142,7 @@ void NamespaceDef::insertUsedFile(FileDef *fd)
if (fd==0) return;
if (files.find(fd)==-1)
{
- if (Config_getBool("SORT_MEMBER_DOCS"))
+ if (Config_getBool(SORT_MEMBER_DOCS))
files.inSort(fd);
else
files.append(fd);
@@ -153,7 +166,7 @@ void NamespaceDef::insertClass(ClassDef *cd)
{
if (classSDict->find(cd->name())==0)
{
- if (Config_getBool("SORT_BRIEF_DOCS"))
+ if (Config_getBool(SORT_BRIEF_DOCS))
classSDict->inSort(cd->name(),cd);
else
classSDict->append(cd->name(),cd);
@@ -164,7 +177,7 @@ void NamespaceDef::insertNamespace(NamespaceDef *nd)
{
if (namespaceSDict->find(nd->name())==0)
{
- if (Config_getBool("SORT_MEMBER_DOCS"))
+ if (Config_getBool(SORT_MEMBER_DOCS))
namespaceSDict->inSort(nd->name(),nd);
else
namespaceSDict->append(nd->name(),nd);
@@ -217,7 +230,7 @@ void NamespaceDef::insertMember(MemberDef *md)
//printf("%s::m_allMembersDict->append(%s)\n",name().data(),md->localName().data());
m_allMembersDict->append(md->localName(),md);
//::addNamespaceMemberNameToIndex(md);
- //static bool sortBriefDocs=Config_getBool("SORT_BRIEF_DOCS");
+ //static bool sortBriefDocs=Config_getBool(SORT_BRIEF_DOCS);
switch(md->memberType())
{
case MemberType_Variable:
@@ -259,7 +272,7 @@ void NamespaceDef::computeAnchors()
bool NamespaceDef::hasDetailedDescription() const
{
- static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
+ static bool repeatBrief = Config_getBool(REPEAT_BRIEF);
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().isEmpty());
}
@@ -361,11 +374,11 @@ void NamespaceDef::writeDetailedDescription(OutputList &ol,const QCString &title
ol.endGroupHeader();
ol.startTextBlock();
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
+ if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
}
- if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
+ if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
{
ol.pushGeneratorState();
@@ -395,6 +408,10 @@ void NamespaceDef::writeBriefDescription(OutputList &ol)
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.writeString(" - ");
+ ol.popGeneratorState();
ol.writeDoc(rootNode,this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
@@ -434,7 +451,7 @@ void NamespaceDef::endMemberDeclarations(OutputList &ol)
void NamespaceDef::startMemberDocumentation(OutputList &ol)
{
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.disable(OutputGenerator::Html);
Doxygen::suppressDocWarnings = TRUE;
@@ -443,7 +460,7 @@ void NamespaceDef::startMemberDocumentation(OutputList &ol)
void NamespaceDef::endMemberDocumentation(OutputList &ol)
{
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.enable(OutputGenerator::Html);
Doxygen::suppressDocWarnings = FALSE;
@@ -493,7 +510,7 @@ void NamespaceDef::writeAuthorSection(OutputList &ol)
ol.startGroupHeader();
ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
ol.endGroupHeader();
- ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
+ ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString(PROJECT_NAME)));
ol.popGeneratorState();
}
@@ -551,9 +568,9 @@ void NamespaceDef::addNamespaceAttributes(OutputList &ol)
void NamespaceDef::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
- //static bool outputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
+ //static bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
QCString pageTitle = title();
startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_NamespaceVisible,!generateTreeView);
@@ -690,7 +707,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
endFileWithNavPath(this,ol);
- if (Config_getBool("SEPARATE_MEMBER_PAGES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
MemberList *allMemberList = getMemberList(MemberListType_allMembersList);
if (allMemberList) allMemberList->sort();
@@ -717,7 +734,7 @@ void NamespaceDef::writeMemberPages(OutputList &ol)
void NamespaceDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
{
- static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
+ static bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
ol.writeString(" <div class=\"navtab\">\n");
ol.writeString(" <table>\n");
@@ -796,16 +813,9 @@ void NamespaceDef::addUsingDeclaration(Definition *d)
}
}
-QCString NamespaceDef::getOutputFileBase() const
-{
- if (isReference())
- {
- return fileName;
- }
- else
- {
- return convertNameToFile(fileName);
- }
+QCString NamespaceDef::getOutputFileBase() const
+{
+ return fileName;
}
Definition *NamespaceDef::findInnerCompound(const char *n)
@@ -828,7 +838,7 @@ Definition *NamespaceDef::findInnerCompound(const char *n)
void NamespaceDef::addListReferences()
{
- //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
{
QList<ListItemInfo> *xrefItems = xrefListItems();
addRefItem(xrefItems,
@@ -943,7 +953,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,
if (count()==0) return; // no namespaces in the list
- if (Config_getBool("OPTIMIZE_OUTPUT_VHDL")) return;
+ if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return;
SDict<NamespaceDef>::Iterator ni(*this);
@@ -977,8 +987,8 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,
// write list of namespaces
ol.startMemberHeader("namespaces");
- //bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
+ //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
ol.parseText(title);
ol.endMemberHeader();
ol.startMemberList();
@@ -1006,7 +1016,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,
}
ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name);
ol.endMemberItem();
- if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
+ if (!nd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
ol.startMemberDescription(nd->getOutputFileBase());
ol.generateDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE,0,TRUE);
@@ -1038,8 +1048,8 @@ MemberList *NamespaceDef::createMemberList(MemberListType lt)
void NamespaceDef::addMemberToList(MemberListType lt,MemberDef *md)
{
- static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
- static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
+ static bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
+ static bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
MemberList *ml = createMemberList(lt);
ml->setNeedsSorting(
((ml->listType()&MemberListType_declarationLists) && sortBriefDocs) ||
@@ -1107,7 +1117,7 @@ bool NamespaceDef::isLinkableInProject() const
{
int i = name().findRev("::");
if (i==-1) i=0; else i+=2;
- static bool extractAnonNs = Config_getBool("EXTRACT_ANON_NSPACES");
+ static bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
if (extractAnonNs && // extract anonymous ns
name().mid(i,20)=="anonymous_namespace{" // correct prefix
) // not disabled by config
diff --git a/src/outputgen.h b/src/outputgen.h
index c3099df..7e28bac 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -188,7 +188,7 @@ class BaseOutputDocInterface : public CodeOutputInterface
//virtual void newParagraph() = 0;
/*! Starts a new paragraph */
- virtual void startParagraph() = 0;
+ virtual void startParagraph(const char *classDef) = 0;
/*! Ends a paragraph */
virtual void endParagraph() = 0;
@@ -299,6 +299,8 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void writeNonBreakableSpace(int) = 0;
virtual void startDescTable(const char *title) = 0;
virtual void endDescTable() = 0;
+ virtual void startDescTableRow() = 0;
+ virtual void endDescTableRow() = 0;
virtual void startDescTableTitle() = 0;
virtual void endDescTableTitle() = 0;
virtual void startDescTableData() = 0;
@@ -402,7 +404,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberGroup(bool) = 0;
virtual void insertMemberAlign(bool) = 0;
virtual void startMemberDoc(const char *,const char *,
- const char *,const char *,bool) = 0;
+ const char *,const char *,int,int,bool) = 0;
virtual void endMemberDoc(bool) = 0;
virtual void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name,
@@ -468,8 +470,8 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endConstraintDocs() = 0;
virtual void endConstraintList() = 0;
- virtual void startMemberDocSimple() = 0;
- virtual void endMemberDocSimple() = 0;
+ virtual void startMemberDocSimple(bool) = 0;
+ virtual void endMemberDocSimple(bool) = 0;
virtual void startInlineMemberType() = 0;
virtual void endInlineMemberType() = 0;
virtual void startInlineMemberName() = 0;
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 79330d8..93a1b6e 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -353,6 +353,7 @@ FORALL5(const char *a1,const char *a2,const char *a3,const char *a4,const char *
FORALL5(const char *a1,const char *a2,const char *a3,const char *a4,bool a5,a1,a2,a3,a4,a5)
FORALL6(const char *a1,const char *a2,const char *a3,const char *a4,const char *a5,const char *a6,a1,a2,a3,a4,a5,a6)
FORALL6(const char *a1,const DocLinkInfo &a2,const char *a3,const char *a4,const SourceLinkInfo &a5,const SourceLinkInfo &a6,a1,a2,a3,a4,a5,a6)
+FORALL7(const char *a1,const char *a2,const char *a3,const char *a4,int a5,int a6,bool a7,a1,a2,a3,a4,a5,a6,a7)
//--------------------------------------------------------------------------
diff --git a/src/outputlist.h b/src/outputlist.h
index 4abb100..5cec439 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -112,8 +112,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endTitle); }
//void newParagraph()
//{ forall(&OutputGenerator::newParagraph); }
- void startParagraph()
- { forall(&OutputGenerator::startParagraph); }
+ void startParagraph(const char *classDef=0)
+ { forall(&OutputGenerator::startParagraph,classDef); }
void endParagraph()
{ forall(&OutputGenerator::endParagraph); }
void writeString(const char *text)
@@ -259,8 +259,9 @@ class OutputList : public OutputDocInterface
void writeChar(char c)
{ forall(&OutputGenerator::writeChar,c); }
void startMemberDoc(const char *clName,const char *memName,
- const char *anchor,const char *title,bool showInline)
- { forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title,showInline); }
+ const char *anchor,const char *title,
+ int memCount,int memTotal,bool showInline)
+ { forall(&OutputGenerator::startMemberDoc,clName,memName,anchor,title,memCount,memTotal,showInline); }
void endMemberDoc(bool hasArgs)
{ forall(&OutputGenerator::endMemberDoc,hasArgs); }
void startDoxyAnchor(const char *fName,const char *manName,
@@ -371,6 +372,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startDescTable,title); }
void endDescTable()
{ forall(&OutputGenerator::endDescTable); }
+ void startDescTableRow()
+ { forall(&OutputGenerator::startDescTableRow); }
+ void endDescTableRow()
+ { forall(&OutputGenerator::endDescTableRow); }
void startDescTableTitle()
{ forall(&OutputGenerator::startDescTableTitle); }
void endDescTableTitle()
@@ -447,10 +452,10 @@ class OutputList : public OutputDocInterface
void endConstraintList()
{ forall(&OutputGenerator::endConstraintList); }
- void startMemberDocSimple()
- { forall(&OutputGenerator::startMemberDocSimple); }
- void endMemberDocSimple()
- { forall(&OutputGenerator::endMemberDocSimple); }
+ void startMemberDocSimple(bool b)
+ { forall(&OutputGenerator::startMemberDocSimple,b); }
+ void endMemberDocSimple(bool b)
+ { forall(&OutputGenerator::endMemberDocSimple,b); }
void startInlineMemberType()
{ forall(&OutputGenerator::startInlineMemberType); }
void endInlineMemberType()
@@ -546,6 +551,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO5(const char *,const char *,const char *,const char *,bool);
FORALLPROTO6(const char *,const char *,const char *,const char *,const char *,const char *);
FORALLPROTO6(const char *,const DocLinkInfo &,const char *,const char *,const SourceLinkInfo &,const SourceLinkInfo &);
+ FORALLPROTO7(const char *,const char *,const char *,const char *,int,int,bool);
OutputList(const OutputList &ol);
QList<OutputGenerator> m_outputs;
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index 20ace23..1210305 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -34,8 +34,7 @@ PageDef::PageDef(const char *f,int l,const char *n,
m_subPageDict = new PageSDict(7);
m_pageScope = 0;
m_nestingLevel = 0;
- static bool shortNames = Config_getBool("SHORT_NAMES");
- m_fileName = shortNames ? convertNameToFile(n) : QCString(n);
+ m_fileName = ::convertNameToFile(n,FALSE,TRUE);
m_showToc = FALSE;
}
@@ -118,7 +117,7 @@ void PageDef::writeTagFile(FTextStream &tagFile)
void PageDef::writeDocumentation(OutputList &ol)
{
- static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
+ static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
//outputList->disable(OutputGenerator::Man);
QCString pageName,manPageName;
@@ -154,7 +153,7 @@ void PageDef::writeDocumentation(OutputList &ol)
if (!generateTreeView)
{
- if (getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX"))
+ if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
{
getOuterScope()->writeNavigationPath(ol);
}
@@ -204,7 +203,7 @@ void PageDef::writeDocumentation(OutputList &ol)
writePageDocumentation(ol);
- if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool("DISABLE_INDEX"))
+ if (generateTreeView && getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX))
{
ol.endContents();
endFileWithNavPath(getOuterScope(),ol);
@@ -230,12 +229,20 @@ void PageDef::writePageDocumentation(OutputList &ol)
}
ol.startTextBlock();
+ QCString docStr = documentation()+inbodyDocumentation();
+ if (!docStr.isEmpty())
+ {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Man);
+ ol.writeString(" - ");
+ ol.popGeneratorState();
+ }
ol.generateDoc(
docFile(), // fileName
docLine(), // startLine
this, // context
0, // memberdef
- documentation()+inbodyDocumentation(), // docStr
+ docStr, // docStr
TRUE, // index words
FALSE // not an example
);
@@ -281,7 +288,7 @@ void PageDef::writePageDocumentation(OutputList &ol)
bool PageDef::visibleInIndex() const
{
- static bool externalPages = Config_getBool("EXTERNAL_PAGES");
+ static bool externalPages = Config_getBool(EXTERNAL_PAGES);
return // not part of a group
!getGroupDef() &&
// not an externally defined page
@@ -309,6 +316,6 @@ void PageDef::setNestingLevel(int l)
void PageDef::setShowToc(bool b)
{
- m_showToc = b;
+ m_showToc |= b;
}
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 6f9eb64..ef5cbc2 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -653,8 +653,8 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
m_output.add("<programlisting>");
parseCode(m_ci,s->context(),s->text(),FALSE,0);
m_output.add("</programlisting>");
-#endif
return;
+#endif
case DocVerbatim::Verbatim: type = "preformatted"; break;
case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
case DocVerbatim::RtfOnly: type = "rtfonly"; break;
@@ -667,6 +667,14 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::PlantUML: type = "plantuml"; break;
}
openItem(type);
+ if (s->hasCaption())
+ {
+ openSubBlock("caption");
+ QListIterator<DocNode> cli(s->children());
+ DocNode *n;
+ for (cli.toFirst();(n=cli.current());++cli) n->accept(this);
+ closeSubBlock();
+ }
m_output.addFieldQuotedString("content", s->text());
closeItem();
}
@@ -708,6 +716,12 @@ void PerlModDocVisitor::visit(DocInclude *inc)
case DocInclude::LatexInclude: type = "latexonly"; break;
case DocInclude::VerbInclude: type = "preformatted"; break;
case DocInclude::Snippet: return;
+ case DocInclude::SnipWithLines: return;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
openItem(type);
m_output.addFieldQuotedString("content", inc->text());
@@ -897,6 +911,7 @@ void PerlModDocVisitor::visitPre(DocSection *s)
{
QCString sect = QCString().sprintf("sect%d",s->level());
openItem(sect);
+ m_output.addFieldQuotedString("title", s->title());
openSubBlock("content");
}
@@ -1260,17 +1275,43 @@ void PerlModDocVisitor::visitPre(DocParamList *pl)
DocNode *param;
for (li.toFirst();(param=li.current());++li)
{
- QCString s;
+ QCString name;
if (param->kind()==DocNode::Kind_Word)
{
- s = ((DocWord*)param)->word();
+ name = ((DocWord*)param)->word();
}
else if (param->kind()==DocNode::Kind_LinkedWord)
{
- s = ((DocLinkedWord*)param)->word();
+ name = ((DocLinkedWord*)param)->word();
}
+
+ QCString dir = "";
+ DocParamSect *sect = 0;
+ if (pl->parent()->kind()==DocNode::Kind_ParamSect)
+ {
+ sect=(DocParamSect*)pl->parent();
+ }
+ if (sect && sect->hasInOutSpecifier())
+ {
+ if (pl->direction()!=DocParamSect::Unspecified)
+ {
+ if (pl->direction()==DocParamSect::In)
+ {
+ dir = "in";
+ }
+ else if (pl->direction()==DocParamSect::Out)
+ {
+ dir = "out";
+ }
+ else if (pl->direction()==DocParamSect::InOut)
+ {
+ dir = "in,out";
+ }
+ }
+ }
+
m_output.openHash()
- .addFieldQuotedString("name", s)
+ .addFieldQuotedString("name", name).addFieldQuotedString("dir", dir)
.closeHash();
}
m_output.closeList()
@@ -2208,7 +2249,7 @@ bool PerlModGenerator::createOutputFile(QFile &f, const char *s)
bool PerlModGenerator::createOutputDir(QDir &perlModDir)
{
- QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
+ QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY);
if (outputDirectory.isEmpty())
{
outputDirectory=QDir::currentDirPath().utf8();
@@ -2445,8 +2486,8 @@ bool PerlModGenerator::generateDoxyRules()
if (!createOutputFile(doxyRules, pathDoxyRules))
return false;
- bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
- QCString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
+ bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
+ QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
FTextStream doxyRulesStream(&doxyRules);
doxyRulesStream <<
@@ -2542,8 +2583,8 @@ bool PerlModGenerator::generateMakefile()
if (!createOutputFile(makefile, pathMakefile))
return false;
- bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
- QCString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
+ bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
+ QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
FTextStream makefileStream(&makefile);
makefileStream <<
@@ -2923,7 +2964,7 @@ void PerlModGenerator::generate()
if (!createOutputDir(perlModDir))
return;
- bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
+ bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
QCString perlModAbsPath = perlModDir.absPath().utf8();
pathDoxyDocsPM = perlModAbsPath + "/DoxyDocs.pm";
@@ -2959,7 +3000,7 @@ void PerlModGenerator::generate()
void generatePerlMod()
{
- PerlModGenerator pmg(Config_getBool("PERLMOD_PRETTY"));
+ PerlModGenerator pmg(Config_getBool(PERLMOD_PRETTY));
pmg.generate();
}
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index 7d28688..f97f690 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -16,6 +16,8 @@
#include "plantuml.h"
#include "portable.h"
#include "config.h"
+#include "doxygen.h"
+#include "index.h"
#include "message.h"
#include <qdir.h>
@@ -43,7 +45,7 @@ QCString writePlantUMLSource(const QCString &outDir,const QCString &fileName,con
{
err("Could not open file %s for writing\n",baseName.data());
}
- QCString text = "@startuml";
+ QCString text = "@startuml\n";
text+=content;
text+="@enduml\n";
file.writeBlock( text, text.length() );
@@ -53,12 +55,13 @@ QCString writePlantUMLSource(const QCString &outDir,const QCString &fileName,con
void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutputFormat format)
{
- static QCString plantumlJarPath = Config_getString("PLANTUML_JAR_PATH");
+ static QCString plantumlJarPath = Config_getString(PLANTUML_JAR_PATH);
+ static QCString plantumlConfigFile = Config_getString(PLANTUML_CFG_FILE);
QCString pumlExe = "java";
QCString pumlArgs = "";
- QStrList &pumlIncludePathList = Config_getList("PLANTUML_INCLUDE_PATH");
+ QStrList &pumlIncludePathList = Config_getList(PLANTUML_INCLUDE_PATH);
char *s=pumlIncludePathList.first();
if (s)
{
@@ -74,23 +77,36 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp
}
if (pumlIncludePathList.first()) pumlArgs += "\" ";
pumlArgs += "-Djava.awt.headless=true -jar \""+plantumlJarPath+"plantuml.jar\" ";
+ if (!plantumlConfigFile.isEmpty())
+ {
+ pumlArgs += "-config \"";
+ pumlArgs += plantumlConfigFile;
+ pumlArgs += "\" ";
+ }
pumlArgs+="-o \"";
pumlArgs+=outDir;
pumlArgs+="\" ";
- QCString extension;
+ QCString imgName = baseName;
+ // The basename contains path, we need to strip the path from the filename in order
+ // to create the image file name which should be included in the index.qhp (Qt help index file).
+ int i;
+ if ((i=imgName.findRev('/'))!=-1) // strip path
+ {
+ imgName=imgName.right(imgName.length()-i-1);
+ }
switch (format)
{
case PUML_BITMAP:
pumlArgs+="-tpng";
- extension=".png";
+ imgName+=".png";
break;
case PUML_EPS:
pumlArgs+="-teps";
- extension=".eps";
+ imgName+=".eps";
break;
case PUML_SVG:
pumlArgs+="-tsvg";
- extension=".svg";
+ imgName+=".svg";
break;
}
pumlArgs+=" \"";
@@ -98,7 +114,7 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp
pumlArgs+=".pu\" ";
pumlArgs+="-charset UTF-8 ";
int exitCode;
- //printf("*** running: %s %s outDir:%s %s\n",pumlExe.data(),pumlArgs.data(),outDir,outFile);
+ //printf("*** running: %s %s outDir:%s %s\n",pumlExe.data(),pumlArgs.data(),outDir,baseName);
msg("Running PlantUML on generated file %s.pu\n",baseName);
portable_sysTimerStart();
if ((exitCode=portable_system(pumlExe,pumlArgs,TRUE))!=0)
@@ -106,12 +122,12 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp
err("Problems running PlantUML. Verify that the command 'java -jar \"%splantuml.jar\" -h' works from the command line. Exit code: %d\n",
plantumlJarPath.data(),exitCode);
}
- else if (Config_getBool("DOT_CLEANUP"))
+ else if (Config_getBool(DOT_CLEANUP))
{
QFile(QCString(baseName)+".pu").remove();
}
portable_sysTimerStop();
- if ( (format==PUML_EPS) && (Config_getBool("USE_PDFLATEX")) )
+ if ( (format==PUML_EPS) && (Config_getBool(USE_PDFLATEX)) )
{
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",baseName,baseName);
@@ -122,5 +138,6 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp
}
portable_sysTimerStop();
}
+ Doxygen::indexList->addImageFile(imgName);
}
diff --git a/src/portable.cpp b/src/portable.cpp
index 5886793..1983fe7 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -448,4 +448,27 @@ bool portable_isAbsolutePath(const char *fileName)
return false;
}
-
+/**
+ * Correct a possible wrong PATH variable
+ *
+ * This routine was inspired by the cause for bug 766059 was that in the Windows path there were forward slahes.
+ */
+void portable_correct_path(void)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ const char *p = portable_getenv("PATH");
+ char *q = (char *)malloc(strlen(p) + 1);
+ strcpy(q, p);
+ bool found = false;
+ for (int i = 0 ; i < strlen(q); i++)
+ {
+ if (q[i] == '/')
+ {
+ q[i] = '\\';
+ found = true;
+ }
+ }
+ if (found) portable_setenv("PATH",q);
+ free(q);
+#endif
+}
diff --git a/src/portable.h b/src/portable.h
index 1471ce1..c5578a3 100644
--- a/src/portable.h
+++ b/src/portable.h
@@ -35,6 +35,7 @@ void portable_sysTimerStop();
double portable_getSysElapsedTime();
void portable_sleep(int ms);
bool portable_isAbsolutePath(const char *fileName);
+void portable_correct_path(void);
extern "C" {
void * portable_iconv_open(const char* tocode, const char* fromcode);
diff --git a/src/pre.l b/src/pre.l
index 18f3b1d..18cdbc9 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -15,6 +15,8 @@
*
*/
%option never-interactive
+%option prefix="preYY"
+
%{
/*
@@ -454,7 +456,7 @@ static FileState *checkAndOpenFile(const QCString &fileName,bool &alreadyInclude
QFileInfo fi(fileName);
if (fi.exists() && fi.isFile())
{
- static QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
+ static QStrList &exclPatterns = Config_getList(EXCLUDE_PATTERNS);
if (patternMatch(fi,&exclPatterns)) return 0;
QCString absName = fi.absFilePath().utf8();
@@ -1461,7 +1463,7 @@ static inline void outputArray(const char *a,int len)
static void readIncludeFile(const QCString &inc)
{
- static bool searchIncludes = Config_getBool("SEARCH_INCLUDES");
+ static bool searchIncludes = Config_getBool(SEARCH_INCLUDES);
uint i=0;
// find the start of the include file name
@@ -1507,7 +1509,7 @@ static void readIncludeFile(const QCString &inc)
}
else if (searchIncludes) // search in INCLUDE_PATH as well
{
- QStrList &includePath = Config_getList("INCLUDE_PATH");
+ QStrList &includePath = Config_getList(INCLUDE_PATH);
char *s=includePath.first();
while (s)
{
@@ -1737,6 +1739,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x SkipString
%x CopyLine
%x CopyString
+%x CopyStringFtn
%x Include
%x IncludeID
%x EndImport
@@ -1789,7 +1792,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<Start>^{B}*[_A-Z][_A-Z0-9]+{B}*"("[^\(\)\n]*"("[^\)\n]*")"[^\)\n]*")"{B}*\n | // function list macro with one (...) argument, e.g. for K_GLOBAL_STATIC_WITH_ARGS
<Start>^{B}*[_A-Z][_A-Z0-9]+{B}*"("[^\)\n]*")"{B}*\n { // function like macro
- static bool skipFuncMacros = Config_getBool("SKIP_FUNCTION_MACROS");
+ static bool skipFuncMacros = Config_getBool(SKIP_FUNCTION_MACROS);
QCString name(yytext);
name=name.left(name.find('(')).stripWhiteSpace();
@@ -1850,6 +1853,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputChar(*yytext);
BEGIN( CopyString );
}
+<CopyLine>\' {
+ if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran) REJECT;
+ outputChar(*yytext);
+ BEGIN( CopyStringFtn );
+ }
<CopyString>[^\"\\\r\n]+ {
outputArray(yytext,(int)yyleng);
}
@@ -1860,6 +1868,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputChar(*yytext);
BEGIN( CopyLine );
}
+<CopyStringFtn>[^\'\\\r\n]+ {
+ outputArray(yytext,(int)yyleng);
+ }
+<CopyStringFtn>\\. {
+ outputArray(yytext,(int)yyleng);
+ }
+<CopyStringFtn>\' {
+ outputChar(*yytext);
+ BEGIN( CopyLine );
+ }
<CopyLine>{ID}/{BN}{0,80}"(" {
g_expectGuard = FALSE;
Define *def=0;
@@ -2454,7 +2472,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
outputArray(yytext,(int)yyleng);
}
<SkipCComment>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
+ static bool markdownSupport = Config_getBool(MARKDOWN_SUPPORT);
if (!markdownSupport)
{
REJECT;
@@ -2467,7 +2485,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<SkipCComment>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
+ static bool markdownSupport = Config_getBool(MARKDOWN_SUPPORT);
if (!markdownSupport)
{
REJECT;
@@ -2999,8 +3017,8 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
//printf("##########################\n%s\n####################\n",
// input.data());
- g_macroExpansion = Config_getBool("MACRO_EXPANSION");
- g_expandOnlyPredef = Config_getBool("EXPAND_ONLY_PREDEF");
+ g_macroExpansion = Config_getBool(MACRO_EXPANSION);
+ g_expandOnlyPredef = Config_getBool(EXPAND_ONLY_PREDEF);
g_skip=FALSE;
g_curlyCount=0;
g_nospaces=FALSE;
@@ -3024,7 +3042,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
{
// add predefined macros
char *defStr;
- QStrList &predefList = Config_getList("PREDEFINED");
+ QStrList &predefList = Config_getList(PREDEFINED);
QStrListIterator sli(predefList);
for (sli.toFirst();(defStr=sli.current());++sli)
{
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index b86670a..d1dbb74 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -22,6 +22,7 @@
#include <qglobal.h>
#include "docvisitor.h"
#include "htmlentity.h"
+#include "message.h"
/*! Concrete visitor implementation for pretty printing */
class PrintDocVisitor : public DocVisitor
@@ -170,6 +171,12 @@ class PrintDocVisitor : public DocVisitor
case DocInclude::LatexInclude: printf("latexinclude"); break;
case DocInclude::VerbInclude: printf("verbinclude"); break;
case DocInclude::Snippet: printf("snippet"); break;
+ case DocInclude::SnipWithLines: printf("snipwithlines"); break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
printf("\"/>");
}
diff --git a/src/pycode.l b/src/pycode.l
index b8ca5ed..fe1eef5 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -22,6 +22,8 @@
*/
%option never-interactive
+%option prefix="pycodeYY"
+
%{
#include <stdio.h>
@@ -438,7 +440,7 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
Definition *d,
const char *text)
{
- static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS");
+ static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance()->addTooltip(d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
@@ -1007,18 +1009,34 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
codify(yytext);
endFontClass();
}
+ "self."{IDENTIFIER}/"."({IDENTIFIER}".")*{IDENTIFIER}"(" {
+ codify("self.");
+ findMemberLink(*g_code,&yytext[5]);
+ }
"self."{IDENTIFIER}/"(" {
codify("self.");
findMemberLink(*g_code,&yytext[5]);
}
+ "self."{IDENTIFIER}/"."({IDENTIFIER}".")*{IDENTIFIER} {
+ codify("self.");
+ findMemberLink(*g_code,&yytext[5]);
+ }
"self."{IDENTIFIER} {
codify("self.");
findMemberLink(*g_code,&yytext[5]);
}
+ "cls."{IDENTIFIER}/"."({IDENTIFIER}".")*{IDENTIFIER}"(" {
+ codify("cls.");
+ findMemberLink(*g_code,&yytext[4]);
+ }
"cls."{IDENTIFIER}/"(" {
codify("cls.");
findMemberLink(*g_code,&yytext[4]);
}
+ "cls."{IDENTIFIER}/"."({IDENTIFIER}".")*{IDENTIFIER} {
+ codify("cls.");
+ findMemberLink(*g_code,&yytext[4]);
+ }
"cls."{IDENTIFIER} {
codify("cls.");
findMemberLink(*g_code,&yytext[4]);
@@ -1126,6 +1144,10 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
codify(yytext);
}
+ "\n" {
+ codifyLines(yytext);
+ }
+
":" {
codify(yytext);
@@ -1388,7 +1410,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
}
<DocBlock>{NEWLINE} { // comment block ends at the end of this line
// remove special comment (default config)
- if (Config_getBool("STRIP_CODE_COMMENTS"))
+ if (Config_getBool(STRIP_CODE_COMMENTS))
{
g_yyLineNr+=((QCString)g_docBlock).contains('\n');
g_endComment=TRUE;
@@ -1402,7 +1424,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
unput(*yytext);
yy_pop_state();
}
-<*>{POUNDCOMMENT} {
+<*>{POUNDCOMMENT}.* {
if (YY_START==SingleQuoteString ||
YY_START==DoubleQuoteString ||
YY_START==TripleString
@@ -1457,7 +1479,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT
<*><<EOF>> {
if (YY_START == DocBlock) {
- if (!Config_getBool("STRIP_CODE_COMMENTS"))
+ if (!Config_getBool(STRIP_CODE_COMMENTS))
{
startFontClass("comment");
codifyLines(g_docBlock);
@@ -1514,8 +1536,8 @@ static void adjustScopesAndSuites(unsigned indentLength)
void parsePythonCode(CodeOutputInterface &od,const char * /*className*/,
const QCString &s,bool exBlock, const char *exName,
- FileDef *fd,int startLine,int endLine,bool /*inlineFragment*/,
- MemberDef *,bool,Definition *searchCtx,bool collectXRefs)
+ FileDef *fd,int startLine,int endLine,bool inlineFragment,
+ MemberDef *,bool,Definition *searchCtx,bool collectXRefs)
{
//printf("***parseCode()\n");
@@ -1531,22 +1553,22 @@ void parsePythonCode(CodeOutputInterface &od,const char * /*className*/,
g_needsTermination = FALSE;
g_searchCtx=searchCtx;
g_collectXRefs=collectXRefs;
- if (endLine!=-1)
- g_inputLines = endLine+1;
- else
- g_inputLines = countLines();
-
if (startLine!=-1)
g_yyLineNr = startLine;
else
g_yyLineNr = 1;
+ if (endLine!=-1)
+ g_inputLines = endLine+1;
+ else
+ g_inputLines = g_yyLineNr + countLines() - 1;
+
g_exampleBlock = exBlock;
g_exampleName = exName;
g_sourceFileDef = fd;
bool cleanupSourceDef = FALSE;
- if (fd==0)
+ if (exBlock && fd==0)
{
// create a dummy filedef for the example
g_sourceFileDef = new FileDef("",(exName?exName:"generated"));
@@ -1557,6 +1579,7 @@ void parsePythonCode(CodeOutputInterface &od,const char * /*className*/,
setCurrentDoc("l00001");
}
+ g_includeCodeFragment = inlineFragment;
// Starts line 1 on the output
startCodeLine();
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 9ec69be..9c21d41 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -22,6 +22,8 @@
*/
%option never-interactive
+%option prefix="pyscannerYY"
+
%{
/*
@@ -181,7 +183,7 @@ static void newFunction()
static inline int computeIndent(const char *s)
{
int col=0;
- static int tabSize=Config_getInt("TAB_SIZE");
+ static int tabSize=Config_getInt(TAB_SIZE);
const char *p=s;
char c;
while ((c=*p++))
@@ -368,7 +370,7 @@ static void initTriDoubleQuoteBlock()
docBlockContext = YY_START;
docBlockInBody = FALSE;
docBlockJavaStyle = TRUE;
- docBlockSpecial = yytext[3]=='!';
+ docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
docBlock.resize(0);
g_doubleQuote = TRUE;
startCommentBlock(FALSE);
@@ -379,7 +381,7 @@ static void initTriSingleQuoteBlock()
docBlockContext = YY_START;
docBlockInBody = FALSE;
docBlockJavaStyle = TRUE;
- docBlockSpecial = yytext[3]=='!';
+ docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
docBlock.resize(0);
g_doubleQuote = FALSE;
startCommentBlock(FALSE);
@@ -470,8 +472,10 @@ IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")*
SCOPE {IDENTIFIER}("."{IDENTIFIER})*
BORDER ([^A-Za-z0-9])
-TRISINGLEQUOTE "'''"(!)?
-TRIDOUBLEQUOTE "\"\"\""(!)?
+TRISINGLEQUOTE {STRINGPREFIX}?"'''"(!)?
+TRIDOUBLEQUOTE {STRINGPREFIX}?"\"\"\""(!)?
+ENDTRISINGLEQUOTE "'''"
+ENDTRIDOUBLEQUOTE "\"\"\""
LONGSTRINGCHAR [^\\"']
ESCAPESEQ ("\\")(.)
LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
@@ -1203,51 +1207,49 @@ STARTDOCSYMS "##"
current->initializer += " ";
}
{B} { // spaces
+ current->initializer += yytext;
}
{INTNUMBER} { // integer value
- current->type = "int";
+ if (current-> type.isEmpty()) current->type = "int";
current->initializer += yytext;
- BEGIN(VariableEnd);
}
{FLOATNUMBER} { // floating point value
- current->type = "float";
+ if (current->type.isEmpty()) current->type = "float";
current->initializer += yytext;
- BEGIN(VariableEnd);
}
{BOOL} { // boolean value
- current->type = "bool";
+ if (current->type.isEmpty()) current->type = "bool";
current->initializer += yytext;
- BEGIN(VariableEnd);
}
{STRINGPREFIX}?"'" { // string
- current->type = "string";
+ if (current->type.isEmpty()) current->type = "string";
current->initializer += yytext;
g_copyString=&current->initializer;
- g_stringContext=VariableEnd;
+ g_stringContext=VariableDec;
BEGIN( SingleQuoteString );
}
{STRINGPREFIX}?"\"" { // string
- current->type = "string";
+ if (current->type.isEmpty()) current->type = "string";
current->initializer += yytext;
g_copyString=&current->initializer;
- g_stringContext=VariableEnd;
+ g_stringContext=VariableDec;
BEGIN( DoubleQuoteString );
}
{TRIDOUBLEQUOTE} { // start of a comment block
- current->type = "string";
+ if (current->type.isEmpty()) current->type = "string";
current->initializer += yytext;
g_doubleQuote=TRUE;
g_copyString=&current->initializer;
- g_stringContext=VariableEnd;
+ g_stringContext=VariableDec;
BEGIN(TripleString);
}
{TRISINGLEQUOTE} { // start of a comment block
- current->type = "string";
+ if (current->type.isEmpty()) current->type = "string";
current->initializer += yytext;
g_doubleQuote=FALSE;
g_copyString=&current->initializer;
- g_stringContext=VariableEnd;
+ g_stringContext=VariableDec;
BEGIN(TripleString);
}
"(" { // tuple, only when direct after =
@@ -1281,6 +1283,20 @@ STARTDOCSYMS "##"
BEGIN( VariableEnd );
}
{IDENTIFIER} {
+ // do something based on the type of the IDENTIFIER
+ if (current->type.isEmpty())
+ {
+ QListIterator<Entry> eli(*(current_root->children()));
+ Entry *child;
+ for (eli.toFirst();(child=eli.current());++eli)
+ {
+ if (child->name == QCString(yytext))
+ {
+ current->type = child->type;
+ break;
+ }
+ }
+ }
g_start_init = FALSE;
current->initializer+=yytext;
}
@@ -1369,8 +1385,8 @@ STARTDOCSYMS "##"
}
<TripleComment>{
- {TRIDOUBLEQUOTE} |
- {TRISINGLEQUOTE} {
+ {ENDTRIDOUBLEQUOTE} |
+ {ENDTRISINGLEQUOTE} {
// printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
if (g_doubleQuote==(yytext[0]=='"'))
{
@@ -1515,8 +1531,8 @@ STARTDOCSYMS "##"
}
<TripleString>{
- {TRIDOUBLEQUOTE} |
- {TRISINGLEQUOTE} {
+ {ENDTRIDOUBLEQUOTE} |
+ {ENDTRISINGLEQUOTE} {
*g_copyString += yytext;
if (g_doubleQuote==(yytext[0]=='"'))
{
diff --git a/src/qhp.cpp b/src/qhp.cpp
index 757f547..e7c8d10 100644
--- a/src/qhp.cpp
+++ b/src/qhp.cpp
@@ -81,8 +81,8 @@ void Qhp::initialize()
<filterAttribute>1.0</filterAttribute>
..
*/
- QCString nameSpace = Config_getString("QHP_NAMESPACE");
- QCString virtualFolder = Config_getString("QHP_VIRTUAL_FOLDER");
+ QCString nameSpace = Config_getString(QHP_NAMESPACE);
+ QCString virtualFolder = Config_getString(QHP_VIRTUAL_FOLDER);
m_doc.declaration("1.0", "UTF-8");
@@ -94,14 +94,14 @@ void Qhp::initialize()
m_doc.openCloseContent("virtualFolder", virtualFolder);
// Add custom filter
- QCString filterName = Config_getString("QHP_CUST_FILTER_NAME");
+ QCString filterName = Config_getString(QHP_CUST_FILTER_NAME);
if (!filterName.isEmpty())
{
const char * tagAttributes[] =
{ "name", filterName, 0 };
m_doc.open("customFilter", tagAttributes);
- QStringList customFilterAttributes = QStringList::split(QChar(' '), Config_getString("QHP_CUST_FILTER_ATTRS"));
+ QStringList customFilterAttributes = QStringList::split(QChar(' '), Config_getString(QHP_CUST_FILTER_ATTRS));
for (int i = 0; i < (int)customFilterAttributes.count(); i++)
{
m_doc.openCloseContent("filterAttribute", customFilterAttributes[i].utf8());
@@ -113,7 +113,7 @@ void Qhp::initialize()
// Add section attributes
QStringList sectionFilterAttributes = QStringList::split(QChar(' '),
- Config_getString("QHP_SECT_FILTER_ATTRS"));
+ Config_getString(QHP_SECT_FILTER_ATTRS));
if (!sectionFilterAttributes.contains(QString("doxygen")))
{
sectionFilterAttributes << "doxygen";
@@ -164,7 +164,7 @@ void Qhp::finalize()
m_doc.close("filterSection");
m_doc.close("QtHelpProject");
- QCString fileName = Config_getString("HTML_OUTPUT") + "/" + getQhpFileName();
+ QCString fileName = Config_getString(HTML_OUTPUT) + "/" + getQhpFileName();
QFile file(fileName);
if (!file.open(IO_WriteOnly))
{
@@ -225,7 +225,7 @@ void Qhp::addIndexItem(Definition *context,MemberDef *md,
if (md) // member
{
- static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
+ static bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
if (context==0) // global member
{
if (md->getGroupDef())
@@ -284,8 +284,8 @@ QCString Qhp::getQhpFileName()
QCString Qhp::getFullProjectName()
{
- QCString projectName = Config_getString("PROJECT_NAME");
- QCString versionText = Config_getString("PROJECT_NUMBER");
+ QCString projectName = Config_getString(PROJECT_NAME);
+ QCString versionText = Config_getString(PROJECT_NUMBER);
if (projectName.isEmpty()) projectName="Root";
return projectName + (versionText.isEmpty()
? QCString("")
diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp
index 80bd2ad..ab7422a 100644
--- a/src/resourcemgr.cpp
+++ b/src/resourcemgr.cpp
@@ -56,7 +56,7 @@ void ResourceMgr::registerResources(const Resource resources[],int numResources)
}
}
-bool ResourceMgr::copyCategory(const char *categoryName,const char *targetDir) const
+bool ResourceMgr::writeCategory(const char *categoryName,const char *targetDir) const
{
QDictIterator<Resource> it(p->resources);
const Resource *res;
@@ -64,8 +64,11 @@ bool ResourceMgr::copyCategory(const char *categoryName,const char *targetDir) c
{
if (qstrcmp(res->category,categoryName)==0)
{
- if (!copyResource(res->name,targetDir))
+ QCString pathName = QCString(targetDir)+"/"+res->name;
+ QFile f(pathName);
+ if (!f.open(IO_WriteOnly) || f.writeBlock((const char *)res->data,res->size)!=res->size)
{
+ err("Failed to write resource '%s' to directory '%s'\n",res->name,targetDir);
return FALSE;
}
}
@@ -137,7 +140,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
buf = replaceColorMarkers(buf);
if (qstrcmp(name,"navtree.css")==0)
{
- t << substitute(buf,"$width",QCString().setNum(Config_getInt("TREEVIEW_WIDTH"))+"px");
+ t << substitute(buf,"$width",QCString().setNum(Config_getInt(TREEVIEW_WIDTH))+"px");
}
else
{
diff --git a/src/resourcemgr.h b/src/resourcemgr.h
index 57b3e37..6e1587d 100644
--- a/src/resourcemgr.h
+++ b/src/resourcemgr.h
@@ -38,8 +38,8 @@ class ResourceMgr
/** Registers an array of resources */
void registerResources(const Resource resources[],int numResources);
- /** Copies all resource belonging to a given category to a given target directory */
- bool copyCategory(const char *categoryName,const char *targetDir) const;
+ /** Writes all resource belonging to a given category to a given target directory */
+ bool writeCategory(const char *categoryName,const char *targetDir) const;
/** Copies a registered resource to a given target directory */
bool copyResource(const char *name,const char *targetDir) const;
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 2ea35cc..c85b638 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -140,7 +140,7 @@ void RTFDocVisitor::visit(DocURL *u)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocURL)}\n");
- if (Config_getBool("RTF_HYPERLINKS"))
+ if (Config_getBool(RTF_HYPERLINKS))
{
m_t << "{\\field "
"{\\*\\fldinst "
@@ -231,6 +231,13 @@ void RTFDocVisitor::visit(DocStyleChange *s)
}
}
+static void visitCaption(RTFDocVisitor *parent, QList<DocNode> children)
+{
+ QListIterator<DocNode> cli(children);
+ DocNode *n;
+ for (cli.toFirst();(n=cli.current());++cli) n->accept(parent);
+}
+
void RTFDocVisitor::visit(DocVerbatim *s)
{
if (m_hide) return;
@@ -277,7 +284,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
QCString fileName(4096);
fileName.sprintf("%s%d%s",
- (Config_getString("RTF_OUTPUT")+"/inline_dotgraph_").data(),
+ (Config_getString(RTF_OUTPUT)+"/inline_dotgraph_").data(),
dotindex++,
".dot"
);
@@ -288,10 +295,12 @@ void RTFDocVisitor::visit(DocVerbatim *s)
}
file.writeBlock( s->text(), s->text().length() );
file.close();
- m_t << "\\par{\\qc "; // center picture
- writeDotFile(fileName);
- m_t << "} ";
- if (Config_getBool("DOT_CLEANUP")) file.remove();
+
+ writeDotFile(fileName, s->hasCaption());
+ visitCaption(this, s->children());
+ includePicturePostRTF(true, s->hasCaption());
+
+ if (Config_getBool(DOT_CLEANUP)) file.remove();
}
break;
case DocVerbatim::Msc:
@@ -300,7 +309,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d%s",
- (Config_getString("RTF_OUTPUT")+"/inline_mscgraph_").data(),
+ (Config_getString(RTF_OUTPUT)+"/inline_mscgraph_").data(),
mscindex++,
".msc"
);
@@ -314,20 +323,22 @@ void RTFDocVisitor::visit(DocVerbatim *s)
text+="}";
file.writeBlock( text, text.length() );
file.close();
- m_t << "\\par{\\qc "; // center picture
- writeMscFile(baseName);
- m_t << "} ";
- if (Config_getBool("DOT_CLEANUP")) file.remove();
+
+ writeMscFile(baseName, s->hasCaption());
+ visitCaption(this, s->children());
+ includePicturePostRTF(true, s->hasCaption());
+
+ if (Config_getBool(DOT_CLEANUP)) file.remove();
}
break;
case DocVerbatim::PlantUML:
{
- static QCString rtfOutput = Config_getString("RTF_OUTPUT");
+ static QCString rtfOutput = Config_getString(RTF_OUTPUT);
QCString baseName = writePlantUMLSource(rtfOutput,s->exampleFile(),s->text());
- m_t << "\\par{\\qc "; // center picture
- writePlantUMLFile(baseName);
- m_t << "} ";
+ writePlantUMLFile(baseName, s->hasCaption());
+ visitCaption(this, s->children());
+ includePicturePostRTF(true, s->hasCaption());
}
break;
}
@@ -375,7 +386,14 @@ void RTFDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
- inc->exampleFile(), &fd);
+ inc->exampleFile(),
+ &fd, // fileDef,
+ -1, // start line
+ -1, // end line
+ FALSE, // inline fragment
+ 0, // memberDef
+ TRUE // show line numbers
+ );
m_t << "\\par";
m_t << "}" << endl;
}
@@ -387,7 +405,14 @@ void RTFDocVisitor::visit(DocInclude *inc)
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
inc->text(),langExt,inc->isExample(),
- inc->exampleFile());
+ inc->exampleFile(),
+ 0, // fileDef
+ -1, // startLine
+ -1, // endLine
+ TRUE, // inlineFragment
+ 0, // memberDef
+ FALSE // show line numbers
+ );
m_t << "\\par";
m_t << "}" << endl;
break;
@@ -419,6 +444,35 @@ void RTFDocVisitor::visit(DocInclude *inc)
);
m_t << "}";
break;
+ case DocInclude::SnipWithLines:
+ {
+ QFileInfo cfi( inc->file() );
+ FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ m_t << "{" << endl;
+ if (!m_lastIsPara) m_t << "\\par" << endl;
+ m_t << rtf_Style_Reset << getStyle("CodeExample");
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile(),
+ &fd,
+ lineBlock(inc->text(),inc->blockId()),
+ -1, // endLine
+ FALSE, // inlineFragment
+ 0, // memberDef
+ TRUE // show line number
+ );
+ m_t << "}";
+ }
+ break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
m_lastIsPara=TRUE;
}
@@ -958,7 +1012,7 @@ void RTFDocVisitor::visitPre(DocHRef *href)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHRef)}\n");
- if (Config_getBool("RTF_HYPERLINKS"))
+ if (Config_getBool(RTF_HYPERLINKS))
{
m_t << "{\\field "
"{\\*\\fldinst "
@@ -980,7 +1034,7 @@ void RTFDocVisitor::visitPost(DocHRef *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHRef)}\n");
- if (Config_getBool("RTF_HYPERLINKS"))
+ if (Config_getBool(RTF_HYPERLINKS))
{
m_t << "}"
"}"
@@ -1004,17 +1058,17 @@ void RTFDocVisitor::visitPre(DocHtmlHeader *header)
heading.sprintf("Heading%d",level);
// set style
m_t << rtf_Style[heading]->reference;
- // make table of contents entry
- m_t << "{\\tc\\tcl \\v " << level << "}";
+ // make open table of contents entry that will be closed in visitPost method
+ m_t << "{\\tc\\tcl" << level << " ";
m_lastIsPara=FALSE;
-
}
void RTFDocVisitor::visitPost(DocHtmlHeader *)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocHtmlHeader)}\n");
- m_t << "\\par";
+ // close open table of contens entry
+ m_t << "} \\par";
m_t << "}" << endl; // end section
m_lastIsPara=TRUE;
}
@@ -1022,76 +1076,95 @@ void RTFDocVisitor::visitPost(DocHtmlHeader *)
void RTFDocVisitor::visitPre(DocImage *img)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n");
- if (img->type()==DocImage::Rtf)
+ includePicturePreRTF(img->name(), img->type()==DocImage::Rtf, img->hasCaption());
+}
+
+void RTFDocVisitor::includePicturePreRTF(const QCString name, const bool isTypeRTF, const bool hasCaption)
+{
+ if (isTypeRTF)
{
m_t << "\\par" << endl;
m_t << "{" << endl;
m_t << rtf_Style_Reset << endl;
- m_t << "\\par\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
- m_t << img->name();
- m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- m_t << "}" << endl;
+ if (hasCaption || m_lastIsPara) m_t << "\\par" << endl;
+ m_t << "\\pard \\qc { \\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
+ m_t << name;
+ m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt Image}}" << endl;
+ m_t << "\\par" << endl;
+ if (hasCaption)
+ {
+ m_t << "\\pard \\qc \\b";
+ m_t << "{Image \\field\\flddirty{\\*\\fldinst { SEQ Image \\\\*Arabic }}{\\fldrslt {\\noproof 1}} ";
+ }
m_lastIsPara=TRUE;
}
else // other format -> skip
{
+ pushEnabled();
+ m_hide=TRUE;
}
- // hide caption since it is not supported at the moment
- pushEnabled();
- m_hide=TRUE;
}
-void RTFDocVisitor::visitPost(DocImage *)
+void RTFDocVisitor::visitPost(DocImage *img)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocImage)}\n");
- popEnabled();
+ includePicturePostRTF(img->type()==DocImage::Rtf, img->hasCaption());
+}
+
+void RTFDocVisitor::includePicturePostRTF(const bool isTypeRTF, const bool hasCaption)
+{
+ if (isTypeRTF)
+ {
+ if (m_hide) return;
+ if (hasCaption)
+ {
+ m_t << "}" <<endl;
+ m_t << "\\par}" <<endl;
+ }
+ else
+ {
+ m_t << "}" <<endl;
+ }
+ }
+ else
+ {
+ popEnabled();
+ }
}
void RTFDocVisitor::visitPre(DocDotFile *df)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDotFile)}\n");
- writeDotFile(df->file());
-
- // hide caption since it is not supported at the moment
- pushEnabled();
- m_hide=TRUE;
+ writeDotFile(df);
}
-void RTFDocVisitor::visitPost(DocDotFile *)
+void RTFDocVisitor::visitPost(DocDotFile *df)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDotFile)}\n");
- popEnabled();
+ includePicturePostRTF(true, df->hasCaption());
}
void RTFDocVisitor::visitPre(DocMscFile *df)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocMscFile)}\n");
- writeMscFile(df->file());
-
- // hide caption since it is not supported at the moment
- pushEnabled();
- m_hide=TRUE;
+ writeMscFile(df);
}
-void RTFDocVisitor::visitPost(DocMscFile *)
+void RTFDocVisitor::visitPost(DocMscFile *df)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocMscFile)}\n");
- popEnabled();
+ includePicturePostRTF(true, df->hasCaption());
}
void RTFDocVisitor::visitPre(DocDiaFile *df)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocDiaFile)}\n");
- writeDiaFile(df->file());
-
- // hide caption since it is not supported at the moment
- pushEnabled();
- m_hide=TRUE;
+ writeDiaFile(df);
}
-void RTFDocVisitor::visitPost(DocDiaFile *)
+void RTFDocVisitor::visitPost(DocDiaFile *df)
{
DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocDiaFile)}\n");
- popEnabled();
+ includePicturePostRTF(true, df->hasCaption());
}
void RTFDocVisitor::visitPre(DocLink *lnk)
@@ -1168,7 +1241,7 @@ void RTFDocVisitor::visitPost(DocSecRefList *)
//void RTFDocVisitor::visitPre(DocLanguage *l)
//{
// DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLanguage)}\n");
-// QCString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QCString langId = Config_getEnum(OUTPUT_LANGUAGE);
// if (l->id().lower()!=langId.lower())
// {
// pushEnabled();
@@ -1179,7 +1252,7 @@ void RTFDocVisitor::visitPost(DocSecRefList *)
//void RTFDocVisitor::visitPost(DocLanguage *l)
//{
// DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLanguage)}\n");
-// QCString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QCString langId = Config_getEnum(OUTPUT_LANGUAGE);
// if (l->id().lower()!=langId.lower())
// {
// popEnabled();
@@ -1422,7 +1495,7 @@ void RTFDocVisitor::visitPre(DocXRefItem *x)
m_t << "{"; // start param list
//m_t << "{\\b "; // start bold
m_t << "{" << rtf_Style["Heading5"]->reference << endl;
- if (Config_getBool("RTF_HYPERLINKS") && !anonymousEnum)
+ if (Config_getBool(RTF_HYPERLINKS) && !anonymousEnum)
{
QCString refName;
if (!x->file().isEmpty())
@@ -1608,7 +1681,7 @@ void RTFDocVisitor::filter(const char *str,bool verbatim)
void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
- if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS"))
+ if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
QCString refName;
if (!file.isEmpty())
@@ -1638,7 +1711,7 @@ void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCS
void RTFDocVisitor::endLink(const QCString &ref)
{
- if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS"))
+ if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
m_t << "}}}";
}
@@ -1662,28 +1735,29 @@ void RTFDocVisitor::popEnabled()
delete v;
}
-void RTFDocVisitor::writeDotFile(const QCString &fileName)
+void RTFDocVisitor::writeDotFile(DocDotFile *df)
{
- QCString baseName=fileName;
+ writeDotFile(df->file(), df->hasCaption());
+}
+void RTFDocVisitor::writeDotFile(const QCString &filename, const bool hasCaption)
+{
+ QCString baseName=filename;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
- QCString outDir = Config_getString("RTF_OUTPUT");
- writeDotGraphFromFile(fileName,outDir,baseName,GOF_BITMAP);
- if (!m_lastIsPara) m_t << "\\par" << endl;
- m_t << "{" << endl;
- m_t << rtf_Style_Reset;
- m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
+ QCString outDir = Config_getString(RTF_OUTPUT);
+ writeDotGraphFromFile(filename,outDir,baseName,GOF_BITMAP);
QCString imgExt = getDotImageExtension();
- m_t << baseName << "." << imgExt;
- m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- m_t << "}" << endl;
- m_lastIsPara=TRUE;
+ includePicturePreRTF(baseName + "." + imgExt, true, hasCaption);
}
-void RTFDocVisitor::writeMscFile(const QCString &fileName)
+void RTFDocVisitor::writeMscFile(DocMscFile *df)
+{
+ writeMscFile(df->file(), df->hasCaption());
+}
+void RTFDocVisitor::writeMscFile(const QCString &fileName, const bool hasCaption)
{
QCString baseName=fileName;
int i;
@@ -1691,39 +1765,25 @@ void RTFDocVisitor::writeMscFile(const QCString &fileName)
{
baseName=baseName.right(baseName.length()-i-1);
}
- QCString outDir = Config_getString("RTF_OUTPUT");
+ QCString outDir = Config_getString(RTF_OUTPUT);
writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
- if (!m_lastIsPara) m_t << "\\par" << endl;
- m_t << "{" << endl;
- m_t << rtf_Style_Reset;
- m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
- m_t << baseName << ".png";
- m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- m_t << "}" << endl;
- m_lastIsPara=TRUE;
+ includePicturePreRTF(baseName + ".png", true, hasCaption);
}
-void RTFDocVisitor::writeDiaFile(const QCString &fileName)
+void RTFDocVisitor::writeDiaFile(DocDiaFile *df)
{
- QCString baseName=fileName;
+ QCString baseName=df->file();
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
- QCString outDir = Config_getString("RTF_OUTPUT");
- writeDiaGraphFromFile(fileName,outDir,baseName,DIA_BITMAP);
- if (!m_lastIsPara) m_t << "\\par" << endl;
- m_t << "{" << endl;
- m_t << rtf_Style_Reset;
- m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
- m_t << baseName << ".png";
- m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- m_t << "}" << endl;
- m_lastIsPara=TRUE;
+ QCString outDir = Config_getString(RTF_OUTPUT);
+ writeDiaGraphFromFile(df->file(),outDir,baseName,DIA_BITMAP);
+ includePicturePreRTF(baseName + ".png", true, df->hasCaption());
}
-void RTFDocVisitor::writePlantUMLFile(const QCString &fileName)
+void RTFDocVisitor::writePlantUMLFile(const QCString &fileName, const bool hasCaption)
{
QCString baseName=fileName;
int i;
@@ -1731,15 +1791,7 @@ void RTFDocVisitor::writePlantUMLFile(const QCString &fileName)
{
baseName=baseName.right(baseName.length()-i-1);
}
- QCString outDir = Config_getString("RTF_OUTPUT");
+ QCString outDir = Config_getString(RTF_OUTPUT);
generatePlantUMLOutput(fileName,outDir,PUML_BITMAP);
- if (!m_lastIsPara) m_t << "\\par" << endl;
- m_t << "{" << endl;
- m_t << rtf_Style_Reset;
- m_t << "\\pard \\qc {\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"";
- m_t << baseName << ".png";
- m_t << "\" \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
- m_t << "}" << endl;
- m_lastIsPara=TRUE;
+ includePicturePreRTF(baseName + ".png", true, hasCaption);
}
-
diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h
index 0e759c1..1e927e7 100644
--- a/src/rtfdocvisitor.h
+++ b/src/rtfdocvisitor.h
@@ -152,10 +152,14 @@ class RTFDocVisitor : public DocVisitor
void pushEnabled();
void popEnabled();
- void writeDotFile(const QCString &fileName);
- void writeMscFile(const QCString &fileName);
- void writeDiaFile(const QCString &fileName);
- void writePlantUMLFile(const QCString &fileName);
+ void includePicturePreRTF(const QCString name, const bool isTypeRTF, const bool hasCaption);
+ void includePicturePostRTF(const bool isTypeRTF, const bool hasCaption);
+ void writeDotFile(const QCString &fileName, const bool hasCaption);
+ void writeDotFile(DocDotFile *);
+ void writeMscFile(const QCString &fileName, const bool hasCaption);
+ void writeMscFile(DocMscFile *);
+ void writeDiaFile(DocDiaFile *);
+ void writePlantUMLFile(const QCString &fileName, const bool hasCaption);
//--------------------------------------
// state variables
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 749f57b..349d97d 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -59,14 +59,14 @@ static QCString dateToRTFDateString()
RTFGenerator::RTFGenerator() : OutputGenerator()
{
- dir=Config_getString("RTF_OUTPUT");
+ dir=Config_getString(RTF_OUTPUT);
col=0;
//insideTabbing=FALSE;
m_listLevel = 0;
m_bstartedBody = FALSE;
m_omitParagraph = FALSE;
m_numCols = 0;
- m_prettyCode=Config_getBool("RTF_SOURCE_CODE");
+ m_prettyCode=Config_getBool(RTF_SOURCE_CODE);
}
RTFGenerator::~RTFGenerator()
@@ -165,7 +165,7 @@ void RTFGenerator::writeExtensionsFile(QFile &file)
void RTFGenerator::init()
{
- QCString dir=Config_getString("RTF_OUTPUT");
+ QCString dir=Config_getString(RTF_OUTPUT);
QDir d(dir);
if (!d.exists() && !d.mkdir(dir))
{
@@ -186,14 +186,14 @@ void RTFGenerator::init()
}
// overwrite some (or all) definitions from file
- QCString &rtfStyleSheetFile = Config_getString("RTF_STYLESHEET_FILE");
+ QCString &rtfStyleSheetFile = Config_getString(RTF_STYLESHEET_FILE);
if (!rtfStyleSheetFile.isEmpty())
{
loadStylesheet(rtfStyleSheetFile, rtf_Style);
}
// If user has defined an extension file, load its contents.
- QCString &rtfExtensionsFile = Config_getString("RTF_EXTENSIONS_FILE");
+ QCString &rtfExtensionsFile = Config_getString(RTF_EXTENSIONS_FILE);
if (!rtfExtensionsFile.isEmpty())
{
loadExtensions(rtfExtensionsFile);
@@ -296,7 +296,7 @@ void RTFGenerator::beginRTFChapter()
t << rtf_Style_Reset;
// if we are compact, no extra page breaks...
- if (Config_getBool("COMPACT_RTF"))
+ if (Config_getBool(COMPACT_RTF))
{
// t <<"\\sect\\sectd\\sbknone\n";
t <<"\\sect\\sbknone\n";
@@ -316,7 +316,7 @@ void RTFGenerator::beginRTFSection()
t << rtf_Style_Reset;
// if we are compact, no extra page breaks...
- if (Config_getBool("COMPACT_RTF"))
+ if (Config_getBool(COMPACT_RTF))
{
// t <<"\\sect\\sectd\\sbknone\n";
t <<"\\sect\\sbknone\n";
@@ -538,10 +538,10 @@ void RTFGenerator::startIndexSection(IndexSections is)
void RTFGenerator::endIndexSection(IndexSections is)
{
- bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
- bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
- static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
- static QCString projectName = Config_getString("PROJECT_NAME");
+ bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
+ bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+ static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
+ static QCString projectName = Config_getString(PROJECT_NAME);
switch (is)
{
@@ -609,7 +609,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
else
t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par" << endl;
- t << theTranslator->trVersion() << " " << Config_getString("PROJECT_NUMBER") << "\\par";
+ t << theTranslator->trVersion() << " " << Config_getString(PROJECT_NUMBER) << "\\par";
t << "{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
"{\\fldrslt "<< dateToString(FALSE) << " }}\\par"<<endl;
t << "\\page\\page";
@@ -637,7 +637,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "{\\tc \\v " << substitute(Doxygen::mainPage->title(),"%","") << "}"<< endl;
}
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
- //if (Config_getBool("GENERATE_TREEVIEW")) t << "main"; else t << "index";
+ //if (Config_getBool(GENERATE_TREEVIEW)) t << "main"; else t << "index";
t << "index";
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
@@ -1075,7 +1075,7 @@ void RTFGenerator::endIndexItem(const char *ref,const char *fn)
void RTFGenerator::startHtmlLink(const char *url)
{
- if (Config_getBool("RTF_HYPERLINKS"))
+ if (Config_getBool(RTF_HYPERLINKS))
{
t << "{\\field {\\*\\fldinst { HYPERLINK \"";
t << url;
@@ -1090,7 +1090,7 @@ void RTFGenerator::startHtmlLink(const char *url)
void RTFGenerator::endHtmlLink()
{
- if (Config_getBool("RTF_HYPERLINKS"))
+ if (Config_getBool(RTF_HYPERLINKS))
{
t << "}}}" << endl;
}
@@ -1113,7 +1113,7 @@ void RTFGenerator::writeStartAnnoItem(const char *,const char *f,
DBG_RTF(t << "{\\comment (writeStartAnnoItem)}" << endl)
t << "{\\b ";
if (path) docify(path);
- if (f && Config_getBool("RTF_HYPERLINKS"))
+ if (f && Config_getBool(RTF_HYPERLINKS))
{
t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
t << rtfFormatBmkStr(f);
@@ -1292,7 +1292,7 @@ void RTFGenerator::endSubsubsection()
//
void RTFGenerator::startTextLink(const char *f,const char *anchor)
{
- if (Config_getBool("RTF_HYPERLINKS"))
+ if (Config_getBool(RTF_HYPERLINKS))
{
QCString ref;
if (f)
@@ -1314,7 +1314,7 @@ void RTFGenerator::startTextLink(const char *f,const char *anchor)
void RTFGenerator::endTextLink()
{
- if (Config_getBool("RTF_HYPERLINKS"))
+ if (Config_getBool(RTF_HYPERLINKS))
{
t << "}}}" << endl;
}
@@ -1323,7 +1323,7 @@ void RTFGenerator::endTextLink()
void RTFGenerator::writeObjectLink(const char *ref, const char *f,
const char *anchor, const char *text)
{
- if (!ref && Config_getBool("RTF_HYPERLINKS"))
+ if (!ref && Config_getBool(RTF_HYPERLINKS))
{
QCString refName;
if (f)
@@ -1380,7 +1380,7 @@ void RTFGenerator::writeCodeLink(const char *ref,const char *f,
const char *anchor,const char *name,
const char *)
{
- if (!ref && Config_getBool("RTF_HYPERLINKS"))
+ if (!ref && Config_getBool(RTF_HYPERLINKS))
{
QCString refName;
if (f)
@@ -1435,7 +1435,7 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
// writeAnchor(0,name);
//}
//
- //if (Config_getBool("RTF_HYPERLINKS") && fileName)
+ //if (Config_getBool(RTF_HYPERLINKS) && fileName)
//{
writeAnchor(fileName,0);
//}
@@ -1445,7 +1445,7 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
void RTFGenerator::startTitle()
{
DBG_RTF(t <<"{\\comment startTitle}" << endl)
- if (Config_getBool("COMPACT_RTF"))
+ if (Config_getBool(COMPACT_RTF))
beginRTFSection();
else
beginRTFChapter();
@@ -1482,6 +1482,8 @@ void RTFGenerator::startMemberDoc(const char *clname,
const char *memname,
const char *,
const char *,
+ int,
+ int,
bool showInline)
{
DBG_RTF(t << "{\\comment startMemberDoc}" << endl)
@@ -1803,7 +1805,7 @@ void RTFGenerator::codify(const char *str)
switch(c)
{
- case '\t': spacesToNextTabStop = Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
+ case '\t': spacesToNextTabStop = Config_getInt(TAB_SIZE) - (col%Config_getInt(TAB_SIZE));
t << Doxygen::spaces.left(spacesToNextTabStop);
col+=spacesToNextTabStop;
break;
@@ -1965,7 +1967,7 @@ void RTFGenerator::endMemberList()
// {
// baseName=baseName.right(baseName.length()-i-1);
// }
-// QCString outDir = Config_getString("RTF_OUTPUT");
+// QCString outDir = Config_getString(RTF_OUTPUT);
// writeDotGraphFromFile(name,outDir,baseName,BITMAP);
// newParagraph();
// t << "{" << endl;
@@ -1984,50 +1986,67 @@ void RTFGenerator::endMemberList()
void RTFGenerator::startDescTable(const char *title)
{
DBG_RTF(t << "{\\comment (startDescTable) }" << endl)
- startSimpleSect(EnumValues,0,0,title);
- startDescForItem();
- //t << "{" << endl;
- //incrementIndentLevel();
- //t << rtf_Style_Reset << rtf_CList_DepthStyle();
+ t << "{\\par" << endl;
+ t << "{" << rtf_Style["Heading5"]->reference << endl;
+ docify(title);
+ t << ":\\par}" << endl;
+ t << rtf_Style_Reset << rtf_DList_DepthStyle();
+ t << "\\trowd \\trgaph108\\trleft426\\tblind426"
+ "\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
+ "\\trbrdrl\\brdrs\\brdrw10\\brdrcf15 "
+ "\\trbrdrb\\brdrs\\brdrw10\\brdrcf15 "
+ "\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
+ "\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
+ "\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl;
+ int i,columnPos[2] = { 25, 100 };
+ for (i=0;i<2;i++)
+ {
+ t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
+ "\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
+ "\\clbrdrb\\brdrs\\brdrw10\\brdrcf15 "
+ "\\clbrdrr \\brdrs\\brdrw10\\brdrcf15 "
+ "\\cltxlrtb "
+ "\\cellx" << (rtf_pageWidth*columnPos[i]/100) << endl;
+ }
+ t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
}
void RTFGenerator::endDescTable()
{
- //decrementIndentLevel();
DBG_RTF(t << "{\\comment (endDescTable)}" << endl)
- endDescForItem();
- endSimpleSect();
- //t << "}" << endl;
- //t << rtf_Style_Reset << styleStack.top();
+ t << "}" << endl;
+}
+
+void RTFGenerator::startDescTableRow()
+{
+}
+
+void RTFGenerator::endDescTableRow()
+{
}
void RTFGenerator::startDescTableTitle()
{
- //t << rtf_BList_DepthStyle() << endl;
DBG_RTF(t << "{\\comment (startDescTableTitle) }" << endl)
- startBold();
- startEmphasis();
+ t << "{\\qr ";
}
void RTFGenerator::endDescTableTitle()
{
DBG_RTF(t << "{\\comment (endDescTableTitle) }" << endl)
- endEmphasis();
- endBold();
- t << " ";
+ t << "\\cell }";
}
void RTFGenerator::startDescTableData()
{
DBG_RTF(t << "{\\comment (startDescTableData) }" << endl)
- m_omitParagraph = FALSE;
+ t << "{";
}
void RTFGenerator::endDescTableData()
{
DBG_RTF(t << "{\\comment (endDescTableData) }" << endl)
- newParagraph();
- m_omitParagraph = TRUE;
+ t << "\\cell }{\\row }" << endl;
}
// a style for list formatted as a "bulleted list"
@@ -2125,7 +2144,7 @@ void RTFGenerator::newParagraph()
m_omitParagraph = FALSE;
}
-void RTFGenerator::startParagraph()
+void RTFGenerator::startParagraph(const char *)
{
DBG_RTF(t << "{\\comment startParagraph}" << endl)
newParagraph();
@@ -2445,7 +2464,7 @@ void RTFGenerator::endDotGraph(const DotClassGraph &g)
newParagraph();
QCString fn =
- g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString("RTF_OUTPUT"),fileName,relPath,TRUE,FALSE);
+ g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT),fileName,relPath,TRUE,FALSE);
// display the file
t << "{" << endl;
@@ -2468,7 +2487,7 @@ void RTFGenerator::endInclDepGraph(const DotInclDepGraph &g)
{
newParagraph();
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString("RTF_OUTPUT"),
+ QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT),
fileName,relPath,FALSE);
// display the file
@@ -2499,7 +2518,7 @@ void RTFGenerator::endCallGraph(const DotCallGraph &g)
{
newParagraph();
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString("RTF_OUTPUT"),
+ QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT),
fileName,relPath,FALSE);
// display the file
@@ -2522,7 +2541,7 @@ void RTFGenerator::endDirDepGraph(const DotDirDeps &g)
{
newParagraph();
- QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString("RTF_OUTPUT"),
+ QCString fn = g.writeGraph(t,GOF_BITMAP,EOF_Rtf,Config_getString(RTF_OUTPUT),
fileName,relPath,FALSE);
// display the file
@@ -2904,12 +2923,20 @@ void RTFGenerator::endInlineHeader()
t << "}" << endl;
}
-void RTFGenerator::startMemberDocSimple()
+void RTFGenerator::startMemberDocSimple(bool isEnum)
{
DBG_RTF(t << "{\\comment (startMemberDocSimple)}" << endl)
t << "{\\par" << endl;
t << "{" << rtf_Style["Heading5"]->reference << endl;
- t << theTranslator->trCompoundMembers() << ":\\par}" << endl;
+ if (isEnum)
+ {
+ t << theTranslator->trEnumerationValues();
+ }
+ else
+ {
+ t << theTranslator->trCompoundMembers();
+ }
+ t << ":\\par}" << endl;
t << rtf_Style_Reset << rtf_DList_DepthStyle();
t << "\\trowd \\trgaph108\\trleft426\\tblind426"
"\\trbrdrt\\brdrs\\brdrw10\\brdrcf15 "
@@ -2918,8 +2945,14 @@ void RTFGenerator::startMemberDocSimple()
"\\trbrdrr\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrh\\brdrs\\brdrw10\\brdrcf15 "
"\\trbrdrv\\brdrs\\brdrw10\\brdrcf15 "<< endl;
- int i,columnPos[3] = { 25, 50, 100 };
- for (i=0;i<3;i++)
+ int i,n=3,columnPos[3] = { 25, 50, 100 };
+ if (isEnum)
+ {
+ columnPos[0]=30;
+ columnPos[1]=100;
+ n=2;
+ }
+ for (i=0;i<n;i++)
{
t << "\\clvertalt\\clbrdrt\\brdrs\\brdrw10\\brdrcf15 "
"\\clbrdrl\\brdrs\\brdrw10\\brdrcf15 "
@@ -2931,7 +2964,7 @@ void RTFGenerator::startMemberDocSimple()
t << "\\pard \\widctlpar\\intbl\\adjustright" << endl;
}
-void RTFGenerator::endMemberDocSimple()
+void RTFGenerator::endMemberDocSimple(bool)
{
DBG_RTF(t << "{\\comment (endMemberDocSimple)}" << endl)
t << "}" << endl;
diff --git a/src/rtfgen.h b/src/rtfgen.h
index f0f1f6e..d8f6ca7 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -62,7 +62,7 @@ class RTFGenerator : public OutputGenerator
void endTitle() {}
void newParagraph();
- void startParagraph();
+ void startParagraph(const char *classDef);
void endParagraph();
void writeString(const char *text);
void startIndexListItem();
@@ -138,7 +138,7 @@ class RTFGenerator : public OutputGenerator
void startDescItem();
void endDescItem();
void lineBreak(const char *style=0);
- void startMemberDoc(const char *,const char *,const char *,const char *,bool);
+ void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
void endMemberDoc(bool);
void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
void endDoxyAnchor(const char *,const char *);
@@ -193,6 +193,8 @@ class RTFGenerator : public OutputGenerator
void startDescTable(const char *title);
void endDescTable();
+ void startDescTableRow();
+ void endDescTableRow();
void startDescTableTitle();
void endDescTableTitle();
void startDescTableData();
@@ -242,8 +244,8 @@ class RTFGenerator : public OutputGenerator
void endConstraintDocs();
void endConstraintList();
- void startMemberDocSimple();
- void endMemberDocSimple();
+ void startMemberDocSimple(bool);
+ void endMemberDocSimple(bool);
void startInlineMemberType();
void endInlineMemberType();
void startInlineMemberName();
diff --git a/src/scanner.l b/src/scanner.l
index d603824..14bf3fc 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -15,6 +15,8 @@
*
*/
%option never-interactive
+%option prefix="scannerYY"
+
%{
/*
@@ -215,7 +217,7 @@ static void initParser()
autoGroupStack.setAutoDelete(TRUE);
insideFormula = FALSE;
insideCode=FALSE;
- insideCli=Config_getBool("CPP_CLI_SUPPORT");
+ insideCli=Config_getBool(CPP_CLI_SUPPORT);
previous = 0;
firstTypedefEntry = 0;
tempEntry = 0;
@@ -284,7 +286,7 @@ static void initEntry()
static void lineCount()
{
- static int tabSize = Config_getInt("TAB_SIZE");
+ static int tabSize = Config_getInt(TAB_SIZE);
const char *p;
for (p = yytext ; *p ; ++p )
{
@@ -307,7 +309,7 @@ static void lineCount()
static inline int computeIndent(const char *s,int startIndent)
{
int col=startIndent;
- static int tabSize=Config_getInt("TAB_SIZE");
+ static int tabSize=Config_getInt(TAB_SIZE);
const char *p=s;
char c;
while ((c=*p++))
@@ -1012,7 +1014,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->name = yytext;
}
<CliPropertyType>"[" { // C++/CLI indexed property
- current->name += yytext;
+ current->args = "[";
BEGIN( CliPropertyIndex );
}
<CliPropertyType>"{" {
@@ -1035,10 +1037,10 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<CliPropertyIndex>"]" {
BEGIN( CliPropertyType );
- current->name+=yytext;
+ current->args+=yytext;
}
<CliPropertyIndex>. {
- current->name+=yytext;
+ current->args+=yytext;
}
/*
<FindMembers>{B}*"property"{BN}+ {
@@ -1977,6 +1979,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->section=Entry::USINGDECL_SEC;
}
current_root->addSubEntry(current);
+ previous = current;
current = new Entry ;
initEntry();
BEGIN(Using);
@@ -2029,8 +2032,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<UsingAlias>";"{BN}*("/**"|"//!"|"/*!"|"///")"<" {
docBlockContext = UsingAliasEnd;
docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) ||
- ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
+ docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
indent.fill(' ',computeIndent(yytext,g_column));
docBlock=indent;
@@ -2671,8 +2674,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
docBlockContext = YY_START;
docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) ||
- ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
+ docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
indent.fill(' ',computeIndent(yytext,g_column));
@@ -2701,8 +2704,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<MemberSpec,FindFields,FindMembers,NextSemi,EnumBaseType,BitFields,ReadInitializer,OldStyleArgs>","{BN}*("/**"|"//!"|"/*!"|"///")"<" {
docBlockContext = YY_START;
docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) ||
- ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
+ docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
indent.fill(' ',computeIndent(yytext,g_column));
@@ -2734,8 +2737,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
docBlockContext = YY_START;
docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) ||
- ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
+ docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
QCString indent;
indent.fill(' ',computeIndent(yytext,g_column));
docBlock=indent;
@@ -2793,8 +2796,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
docBlockContext = YY_START;
docBlockInBody = FALSE;
docBlock.resize(0);
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) ||
- ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
+ docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
docBlockTerm = 0;
startCommentBlock(FALSE);
BEGIN(DocBlock);
@@ -3396,7 +3399,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
idlProp.resize(0);
current->mtype = mtype;
- if (Config_getBool("IDL_PROPERTY_SUPPORT") &&
+ if (Config_getBool(IDL_PROPERTY_SUPPORT) &&
current->mtype == Property)
{ // we are inside the properties section of a dispinterface
odlProp = true;
@@ -3436,14 +3439,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<IDLAttribute>"propput" {
- if (Config_getBool("IDL_PROPERTY_SUPPORT"))
+ if (Config_getBool(IDL_PROPERTY_SUPPORT))
{
current->mtype = Property;
}
current->spec |= Entry::Settable;
}
<IDLAttribute>"propget" {
- if (Config_getBool("IDL_PROPERTY_SUPPORT"))
+ if (Config_getBool(IDL_PROPERTY_SUPPORT))
{
current->mtype = Property;
}
@@ -3459,7 +3462,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->spec |= Entry::Optional;
}
<IDLAttribute>"readonly" { // on UNO IDL attribute or property
- if (Config_getBool("IDL_PROPERTY_SUPPORT") && odlProp)
+ if (Config_getBool(IDL_PROPERTY_SUPPORT) && odlProp)
{
current->spec ^= Entry::Settable;
}
@@ -3967,7 +3970,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
if (!msName.isEmpty()
/*&& msName!=current->name*/) // skip typedef T {} T;, removed due to bug608493
{
- static bool typedefHidesStruct = Config_getBool("TYPEDEF_HIDES_STRUCT");
+ static bool typedefHidesStruct = Config_getBool(TYPEDEF_HIDES_STRUCT);
// case 1: typedef struct _S { ... } S_t;
// -> omit typedef and use S_t as the struct name
if (typedefHidesStruct &&
@@ -4093,6 +4096,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current_root->addSubEntry( current ) ;
current=new Entry;
initEntry();
+ language = current->lang = SrcLangExt_Cpp; // see bug746361
insideObjC=FALSE;
BEGIN( FindMembers );
}
@@ -4233,7 +4237,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<FuncFuncType>. {
current->type += *yytext;
}
-<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")(" { // for catching typedef void (__stdcall *f)() like definitions
+<FindMembers>"("/{BN}*{ID}{BN}*"*"{BN}*{ID}*")"{BN}*"(" { // for catching typedef void (__stdcall *f)() like definitions
if (current->type.left(7)=="typedef" && current->bodyLine==-1)
// the bodyLine check is to prevent this guard to be true more than once
{
@@ -4655,6 +4659,15 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
roundCount=0;
BEGIN(CopyRound);
}
+<FuncQual>{BN}*"&" {
+ current->args += " &";
+ current->argList->refQualifier=RefQualifierLValue;
+ }
+<FuncQual>{BN}*"&&" {
+ current->args += " &&";
+ current->argList->refQualifier=RefQualifierRValue;
+ }
+
<FuncQual,TrailingReturn>{BN}*"="{BN}*"0"{BN}* { // pure virtual member function
lineCount() ;
current->args += " = 0";
@@ -5078,8 +5091,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
docBlockContext = SkipCurlyEndDoc;
docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) ||
- ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
+ docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
docBlock.resize(0);
docBlockTerm = '}';
if (yytext[yyleng-3]=='/')
@@ -5097,8 +5110,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<SkipCurlyEndDoc>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" { // desc is followed by another one
docBlockContext = SkipCurlyEndDoc;
docBlockInBody = FALSE;
- docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool("JAVADOC_AUTOBRIEF") ) ||
- ( yytext[yyleng-2]=='!' && Config_getBool("QT_AUTOBRIEF") );
+ docBlockAutoBrief = ( yytext[yyleng-2]=='*' && Config_getBool(JAVADOC_AUTOBRIEF) ) ||
+ ( yytext[yyleng-2]=='!' && Config_getBool(QT_AUTOBRIEF) );
docBlock.resize(0);
docBlockTerm = '}';
if (yytext[yyleng-3]=='/')
@@ -5317,7 +5330,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<ClassTemplSpec>">"({BN}*"::"{BN}*{SCOPENAME})? {
current->name += yytext;
lineCount();
- if (--sharpCount<=0)
+ if (roundCount==0 && --sharpCount<=0)
{
current->name = removeRedundantWhiteSpace(current->name);
if (current->spec & Entry::Protocol)
@@ -5382,6 +5395,11 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
unput(';');
current->reset();
initEntry();
+ if (insideObjC) // see bug746361
+ {
+ language = current->lang = SrcLangExt_Cpp;
+ insideObjC = FALSE;
+ }
if (isTypedef) // typedef of a class, put typedef keyword back
{
current->type.prepend("typedef");
@@ -5727,7 +5745,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
{
if (current->section==Entry::NAMESPACE_SEC) // allow reopening of anonymous namespaces
{
- if (Config_getBool("EXTRACT_ANON_NSPACES")) // use visible name
+ if (Config_getBool(EXTRACT_ANON_NSPACES)) // use visible name
{
current->name="anonymous_namespace{"+stripPath(current->fileName)+"}";
}
@@ -5764,7 +5782,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<BasesProt>"virtual"{BN}+ { lineCount(); baseVirt = Virtual; }
<BasesProt>"public"{BN}+ { lineCount(); baseProt = Public; }
<BasesProt>"protected"{BN}+ { lineCount(); baseProt = Protected; }
-<BasesProt>"internal"{BN}+ { lineCount(); baseProt = Package; }
+<BasesProt>"internal"{BN}+ { if (!insideCli) REJECT ; lineCount(); baseProt = Package; }
<BasesProt>"private"{BN}+ { lineCount(); baseProt = Private; }
<BasesProt>{BN} { lineCount(); }
<BasesProt>. { unput(*yytext); BEGIN(Bases); }
@@ -6027,7 +6045,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
- docBlockAutoBrief = Config_getBool("QT_AUTOBRIEF");
+ docBlockAutoBrief = Config_getBool(QT_AUTOBRIEF);
QCString indent;
indent.fill(' ',computeIndent(yytext,g_column));
@@ -6054,7 +6072,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->docFile = yyFileName;
docBlockContext = YY_START;
docBlockInBody = YY_START==SkipCurly;
- static bool javadocAutoBrief = Config_getBool("JAVADOC_AUTOBRIEF");
+ static bool javadocAutoBrief = Config_getBool(JAVADOC_AUTOBRIEF);
docBlockAutoBrief = javadocAutoBrief;
QCString indent;
@@ -6209,15 +6227,21 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
/**********************************************************************************/
/* ---- Single line comments ------ */
-<DocLine>[^\n]*"\n"[ \t]*"//"[/!] { // continuation of multiline C++-style comment
+<DocLine>[^\n]*"\n"[ \t]*"//"[/!][<]? { // continuation of multiline C++-style comment
docBlock+=yytext;
- docBlock.resize(docBlock.length() - 3);
+ int markerLen = yytext[yyleng-1]=='<' ? 4 : 3;
+ docBlock.resize(docBlock.length() - markerLen);
lineCount();
}
<DocLine>{B}*"///"[/]+{B}*/"\n" { // ignore marker line (see bug700345)
handleCommentBlock(docBlock.data(),current->brief.isEmpty());
BEGIN( docBlockContext );
}
+<DocLine>[^\n]*/"\n"{B}*"//"[!/]{B}*{CMD}"}" { // next line is an end group marker, see bug 752712
+ docBlock+=yytext;
+ handleCommentBlock(docBlock.data(),current->brief.isEmpty());
+ BEGIN( docBlockContext );
+ }
<DocLine>[^\n]*/"\n" { // whole line
docBlock+=yytext;
handleCommentBlock(docBlock.data(),current->brief.isEmpty());
@@ -6615,7 +6639,7 @@ static void newEntry()
static void handleCommentBlock(const QCString &doc,bool brief)
{
- static bool hideInBodyDocs = Config_getBool("HIDE_IN_BODY_DOCS");
+ static bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS);
int position=0;
bool needsEntry=FALSE;
if (docBlockInBody && hideInBodyDocs) return;
@@ -6761,7 +6785,7 @@ static void parseCompounds(Entry *rt)
initEntry();
// deep copy group list from parent (see bug 727732)
- static bool autoGroupNested = Config_getBool("GROUP_NESTED_COMPOUNDS");
+ static bool autoGroupNested = Config_getBool(GROUP_NESTED_COMPOUNDS);
if (autoGroupNested && rt->groups && ce->section!=Entry::ENUM_SEC && !(ce->spec&Entry::Enum))
{
QListIterator<Grouping> gli(*rt->groups);
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 9bfe7b0..500ed65 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -92,7 +92,7 @@ void SearchIndex::setCurrentDoc(Definition *ctx,const char *anchor,bool isSource
assert(!isSourceFile || ctx->definitionType()==Definition::TypeFile);
//printf("SearchIndex::setCurrentDoc(%s,%s,%s)\n",name,baseName,anchor);
QCString url=isSourceFile ? ((FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase();
- url+=Config_getString("HTML_FILE_EXTENSION");
+ url+=Config_getString(HTML_FILE_EXTENSION);
QCString baseUrl = url;
if (anchor) url+=QCString("#")+anchor;
if (!isSourceFile) baseUrl=url;
@@ -499,7 +499,7 @@ static QCString definitionToName(Definition *ctx)
void SearchIndexExternal::setCurrentDoc(Definition *ctx,const char *anchor,bool isSourceFile)
{
- QCString extId = stripPath(Config_getString("EXTERNAL_SEARCH_ID"));
+ QCString extId = stripPath(Config_getString(EXTERNAL_SEARCH_ID));
QCString baseName = isSourceFile ? ((FileDef*)ctx)->getSourceFileBase() : ctx->getOutputFileBase();
QCString url = baseName + Doxygen::htmlFileExtension;
if (anchor) url+=QCString("#")+anchor;
@@ -587,7 +587,7 @@ static SearchIndexInfo g_searchIndexInfo[NUM_SEARCH_INDICES];
static void addMemberToSearchIndex(MemberDef *md)
{
- static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS");
+ static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
bool isLinkable = md->isLinkable();
ClassDef *cd=0;
NamespaceDef *nd=0;
@@ -904,7 +904,7 @@ void writeJavascriptSearchIndex()
{
int i;
// write index files
- QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search";
+ QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search";
for (i=0;i<NUM_SEARCH_INDICES;i++) // for each index
{
@@ -1003,7 +1003,7 @@ void writeJavascriptSearchIndex()
}
ti << "',";
- static bool extLinksInWindow = Config_getBool("EXT_LINKS_IN_WINDOW");
+ static bool extLinksInWindow = Config_getBool(EXT_LINKS_IN_WINDOW);
if (!extLinksInWindow || d->getReference().isEmpty())
{
ti << "1,";
@@ -1062,7 +1062,7 @@ void writeJavascriptSearchIndex()
}
ti << "',";
- static bool extLinksInWindow = Config_getBool("EXT_LINKS_IN_WINDOW");
+ static bool extLinksInWindow = Config_getBool(EXT_LINKS_IN_WINDOW);
if (!extLinksInWindow || d->getReference().isEmpty())
{
ti << "1,";
@@ -1297,9 +1297,9 @@ int SearchIndexList::compareValues(const SearchDefinitionList *md1, const Search
void initSearchIndexer()
{
- static bool searchEngine = Config_getBool("SEARCHENGINE");
- static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
- static bool externalSearch = Config_getBool("EXTERNAL_SEARCH");
+ static bool searchEngine = Config_getBool(SEARCHENGINE);
+ static bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
+ static bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
if (searchEngine && serverBasedSearch)
{
if (externalSearch) // external tools produce search index and engine
diff --git a/src/sortdict.h b/src/sortdict.h
index f4d23f2..4db330f 100644
--- a/src/sortdict.h
+++ b/src/sortdict.h
@@ -590,7 +590,7 @@ class SIntDict
/*! Returns the number of items stored in the dictionary
*/
- int count()
+ int count() const
{
return m_list->count();
}
diff --git a/src/sqlcode.h b/src/sqlcode.h
new file mode 100644
index 0000000..9c1f7e0
--- /dev/null
+++ b/src/sqlcode.h
@@ -0,0 +1,37 @@
+/******************************************************************************
+ *
+ *
+ *
+ * Copyright (C) 1997-2014 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+
+#ifndef SQLCODE_H
+#define SQLCODE_H
+
+#include "types.h"
+
+class CodeOutputInterface;
+class FileDef;
+class MemberDef;
+class QCString;
+class Definition;
+
+extern void parseSqlCode(CodeOutputInterface &,const char *,const QCString &,
+ bool ,const char *,FileDef *fd,
+ int startLine,int endLine,bool inlineFragment,
+ MemberDef *memberDef,bool showLineNumbers,Definition *searchCtx,
+ bool collectXRefs);
+extern void resetSqlCodeParserState();
+
+#endif
diff --git a/src/sqlcode.l b/src/sqlcode.l
new file mode 100644
index 0000000..fd0f11e
--- /dev/null
+++ b/src/sqlcode.l
@@ -0,0 +1,434 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2014 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+%option never-interactive
+%option prefix="sqlcodeYY"
+
+%{
+
+#include <stdio.h>
+
+#include "sqlcode.h"
+
+#include "entry.h"
+#include "doxygen.h"
+#include "outputlist.h"
+#include "util.h"
+#include "membername.h"
+#include "searchindex.h"
+#include "config.h"
+#include "filedef.h"
+#include "tooltip.h"
+
+#define YY_NEVER_INTERACTIVE 1
+#define YY_NO_INPUT 1
+#define YY_NO_UNISTD_H 1
+
+static CodeOutputInterface * g_code;
+static QCString g_curClassName;
+static QCString g_parmType;
+static QCString g_parmName;
+static const char * g_inputString; //!< the code fragment as text
+static int g_inputPosition; //!< read offset during parsing
+static int g_inputLines; //!< number of line in the code fragment
+static int g_yyLineNr; //!< current line number
+static bool g_needsTermination;
+static Definition *g_searchCtx;
+
+static bool g_exampleBlock;
+static QCString g_exampleName;
+static QCString g_exampleFile;
+
+static QCString g_type;
+static QCString g_name;
+static QCString g_args;
+static QCString g_classScope;
+
+static QCString g_CurrScope;
+
+static FileDef * g_sourceFileDef;
+static Definition * g_currentDefinition;
+static MemberDef * g_currentMemberDef;
+static bool g_includeCodeFragment;
+static const char * g_currentFontClass;
+
+static void codify(const char* text)
+{
+ g_code->codify(text);
+}
+
+static void setCurrentDoc(const QCString &anchor)
+{
+ if (Doxygen::searchIndex)
+ {
+ if (g_searchCtx)
+ {
+ Doxygen::searchIndex->setCurrentDoc(g_searchCtx,g_searchCtx->anchor(),FALSE);
+ }
+ else
+ {
+ Doxygen::searchIndex->setCurrentDoc(g_sourceFileDef,anchor,TRUE);
+ }
+ }
+}
+
+/*! start a new line of code, inserting a line number if g_sourceFileDef
+ * is TRUE. If a definition starts at the current line, then the line
+ * number is linked to the documentation of that definition.
+ */
+static void startCodeLine()
+{
+ if (g_sourceFileDef)
+ {
+ Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr);
+
+ if (!g_includeCodeFragment && d && d->isLinkableInProject())
+ {
+ g_currentDefinition = d;
+ g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr);
+ g_classScope = d->name().copy();
+ QCString lineAnchor;
+ lineAnchor.sprintf("l%05d",g_yyLineNr);
+ if (g_currentMemberDef)
+ {
+ g_code->writeLineNumber(g_currentMemberDef->getReference(),
+ g_currentMemberDef->getOutputFileBase(),
+ g_currentMemberDef->anchor(),g_yyLineNr);
+ setCurrentDoc(lineAnchor);
+ }
+ else
+ {
+ g_code->writeLineNumber(d->getReference(),
+ d->getOutputFileBase(),
+ 0,g_yyLineNr);
+ setCurrentDoc(lineAnchor);
+ }
+ }
+ else
+ {
+ g_code->writeLineNumber(0,0,0,g_yyLineNr);
+ }
+ }
+
+ g_code->startCodeLine(g_sourceFileDef);
+
+ if (g_currentFontClass)
+ {
+ g_code->startFontClass(g_currentFontClass);
+ }
+}
+
+static void endFontClass()
+{
+ if (g_currentFontClass)
+ {
+ g_code->endFontClass();
+ g_currentFontClass=0;
+ }
+}
+
+static void endCodeLine()
+{
+ endFontClass();
+ g_code->endCodeLine();
+}
+
+static void nextCodeLine()
+{
+ const char *fc = g_currentFontClass;
+ endCodeLine();
+ if (g_yyLineNr<g_inputLines)
+ {
+ g_currentFontClass = fc;
+ startCodeLine();
+ }
+}
+
+static void codifyLines(char *text)
+{
+ char *p=text,*sp=p;
+ char c;
+ bool done=FALSE;
+
+ while (!done)
+ {
+ sp=p;
+
+ while ((c=*p++) && c!='\n') { }
+
+ if (c=='\n')
+ {
+ g_yyLineNr++;
+ *(p-1)='\0';
+ g_code->codify(sp);
+ nextCodeLine();
+ }
+ else
+ {
+ g_code->codify(sp);
+ done=TRUE;
+ }
+ }
+}
+
+static void startFontClass(const char *s)
+{
+ endFontClass();
+ g_code->startFontClass(s);
+ g_currentFontClass=s;
+}
+
+/*! counts the number of lines in the input */
+static int countLines()
+{
+ const char *p=g_inputString;
+ char c;
+ int count=1;
+ while ((c=*p))
+ {
+ p++ ;
+ if (c=='\n') count++;
+ }
+ if (p>g_inputString && *(p-1)!='\n')
+ { // last line does not end with a \n, so we add an extra
+ // line and explicitly terminate the line after parsing.
+ count++,
+ g_needsTermination=TRUE;
+ }
+ return count;
+}
+
+#undef YY_INPUT
+#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
+
+static int yyread(char *buf,int max_size)
+{
+ int c=0;
+ while( c < max_size && g_inputString[g_inputPosition] )
+ {
+ *buf = g_inputString[g_inputPosition++] ;
+ c++; buf++;
+ }
+ return c;
+}
+
+%}
+
+nl (\r\n|\r|\n)
+ws [ \t]+
+idchar [A-Za-z0-9\-_]+
+keywords1 ("ADD"|"ALL"|"ALLOCATE"|"ALTER"|"AND"|"ANY"|"ARE"|"AS"|"ASENSITIVE"|"ASYMMETRIC"|"AT"|"ATOMIC"|"AUTHORIZATION"|"BETWEEN"|"BOTH"|"BY"|"CALL"|"CALLED"|"CASCADED"|"CAST")
+keywords2 ("CHECK"|"CLOSE"|"COLLATE"|"COLUMN"|"COMMIT"|"CONNECT"|"CONSTRAINT"|"CONTINUE"|"CORRESPONDING"|"CREATE"|"CROSS"|"CUBE"|"CURRENT"|"CURRENT_DATE"|"CURRENT_DEFAULT_TRANSFORM_GROUP")
+keywords3 ("CURRENT_PATH"|"CURRENT_ROLE"|"CURRENT_TIME"|"CURRENT_TIMESTAMP"|"CURRENT_TRANSFORM_GROUP_FOR_TYPE"|"CURRENT_USER")
+keywords4 ("CURSOR"|"CYCLE"|"DAY"|"DEALLOCATE"|"DECLARE"|"DEFAULT"|"DELETE"|"DEREF"|"DESCRIBE"|"DETERMINISTIC"|"DISCONNECT"|"DISTINCT"|"DROP"|"DYNAMIC")
+keywords5 ("EACH"|"ELEMENT"|"END-EXEC"|"ESCAPE"|"EXCEPT"|"EXEC"|"EXECUTE"|"EXISTS"|"EXTERNAL"|"FETCH"|"FILTER"|"FOR"|"FOREIGN"|"FREE"|"FROM"|"FULL"|"FUNCTION")
+keywords6 ("GET"|"GLOBAL"|"GRANT"|"GROUP"|"GROUPING"|"HAVING"|"HOLD"|"HOUR"|"IDENTITY"|"IMMEDIATE"|"IN"|"INDICATOR"|"INNER"|"INOUT"|"INPUT"|"INSENSITIVE"|"INSERT"|"INTERSECT")
+keywords7 ("INTERVAL"|"INTO"|"IS"|"ISOLATION"|"JOIN"|"LANGUAGE"|"LARGE"|"LATERAL"|"LEADING"|"LEFT"|"LIKE"|"LOCAL"|"LOCALTIME"|"LOCALTIMESTAMP"|"MATCH"|"MEMBER"|"MERGE"|"METHOD"|"MINUTE")
+keywords8 ("MODIFIES"|"MODULE"|"MONTH"|"MULTISET"|"NATIONAL"|"NATURAL"|"NEW"|"NO"|"NONE"|"NOT"|"OF"|"OLD"|"ON"|"ONLY"|"OPEN"|"OR"|"ORDER"|"OUT"|"OUTER"|"OUTPUT")
+keywords9 ("OVER"|"OVERLAPS"|"PARAMETER"|"PARTITION"|"PRECISION"|"PREPARE"|"PRIMARY"|"PROCEDURE"|"RANGE"|"READS"|"RECURSIVE"|"REF"|"REFERENCES"|"REFERENCING"|"REGR_AVGX"|"REGR_AVGY")
+keywords10 ("REGR_COUNT"|"REGR_INTERCEPT"|"REGR_R2"|"REGR_SLOPE"|"REGR_SXX"|"REGR_SXY"|"REGR_SYY"|"RELEASE"|"RESULT"|"RETURN"|"RETURNS"|"REVOKE"|"RIGHT"|"ROLLBACK"|"ROLLUP"|"ROW"|"ROWS"|"SAVEPOINT")
+keywords11 ("SCROLL"|"SEARCH"|"SECOND"|"SELECT"|"SENSITIVE"|"SESSION_USER"|"SET"|"SIMILAR"|"SOME"|"SPECIFIC"|"SPECIFICTYPE"|"SQL"|"SQLEXCEPTION"|"SQLSTATE"|"SQLWARNING"|"START"|"STATIC")
+keywords12 ("SUBMULTISET"|"SYMMETRIC"|"SYSTEM"|"SYSTEM_USER"|"TABLE"|"THEN"|"TIMEZONE_HOUR"|"TIMEZONE_MINUTE"|"TO"|"TRAILING"|"TRANSLATION"|"TREAT"|"TRIGGER"|"UESCAPE"|"UNION")
+keywords13 ("UNIQUE"|"UNNEST"|"UPDATE"|"UPPER"|"USER"|"USING"|"VALUE"|"VALUES"|"VAR_POP"|"VAR_SAMP"|"VARYING"|"WHEN"|"WHENEVER"|"WHERE"|"WIDTH_BUCKET"|"WINDOW"|"WITH"|"WITHIN"|"WITHOUT"|"YEAR")
+
+/* Need multiple keyword definitions due to max length */
+keyword (?i:{keywords1}|{keywords2}|{keywords3}|{keywords4}|{keywords5}|{keywords6}|{keywords7}|{keywords8}|{keywords9}|{keywords10}|{keywords11}|{keywords12}|{keywords13})
+
+typekeyword (?i:"ARRAY"|"BIGINT"|"BINARY"|"BLOB"|"BOOLEAN"|"CHAR"|"CHARACTER"|"CLOB"|"DATE"|"DEC"|"DECIMAL"|"DOUBLE"|"FLOAT"|"INT"|"INTEGER"|"NCHAR"|"NCLOB"|"NUMERIC"|"NVARCHAR"|"REAL"|"SMALLINT"|"TIME"|"TIMESTAMP"|"VARCHAR")
+
+flowkeyword (?i:"CASE"|"IF"|"ELSE"|"BEGIN"|"END"|"WHILE")
+
+literalkeyword (?i:"FALSE"|"TRUE"|"NULL"|"UNKNOWN")
+stringliteral (\"[^"]*\")|('[^']*')
+number [0-9]+
+literals ({literalkeyword}|{stringliteral}|{number})
+
+variable @{idchar}+
+
+simplecomment --.*
+commentopen "/\*"
+commentclose "\*/"
+
+%option noyywrap
+%option nounput
+
+%x COMMENT
+
+%%
+
+{literals} {
+ startFontClass("stringliteral");
+ codifyLines(yytext);
+ endFontClass();
+ }
+
+
+{keyword} {
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
+ }
+
+{flowkeyword} {
+ startFontClass("keywordflow");
+ codifyLines(yytext);
+ endFontClass();
+ }
+
+{typekeyword} {
+ startFontClass("keywordtype");
+ codifyLines(yytext);
+ endFontClass();
+ }
+
+{variable} {
+ startFontClass("preprocessor");
+ codifyLines(yytext);
+ endFontClass();
+ }
+
+{simplecomment} {
+ startFontClass("comment");
+ codifyLines(yytext);
+ endFontClass();
+ }
+
+{commentopen} {
+ startFontClass("comment");
+ codifyLines(yytext);
+ BEGIN(COMMENT);
+ }
+
+<COMMENT>. {
+ codifyLines(yytext);
+ }
+<COMMENT>{nl} {
+ codifyLines(yytext);
+ }
+
+<COMMENT>{commentclose} {
+ codifyLines(yytext);
+ endFontClass();
+ BEGIN(INITIAL);
+ }
+
+{idchar} {
+ codifyLines(yytext);
+ }
+
+{nl} {
+ codifyLines(yytext);
+ }
+
+. {
+ codifyLines(yytext);
+ }
+
+%%
+
+void parseSqlCode(
+ CodeOutputInterface &od,
+ const char * /*className*/,
+ const QCString &s,
+ bool exBlock,
+ const char *exName,
+ FileDef *fd,
+ int startLine,
+ int endLine,
+ bool inlineFragment,
+ MemberDef *,
+ bool,Definition *searchCtx,
+ bool /*collectXRefs*/
+ )
+{
+ if (s.isEmpty()) return;
+
+ TooltipManager::instance()->clearTooltips();
+
+ g_code = &od;
+ g_inputString = s;
+ g_inputPosition = 0;
+ g_currentFontClass = 0;
+ g_needsTermination = FALSE;
+ g_searchCtx=searchCtx;
+
+ if (startLine!=-1)
+ g_yyLineNr = startLine;
+ else
+ g_yyLineNr = 1;
+
+ if (endLine!=-1)
+ g_inputLines = endLine+1;
+ else
+ g_inputLines = g_yyLineNr + countLines() - 1;
+
+ g_exampleBlock = exBlock;
+ g_exampleName = exName;
+ g_sourceFileDef = fd;
+
+ bool cleanupSourceDef = FALSE;
+
+ if (exBlock && fd==0)
+ {
+ // create a dummy filedef for the example
+ g_sourceFileDef = new FileDef("",(exName?exName:"generated"));
+ cleanupSourceDef = TRUE;
+ }
+
+ if (g_sourceFileDef)
+ {
+ setCurrentDoc("l00001");
+ }
+
+ g_includeCodeFragment = inlineFragment;
+ // Starts line 1 on the output
+ startCodeLine();
+
+ sqlcodeYYrestart( sqlcodeYYin );
+
+ sqlcodeYYlex();
+
+ if (g_needsTermination)
+ {
+ endCodeLine();
+ }
+ if (fd)
+ {
+ TooltipManager::instance()->writeTooltips(*g_code);
+ }
+ if (cleanupSourceDef)
+ {
+ // delete the temporary file definition used for this example
+ delete g_sourceFileDef;
+ g_sourceFileDef=0;
+ }
+
+ return;
+}
+
+void resetSqlCodeParserState()
+{
+ g_currentDefinition = 0;
+ g_currentMemberDef = 0;
+}
+
+#if !defined(YY_FLEX_SUBMINOR_VERSION)
+extern "C" { // some bogus code to keep the compiler happy
+ void sqlcodeYYdummy() { yy_flex_realloc(0,0); }
+}
+#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
+#error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)."
+#endif
+
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp
index ba72b55..6bc8789 100644
--- a/src/sqlite3gen.cpp
+++ b/src/sqlite3gen.cpp
@@ -60,7 +60,7 @@ const char * schema_queries[][2] = {
{ "innerclass",
"CREATE TABLE IF NOT EXISTS innerclass (\n"
"\trowid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n"
- "\trefid TEXT NOT NULL,\n"
+ "\trefid INTEGER NOT NULL,\n"
"\tprot INTEGER NOT NULL,\n"
"\tname TEXT NOT NULL\n"
");"
@@ -92,47 +92,64 @@ const char * schema_queries[][2] = {
{ "memberdef",
"CREATE TABLE IF NOT EXISTS memberdef (\n"
"\t-- All processed identifiers.\n"
- "\trowid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n"
- "\tid_file INTEGER NOT NULL, -- file where this identifier is located\n"
- "\tline INTEGER NOT NULL, -- line where this identifier is located\n"
- "\tcolumn INTEGER NOT NULL, -- column where this identifier is located\n"
- "\trefid TEXT NOT NULL, -- see the refids table\n"
- "\tname TEXT NOT NULL,\n"
- "\tdefinition TEXT,\n"
- "\ttype TEXT,\n"
- "\targsstring TEXT,\n"
- "\tscope TEXT,\n"
- "\tinitializer TEXT,\n"
- "\tprot INTEGER DEFAULT 0, -- 0:public 1:protected 2:private 3:package\n"
- "\tconst INTEGER DEFAULT 0, -- 0:non-constant 1:constant\n"
- "\tvirt INTEGER DEFAULT 0, -- 0:non-virtual 1:virtual 2:pure-virtual\n"
- "\tstatic INTEGER DEFAULT 0, -- 0:non-static 1:static\n"
- "\texplicit INTEGER DEFAULT 0,\n"
- "\tinline INTEGER DEFAULT 0,\n"
- "\tfinal INTEGER DEFAULT 0,\n"
- "\tsealed INTEGER DEFAULT 0,\n"
- "\tnew INTEGER DEFAULT 0,\n"
- "\toptional INTEGER DEFAULT 0,\n"
- "\trequired INTEGER DEFAULT 0,\n"
- "\tmutable INTEGER DEFAULT 0,\n"
- "\tinitonly INTEGER DEFAULT 0,\n"
- "\treadable INTEGER DEFAULT 0,\n"
- "\twritable INTEGER DEFAULT 0,\n"
- "\tgettable INTEGER DEFAULT 0,\n"
- "\tsettable INTEGER DEFAULT 0,\n"
- "\taccessor INTEGER DEFAULT 0,\n"
- "\taddable INTEGER DEFAULT 0,\n"
- "\tremovable INTEGER DEFAULT 0,\n"
- "\traisable INTEGER DEFAULT 0,\n"
+ "\trowid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n"
+ "\trefid INTEGER NOT NULL, -- see the refids table\n"
+ "\tname TEXT NOT NULL,\n"
+ "\tdefinition TEXT,\n"
+ "\ttype TEXT,\n"
+ "\targsstring TEXT,\n"
+ "\tscope TEXT,\n"
+ "\tinitializer TEXT,\n"
+ "\tbitfield TEXT,\n"
+ "\tread TEXT,\n"
+ "\twrite TEXT,\n"
+ "\tprot INTEGER DEFAULT 0, -- 0:public 1:protected 2:private 3:package\n"
+ "\tstatic INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tconst INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\texplicit INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tinline INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tfinal INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tsealed INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tnew INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\toptional INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\trequired INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tvolatile INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tvirt INTEGER DEFAULT 0, -- 0:no 1:virtual 2:pure-virtual\n"
+ "\tmutable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tinitonly INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tattribute INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tproperty INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\treadonly INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tbound INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tconstrained INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\ttransient INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tmaybevoid INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tmaybedefault INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tmaybeambiguous INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\treadable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\twritable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tgettable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tprivategettable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tprotectedgettable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tsettable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tprivatesettable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tprotectedsettable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\taccessor INTEGER DEFAULT 0, -- 0:no 1:assign 2:copy 3:retain 4:string 5:weak\n"
+ "\taddable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\tremovable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
+ "\traisable INTEGER DEFAULT 0, -- 0:no 1:yes\n"
/// @todo make a `kind' table
- "\tkind INTEGER DEFAULT 0, -- 0:define 1:function 2:variable 3:typedef 4:enum 5:enumvalue 6:signal 7:slot 8:friend 9:DCOP 10:property 11:event\n"
- "\tid_bodyfile INTEGER DEFAULT 0, -- file of definition\n"
- "\tbodystart INTEGER DEFAULT 0, -- starting line of definition\n"
- "\tbodyend INTEGER DEFAULT 0, -- ending line of definition\n"
+ "\tkind INTEGER DEFAULT 0, -- 0:define 1:function 2:variable 3:typedef 4:enum 5:enumvalue 6:signal 7:slot 8:friend 9:DCOP 10:property 11:event\n"
+ "\tbodystart INTEGER DEFAULT 0, -- starting line of definition\n"
+ "\tbodyend INTEGER DEFAULT 0, -- ending line of definition\n"
+ "\tid_bodyfile INTEGER DEFAULT 0, -- file of definition\n"
+ "\tid_file INTEGER NOT NULL, -- file where this identifier is located\n"
+ "\tline INTEGER NOT NULL, -- line where this identifier is located\n"
+ "\tcolumn INTEGER NOT NULL, -- column where this identifier is located\n"
/// @todo make a `detaileddescription' table
"\tdetaileddescription TEXT,\n"
"\tbriefdescription TEXT,\n"
- "\tinbodydescription TEXTi\n"
+ "\tinbodydescription TEXT\n"
");"
},
{ "compounddef",
@@ -141,7 +158,7 @@ const char * schema_queries[][2] = {
"\trowid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n"
"\tname TEXT NOT NULL,\n"
"\tkind TEXT NOT NULL,\n"
- "\trefid TEXT NOT NULL,\n"
+ "\trefid INTEGER NOT NULL,\n"
"\tprot INTEGER NOT NULL,\n"
"\tid_file INTEGER NOT NULL,\n"
"\tline INTEGER NOT NULL,\n"
@@ -153,7 +170,7 @@ const char * schema_queries[][2] = {
"\trowid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n"
"\tbase TEXT NOT NULL,\n"
"\tderived TEXT NOT NULL,\n"
- "\trefid TEXT NOT NULL,\n"
+ "\trefid INTEGER NOT NULL,\n"
"\tprot INTEGER NOT NULL,\n"
"\tvirt INTEGER NOT NULL\n"
");"
@@ -163,7 +180,7 @@ const char * schema_queries[][2] = {
"\trowid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n"
"\tbase TEXT NOT NULL,\n"
"\tderived TEXT NOT NULL,\n"
- "\trefid TEXT NOT NULL,\n"
+ "\trefid INTEGER NOT NULL,\n"
"\tprot INTEGER NOT NULL,\n"
"\tvirt INTEGER NOT NULL\n"
");"
@@ -175,7 +192,7 @@ const char * schema_queries[][2] = {
"\tattributes TEXT,\n"
"\ttype TEXT,\n"
"\tdeclname TEXT,\n"
- "\tdefnname TEXT,\n"
+ "\tdefname TEXT,\n"
"\tarray TEXT,\n"
"\tdefval TEXT,\n"
"\tbriefdescription TEXT\n"
@@ -192,7 +209,7 @@ const char * schema_queries[][2] = {
{ "innernamespaces",
"CREATE TABLE IF NOT EXISTS innernamespaces (\n"
"\trowid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,\n"
- "\trefid TEXT NOT NULL,\n"
+ "\trefid INTEGER NOT NULL,\n"
"\tname TEXT NOT NULL\n"
");"
}
@@ -251,9 +268,121 @@ SqlStmt xrefs_insert= {"INSERT INTO xrefs "
};
//////////////////////////////////////////////////////
SqlStmt memberdef_insert={"INSERT INTO memberdef "
- "( refid, prot, static, const, explicit, inline, final, sealed, new, optional, required, virt, mutable, initonly, readable, writable, gettable, settable, accessor, addable, removable, raisable, name, type, definition, argsstring, scope, initializer, kind, id_bodyfile, bodystart, bodyend, id_file, line, column, detaileddescription, briefdescription, inbodydescription)"
+ "("
+ "refid,"
+ "name,"
+ "definition,"
+ "type,"
+ "argsstring,"
+ "scope,"
+ "initializer,"
+ "bitfield,"
+ "read,"
+ "write,"
+ "prot,"
+ "static,"
+ "const,"
+ "explicit,"
+ "inline,"
+ "final,"
+ "sealed,"
+ "new,"
+ "optional,"
+ "required,"
+ "volatile,"
+ "virt,"
+ "mutable,"
+ "initonly,"
+ "attribute,"
+ "property,"
+ "readonly,"
+ "bound,"
+ "constrained,"
+ "transient,"
+ "maybevoid,"
+ "maybedefault,"
+ "maybeambiguous,"
+ "readable,"
+ "writable,"
+ "gettable,"
+ "protectedsettable,"
+ "protectedgettable,"
+ "settable,"
+ "privatesettable,"
+ "privategettable,"
+ "accessor,"
+ "addable,"
+ "removable,"
+ "raisable,"
+ "kind,"
+ "bodystart,"
+ "bodyend,"
+ "id_bodyfile,"
+ "id_file,"
+ "line,"
+ "column,"
+ "detaileddescription,"
+ "briefdescription,"
+ "inbodydescription"
+ ")"
"VALUES "
- "(:refid,:prot,:static,:const,:explicit,:inline,:final,:sealed,:new,:optional,:required,:virt,:mutable,:initonly,:readable,:writable,:gettable,:settable,:accessor,:addable,:removable,:raisable,:name,:type,:definition,:argsstring,:scope,:initializer,:kind,:id_bodyfile,:bodystart,:bodyend,:id_file,:line,:column,:detaileddescription,:briefdescription,:inbodydescription)"
+ "("
+ ":refid,"
+ ":name,"
+ ":definition,"
+ ":type,"
+ ":argsstring,"
+ ":scope,"
+ ":initializer,"
+ ":bitfield,"
+ ":read,"
+ ":write,"
+ ":prot,"
+ ":static,"
+ ":const,"
+ ":explicit,"
+ ":inline,"
+ ":final,"
+ ":sealed,"
+ ":new,"
+ ":optional,"
+ ":required,"
+ ":volatile,"
+ ":virt,"
+ ":mutable,"
+ ":initonly,"
+ ":attribute,"
+ ":property,"
+ ":readonly,"
+ ":bound,"
+ ":constrained,"
+ ":transient,"
+ ":maybevoid,"
+ ":maybedefault,"
+ ":maybeambiguous,"
+ ":readable,"
+ ":writable,"
+ ":gettable,"
+ ":privategettable,"
+ ":protectedgettable,"
+ ":settable,"
+ ":privatesettable,"
+ ":privategettable,"
+ ":accessor,"
+ ":addable,"
+ ":removable,"
+ ":raisable,"
+ ":kind,"
+ ":bodystart,"
+ ":bodyend,"
+ ":id_bodyfile,"
+ ":id_file,"
+ ":line,"
+ ":column,"
+ ":detaileddescription,"
+ ":briefdescription,"
+ ":inbodydescription"
+ ")"
,NULL
};
//////////////////////////////////////////////////////
@@ -282,16 +411,16 @@ SqlStmt params_select = { "SELECT rowid FROM params WHERE "
"(attributes IS NULL OR attributes=:attributes) AND "
"(type IS NULL OR type=:type) AND "
"(declname IS NULL OR declname=:declname) AND "
- "(defnname IS NULL OR defnname=:defnname) AND "
+ "(defname IS NULL OR defname=:defname) AND "
"(array IS NULL OR array=:array) AND "
"(defval IS NULL OR defval=:defval) AND "
"(briefdescription IS NULL OR briefdescription=:briefdescription)"
,NULL
};
SqlStmt params_insert = { "INSERT INTO params "
- "( attributes, type, declname, defnname, array, defval, briefdescription ) "
+ "( attributes, type, declname, defname, array, defval, briefdescription ) "
"VALUES "
- "(:attributes,:type,:declname,:defnname,:array,:defval,:briefdescription)"
+ "(:attributes,:type,:declname,:defname,:array,:defval,:briefdescription)"
,NULL
};
//////////////////////////////////////////////////////
@@ -400,11 +529,9 @@ static int insertRefid(sqlite3 *db, const char *refid)
}
-static void insertMemberReference(sqlite3 *db, const char*src, const char*dst, const char *file, int line, int column)
+static void insertMemberReference(sqlite3 *db, int refid_src, int refid_dst,
+ int id_file, int line, int column)
{
- int id_file = insertFile(db,file);
- int refid_src = insertRefid(db,src);
- int refid_dst = insertRefid(db,dst);
if (id_file==-1||refid_src==-1||refid_dst==-1)
return;
@@ -412,26 +539,20 @@ static void insertMemberReference(sqlite3 *db, const char*src, const char*dst, c
bindIntParameter(xrefs_insert,":refid_dst",refid_dst);
bindIntParameter(xrefs_insert,":id_file",id_file);
bindIntParameter(xrefs_insert,":line",line);
- bindIntParameter(xrefs_insert,":column",1);
+ bindIntParameter(xrefs_insert,":column",column);
step(db,xrefs_insert);
}
-static void insertMemberReference(sqlite3 *db, MemberDef *src, MemberDef *dst, const char*floc)
+static void insertMemberReference(sqlite3 *db, MemberDef *src, MemberDef *dst)
{
+ QCString qrefid_dst = dst->getOutputFileBase() + "_1" + dst->anchor();
+ QCString qrefid_src = src->getOutputFileBase() + "_1" + src->anchor();
if (dst->getStartBodyLine()!=-1 && dst->getBodyDef())
{
- static char file[4096];
- int line=0,column=0;
- if (floc)
- {
- int rv = sscanf(floc,"%[^:]:%d:%d",file,&line,&column);
- if (rv!=3)
- {
- msg("unable to read file:line:col location from string [%s]\n",floc);
- return;
- }
- }
- insertMemberReference(db,src->anchor().data(),dst->anchor().data(),file,line,column);
+ int refid_src = insertRefid(db,qrefid_src.data());
+ int refid_dst = insertRefid(db,qrefid_dst.data());
+ int id_file = insertFile(db,"no-file"); // TODO: replace no-file with proper file
+ insertMemberReference(db,refid_src,refid_dst,id_file,dst->getStartBodyLine(),-1);
}
}
@@ -462,7 +583,11 @@ static void insertMemberFunctionParams(sqlite3 *db,int id_memberdef,MemberDef *m
QCString *s;
while ((s=li.current()))
{
- insertMemberReference(db,md->anchor().data(),s->data(),def->getDefFileName().data(),md->getDefLine(),1);
+ QCString qrefid_src = md->getOutputFileBase() + "_1" + md->anchor();
+ int refid_src = insertRefid(db,qrefid_src.data());
+ int refid_dst = insertRefid(db,s->data());
+ int id_file = insertFile(db,stripFromPath(def->getDefFileName()));
+ insertMemberReference(db,refid_src,refid_dst,id_file,md->getDefLine(),-1);
++li;
}
bindTextParameter(params_select,":type",a->type.data());
@@ -475,8 +600,8 @@ static void insertMemberFunctionParams(sqlite3 *db,int id_memberdef,MemberDef *m
}
if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
{
- bindTextParameter(params_select,":defnname",defArg->name.data());
- bindTextParameter(params_insert,":defnname",defArg->name.data());
+ bindTextParameter(params_select,":defname",defArg->name.data());
+ bindTextParameter(params_insert,":defname",defArg->name.data());
}
if (!a->array.isEmpty())
{
@@ -517,7 +642,7 @@ static void insertMemberDefineParams(sqlite3 *db,int id_memberdef,MemberDef *md,
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
- bindTextParameter(params_insert,":defnname",a->type.data());
+ bindTextParameter(params_insert,":defname",a->type.data());
int id_param=step(db,params_insert,TRUE);
bindIntParameter(memberdef_params_insert,":id_memberdef",id_memberdef);
@@ -637,7 +762,8 @@ static void writeInnerClasses(sqlite3*db,const ClassSDict *cl)
{
if (!cd->isHidden() && cd->name().find('@')==-1) // skip anonymous scopes
{
- bindTextParameter(innerclass_insert,":refid",cd->getOutputFileBase(),FALSE);
+ int refid = insertRefid(db, cd->getOutputFileBase());
+ bindIntParameter(innerclass_insert,":refid", refid);
bindIntParameter(innerclass_insert,":prot",cd->protection());
bindTextParameter(innerclass_insert,":name",cd->name());
step(db,innerclass_insert);
@@ -656,7 +782,8 @@ static void writeInnerNamespaces(sqlite3 *db,const NamespaceSDict *nl)
{
if (!nd->isHidden() && nd->name().find('@')==-1) // skip anonymouse scopes
{
- bindTextParameter(innernamespace_insert,":refid",nd->getOutputFileBase(),FALSE);
+ int refid = insertRefid(db, nd->getOutputFileBase());
+ bindIntParameter(innernamespace_insert,":refid",refid);
bindTextParameter(innernamespace_insert,":name",nd->name(),FALSE);
step(db,innernamespace_insert);
}
@@ -686,8 +813,8 @@ static void writeTemplateArgumentList(sqlite3* db,
{
bindTextParameter(params_select,":declname",a->name);
bindTextParameter(params_insert,":declname",a->name);
- bindTextParameter(params_select,":defnname",a->name);
- bindTextParameter(params_insert,":defnname",a->name);
+ bindTextParameter(params_select,":defname",a->name);
+ bindTextParameter(params_insert,":defname",a->name);
}
if (!a->defval.isEmpty())
{
@@ -740,8 +867,12 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
// group members are only visible in their group
//if (def->definitionType()!=Definition::TypeGroup && md->getGroupDef()) return;
QCString memType;
+
// memberdef
- bindTextParameter(memberdef_insert,":refid",md->anchor().data(),FALSE);
+ QCString qrefid = md->getOutputFileBase() + "_1" + md->anchor();
+ int refid = insertRefid(db, qrefid.data());
+
+ bindIntParameter(memberdef_insert,":refid", refid);
bindIntParameter(memberdef_insert,":kind",md->memberType());
bindIntParameter(memberdef_insert,":prot",md->protection());
@@ -767,6 +898,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
if (al!=0)
{
bindIntParameter(memberdef_insert,":const",al->constSpecifier);
+ bindIntParameter(memberdef_insert,":volatile",al->volatileSpecifier);
}
bindIntParameter(memberdef_insert,":explicit",md->isExplicit());
bindIntParameter(memberdef_insert,":inline",md->isInline());
@@ -778,26 +910,52 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
bindIntParameter(memberdef_insert,":virt",md->virtualness());
}
- // place in the arguments and linkify the arguments
if (md->memberType() == MemberType_Variable)
{
bindIntParameter(memberdef_insert,":mutable",md->isMutable());
bindIntParameter(memberdef_insert,":initonly",md->isInitonly());
+ bindIntParameter(memberdef_insert,":attribute",md->isAttribute());
+ bindIntParameter(memberdef_insert,":property",md->isProperty());
+ bindIntParameter(memberdef_insert,":readonly",md->isReadonly());
+ bindIntParameter(memberdef_insert,":bound",md->isBound());
+ bindIntParameter(memberdef_insert,":removable",md->isRemovable());
+ bindIntParameter(memberdef_insert,":constrained",md->isConstrained());
+ bindIntParameter(memberdef_insert,":transient",md->isTransient());
+ bindIntParameter(memberdef_insert,":maybevoid",md->isMaybeVoid());
+ bindIntParameter(memberdef_insert,":maybedefault",md->isMaybeDefault());
+ bindIntParameter(memberdef_insert,":maybeambiguous",md->isMaybeAmbiguous());
+ if (md->bitfieldString())
+ {
+ QCString bitfield = md->bitfieldString();
+ if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
+ bindTextParameter(memberdef_insert,":bitfield",bitfield.stripWhiteSpace());
+ }
}
else if (md->memberType() == MemberType_Property)
{
bindIntParameter(memberdef_insert,":readable",md->isReadable());
bindIntParameter(memberdef_insert,":writable",md->isWritable());
bindIntParameter(memberdef_insert,":gettable",md->isGettable());
+ bindIntParameter(memberdef_insert,":privategettable",md->isPrivateGettable());
+ bindIntParameter(memberdef_insert,":protectedgettable",md->isProtectedGettable());
bindIntParameter(memberdef_insert,":settable",md->isSettable());
- if (md->isAssign() || md->isCopy() || md->isRetain())
+ bindIntParameter(memberdef_insert,":privatesettable",md->isPrivateSettable());
+ bindIntParameter(memberdef_insert,":protectedsettable",md->isProtectedSettable());
+ if (md->isAssign() || md->isCopy() || md->isRetain()
+ || md->isStrong() || md->isWeak())
{
- int accessor = md->isAssign() ? md->isAssign() :
- (md->isCopy() ? md->isCopy() : md->isRetain()) ;
+ int accessor=0;
+ if (md->isAssign()) accessor = 1;
+ else if (md->isCopy()) accessor = 2;
+ else if (md->isRetain()) accessor = 3;
+ else if (md->isStrong()) accessor = 4;
+ else if (md->isWeak()) accessor = 5;
bindIntParameter(memberdef_insert,":accessor",accessor);
}
+ bindTextParameter(memberdef_insert,":read",md->getReadAccessor());
+ bindTextParameter(memberdef_insert,":write",md->getWriteAccessor());
}
else if (md->memberType() == MemberType_Event)
{
@@ -837,19 +995,6 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
bindTextParameter(memberdef_insert,":name",md->name());
- if (md->memberType() == MemberType_Property)
- {
- if (md->isReadable())
- {
- bindIntParameter(memberdef_insert,":readable",1);
- }
- if (md->isWritable())
- {
- bindIntParameter(memberdef_insert,":writable",1);
- }
- }
-
-
// Extract references from initializer
if (md->hasMultiLineInitializer() || md->hasOneLineInitializer())
{
@@ -868,7 +1013,11 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
s->data(),
md->getBodyDef()->getDefFileName().data(),
md->getStartBodyLine()));
- insertMemberReference(db,md->anchor().data(),s->data(),md->getBodyDef()->getDefFileName().data(),md->getStartBodyLine(),1);
+ QCString qrefid_src = md->getOutputFileBase() + "_1" + md->anchor();
+ int refid_src = insertRefid(db,qrefid_src.data());
+ int refid_dst = insertRefid(db,s->data());
+ int id_file = insertFile(db,stripFromPath(md->getBodyDef()->getDefFileName()));
+ insertMemberReference(db,refid_src,refid_dst,id_file,md->getStartBodyLine(),-1);
}
++li;
}
@@ -887,7 +1036,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
// File location
if (md->getDefLine() != -1)
{
- int id_file = insertFile(db,md->getDefFileName());
+ int id_file = insertFile(db,stripFromPath(md->getDefFileName()));
if (id_file!=-1)
{
bindIntParameter(memberdef_insert,":id_file",id_file);
@@ -896,7 +1045,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
if (md->getStartBodyLine()!=-1)
{
- int id_bodyfile = insertFile(db,md->getBodyDef()->absFilePath());
+ int id_bodyfile = insertFile(db,stripFromPath(md->getBodyDef()->absFilePath()));
if (id_bodyfile == -1)
{
sqlite3_clear_bindings(memberdef_insert.stmt);
@@ -933,7 +1082,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
MemberDef *rmd;
for (mdi.toFirst();(rmd=mdi.current());++mdi)
{
- insertMemberReference(db,md,rmd,mdi.currentKey());
+ insertMemberReference(db,md,rmd);//,mdi.currentKey());
}
}
// + source referenced by
@@ -944,7 +1093,7 @@ static void generateSqlite3ForMember(sqlite3*db,MemberDef *md,Definition *def)
MemberDef *rmd;
for (mdi.toFirst();(rmd=mdi.current());++mdi)
{
- insertMemberReference(db,rmd,md,mdi.currentKey());
+ insertMemberReference(db,rmd,md);//,mdi.currentKey());
}
}
}
@@ -1008,9 +1157,10 @@ static void generateSqlite3ForClass(sqlite3 *db, ClassDef *cd)
bindTextParameter(compounddef_insert,":name",cd->name());
bindTextParameter(compounddef_insert,":kind",cd->compoundTypeString(),FALSE);
bindIntParameter(compounddef_insert,":prot",cd->protection());
- bindTextParameter(compounddef_insert,":refid",cd->getOutputFileBase(),FALSE);
+ int refid = insertRefid(db, cd->getOutputFileBase());
+ bindIntParameter(compounddef_insert,":refid", refid);
- int id_file = insertFile(db,cd->getDefFileName().data());
+ int id_file = insertFile(db,stripFromPath(cd->getDefFileName()));
bindIntParameter(compounddef_insert,":id_file",id_file);
bindIntParameter(compounddef_insert,":line",cd->getDefLine());
bindIntParameter(compounddef_insert,":column",cd->getDefColumn());
@@ -1024,7 +1174,8 @@ static void generateSqlite3ForClass(sqlite3 *db, ClassDef *cd)
BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli)
{
- bindTextParameter(basecompoundref_insert,":refid",bcd->classDef->getOutputFileBase(),FALSE);
+ int refid = insertRefid(db, bcd->classDef->getOutputFileBase());
+ bindIntParameter(basecompoundref_insert,":refid", refid);
bindIntParameter(basecompoundref_insert,":prot",bcd->prot);
bindIntParameter(basecompoundref_insert,":virt",bcd->virt);
@@ -1057,7 +1208,8 @@ static void generateSqlite3ForClass(sqlite3 *db, ClassDef *cd)
{
bindTextParameter(derivedcompoundref_insert,":derived",bcd->classDef->displayName(),FALSE);
}
- bindTextParameter(derivedcompoundref_insert,":refid",bcd->classDef->getOutputFileBase(),FALSE);
+ int refid = insertRefid(db, bcd->classDef->getOutputFileBase());
+ bindIntParameter(derivedcompoundref_insert,":refid", refid);
bindIntParameter(derivedcompoundref_insert,":prot",bcd->prot);
bindIntParameter(derivedcompoundref_insert,":virt",bcd->virt);
step(db,derivedcompoundref_insert);
@@ -1282,7 +1434,7 @@ void generateSqlite3()
// + examples
// + main page
- QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
+ QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY);
QDir sqlite3Dir(outputDirectory);
sqlite3 *db;
sqlite3_initialize();
diff --git a/src/sqlscanner.h b/src/sqlscanner.h
new file mode 100644
index 0000000..7afa869
--- /dev/null
+++ b/src/sqlscanner.h
@@ -0,0 +1,65 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * for any purpose. It is provided "as is" without express or implied warranty.
+ * See the GNU General Public License for more details.
+ *
+ * Documents produced by Doxygen are derivative works derived from the
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef SQLSCANNER_H
+#define SQLSCANNER_H
+
+#include "parserintf.h"
+#include "sqlcode.h"
+
+/** SQL scanner. Only support syntax highlighting of code at the moment.
+ */
+class SQLScanner : public ParserInterface
+{
+public:
+ SQLScanner() {}
+ virtual ~SQLScanner() {}
+ void startTranslationUnit(const char *) {}
+ void finishTranslationUnit() {}
+ void parseInput(const char *, const char *, Entry *, bool , QStrList &) {}
+ bool needsPreprocessing(const QCString &) { return FALSE; }
+
+ void parseCode(CodeOutputInterface &codeOutIntf,
+ const char *scopeName,
+ const QCString &input,
+ SrcLangExt,
+ bool isExampleBlock,
+ const char *exampleName=0,
+ FileDef *fileDef=0,
+ int startLine=-1,
+ int endLine=-1,
+ bool inlineFragment=FALSE,
+ MemberDef *memberDef=0,
+ bool showLineNumbers=TRUE,
+ Definition *searchCtx=0,
+ bool collectXRefs=TRUE
+ )
+ {
+ parseSqlCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
+ fileDef,startLine,endLine,inlineFragment,memberDef,
+ showLineNumbers,searchCtx,collectXRefs);
+ }
+
+ void resetCodeParserState()
+ {
+ resetSqlCodeParserState();
+ }
+
+ void parsePrototype(const char *) {}
+
+private:
+};
+
+#endif
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 290399a..dfa8511 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -493,14 +493,14 @@ class TagFileParser : public QXmlDefaultHandler
{
switch(m_state)
{
- case InClass: m_curClass->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
- case InFile: m_curFile->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
- case InNamespace: m_curNamespace->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
- case InGroup: m_curGroup->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InClass: m_curClass->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
+ case InFile: m_curFile->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
+ case InNamespace: m_curNamespace->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
+ case InGroup: m_curGroup->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
case InPage: m_curPage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
- case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
- case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
- case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString)); break;
+ case InMember: m_curMember->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
+ case InPackage: m_curPackage->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
+ case InDir: m_curDir->docAnchors.append(new TagAnchorInfo(m_fileName,m_curString,m_title)); break;
default: warn("Unexpected tag `member' found\n"); break;
}
}
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 5e249a6..d0d8ca0 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -15,6 +15,9 @@
*
*/
%option never-interactive
+%option case-insensitive
+%option prefix="tclscannerYY"
+
%{
#include <stdio.h>
#include <stdlib.h>
@@ -2818,24 +2821,21 @@ static void tcl_init()
{
// Get values from option TCL_SUBST
tcl.config_subst.clear();
- if (Config::instance()->get("TCL_SUBST"))
+ QStrList myStrList = Config_getList(TCL_SUBST);
+ const char *s=myStrList.first();
+ while (s)
{
- QStrList myStrList = Config_getList("TCL_SUBST");
- const char *s=myStrList.first();
- while (s)
+ QCString myStr=s;
+ int i=myStr.find('=');
+ if (i>0)
{
- QCString myStr=s;
- int i=myStr.find('=');
- if (i>0)
- {
- QCString myName=myStr.left(i).stripWhiteSpace();
- QCString myValue=myStr.right(myStr.length()-i-1).stripWhiteSpace();
- if (!myName.isEmpty() && !myValue.isEmpty())
-tcl_inf("TCL_SUBST: use '%s'\n",s);
- tcl.config_subst[myName] = myValue;
- }
- s = myStrList.next();
+ QCString myName=myStr.left(i).stripWhiteSpace();
+ QCString myValue=myStr.right(myStr.length()-i-1).stripWhiteSpace();
+ if (!myName.isEmpty() && !myValue.isEmpty())
+ tcl_inf("TCL_SUBST: use '%s'\n",s);
+ tcl.config_subst[myName] = myValue;
}
+ s = myStrList.next();
}
if (tcl.input_string.at(tcl.input_string.length()-1) == 0x1A)
@@ -2854,7 +2854,7 @@ tcl_inf("TCL_SUBST: use '%s'\n",s);
tcl.code_font=NULL;
tcl.code_line=1;
tcl.code_linenumbers=1;
- tcl.config_autobrief = Config_getBool("JAVADOC_AUTOBRIEF");
+ tcl.config_autobrief = Config_getBool(JAVADOC_AUTOBRIEF);
tcl.input_position = 0;
tcl.file_name = NULL;
tcl.this_parser = NULL;
diff --git a/src/template.cpp b/src/template.cpp
index 527148c..10b3e43 100644
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -34,6 +34,7 @@
#include "message.h"
#include "util.h"
#include "resourcemgr.h"
+#include "portable.h"
#define ENABLE_TRACING 0
@@ -552,6 +553,10 @@ class TemplateContextImpl : public TemplateContext
if (m_activeEscapeIntf) m_activeEscapeIntf->enableTabbing(b);
}
bool tabbingEnabled() const { return m_tabbingEnabled; }
+ bool needsRecoding() const { return !m_encoding.isEmpty(); }
+ QCString encoding() const { return m_encoding; }
+ void setEncoding(const QCString &file,int line,const QCString &enc);
+ QCString recode(const QCString &s);
void warn(const char *fileName,int line,const char *fmt,...) const;
// index related functions
@@ -573,6 +578,8 @@ class TemplateContextImpl : public TemplateContext
bool m_tabbingEnabled;
TemplateAutoRef<TemplateStruct> m_indices;
QDict< QStack<TemplateVariant> > m_indexStacks;
+ QCString m_encoding;
+ void *m_fromUtf8;
};
//-----------------------------------------------------------------------------
@@ -1285,6 +1292,64 @@ class FilterDivisibleBy
}
};
+//--------------------------------------------------------------------
+
+/** @brief The implementation of the "isRelativeURL" filter */
+class FilterIsRelativeURL
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ QCString s = v.toString();
+ if (!s.isEmpty() && s.at(0)=='!') return TRUE;
+ }
+ return FALSE;
+ }
+};
+
+//--------------------------------------------------------------------
+
+/** @brief The implementation of the "isRelativeURL" filter */
+class FilterIsAbsoluteURL
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ QCString s = v.toString();
+ if (!s.isEmpty() && s.at(0)=='^') return TRUE;
+ }
+ return FALSE;
+ }
+};
+
+//--------------------------------------------------------------------
+
+/** @brief The implementation of the "decodeURL" filter
+ * The leading character is removed from the value in case it is a ^ or !.
+ * - ^ is used to encode a absolute URL
+ * - ! is used to encode a relative URL
+ */
+class FilterDecodeURL
+{
+ public:
+ static TemplateVariant apply(const TemplateVariant &v,const TemplateVariant &)
+ {
+ if (v.isValid() && v.type()==TemplateVariant::String)
+ {
+ QCString s = v.toString();
+ if (!s.isEmpty() && (s.at(0)=='^' || s.at(0)=='!'))
+ {
+ return s.mid(1);
+ }
+ }
+ return v;
+ }
+};
+
//--------------------------------------------------------------------
@@ -1336,25 +1401,28 @@ class TemplateFilterFactory
};
// register a handlers for each filter we support
-static TemplateFilterFactory::AutoRegister<FilterAdd> fAdd("add");
-static TemplateFilterFactory::AutoRegister<FilterGet> fGet("get");
-static TemplateFilterFactory::AutoRegister<FilterRaw> fRaw("raw");
-static TemplateFilterFactory::AutoRegister<FilterList> fList("list");
-static TemplateFilterFactory::AutoRegister<FilterAppend> fAppend("append");
-static TemplateFilterFactory::AutoRegister<FilterLength> fLength("length");
-static TemplateFilterFactory::AutoRegister<FilterNoWrap> fNoWrap("nowrap");
-static TemplateFilterFactory::AutoRegister<FilterFlatten> fFlatten("flatten");
-static TemplateFilterFactory::AutoRegister<FilterDefault> fDefault("default");
-static TemplateFilterFactory::AutoRegister<FilterPrepend> fPrepend("prepend");
-static TemplateFilterFactory::AutoRegister<FilterGroupBy> fGroupBy("groupBy");
-static TemplateFilterFactory::AutoRegister<FilterRelative> fRelative("relative");
-static TemplateFilterFactory::AutoRegister<FilterListSort> fListSort("listsort");
-static TemplateFilterFactory::AutoRegister<FilterTexLabel> fTexLabel("texLabel");
-static TemplateFilterFactory::AutoRegister<FilterTexIndex> fTexIndex("texIndex");
-static TemplateFilterFactory::AutoRegister<FilterPaginate> fPaginate("paginate");
-static TemplateFilterFactory::AutoRegister<FilterStripPath> fStripPath("stripPath");
-static TemplateFilterFactory::AutoRegister<FilterAlphaIndex> fAlphaIndex("alphaIndex");
-static TemplateFilterFactory::AutoRegister<FilterDivisibleBy> fDivisibleBy("divisibleby");
+static TemplateFilterFactory::AutoRegister<FilterAdd> fAdd("add");
+static TemplateFilterFactory::AutoRegister<FilterGet> fGet("get");
+static TemplateFilterFactory::AutoRegister<FilterRaw> fRaw("raw");
+static TemplateFilterFactory::AutoRegister<FilterList> fList("list");
+static TemplateFilterFactory::AutoRegister<FilterAppend> fAppend("append");
+static TemplateFilterFactory::AutoRegister<FilterLength> fLength("length");
+static TemplateFilterFactory::AutoRegister<FilterNoWrap> fNoWrap("nowrap");
+static TemplateFilterFactory::AutoRegister<FilterFlatten> fFlatten("flatten");
+static TemplateFilterFactory::AutoRegister<FilterDefault> fDefault("default");
+static TemplateFilterFactory::AutoRegister<FilterPrepend> fPrepend("prepend");
+static TemplateFilterFactory::AutoRegister<FilterGroupBy> fGroupBy("groupBy");
+static TemplateFilterFactory::AutoRegister<FilterRelative> fRelative("relative");
+static TemplateFilterFactory::AutoRegister<FilterListSort> fListSort("listsort");
+static TemplateFilterFactory::AutoRegister<FilterTexLabel> fTexLabel("texLabel");
+static TemplateFilterFactory::AutoRegister<FilterTexIndex> fTexIndex("texIndex");
+static TemplateFilterFactory::AutoRegister<FilterPaginate> fPaginate("paginate");
+static TemplateFilterFactory::AutoRegister<FilterStripPath> fStripPath("stripPath");
+static TemplateFilterFactory::AutoRegister<FilterDecodeURL> fDecodeURL("decodeURL");
+static TemplateFilterFactory::AutoRegister<FilterAlphaIndex> fAlphaIndex("alphaIndex");
+static TemplateFilterFactory::AutoRegister<FilterDivisibleBy> fDivisibleBy("divisibleby");
+static TemplateFilterFactory::AutoRegister<FilterIsRelativeURL> fIsRelativeURL("isRelativeURL");
+static TemplateFilterFactory::AutoRegister<FilterIsAbsoluteURL> fIsAbsoluteURL("isAbsoluteURL");
//--------------------------------------------------------------------
@@ -2303,6 +2371,7 @@ TemplateContextImpl::TemplateContextImpl(const TemplateEngine *e)
m_indexStacks.setAutoDelete(TRUE);
m_contextStack.setAutoDelete(TRUE);
m_escapeIntfDict.setAutoDelete(TRUE);
+ m_fromUtf8 = (void*)(-1);
push();
set("index",m_indices.get());
}
@@ -2312,6 +2381,49 @@ TemplateContextImpl::~TemplateContextImpl()
pop();
}
+void TemplateContextImpl::setEncoding(const QCString &templateName,int line,const QCString &enc)
+{
+ if (enc==m_encoding) return; // nothing changed
+ if (m_fromUtf8!=(void *)(-1))
+ {
+ portable_iconv_close(m_fromUtf8);
+ m_fromUtf8 = (void*)(-1);
+ }
+ m_encoding=enc;
+ if (!enc.isEmpty())
+ {
+ m_fromUtf8 = portable_iconv_open(enc,"UTF-8");
+ if (m_fromUtf8==(void*)(-1))
+ {
+ warn(templateName,line,"unsupported character conversion: '%s'->'UTF-8'\n", enc.data());
+ }
+ }
+ //printf("TemplateContextImpl::setEncoding(%s)\n",enc.data());
+}
+
+QCString TemplateContextImpl::recode(const QCString &s)
+{
+ //printf("TemplateContextImpl::recode(%s)\n",s.data());
+ int iSize = s.length();
+ int oSize = iSize*4+1;
+ QCString output(oSize);
+ size_t iLeft = iSize;
+ size_t oLeft = oSize;
+ char *iPtr = s.rawData();
+ char *oPtr = output.rawData();
+ if (!portable_iconv(m_fromUtf8,&iPtr,&iLeft,&oPtr,&oLeft))
+ {
+ oSize -= (int)oLeft;
+ output.resize(oSize+1);
+ output.at(oSize)='\0';
+ return output;
+ }
+ else
+ {
+ return s;
+ }
+}
+
void TemplateContextImpl::set(const char *name,const TemplateVariant &v)
{
TemplateVariant *pv = m_contextStack.getFirst()->find(name);
@@ -2439,7 +2551,7 @@ void TemplateContextImpl::warn(const char *fileName,int line,const char *fmt,...
void TemplateContextImpl::openSubIndex(const QCString &indexName)
{
- printf("TemplateContextImpl::openSubIndex(%s)\n",indexName.data());
+ //printf("TemplateContextImpl::openSubIndex(%s)\n",indexName.data());
QStack<TemplateVariant> *stack = m_indexStacks.find(indexName);
if (!stack || stack->isEmpty() || stack->top()->type()==TemplateVariant::List) // error: no stack yet or no entry
{
@@ -2460,7 +2572,7 @@ void TemplateContextImpl::openSubIndex(const QCString &indexName)
void TemplateContextImpl::closeSubIndex(const QCString &indexName)
{
- printf("TemplateContextImpl::closeSubIndex(%s)\n",indexName.data());
+ //printf("TemplateContextImpl::closeSubIndex(%s)\n",indexName.data());
QStack<TemplateVariant> *stack = m_indexStacks.find(indexName);
if (!stack || stack->count()<3)
{
@@ -2586,16 +2698,30 @@ class TemplateNodeText : public TemplateNode
void render(FTextStream &ts, TemplateContext *c)
{
- //printf("TemplateNodeText::render(%s)\n",m_data.data());
TemplateContextImpl* ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return; // should not happen
+ //printf("TemplateNodeText::render(%s) needsRecoding=%d ci=%p\n",m_data.data(),ci->needsRecoding(),ci);
if (ci->spacelessEnabled())
{
- ts << ci->spacelessIntf()->remove(m_data);
+ if (ci->needsRecoding())
+ {
+ ts << ci->recode(ci->spacelessIntf()->remove(m_data));
+ }
+ else
+ {
+ ts << ci->spacelessIntf()->remove(m_data);
+ }
}
else
{
- ts << m_data;
+ if (ci->needsRecoding())
+ {
+ ts << ci->recode(m_data);
+ }
+ else
+ {
+ ts << m_data;
+ }
}
}
private:
@@ -2638,11 +2764,25 @@ class TemplateNodeVariable : public TemplateNode
}
if (ci->escapeIntf() && !v.raw())
{
- ts << ci->escapeIntf()->escape(v.toString());
+ if (ci->needsRecoding())
+ {
+ ts << ci->recode(ci->escapeIntf()->escape(v.toString()));
+ }
+ else
+ {
+ ts << ci->escapeIntf()->escape(v.toString());
+ }
}
else
{
- ts << v.toString();
+ if (ci->needsRecoding())
+ {
+ ts << ci->recode(v.toString());
+ }
+ else
+ {
+ ts << v.toString();
+ }
}
}
}
@@ -2791,7 +2931,7 @@ class TemplateNodeIf : public TemplateNodeCreator<TemplateNodeIf>
if (guardValue.toBool()) // render nodes for the first guard that evaluated to 'true'
{
nodes->trueNodes.render(ts,c);
- processed=TRUE;
+ processed=TRUE;
}
}
else
@@ -3961,11 +4101,25 @@ class TemplateNodeCycle : public TemplateNodeCreator<TemplateNodeCycle>
}
if (ci->escapeIntf() && !v.raw())
{
- ts << ci->escapeIntf()->escape(v.toString());
+ if (ci->needsRecoding())
+ {
+ ts << ci->recode(ci->escapeIntf()->escape(v.toString()));
+ }
+ else
+ {
+ ts << ci->escapeIntf()->escape(v.toString());
+ }
}
else
{
- ts << v.toString();
+ if (ci->needsRecoding())
+ {
+ ts << ci->recode(v.toString());
+ }
+ else
+ {
+ ts << v.toString();
+ }
}
}
if (++m_index==m_args.count()) // wrap around
@@ -4109,7 +4263,14 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
int index=0,newIndex,matchLen;
while ((newIndex=marker.match(str,index,&matchLen))!=-1)
{
- ts << str.mid(index,newIndex-index); // write text before marker
+ if (ci->needsRecoding())
+ {
+ ts << ci->recode(str.mid(index,newIndex-index)); // write text before marker
+ }
+ else
+ {
+ ts << str.mid(index,newIndex-index); // write text before marker
+ }
bool ok;
uint entryIndex = str.mid(newIndex+1,matchLen-1).toUInt(&ok); // get marker id
TemplateVariant var;
@@ -4137,7 +4298,14 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
}
index=newIndex+matchLen; // set index just after marker
}
- ts << str.right(str.length()-index); // write text after last marker
+ if (ci->needsRecoding())
+ {
+ ts << ci->recode(str.right(str.length()-index)); // write text after last marker
+ }
+ else
+ {
+ ts << str.right(str.length()-index); // write text after last marker
+ }
c->pop();
delete it;
}
@@ -4244,8 +4412,7 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
QCString targetFile = m_asExpr->resolve(c).toString();
mkpath(ci,targetFile);
if (targetFile.isEmpty())
- {
- ci->warn(m_templateName,m_line,"invalid parameter at right side of 'as' for resource command\n");
+ { ci->warn(m_templateName,m_line,"invalid parameter at right side of 'as' for resource command\n");
}
else
{
@@ -4266,6 +4433,59 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
//----------------------------------------------------------
+/** @brief Class representing the 'encoding' tag in a template */
+class TemplateNodeEncoding : public TemplateNodeCreator<TemplateNodeEncoding>
+{
+ public:
+ TemplateNodeEncoding(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
+ : TemplateNodeCreator<TemplateNodeEncoding>(parser,parent,line)
+ {
+ TRACE(("{TemplateNodeEncoding(%s)\n",data.data()));
+ ExpressionParser ep(parser,line);
+ if (data.isEmpty())
+ {
+ parser->warn(m_templateName,line,"encoding tag is missing encoding argument");
+ m_encExpr = 0;
+ }
+ else
+ {
+ m_encExpr = ep.parse(data);
+ }
+ QStrList stopAt;
+ stopAt.append("endencoding");
+ parser->parse(this,line,stopAt,m_nodes);
+ parser->removeNextToken(); // skip over endencoding
+ TRACE(("}TemplateNodeEncoding(%s)\n",data.data()));
+ }
+ ~TemplateNodeEncoding()
+ {
+ delete m_encExpr;
+ }
+ void render(FTextStream &ts, TemplateContext *c)
+ {
+ TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
+ if (ci==0) return; // should not happen
+ ci->setLocation(m_templateName,m_line);
+ QCString encStr;
+ if (m_encExpr)
+ {
+ encStr = m_encExpr->resolve(c).toString();
+ }
+ QCString oldEncStr = ci->encoding();
+ if (!encStr.isEmpty())
+ {
+ ci->setEncoding(m_templateName,m_line,encStr);
+ }
+ m_nodes.render(ts,c);
+ ci->setEncoding(m_templateName,m_line,oldEncStr);
+ }
+ private:
+ ExprAst *m_encExpr;
+ TemplateNodeList m_nodes;
+};
+
+//----------------------------------------------------------
+
/** @brief Factory class for creating tag AST nodes found in a template */
class TemplateNodeFactory
{
@@ -4328,6 +4548,7 @@ static TemplateNodeFactory::AutoRegister<TemplateNodeInclude> autoRefInclu
static TemplateNodeFactory::AutoRegister<TemplateNodeMarkers> autoRefMarkers("markers");
static TemplateNodeFactory::AutoRegister<TemplateNodeTabbing> autoRefTabbing("tabbing");
static TemplateNodeFactory::AutoRegister<TemplateNodeResource> autoRefResource("resource");
+static TemplateNodeFactory::AutoRegister<TemplateNodeEncoding> autoRefEncoding("encoding");
static TemplateNodeFactory::AutoRegister<TemplateNodeSpaceless> autoRefSpaceless("spaceless");
static TemplateNodeFactory::AutoRegister<TemplateNodeIndexEntry> autoRefIndexEntry("indexentry");
static TemplateNodeFactory::AutoRegister<TemplateNodeOpenSubIndex> autoRefOpenSubIndex("opensubindex");
@@ -4715,7 +4936,8 @@ void TemplateParser::parse(
command=="endrecursetree" || command=="endspaceless" ||
command=="endmarkers" || command=="endmsg" ||
command=="endrepeat" || command=="elif" ||
- command=="endrange" || command=="endtabbing")
+ command=="endrange" || command=="endtabbing" ||
+ command=="endencoding")
{
warn(m_templateName,tok->line,"Found tag '%s' without matching start tag",command.data());
}
@@ -4866,8 +5088,23 @@ class TemplateEngine::Private
//printf("loadByName(%s,%d) {\n",fileName.data(),line);
m_includeStack.append(new IncludeEntry(IncludeEntry::Template,fileName,QCString(),line));
Template *templ = m_templateCache.find(fileName);
- if (templ==0)
+ if (templ==0) // first time template is referenced
{
+ QCString filePath = m_templateDirName+"/"+fileName;
+ QFile f(filePath);
+ if (f.open(IO_ReadOnly))
+ {
+ QFileInfo fi(filePath);
+ int size=fi.size();
+ QCString data(size+1);
+ if (f.readBlock(data.rawData(),size)==size)
+ {
+ templ = new TemplateImpl(m_engine,filePath,data,m_extension);
+ m_templateCache.insert(fileName,templ);
+ return templ;
+ }
+ }
+ // fallback to default built-in template
const QCString data = ResourceMgr::instance().getAsString(fileName);
if (!data.isEmpty())
{
@@ -4940,12 +5177,18 @@ class TemplateEngine::Private
return m_extension;
}
+ void setTemplateDir(const char *dirName)
+ {
+ m_templateDirName = dirName;
+ }
+
private:
QDict<Template> m_templateCache;
//mutable int m_indent;
TemplateEngine *m_engine;
QList<IncludeEntry> m_includeStack;
QCString m_extension;
+ QCString m_templateDirName;
};
TemplateEngine::TemplateEngine()
@@ -5003,5 +5246,9 @@ QCString TemplateEngine::outputExtension() const
return p->outputExtension();
}
+void TemplateEngine::setTemplateDir(const char *dirName)
+{
+ p->setTemplateDir(dirName);
+}
diff --git a/src/template.h b/src/template.h
index 7d6e2ff..98ae7ed 100644
--- a/src/template.h
+++ b/src/template.h
@@ -590,6 +590,9 @@ class TemplateEngine
/** Prints the current template file include stack */
void printIncludeContext(const char *fileName,int line) const;
+ /** Sets the search directory where to look for template files */
+ void setTemplateDir(const char *dirName);
+
private:
friend class TemplateNodeBlock;
friend class TemplateNodeCreate;
diff --git a/src/tooltip.cpp b/src/tooltip.cpp
index 957c661..3b128a9 100644
--- a/src/tooltip.cpp
+++ b/src/tooltip.cpp
@@ -70,7 +70,7 @@ static QCString escapeId(const char *s)
void TooltipManager::addTooltip(Definition *d)
{
- static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS");
+ static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
if (!sourceTooltips) return;
QCString id = d->getOutputFileBase();
int i=id.findRev('/');
diff --git a/src/translator_am.h b/src/translator_am.h
index b50aec2..9e72529 100644
--- a/src/translator_am.h
+++ b/src/translator_am.h
@@ -65,7 +65,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Դաշտեր";
}
@@ -139,7 +139,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Տվյալների կառուցվածք";
}
@@ -156,7 +156,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Տվյալների դաշտեր";
}
@@ -170,7 +170,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*??*/
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Գլոբալներ";
}
@@ -210,7 +210,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Տվյալների կառուցվածքը` կարճ բացատրություններով.";
}
@@ -226,7 +226,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
{
QCString result="Բոլոր ";
if(!extractAll) result+="փաստագրված ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result+="կառուցվածքների և միավորումների դաշտերի ";
else
result+="դասի անդամների ";
@@ -234,14 +234,14 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
result+=" հղումներով դեպի ";
if(!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result+="կառուցվածք/միավորում փաստագրությունները բոլոր անդամների համար.";
else
result+="դասի փաստագրությունը բոլոր անդամների համար.";
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result += "կառուցվածքները/միավորումները, որոնց նրանք պատկանում են.";
else
result += "դասերը, որոնց նրանք պատկանում են.";
@@ -255,7 +255,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
QCString result="Բոլոր ";
if (!extractAll) result+="փաստագրված ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="ֆունկցիաների, փոփոխականների, մակրո-հայտարարությունների, "
"համարակալումների և տիպի սահմանումների (typedef)";
@@ -309,7 +309,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Տվյալների կառուցվածք";
}
@@ -336,7 +336,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Տվյալների կառուցվածքներ";
}
@@ -439,7 +439,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Տվյալների կառուցվածք";
}
@@ -865,7 +865,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Տվյալների դաշտեր";
}
@@ -1062,7 +1062,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Տվյալների կառուցվածք";
}
@@ -1137,7 +1137,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
*/
virtual QCString trClass(bool first_capital, bool singular)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
QCString result((first_capital ? "Տվյալների կառուցվածք" : "տվյալների կառուցվածք"));
return result;
diff --git a/src/translator_ar.h b/src/translator_ar.h
index 5daaa4c..24281fd 100644
--- a/src/translator_ar.h
+++ b/src/translator_ar.h
@@ -97,7 +97,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "توثيق الحقل";
}
@@ -164,7 +164,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "هياكل البيانات";
}
@@ -185,7 +185,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "حقول البيانات";
}
@@ -198,7 +198,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "العوام";
}
@@ -239,7 +239,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "هذه هي هياكل البيانات مع وصف مختصر:";
}
@@ -255,7 +255,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
{
QCString result="هذه قائمة بكل ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="حقول البناءات والإتحادات";
}
@@ -270,7 +270,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
result+=" مع وصلات إلى ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="توثيق البناء/الإتحاد لكل حقل:";
}
@@ -281,7 +281,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="البناءات/الإتحادات التي ينتمون إليها:";
}
@@ -299,7 +299,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
QCString result="Here is a list of all ";
if (!extractAll) result+="documented ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="functions, variables, defines, enums, and typedefs";
}
@@ -361,7 +361,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "فهرس هيكل البيانات";
}
@@ -388,7 +388,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "فهرس هيكل البيانات";
}
@@ -497,7 +497,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "هياكل البيانات";
}
@@ -917,7 +917,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "حقول بيانات";
}
@@ -1118,7 +1118,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "هياكل البيانات";
}
diff --git a/src/translator_br.h b/src/translator_br.h
index f9fe664..5e2d305 100644
--- a/src/translator_br.h
+++ b/src/translator_br.h
@@ -95,7 +95,7 @@ class TranslatorBrazilian : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campos";
}
@@ -162,7 +162,7 @@ class TranslatorBrazilian : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estruturas de Dados";
}
@@ -179,7 +179,7 @@ class TranslatorBrazilian : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campos de Dados";
}
@@ -192,7 +192,7 @@ class TranslatorBrazilian : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globais";
}
@@ -231,7 +231,7 @@ class TranslatorBrazilian : public Translator
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Aqui estão as estruturas de dados, uniões e suas respectivas descrições:";
}
@@ -246,7 +246,7 @@ class TranslatorBrazilian : public Translator
{
QCString result="Esta é a lista de ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="todas as estruturas e campos de uniões ";
if (!extractAll)
@@ -265,7 +265,7 @@ class TranslatorBrazilian : public Translator
result+=" com referências para ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="a documentação da estrutura/união de cada campo:";
}
@@ -276,7 +276,7 @@ class TranslatorBrazilian : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="a estrutura/união a que pertencem:";
}
@@ -292,7 +292,7 @@ class TranslatorBrazilian : public Translator
virtual QCString trFileMembersDescription(bool extractAll)
{
QCString result="Esta é a lista de ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="todas as funções, variáveis, definições, enumerações e definições de tipos ";
if (!extractAll) result+="documentadas ";
@@ -343,7 +343,7 @@ class TranslatorBrazilian : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Índice das Estruturas de Dados";
}
@@ -370,7 +370,7 @@ class TranslatorBrazilian : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estruturas";
}
@@ -473,7 +473,7 @@ class TranslatorBrazilian : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estruturas de Dados";
}
@@ -885,7 +885,7 @@ class TranslatorBrazilian : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campos de Dados";
}
@@ -1074,7 +1074,7 @@ class TranslatorBrazilian : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estruturas de Dados";
}
diff --git a/src/translator_ca.h b/src/translator_ca.h
index d4aca52..ca9b7e9 100644
--- a/src/translator_ca.h
+++ b/src/translator_ca.h
@@ -104,7 +104,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentació dels Camps";
}
@@ -171,7 +171,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estructures de Dades";
}
@@ -188,7 +188,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Camps de Dades";
}
@@ -201,7 +201,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globals";
}
@@ -242,7 +242,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Aquestes són les estructures de dades acompanyades amb breus descripcions:";
}
@@ -257,7 +257,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
virtual QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Aquesta és la llista de tots els ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="camps d'estructures i unions";
}
@@ -272,7 +272,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
result+=" amb enllaços a ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="la documentació de l'estructura/unió per a cada camp:";
}
@@ -283,7 +283,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="les estructures/unions a que pertanyen:";
}
@@ -298,7 +298,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
virtual QCString trFileMembersDescription(bool extractAll)
{
QCString result="Aquesta és la llista de ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="totes les funcions, variables, definicions, enumeracions, i definicions de tipus";
if (!extractAll) result+=" documentades";
@@ -352,7 +352,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Índex d'Estructures de Dades";
}
@@ -379,7 +379,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentació de les Estructures de Dades";
}
@@ -482,7 +482,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estructures de Dades";
}
@@ -894,7 +894,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Camps de Dades";
}
@@ -1083,7 +1083,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estructures de Dades";
}
diff --git a/src/translator_cn.h b/src/translator_cn.h
index eae4014..832d2c7 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -86,7 +86,7 @@ class TranslatorChinese : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "结构体成员变量说明";
}
@@ -154,7 +154,7 @@ class TranslatorChinese : public Translator
/*! This is put above each page as a link to the list of annotated class */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "结构体";
}
else {
@@ -169,7 +169,7 @@ class TranslatorChinese : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "成员变量";
}
else {
@@ -180,7 +180,7 @@ class TranslatorChinese : public Translator
/*! This is put above each page as a link to all member of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "全局定义";
} else {
return "文件成员";
@@ -211,7 +211,7 @@ class TranslatorChinese : public Translator
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "这里列出了所有结构体,并附带简要说明:";
}
@@ -227,7 +227,7 @@ class TranslatorChinese : public Translator
if (!extractAll) {
result+="文档化的";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
result+="结构体和联合体的成员变量,并附带";
}
else {
@@ -235,7 +235,7 @@ class TranslatorChinese : public Translator
}
//result+=" with links to ";
if (extractAll) {
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
result+="结构体或联合的详细说明:";
}
else {
@@ -243,7 +243,7 @@ class TranslatorChinese : public Translator
}
}
else {
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
result+="结构或联合所属的文件:";
}
else {
@@ -258,7 +258,7 @@ class TranslatorChinese : public Translator
QCString result="这里列出了所有";
if (!extractAll)
result +="文档化的";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
result +="函数,变量,宏,枚举和类型定义等,并附带";
}
else {
@@ -292,7 +292,7 @@ class TranslatorChinese : public Translator
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "结构体索引";
}
@@ -309,7 +309,7 @@ class TranslatorChinese : public Translator
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "结构体说明";
}
@@ -366,7 +366,7 @@ class TranslatorChinese : public Translator
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "结构体";
}
@@ -776,7 +776,7 @@ class TranslatorChinese : public Translator
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "成员变量";
}
@@ -978,7 +978,7 @@ class TranslatorChinese : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "结构体";
}
diff --git a/src/translator_cz.h b/src/translator_cz.h
index e4a5692..056d0e4 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -128,7 +128,7 @@ class TranslatorCzech : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentace k položkám";
}
@@ -196,7 +196,7 @@ class TranslatorCzech : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datové struktury";
}
@@ -213,7 +213,7 @@ class TranslatorCzech : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datové položky";
}
@@ -226,7 +226,7 @@ class TranslatorCzech : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globální symboly";
}
@@ -266,7 +266,7 @@ class TranslatorCzech : public Translator
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Následující seznam obsahuje identifikace datových "
"struktur a jejich stručné popisy:";
@@ -290,7 +290,7 @@ class TranslatorCzech : public Translator
result += "dokumentovaných ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result += "položek struktur (struct) a unií (union) ";
}
@@ -303,7 +303,7 @@ class TranslatorCzech : public Translator
if (extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result += "dokumentaci struktur/unií, ke kterým příslušejí:";
}
@@ -314,7 +314,7 @@ class TranslatorCzech : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktury/unie, ke kterým příslušejí:";
}
@@ -333,7 +333,7 @@ class TranslatorCzech : public Translator
QCString result="Zde naleznete seznam všech ";
if (!extractAll) result+="dokumentovaných ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funkcí, proměnných, maker, výčtů a definic typů (typedef) "
"s odkazy na ";
@@ -388,7 +388,7 @@ class TranslatorCzech : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Rejstřík datových struktur";
}
@@ -415,7 +415,7 @@ class TranslatorCzech : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentace datových struktur";
}
@@ -518,7 +518,7 @@ class TranslatorCzech : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datové struktry";
}
@@ -942,7 +942,7 @@ class TranslatorCzech : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datové položky";
}
diff --git a/src/translator_de.h b/src/translator_de.h
index 7d3d63a..8817ea8 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -127,6 +127,9 @@
// - Updated for "new since 1.8.0" version
// - Some small corrections
//
+// 2016/03/15 Carsten Schumann (carsten at familie-schumann dot info)
+// - Updated for "new since 1.8.4" version
+//
// Todo:
// - see FIXME
@@ -245,7 +248,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datenstrukturen";
}
@@ -262,7 +265,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datenstruktur-Elemente";
}
@@ -307,7 +310,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Hier folgt die Aufzählung aller Datenstrukturen "
"mit einer Kurzbeschreibung:";
@@ -327,7 +330,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
{
result+="dokumentierten ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="Strukturen und Varianten";
}
@@ -338,7 +341,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
result+=" mit Verweisen auf ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="die Dokumentation zu jedem Element:";
}
@@ -349,7 +352,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="die zugehörigen Elemente:";
}
@@ -366,7 +369,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
{
QCString result="Hier folgt die Aufzählung aller ";
if (!extractAll) result+="dokumentierten ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="Funktionen, Variablen, Makros, Aufzählungen und Typdefinitionen";
}
@@ -417,7 +420,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
return "Datenstruktur-Verzeichnis";
else
return "Klassen-Verzeichnis";
@@ -440,7 +443,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datenstruktur-Dokumentation";
}
@@ -543,7 +546,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datenstrukturen";
}
@@ -605,6 +608,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
/*! this text is used in the title page of a LaTeX document. */
virtual QCString trGeneratedBy()
{ return "Erzeugt von"; }
+
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990307
@@ -977,7 +981,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datenfelder";
}
@@ -1195,7 +1199,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
return "Datenstrukturen";
else
return "Klassen";
@@ -2037,6 +2041,61 @@ class TranslatorGerman : public TranslatorAdapter_1_8_4
{
return "Übersicht";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.4
+//////////////////////////////////////////////////////////////////////////
+ /** old style UNO IDL services: implemented interfaces */
+ virtual QCString trInterfaces()
+ { return "Exportierte Interfaces"; }
+
+ /** old style UNO IDL services: inherited services */
+ virtual QCString trServices()
+ { return "Eingebundene Dienste"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroups()
+ { return "Konstante Gruppen"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroupReference(const char *namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" Konstantengruppen-Referenz";
+ return result;
+ }
+
+ /** UNO IDL service page title */
+ virtual QCString trServiceReference(const char *sName)
+ {
+ QCString result=(QCString)sName;
+ result+=" Dienstreferenz";
+ return result;
+ }
+ /** UNO IDL singleton page title */
+ virtual QCString trSingletonReference(const char *sName)
+ {
+ QCString result=(QCString)sName;
+ result+=" Singleton-Referenz";
+ return result;
+ }
+ /** UNO IDL service page */
+ virtual QCString trServiceGeneratedFromFiles(bool single)
+ {
+ QCString result=(QCString)"Die Dokumentation für diesen Dienst "
+ "wurde generiert aus ";
+ if (single) result+="folgender Datei: "; else result+="folgenden Dateien: ";
+ return result;
+ }
+ /** UNO IDL singleton page */
+ virtual QCString trSingletonGeneratedFromFiles(bool single)
+ {
+ QCString result=(QCString)"Die Dokumentation für diesen Singleton wurde generiert aus ";
+
+ if (single) result+="folgender Datei:"; else result+="folgenden Dateien:";
+ return result;
+ }
+
+
//////////////////////////////////////////////////////////////////////////
diff --git a/src/translator_dk.h b/src/translator_dk.h
index 9ea5b28..e98cfa8 100644
--- a/src/translator_dk.h
+++ b/src/translator_dk.h
@@ -151,7 +151,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Felt-dokumentation";
} else {
return "Dokumentation af feltvariable";
@@ -215,7 +215,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Datastrukturer";
} else {
return "Oversigt over sammensatte typer";
@@ -229,7 +229,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Data-felter";
} else {
return "Felter i sammensatte typer";
@@ -239,7 +239,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Globale symboler";
} else {
return "Placering i filer"; // Fil-medlemmer"; //TODO
@@ -278,7 +278,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Her er datastrukturerne med korte beskrivelser:";
} else {
return "Her er klasserne, datastrukturerne, "
@@ -293,20 +293,20 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
if (!extractAll) {
result+="dokumenterede ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
result+="felter i datastrukturer og unioner";
} else {
result+="klassemedlemmer";
}
result+=" med links til ";
if (!extractAll) {
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
result+="datastruktur/unions-dokumentationen for hvert felt:";
} else {
result+="klassedokumentationen for hvert medlem:";
}
} else {
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
result+="de datastrukturer/unioner, de hører til:";
} else {
result+="de klasser, de hører til:";
@@ -321,7 +321,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
QCString result="Her er en liste over alle ";
if (!extractAll) result+="dokumenterede ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
result+="funktioner, variable, #defines, enumerationer "
"og typedefinitioner";
} else {
@@ -368,7 +368,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Indeks over datastrukturer";
} else {
return "Indeks over sammensatte typer";
@@ -392,7 +392,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Datastruktur-documentation";
} else {
return "Klasse-dokumentation";
@@ -498,7 +498,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Datastrukturer";
} else {
return "Sammensatte typer";
@@ -883,7 +883,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Datafelter";
} else {
return "Offentlige attributter";
@@ -1067,7 +1067,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C)) {
return "Datastrukturer";
} else {
return "Klasser";
diff --git a/src/translator_en.h b/src/translator_en.h
index a72c05a..190ba79 100644
--- a/src/translator_en.h
+++ b/src/translator_en.h
@@ -35,7 +35,7 @@
files frees the maintainer from thinking about whether the
first, the second, or both files should be included or not, and
why. This holds namely for localized translators because their
- base class is changed occasionaly to adapter classes when the
+ base class is changed occasionally to adapter classes when the
Translator class changes the interface, or back to the
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
@@ -103,7 +103,7 @@ class TranslatorEnglish : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Field Documentation";
}
@@ -170,7 +170,7 @@ class TranslatorEnglish : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Structures";
}
@@ -187,7 +187,7 @@ class TranslatorEnglish : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Fields";
}
@@ -200,7 +200,7 @@ class TranslatorEnglish : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globals";
}
@@ -241,7 +241,7 @@ class TranslatorEnglish : public Translator
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Here are the data structures with brief descriptions:";
}
@@ -260,7 +260,7 @@ class TranslatorEnglish : public Translator
{
result+="documented ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struct and union fields";
}
@@ -271,7 +271,7 @@ class TranslatorEnglish : public Translator
result+=" with links to ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="the struct/union documentation for each field:";
}
@@ -282,7 +282,7 @@ class TranslatorEnglish : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="the structures/unions they belong to:";
}
@@ -300,7 +300,7 @@ class TranslatorEnglish : public Translator
QCString result="Here is a list of all ";
if (!extractAll) result+="documented ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="functions, variables, defines, enums, and typedefs";
}
@@ -351,7 +351,7 @@ class TranslatorEnglish : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Structure Index";
}
@@ -378,7 +378,7 @@ class TranslatorEnglish : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Structure Documentation";
}
@@ -481,7 +481,7 @@ class TranslatorEnglish : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Structures";
}
@@ -888,7 +888,7 @@ class TranslatorEnglish : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Fields";
}
@@ -1036,10 +1036,10 @@ class TranslatorEnglish : public Translator
"<li>%A dark green arrow is used for protected inheritance.</li>\n"
"<li>%A dark red arrow is used for private inheritance.</li>\n"
"<li>%A purple dashed arrow is used if a class is contained or used "
- "by another class. The arrow is labeled with the variable(s) "
+ "by another class. The arrow is labelled with the variable(s) "
"through which the pointed class or struct is accessible.</li>\n"
"<li>%A yellow dashed arrow denotes a relation between a template instance and "
- "the template class it was instantiated from. The arrow is labeled with "
+ "the template class it was instantiated from. The arrow is labelled with "
"the template parameters of the instance.</li>\n"
"</ul>\n";
}
@@ -1086,7 +1086,7 @@ class TranslatorEnglish : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Structures";
}
@@ -1494,7 +1494,7 @@ class TranslatorEnglish : public Translator
{ QCString result=dirName; result+=" Directory Reference"; return result; }
/*! This returns the word directory with or without starting capital
- * (\a first_capital) and in sigular or plural form (\a singular).
+ * (\a first_capital) and in singular or plural form (\a singular).
*/
virtual QCString trDir(bool first_capital, bool singular)
{
diff --git a/src/translator_eo.h b/src/translator_eo.h
index 5415e81..28876d7 100644
--- a/src/translator_eo.h
+++ b/src/translator_eo.h
@@ -105,7 +105,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Kampa Dokumentado";
}
@@ -172,7 +172,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datumstruktoroj";
}
@@ -189,7 +189,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datumkampoj";
}
@@ -202,7 +202,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Mallokalaĵoj";
}
@@ -243,7 +243,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Jen datumstrukturoj kun mallongaj priskriboj:";
}
@@ -262,7 +262,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
{
result+="dokumentitaj ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="strukturaj kaj kunigaj kampoj";
}
@@ -273,7 +273,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
result+=" kun ligiloj al ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="la struktura/kuniga dokumentado por ĉiu kampo:";
}
@@ -284,7 +284,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="la strukturoj/kunigoj al kiuj ili apartenas:";
}
@@ -302,7 +302,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
QCString result="Jen listo de ĉiuj ";
if (!extractAll) result+="dokumentitaj ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funkcioj, variabloj, difinoj, enumeracioj kaj tipodifinoj";
}
@@ -353,7 +353,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datumstruktura Indekso";
}
@@ -380,7 +380,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datumstruktura Dokumentado";
}
@@ -483,7 +483,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datumstrukturoj";
}
@@ -891,7 +891,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datumkampoj";
}
@@ -1086,7 +1086,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datumstrukturoj";
}
diff --git a/src/translator_es.h b/src/translator_es.h
index 1b75465..8922297 100644
--- a/src/translator_es.h
+++ b/src/translator_es.h
@@ -97,7 +97,7 @@ class TranslatorSpanish : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentación de los campos";
}
@@ -164,7 +164,7 @@ class TranslatorSpanish : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estructura de datos";
}
@@ -181,7 +181,7 @@ class TranslatorSpanish : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campos de datos";
}
@@ -194,7 +194,7 @@ class TranslatorSpanish : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globales";
}
@@ -234,7 +234,7 @@ class TranslatorSpanish : public Translator
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Lista de estructuras con una breve descripción:";
}
@@ -249,7 +249,7 @@ class TranslatorSpanish : public Translator
virtual QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Lista de todos los ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="campos de estructuras y uniones";
}
@@ -264,7 +264,7 @@ class TranslatorSpanish : public Translator
result+=" con enlaces a ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="la documentación de la estructura/unión para cada campo:";
}
@@ -275,7 +275,7 @@ class TranslatorSpanish : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="las estructuras/uniones a que pertenecen:";
}
@@ -291,7 +291,7 @@ class TranslatorSpanish : public Translator
virtual QCString trFileMembersDescription(bool extractAll)
{
QCString result="Lista de ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="todas las funciones, variables, 'defines', enumeraciones y 'typedefs'";
}
@@ -343,7 +343,7 @@ class TranslatorSpanish : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Índice de estructura de datos";
}
@@ -370,7 +370,7 @@ class TranslatorSpanish : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentación de las estructuras de datos";
}
@@ -406,13 +406,13 @@ class TranslatorSpanish : public Translator
* list of defines
*/
virtual QCString trDefines()
- { return "'defines'"; }
+ { return "defines"; }
/*! This is used in the documentation of a file as a header before the
* list of typedefs
*/
virtual QCString trTypedefs()
- { return "'typedefs'"; }
+ { return "typedefs"; }
/*! This is used in the documentation of a file as a header before the
* list of enumerations
@@ -473,7 +473,7 @@ class TranslatorSpanish : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estructuras de datos";
}
@@ -906,7 +906,7 @@ class TranslatorSpanish : public Translator
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campos de datos";
}
@@ -1119,7 +1119,7 @@ class TranslatorSpanish : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estructuras de Datos";
}
diff --git a/src/translator_fa.h b/src/translator_fa.h
index 7effafe..5a37330 100644
--- a/src/translator_fa.h
+++ b/src/translator_fa.h
@@ -120,7 +120,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Field مستندات";
}
@@ -187,7 +187,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "ساختار های داده ";
}
@@ -204,7 +204,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "فضاهای داده ها";
}
@@ -217,7 +217,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globals";
}
@@ -257,7 +257,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "ليست ساختارهای داده به همراه توضيحی کوتاه :";
}
@@ -280,7 +280,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
result+="همه ی اعضاء ";
}
result+=" به همراه ارتباطشان با ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="ساختارهای داده ";
}
@@ -289,7 +289,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
result+="كلاس ها ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="و مستندات ساختار داده برای هر عضو ";
}
@@ -348,7 +348,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "فهرست ساختار داده ها";
}
@@ -375,7 +375,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "مستندات ساختار داده ها";
}
@@ -484,7 +484,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "ساختارهای داده";
}
@@ -889,7 +889,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "فضاهای داده ها";
}
@@ -1084,7 +1084,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "ساختار های داده";
}
diff --git a/src/translator_fi.h b/src/translator_fi.h
index 8343cdd..2b94f48 100644
--- a/src/translator_fi.h
+++ b/src/translator_fi.h
@@ -160,7 +160,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Kenttien dokumentaatio"; // "Field Documentation";
}
@@ -232,7 +232,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tietueet"; // "Data Structures"
}
@@ -249,7 +249,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tietueen kentät"; // "Data Fields"
}
@@ -262,7 +262,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globaalit"; // "Globals"
}
@@ -303,7 +303,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tässä ovat tietueet lyhyen selitteen kanssa:"; // "Here are the data structures with brief descriptions:"
}
@@ -322,7 +322,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
{
result+="dokumentoiduista "; // "documented "
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="tietuiden ja yhdisteiden kentistä"; // "struct and union fields"
}
@@ -333,7 +333,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
result+=" linkitettyinä "; // " with links to "
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="jokaisen kentän tietueen/yhdisteen dokumentaatioon:"; // "the struct/union documentation for each field:"
}
@@ -344,7 +344,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+= "tietueisiin/yhdisteisiin, joihin ne kuuluvat:"; // "the structures/unions they belong to:"
}
@@ -362,7 +362,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
QCString result="Tässä on lista kaikista "; // "Here is a list of all "
if (!extractAll) result+="dokumentoiduista "; // "documented "
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funktioista, muuttujista, määrittelyistä, luettelotyypeistä ja tyyppimäärittelyistä"; // "functions, variables, defines, enums, and typedefs"
}
@@ -413,7 +413,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tietueluettelo"; // "Data Structure Index"
}
@@ -440,7 +440,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tietueiden dokumentaatio"; // "Data Structure Documentation"
}
@@ -543,7 +543,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tietueet"; // "Data Structures"
}
@@ -956,7 +956,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tietueen kentät"; // "Data Fields"
}
@@ -1202,7 +1202,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tietueet"; // "Data Structures"
}
diff --git a/src/translator_fr.h b/src/translator_fr.h
index 65e77df..7f44d37 100644
--- a/src/translator_fr.h
+++ b/src/translator_fr.h
@@ -163,7 +163,7 @@ class TranslatorFrench : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentation des champs";
}
@@ -230,7 +230,7 @@ class TranslatorFrench : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Structures de données";
}
@@ -247,7 +247,7 @@ class TranslatorFrench : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Champs de donnée";
}
@@ -260,7 +260,7 @@ class TranslatorFrench : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Variables globale";
}
@@ -301,7 +301,7 @@ class TranslatorFrench : public Translator
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Liste des structures de données avec une brève description :";
}
@@ -316,7 +316,7 @@ class TranslatorFrench : public Translator
virtual QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Liste de tous les ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="champs de structure et d'union ";
}
@@ -331,7 +331,7 @@ class TranslatorFrench : public Translator
result+="avec des liens vers ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="la documentation de structure/union de chaque champ :";
}
@@ -342,7 +342,7 @@ class TranslatorFrench : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="les structures/unions auxquelles ils appartiennent :";
}
@@ -359,7 +359,7 @@ class TranslatorFrench : public Translator
{
QCString result="Liste ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="de toutes les fonctions, variables, macros, enumérations, et définitions de type ";
}
@@ -409,7 +409,7 @@ class TranslatorFrench : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Index des structures de données";
}
@@ -436,7 +436,7 @@ class TranslatorFrench : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentation des structures de données";
}
@@ -539,7 +539,7 @@ class TranslatorFrench : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Structures de données";
}
@@ -951,7 +951,7 @@ class TranslatorFrench : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Champs de données";
}
@@ -1146,7 +1146,7 @@ class TranslatorFrench : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Structures de données";
}
diff --git a/src/translator_gr.h b/src/translator_gr.h
index 713b4bb..8b7afe1 100644
--- a/src/translator_gr.h
+++ b/src/translator_gr.h
@@ -92,7 +92,7 @@ class TranslatorGreek : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Τεκμηρίωση Πεδίων";
}
@@ -159,7 +159,7 @@ class TranslatorGreek : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Δομές Δεδομένων";
}
@@ -176,7 +176,7 @@ class TranslatorGreek : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Μέλη Δομών Δεδομένων";
}
@@ -189,7 +189,7 @@ class TranslatorGreek : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Καθολικοί ορισμοί";
}
@@ -228,7 +228,7 @@ class TranslatorGreek : public Translator
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Ακολουθούν οι δομές δεδομένων με σύντομες περιγραφές:";
}
@@ -247,7 +247,7 @@ class TranslatorGreek : public Translator
{
result+="τεκμηριωμένων ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="μελών δομών δεδομένων και ενώσεων ";
}
@@ -258,7 +258,7 @@ class TranslatorGreek : public Translator
result+=" με συνδέσμους ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="στην τεκμηρίωση των δομών/ενώσεων για κάθε πεδίο:";
}
@@ -269,7 +269,7 @@ class TranslatorGreek : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="στις δομές/ενώσεις που ανήκουν:";
}
@@ -287,7 +287,7 @@ class TranslatorGreek : public Translator
QCString result="Ακολουθεί η λίστα όλων των ";
if (!extractAll) result+="τεκμηριωμένων ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="συναρτήσεων, μεταβλητών, ορισμών, απαριθμήσεων, και ορισμών τύπων";
}
@@ -339,7 +339,7 @@ class TranslatorGreek : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Ευρετήριο δομών δεδομένων";
}
@@ -366,7 +366,7 @@ class TranslatorGreek : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Τεκμηρίωση Δομών Δεδομένων";
}
@@ -469,7 +469,7 @@ class TranslatorGreek : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Δομές Δεδομένων";
}
@@ -877,7 +877,7 @@ class TranslatorGreek : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Πεδία Δεδομένων";
}
@@ -1075,7 +1075,7 @@ class TranslatorGreek : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Δομές Δεδομένων";
}
diff --git a/src/translator_hr.h b/src/translator_hr.h
index cfefa32..1d17e2a 100644
--- a/src/translator_hr.h
+++ b/src/translator_hr.h
@@ -134,7 +134,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Stablo klasa"; }
QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Sve strukture";
}
@@ -147,7 +147,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Popis datoteka"; }
QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
return "Svi članovi struktura";
else
return "Svi članovi klasa";
@@ -181,7 +181,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
if (!extractAll)
result+="dokumentiranih ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result+="članova klasa s linkovima na ";
else
result+="članova struktura s linkovima na ";
@@ -192,7 +192,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result+="dokumentaciju klase :";
else
result +="dokumentaciju strukture";
@@ -226,7 +226,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Hijerarhijsko kazalo"; }
QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Kazalo struktura podataka";
}
@@ -241,7 +241,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Dokumentacija modula"; }
QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentacija struktura podataka";
}
diff --git a/src/translator_hu.h b/src/translator_hu.h
index 4bf3f71..17f0d44 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -87,7 +87,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Adatmezők dokumentációja";
}
@@ -151,7 +151,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Adatszerkezetek";
}
@@ -168,7 +168,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Adatmezők";
}
@@ -181,7 +181,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globális elemek";
}
@@ -222,7 +222,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Az összes adatszerkezet listája rövid leírásokkal:";
}
@@ -241,7 +241,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
{
result+="dokumentált ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktúra- és úniómező";
}
@@ -252,7 +252,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
result+=" listája, valamint hivatkozás ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="a megfelelő struktúra-/úniódokumentációra minden mezőnél:";
}
@@ -263,7 +263,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="a struktúrákra/úniókra, amikhez tartoznak:";
}
@@ -281,7 +281,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
QCString result="Az összes ";
if (!extractAll) result+="dokumentált ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="függvény, változó, makródefiníció, enumeráció és típusdefiníció";
}
@@ -333,7 +333,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Adatszerkezet-mutató";
}
@@ -360,7 +360,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Adatszerkezetek dokumentációja";
}
@@ -463,7 +463,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Adatszerkezetek";
}
@@ -872,7 +872,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Adatmezők";
}
@@ -1064,7 +1064,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Adatszerkezetek";
}
diff --git a/src/translator_id.h b/src/translator_id.h
index c5c58fa..2039c76 100644
--- a/src/translator_id.h
+++ b/src/translator_id.h
@@ -87,7 +87,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentasi Variabel";
}
@@ -154,7 +154,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Struktur Data";
}
@@ -171,7 +171,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Variabel Data";
}
@@ -184,7 +184,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Daftar Definisi Global";
}
@@ -225,7 +225,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Berikut ini daftar struktur data, dengan penjelasan singkat:";
}
@@ -239,7 +239,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
virtual QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Berikut ini daftar seluruh ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="variabel anggota struct dan union";
}
@@ -254,7 +254,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
result+=", dengan tautan ke ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="dokumentasi struct/union untuk setiap variabel:";
}
@@ -265,7 +265,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struct/union yang memuatnya:";
}
@@ -282,7 +282,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
{
QCString result="Berikut ini daftar ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="fungsi, variabel, makro definisi, enumerasi, dan tipe";
}
@@ -334,7 +334,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Indeks Struktur Data";
}
@@ -361,7 +361,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentasi Struktur Data";
}
@@ -464,7 +464,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Struktur Data";
}
@@ -873,7 +873,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Variabel Data";
}
@@ -1067,7 +1067,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Struktur Data";
}
diff --git a/src/translator_it.h b/src/translator_it.h
index e2c51c7..8f08b5a 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -141,7 +141,7 @@ class TranslatorItalian : public Translator
/*! header that is put before the list of member attributes. */
QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentazione dei campi";
}
@@ -209,7 +209,7 @@ class TranslatorItalian : public Translator
/*! This is put above each page as a link to the list of annotated classes */
QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Strutture dati";
}
@@ -226,7 +226,7 @@ class TranslatorItalian : public Translator
/*! This is put above each page as a link to all members of compounds. */
QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campi dei dati";
}
@@ -239,7 +239,7 @@ class TranslatorItalian : public Translator
/*! This is put above each page as a link to all members of files. */
QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Elementi globali";
}
@@ -282,7 +282,7 @@ class TranslatorItalian : public Translator
QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Queste sono le strutture dati con una loro breve descrizione:";
}
@@ -296,7 +296,7 @@ class TranslatorItalian : public Translator
QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Questo è un elenco ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
if (!extractAll) result+="delle struct e delle union documentate ";
else result+="di tutte le struct e le union ";
@@ -307,7 +307,7 @@ class TranslatorItalian : public Translator
else result+="di tutti i membri ";
}
result+="con collegamenti alla documentazione ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
if (extractAll) result+="della struct/union per ciascun campo:";
else result+="delle struct/union a cui appartengono:";
@@ -324,7 +324,7 @@ class TranslatorItalian : public Translator
QCString trFileMembersDescription(bool extractAll)
{
QCString result="Questo è un elenco ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
if (!extractAll) result+="delle funzioni, delle variabili, delle define, dei tipi enumerati e delle ridefinizioni dei tipi (typedef) documentate ";
else result+="di tutte le funzioni, variabili, define, tipi enumerati, e ridefinizioni dei tipi (typedef) ";
@@ -375,7 +375,7 @@ class TranslatorItalian : public Translator
*/
QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Indice delle strutture dati";
}
@@ -496,7 +496,7 @@ class TranslatorItalian : public Translator
*/
QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Strutture dati";
}
@@ -909,7 +909,7 @@ class TranslatorItalian : public Translator
}
QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campi";
}
@@ -1098,7 +1098,7 @@ class TranslatorItalian : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Strutture dati";
}
diff --git a/src/translator_jp.h b/src/translator_jp.h
index 4dc9cba..c4f92c2 100644
--- a/src/translator_jp.h
+++ b/src/translator_jp.h
@@ -103,7 +103,7 @@ class TranslatorJapanese : public Translator
/*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation()
{
- if( Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
+ if( Config_getBool(OPTIMIZE_OUTPUT_JAVA))
{
return "メソッド詳解";
}
@@ -116,7 +116,7 @@ class TranslatorJapanese : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if( Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if( Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "フィールド詳解";
}
@@ -185,7 +185,7 @@ class TranslatorJapanese : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "データ構造";
}
@@ -202,7 +202,7 @@ class TranslatorJapanese : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "データフィールド";
}
@@ -215,7 +215,7 @@ class TranslatorJapanese : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "大域各種";
}
@@ -262,7 +262,7 @@ class TranslatorJapanese : public Translator
virtual QCString trCompoundListDescription()
{
/* 概要がついているのは見ればわかるので省略 */
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "データ構造一覧です。";
}
@@ -275,7 +275,7 @@ class TranslatorJapanese : public Translator
/*! This is an introduction to the page with all class members. */
virtual QCString trCompoundMembersDescription(bool extractAll)
{
- const bool forC = Config_getBool("OPTIMIZE_OUTPUT_FOR_C");
+ const bool forC = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
QCString result;
if (forC)
{
@@ -332,7 +332,7 @@ class TranslatorJapanese : public Translator
virtual QCString trFileMembersDescription(bool /*extractAll*/)
{
QCString result;
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="関数・変数・マクロ・列挙・型定義";
}
@@ -377,7 +377,7 @@ class TranslatorJapanese : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "データ構造索引";
}
@@ -404,7 +404,7 @@ class TranslatorJapanese : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "データ構造詳解";
}
@@ -506,7 +506,7 @@ class TranslatorJapanese : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "データ構造";
}
@@ -913,7 +913,7 @@ class TranslatorJapanese : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "フィールド";
}
@@ -1102,7 +1102,7 @@ class TranslatorJapanese : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "データ構造";
}
diff --git a/src/translator_kr.h b/src/translator_kr.h
index 2ef50e8..1a720e2 100644
--- a/src/translator_kr.h
+++ b/src/translator_kr.h
@@ -118,7 +118,7 @@ class TranslatorKorean : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "필드 문서화";
}
@@ -185,7 +185,7 @@ class TranslatorKorean : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "데이타 구조";
}
@@ -202,7 +202,7 @@ class TranslatorKorean : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "데이타 필드";
}
@@ -215,7 +215,7 @@ class TranslatorKorean : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "전역";
}
@@ -255,7 +255,7 @@ class TranslatorKorean : public Translator
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "다음은 데이타 구조들입니다. (간략한 설명만을 보여줍니다) :";
}
@@ -274,7 +274,7 @@ class TranslatorKorean : public Translator
{
result+="문서화된 ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="모든 구조체와 공용체의 필드들";
}
@@ -286,7 +286,7 @@ class TranslatorKorean : public Translator
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="각 필드들은 해당 필드에 대한 구조체와 공용체의 "
"문서화 페이지의 링크를 가지고 있습니다. :";
@@ -299,7 +299,7 @@ class TranslatorKorean : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="각 필드들은 해당 필드가 속해 있는 구조체와 공용체에 "
"대한 링크를 가지고 있습니다. :";
@@ -319,7 +319,7 @@ class TranslatorKorean : public Translator
QCString result="다음은 ";
if (!extractAll) result+="문서화된 ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="모든 함수, 변수, 매크로, 열거형, 타입정의들";
}
@@ -372,7 +372,7 @@ class TranslatorKorean : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "데이타 구조 색인";
}
@@ -399,7 +399,7 @@ class TranslatorKorean : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "데이타 구조 문서화";
}
@@ -502,7 +502,7 @@ class TranslatorKorean : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "데이타 구조";
}
@@ -911,7 +911,7 @@ class TranslatorKorean : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "데이타 필드";
}
@@ -1100,7 +1100,7 @@ class TranslatorKorean : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "데이타 구조";
}
diff --git a/src/translator_lt.h b/src/translator_lt.h
index faf4197..f47d9d4 100644
--- a/src/translator_lt.h
+++ b/src/translator_lt.h
@@ -94,7 +94,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Lauko aprašymas";
}
@@ -161,7 +161,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Duomenų Struktūros";
}
@@ -178,7 +178,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Duomenų Laukai";
}
@@ -191,7 +191,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globalūs Nariai";
}
@@ -232,7 +232,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Duomenų struktūros su trumpais aprašymais:";
}
@@ -251,7 +251,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
{
result+="dokumentuotų ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktūrų ir sąjungų laukų sąrašas";
}
@@ -262,7 +262,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
result+=" su ryšiais į ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktūrų/sąjungų kiekvieno lauko dokumentaciją:";
}
@@ -273,7 +273,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktūros/sąjungos, kurios priklauso:";
}
@@ -291,7 +291,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
QCString result="Sąrašas visų ";
if (!extractAll) result+="dokumentuotų ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funkcijų, kintamųjų, apibrėžimų, išvardinimų, ir tipų apibrėžimų";
}
@@ -342,7 +342,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Duomenų Struktūros Indeksas";
}
@@ -369,7 +369,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Duomenų Struktūros Dokumentacija";
}
@@ -472,7 +472,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Duomenų struktųros";
}
@@ -879,7 +879,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Duomenų Laukai";
}
@@ -1075,7 +1075,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Duomenų Struktūros";
}
diff --git a/src/translator_lv.h b/src/translator_lv.h
index 35aab0f..2736bb0 100644
--- a/src/translator_lv.h
+++ b/src/translator_lv.h
@@ -109,7 +109,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Lauka dokumentācija";
}
@@ -176,7 +176,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datu struktūras";
}
@@ -193,7 +193,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datu lauki";
}
@@ -206,7 +206,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globālie";
}
@@ -247,7 +247,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Šeit ir visas datu struktūras ar īsu aprakstu:";
}
@@ -266,7 +266,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
{
result+="dokumentēto ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktūru un apvienojumu lauku";
}
@@ -277,7 +277,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
result+=" saraksts ar saitēm uz ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktūru/apvienojumu dokumentāciju katram laukam:";
}
@@ -288,7 +288,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktūrām/apvienojumiem, kam tie pieder:";
}
@@ -306,7 +306,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
QCString result="Šeit ir visu ";
if (!extractAll) result+="dokumentēto ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funkciju, mainīgo, definīciju, uzskaitījumliterāļu un typedefs";
}
@@ -357,7 +357,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datu struktūru indess";
}
@@ -384,7 +384,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datu struktūras dokomentācija";
}
@@ -487,7 +487,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datu struktūras";
}
@@ -894,7 +894,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datu lauki";
}
@@ -1092,7 +1092,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datu struktūras";
}
diff --git a/src/translator_mk.h b/src/translator_mk.h
index d963dfc..3fc046e 100644
--- a/src/translator_mk.h
+++ b/src/translator_mk.h
@@ -95,7 +95,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- //if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ //if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Документација на членови";
}
@@ -158,7 +158,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Список на Структури";
}
@@ -175,7 +175,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Членови";
}
@@ -188,7 +188,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Глобални Членови";
}
@@ -228,7 +228,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Список на структури со кратки описи:";
}
@@ -247,7 +247,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
{
result+="документирани ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="структури и унии";
}
@@ -258,7 +258,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
result+=" со врски до ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="документацијата за секој член на структурата/унијата:";
}
@@ -269,7 +269,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="структурите/униите на кои што припаѓаат:";
}
@@ -287,7 +287,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
QCString result="Список на сите ";
if (!extractAll) result+="документирани ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="функции, променливи, дефиниции, набројувања и дефиниции на тип";
}
@@ -338,7 +338,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Попис на Структури";
}
@@ -365,7 +365,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Документација на Структури";
}
@@ -468,7 +468,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структури";
}
@@ -876,7 +876,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Членови";
}
@@ -1071,7 +1071,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структури";
}
diff --git a/src/translator_no.h b/src/translator_no.h
index 40d3287..58b596a 100644
--- a/src/translator_no.h
+++ b/src/translator_no.h
@@ -105,7 +105,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Feltdokumentasjon";
}
@@ -172,7 +172,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datastrukturer";
}
@@ -193,7 +193,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datafelt";
}
@@ -206,7 +206,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globale";
}
@@ -247,7 +247,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Her er datastrukturene med korte beskrivelser:";
}
@@ -266,7 +266,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
{
result+="dokumenterte ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struct- og unionfelter";
}
@@ -277,7 +277,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
result+=" med koblinger til ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struct/union dokumentasjon for hvert felt:";
}
@@ -288,7 +288,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struct'ene/unionene de hører til:";
}
@@ -305,7 +305,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
QCString result="Her er en liste over alle ";
if (!extractAll) result+="dokumenterte ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funksjoner, variabler, definisjoner, enum'er, og typedef'er";
}
@@ -367,7 +367,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datastrukturindeks";
}
@@ -394,7 +394,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datastrukturdokumentasjon";
}
@@ -503,7 +503,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datastrukturer";
}
@@ -924,7 +924,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datafelt";
}
@@ -1118,7 +1118,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datastrukturer";
}
diff --git a/src/translator_pl.h b/src/translator_pl.h
index f1bec57..421f407 100644
--- a/src/translator_pl.h
+++ b/src/translator_pl.h
@@ -77,7 +77,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! header that is put before the list of member attributes. */
QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentacja pól";
}
@@ -144,7 +144,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! This is put above each page as a link to the list of annotated classes */
QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Struktury danych";
}
@@ -165,7 +165,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! This is put above each page as a link to all members of compounds. */
QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Pola danych";
}
@@ -178,7 +178,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! This is put above each page as a link to all members of files. */
QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globalne";
}
@@ -219,7 +219,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Tutaj znajdują się struktury danych wraz z ich krótkimi opisami:";
}
@@ -238,7 +238,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
{
result+="udokumentowanych ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="pól struktur i unii";
}
@@ -249,7 +249,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
result+=" wraz z odnośnikami do ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="dokumentacji struktur/unii dla każdego pola:";
}
@@ -260,7 +260,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktur/unii, do których dane pole należy:";
}
@@ -277,7 +277,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
{
QCString result="Tutaj znajduje się lista wszystkich ";
if (!extractAll) result+="udokumentowanych ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funkcji, zmiennych, makr, wyliczeń i definicji typów";
}
@@ -339,7 +339,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
*/
QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Indeks struktur danych";
}
@@ -366,7 +366,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
*/
QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentacja struktur danych";
}
@@ -469,7 +469,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
*/
QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Struktury danych";
}
@@ -863,11 +863,11 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
QCString trGotoGraphicalHierarchy()
{
- return "Idź do graficznej hierarchi klas";
+ return "Idź do graficznej hierarchii klas";
}
QCString trGotoTextualHierarchy()
{
- return "Idź do tekstowej hierarchi klas";
+ return "Idź do tekstowej hierarchii klas";
}
QCString trPageIndex()
{
@@ -888,7 +888,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Pola danych";
}
@@ -992,7 +992,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
"class Nieudokumentowana { };\n\n"
"/*! Klasa, która jest dziedziczona publicznie */\n"
"class PublicznaBaza : public Okrojona { };\n\n"
- "/*! A template class */\n"
+ "/*! Szablon klasy */\n"
"template<class T> class Templ { };\n\n"
"/*! Klasa, która jest dziedziczona przy użyciu dziedziczenia chronionego */\n"
"class ChronionaBaza { };\n\n"
@@ -1085,7 +1085,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Struktury Danych";
}
@@ -1380,7 +1380,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
*/
virtual QCString trAll()
{
- return "All";
+ return "Wszystko";
}
/*! Put in front of the call graph for a function. */
virtual QCString trCallGraph()
@@ -1475,7 +1475,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
*/
virtual QCString trDirDescription()
{
- return "Ta struktura katalogów jest posortowana jest z grubsza, "
+ return "Ta struktura katalogów posortowana jest z grubsza, "
"choć nie całkowicie, alfabetycznie:";
}
@@ -1653,7 +1653,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
else
{
- result+="modułów do których składowe te należą:";
+ result+="modułów, do których składowe te należą:";
}
return result;
}
@@ -1731,7 +1731,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! directory relation for \a name */
virtual QCString trDirRelation(const char *name)
{
- return "Relcja "+ QCString(name);
+ return "Relacja "+ QCString(name);
}
/*! Loading message shown when loading search results */
diff --git a/src/translator_pt.h b/src/translator_pt.h
index 5df58d7..c58bf64 100644
--- a/src/translator_pt.h
+++ b/src/translator_pt.h
@@ -116,7 +116,7 @@ class TranslatorPortuguese : public Translator
/*! header that is put before the list of member attributes. */
QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentação dos campos e atributos";
}
@@ -183,7 +183,7 @@ class TranslatorPortuguese : public Translator
/*! This is put above each page as a link to the list of annotated classes */
QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estruturas de dados";
}
@@ -200,7 +200,7 @@ class TranslatorPortuguese : public Translator
/*! This is put above each page as a link to all members of compounds. */
QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campos de dados";
}
@@ -213,7 +213,7 @@ class TranslatorPortuguese : public Translator
/*! This is put above each page as a link to all members of files. */
QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globais";
}
@@ -251,7 +251,7 @@ class TranslatorPortuguese : public Translator
/*! This is an introduction to the annotated compound list. */
QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Lista das estruturas de dados com uma breve descrição:";
}
@@ -265,7 +265,7 @@ class TranslatorPortuguese : public Translator
QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Lista de todas as";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+=" estruturas e campos de uniões";
}
@@ -280,7 +280,7 @@ class TranslatorPortuguese : public Translator
result+=" com referência para ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="a respectiva documentação:";
}
@@ -291,7 +291,7 @@ class TranslatorPortuguese : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="as estruturas/uniões a que pertencem:";
}
@@ -307,7 +307,7 @@ class TranslatorPortuguese : public Translator
QCString trFileMembersDescription(bool extractAll)
{
QCString result="Lista de ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="todas as funções, variáveis, definições, enumerações e definições de tipo ";
if (!extractAll) result+="documentadas ";
@@ -361,7 +361,7 @@ class TranslatorPortuguese : public Translator
*/
QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Índice das estruturas de dados";
}
@@ -482,7 +482,7 @@ class TranslatorPortuguese : public Translator
*/
QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estruturas de Dados";
}
@@ -894,7 +894,7 @@ class TranslatorPortuguese : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Campos de Dados";
}
@@ -1082,7 +1082,7 @@ class TranslatorPortuguese : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Estruturas de dados";
}
diff --git a/src/translator_ro.h b/src/translator_ro.h
index eba7d47..661578b 100644
--- a/src/translator_ro.h
+++ b/src/translator_ro.h
@@ -104,7 +104,7 @@ class TranslatorRomanian : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentaţia Câmpurilor";
}
@@ -172,7 +172,7 @@ class TranslatorRomanian : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Structuri de Date";
}
@@ -190,7 +190,7 @@ class TranslatorRomanian : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Câmpurile de Date";
}
@@ -204,7 +204,7 @@ class TranslatorRomanian : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globale";
}
@@ -246,7 +246,7 @@ class TranslatorRomanian : public Translator
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Lista structurilor de date, cu scurte descrieri:";
}
@@ -263,7 +263,7 @@ class TranslatorRomanian : public Translator
{
QCString result="Lista tuturor ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="câmpurilor ";
if (!extractAll) result+=" documentate ";
@@ -278,7 +278,7 @@ class TranslatorRomanian : public Translator
result+=", cu legături către ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="documentaţia structurii/uniunii pentru fiecare câmp în parte:";
}
@@ -289,7 +289,7 @@ class TranslatorRomanian : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="structurile/uniunile de care aparţin:";
}
@@ -306,7 +306,7 @@ class TranslatorRomanian : public Translator
virtual QCString trFileMembersDescription(bool extractAll)
{
QCString result="Lista tuturor ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funcţiilor, variabilelor, definiţiilor, enumerărilor şi definiţiilor de tip";
if (!extractAll) result+=" documentate";
@@ -362,7 +362,7 @@ class TranslatorRomanian : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Indexul Structurilor de Date";
}
@@ -390,7 +390,7 @@ class TranslatorRomanian : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Documentaţia Structurilor de Date";
}
@@ -494,7 +494,7 @@ class TranslatorRomanian : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Structuri de Date";
}
@@ -905,7 +905,7 @@ class TranslatorRomanian : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Câmpuri de Date";
}
@@ -1097,7 +1097,7 @@ class TranslatorRomanian : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Structuri de Date";
}
diff --git a/src/translator_ru.h b/src/translator_ru.h
index 2162a34..dbc734c 100644
--- a/src/translator_ru.h
+++ b/src/translator_ru.h
@@ -68,7 +68,7 @@ class TranslatorRussian : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Поля";
}
@@ -143,7 +143,7 @@ class TranslatorRussian : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структуры данных";
}
@@ -160,7 +160,7 @@ class TranslatorRussian : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Поля структур";
}
@@ -207,7 +207,7 @@ class TranslatorRussian : public Translator
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структуры данных с их кратким описанием.";
}
@@ -222,20 +222,20 @@ class TranslatorRussian : public Translator
{
QCString result="Список всех ";
if(!extractAll) result+="документированных ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result+="членов структур данных со ссылками на ";
else
result+="членов классов со ссылками на ";
if(!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result+="документацию по структуре для каждого члена.";
else
result+="документацию по классу для каждого члена.";
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result += "структуры";
else
result += "классы";
@@ -250,7 +250,7 @@ class TranslatorRussian : public Translator
QCString result="Список всех ";
if (!extractAll) result+="документированных ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="функций, переменных, макроопределений, "
"перечислений и определений типов";
@@ -303,7 +303,7 @@ class TranslatorRussian : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Алфавитный указатель структур данных";
}
@@ -330,7 +330,7 @@ class TranslatorRussian : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структуры данных";
}
@@ -433,7 +433,7 @@ class TranslatorRussian : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структуры данных";
}
@@ -877,7 +877,7 @@ class TranslatorRussian : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Поля данных";
}
@@ -1074,7 +1074,7 @@ class TranslatorRussian : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структуры данных";
}
@@ -1149,7 +1149,7 @@ class TranslatorRussian : public Translator
*/
virtual QCString trClass(bool first_capital, bool singular)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
QCString result((first_capital ? "Структуры данных" : "структуры данных"));
return result;
diff --git a/src/translator_sc.h b/src/translator_sc.h
index 388af8c..d2b3954 100644
--- a/src/translator_sc.h
+++ b/src/translator_sc.h
@@ -103,7 +103,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Документација поља";
}
@@ -170,7 +170,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структуре";
}
@@ -187,7 +187,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Поља";
}
@@ -200,7 +200,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Глобално";
}
@@ -241,7 +241,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Овде су структуре са кратким описима:";
}
@@ -260,7 +260,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
{
result+="документованих ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="поља структура и унија";
}
@@ -271,7 +271,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
result+=" са везама ка ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="документацији структуре/уније за свако поље:";
}
@@ -282,7 +282,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="структури/унији којој припадају:";
}
@@ -300,7 +300,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
QCString result="Овде је списак свих ";
if (!extractAll) result+="документованих ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="фрункција, променљивих, макро замена, набрајања, и дефиниција типова";
}
@@ -351,7 +351,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Индекс структура";
}
@@ -378,7 +378,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Документација структуре";
}
@@ -481,7 +481,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структуре";
}
@@ -906,7 +906,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Поља";
}
@@ -1102,7 +1102,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структуре";
}
diff --git a/src/translator_si.h b/src/translator_si.h
index 97a1931..792053e 100644
--- a/src/translator_si.h
+++ b/src/translator_si.h
@@ -755,7 +755,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Podatkovne strukture";
}
diff --git a/src/translator_sk.h b/src/translator_sk.h
index d6d94a6..3a925ec 100644
--- a/src/translator_sk.h
+++ b/src/translator_sk.h
@@ -72,7 +72,7 @@ class TranslatorSlovak : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentácia k položkám";
}
@@ -141,7 +141,7 @@ class TranslatorSlovak : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dátové štruktúry";
}
@@ -158,7 +158,7 @@ class TranslatorSlovak : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dátové položky";
}
@@ -171,7 +171,7 @@ class TranslatorSlovak : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globálne symboly";
}
@@ -211,7 +211,7 @@ class TranslatorSlovak : public Translator
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Nasledujúci zoznam obsahuje identifikáciu dátových "
"štruktúr a ich stručné popisy:";
@@ -235,7 +235,7 @@ class TranslatorSlovak : public Translator
result += "dokumentovaných ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result += "položiek štruktúr (struct) a unionov (union) ";
}
@@ -248,7 +248,7 @@ class TranslatorSlovak : public Translator
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result += "dokumentáciu štruktúr/unionov, ku ktorým prislúchajú:";
}
@@ -259,7 +259,7 @@ class TranslatorSlovak : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="štruktúry/uniony, ku ktorým prislúchajú:";
}
@@ -278,7 +278,7 @@ class TranslatorSlovak : public Translator
QCString result="Tu nájdete zoznam všetkých ";
if (!extractAll) result+="dokumentovaných ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funkcií, premenných, makier, enumerácií a definícií typov (typedef) "
"s odkazmi na ";
@@ -334,7 +334,7 @@ class TranslatorSlovak : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Register dátových štruktúr";
}
@@ -455,7 +455,7 @@ class TranslatorSlovak : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dátové štruktúry";
}
@@ -877,7 +877,7 @@ class TranslatorSlovak : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dátové položky";
}
diff --git a/src/translator_sr.h b/src/translator_sr.h
index 05e8018..f5f132f 100644
--- a/src/translator_sr.h
+++ b/src/translator_sr.h
@@ -91,7 +91,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentacija polja";
}
@@ -158,7 +158,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Spisak struktura";
}
@@ -175,7 +175,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Sva polja struktura";
}
@@ -188,7 +188,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- //if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ //if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
//{
// return "Članovi datoteke"; // TODO: translate me
//}
@@ -227,7 +227,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Spisak struktura sa kratkim opisima:";
}
@@ -245,7 +245,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
{
result+="dokumentovanih ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="članova struktura/unija";
}
@@ -256,7 +256,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
result+=" sa vezama ka ";
if (extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="dokumentaciji svakog polja strukture/unije:";
}
@@ -267,7 +267,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="strukturama/unijama kojima pripadaju:";
}
@@ -285,7 +285,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
QCString result="Spisak svih ";
if (!extractAll) result+="dokumentovanih ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funkcija, promenljivih, makro zamena, nabrajanja i definicija tipa";
}
@@ -336,7 +336,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Spisak struktura/unija";
}
@@ -363,7 +363,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentacija stuktura/unija";
}
@@ -466,7 +466,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Strukture i unije";
}
@@ -874,7 +874,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Polja";
}
@@ -1069,7 +1069,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Strukture i unije";
}
diff --git a/src/translator_sv.h b/src/translator_sv.h
index d491632..88fffd9 100644
--- a/src/translator_sv.h
+++ b/src/translator_sv.h
@@ -22,6 +22,7 @@ Samuel Hägglund <sahag96@ite.mh.se>
Xet Erixon <xet@xeqt.com>
Mikael Hallin <mikaelhallin@yahoo.se> 2003-07-28
Björn Palmqvist <bjorn@aidium.se> 2014-02-01
+Magnus Österlund <magnus.osterlund@capgemini.com> 2016-09-12
==================================================================================
Uppdateringar.
1999/04/29
@@ -67,6 +68,53 @@ Problem!
Skicka gärna synpunkter.
2015/01/09
* Uppdaterat den till senaste versionen 1.8.9.1
+2015/09/12
+* Fixat lite särksirvningar och inkonsekvenser
+===================================================================================
+ Ordlista
+===================================================================================
+ ENGELSKA SVENSKA
+* Attribute Attribut
+* Category Lategori
+* Class Klass
+* Compound Sammansatt
+* Deprecated Föråldrad
+* Directory Katalog
+* Enum Enum
+* Enumeration Egenuppräknande
+* Event Händelse
+* Exception Undantag
+* Field Fält
+* Friend Vän
+* Function Funktion
+* Inherited Ärvd
+* Interface Gränssnitt
+* Macro Makro
+* Member Medlem
+* Member Data Medlemsdata
+* Member function Medlemsfunktion
+* Module Module
+* Namespace Namnrymd
+* Package Paket
+* Postcondition Postcondition
+* Precondition Precondition
+* Private Privat
+* Propertie Egenskap
+* Protected Skyddad
+* Protocol Protokoll
+* Public Publik
+* Service Tjänst
+* Signal Signal
+* Slot Slot //Ge gärna exempel på bättre översättning
+* Static Statisk
+* Struct Struktur
+* Subprogram Underprogram
+* Subroutine Subrutin
+* Template Mall
+* Typedef Typdefinition
+* Union Union
+* Variable Variabel
+===================================================================================
*/
#ifndef TRANSLATOR_SE_H
@@ -98,29 +146,38 @@ class TranslatorSwedish : public Translator
return "\\usepackage[swedish]{babel}\n";
}
+ // --- Language translation methods -------------------
+
+ /*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions()
{ return "Besläktade funktioner"; }
+ /*! subscript for the related functions. */
virtual QCString trRelatedSubscript()
{ return "(Observera att dessa inte är medlemsfunktioner)"; }
+ /*! header that is put before the detailed description of files, classes and namespaces. */
virtual QCString trDetailedDescription()
{ return "Detaljerad beskrivning"; }
+ /*! header that is put before the list of typedefs. */
virtual QCString trMemberTypedefDocumentation()
{ return "Dokumentation av typdefinierade medlemmar"; }
+ /*! header that is put before the list of enumerations. */
virtual QCString trMemberEnumerationDocumentation()
{ return "Dokumentation av egenuppräknande medlemmar"; }
+ /*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation()
{ return "Dokumentation av medlemsfunktioner"; }
+ /*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- return "Fält dokumentation";
+ return "Dokumentation av fält";
}
else
{
@@ -128,21 +185,29 @@ class TranslatorSwedish : public Translator
}
}
+ /*! this is the text of a link put after brief descriptions. */
virtual QCString trMore()
{ return "Mer..."; }
+ /*! put in the class documentation */
virtual QCString trListOfAllMembers()
{ return "Lista över alla medlemmar"; }
+ /*! used as the title of the "list of all members" page of a class */
virtual QCString trMemberList()
{ return "Medlemslista"; }
+ /*! this is the first part of a sentence that is followed by a class name */
virtual QCString trThisIsTheListOfAllMembers()
{ return "Det här är en fullständig lista över medlemmar för "; }
+ /*! this is the remainder of the sentence after the class name */
virtual QCString trIncludingInheritedMembers()
{ return " med alla ärvda medlemmar."; }
+ /*! this is put at the author sections at the bottom of man pages.
+ * parameter s is name of the project name.
+ */
virtual QCString trGeneratedAutomatically(const char *s)
{ QCString result="Automatiskt skapad av Doxygen";
if (s) result+=(QCString)" för "+s;
@@ -150,55 +215,64 @@ class TranslatorSwedish : public Translator
return result;
}
+ /*! put after an enum name in the list of all members */
virtual QCString trEnumName()
- { return "enum namn"; }
+ { return "enum-namn"; }
+ /*! put after an enum value in the list of all members */
virtual QCString trEnumValue()
- { return "enum värde"; }
+ { return "enum-värde"; }
+ /*! put after an undocumented member in the list of all members */
virtual QCString trDefinedIn()
{ return "definierad i"; }
-/*
- QCString trVerbatimText(const char *f)
- { return (QCString)"Detta är den ordagranna texten från inkluderingsfilen "+f; }
-*/
+ // quick reference sections
+
+ /*! This is put above each page as a link to the list of all groups of
+ * compounds or files (see the \\group command).
+ */
virtual QCString trModules()
{ return "Moduler"; }
+ /*! This is put above each page as a link to the class hierarchy */
virtual QCString trClassHierarchy()
{ return "Klasshierarki"; }
+ /*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datastrukturer";
}
else
{
- return "Sammansatt klasslista";
+ return "Klasslista";
}
}
+ /*! This is put above each page as a link to the list of documented files */
virtual QCString trFileList()
{ return "Fillista"; }
+ /*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- return "Data fält";
+ return "Datafält";
}
else
{
- return "Sammansatta klassmedlemmar";
+ return "Klassmedlemmar";
}
}
+ /*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globala symboler";
}
@@ -208,20 +282,25 @@ class TranslatorSwedish : public Translator
}
}
+ /*! This is put above each page as a link to all related pages. */
virtual QCString trRelatedPages()
- { return "Besläktade sidor"; }
+ { return "Relaterade sidor"; }
+ /*! This is put above each page as a link to all examples. */
virtual QCString trExamples()
{ return "Exempel"; }
+ /*! This is put above each page as a link to the search engine. */
virtual QCString trSearch()
{ return "Sök"; }
+ /*! This is an introduction to the class hierarchy. */
virtual QCString trClassHierarchyDescription()
{ return "Denna lista över arv är grovt, men inte helt, "
"sorterad i alfabetisk ordning:";
}
+ /*! This is an introduction to the list with all files. */
virtual QCString trFileListDescription(bool extractAll)
{
QCString result="Här följer en lista över alla ";
@@ -230,10 +309,11 @@ class TranslatorSwedish : public Translator
return result;
}
+ /*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Här följer datastrukturerna med korta beskrivningar:";
}
@@ -252,7 +332,7 @@ class TranslatorSwedish : public Translator
{
result+="dokumenterade ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struktur- och unions-fält";
}
@@ -263,9 +343,9 @@ class TranslatorSwedish : public Translator
result+=" med länkar till ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- result+="struktur/unions-dokumentationen för varje fält:";
+ result+="struktur/union-dokumentationen för varje fält:";
}
else
{
@@ -274,7 +354,7 @@ class TranslatorSwedish : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+=" strukturerna/unionerna de tillhör:";
}
@@ -286,12 +366,13 @@ class TranslatorSwedish : public Translator
return result;
}
+ /*! This is an introduction to the page with all file members. */
virtual QCString trFileMembersDescription(bool extractAll)
{
QCString result="Här följer en lista över alla ";
if (!extractAll) result+="dokumenterade ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funktioner, variabler, definitioner, enumerationer "
"och typdefinitioner";
@@ -302,101 +383,169 @@ class TranslatorSwedish : public Translator
}
result+= " med länkar till ";
if (extractAll)
- result+= "filerna som de tillhör:";
+ result+= "filerna de tillhör:";
else
result+= "dokumentationen:";
return result;
}
+ /*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription()
{ return "Här följer en lista med alla exempel:"; }
+ /*! This is an introduction to the page with the list of related pages */
virtual QCString trRelatedPagesDescription()
- { return "Här följer en lista över alla besläktade dokumentationssidor:";}
+ { return "Här följer en lista över alla relaterade dokumentationssidor:";}
+ /*! This is an introduction to the page with the list of class/file groups */
virtual QCString trModulesDescription()
{ return "Här följer en lista över alla moduler:"; }
+ // index titles (the project name is prepended for these)
+
+ /*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation()
{ return "Dokumentation"; }
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all groups.
+ */
virtual QCString trModuleIndex()
{ return "Modulindex"; }
+ /*! This is used in LaTeX as the title of the chapter with the
+ * class hierarchy.
+ */
virtual QCString trHierarchicalIndex()
- { return "Hierarkiskt Index"; }
+ { return "Hierarkiskt index"; }
/*! This is used in LaTeX as the title of the chapter with the
* annotated compound index.
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
return "Index över datastrukturer";
- } else {
- return "Index över sammensatta typer";
+ }
+ else
+ {
+ return "Klassindex";
}
}
+ /*! This is used in LaTeX as the title of the chapter with the
+ * list of all files.
+ */
virtual QCString trFileIndex()
{ return "Filindex"; }
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all groups.
+ */
virtual QCString trModuleDocumentation()
- { return "Dokumentation över moduler"; }
+ { return "Moduldokumentation"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions.
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Dokumentation över datastrukturer";
}
else
{
- return "Documentation över klasser";
+ return "Klassdokumentation";
}
}
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all files.
+ */
virtual QCString trFileDocumentation()
- { return "Dokumentation över filer"; }
+ { return "Fildokumentation"; }
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all examples.
+ */
virtual QCString trExampleDocumentation()
- { return "Dokumentation över exempel"; }
+ { return "Exempeldokumentation"; }
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all related pages.
+ */
virtual QCString trPageDocumentation()
- { return "Dokumentation av sidor"; }
+ { return "Sid-dokumentation"; }
+ /*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Referensmanual"; }
+ /*! This is used in the documentation of a file as a header before the
+ * list of defines
+ */
virtual QCString trDefines()
- { return "Definitioner"; }
+ { return "Makron"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of typedefs
+ */
virtual QCString trTypedefs()
{ return "Typdefinitioner"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of enumerations
+ */
virtual QCString trEnumerations()
{ return "Egenuppräknande typer"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) functions
+ */
virtual QCString trFunctions()
{ return "Funktioner"; }
+
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) variables
+ */
virtual QCString trVariables()
{ return "Variabler"; }
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) variables
+ */
virtual QCString trEnumerationValues()
{ return "Egenuppräknade typers värden"; }
+ /*! This is used in the documentation of a file before the list of
+ * documentation blocks for defines
+ */
virtual QCString trDefineDocumentation()
- { return "Dokumentation över definitioner"; }
+ { return "Dokumentation över makrodefinitioner"; }
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for typedefs
+ */
virtual QCString trTypedefDocumentation()
{ return "Dokumentation över typdefinitioner"; }
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration types
+ */
virtual QCString trEnumerationTypeDocumentation()
{ return "Dokumentation över egenuppräknande typer"; ; }
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for functions
+ */
virtual QCString trFunctionDocumentation()
{ return "Dokumentation över funktioner"; }
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for variables
+ */
virtual QCString trVariableDocumentation()
{ return "Dokumentation över variabler"; }
@@ -405,16 +554,19 @@ class TranslatorSwedish : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datastrukturer";
}
else
{
- return "Sammansättning";
+ return "Klasser";
}
}
+ /*! This is used in the standard footer of each page and indicates when
+ * the page was generated
+ */
virtual QCString trGeneratedAt(const char *date,const char *projName)
{
QCString result=(QCString)"Skapad "+date;
@@ -423,43 +575,57 @@ class TranslatorSwedish : public Translator
return result;
}
+ /*! this text is put before a class diagram */
virtual QCString trClassDiagram(const char *clName)
{
return (QCString)"Klassdiagram för "+clName;
}
+ /*! this text is generated when the \\internal command is used. */
virtual QCString trForInternalUseOnly()
{ return "Endast för internt bruk."; }
+ /*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Varning"; }
+ /*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return "Version"; }
+ /*! this text is generated when the \\date command is used. */
virtual QCString trDate()
{ return "Datum"; }
+ /*! this text is generated when the \\return command is used. */
virtual QCString trReturns()
{ return "Returnerar"; }
+ /*! this text is generated when the \\sa command is used. */
virtual QCString trSeeAlso()
{ return "Se även"; }
+ /*! this text is generated when the \\param command is used. */
virtual QCString trParameters()
{ return "Parametrar"; }
+ /*! this text is generated when the \\exception command is used. */
virtual QCString trExceptions()
{ return "Undantag"; }
+ /*! this text is used in the title page of a LaTeX document. */
virtual QCString trGeneratedBy()
{ return "Skapad av"; }
+//////////////////////////////////////////////////////////////////////////
// new since 0.49-990307
+//////////////////////////////////////////////////////////////////////////
+ /*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList()
{ return "Namnrymdslista"; }
+ /*! used as an introduction to the namespace list */
virtual QCString trNamespaceListDescription(bool extractAll)
{
QCString result="Här är en lista över alla ";
@@ -468,6 +634,9 @@ class TranslatorSwedish : public Translator
return result;
}
+ /*! used in the class documentation as a header before the list of all
+ * friends of a class
+ */
virtual QCString trFriends()
{ return "Vänner"; }
@@ -476,17 +645,18 @@ class TranslatorSwedish : public Translator
//////////////////////////////////////////////////////////////////////////
virtual QCString trRelatedFunctionDocumentation()
- { return "Vänners och besläktade funktioners dokumentation"; }
+ { return "Dokumenation av vänners och relaterade funktioner"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
+ /*! used as the title of the HTML page of a class/struct/union */
virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
- QCString result=(QCString)clName+" ";
+ QCString result=(QCString)clName;
switch(compType)
{
case ClassDef::Class: result+=" klass"; break;
@@ -498,11 +668,12 @@ class TranslatorSwedish : public Translator
case ClassDef::Exception: result+=" undantag"; break;
default: break;
}
- if (isTemplate) result+="template";
- result+="referens";
+ if (isTemplate) result+="-mall";
+ result+=" referens";
return result;
}
+ /*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const char *fileName)
{
QCString result=fileName;
@@ -510,6 +681,7 @@ class TranslatorSwedish : public Translator
return result;
}
+ /*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const char *namespaceName)
{
QCString result=namespaceName;
@@ -518,27 +690,29 @@ class TranslatorSwedish : public Translator
}
virtual QCString trPublicMembers()
- { return "Publika medlemmar"; }
+ { return "Publika medlemsfunktioner"; }
virtual QCString trPublicSlots()
{ return "Publika slots"; }
virtual QCString trSignals()
{ return "Signaler"; }
virtual QCString trStaticPublicMembers()
- { return "Statiska publika medlemmar"; }
+ { return "Statiska publika medlemmsfunktioner"; }
virtual QCString trProtectedMembers()
- { return "Skyddade medlemmar"; }
+ { return "Skyddade medlemmsfunktioner"; }
virtual QCString trProtectedSlots()
{ return "Skyddade slots"; }
virtual QCString trStaticProtectedMembers()
- { return "Statiska skyddade medlemmar"; }
+ { return "Statiska skyddade medlemmsfunktioner"; }
virtual QCString trPrivateMembers()
- { return "Privata medlemmar"; }
+ { return "Privata medlemmsfunktioner"; }
virtual QCString trPrivateSlots()
{ return "Privata slots"; }
virtual QCString trStaticPrivateMembers()
- { return "Statiska privata medlemmar"; }
- // end of member sections
+ { return "Statiska privata medlemmsfunktioner"; }
+ /*! this function is used to produce a comma-separated list of items.
+ * use generateMarker(i) to indicate where item i should be put.
+ */
virtual QCString trWriteList(int numEntries)
{
// this function is used to produce a comma-separated list of items.
@@ -563,24 +737,39 @@ class TranslatorSwedish : public Translator
return result;
}
+ /*! used in class documentation to produce a list of base classes,
+ * if class diagrams are disabled.
+ */
virtual QCString trInheritsList(int numEntries)
// used in class documentation to produce a list of base classes,
// if class diagrams are disabled.
{
return "Ärver "+trWriteList(numEntries)+".";
}
+
+ /*! used in class documentation to produce a list of super classes,
+ * if class diagrams are disabled.
+ */
virtual QCString trInheritedByList(int numEntries)
// used in class documentation to produce a list of super classes,
// if class diagrams are disabled.
{
return "Ärvd av "+trWriteList(numEntries)+".";
}
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are hidden by this one.
+ */
virtual QCString trReimplementedFromList(int numEntries)
// used in member documentation blocks to produce a list of
// members that are hidden by this one.
{
return "Återskapad från "+trWriteList(numEntries)+".";
}
+
+ /*! used in member documentation blocks to produce a list of
+ * all member that overwrite the implementation of this member.
+ */
virtual QCString trReimplementedInList(int numEntries)
{
// used in member documentation blocks to produce a list of
@@ -588,8 +777,11 @@ class TranslatorSwedish : public Translator
return "Återskapad i "+trWriteList(numEntries)+".";
}
+ /*! This is put above each page as a link to all members of namespaces. */
virtual QCString trNamespaceMembers()
{ return "Namnrymdsmedlemmar"; }
+
+ /*! This is an introduction to the page with all namespace members */
virtual QCString trNamespaceMemberDescription(bool extractAll)
{
QCString result="Här är en lista över alla ";
@@ -601,13 +793,19 @@ class TranslatorSwedish : public Translator
result+="de namnrymder de tillhör:";
return result;
}
-
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all namespaces.
+ */
virtual QCString trNamespaceIndex()
{ return "Namnrymdsindex"; }
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all namespaces.
+ */
virtual QCString trNamespaceDocumentation()
{ return "Namnrymd-dokumentation"; }
- //////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////
// new since 0.49-990522
//////////////////////////////////////////////////////////////////////////
@@ -631,16 +829,16 @@ class TranslatorSwedish : public Translator
QCString result=(QCString)"Dokumentationen för ";
switch(compType)
{
- case ClassDef::Class: result+="denna klass "; break;
- case ClassDef::Struct: result+="denna strukt "; break;
- case ClassDef::Union: result+="denna union "; break;
- case ClassDef::Interface: result+="detta gränssnitt "; break;
+ case ClassDef::Class: result+="denna klass"; break;
+ case ClassDef::Struct: result+="denna strukt"; break;
+ case ClassDef::Union: result+="denna union"; break;
+ case ClassDef::Interface: result+="detta gränssnitt"; break;
case ClassDef::Protocol: result+="detta protokoll"; break;
case ClassDef::Category: result+="denna kategori"; break;
- case ClassDef::Exception: result+="detta undantag "; break;
+ case ClassDef::Exception: result+="detta undantag"; break;
default: break;
}
- result+="var genererad från följande fil";
+ result+=" var genererad från följande fil";
if (single) result+=":"; else result+="er:";
return result;
}
@@ -695,49 +893,41 @@ class TranslatorSwedish : public Translator
{
return (QCString)"Samarbetsdiagram för "+clName+":";
}
-
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const char *fName)
{
return (QCString)"Include-beroendediagram för "+fName+":";
}
-
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
{
return "Dokumentation av konstruktorer och destruktorer";
}
-
/*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode()
{
return "Gå till denna fils källkod.";
}
-
/*! Used in the file sources to point to the corresponding documentation. */
virtual QCString trGotoDocumentation()
{
return "Gå till denna fils dokumentation.";
}
-
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
- return "Förhandsvillkor";
+ return "Precondition";
}
-
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
- return "Resultat"; //"Postcondition";
+ return "Postcondition";
}
-
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariant";
}
-
/*! Text shown before a multi-line variable/enum initialization */
virtual QCString trInitialValue()
{
@@ -748,7 +938,6 @@ class TranslatorSwedish : public Translator
{
return "källkod";
}
-
virtual QCString trGraphicalHierarchy()
{
return "Grafisk klasshierarki";
@@ -780,7 +969,7 @@ class TranslatorSwedish : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datafält";
}
@@ -830,7 +1019,7 @@ class TranslatorSwedish : public Translator
/*! Used as the header of the todo list */
virtual QCString trTodoList()
{
- return "Att-göra lista";
+ return "Att göra-lista";
}
//////////////////////////////////////////////////////////////////////////
@@ -852,7 +1041,7 @@ class TranslatorSwedish : public Translator
virtual QCString trInclByDepGraph()
{
return "Den här grafen visar vilka filer som direkt eller "
- "indirekt inkluderar denna filen.";
+ "indirekt inkluderar denna filen:";
}
virtual QCString trSince()
{
@@ -868,7 +1057,6 @@ class TranslatorSwedish : public Translator
{
return "Grafförklaring";
}
-
/*! page explaining how the dot graph's should be interpreted
* The %A in the text below are to prevent link to classes called "A".
*/
@@ -877,25 +1065,25 @@ class TranslatorSwedish : public Translator
return
"Den här sidan förklarar hur man ska tolka de grafer som doxygen "
"genererar.<p>\n"
- "Tag följande exempel:\n"
+ "Överväg följande exempel:\n"
"\\code\n"
- "/*! Osynlig klass på grund av trunkering */\n"
+ "/*! Osynlig klass på grund av trunkering */\n"
"class Invisible { };\n\n"
- "/*! Trunkerad klass, ärvningsrelationen är dold */\n"
+ "/*! Trunkerad klass, ärvningsrelationen är dold */\n"
"class Truncated : public Invisible { };\n\n"
- "/* Klass utan doxygen-kommentarer */\n"
+ "/* Klass utan doxygen-kommentarer */\n"
"class Undocumented { };\n\n"
- "/*! Klass som ärvs med publikt arv */\n"
+ "/*! Klass som ärvs med publikt arv */\n"
"class PublicBase : public Truncated { };\n\n"
"/*! En template-klass */\n"
"template<class T> class Templ { };\n\n"
- "/*! Klass som ärvs med skyddat arv */\n"
+ "/*! Klass som ärvs med skyddat arv */\n"
"class ProtectedBase { };\n\n"
- "/*! Klass som ärvs med privat arv */\n"
+ "/*! Klass som ärvs med privat arv */\n"
"class PrivateBase { };\n\n"
- "/*! Klass som används av Inherited klassen */\n"
+ "/*! Klass som används av den ärvda klassen */\n"
"class Used { };\n\n"
- "/*! Super klassen som ärver ett antal andra klasser */\n"
+ "/*! Super-klass som ärver ett antal andra klasser */\n"
"class Inherited : public PublicBase,\n"
" protected ProtectedBase,\n"
" private PrivateBase,\n"
@@ -906,36 +1094,36 @@ class TranslatorSwedish : public Translator
" Used *m_usedClass;\n"
"};\n"
"\\endcode\n"
- "Detta resulterar i att följande graf genereras:"
+ "Detta resulterar i att följande graf genereras:"
"<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n"
"<p>\n"
- "Rektanglarna i den ovanstående grafen har följande betydelser:\n"
+ "Rektanglarna i den ovanstående grafen har följande betydelser:\n"
+ "</p>\n"
"<ul>\n"
- "<li>%En fylld grå rektangel representerar den strukt eller klass "
- "som har genererat grafen.</li>\n"
- "<li>%En rektangel med svart kant symboliserar en dokumenterad strukt eller klass.</li>\n"
- "<li>%En rektangel med grå kant symboliserar en odokumenterad strukt eller klass.</li>\n"
- "<li>%En klass med röd kant symboliserar en strukt eller klass där "
- "alla dess relationer inte visas. %En graf trunkeras om den inte får "
- "plats inom de givna gränserna.</li>\n"
+ "<li>%En fylld grå rektangel representerar den strukt eller klass "
+ "som har genererat grafen.</li>\n"
+ "<li>%En rektangel med svart kant symboliserar en dokumenterad strukt eller klass.</li>\n"
+ "<li>%En rektangel med grå kant symboliserar en odokumenterad strukt eller klass.</li>\n"
+ "<li>%En klass med röd kant symboliserar en strukt eller klass där "
+ "alla dess relationer inte visas. %En graf trunkeras om den inte får "
+ "plats inom de givna gränserna.</li>\n"
"</ul>\n"
"<p>\n"
- "Pilarna har följande betydelser:\n"
+ "Pilarna har följande betydelser:\n"
"</p>\n"
"<ul>\n"
- "<li>%En mörkblå pil används för att visualisera en publik arvrelation "
- "mellan två klasser.</li>\n"
- "<li>%En mörkgrön pil används för en skyddad arvsrelation.</li>\n"
- "<li>%En mörkröd pil används för en privat arvsrelation.\n</li>"
- "<li>%En sträckad lila pil används om en klass är innesluten eller "
- "använd av en annan klass. Vid pilen står namnet på den eller de "
- "variabler som klassen pilen pekar på kommer åt.</li>\n"
- "<li>%En sträckad gul pil symboliserar förhållandet mellan en "
- "template-instans och template-klassen, som den instantierades från.\n"
- "Vid pilen står instansens template-parametrar.</li>\n"
+ "<li>%En mörkblå pil används för att visualisera en publik arvrelation "
+ "mellan två klasser.</li>\n"
+ "<li>%En mörkgrön pil används för en skyddad arvsrelation.</li>\n"
+ "<li>%En mörkröd pil används för en privat arvsrelation.\n</li>"
+ "<li>%En sträckad lila pil används om en klass är innesluten eller "
+ "använd av en annan klass. Vid pilen står namnet på den eller de "
+ "variabler som klassen pilen pekar på kommer åt.</li>\n"
+ "<li>%En sträckad gul pil symboliserar förhållandet mellan en "
+ "template-instans och template-klassen, som den instantierades från.\n"
+ "Vid pilen står instansens template-parametrar.</li>\n"
"</ul>\n";
}
-
/*! text for the link to the legend page */
virtual QCString trLegend()
{
@@ -979,7 +1167,7 @@ class TranslatorSwedish : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Datastrukturer";
}
@@ -1035,8 +1223,10 @@ class TranslatorSwedish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! Used as ansicpg for RTF file
- * (used table extract:)
- * <pre>
+ *
+ * The following table shows the correlation of Charset name, Charset Value and
+ * <pre>
+ * Codepage number:
* Charset Name Charset Value(hex) Codepage number
* ------------------------------------------------------
* ANSI_CHARSET 0 (x00) 1252
@@ -1047,7 +1237,10 @@ class TranslatorSwedish : public Translator
return "1252";
}
- /*! Used as ansicpg for RTF fcharset */
+
+ /*! Used as ansicpg for RTF fcharset
+ * \see trRTFansicp() for a table of possible values.
+ */
virtual QCString trRTFCharSet()
{
return "0";
@@ -1098,7 +1291,7 @@ class TranslatorSwedish : public Translator
*/
virtual QCString trGroup(bool first_capital, bool singular)
{
- QCString result((first_capital ? "Grupp" : "grupp"));
+ QCString result((first_capital ? "Modul" : "modul"));
if (!singular) result+="er";
return result;
}
@@ -1220,7 +1413,7 @@ class TranslatorSwedish : public Translator
/*! Header used for the documentation section of a class' events. */
virtual QCString trEventDocumentation()
{
- return "Händelse Dokumentation";
+ return "Händelsedokumentation";
}
//////////////////////////////////////////////////////////////////////////
@@ -1231,35 +1424,35 @@ class TranslatorSwedish : public Translator
*/
virtual QCString trPackageTypes()
{
- return "Paket typer";
+ return "Pakettyper";
}
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
virtual QCString trPackageMembers()
{
- return "Paket funktioner";
+ return "Paketfunktioner";
}
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
virtual QCString trStaticPackageMembers()
{
- return "Statiska paket funktioner";
+ return "Statiska paketfunktioner";
}
/*! Used as a heading for a list of Java class variables with package
* scope.
*/
virtual QCString trPackageAttribs()
{
- return "Paket attribut";
+ return "Paketattribut";
}
/*! Used as a heading for a list of static Java class variables with
* package scope.
*/
virtual QCString trStaticPackageAttribs()
{
- return "Statiska paket attribut";
+ return "Statiska paketattribut";
}
//////////////////////////////////////////////////////////////////////////
@@ -1276,7 +1469,7 @@ class TranslatorSwedish : public Translator
/*! Put in front of the call graph for a function. */
virtual QCString trCallGraph()
{
- return "Här är anropnings diagrammet för den här funktionen:";
+ return "Här är anropsdiagrammet för den här funktionen:";
}
//////////////////////////////////////////////////////////////////////////
@@ -1350,7 +1543,7 @@ class TranslatorSwedish : public Translator
{ return "Katalogdokumentation"; }
/*! This is used as the title of the directory index and also in the
- * Quick links of a HTML page, to link to the directory hierarchy.
+ * Quick links of an HTML page, to link to the directory hierarchy.
*/
virtual QCString trDirectories()
{ return "Kataloger"; }
@@ -1370,7 +1563,7 @@ class TranslatorSwedish : public Translator
{ QCString result=dirName; result+=" Katalogreferens"; return result; }
/*! This returns the word directory with or without starting capital
- * (\a first_capital) and in sigular or plural form (\a singular).
+ * (\a first_capital) and in singular or plural form (\a singular).
*/
virtual QCString trDir(bool first_capital, bool singular)
{
@@ -1401,16 +1594,14 @@ class TranslatorSwedish : public Translator
/*! This is used to introduce a caller (or called-by) graph */
virtual QCString trCallerGraph()
{
- return "Här är katalog-grafen för denna funktion:";
+ return "Här är anropsgrafen för denna funktion:";
}
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
- {
- return "Uppräknings-dokumentation";
- }
+ { return "Uppräknings-dokumentation"; }
//////////////////////////////////////////////////////////////////////////
// new since 1.5.4 (mainly for Fortran)
@@ -1418,7 +1609,7 @@ class TranslatorSwedish : public Translator
/*! header that is put before the list of member subprograms (Fortran). */
virtual QCString trMemberFunctionDocumentationFortran()
- { return "Memlems-function/Subroutins Dokumentation"; }
+ { return "Dokumentation för memlemsfunktion/subrutin"; }
/*! This is put above each page as a link to the list of annotated data types (Fortran). */
virtual QCString trCompoundListFortran()
@@ -1426,7 +1617,7 @@ class TranslatorSwedish : public Translator
/*! This is put above each page as a link to all members of compounds (Fortran). */
virtual QCString trCompoundMembersFortran()
- { return "Data fält"; }
+ { return "Datafält"; }
/*! This is an introduction to the annotated compound list (Fortran). */
virtual QCString trCompoundListDescriptionFortran()
@@ -1435,16 +1626,16 @@ class TranslatorSwedish : public Translator
/*! This is an introduction to the page with all data types (Fortran). */
virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
{
- QCString result="Här är en lista av alla ";
+ QCString result="Här är en lista över alla ";
if (!extractAll)
{
result+="dokumenterade ";
}
- result+="datatyps medlemmar";
+ result+="datatypsmedlemmar";
result+=" med länkar till ";
if (!extractAll)
{
- result+="datastrukturs documentation för varje medlem";
+ result+="dokumentation för varje medlem";
}
else
{
@@ -1457,25 +1648,25 @@ class TranslatorSwedish : public Translator
* annotated compound index (Fortran).
*/
virtual QCString trCompoundIndexFortran()
- { return "Datatyps Index"; }
+ { return "Datatypsindex"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all data types (Fortran).
*/
virtual QCString trTypeDocumentation()
- { return "Dataryps Dokumentation"; }
+ { return "Datatypsdokumentation"; }
/*! This is used in the documentation of a file as a header before the
* list of (global) subprograms (Fortran).
*/
virtual QCString trSubprograms()
- { return "Funktions/Subroutins"; }
+ { return "Funktioner/subrutiner"; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for subprograms (Fortran)
*/
virtual QCString trSubprogramDocumentation()
- { return "Funktion/Subroutin Dokumentation"; }
+ { return "Dokumentation för funktion/subrutin"; }
/*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds (Fortran)
@@ -1490,7 +1681,7 @@ class TranslatorSwedish : public Translator
/*! used as an introduction to the modules list (Fortran) */
virtual QCString trModulesListDescription(bool extractAll)
{
- QCString result="Här är en lista på alla ";
+ QCString result="Här är en lista över alla ";
if (!extractAll) result+="dokumenterade ";
result+="moduler med en kort beskrivning:";
return result;
@@ -1513,31 +1704,31 @@ class TranslatorSwedish : public Translator
case ClassDef::Exception: result+=" Undantag"; break;
default: break;
}
- if (isTemplate) result+=" Mall";
- result+=" Referens";
+ if (isTemplate) result+="-mall";
+ result+=" referens";
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
virtual QCString trModuleReference(const char *namespaceName)
{
QCString result=namespaceName;
- result+=" Modul Referens";
+ result+=" Modulreferens";
return result;
}
/*! This is put above each page as a link to all members of modules. (Fortran) */
virtual QCString trModulesMembers()
- { return "Modul Medlemmar"; }
+ { return "Modulmedlemmar"; }
/*! This is an introduction to the page with all modules members (Fortran) */
virtual QCString trModulesMemberDescription(bool extractAll)
{
- QCString result="Här är en lista på alla ";
+ QCString result="Här är en lista över alla ";
if (!extractAll) result+="documented ";
- result+="modul medlemmar med länkar till ";
+ result+="modulmedlemmar med länkar till ";
if (extractAll)
{
- result+="modul dokumentationen för varje medlem:";
+ result+="moduldokumentationen för varje medlem:";
}
else
{
@@ -1550,7 +1741,7 @@ class TranslatorSwedish : public Translator
* index of all modules (Fortran).
*/
virtual QCString trModulesIndex()
- { return "Modul Index"; }
+ { return "Modulindex"; }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
@@ -1558,8 +1749,11 @@ class TranslatorSwedish : public Translator
*/
virtual QCString trModule(bool first_capital, bool singular)
{
- return createNoun(first_capital, singular, "modul", "er");
+ QCString result((first_capital ? "Modul" : "modul"));
+ if (!singular) result+="er";
+ return result;
}
+
/*! This is put at the bottom of a module documentation page and is
* followed by a list of files that were used to generate the page.
*/
@@ -1567,37 +1761,41 @@ class TranslatorSwedish : public Translator
bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Dokumentationen för denna ";
+ QCString result=(QCString)"Dokumentationen för ";
switch(compType)
{
- case ClassDef::Class: result+="modul"; break;
- case ClassDef::Struct: result+="typ"; break;
- case ClassDef::Union: result+="union"; break;
- case ClassDef::Interface: result+="gränssnitt"; break;
- case ClassDef::Protocol: result+="protokoll"; break;
- case ClassDef::Category: result+="kategori"; break;
- case ClassDef::Exception: result+="undantag"; break;
+ case ClassDef::Class: result+="denna modul"; break;
+ case ClassDef::Struct: result+="denna typ"; break;
+ case ClassDef::Union: result+="denna union"; break;
+ case ClassDef::Interface: result+="detta gränssnitt"; break;
+ case ClassDef::Protocol: result+="detta protokoll"; break;
+ case ClassDef::Category: result+="denna kategori"; break;
+ case ClassDef::Exception: result+="detta undantag"; break;
default: break;
}
result+=" genererades från följade fil";
if (single) result+=":"; else result+="er:";
return result;
}
+
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trType(bool first_capital, bool singular)
{
- return createNoun(first_capital, singular, "typ", "er");
+ QCString result((first_capital ? "Typ" : "typ"));
+ if (!singular) result+="er";
+ return result;
}
+
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trSubprogram(bool first_capital, bool /*singular*/)
{
- QCString result((first_capital ? "Subprogram" : "subprogram"));
+ QCString result((first_capital ? "Underprogram" : "underprogram"));
return result;
}
@@ -1606,7 +1804,7 @@ class TranslatorSwedish : public Translator
{
return "Typbegränsningar";
}
-
+
//////////////////////////////////////////////////////////////////////////
// new since 1.6.0 (mainly for the new search engine)
//////////////////////////////////////////////////////////////////////////
@@ -1626,7 +1824,7 @@ class TranslatorSwedish : public Translator
/*! Label used for search results in the global namespace */
virtual QCString trGlobalNamespace()
{
- return "Globalnamnrymd";
+ return "Global namnrymd";
}
/*! Message shown while searching */
@@ -1678,7 +1876,7 @@ class TranslatorSwedish : public Translator
bool includeTime)
{
static const char *days[] = { "Mån","Tis","Ons","Tor","Fre","Lör","Sön" };
- static const char *months[] = { "Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Oct","Nov","Dec" };
+ static const char *months[] = { "Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec" };
QCString sdate;
sdate.sprintf("%s %d %s %d",days[dayOfWeek-1],day,months[month-1],year);
if (includeTime)
@@ -1716,7 +1914,7 @@ class TranslatorSwedish : public Translator
/*! Section header for list of template parameters */
virtual QCString trTemplateParameters()
- { return "Mall Parametrar"; }
+ { return "Mall-parametrar"; }
/*! Used in dot graph when UML_LOOK is enabled and there are many fields */
virtual QCString trAndMore(const QCString &number)
@@ -1732,7 +1930,7 @@ class TranslatorSwedish : public Translator
/*! Header of a Java enum page (Java enums are represented as classes). */
virtual QCString trEnumReference(const char *name)
- { return QCString(name)+" Enum Referens"; }
+ { return QCString(name)+" Enum-referens"; }
/*! Used for a section containing inherited members */
virtual QCString trInheritedFrom(const char *members,const char *what)
@@ -1742,7 +1940,7 @@ class TranslatorSwedish : public Translator
* base class(es)
*/
virtual QCString trAdditionalInheritedMembers()
- { return "Ytterliga Ärvda Medlemmar"; }
+ { return "Ytterliga ärvda medlemmar"; }
//////////////////////////////////////////////////////////////////////////
// new since 1.8.2
@@ -1755,7 +1953,7 @@ class TranslatorSwedish : public Translator
virtual QCString trPanelSynchronisationTooltip(bool enable)
{
QCString opt = enable ? "aktivera" : "inaktivera";
- return "klicka för att "+opt+" panel synkronisering";
+ return "klicka för att "+opt+" panelsynkronisering";
}
/*! Used in a method of an Objective-C class that is declared in a
@@ -1813,21 +2011,21 @@ class TranslatorSwedish : public Translator
/** old style UNO IDL services: implemented interfaces */
virtual QCString trInterfaces()
- { return "Exporterade Interface"; }
+ { return "Exporterade interface"; }
/** old style UNO IDL services: inherited services */
virtual QCString trServices()
- { return "Inkuderade Tjänster"; }
+ { return "Inkuderade tjänster"; }
/** UNO IDL constant groups */
virtual QCString trConstantGroups()
- { return "Konstant Grupper"; }
+ { return "Konstantgrupper"; }
/** UNO IDL constant groups */
virtual QCString trConstantGroupReference(const char *namespaceName)
{
QCString result=namespaceName;
- result+=" Konstant Grupp Referens";
+ result+=" Referens till konstantgrupp";
return result;
}
/** UNO IDL service page title */
@@ -1841,7 +2039,7 @@ class TranslatorSwedish : public Translator
virtual QCString trSingletonReference(const char *sName)
{
QCString result=(QCString)sName;
- result+=" Singleton Referens";
+ result+=" Singleton-referens";
return result;
}
/** UNO IDL service page */
@@ -1863,20 +2061,6 @@ class TranslatorSwedish : public Translator
return result;
}
-/*---------- For internal use: ----------------------------------------*/
- protected:
- /*! For easy flexible-noun implementation.
- * \internal
- */
- QCString createNoun(bool first_capital, bool singular,
- const char* base, const char* plurSuffix)
- {
- QCString result(base);
- if (first_capital) result.at(0) = toupper(result.at(0));
- if (!singular) result+=plurSuffix;
- return result;
- }
-
};
diff --git a/src/translator_tr.h b/src/translator_tr.h
index 26ae08f..d18f800 100644
--- a/src/translator_tr.h
+++ b/src/translator_tr.h
@@ -103,7 +103,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Alan Dokümantasyonu";
}
@@ -170,7 +170,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Veri Yapıları";
}
@@ -187,7 +187,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Veri Alanları";
}
@@ -200,7 +200,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globaller";
}
@@ -241,7 +241,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Kısa tanımlarıyla birlikte veri yapıları:";
}
@@ -260,7 +260,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
{
result+="dokümante edilmiş ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="yapı(struct) ve birleşim(union) yapılarını içerir";
}
@@ -271,7 +271,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
result+=" ve ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="her alanı yapı(struct)/birleşim(union) dokümantasyonuna bağlar:";
}
@@ -282,7 +282,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="ait olduğu yapı(struct)/birleşime(union) bağlar:";
}
@@ -300,7 +300,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
QCString result="Bu liste tüm ";
if (!extractAll) result+="dokümante edilmiş ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="fonksiyonları, değişkenleri, makroları, enümerasyonları ve typedef\'leri içerir";
}
@@ -351,7 +351,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Veri Yapıları İndeksi";
}
@@ -378,7 +378,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Veri Yapıları Dokümantasyonu";
}
@@ -481,7 +481,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Veri Yapıları";
}
@@ -890,7 +890,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Veri Alanları";
}
@@ -1085,7 +1085,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Veri Yapıları";
}
diff --git a/src/translator_tw.h b/src/translator_tw.h
index 79bf6f5..26a6db6 100644
--- a/src/translator_tw.h
+++ b/src/translator_tw.h
@@ -104,7 +104,7 @@ class TranslatorChinesetraditional : public Translator
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "欄位說明文件";
}
@@ -171,7 +171,7 @@ class TranslatorChinesetraditional : public Translator
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "資料結構";
}
@@ -188,7 +188,7 @@ class TranslatorChinesetraditional : public Translator
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "資料欄位";
}
@@ -201,7 +201,7 @@ class TranslatorChinesetraditional : public Translator
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "全域資料";
}
@@ -241,7 +241,7 @@ class TranslatorChinesetraditional : public Translator
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "這是附帶簡略說明的資料結構:";
}
@@ -260,7 +260,7 @@ class TranslatorChinesetraditional : public Translator
{
result+="文件化過";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="結構及聯合型態欄位";
}
@@ -271,7 +271,7 @@ class TranslatorChinesetraditional : public Translator
result+=", 並且帶有連結至";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="每個欄位的結構/聯合型態說明文件:";
}
@@ -282,7 +282,7 @@ class TranslatorChinesetraditional : public Translator
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="這些結構/聯合型態所屬:";
}
@@ -300,7 +300,7 @@ class TranslatorChinesetraditional : public Translator
QCString result="這是全部";
if (!extractAll) result+="文件化的";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="函式,變數,定義,列舉,及型態定義";
}
@@ -352,7 +352,7 @@ class TranslatorChinesetraditional : public Translator
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "資料結構索引";
}
@@ -379,7 +379,7 @@ class TranslatorChinesetraditional : public Translator
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "資料結構說明文件";
}
@@ -488,7 +488,7 @@ class TranslatorChinesetraditional : public Translator
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "資料結構";
}
@@ -895,7 +895,7 @@ class TranslatorChinesetraditional : public Translator
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "資料欄位";
}
@@ -1091,7 +1091,7 @@ class TranslatorChinesetraditional : public Translator
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "資料結構";
}
diff --git a/src/translator_ua.h b/src/translator_ua.h
index 964285b..eac14aa 100644
--- a/src/translator_ua.h
+++ b/src/translator_ua.h
@@ -61,7 +61,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Поля" ;
}
@@ -136,7 +136,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структури даних" ;
}
@@ -153,7 +153,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Поля структур" ;
}
@@ -200,7 +200,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структури даних з коротким описом." ;
}
@@ -215,20 +215,20 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
{
QCString result="Список всіх ";
if(!extractAll) result+="документоаних ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result+="елементів структур даних з посиланням на ";
else
result+="елементів класів даних з посиланням на ";
if(extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result+="документацію по структурі/об'єднанню кожного елементу.";
else
result+="документацію по класу кожного елементу.";
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
result += "відповідні структури";
else
result += "відповідні класи";
@@ -243,7 +243,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
QCString result="Список всіх ";
if (!extractAll) result+="документованих ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="функцій, змінних, макровизначень, "
"переліків і визначень типів";
@@ -295,7 +295,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Алфавітний покажчик структур даних" ;
}
@@ -322,7 +322,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структури даних" ;
}
@@ -425,7 +425,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структури даних" ;
}
@@ -867,7 +867,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Поля даних" ;
}
@@ -1060,7 +1060,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Структури даних" ;
}
@@ -1135,7 +1135,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
*/
virtual QCString trClass(bool first_capital, bool singular)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
QCString result((first_capital ? "Структури даних" : "структури даних"));
return result;
diff --git a/src/translator_vi.h b/src/translator_vi.h
index b2bbdd7..a0046b0 100644
--- a/src/translator_vi.h
+++ b/src/translator_vi.h
@@ -110,7 +110,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Thông tin về trường";
}
@@ -177,7 +177,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Cấu trúc cơ sở dữ liệu (Data Structures)";
}
@@ -194,7 +194,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Các trường dữ liệu";
}
@@ -207,7 +207,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Toàn cục";
}
@@ -248,7 +248,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Đây là cấu trúc cơ sở dữ liệu với mô tả tóm tắt:";
}
@@ -267,7 +267,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
{
result+="(đã được mô tả) ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struct và union fields";
}
@@ -278,7 +278,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
result+=" cùng với các các liên kết đến ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="Thông tin về struct/union cho từng trường:";
}
@@ -289,7 +289,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="các structures/unions thuộc:";
}
@@ -307,7 +307,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
QCString result="Danh sách tất cả các ";
if (!extractAll) result+="(đã được mô tat) ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="functions, variables, defines, enums, và typedefs";
}
@@ -358,7 +358,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Index cấu trúc cơ sở dữ liệu";
}
@@ -385,7 +385,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Thông tin về cấu trúc cơ sở dữ liệu";
}
@@ -488,7 +488,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Cấu trúc cơ sở dữ liệu";
}
@@ -895,7 +895,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "các trường đữ liệu";
}
@@ -1090,7 +1090,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Cấu trúc dữ liệu";
}
diff --git a/src/translator_za.h b/src/translator_za.h
index ca94e7a..dd5ddf9 100644
--- a/src/translator_za.h
+++ b/src/translator_za.h
@@ -91,7 +91,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Veld Dokumentasie";
}
@@ -158,7 +158,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Strukture";
}
@@ -175,7 +175,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Velde";
}
@@ -188,7 +188,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Globals";
}
@@ -229,7 +229,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
virtual QCString trCompoundListDescription()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return " Data strukture met kort beskrywings:";
}
@@ -248,7 +248,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
{
result+="gedokumenteerde ";
}
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="struct en union velde";
}
@@ -259,7 +259,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
result+=" met skakels na ";
if (!extractAll)
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="die struct/union dokumentasie vir elke veld:";
}
@@ -270,7 +270,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
else
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="die structures/unions waaraan hulle behoort:";
}
@@ -288,7 +288,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
QCString result="'n Lys van alle ";
if (!extractAll) result+="gedokumenteerde ";
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
result+="funksies, veranderlikes, defines, enums, en typedefs";
}
@@ -337,7 +337,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompoundIndex()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Strukture Indeks";
}
@@ -364,7 +364,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
*/
virtual QCString trClassDocumentation()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Strukture Dokumentasie";
}
@@ -467,7 +467,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
*/
virtual QCString trCompounds()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Strukture";
}
@@ -875,7 +875,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
virtual QCString trPublicAttribs()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Velde";
}
@@ -1071,7 +1071,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
- if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
return "Data Strukture";
}
diff --git a/src/types.h b/src/types.h
index f6c704c..806e6fc 100644
--- a/src/types.h
+++ b/src/types.h
@@ -54,7 +54,8 @@ enum SrcLangExt
SrcLangExt_VHDL = 0x02000,
SrcLangExt_XML = 0x04000,
SrcLangExt_Tcl = 0x08000,
- SrcLangExt_Markdown = 0x10000
+ SrcLangExt_Markdown = 0x10000,
+ SrcLangExt_SQL = 0x20000
};
/** Grouping info */
diff --git a/src/util.cpp b/src/util.cpp
index 84e9126..0d45758 100755..100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -250,8 +250,8 @@ void writePageRef(OutputDocInterface &od,const char *cn,const char *mn)
od.disable(OutputGenerator::Html);
od.disable(OutputGenerator::Man);
- if (Config_getBool("PDF_HYPERLINKS")) od.disable(OutputGenerator::Latex);
- if (Config_getBool("RTF_HYPERLINKS")) od.disable(OutputGenerator::RTF);
+ if (Config_getBool(PDF_HYPERLINKS)) od.disable(OutputGenerator::Latex);
+ if (Config_getBool(RTF_HYPERLINKS)) od.disable(OutputGenerator::RTF);
od.startPageRef();
od.docify(theTranslator->trPageAbbreviation());
od.endPageRef(cn,mn);
@@ -293,19 +293,19 @@ static QCString stripFromPath(const QCString &path,QStrList &l)
}
/*! strip part of \a path if it matches
- * one of the paths in the Config_getList("STRIP_FROM_PATH") list
+ * one of the paths in the Config_getList(STRIP_FROM_PATH) list
*/
QCString stripFromPath(const QCString &path)
{
- return stripFromPath(path,Config_getList("STRIP_FROM_PATH"));
+ return stripFromPath(path,Config_getList(STRIP_FROM_PATH));
}
/*! strip part of \a path if it matches
- * one of the paths in the Config_getList("INCLUDE_PATH") list
+ * one of the paths in the Config_getList(INCLUDE_PATH) list
*/
QCString stripFromIncludePath(const QCString &path)
{
- return stripFromPath(path,Config_getList("STRIP_FROM_INC_PATH"));
+ return stripFromPath(path,Config_getList(STRIP_FROM_INC_PATH));
}
/*! try to determine if \a name is a source or a header file name by looking
@@ -329,7 +329,8 @@ int guessSection(const char *name)
n.right(4)==".ipp" ||
n.right(4)==".i++" ||
n.right(4)==".inl" ||
- n.right(4)==".xml"
+ n.right(4)==".xml" ||
+ n.right(4)==".sql"
) return Entry::SOURCE_SEC;
if (n.right(2)==".h" || // header
n.right(3)==".hh" ||
@@ -1570,7 +1571,7 @@ ClassDef *getResolvedClass(Definition *scope,
QCString *pResolvedType
)
{
- static bool optimizeOutputVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ static bool optimizeOutputVhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
g_resolvedTypedefs.clear();
if (scope==0 ||
(scope->definitionType()!=Definition::TypeClass &&
@@ -1648,198 +1649,277 @@ static bool findOperator2(const QCString &s,int i)
return TRUE;
}
-static const char constScope[] = { 'c', 'o', 'n', 's', 't', ':' };
-static const char virtualScope[] = { 'v', 'i', 'r', 't', 'u', 'a', 'l', ':' };
+static const char constScope[] = { 'c', 'o', 'n', 's', 't', ':' };
+static const char virtualScope[] = { 'v', 'i', 'r', 't', 'u', 'a', 'l', ':' };
+static const char operatorScope[] = { 'o', 'p', 'e', 'r', 'a', 't', 'o', 'r', '?', '?', '?' };
+
+struct CharAroundSpace
+{
+ CharAroundSpace()
+ {
+ charMap['('].before=FALSE;
+ charMap['='].before=FALSE;
+ charMap['&'].before=FALSE;
+ charMap['*'].before=FALSE;
+ charMap['['].before=FALSE;
+ charMap['|'].before=FALSE;
+ charMap['+'].before=FALSE;
+ charMap[';'].before=FALSE;
+ charMap[':'].before=FALSE;
+ charMap['/'].before=FALSE;
+
+ charMap['='].after=FALSE;
+ charMap[' '].after=FALSE;
+ charMap[']'].after=FALSE;
+ charMap['\t'].after=FALSE;
+ charMap['\n'].after=FALSE;
+ charMap[')'].after=FALSE;
+ charMap[','].after=FALSE;
+ charMap['<'].after=FALSE;
+ charMap['|'].after=FALSE;
+ charMap['+'].after=FALSE;
+ charMap['('].after=FALSE;
+ charMap['/'].after=FALSE;
+ }
+ struct CharElem
+ {
+ CharElem() : before(TRUE), after(TRUE) {}
+ bool before;
+ bool after;
+ };
+
+ CharElem charMap[256];
+};
+
+static CharAroundSpace g_charAroundSpace;
// Note: this function is not reentrant due to the use of static buffer!
QCString removeRedundantWhiteSpace(const QCString &s)
{
- static bool cliSupport = Config_getBool("CPP_CLI_SUPPORT");
- static bool vhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
-
+ static bool cliSupport = Config_getBool(CPP_CLI_SUPPORT);
+ static bool vhdl = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
+
if (s.isEmpty() || vhdl) return s;
- static GrowBuf growBuf;
- //int resultLen = 1024;
- //int resultPos = 0;
- //QCString result(resultLen);
- // we use growBuf.addChar(c) instead of result+=c to
+
+ // We use a static character array to
// improve the performance of this function
- growBuf.clear();
- uint i;
+ static char *growBuf = 0;
+ static int growBufLen = 0;
+ if (s.length()*3>growBufLen) // For input character we produce at most 3 output characters,
+ {
+ growBufLen = s.length()*3;
+ growBuf = (char *)realloc(growBuf,growBufLen+1); // add 1 for 0-terminator
+ }
+ if (growBuf==0) return s; // should not happen, only we run out of memory
+
+ char *src=s.rawData();
+ char *dst=growBuf;
+
+ uint i=0;
uint l=s.length();
uint csp=0;
uint vsp=0;
+ uint osp=0;
char c;
- for (i=0;i<l;i++)
+ char pc=0;
+ // skip leading whitespace
+ while (i<l && isspace((uchar)src[i]))
+ {
+ i++;
+ }
+ for (;i<l;i++)
{
-nextChar:
- c=s.at(i);
+ c=src[i];
+ char nc=i<l-1 ? src[i+1] : ' ';
// search for "const"
if (csp<6 && c==constScope[csp] && // character matches substring "const"
- (csp>0 || // if it is the first character
- i==0 || // the previous may not be a digit
- !isId(s.at(i-1))
+ (csp>0 || // inside search string
+ i==0 || // if it is the first character
+ !isId(pc) // the previous may not be a digit
)
)
- csp++;
+ csp++;
else // reset counter
csp=0;
// search for "virtual"
if (vsp<8 && c==virtualScope[vsp] && // character matches substring "virtual"
- (vsp>0 || // if it is the first character
- i==0 || // the previous may not be a digit
- !isId(s.at(i-1))
+ (vsp>0 || // inside search string
+ i==0 || // if it is the first character
+ !isId(pc) // the previous may not be a digit
)
)
vsp++;
else // reset counter
vsp=0;
- if (c=='"') // quoted string
- {
- i++;
- growBuf.addChar(c);
- while (i<l)
- {
- char cc=s.at(i);
- growBuf.addChar(cc);
- if (cc=='\\') // escaped character
- {
- growBuf.addChar(s.at(i+1));
- i+=2;
- }
- else if (cc=='"') // end of string
- { i++; goto nextChar; }
- else // any other character
- { i++; }
- }
- }
- else if (i<l-2 && c=='<' && // current char is a <
- (isId(s.at(i+1)) || isspace((uchar)s.at(i+1))) && // next char is an id char or space
- (i<8 || !findOperator(s,i)) // string in front is not "operator"
+ // search for "operator"
+ if (osp<11 && (osp>=8 || c==operatorScope[osp]) && // character matches substring "operator" followed by 3 arbitrary characters
+ (osp>0 || // inside search string
+ i==0 || // if it is the first character
+ !isId(pc) // the previous may not be a digit
)
+ )
+ osp++;
+ else // reset counter
+ osp=0;
+
+ switch(c)
{
- growBuf.addChar('<');
- growBuf.addChar(' ');
- }
- else if (i>0 && c=='>' && // current char is a >
- (isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&' || s.at(i-1)=='.') && // prev char is an id char or space
- (i<8 || !findOperator(s,i)) // string in front is not "operator"
- )
- {
- growBuf.addChar(' ');
- growBuf.addChar('>');
- }
- else if (i>0 && c==',' && !isspace((uchar)s.at(i-1))
- && ((i<l-1 && (isId(s.at(i+1)) || s.at(i+1)=='[')) // the [ is for attributes (see bug702170)
- || (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) // for PHP
- || (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3))))) // for PHP
- {
- growBuf.addChar(',');
- growBuf.addChar(' ');
- }
- else if (i>0 &&
- (
- (s.at(i-1)==')' && isId(c)) // ")id" -> ") id"
- ||
- (c=='\'' && s.at(i-1)==' ') // "'id" -> "' id"
- ||
- (i>1 && s.at(i-2)==' ' && s.at(i-1)==' ') // " id" -> " id"
- )
- )
- {
- growBuf.addChar(' ');
- growBuf.addChar(c);
- }
- else if (c=='t' && csp==5 /*&& (i<5 || !isId(s.at(i-5)))*/ &&
- !(isId(s.at(i+1)) /*|| s.at(i+1)==' '*/ ||
- s.at(i+1)==')' ||
- s.at(i+1)==',' ||
- s.at(i+1)=='\0'
- )
- )
- // prevent const ::A from being converted to const::A
- {
- growBuf.addChar('t');
- growBuf.addChar(' ');
- if (s.at(i+1)==' ') i++;
- csp=0;
- }
- else if (c==':' && csp==6 /*&& (i<6 || !isId(s.at(i-6)))*/)
- // replace const::A by const ::A
- {
- growBuf.addChar(' ');
- growBuf.addChar(':');
- csp=0;
- }
- else if (c=='l' && vsp==7 /*&& (i<7 || !isId(s.at(i-7)))*/ &&
- !(isId(s.at(i+1)) /*|| s.at(i+1)==' '*/ ||
- s.at(i+1)==')' ||
- s.at(i+1)==',' ||
- s.at(i+1)=='\0'
- )
- )
- // prevent virtual ::A from being converted to virtual::A
- {
- growBuf.addChar('l');
- growBuf.addChar(' ');
- if (s.at(i+1)==' ') i++;
- vsp=0;
- }
- else if (c==':' && vsp==8 /*&& (i<8 || !isId(s.at(i-8)))*/)
- // replace virtual::A by virtual ::A
- {
- growBuf.addChar(' ');
- growBuf.addChar(':');
- vsp=0;
- }
- else if (!isspace((uchar)c) || // not a space
- ( i>0 && i<l-1 && // internal character
- (isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') &&
- (isId(s.at(i+1)) ||
- (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) ||
- (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3)))
+ case '"': // quoted string
+ {
+ *dst++=c;
+ pc = c;
+ i++;
+ for (;i<l;i++) // find end of string
+ {
+ c = src[i];
+ *dst++=c;
+ if (c=='\\' && i+1<l)
+ {
+ pc = c;
+ i++;
+ c = src[i];
+ *dst+=c;
+ }
+ else if (c=='"')
+ {
+ break;
+ }
+ pc = c;
+ }
+ }
+ break;
+ case '<': // current char is a <
+ *dst++=c;
+ if (i<l-1 &&
+ (isId(nc)) && // next char is an id char
+ (osp<8) // string in front is not "operator"
+ )
+ {
+ *dst++=' '; // add extra space
+ }
+ break;
+ case '>': // current char is a >
+ if (i>0 && !isspace((uchar)pc) &&
+ (isId(pc) || pc=='*' || pc=='&' || pc=='.') && // prev char is an id char or space or *&.
+ (osp<8 || (osp==8 && pc!='-')) // string in front is not "operator>" or "operator->"
+ )
+ {
+ *dst++=' '; // add extra space in front
+ }
+ *dst++=c;
+ if (i<l-1 && (nc=='-' || nc=='&')) // '>-' -> '> -'
+ {
+ *dst++=' '; // add extra space after
+ }
+ break;
+ case ',': // current char is a ,
+ *dst++=c;
+ if (i>0 && !isspace((uchar)pc) &&
+ ((i<l-1 && (isId(nc) || nc=='[')) || // the [ is for attributes (see bug702170)
+ (i<l-2 && nc=='$' && isId(src[i+2])) || // for PHP: ',$name' -> ', $name'
+ (i<l-3 && nc=='&' && src[i+2]=='$' && isId(src[i+3])) // for PHP: ',&$name' -> ', &$name'
)
- )
- )
- {
- if (c=='\t') c=' ';
- if (c=='*' || c=='&' || c=='@' || c=='$')
- {
- //uint rl=result.length();
- uint rl=growBuf.getPos();
- if ((rl>0 && (isId(growBuf.at(rl-1)) || growBuf.at(rl-1)=='>')) &&
- ((c!='*' && c!='&') || !findOperator2(s,i)) // avoid splitting operator* and operator->* and operator&
- )
+ )
{
- growBuf.addChar(' ');
+ *dst++=' '; // add extra space after
}
- }
- else if (c=='-')
- {
- uint rl=growBuf.getPos();
- if (rl>0 && growBuf.at(rl-1)==')' && i<l-1 && s.at(i+1)=='>') // trailing return type ')->' => ') ->'
+ break;
+ case '^': // CLI 'Type^name' -> 'Type^ name'
+ case '%': // CLI 'Type%name' -> 'Type% name'
+ *dst++=c;
+ if (cliSupport && i<l-1 && (isId(nc) || nc=='-'))
{
- growBuf.addChar(' ');
+ *dst++=' '; // add extra space after
}
- }
- growBuf.addChar(c);
- if (cliSupport &&
- (c=='^' || c=='%') && i>1 && isId(s.at(i-1)) &&
- !findOperator(s,i)
- )
- {
- growBuf.addChar(' '); // C++/CLI: Type^ name and Type% name
- }
+ break;
+ case ')': // current char is a ) -> ')name' -> ') name'
+ *dst++=c;
+ if (i<l-1 && (isId(nc) || nc=='-'))
+ {
+ *dst++=' '; // add extra space after
+ }
+ break;
+ case '*':
+ if (i>0 && pc!=' ' && pc!='\t' && pc!=':' &&
+ pc!='*' && pc!='&' && pc!='(' && pc!='/' &&
+ pc!='.' && (osp<9 || (pc=='>' && osp==11)))
+ // avoid splitting &&, **, .*, operator*, operator->*
+ {
+ *dst++=' ';
+ }
+ *dst++=c;
+ break;
+ case '&':
+ if (i>0 && isId(pc))
+ {
+ *dst++=' ';
+ }
+ *dst++=c;
+ break;
+ case '@': // '@name' -> ' @name'
+ case '$': // '$name' -> ' $name'
+ case '\'': // ''name' -> '' name'
+ if (i>0 && i<l-1 && pc!='=' && pc!=':' && !isspace(pc) &&
+ isId(nc) && osp<8) // ")id" -> ") id"
+ {
+ *dst++=' ';
+ }
+ *dst++=c;
+ break;
+ case ':': // current char is a :
+ if (csp==6) // replace const::A by const ::A
+ {
+ *dst++=' ';
+ csp=0;
+ }
+ else if (vsp==8) // replace virtual::A by virtual ::A
+ {
+ *dst++=' ';
+ vsp=0;
+ }
+ *dst++=c;
+ break;
+ case ' ': // fallthrough
+ case '\n': // fallthrough
+ case '\t':
+ {
+ if (g_charAroundSpace.charMap[(uchar)pc].before &&
+ g_charAroundSpace.charMap[(uchar)nc].after &&
+ !(pc==',' && nc=='.') &&
+ (osp<8 || (osp>=8 && isId(nc))) // e.g. "operator >>" -> "operator>>", but not "operator int" -> operatorint"
+ )
+ { // keep space
+ *dst++=' ';
+ }
+ }
+ break;
+ default:
+ *dst++=c;
+ if (c=='t' && csp==5 && i<l-1 && // found 't' in 'const'
+ !(isId(nc) || nc==')' || nc==',' || isspace(nc))
+ ) // prevent const ::A from being converted to const::A
+ {
+ *dst++=' ';
+ csp=0;
+ }
+ else if (c=='l' && vsp==7 && i<l-1 && // found 'l' in 'virtual'
+ !(isId(nc) || nc==')' || nc==',' || isspace(nc))
+ ) // prevent virtual ::A from being converted to virtual::A
+ {
+ *dst++=' ';
+ vsp=0;
+ }
+ break;
}
+ pc=c;
}
- growBuf.addChar(0);
- //printf("removeRedundantWhiteSpace(`%s')=`%s'\n",s.data(),growBuf.get());
- //result.resize(resultPos);
- return growBuf.get();
-}
+ *dst++='\0';
+ //printf("removeRedundantWhitespace(%s)->%s\n",s.data(),growBuf);
+ return growBuf;
+}
/**
* Returns the position in the string where a function parameter list
@@ -2189,6 +2269,8 @@ QCString argListToString(ArgumentList *al,bool useCanonicalType,bool showDefVals
result+=")";
if (al->constSpecifier) result+=" const";
if (al->volatileSpecifier) result+=" volatile";
+ if (al->refQualifier==RefQualifierLValue) result+=" &";
+ else if (al->refQualifier==RefQualifierRValue) result+=" &&";
if (!al->trailingReturnType.isEmpty()) result+=" -> "+al->trailingReturnType;
if (al->pureSpecifier) result+=" =0";
return removeRedundantWhiteSpace(result);
@@ -2347,8 +2429,8 @@ QCString getFileFilter(const char* name,bool isSourceCode)
// sanity check
if (name==0) return "";
- QStrList& filterSrcList = Config_getList("FILTER_SOURCE_PATTERNS");
- QStrList& filterList = Config_getList("FILTER_PATTERNS");
+ QStrList& filterSrcList = Config_getList(FILTER_SOURCE_PATTERNS);
+ QStrList& filterList = Config_getList(FILTER_PATTERNS);
QCString filterName;
bool found=FALSE;
@@ -2362,10 +2444,16 @@ QCString getFileFilter(const char* name,bool isSourceCode)
}
if (!found)
{ // then use the generic input filter
- return Config_getString("INPUT_FILTER");
+ return Config_getString(INPUT_FILTER);
}
else
{
+ /* remove surrounding double quotes */
+ if ((filterName.right(1) == "\"") && (filterName.left(1) == "\""))
+ {
+ filterName.remove(filterName.length() - 1, 1);
+ filterName.remove(0, 1);
+ }
return filterName;
}
}
@@ -2374,7 +2462,7 @@ QCString getFileFilter(const char* name,bool isSourceCode)
QCString transcodeCharacterStringToUTF8(const QCString &input)
{
bool error=FALSE;
- static QCString inputEncoding = Config_getString("INPUT_ENCODING");
+ static QCString inputEncoding = Config_getString(INPUT_ENCODING);
const char *outputEncoding = "UTF-8";
if (inputEncoding.isEmpty() || qstricmp(inputEncoding,outputEncoding)==0) return input;
int inputSize=input.length();
@@ -2499,7 +2587,7 @@ QCString dateToString(bool includeTime)
}
else // all ok, replace current time with epoch value
{
- current.setTime_t((ulong)epoch); // TODO: add support for 64bit epoch value
+ current.setTimeUtc_t((ulong)epoch); // TODO: add support for 64bit epoch value
}
}
return theTranslator->trDateTime(current.date().year(),
@@ -2898,6 +2986,8 @@ static void stripIrrelevantString(QCString &target,const QCString &str)
So the following example, show what is stripped by this routine
for const. The same is done for volatile.
+ For Java code we also strip the "final" keyword, see bug 765070.
+
\code
const T param -> T param // not relevant
const T& param -> const T& param // const needed
@@ -2910,6 +3000,7 @@ void stripIrrelevantConstVolatile(QCString &s)
//printf("stripIrrelevantConstVolatile(%s)=",s.data());
stripIrrelevantString(s,"const");
stripIrrelevantString(s,"volatile");
+ stripIrrelevantString(s,"final");
//printf("%s\n",s.data());
}
@@ -3274,6 +3365,12 @@ bool matchArguments(ArgumentList *srcAl,ArgumentList *dstAl,
}
}
+ if (srcAl->refQualifier != dstAl->refQualifier)
+ {
+ NOMATCH
+ return FALSE; // one member is has a different ref-qualifier than the other
+ }
+
// so far the argument list could match, so we need to compare the types of
// all arguments.
ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl);
@@ -3707,6 +3804,12 @@ bool matchArguments2(Definition *srcScope,FileDef *srcFileScope,ArgumentList *sr
}
}
+ if (srcAl->refQualifier != dstAl->refQualifier)
+ {
+ NOMATCH
+ return FALSE; // one member is has a different ref-qualifier than the other
+ }
+
// so far the argument list could match, so we need to compare the types of
// all arguments.
ArgumentListIterator srcAli(*srcAl),dstAli(*dstAl);
@@ -3870,7 +3973,7 @@ static void findMembersWithSpecificName(MemberName *mn,
{
//printf(" Function with global scope name `%s' args=`%s'\n",
// mn->memberName(),args);
- MemberListIterator mli(*mn);
+ MemberNameIterator mli(*mn);
MemberDef *md;
for (mli.toFirst();(md=mli.current());++mli)
{
@@ -4017,7 +4120,7 @@ bool getDefs(const QCString &scName,
)
{
//printf(" Found fcd=%p\n",fcd);
- MemberListIterator mmli(*mn);
+ MemberNameIterator mmli(*mn);
MemberDef *mmd;
int mdist=maxInheritanceDepth;
ArgumentList *argList=0;
@@ -4141,7 +4244,7 @@ bool getDefs(const QCString &scName,
if (mn && scopeName.isEmpty() && mScope.isEmpty()) // Maybe a related function?
{
//printf("Global symbol\n");
- MemberListIterator mmli(*mn);
+ MemberNameIterator mmli(*mn);
MemberDef *mmd, *fuzzy_mmd = 0;
ArgumentList *argList = 0;
bool hasEmptyArgs = args && qstrcmp(args, "()") == 0;
@@ -4209,7 +4312,7 @@ bool getDefs(const QCString &scName,
//printf("Symbol inside existing namespace `%s' count=%d\n",
// namespaceName.data(),mn->count());
bool found=FALSE;
- MemberListIterator mmli(*mn);
+ MemberNameIterator mmli(*mn);
MemberDef *mmd;
for (mmli.toFirst();((mmd=mmli.current()) && !found);++mmli)
{
@@ -4293,8 +4396,7 @@ bool getDefs(const QCString &scName,
else
{
//printf("not a namespace\n");
- bool found=FALSE;
- MemberListIterator mmli(*mn);
+ MemberNameIterator mmli(*mn);
MemberDef *mmd;
for (mmli.toFirst();(mmd=mmli.current());++mmli)
{
@@ -4345,7 +4447,7 @@ bool getDefs(const QCString &scName,
{
// no exact match found, but if args="()" an arbitrary
// member will do
- MemberListIterator mni(*mn);
+ MemberNameIterator mni(*mn);
for (mni.toLast();(md=mni.current());--mni)
{
//printf("Found member `%s'\n",md->name().data());
@@ -4658,7 +4760,7 @@ bool resolveRef(/* in */ const char *scName,
QCString linkToText(SrcLangExt lang,const char *link,bool isFileName)
{
- //static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
+ //static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
QCString result=link;
if (!result.isEmpty())
{
@@ -5131,20 +5233,20 @@ QCString substituteKeywords(const QCString &s,const char *title,
result = substitute(result,"$projectname",projName);
result = substitute(result,"$projectnumber",projNum);
result = substitute(result,"$projectbrief",projBrief);
- result = substitute(result,"$projectlogo",stripPath(Config_getString("PROJECT_LOGO")));
+ result = substitute(result,"$projectlogo",stripPath(Config_getString(PROJECT_LOGO)));
return result;
}
//----------------------------------------------------------------------
/*! Returns the character index within \a name of the first prefix
- * in Config_getList("IGNORE_PREFIX") that matches \a name at the left hand side,
+ * in Config_getList(IGNORE_PREFIX) that matches \a name at the left hand side,
* or zero if no match was found
*/
int getPrefixIndex(const QCString &name)
{
if (name.isEmpty()) return 0;
- static QStrList &sl = Config_getList("IGNORE_PREFIX");
+ static QStrList &sl = Config_getList(IGNORE_PREFIX);
char *s = sl.first();
while (s)
{
@@ -5241,8 +5343,8 @@ bool hasVisibleRoot(BaseClassList *bcl)
// note that this function is not reentrant due to the use of static growBuf!
QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore)
{
- static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES");
- static bool allowUnicodeNames = Config_getBool("ALLOW_UNICODE_NAMES");
+ static bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
+ static bool allowUnicodeNames = Config_getBool(ALLOW_UNICODE_NAMES);
static GrowBuf growBuf;
growBuf.clear();
char c;
@@ -5353,8 +5455,9 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor
*/
QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
{
- static bool shortNames = Config_getBool("SHORT_NAMES");
- static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
+ if (name==0 || name[0]=='\0') return "";
+ static bool shortNames = Config_getBool(SHORT_NAMES);
+ static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
QCString result;
if (shortNames) // use short names only
{
@@ -5436,7 +5539,7 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
QCString relativePathToRoot(const char *name)
{
QCString result;
- if (Config_getBool("CREATE_SUBDIRS"))
+ if (Config_getBool(CREATE_SUBDIRS))
{
if (name==0)
{
@@ -5457,7 +5560,7 @@ QCString relativePathToRoot(const char *name)
void createSubDirs(QDir &d)
{
- if (Config_getBool("CREATE_SUBDIRS"))
+ if (Config_getBool(CREATE_SUBDIRS))
{
// create 4096 subdirectories
int l1,l2;
@@ -6045,7 +6148,7 @@ QCString normalizeNonTemplateArgumentsInString(
p++;
QCString result = name.left(p);
- static QRegExp re("[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*");
+ static QRegExp re("[a-z:_A-Z\\x80-\\xFF][a-z:_A-Z0-9\\x80-\\xFF]*");
int l,i;
// for each identifier in the template part (e.g. B<T> -> T)
while ((i=re.match(name,p,&l))!=-1)
@@ -6469,10 +6572,10 @@ void addRefItem(const QList<ListItemInfo> *sli,
&&
(
// either not a built-in list or the list is enabled
- (lii->type!="todo" || Config_getBool("GENERATE_TODOLIST")) &&
- (lii->type!="test" || Config_getBool("GENERATE_TESTLIST")) &&
- (lii->type!="bug" || Config_getBool("GENERATE_BUGLIST")) &&
- (lii->type!="deprecated" || Config_getBool("GENERATE_DEPRECATEDLIST"))
+ (lii->type!="todo" || Config_getBool(GENERATE_TODOLIST)) &&
+ (lii->type!="test" || Config_getBool(GENERATE_TESTLIST)) &&
+ (lii->type!="bug" || Config_getBool(GENERATE_BUGLIST)) &&
+ (lii->type!="deprecated" || Config_getBool(GENERATE_DEPRECATEDLIST))
)
)
{
@@ -6607,13 +6710,13 @@ void filterLatexString(FTextStream &t,const char *str,
case '>': t << "$>$"; break;
case '|': t << "$\\vert$"; break;
case '~': t << "$\\sim$"; break;
- case '[': if (Config_getBool("PDF_HYPERLINKS") || insideItem)
+ case '[': if (Config_getBool(PDF_HYPERLINKS) || insideItem)
t << "\\mbox{[}";
else
t << "[";
break;
case ']': if (pc=='[') t << "$\\,$";
- if (Config_getBool("PDF_HYPERLINKS") || insideItem)
+ if (Config_getBool(PDF_HYPERLINKS) || insideItem)
t << "\\mbox{]}";
else
t << "]";
@@ -6658,6 +6761,7 @@ QCString latexEscapeLabelName(const char *s,bool insideTabbing)
{
case '|': t << "\\texttt{\"|}"; break;
case '!': t << "\"!"; break;
+ case '@': t << "\"@"; break;
case '%': t << "\\%"; break;
case '{': t << "\\lcurly{}"; break;
case '}': t << "\\rcurly{}"; break;
@@ -6667,7 +6771,7 @@ QCString latexEscapeLabelName(const char *s,bool insideTabbing)
i=0;
// collect as long string as possible, before handing it to docify
tmp[i++]=c;
- while ((c=*p) && c!='|' && c!='!' && c!='%' && c!='{' && c!='}' && c!='~')
+ while ((c=*p) && c!='@' && c!='[' && c!=']' && c!='!' && c!='{' && c!='}' && c!='|')
{
tmp[i++]=c;
p++;
@@ -6724,7 +6828,6 @@ QCString latexEscapePDFString(const char *s)
FTextStream t(&result);
const char *p=s;
char c;
- int i;
while ((c=*p++))
{
switch (c)
@@ -6732,6 +6835,9 @@ QCString latexEscapePDFString(const char *s)
case '\\': t << "\\textbackslash{}"; break;
case '{': t << "\\{"; break;
case '}': t << "\\}"; break;
+ case '_': t << "\\_"; break;
+ case '%': t << "\\%"; break;
+ case '&': t << "\\&"; break;
default:
t << c;
break;
@@ -6913,7 +7019,7 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine)
void stringToSearchIndex(const QCString &docBaseUrl,const QCString &title,
const QCString &str,bool priority,const QCString &anchor)
{
- static bool searchEngine = Config_getBool("SEARCHENGINE");
+ static bool searchEngine = Config_getBool(SEARCHENGINE);
if (searchEngine)
{
Doxygen::searchIndex->setCurrentDoc(title,docBaseUrl,anchor);
@@ -6956,6 +7062,7 @@ g_lang2extMap[] =
{ "fortranfixed", "fortranfixed", SrcLangExt_Fortran },
{ "vhdl", "vhdl", SrcLangExt_VHDL },
{ "xml", "xml", SrcLangExt_XML },
+ { "sql", "sql", SrcLangExt_SQL },
{ "tcl", "tcl", SrcLangExt_Tcl },
{ "md", "md", SrcLangExt_Markdown },
{ 0, 0, (SrcLangExt)0 }
@@ -7002,7 +7109,7 @@ void initDefaultExtensionMapping()
g_extLookup.setAutoDelete(TRUE);
// extension parser id
updateLanguageMapping(".dox", "c");
- updateLanguageMapping(".txt", "c");
+ updateLanguageMapping(".txt", "c"); // see bug 760836
updateLanguageMapping(".doc", "c");
updateLanguageMapping(".c", "c");
updateLanguageMapping(".C", "c");
@@ -7027,8 +7134,8 @@ void initDefaultExtensionMapping()
updateLanguageMapping(".ddl", "idl");
updateLanguageMapping(".odl", "idl");
updateLanguageMapping(".java", "java");
- updateLanguageMapping(".as", "javascript");
- updateLanguageMapping(".js", "javascript");
+ //updateLanguageMapping(".as", "javascript"); // not officially supported
+ //updateLanguageMapping(".js", "javascript"); // not officially supported
updateLanguageMapping(".cs", "csharp");
updateLanguageMapping(".d", "d");
updateLanguageMapping(".php", "php");
@@ -7038,12 +7145,15 @@ void initDefaultExtensionMapping()
updateLanguageMapping(".phtml", "php");
updateLanguageMapping(".m", "objective-c");
updateLanguageMapping(".M", "objective-c");
- updateLanguageMapping(".mm", "objective-c");
+ updateLanguageMapping(".mm", "c"); // see bug746361
updateLanguageMapping(".py", "python");
updateLanguageMapping(".pyw", "python");
updateLanguageMapping(".f", "fortran");
updateLanguageMapping(".for", "fortran");
updateLanguageMapping(".f90", "fortran");
+ updateLanguageMapping(".f95", "fortran");
+ updateLanguageMapping(".f03", "fortran");
+ updateLanguageMapping(".f08", "fortran");
updateLanguageMapping(".vhd", "vhdl");
updateLanguageMapping(".vhdl", "vhdl");
updateLanguageMapping(".tcl", "tcl");
@@ -7056,6 +7166,7 @@ void initDefaultExtensionMapping()
void addCodeOnlyMappings()
{
updateLanguageMapping(".xml", "xml");
+ updateLanguageMapping(".sql", "sql");
}
SrcLangExt getLanguageFromFileName(const QCString fileName)
@@ -7743,7 +7854,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
{
// do character transcoding if needed.
transcodeCharacterBuffer(fileName,inBuf,inBuf.curPos(),
- Config_getString("INPUT_ENCODING"),"UTF-8");
+ Config_getString(INPUT_ENCODING),"UTF-8");
}
//inBuf.addChar('\n'); /* to prevent problems under Windows ? */
@@ -7849,7 +7960,7 @@ void writeSummaryLink(OutputList &ol,const char *label,const char *title,
QCString externalLinkTarget()
{
- static bool extLinksInWindow = Config_getBool("EXT_LINKS_IN_WINDOW");
+ static bool extLinksInWindow = Config_getBool(EXT_LINKS_IN_WINDOW);
if (extLinksInWindow) return "target=\"_blank\" "; else return "";
}
@@ -7888,9 +7999,9 @@ QCString externalRef(const QCString &relPath,const QCString &ref,bool href)
*/
void writeColoredImgData(const char *dir,ColoredImgDataItem data[])
{
- static int hue = Config_getInt("HTML_COLORSTYLE_HUE");
- static int sat = Config_getInt("HTML_COLORSTYLE_SAT");
- static int gamma = Config_getInt("HTML_COLORSTYLE_GAMMA");
+ static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
+ static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
+ static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
while (data->name)
{
QCString fileName;
@@ -7923,9 +8034,9 @@ QCString replaceColorMarkers(const char *str)
if (s.isEmpty()) return result;
static QRegExp re("##[0-9A-Fa-f][0-9A-Fa-f]");
static const char hex[] = "0123456789ABCDEF";
- static int hue = Config_getInt("HTML_COLORSTYLE_HUE");
- static int sat = Config_getInt("HTML_COLORSTYLE_SAT");
- static int gamma = Config_getInt("HTML_COLORSTYLE_GAMMA");
+ static int hue = Config_getInt(HTML_COLORSTYLE_HUE);
+ static int sat = Config_getInt(HTML_COLORSTYLE_SAT);
+ static int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
int i,l,sl=s.length(),p=0;
while ((i=re.match(s,p,&l))!=-1)
{
@@ -7994,6 +8105,7 @@ bool copyFile(const QCString &src,const QCString &dest)
/** Returns the section of text, in between a pair of markers.
* Full lines are returned, excluding the lines on which the markers appear.
+ * \sa routine lineBlock
*/
QCString extractBlock(const QCString text,const QCString marker)
{
@@ -8037,6 +8149,29 @@ QCString extractBlock(const QCString text,const QCString marker)
return l2>l1 ? text.mid(l1,l2-l1) : QCString();
}
+/** Returns the line number of the line following the line with the marker.
+ * \sa routine extractBlock
+ */
+int lineBlock(const QCString text,const QCString marker)
+{
+ int result = 1;
+ int p=0,i;
+ bool found=FALSE;
+
+ // find the character positions of the first marker
+ int m1 = text.find(marker);
+ if (m1==-1) return result;
+
+ // find start line positions for the markers
+ while (!found && (i=text.find('\n',p))!=-1)
+ {
+ found = (p<=m1 && m1<i); // found the line with the start marker
+ p=i+1;
+ result++;
+ }
+ return result;
+}
+
/** Returns a string representation of \a lang. */
QCString langToString(SrcLangExt lang)
{
@@ -8055,6 +8190,7 @@ QCString langToString(SrcLangExt lang)
case SrcLangExt_Fortran: return "Fortran";
case SrcLangExt_VHDL: return "VHDL";
case SrcLangExt_XML: return "XML";
+ case SrcLangExt_SQL: return "SQL";
case SrcLangExt_Tcl: return "Tcl";
case SrcLangExt_Markdown: return "Markdown";
}
@@ -8097,8 +8233,8 @@ QCString correctURL(const QCString &url,const QCString &relPath)
bool protectionLevelVisible(Protection prot)
{
- static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
- static bool extractPackage = Config_getBool("EXTRACT_PACKAGE");
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
+ static bool extractPackage = Config_getBool(EXTRACT_PACKAGE);
return (prot!=Private && prot!=Package) ||
(prot==Private && extractPrivate) ||
@@ -8118,7 +8254,7 @@ QCString stripIndentation(const QCString &s)
int indent=0;
int minIndent=1000000; // "infinite"
bool searchIndent=TRUE;
- static int tabSize=Config_getInt("TAB_SIZE");
+ static int tabSize=Config_getInt(TAB_SIZE);
while ((c=*p++))
{
if (c=='\t') indent+=tabSize - (indent%tabSize);
@@ -8176,7 +8312,7 @@ QCString stripIndentation(const QCString &s)
bool fileVisibleInIndex(FileDef *fd,bool &genSourceFile)
{
- static bool allExternals = Config_getBool("ALLEXTERNALS");
+ static bool allExternals = Config_getBool(ALLEXTERNALS);
bool isDocFile = fd->isDocumentationFile();
genSourceFile = !isDocFile && fd->generateSourceFile();
return ( ((allExternals && fd->isLinkable()) ||
@@ -8188,8 +8324,8 @@ bool fileVisibleInIndex(FileDef *fd,bool &genSourceFile)
void addDocCrossReference(MemberDef *src,MemberDef *dst)
{
- static bool referencedByRelation = Config_getBool("REFERENCED_BY_RELATION");
- static bool referencesRelation = Config_getBool("REFERENCES_RELATION");
+ static bool referencedByRelation = Config_getBool(REFERENCED_BY_RELATION);
+ static bool referencesRelation = Config_getBool(REFERENCES_RELATION);
//printf("--> addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data());
if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types
@@ -8333,7 +8469,7 @@ bool namespaceHasVisibleChild(NamespaceDef *nd,bool includeClasses)
bool classVisibleInIndex(ClassDef *cd)
{
- static bool allExternals = Config_getBool("ALLEXTERNALS");
+ static bool allExternals = Config_getBool(ALLEXTERNALS);
return (allExternals && cd->isLinkable()) || cd->isLinkableInProject();
}
@@ -8382,7 +8518,7 @@ void convertProtectionLevel(
int *outListType2
)
{
- static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
+ static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
// default representing 1-1 mapping
*outListType1=inListType;
*outListType2=-1;
@@ -8561,30 +8697,11 @@ bool mainPageHasTitle()
QCString getDotImageExtension(void)
{
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = Config_getEnum(DOT_IMAGE_FORMAT);
imgExt = imgExt.replace( QRegExp(":.*"), "" );
return imgExt;
}
-void initFilePattern(void)
-{
- // add default pattern if needed
- QStrList &filePatternList = Config_getList("FILE_PATTERNS");
- if (filePatternList.isEmpty())
- {
- QDictIterator<int> it( g_extLookup );
- QCString pattern;
- bool caseSens = portable_fileSystemIsCaseSensitive();
- for (;it.current();++it)
- {
- pattern = "*";
- pattern += it.currentKey();
- filePatternList.append(pattern.data());
- if (caseSens) filePatternList.append(pattern.upper().data());
- }
- }
-}
-
bool openOutputFile(const char *outFile,QFile &f)
{
bool fileOpened=FALSE;
@@ -8610,3 +8727,23 @@ bool openOutputFile(const char *outFile,QFile &f)
return fileOpened;
}
+void writeExtraLatexPackages(FTextStream &t)
+{
+ // User-specified packages
+ QStrList &extraPackages = Config_getList(EXTRA_PACKAGES);
+ if (!extraPackages.isEmpty())
+ {
+ t << "% Packages requested by user\n";
+ const char *pkgName=extraPackages.first();
+ while (pkgName)
+ {
+ if ((pkgName[0] == '[') || (pkgName[0] == '{'))
+ t << "\\usepackage" << pkgName << "\n";
+ else
+ t << "\\usepackage{" << pkgName << "}\n";
+ pkgName=extraPackages.next();
+ }
+ t << "\n";
+ }
+}
+
diff --git a/src/util.h b/src/util.h
index 3f976e3..af8a3b4 100755..100644
--- a/src/util.h
+++ b/src/util.h
@@ -445,6 +445,7 @@ QCString replaceColorMarkers(const char *str);
bool copyFile(const QCString &src,const QCString &dest);
QCString extractBlock(const QCString text,const QCString marker);
+int lineBlock(const QCString text,const QCString marker);
QCString correctURL(const QCString &url,const QCString &relPath);
@@ -474,8 +475,8 @@ void convertProtectionLevel(
);
bool mainPageHasTitle();
-void initFilePattern(void);
bool openOutputFile(const char *outFile,QFile &f);
+void writeExtraLatexPackages(FTextStream &t);
#endif
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index e4ae0e7..3e027d7 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -18,6 +18,9 @@
* supports VHDL-87/93/2008
******************************************************************************/
%option never-interactive
+%option case-insensitive
+%option prefix="vhdlcodeYY"
+
%{
/*
@@ -85,6 +88,7 @@ static int g_yyLineNr; //!< current line number
static bool g_needsTermination;
static Definition *g_searchCtx;
+static bool g_exampleBlock;
static QCString g_exampleName;
static QCString g_exampleFile;
@@ -181,7 +185,6 @@ static void startCodeLine()
//if (g_currentFontClass) { g_code->endFontClass(); }
if (g_sourceFileDef)
{
- g_startCode=TRUE;
//QCString lineNumber,lineAnchor;
//lineNumber.sprintf("%05d",g_yyLineNr);
//lineAnchor.sprintf("l%05d",g_yyLineNr);
@@ -229,13 +232,13 @@ static void startCodeLine()
}
}
g_code->startCodeLine(g_sourceFileDef);
+ g_startCode=TRUE;
if (g_currentFontClass)
{
g_code->startFontClass(g_currentFontClass);
}
}
-static void endFontClass();
static void endCodeLine()
{
endFontClass();
@@ -394,7 +397,7 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
Definition *d,
const char *text)
{
- static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS");
+ static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance()->addTooltip(d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
@@ -1464,7 +1467,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
QCString text(vhdlcodeYYtext);
int i=text.find("--");
if (text.mid(i,3)=="--!" && // hide special comment
- Config_getBool("STRIP_CODE_COMMENTS"))
+ Config_getBool(STRIP_CODE_COMMENTS))
{
g_yyLineNr++; // skip complete line
}
@@ -1479,7 +1482,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
QCString text(vhdlcodeYYtext);
int i=text.find("--");
if (text.mid(i,3)=="--!" &&
- Config_getBool("STRIP_CODE_COMMENTS"))
+ Config_getBool(STRIP_CODE_COMMENTS))
{
// hide special comment
}
@@ -1504,7 +1507,7 @@ void resetVhdlCodeParserState()
}
void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString &s,
- bool /*exBlock*/, const char *exName,FileDef *fd,
+ bool exBlock, const char *exName,FileDef *fd,
int startLine,int endLine,bool inlineFragment,
MemberDef *memberDef,bool,Definition *searchCtx,
bool /* collectXRefs */)
@@ -1527,23 +1530,24 @@ void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString
g_needsTermination = FALSE;
g_searchCtx = searchCtx;
- if (endLine!=-1)
- g_inputLines = endLine+1;
- else
- g_inputLines = countLines();
-
if (startLine!=-1)
g_yyLineNr = startLine;
else
g_yyLineNr = 1;
+ if (endLine!=-1)
+ g_inputLines = endLine+1;
+ else
+ g_inputLines = g_yyLineNr + countLines() - 1;
+
// g_theCallContext.clear();
g_classScope = className;
+ g_exampleBlock = exBlock;
g_exampleName = exName;
g_sourceFileDef = fd;
bool cleanupSourceDef = FALSE;
- if (fd==0)
+ if (exBlock && fd==0)
{
// create a dummy filedef for the example
g_sourceFileDef = new FileDef("",exName);
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 2d473b2..d09de09 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -162,7 +162,7 @@ static int compareString(const QCString& s1,const QCString& s2)
static void createSVG()
{
- QCString ov =Config_getString("HTML_OUTPUT");
+ QCString ov =Config_getString(HTML_OUTPUT);
QCString dir="-o \""+ov+"/vhdl_design_overview.html\"";
ov+="/vhdl_design.dot";
@@ -192,7 +192,7 @@ void VhdlDocGen::writeOverview()
if (!found) return;
- QCString ov =Config_getString("HTML_OUTPUT");
+ QCString ov =Config_getString(HTML_OUTPUT);
QCString fileName=ov+"/vhdl_design.dot";
QFile f(fileName);
FTextStream t(&f);
@@ -570,7 +570,7 @@ VhdlDocGen::~VhdlDocGen()
void VhdlDocGen::init()
{
- // vhdl keywords inlcuded VHDL 2008
+ // vhdl keywords included VHDL 2008
const char* g_vhdlKeyWordMap0[] =
{
"abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute",
@@ -840,7 +840,7 @@ MemberDef* VhdlDocGen::findMemberDef(ClassDef* cd,const QCString& key,MemberList
}
MemberListIterator fmni(*ml);
//int l=ml->count();
- // fprintf(stderr,"\n loading enity %s %s: %d",cd->symbolName().data(),keyType.data(),l);
+ // fprintf(stderr,"\n loading entity %s %s: %d",cd->symbolName().data(),keyType.data(),l);
for (fmni.toFirst();(md=fmni.current());++fmni)
{
@@ -1065,7 +1065,7 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol)
}// write
/*
- * finds all architectures which belongs to an entiy
+ * finds all architectures which belongs to an entity
*/
void VhdlDocGen::findAllArchitectures(QList<QCString>& qll,const ClassDef *cd)
{
@@ -1989,7 +1989,7 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
QCString cfname = d->getOutputFileBase();
//HtmlHelp *htmlHelp=0;
- // bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP");
+ // bool hasHtmlHelp = Config_getBool(GENERATE_HTML) && Config_getBool(GENERATE_HTMLHELP);
// if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
// search for the last anonymous scope in the member type
@@ -2242,7 +2242,7 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
}
bool htmlOn = ol.isEnabled(OutputGenerator::Html);
- if (htmlOn && /*Config_getBool("HTML_ALIGN_MEMBERS") &&*/ !ltype.isEmpty())
+ if (htmlOn && /*Config_getBool(HTML_ALIGN_MEMBERS) &&*/ !ltype.isEmpty())
{
ol.disable(OutputGenerator::Html);
}
@@ -2261,7 +2261,7 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
// name().data(),annoClassDef,annEnumType);
// if(mm!=VhdlDocGen::MISCELLANEOUS)
ol.endMemberItem();
- if (!mdef->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC") /* && !annMemb */)
+ if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */)
{
QCString s=mdef->briefDescription();
ol.startMemberDescription(mdef->anchor());
@@ -2802,7 +2802,7 @@ bool VhdlDocGen::findConstraintFile(LayoutNavEntry *lne)
QCString co("Constraints");
QCString imgExt = getDotImageExtension();
- if (Config_getBool("HAVE_DOT") && imgExt=="svg")
+ if (Config_getBool(HAVE_DOT) && imgExt=="svg")
{
QCString ov = theTranslator->trDesignOverview();
QCString ofile("vhdl_design_overview");
@@ -3926,8 +3926,7 @@ void FlowChart::printUmlTree()
}
qcs+="\n";
- QCString & outDir = Config_getString("OUTPUT_DIRECTORY");
- QCString & htmlOutDir = Config_getString("HTML_OUTPUT");
+ QCString & htmlOutDir = Config_getString(HTML_OUTPUT);
QCString n=convertNameToFileName();
QCString tmp=htmlOutDir;
@@ -3988,7 +3987,7 @@ const char* FlowChart::getNodeType(int c)
void FlowChart::createSVG()
{
QCString qcs("/");
- QCString ov = Config_getString("HTML_OUTPUT");
+ QCString ov = Config_getString(HTML_OUTPUT);
qcs+=FlowChart::convertNameToFileName()+".svg";
@@ -4024,7 +4023,7 @@ void FlowChart::writeFlowChart()
{
// assert(VhdlDocGen::flowMember);
- QCString ov = Config_getString("HTML_OUTPUT");
+ QCString ov = Config_getString(HTML_OUTPUT);
QCString fileName = ov+"/flow_design.dot";
QFile f(fileName);
FTextStream t(&f);
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index 36d97a7..bd190ca 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -315,7 +315,7 @@ class FlowChart
static void delFlowList();
static const char* getNodeType(int c);
- static void addFlowChart(int type,const char* text,const char* exp,const char * label=NULL);
+ static void addFlowChart(int type,const char* text,const char* exp,const char * label=0);
static void moveToPrevLevel();
static int getTimeStamp();
static void writeFlowChart();
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index c29bc69..fdba5e2 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -341,9 +341,6 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
bool needsEntry=FALSE;
Protection protection=Public;
- int lineNr;
- if (iDocLine==-1)
- lineNr=yyLineNr;
if (oldEntry==current)
{
@@ -705,7 +702,7 @@ void VhdlParser::mapLibPackage( Entry* root)
bool VhdlParser::addLibUseClause(const QCString &type)
{
- static bool showIEEESTD=Config_getBool("FORCE_LOCAL_INCLUDES");
+ static bool showIEEESTD=Config_getBool(FORCE_LOCAL_INCLUDES);
if (showIEEESTD) // all standard packages and libraries will not be shown
{
diff --git a/src/xmlcode.l b/src/xmlcode.l
index fd36ebb..c090531 100644
--- a/src/xmlcode.l
+++ b/src/xmlcode.l
@@ -18,6 +18,8 @@
******************************************************************************/
%option never-interactive
+%option prefix="xmlcodeYY"
+
%{
#include <stdio.h>
@@ -49,6 +51,7 @@ static int g_yyLineNr; //!< current line number
static bool g_needsTermination;
static Definition *g_searchCtx;
+static bool g_exampleBlock;
static QCString g_exampleName;
static QCString g_exampleFile;
@@ -323,12 +326,12 @@ void parseXmlCode(
CodeOutputInterface &od,
const char * /*className*/,
const QCString &s,
- bool /*exBlock*/,
+ bool exBlock,
const char *exName,
FileDef *fd,
int startLine,
int endLine,
- bool /*inlineFragment*/,
+ bool inlineFragment,
MemberDef *,
bool,Definition *searchCtx,
bool /*collectXRefs*/
@@ -345,22 +348,23 @@ void parseXmlCode(
g_needsTermination = FALSE;
g_searchCtx=searchCtx;
- if (endLine!=-1)
- g_inputLines = endLine+1;
- else
- g_inputLines = countLines();
-
if (startLine!=-1)
g_yyLineNr = startLine;
else
g_yyLineNr = 1;
+ if (endLine!=-1)
+ g_inputLines = endLine+1;
+ else
+ g_inputLines = g_yyLineNr + countLines() - 1;
+
+ g_exampleBlock = exBlock;
g_exampleName = exName;
g_sourceFileDef = fd;
bool cleanupSourceDef = FALSE;
- if (fd==0)
+ if (exBlock && fd==0)
{
// create a dummy filedef for the example
g_sourceFileDef = new FileDef("",(exName?exName:"generated"));
@@ -372,6 +376,7 @@ void parseXmlCode(
setCurrentDoc("l00001");
}
+ g_includeCodeFragment = inlineFragment;
// Starts line 1 on the output
startCodeLine();
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index c5550f0..815759e 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -272,7 +272,14 @@ void XmlDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
- inc->exampleFile(), &fd);
+ inc->exampleFile(),
+ &fd, // fileDef,
+ -1, // start line
+ -1, // end line
+ FALSE, // inline fragment
+ 0, // memberDef
+ TRUE // show line numbers
+ );
m_t << "</programlisting>";
}
break;
@@ -283,7 +290,14 @@ void XmlDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
- inc->exampleFile());
+ inc->exampleFile(),
+ 0, // fileDef
+ -1, // startLine
+ -1, // endLine
+ TRUE, // inlineFragment
+ 0, // memberDef
+ FALSE // show line numbers
+ );
m_t << "</programlisting>";
break;
case DocInclude::DontInclude:
@@ -315,6 +329,33 @@ void XmlDocVisitor::visit(DocInclude *inc)
);
m_t << "</programlisting>";
break;
+ case DocInclude::SnipWithLines:
+ {
+ m_t << "<programlisting>";
+ QFileInfo cfi( inc->file() );
+ FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
+ Doxygen::parserManager->getParser(inc->extension())
+ ->parseCode(m_ci,
+ inc->context(),
+ extractBlock(inc->text(),inc->blockId()),
+ langExt,
+ inc->isExample(),
+ inc->exampleFile(),
+ &fd,
+ lineBlock(inc->text(),inc->blockId()),
+ -1, // endLine
+ FALSE, // inlineFragment
+ 0, // memberDef
+ TRUE // show line number
+ );
+ m_t << "</programlisting>";
+ }
+ break;
+ case DocInclude::SnippetDoc:
+ case DocInclude::IncludeDoc:
+ err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
+ "Please create a bug report\n",__FILE__);
+ break;
}
}
@@ -726,7 +767,7 @@ void XmlDocVisitor::visitPre(DocImage *img)
// copy the image to the output dir
QFile inImage(img->name());
- QFile outImage(Config_getString("XML_OUTPUT")+"/"+baseName.data());
+ QFile outImage(Config_getString(XML_OUTPUT)+"/"+baseName.data());
if (inImage.open(IO_ReadOnly))
{
if (outImage.open(IO_WriteOnly))
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 467ebe4..fe95c7a 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -120,7 +120,7 @@ inline void writeXMLCodeString(FTextStream &t,const char *s, int &col)
{
case '\t':
{
- static int tabSize = Config_getInt("TAB_SIZE");
+ static int tabSize = Config_getInt(TAB_SIZE);
int spacesToNextTabStop = tabSize - (col%tabSize);
col+=spacesToNextTabStop;
while (spacesToNextTabStop--) t << "<sp/>";
@@ -153,7 +153,7 @@ static void writeXMLHeader(FTextStream &t)
static void writeCombineScript()
{
- QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/combine.xslt";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -452,7 +452,7 @@ void writeXMLCodeBlock(FTextStream &t,FileDef *fd)
XMLCodeGenerator *xmlGen = new XMLCodeGenerator(t);
pIntf->parseCode(*xmlGen, // codeOutIntf
0, // scopeName
- fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES")),
+ fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES)),
langExt, // lang
FALSE, // isExampleBlock
0, // exampleName
@@ -505,7 +505,7 @@ static void stripQualifiers(QCString &typeStr)
static QCString classOutputFileBase(ClassDef *cd)
{
- //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
//if (inlineGroupedClasses && cd->partOfGroups()!=0)
return cd->getOutputFileBase();
//else
@@ -514,7 +514,7 @@ static QCString classOutputFileBase(ClassDef *cd)
static QCString memberOutputFileBase(MemberDef *md)
{
- //static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
+ //static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
//if (inlineGroupedClasses && md->getClassDef() && md->getClassDef()->partOfGroups()!=0)
// return md->getClassDef()->getXmlOutputFileBase();
//else
@@ -620,6 +620,13 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
if (md->isInline()) t << "yes"; else t << "no";
t << "\"";
+ if (al->refQualifier!=RefQualifierNone)
+ {
+ t << " refqual=\"";
+ if (al->refQualifier==RefQualifierLValue) t << "lvalue"; else t << "rvalue";
+ t << "\"";
+ }
+
if (md->isFinal())
{
t << " final=\"yes\"";
@@ -804,11 +811,12 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
if (md->isWritable())
t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>" << endl;
}
+
if (md->memberType()==MemberType_Variable && md->bitfieldString())
{
QCString bitfield = md->bitfieldString();
if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
- t << " <bitfield>" << bitfield << "</bitfield>" << endl;
+ t << " <bitfield>" << convertToXML(bitfield) << "</bitfield>" << endl;
}
MemberDef *rmd = md->reimplements();
@@ -1242,7 +1250,7 @@ static void generateXMLForClass(ClassDef *cd,FTextStream &ti)
<< "\" kind=\"" << cd->compoundTypeString()
<< "\"><name>" << convertToXML(cd->name()) << "</name>" << endl;
- QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+ classOutputFileBase(cd)+".xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -1442,7 +1450,7 @@ static void generateXMLForNamespace(NamespaceDef *nd,FTextStream &ti)
<< "\" kind=\"namespace\"" << "><name>"
<< convertToXML(nd->name()) << "</name>" << endl;
- QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+nd->getOutputFileBase()+".xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -1523,7 +1531,7 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti)
<< "\" kind=\"file\"><name>" << convertToXML(fd->name())
<< "</name>" << endl;
- QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+fd->getOutputFileBase()+".xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -1628,7 +1636,7 @@ static void generateXMLForFile(FileDef *fd,FTextStream &ti)
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,fd->docFile(),fd->docLine(),fd,0,fd->documentation());
t << " </detaileddescription>" << endl;
- if (Config_getBool("XML_PROGRAMLISTING"))
+ if (Config_getBool(XML_PROGRAMLISTING))
{
t << " <programlisting>" << endl;
writeXMLCodeBlock(t,fd);
@@ -1660,7 +1668,7 @@ static void generateXMLForGroup(GroupDef *gd,FTextStream &ti)
ti << " <compound refid=\"" << gd->getOutputFileBase()
<< "\" kind=\"group\"><name>" << convertToXML(gd->name()) << "</name>" << endl;
- QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+gd->getOutputFileBase()+".xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -1723,7 +1731,7 @@ static void generateXMLForDir(DirDef *dd,FTextStream &ti)
<< "\" kind=\"dir\"><name>" << convertToXML(dd->displayName())
<< "</name>" << endl;
- QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+dd->getOutputFileBase()+".xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -1776,7 +1784,7 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
<< "\" kind=\"" << kindName << "\"><name>" << convertToXML(pd->name())
<< "</name>" << endl;
- QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
QCString fileName=outputDirectory+"/"+pageName+".xml";
QFile f(fileName);
if (!f.open(IO_WriteOnly))
@@ -1802,7 +1810,7 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
}
else
{
- title = Config_getString("PROJECT_NAME");
+ title = Config_getString(PROJECT_NAME);
}
t << " <title>" << convertToXML(convertCharEntitiesToUTF8(title))
<< "</title>" << endl;
@@ -1845,7 +1853,7 @@ void generateXML()
// + related pages
// - examples
- QCString outputDirectory = Config_getString("XML_OUTPUT");
+ QCString outputDirectory = Config_getString(XML_OUTPUT);
QDir xmlDir(outputDirectory);
createSubDirs(xmlDir);