summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addon/doxyapp/doxyapp.cpp32
-rw-r--r--addon/doxyparse/doxyparse.cpp39
-rw-r--r--src/cite.cpp53
-rw-r--r--src/cite.h8
-rw-r--r--src/clangparser.cpp12
-rw-r--r--src/classdef.cpp323
-rw-r--r--src/classdef.h52
-rw-r--r--src/classlist.cpp2
-rw-r--r--src/classlist.h2
-rw-r--r--src/cmdmapper.cpp6
-rw-r--r--src/cmdmapper.h2
-rw-r--r--src/code.h10
-rw-r--r--src/code.l734
-rw-r--r--src/commentcnv.h9
-rw-r--r--src/commentcnv.l34
-rw-r--r--src/commentscan.h12
-rw-r--r--src/commentscan.l144
-rw-r--r--src/conceptdef.cpp58
-rw-r--r--src/conceptdef.h12
-rw-r--r--src/condparser.cpp39
-rw-r--r--src/condparser.h4
-rw-r--r--src/config.h2
-rwxr-xr-xsrc/configgen.py6
-rw-r--r--src/configimpl.h13
-rw-r--r--src/configimpl.l149
-rw-r--r--src/constexp.l2
-rw-r--r--src/context.cpp218
-rw-r--r--src/context.h80
-rw-r--r--src/cppvalue.cpp4
-rw-r--r--src/debug.cpp9
-rw-r--r--src/debug.h6
-rw-r--r--src/declinfo.l22
-rw-r--r--src/defargs.h2
-rw-r--r--src/defargs.l39
-rw-r--r--src/defgen.cpp34
-rw-r--r--src/definition.cpp159
-rw-r--r--src/definition.h26
-rw-r--r--src/definitionimpl.h68
-rw-r--r--src/dia.cpp12
-rw-r--r--src/dia.h4
-rw-r--r--src/diagram.cpp30
-rw-r--r--src/diagram.h9
-rw-r--r--src/dirdef.cpp82
-rw-r--r--src/dirdef.h3
-rw-r--r--src/docbookgen.cpp147
-rw-r--r--src/docbookgen.h160
-rw-r--r--src/docbookvisitor.cpp18
-rw-r--r--src/docbookvisitor.h4
-rw-r--r--src/docgroup.cpp32
-rw-r--r--src/docgroup.h12
-rw-r--r--src/docparser.cpp185
-rw-r--r--src/docparser.h22
-rw-r--r--src/docsets.cpp42
-rw-r--r--src/docsets.h20
-rw-r--r--src/doctokenizer.h8
-rw-r--r--src/doctokenizer.l58
-rw-r--r--src/docvisitor.cpp4
-rw-r--r--src/docvisitor.h4
-rw-r--r--src/dot.cpp35
-rw-r--r--src/dot.h8
-rw-r--r--src/dotcallgraph.cpp12
-rw-r--r--src/dotcallgraph.h4
-rw-r--r--src/dotclassgraph.cpp46
-rw-r--r--src/dotclassgraph.h6
-rw-r--r--src/dotdirdeps.cpp14
-rw-r--r--src/dotdirdeps.h6
-rw-r--r--src/dotfilepatcher.cpp46
-rw-r--r--src/dotfilepatcher.h7
-rw-r--r--src/dotgfxhierarchytable.cpp42
-rw-r--r--src/dotgfxhierarchytable.h8
-rw-r--r--src/dotgraph.cpp24
-rw-r--r--src/dotgraph.h6
-rw-r--r--src/dotgroupcollaboration.cpp2
-rw-r--r--src/dotgroupcollaboration.h4
-rw-r--r--src/dotincldepgraph.cpp16
-rw-r--r--src/dotincldepgraph.h2
-rw-r--r--src/dotlegendgraph.cpp4
-rw-r--r--src/dotlegendgraph.h2
-rw-r--r--src/dotnode.cpp24
-rw-r--r--src/dotnode.h6
-rw-r--r--src/dotrunner.cpp70
-rw-r--r--src/dotrunner.h27
-rw-r--r--src/doxygen.cpp879
-rw-r--r--src/doxygen.h2
-rw-r--r--src/eclipsehelp.cpp24
-rw-r--r--src/eclipsehelp.h12
-rw-r--r--src/entry.cpp2
-rw-r--r--src/entry.h2
-rw-r--r--src/filedef.cpp166
-rw-r--r--src/filedef.h6
-rw-r--r--src/filename.h8
-rw-r--r--src/fileparser.cpp23
-rw-r--r--src/fileparser.h8
-rw-r--r--src/formula.cpp32
-rw-r--r--src/formula.h4
-rw-r--r--src/fortrancode.h4
-rw-r--r--src/fortrancode.l157
-rw-r--r--src/fortranscanner.h4
-rwxr-xr-xsrc/fortranscanner.l107
-rw-r--r--src/ftvhelp.cpp24
-rw-r--r--src/ftvhelp.h16
-rw-r--r--src/groupdef.cpp122
-rw-r--r--src/groupdef.h8
-rw-r--r--src/htags.cpp14
-rw-r--r--src/htmldocvisitor.cpp42
-rw-r--r--src/htmldocvisitor.h4
-rw-r--r--src/htmlgen.cpp293
-rw-r--r--src/htmlgen.h174
-rw-r--r--src/htmlhelp.cpp62
-rw-r--r--src/htmlhelp.h16
-rw-r--r--src/image.cpp22
-rw-r--r--src/image.h11
-rw-r--r--src/index.cpp446
-rw-r--r--src/index.h34
-rw-r--r--src/language.cpp6
-rw-r--r--src/language.h8
-rw-r--r--src/latexdocvisitor.cpp22
-rw-r--r--src/latexdocvisitor.h4
-rw-r--r--src/latexgen.cpp203
-rw-r--r--src/latexgen.h162
-rw-r--r--src/layout.cpp36
-rw-r--r--src/layout.h6
-rw-r--r--src/lexcode.h4
-rw-r--r--src/lexcode.l33
-rw-r--r--src/lexscanner.h4
-rw-r--r--src/lexscanner.l293
-rw-r--r--src/linkedmap.h112
-rw-r--r--src/mandocvisitor.cpp10
-rw-r--r--src/mandocvisitor.h4
-rw-r--r--src/mangen.cpp88
-rw-r--r--src/mangen.h116
-rw-r--r--src/markdown.cpp138
-rw-r--r--src/markdown.h8
-rw-r--r--src/memberdef.cpp350
-rw-r--r--src/memberdef.h58
-rw-r--r--src/membergroup.cpp28
-rw-r--r--src/membergroup.h10
-rw-r--r--src/memberlist.cpp63
-rw-r--r--src/memberlist.h10
-rw-r--r--src/membername.h8
-rw-r--r--src/message.cpp29
-rw-r--r--src/message.h15
-rw-r--r--src/msc.cpp20
-rw-r--r--src/msc.h4
-rw-r--r--src/namespacedef.cpp86
-rw-r--r--src/namespacedef.h10
-rw-r--r--src/outputgen.cpp4
-rw-r--r--src/outputgen.h136
-rw-r--r--src/outputlist.cpp6
-rw-r--r--src/outputlist.h132
-rw-r--r--src/pagedef.cpp22
-rw-r--r--src/pagedef.h4
-rw-r--r--src/parserintf.h38
-rw-r--r--src/perlmodgen.cpp101
-rw-r--r--src/plantuml.cpp6
-rw-r--r--src/plantuml.h12
-rw-r--r--src/portable.cpp109
-rw-r--r--src/portable.h28
-rw-r--r--src/pre.h11
-rw-r--r--src/pre.l323
-rw-r--r--src/printdocvisitor.h50
-rw-r--r--src/pycode.h4
-rw-r--r--src/pycode.l120
-rw-r--r--src/pyscanner.h4
-rw-r--r--src/pyscanner.l62
-rw-r--r--src/qcstring.cpp14
-rw-r--r--src/qcstring.h147
-rw-r--r--src/qhp.cpp54
-rw-r--r--src/qhp.h20
-rw-r--r--src/qhpxmlwriter.cpp37
-rw-r--r--src/qhpxmlwriter.h30
-rw-r--r--src/reflist.cpp4
-rw-r--r--src/reflist.h16
-rw-r--r--src/resourcemgr.cpp28
-rw-r--r--src/resourcemgr.h10
-rw-r--r--src/rtfdocvisitor.cpp31
-rw-r--r--src/rtfdocvisitor.h8
-rw-r--r--src/rtfgen.cpp283
-rw-r--r--src/rtfgen.h132
-rw-r--r--src/rtfstyle.cpp16
-rw-r--r--src/rtfstyle.h4
-rw-r--r--src/scanner.h4
-rw-r--r--src/scanner.l164
-rw-r--r--src/scopedtypevariant.h2
-rw-r--r--src/searchindex.cpp60
-rw-r--r--src/searchindex.h20
-rw-r--r--src/section.h25
-rw-r--r--src/sqlcode.h4
-rw-r--r--src/sqlcode.l18
-rw-r--r--src/sqlite3gen.cpp85
-rw-r--r--src/stlsupport.cpp2
-rw-r--r--src/symbolmap.h16
-rw-r--r--src/symbolresolver.cpp110
-rw-r--r--src/symbolresolver.h4
-rw-r--r--src/tagreader.cpp289
-rwxr-xr-xsrc/template.cpp278
-rw-r--r--src/template.h14
-rw-r--r--src/textdocvisitor.cpp6
-rw-r--r--src/textdocvisitor.h2
-rw-r--r--src/tooltip.cpp9
-rw-r--r--src/translator.h62
-rw-r--r--src/translator_adapter.h28
-rw-r--r--src/translator_am.h36
-rw-r--r--src/translator_ar.h24
-rw-r--r--src/translator_br.h50
-rw-r--r--src/translator_ca.h36
-rw-r--r--src/translator_cn.h46
-rw-r--r--src/translator_cz.h47
-rw-r--r--src/translator_de.h48
-rw-r--r--src/translator_dk.h36
-rw-r--r--src/translator_en.h52
-rw-r--r--src/translator_eo.h40
-rw-r--r--src/translator_es.h50
-rw-r--r--src/translator_fa.h34
-rw-r--r--src/translator_fi.h26
-rw-r--r--src/translator_fr.h50
-rw-r--r--src/translator_gr.h46
-rw-r--r--src/translator_hr.h40
-rw-r--r--src/translator_hu.h46
-rw-r--r--src/translator_id.h36
-rw-r--r--src/translator_it.h46
-rw-r--r--src/translator_jp.h46
-rw-r--r--src/translator_kr.h46
-rw-r--r--src/translator_lt.h24
-rw-r--r--src/translator_lv.h40
-rw-r--r--src/translator_mk.h28
-rw-r--r--src/translator_nl.h52
-rwxr-xr-xsrc/translator_no.h24
-rw-r--r--src/translator_pl.h40
-rw-r--r--src/translator_pt.h50
-rw-r--r--src/translator_ro.h46
-rw-r--r--src/translator_ru.h46
-rw-r--r--src/translator_sc.h28
-rw-r--r--src/translator_si.h24
-rw-r--r--src/translator_sk.h48
-rw-r--r--src/translator_sr.h28
-rw-r--r--src/translator_sv.h50
-rw-r--r--src/translator_tr.h34
-rw-r--r--src/translator_tw.h46
-rw-r--r--src/translator_ua.h40
-rw-r--r--src/translator_vi.h28
-rw-r--r--src/translator_za.h28
-rw-r--r--src/types.h2
-rw-r--r--src/util.cpp822
-rw-r--r--src/util.h158
-rw-r--r--src/vhdlcode.h4
-rw-r--r--src/vhdlcode.l170
-rw-r--r--src/vhdldocgen.cpp265
-rw-r--r--src/vhdldocgen.h21
-rw-r--r--src/vhdljjparser.cpp30
-rwxr-xr-xsrc/vhdljjparser.h6
-rw-r--r--src/xmlcode.h4
-rw-r--r--src/xmlcode.l18
-rw-r--r--src/xmldocvisitor.cpp12
-rw-r--r--src/xmldocvisitor.h4
-rw-r--r--src/xmlgen.cpp118
-rw-r--r--src/xmlgen.h36
-rw-r--r--vhdlparser/VhdlParser.cc173
-rw-r--r--vhdlparser/VhdlParser.h2048
-rw-r--r--vhdlparser/VhdlParserTokenManager.cc4
-rw-r--r--vhdlparser/vhdl_adj.py2
-rwxr-xr-xvhdlparser/vhdlparser.jj186
262 files changed, 8715 insertions, 8540 deletions
diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp
index ec93ef7..e51966d 100644
--- a/addon/doxyapp/doxyapp.cpp
+++ b/addon/doxyapp/doxyapp.cpp
@@ -47,23 +47,21 @@ class XRefDummyCodeGenerator : public CodeOutputInterface
// these are just null functions, they can be used to produce a syntax highlighted
// and cross-linked version of the source code, but who needs that anyway ;-)
- void codify(const char *) {}
- void writeCodeLink(const char *,const char *,const char *,const char *,const char *) {}
- void writeLineNumber(const char *,const char *,const char *,int) {}
- virtual void writeTooltip(const char *,const DocLinkInfo &,
- const char *,const char *,const SourceLinkInfo &,
- const SourceLinkInfo &) {}
- void startCodeLine(bool) {}
- void endCodeLine() {}
- void startCodeAnchor(const char *) {}
- void endCodeAnchor() {}
- void startFontClass(const char *) {}
- void endFontClass() {}
- void writeCodeAnchor(const char *) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
- void startCodeFragment(const char *) {}
- void endCodeFragment(const char *) {}
+ void codify(const QCString &) override {}
+ void writeCodeLink(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &) override {}
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int) override {}
+ virtual void writeTooltip(const QCString &,const DocLinkInfo &,
+ const QCString &,const QCString &,const SourceLinkInfo &,
+ const SourceLinkInfo &) override {}
+ void startCodeLine(bool) override {}
+ void endCodeLine() override {}
+ void startFontClass(const QCString &) override {}
+ void endFontClass() override {}
+ void writeCodeAnchor(const QCString &) override {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ void addWord(const QCString &,bool) override {}
+ void startCodeFragment(const QCString &) override {}
+ void endCodeFragment(const QCString &) override {}
// here we are presented with the symbols found by the code parser
void linkableSymbol(int l, const char *sym,Definition *symDef,Definition *context)
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 3090783..65e7327 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -52,24 +52,21 @@ class Doxyparse : public CodeOutputInterface
// these are just null functions, they can be used to produce a syntax highlighted
// and cross-linked version of the source code, but who needs that anyway ;-)
- void codify(const char *) {}
- void writeCodeLink(const char *,const char *,const char *,const char *,const char *) {}
- void startCodeLine() {}
- void endCodeLine() {}
- void startCodeAnchor(const char *) {}
- void endCodeAnchor() {}
- void startFontClass(const char *) {}
- void endFontClass() {}
- void writeCodeAnchor(const char *) {}
- void writeLineNumber(const char *,const char *,const char *,int) {}
- virtual void writeTooltip(const char *,const DocLinkInfo &,
- const char *,const char *,const SourceLinkInfo &,
- const SourceLinkInfo &) {}
- void startCodeLine(bool) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
- void startCodeFragment(const char *) {}
- void endCodeFragment(const char *) {}
+ void codify(const QCString &) override {}
+ void writeCodeLink(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &) override {}
+ void startCodeLine(bool) override {}
+ void endCodeLine() override {}
+ void writeCodeAnchor(const QCString &) override {}
+ void startFontClass(const QCString &) override {}
+ void endFontClass() override {}
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int) override {}
+ virtual void writeTooltip(const QCString &,const DocLinkInfo &,
+ const QCString &,const QCString &,const SourceLinkInfo &,
+ const SourceLinkInfo &) override {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ void addWord(const QCString &,bool) override {}
+ void startCodeFragment(const QCString &) override {}
+ void endCodeFragment(const QCString &) override {}
void linkableSymbol(int l, const char *sym, Definition *symDef, Definition *context)
{
@@ -378,7 +375,7 @@ static bool checkLanguage(std::string& filename, std::string extension) {
* about whether it is a C project or not. */
static void detectProgrammingLanguage(FileNameLinkedMap &fnli) {
for (const auto &fn : fnli) {
- std::string filename = fn->fileName();
+ std::string filename = fn->fileName().str();
if (
checkLanguage(filename, ".cc") ||
checkLanguage(filename, ".cxx") ||
@@ -454,9 +451,9 @@ int main(int argc,char **argv) {
// we need a place to put intermediate files
std::ostringstream tmpdir;
unsigned int pid = Portable::pid();
- if (Portable::getenv("TMP"))
+ if (!Portable::getenv("TMP").isEmpty())
tmpdir << Portable::getenv("TMP") << "/doxyparse-" << pid;
- else if (Portable::getenv("TEMP"))
+ else if (!Portable::getenv("TEMP").isEmpty())
tmpdir << Portable::getenv("TEMP") << "/doxyparse-" << pid;
else
tmpdir << "doxyparse-" << pid;
diff --git a/src/cite.cpp b/src/cite.cpp
index 1773831..79b45da 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -35,13 +35,13 @@ const char *bibTmpDir = "bibTmpDir/";
class CiteInfoImpl : public CiteInfo
{
public:
- CiteInfoImpl(const char *label, const char *text=0)
+ CiteInfoImpl(const QCString &label, const QCString &text=QCString())
: m_label(label), m_text(text) { }
virtual QCString label() const { return m_label; }
virtual QCString text() const { return m_text; }
- void setText(const char *s) { m_text = s; }
+ void setText(const QCString &s) { m_text = s; }
private:
QCString m_label;
@@ -63,18 +63,18 @@ CitationManager::CitationManager() : p(new Private)
{
}
-void CitationManager::insert(const char *label)
+void CitationManager::insert(const QCString &label)
{
p->entries.insert(
std::make_pair(
- std::string(label),
+ label.str(),
std::make_unique<CiteInfoImpl>(label)
));
}
-const CiteInfo *CitationManager::find(const char *label) const
+const CiteInfo *CitationManager::find(const QCString &label) const
{
- auto it = p->entries.find(label);
+ auto it = p->entries.find(label.str());
if (it!=p->entries.end())
{
return it->second.get();
@@ -93,12 +93,12 @@ bool CitationManager::isEmpty() const
return (numFiles==0 || p->entries.empty());
}
-const char *CitationManager::fileName() const
+QCString CitationManager::fileName() const
{
return "citelist";
}
-const char *CitationManager::anchorPrefix() const
+QCString CitationManager::anchorPrefix() const
{
return "CITEREF_";
}
@@ -113,13 +113,13 @@ void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile)
FileInfo fi(bibFile.str());
if (!fi.exists())
{
- err("bib file %s not found!\n",bibFile.data());
+ err("bib file %s not found!\n",qPrint(bibFile));
return;
}
std::ifstream f(bibFile.str(), std::ifstream::in);
if (!f.is_open())
{
- err("could not open file %s for reading\n",bibFile.data());
+ err("could not open file %s for reading\n",qPrint(bibFile));
return;
}
@@ -130,7 +130,7 @@ void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile)
while (getline(f,lineStr))
{
int i;
- QCString line = lineStr;
+ QCString line(lineStr);
if (line.stripWhiteSpace().startsWith("@"))
{
// assumption entry like: "@book { name," or "@book { name" (spaces optional)
@@ -168,7 +168,7 @@ void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile)
}
}
}
- //printf("citeName = #%s#\n",citeName.data());
+ //printf("citeName = #%s#\n",qPrint(citeName));
}
else if ((i=line.find("crossref"))!=-1 && !citeName.isEmpty()) /* assumption cross reference is on one line and the only item */
{
@@ -179,8 +179,8 @@ void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile)
QCString crossrefName = line.mid((uint)(j+1),(uint)(k-j-1));
// check if the reference with the cross reference is used
// insert cross reference when cross reference has not yet been added.
- if ((p->entries.find(citeName.data())!=p->entries.end()) &&
- (p->entries.find(crossrefName.data())==p->entries.end())) // not found yet
+ if ((p->entries.find(citeName.str())!=p->entries.end()) &&
+ (p->entries.find(crossrefName.str())==p->entries.end())) // not found yet
{
insert(crossrefName);
}
@@ -214,7 +214,7 @@ void CitationManager::generatePage()
std::ofstream t(citeListFile.str(),std::ofstream::out | std::ofstream::binary);
if (!t.is_open())
{
- err("could not open file %s for writing\n",citeListFile.data());
+ err("could not open file %s for writing\n",qPrint(citeListFile));
}
t << "<!-- BEGIN CITATIONS -->\n";
t << "<!--\n";
@@ -246,7 +246,7 @@ void CitationManager::generatePage()
Dir thisDir;
if (!thisDir.exists(bibOutputDir.str()) && !thisDir.mkdir(bibOutputDir.str()))
{
- err("Failed to create temporary output directory '%s', skipping citations\n",bibOutputDir.data());
+ err("Failed to create temporary output directory '%s', skipping citations\n",qPrint(bibOutputDir));
return;
}
int i = 0;
@@ -273,8 +273,9 @@ void CitationManager::generatePage()
// bibliography in citelist.doc
int exitCode;
Portable::sysTimerStop();
- if ((exitCode=Portable::system("perl","\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+
- citeListFile+"\"" + (citeDebug ? " -d" : ""))) != 0)
+ QCString perlArgs = "\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+ citeListFile+"\"";
+ if (citeDebug) perlArgs+=" -d";
+ if ((exitCode=Portable::system("perl",perlArgs)) != 0)
{
err("Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: %d\n",
exitCode);
@@ -289,16 +290,16 @@ void CitationManager::generatePage()
std::ifstream f(citeListFile.str(),std::ifstream::in);
if (!f.is_open())
{
- err("could not open file %s for reading\n",citeListFile.data());
+ err("could not open file %s for reading\n",qPrint(citeListFile));
}
bool insideBib=FALSE;
- //printf("input=[%s]\n",input.data());
+ //printf("input=[%s]\n",qPrint(input));
std::string lineStr;
while (getline(f,lineStr))
{
- QCString line = lineStr;
- //printf("pos=%d s=%d line=[%s]\n",pos,s,line.data());
+ QCString line(lineStr);
+ //printf("pos=%d s=%d line=[%s]\n",pos,s,qPrint(line));
if (line.find("<!-- BEGIN BIBLIOGRAPHY")!=-1) insideBib=TRUE;
else if (line.find("<!-- END BIBLIOGRAPH")!=-1) insideBib=FALSE;
@@ -316,8 +317,8 @@ void CitationManager::generatePage()
QCString number = line.mid(uj+2,uk-uj-1);
label = substitute(substitute(label,"&ndash;","--"),"&mdash;","---");
line = line.left(ui+14) + label + line.right(line.length()-uj);
- auto it = p->entries.find(label.data());
- //printf("label='%s' number='%s' => %p\n",label.data(),number.data(),it->second.get());
+ auto it = p->entries.find(label.str());
+ //printf("label='%s' number='%s' => %p\n",qPrint(label),qPrint(number),it->second.get());
if (it!=p->entries.end())
{
it->second->setText(number);
@@ -326,7 +327,7 @@ void CitationManager::generatePage()
}
if (insideBib) doc+=line+"\n";
}
- //printf("doc=[%s]\n",doc.data());
+ //printf("doc=[%s]\n",qPrint(doc));
}
// 7. add it as a page
@@ -357,7 +358,7 @@ void CitationManager::generatePage()
}
else
{
- err("bib file %s not found!\n",bibFile.data());
+ err("bib file %s not found!\n",qPrint(bibFile));
}
}
}
diff --git a/src/cite.h b/src/cite.h
index 20783e4..499000b 100644
--- a/src/cite.h
+++ b/src/cite.h
@@ -40,12 +40,12 @@ class CitationManager
static CitationManager &instance();
/** Insert a citation identified by \a label into the database */
- void insert(const char *label);
+ void insert(const QCString &label);
/** Return the citation info for a given \a label.
* Ownership of the info stays with the manager.
*/
- const CiteInfo *find(const char *label) const;
+ const CiteInfo *find(const QCString &label) const;
/** Generate the citations page */
void generatePage();
@@ -61,8 +61,8 @@ class CitationManager
*/
QCString latexBibFiles();
- const char *fileName() const;
- const char *anchorPrefix() const;
+ QCString fileName() const;
+ QCString anchorPrefix() const;
private:
/** Create the database, with an expected maximum of \a size entries */
diff --git a/src/clangparser.cpp b/src/clangparser.cpp
index 431215b..6646adf 100644
--- a/src/clangparser.cpp
+++ b/src/clangparser.cpp
@@ -92,7 +92,7 @@ static QCString detab(const QCString &s)
return out.get();
}
-static QCString keywordToType(const char *keyword)
+static const char * keywordToType(const char *keyword)
{
static const StringUnorderedSet flowKeywords({
"break", "case", "catch", "continue", "default", "do",
@@ -263,7 +263,7 @@ void ClangTUParser::parse()
// provide the input and and its dependencies as unsaved files so we can
// pass the filtered versions
- argv[argc++]=qstrdup(fileName);
+ argv[argc++]=qstrdup(fileName.data());
}
//printf("source %s ----------\n%s\n-------------\n\n",
// fileName,p->source.data());
@@ -272,7 +272,7 @@ void ClangTUParser::parse()
p->sources.resize(numUnsavedFiles);
p->ufs.resize(numUnsavedFiles);
p->sources[0] = detab(fileToString(fileName,filterSourceFiles,TRUE));
- p->ufs[0].Filename = qstrdup(fileName);
+ p->ufs[0].Filename = qstrdup(fileName.data());
p->ufs[0].Contents = p->sources[0].data();
p->ufs[0].Length = p->sources[0].length();
p->fileMapping.insert({fileName.data(),0});
@@ -355,7 +355,7 @@ void ClangTUParser::switchToFile(const FileDef *fd)
p->tokens = 0;
p->numTokens = 0;
- CXFile f = clang_getFile(p->tu, fd->absFilePath());
+ CXFile f = clang_getFile(p->tu, fd->absFilePath().data());
auto it = p->fileMapping.find(fd->absFilePath().data());
if (it!=p->fileMapping.end() && it->second < p->numFiles)
{
@@ -517,7 +517,7 @@ void ClangTUParser::writeLineNumber(CodeOutputInterface &ol,const FileDef *fd,ui
}
else // no link
{
- ol.writeLineNumber(0,0,0,line);
+ ol.writeLineNumber(QCString(),QCString(),QCString(),line);
}
// set search page target
@@ -634,7 +634,7 @@ void ClangTUParser::linkInclude(CodeOutputInterface &ol,const FileDef *fd,
}
if (ifd)
{
- ol.writeCodeLink(ifd->getReference(),ifd->getOutputFileBase(),0,text,ifd->briefDescriptionAsTooltip());
+ ol.writeCodeLink(ifd->getReference(),ifd->getOutputFileBase(),QCString(),text,ifd->briefDescriptionAsTooltip());
}
else
{
diff --git a/src/classdef.cpp b/src/classdef.cpp
index f7af740..152c316 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -57,7 +57,7 @@ static QCString makeQualifiedNameWithTemplateParameters(const ClassDef *cd,
{
//static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
- //printf("qualifiedNameWithTemplateParameters() localName=%s\n",localName().data());
+ //printf("qualifiedNameWithTemplateParameters() localName=%s\n",qPrint(localName()));
QCString scName;
const Definition *d=cd->getOuterScope();
if (d)
@@ -100,7 +100,7 @@ static QCString makeQualifiedNameWithTemplateParameters(const ClassDef *cd,
}
}
}
- //printf("qualifiedNameWithTemplateParameters: scope=%s qualifiedName=%s\n",name().data(),scName.data());
+ //printf("qualifiedNameWithTemplateParameters: scope=%s qualifiedName=%s\n",qPrint(name()),qPrint(scName));
return scName;
}
@@ -142,7 +142,7 @@ static QCString makeDisplayName(const ClassDef *cd,bool includeScope)
//{
// n = n.left(n.length()-2);
//}
- //printf("ClassDefImpl::displayName()=%s\n",n.data());
+ //printf("ClassDefImpl::displayName()=%s\n",qPrint(n));
return n;
}
@@ -154,9 +154,9 @@ static QCString makeDisplayName(const ClassDef *cd,bool includeScope)
class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
{
public:
- ClassDefImpl(const char *fileName,int startLine,int startColumn,
- const char *name,CompoundType ct,
- const char *ref=0,const char *fName=0,
+ ClassDefImpl(const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,CompoundType ct,
+ const QCString &ref=QCString(),const QCString &fName=QCString(),
bool isSymbol=TRUE,bool isJavaEnum=FALSE);
/** Destroys a compound definition. */
~ClassDefImpl();
@@ -188,7 +188,6 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual bool isVisibleInHierarchy() const;
virtual bool visibleInParentsDeclList() const;
virtual const ArgumentList &templateArguments() const;
- //virtual NamespaceDef *getNamespaceDef() const;
virtual FileDef *getFileDef() const;
virtual const MemberDef *getMemberByName(const QCString &) const;
virtual bool isBaseClass(const ClassDef *bcd,bool followInstances,int level=0) const;
@@ -202,7 +201,7 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual const UsesClassList &usedByImplementationClasses() const;
virtual const ConstraintClassList &templateTypeConstraints() const;
virtual bool isTemplateArgument() const;
- virtual const Definition *findInnerCompound(const char *name) const;
+ virtual const Definition *findInnerCompound(const QCString &name) const;
virtual ArgumentLists getTemplateParameterLists() const;
virtual QCString qualifiedNameWithTemplateParameters(
const ArgumentLists *actualParams=0,uint *actualParamIndex=0) const;
@@ -243,12 +242,12 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
const QCString &templSpec,bool &freshInstance) const;
- virtual void insertBaseClass(ClassDef *,const char *name,Protection p,Specifier s,const char *t=0);
- virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const char *t=0);
- virtual void setIncludeFile(FileDef *fd,const char *incName,bool local,bool force);
+ virtual void insertBaseClass(ClassDef *,const QCString &name,Protection p,Specifier s,const QCString &t=QCString());
+ virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const QCString &t=QCString());
+ virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force);
virtual void insertMember(MemberDef *);
virtual void insertUsedFile(const FileDef *);
- virtual bool addExample(const char *anchor,const char *name, const char *file);
+ virtual bool addExample(const QCString &anchor,const QCString &name, const QCString &file);
virtual void mergeCategory(ClassDef *category);
//virtual void setNamespace(NamespaceDef *nd);
virtual void setFileDef(FileDef *fd);
@@ -256,23 +255,23 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual void setProtection(Protection p);
virtual void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
virtual void addInnerCompound(const Definition *d);
- virtual void addUsedClass(ClassDef *cd,const char *accessName,Protection prot);
- virtual void addUsedByClass(ClassDef *cd,const char *accessName,Protection prot);
+ virtual void addUsedClass(ClassDef *cd,const QCString &accessName,Protection prot);
+ virtual void addUsedByClass(ClassDef *cd,const QCString &accessName,Protection prot);
virtual void setIsStatic(bool b);
virtual void setCompoundType(CompoundType t);
- virtual void setClassName(const char *name);
+ virtual void setClassName(const QCString &name);
virtual void setClassSpecifier(uint64 spec);
virtual void setTemplateArguments(const ArgumentList &al);
virtual void setTemplateBaseClassNames(const TemplateNameMap &templateNames);
virtual void setTemplateMaster(const ClassDef *tm);
virtual void setTypeConstraints(const ArgumentList &al);
- virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const char *templSpec);
+ virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const QCString &templSpec);
virtual void makeTemplateArgument(bool b=TRUE);
virtual void setCategoryOf(ClassDef *cd);
virtual void setUsedOnly(bool b);
virtual void setTagLessReference(const ClassDef *cd);
- virtual void setName(const char *name);
- virtual void setMetaData(const char *md);
+ virtual void setName(const QCString &name);
+ virtual void setMetaData(const QCString &md);
virtual void findSectionsInDocumentation();
virtual void addMembersToMemberGroup();
virtual void addListReferences();
@@ -286,13 +285,13 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
virtual void writeMemberPages(OutputList &ol) const;
virtual void writeMemberList(OutputList &ol) const;
virtual void writeDeclaration(OutputList &ol,const MemberDef *md,bool inGroup,
- const ClassDef *inheritedFrom,const char *inheritId) const;
+ const ClassDef *inheritedFrom,const QCString &inheritId) const;
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *md) const;
virtual void writeSummaryLinks(OutputList &ol) const;
virtual void reclassifyMember(MemberDefMutable *md,MemberType t);
virtual void writeInlineDocumentation(OutputList &ol) const;
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const;
+ const QCString &header,bool localNames) const;
virtual void removeMemberFromLists(MemberDef *md);
virtual void setAnonymousEnumType();
virtual void countMembers();
@@ -308,12 +307,13 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
int lt2,bool invert,bool showAlways,ClassDefSet &visitedClasses) const;
virtual void writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedClasses,
MemberListType lt,const QCString &title,
- const char *subTitle=0,bool showInline=FALSE,const ClassDef *inheritedFrom=0,
+ const QCString &subTitle=QCString(),
+ bool showInline=FALSE,const ClassDef *inheritedFrom=0,
int lt2=-1,bool invert=FALSE,bool showAlways=FALSE) const;
- virtual void setRequiresClause(const char *req);
+ virtual void setRequiresClause(const QCString &req);
private:
- void addUsedInterfaceClasses(MemberDef *md,const char *typeStr);
+ void addUsedInterfaceClasses(MemberDef *md,const QCString &typeStr);
void showUsedFiles(OutputList &ol) const;
void writeDocumentationContents(OutputList &ol,const QCString &pageTitle) const;
@@ -325,7 +325,7 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
bool showAlways) const;
void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline=FALSE) const;
void writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt) const;
- void writePlainMemberDeclaration(OutputList &ol,MemberListType lt,bool inGroup,const ClassDef *inheritedFrom,const char *inheritId) const;
+ void writePlainMemberDeclaration(OutputList &ol,MemberListType lt,bool inGroup,const ClassDef *inheritedFrom,const QCString &inheritId) const;
void writeBriefDescription(OutputList &ol,bool exampleFlag) const;
void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag,
const QCString &title,const QCString &anchor=QCString()) const;
@@ -364,9 +364,9 @@ class ClassDefImpl : public DefinitionMixin<ClassDefMutable>
};
ClassDefMutable *createClassDef(
- const char *fileName,int startLine,int startColumn,
- const char *name,ClassDef::CompoundType ct,
- const char *ref,const char *fName,
+ const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,ClassDef::CompoundType ct,
+ const QCString &ref,const QCString &fName,
bool isSymbol,bool isJavaEnum)
{
return new ClassDefImpl(fileName,startLine,startColumn,name,ct,ref,fName,isSymbol,isJavaEnum);
@@ -458,7 +458,7 @@ class ClassDefAliasImpl : public DefinitionAliasMixin<ClassDef>
{ return getCdAlias()->templateTypeConstraints(); }
virtual bool isTemplateArgument() const
{ return getCdAlias()->isTemplateArgument(); }
- virtual const Definition *findInnerCompound(const char *name) const
+ virtual const Definition *findInnerCompound(const QCString &name) const
{ return getCdAlias()->findInnerCompound(name); }
virtual ArgumentLists getTemplateParameterLists() const
{ return getCdAlias()->getTemplateParameterLists(); }
@@ -543,7 +543,7 @@ class ClassDefAliasImpl : public DefinitionAliasMixin<ClassDef>
{ return getCdAlias()->countMemberDeclarations(lt,inheritedFrom,lt2,invert,showAlways,visitedClasses); }
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const
+ const QCString &header,bool localNames) const
{ getCdAlias()->writeDeclarationLink(ol,found,header,localNames); }
virtual ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
const QCString &templSpec,bool &freshInstance) const
@@ -557,8 +557,8 @@ ClassDef *createClassDefAlias(const Definition *newScope,const ClassDef *cd)
{
ClassDef *acd = new ClassDefAliasImpl(newScope,cd);
//printf("cd name=%s localName=%s qualifiedName=%s qualifiedNameWith=%s displayName()=%s\n",
- // acd->name().data(),acd->localName().data(),acd->qualifiedName().data(),
- // acd->qualifiedNameWithTemplateParameters().data(),acd->displayName().data());
+ // qPrint(acd->name()),qPrint(acd->localName()),qPrint(acd->qualifiedName()),
+ // qPrint(acd->qualifiedNameWithTemplateParameters()),qPrint(acd->displayName()));
return acd;
}
@@ -570,8 +570,8 @@ class ClassDefImpl::IMPL
public:
IMPL();
~IMPL();
- void init(const char *defFileName, const char *name,
- const QCString &ctStr, const char *fName);
+ void init(const QCString &defFileName, const QCString &name,
+ const QCString &ctStr, const QCString &fName);
/*! file name that forms the base for the output file containing the
* class documentation. For compatibility with Qt (e.g. links via tag
@@ -713,10 +713,10 @@ class ClassDefImpl::IMPL
QCString requiresClause;
};
-void ClassDefImpl::IMPL::init(const char *defFileName, const char *name,
- const QCString &ctStr, const char *fName)
+void ClassDefImpl::IMPL::init(const QCString &defFileName, const QCString &name,
+ const QCString &ctStr, const QCString &fName)
{
- if (fName)
+ if (!fName.isEmpty())
{
fileName=stripExtension(fName);
}
@@ -741,7 +741,7 @@ void ClassDefImpl::IMPL::init(const char *defFileName, const char *name,
spec=0;
//QCString ns;
//extractNamespaceName(name,className,ns);
- //printf("m_name=%s m_className=%s ns=%s\n",m_name.data(),m_className.data(),ns.data());
+ //printf("m_name=%s m_className=%s ns=%s\n",qPrint(m_name),qPrint(m_className),qPrint(ns));
// we cannot use getLanguage at this point, as setLanguage has not been called.
SrcLangExt lang = getLanguageFromFileName(defFileName);
@@ -768,9 +768,9 @@ ClassDefImpl::IMPL::~IMPL()
// constructs a new class definition
ClassDefImpl::ClassDefImpl(
- const char *defFileName,int defLine,int defColumn,
- const char *nm,CompoundType ct,
- const char *lref,const char *fName,
+ const QCString &defFileName,int defLine,int defColumn,
+ const QCString &nm,CompoundType ct,
+ const QCString &lref,const QCString &fName,
bool isSymbol,bool isJavaEnum)
: DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),0,0,isSymbol)
{
@@ -782,7 +782,7 @@ ClassDefImpl::ClassDefImpl(
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)
+ if (lref.isEmpty())
{
m_impl->fileName = convertNameToFile(m_impl->fileName);
}
@@ -805,22 +805,22 @@ QCString ClassDefImpl::displayName(bool includeScope) const
}
// inserts a base/super class in the inheritance list
-void ClassDefImpl::insertBaseClass(ClassDef *cd,const char *n,Protection p,
- Specifier s,const char *t)
+void ClassDefImpl::insertBaseClass(ClassDef *cd,const QCString &n,Protection p,
+ Specifier s,const QCString &t)
{
- //printf("*** insert base class %s into %s\n",cd->name().data(),name().data());
+ //printf("*** insert base class %s into %s\n",qPrint(cd->name()),qPrint(name()));
m_impl->inherits.push_back(BaseClassDef(cd,n,p,s,t));
m_impl->isSimple = FALSE;
}
// inserts a derived/sub class in the inherited-by list
void ClassDefImpl::insertSubClass(ClassDef *cd,Protection p,
- Specifier s,const char *t)
+ Specifier s,const QCString &t)
{
- //printf("*** insert sub class %s into %s\n",cd->name().data(),name().data());
+ //printf("*** insert sub class %s into %s\n",qPrint(cd->name()),qPrint(name()));
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (!extractPrivate && cd->protection()==Private) return;
- m_impl->inheritedBy.push_back(BaseClassDef(cd,0,p,s,t));
+ m_impl->inheritedBy.push_back(BaseClassDef(cd,QCString(),p,s,t));
m_impl->isSimple = FALSE;
}
@@ -839,7 +839,7 @@ void ClassDefImpl::addMembersToMemberGroup()
{
if (mg->allMembersInSameSection() && m_impl->subGrouping)
{
- //printf("addToDeclarationSection(%s)\n",mg->header().data());
+ //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
mg->addToDeclarationSection();
}
}
@@ -851,7 +851,7 @@ void ClassDefImpl::internalInsertMember(const MemberDef *md,
bool addToAllList
)
{
- //printf("insertInternalMember(%s) isHidden()=%d\n",md->name().data(),md->isHidden());
+ //printf("insertInternalMember(%s) isHidden()=%d\n",qPrint(md->name()),md->isHidden());
if (md->isHidden()) return;
if (getLanguage()==SrcLangExt_VHDL)
@@ -1021,7 +1021,7 @@ void ClassDefImpl::internalInsertMember(const MemberDef *md,
{
m_impl->isSimple = FALSE;
}
- //printf("adding %s simple=%d total_simple=%d\n",name().data(),isSimple,m_impl->isSimple);
+ //printf("adding %s simple=%d total_simple=%d\n",qPrint(name()),isSimple,m_impl->isSimple);
/*******************************************************/
/* insert member in the detailed documentation section */
@@ -1089,7 +1089,7 @@ void ClassDefImpl::internalInsertMember(const MemberDef *md,
break;
case MemberType_Define:
warn(md->getDefFileName(),md->getDefLine()-1,"A define (%s) cannot be made a member of %s",
- md->name().data(), this->name().data());
+ qPrint(md->name()), qPrint(this->name()));
break;
default:
err("Unexpected member type %d found!\n",md->memberType());
@@ -1126,7 +1126,7 @@ void ClassDefImpl::internalInsertMember(const MemberDef *md,
QCString(md->typeString())=="friend struct" ||
QCString(md->typeString())=="friend union")))
{
- //printf("=======> adding member %s to class %s\n",md->name().data(),name().data());
+ //printf("=======> adding member %s to class %s\n",qPrint(md->name()),qPrint(name()));
MemberNameInfo *mni = m_impl->allMemberNameInfoLinkedMap.add(md->name());
mni->push_back(std::make_unique<MemberInfo>(md,prot,md->virtualness(),FALSE));
@@ -1223,11 +1223,11 @@ static void writeInheritanceSpecifier(OutputList &ol,const BaseClassDef &bcd)
}
void ClassDefImpl::setIncludeFile(FileDef *fd,
- const char *includeName,bool local, bool force)
+ const QCString &includeName,bool local, bool force)
{
//printf("ClassDefImpl::setIncludeFile(%p,%s,%d,%d)\n",fd,includeName,local,force);
if (!m_impl->incInfo) m_impl->incInfo = std::make_unique<IncludeInfo>();
- if ((includeName && m_impl->incInfo->includeName.isEmpty()) ||
+ if ((!includeName.isEmpty() && m_impl->incInfo->includeName.isEmpty()) ||
(fd!=0 && m_impl->incInfo->fileDef==0)
)
{
@@ -1236,7 +1236,7 @@ void ClassDefImpl::setIncludeFile(FileDef *fd,
m_impl->incInfo->includeName = includeName;
m_impl->incInfo->local = local;
}
- if (force && includeName)
+ if (force && !includeName.isEmpty())
{
m_impl->incInfo->includeName = includeName;
m_impl->incInfo->local = local;
@@ -1362,7 +1362,7 @@ void ClassDefImpl::writeBriefDescription(OutputList &ol,bool exampleFlag) const
ol.writeString(" - ");
ol.popGeneratorState();
ol.generateDoc(briefFile(),briefLine(),this,0,
- briefDescription(),TRUE,FALSE,0,
+ briefDescription(),TRUE,FALSE,QCString(),
TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
@@ -1395,7 +1395,7 @@ void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const
if (!briefDescription().isEmpty() && repeatBrief)
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!briefDescription().isEmpty() && repeatBrief &&
!documentation().isEmpty())
@@ -1409,7 +1409,7 @@ void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// write type constraints
writeTypeConstraints(ol,this,m_impl->typeConstraints);
@@ -1452,7 +1452,7 @@ void ClassDefImpl::writeDetailedDescription(OutputList &ol, const QCString &/*pa
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,anchor.isEmpty() ? QCString("details") : anchor);
+ ol.writeAnchor(QCString(),anchor.isEmpty() ? QCString("details") : anchor);
ol.popGeneratorState();
if (!anchor.isEmpty())
@@ -1552,12 +1552,11 @@ void ClassDefImpl::showUsedFiles(OutputList &ol) const
ol.disableAllBut(OutputGenerator::Html);
if (fd->generateSourceFile())
{
- ol.writeObjectLink(0,fd->getSourceFileBase(),0,fname);
+ ol.writeObjectLink(QCString(),fd->getSourceFileBase(),QCString(),fname);
}
else if (fd->isLinkable())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,
- fname);
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
}
else
{
@@ -1570,8 +1569,7 @@ void ClassDefImpl::showUsedFiles(OutputList &ol) const
ol.disable(OutputGenerator::Html);
if (fd->isLinkable())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,
- fname);
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
}
else
{
@@ -1616,7 +1614,7 @@ void ClassDefImpl::writeInheritanceGraph(OutputList &ol) const
if (inheritanceGraph.isTooBig())
{
warn_uncond("Inheritance graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
- name().data(), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
+ qPrint(name()), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!inheritanceGraph.isTrivial())
{
@@ -1787,7 +1785,7 @@ void ClassDefImpl::writeIncludeFilesForSlice(OutputList &ol) const
if (nm.isEmpty())
{
- nm = m_impl->incInfo->includeName.data();
+ nm = m_impl->incInfo->includeName;
}
ol.startParagraph();
@@ -1796,7 +1794,7 @@ void ClassDefImpl::writeIncludeFilesForSlice(OutputList &ol) const
ol.docify("<");
if (m_impl->incInfo->fileDef)
{
- ol.writeObjectLink(0,m_impl->incInfo->fileDef->includeName(),0,nm);
+ ol.writeObjectLink(QCString(),m_impl->incInfo->fileDef->includeName(),QCString(),nm);
}
else
{
@@ -1896,9 +1894,9 @@ void ClassDefImpl::writeIncludeFiles(OutputList &ol) const
SrcLangExt lang = getLanguage();
QCString nm=m_impl->incInfo->includeName.isEmpty() ?
(m_impl->incInfo->fileDef ?
- m_impl->incInfo->fileDef->docName().data() : ""
+ m_impl->incInfo->fileDef->docName() : QCString()
) :
- m_impl->incInfo->includeName.data();
+ m_impl->incInfo->includeName;
if (!nm.isEmpty())
{
ol.startParagraph();
@@ -1916,7 +1914,7 @@ void ClassDefImpl::writeIncludeFiles(OutputList &ol) const
ol.enable(OutputGenerator::Html);
if (m_impl->incInfo->fileDef)
{
- ol.writeObjectLink(0,m_impl->incInfo->fileDef->includeName(),0,nm);
+ ol.writeObjectLink(QCString(),m_impl->incInfo->fileDef->includeName(),QCString(),nm);
}
else
{
@@ -1946,7 +1944,7 @@ void ClassDefImpl::writeMemberGroups(OutputList &ol,bool showInline) const
}
else // add this group to the corresponding member section
{
- //printf("addToDeclarationSection(%s)\n",mg->header().data());
+ //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
//mg->addToDeclarationSection();
}
}
@@ -1965,7 +1963,7 @@ void ClassDefImpl::writeInlineClasses(OutputList &ol) const
void ClassDefImpl::startMemberDocumentation(OutputList &ol) const
{
- //printf("%s: ClassDefImpl::startMemberDocumentation()\n",name().data());
+ //printf("%s: ClassDefImpl::startMemberDocumentation()\n",qPrint(name()));
if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.disable(OutputGenerator::Html);
@@ -1975,7 +1973,7 @@ void ClassDefImpl::startMemberDocumentation(OutputList &ol) const
void ClassDefImpl::endMemberDocumentation(OutputList &ol) const
{
- //printf("%s: ClassDefImpl::endMemberDocumentation()\n",name().data());
+ //printf("%s: ClassDefImpl::endMemberDocumentation()\n",qPrint(name()));
if (Config_getBool(SEPARATE_MEMBER_PAGES))
{
ol.enable(OutputGenerator::Html);
@@ -1985,13 +1983,13 @@ void ClassDefImpl::endMemberDocumentation(OutputList &ol) const
void ClassDefImpl::startMemberDeclarations(OutputList &ol) const
{
- //printf("%s: ClassDefImpl::startMemberDeclarations()\n",name().data());
+ //printf("%s: ClassDefImpl::startMemberDeclarations()\n",qPrint(name()));
ol.startMemberSections();
}
void ClassDefImpl::endMemberDeclarations(OutputList &ol) const
{
- //printf("%s: ClassDefImpl::endMemberDeclarations()\n",name().data());
+ //printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
{
@@ -2032,7 +2030,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
)
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
- ol.writeSummaryLink(0,"nested-classes",ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),"nested-classes",ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
@@ -2049,7 +2047,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE;
}
}
@@ -2059,7 +2057,7 @@ void ClassDefImpl::writeSummaryLinks(OutputList &ol) const
{
for (const auto &s : m_impl->vhdlSummaryTitles)
{
- ol.writeSummaryLink(0,convertToId(s.c_str()),s.c_str(),first);
+ ol.writeSummaryLink(QCString(),convertToId(QCString(s)),QCString(s),first);
first=FALSE;
}
}
@@ -2175,8 +2173,8 @@ void ClassDefImpl::writeInlineDocumentation(OutputList &ol) const
{
bool isSimple = m_impl->isSimple;
- ol.addIndexItem(name(),0);
- //printf("ClassDefImpl::writeInlineDocumentation(%s)\n",name().data());
+ ol.addIndexItem(name(),QCString());
+ //printf("ClassDefImpl::writeInlineDocumentation(%s)\n",qPrint(name()));
// part 1: anchor and title
QCString s = compoundTypeString()+" "+name();
@@ -2185,8 +2183,8 @@ void ClassDefImpl::writeInlineDocumentation(OutputList &ol) const
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
{ // only HTML only
- ol.writeAnchor(0,anchor());
- ol.startMemberDoc(0,0,anchor(),name(),1,1,FALSE);
+ ol.writeAnchor(QCString(),anchor());
+ ol.startMemberDoc(QCString(),QCString(),anchor(),name(),1,1,FALSE);
ol.startMemberDocName(FALSE);
ol.parseText(s);
ol.endMemberDocName();
@@ -2342,7 +2340,7 @@ bool ClassDefImpl::visibleInParentsDeclList() const
);
}
-void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *header,bool localNames) const
+void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCString &header,bool localNames) const
{
//static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
//static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
@@ -2375,7 +2373,7 @@ void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *h
{
ol.startMemberHeader("nested-classes");
}
- if (header)
+ if (!header.isEmpty())
{
ol.parseText(header);
}
@@ -2435,7 +2433,7 @@ void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *h
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startMemberDescription(anchor());
@@ -2448,7 +2446,7 @@ void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *h
}
delete rootNode;
}
- ol.endMemberDeclaration(anchor(),0);
+ ol.endMemberDeclaration(anchor(),QCString());
}
}
@@ -2855,9 +2853,9 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
}
ol.endQuickIndices();
}
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(displayName()+" "+theTranslator->trMemberList());
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startParagraph();
ol.parseText(theTranslator->trThisIsTheListOfAllMembers());
@@ -2879,7 +2877,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
Specifier virt=md->virtualness();
//printf("%s: Member %s of class %s md->protection()=%d mi->prot=%d prot=%d inherited=%d\n",
- // name().data(),md->name().data(),cd->name().data(),md->protection(),mi->prot,prot,mi->inherited);
+ // qPrint(name()),qPrint(md->name()),qPrint(cd->name()),md->protection(),mi->prot,prot,mi->inherited);
if (cd && !md->name().isEmpty() && !md->isAnonymous())
{
@@ -2925,7 +2923,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
md->anchor(),name);
if ( md->isFunction() || md->isSignal() || md->isSlot() ||
- (md->isFriend() && md->argsString()))
+ (md->isFriend() && md->argsString().isEmpty()))
ol.docify(md->argsString());
else if (md->isEnumerate())
ol.parseText(" "+theTranslator->trEnumName());
@@ -2933,7 +2931,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
ol.parseText(" "+theTranslator->trEnumValue());
else if (md->isTypedef())
ol.docify(" typedef");
- else if (md->isFriend() && !qstrcmp(md->typeString(),"friend class"))
+ else if (md->isFriend() && md->typeString()=="friend class")
ol.docify(" class");
//ol.writeString("\n");
}
@@ -3094,7 +3092,7 @@ void ClassDefImpl::writeMemberList(OutputList &ol) const
}
// add a reference to an example
-bool ClassDefImpl::addExample(const char *anchor,const char *nameStr, const char *file)
+bool ClassDefImpl::addExample(const QCString &anchor,const QCString &nameStr, const QCString &file)
{
return m_impl->examples.inSort(Example(anchor,nameStr,file));
}
@@ -3107,7 +3105,7 @@ bool ClassDefImpl::hasExamples() const
void ClassDefImpl::addTypeConstraint(const QCString &typeConstraint,const QCString &type)
{
- //printf("addTypeConstraint(%s,%s)\n",type.data(),typeConstraint.data());
+ //printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
static bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
if (typeConstraint.isEmpty() || type.isEmpty()) return;
SymbolResolver resolver(getFileDef());
@@ -3127,7 +3125,7 @@ void ClassDefImpl::addTypeConstraint(const QCString &typeConstraint,const QCStri
cd->setUsedOnly(TRUE);
cd->setLanguage(getLanguage());
//printf("Adding undocumented constraint '%s' to class %s on type %s\n",
- // typeConstraint.data(),name().data(),type.data());
+ // qPrint(typeConstraint),qPrint(name()),qPrint(type));
}
}
if (cd)
@@ -3143,7 +3141,7 @@ void ClassDefImpl::addTypeConstraint(const QCString &typeConstraint,const QCStri
}
(*it).addAccessor(type);
//printf("Adding constraint '%s' to class %s on type %s\n",
- // typeConstraint.data(),name().data(),type.data());
+ // qPrint(typeConstraint),qPrint(name()),qPrint(type));
}
}
@@ -3217,7 +3215,7 @@ QCString ClassDefImpl::requiresClause() const
return m_impl->requiresClause;
}
-void ClassDefImpl::setRequiresClause(const char *req)
+void ClassDefImpl::setRequiresClause(const QCString &req)
{
m_impl->requiresClause = req;
}
@@ -3226,9 +3224,9 @@ void ClassDefImpl::setRequiresClause(const char *req)
* definition of an anonymous struct, union or class.
*/
void ClassDefImpl::writeDeclaration(OutputList &ol,const MemberDef *md,bool inGroup,
- const ClassDef *inheritedFrom,const char *inheritId) const
+ const ClassDef *inheritedFrom,const QCString &inheritId) const
{
- //printf("ClassName='%s' inGroup=%d\n",name().data(),inGroup);
+ //printf("ClassName='%s' inGroup=%d\n",qPrint(name()),inGroup);
ol.docify(compoundTypeString());
QCString cn = displayName(FALSE);
@@ -3237,7 +3235,7 @@ void ClassDefImpl::writeDeclaration(OutputList &ol,const MemberDef *md,bool inGr
ol.docify(" ");
if (md && isLinkable())
{
- ol.writeObjectLink(0,0,md->anchor(),cn);
+ ol.writeObjectLink(QCString(),QCString(),md->anchor(),cn);
}
else
{
@@ -3338,7 +3336,7 @@ bool ClassDefImpl::hasDocumentation() const
bool ClassDefImpl::isBaseClass(const ClassDef *bcd, bool followInstances,int level) const
{
bool found=FALSE;
- //printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
+ //printf("isBaseClass(cd=%s) looking for %s\n",qPrint(name()),qPrint(bcd->name()));
if (level>256)
{
err("Possible recursive class relation while inside %s and looking for base class %s\n",qPrint(name()),qPrint(bcd->name()));
@@ -3398,7 +3396,7 @@ void ClassDefImpl::mergeMembers()
uint sepLen = sep.length();
m_impl->membersMerged=TRUE;
- //printf(" mergeMembers for %s\n",name().data());
+ //printf(" mergeMembers for %s\n",qPrint(name()));
static bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
for (const auto &bcd : baseClasses())
@@ -3435,7 +3433,7 @@ void ClassDefImpl::mergeMembers()
if (srcMd!=dstMd) // different members
{
const ClassDef *dstCd = dstMd->getClassDef();
- //printf(" Is %s a base class of %s?\n",srcCd->name().data(),dstCd->name().data());
+ //printf(" Is %s a base class of %s?\n",qPrint(srcCd->name()),qPrint(dstCd->name()));
if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE))
// member is in the same or a base class
{
@@ -3447,8 +3445,8 @@ void ClassDefImpl::mergeMembers()
TRUE
);
//printf(" Yes, matching (%s<->%s): %d\n",
- // argListToString(srcMd->argumentList()).data(),
- // argListToString(dstMd->argumentList()).data(),
+ // qPrint(argListToString(srcMd->argumentList())),
+ // qPrint(argListToString(dstMd->argumentList())),
// found);
hidden = hidden || !found;
}
@@ -3456,9 +3454,9 @@ void ClassDefImpl::mergeMembers()
// using the same base class.
{
//printf("$$ Existing member %s %s add scope %s\n",
- // dstMi->ambiguityResolutionScope.data(),
- // dstMd->name().data(),
- // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
+ // qPrint(dstMi->ambiguityResolutionScope),
+ // qPrint(dstMd->name()),
+ // qPrint(dstMi->scopePath.left(dstMi->scopePath.find("::")+2));
QCString scope=dstMi->scopePath().left((uint)dstMi->scopePath().find(sep)+sepLen);
if (scope!=dstMi->ambiguityResolutionScope().left(scope.length()))
@@ -3485,9 +3483,9 @@ void ClassDefImpl::mergeMembers()
// inheritance tree
{
//printf("$$ Existing member %s %s add scope %s\n",
- // dstMi->ambiguityResolutionScope.data(),
- // dstMd->name().data(),
- // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
+ // qPrint(dstMi->ambiguityResolutionScope),
+ // qPrint(dstMd->name()),
+ // qPrint(dstMi->scopePath.left(dstMi->scopePath.find("::")+2));
QCString scope=dstMi->scopePath().left((uint)dstMi->scopePath().find(sep)+sepLen);
if (scope!=dstMi->ambiguityResolutionScope().left(scope.length()))
@@ -3500,7 +3498,7 @@ void ClassDefImpl::mergeMembers()
if (found) break;
}
//printf("member %s::%s hidden %d ambiguous %d srcMi->ambigClass=%p\n",
- // srcCd->name().data(),srcMd->name().data(),hidden,ambiguous,srcMi->ambigClass);
+ // qPrint(srcCd->name()),qPrint(srcMd->name()),hidden,ambiguous,srcMi->ambigClass);
// TODO: fix the case where a member is hidden by inheritance
// of a member with the same name but with another prototype,
@@ -3519,7 +3517,7 @@ void ClassDefImpl::mergeMembers()
{
if (!isStandardFunc(srcMd))
{
- //printf(" insertMember '%s'\n",srcMd->name().data());
+ //printf(" insertMember '%s'\n",qPrint(srcMd->name()));
internalInsertMember(srcMd,prot,FALSE);
}
}
@@ -3532,9 +3530,9 @@ void ClassDefImpl::mergeMembers()
if (ambiguous)
{
//printf("$$ New member %s %s add scope %s::\n",
- // srcMi->ambiguityResolutionScope.data(),
- // srcMd->name().data(),
- // bClass->name().data());
+ // qPrint(srcMi->ambiguityResolutionScope),
+ // qPrint(srcMd->name()),
+ // qPrint(bClass->name()));
QCString scope=bClass->name()+sep;
if (scope!=srcMi->ambiguityResolutionScope().left(scope.length()))
@@ -3580,7 +3578,7 @@ void ClassDefImpl::mergeMembers()
prot=Private;
}
//printf("%s::%s: prot=%d bcd.prot=%d result=%d\n",
- // name().data(),mi->memberDef->name().data(),mi->prot,
+ // qPrint(name()),qPrint(mi->memberDef->name()),mi->prot,
// bcd.prot,prot);
if (prot!=Private || extractPrivate)
@@ -3592,7 +3590,7 @@ void ClassDefImpl::mergeMembers()
{
if (!isStandardFunc(mi->memberDef()))
{
- //printf(" insertMember '%s'\n",mi->memberDef->name().data());
+ //printf(" insertMember '%s'\n",qPrint(mi->memberDef->name()));
internalInsertMember(mi->memberDef(),prot,FALSE);
}
}
@@ -3651,7 +3649,7 @@ void ClassDefImpl::mergeCategory(ClassDef *cat)
}
}
// make methods private for categories defined in the .m file
- //printf("%s::mergeCategory makePrivate=%d\n",name().data(),makePrivate);
+ //printf("%s::mergeCategory makePrivate=%d\n",qPrint(name()),makePrivate);
const MemberNameInfoLinkedMap &srcMnd = category->memberNameInfoLinkedMap();
MemberNameInfoLinkedMap &dstMnd = m_impl->allMemberNameInfoLinkedMap;
@@ -3686,13 +3684,13 @@ void ClassDefImpl::mergeCategory(ClassDef *cat)
// copy the member(s) from the category to this class
for (auto &mi : *srcMni)
{
- //printf("Adding '%s'\n",mi->memberDef->name().data());
+ //printf("Adding '%s'\n",qPrint(mi->memberDef->name()));
Protection prot = mi->prot();
//if (makePrivate) prot = Private;
std::unique_ptr<MemberDefMutable> newMd { toMemberDefMutable(mi->memberDef()->deepCopy()) };
if (newMd)
{
- //printf("Copying member %s\n",mi->memberDef->name().data());
+ //printf("Copying member %s\n",qPrint(mi->memberDef->name()));
newMd->moveTo(this);
std::unique_ptr<MemberInfo> newMi=std::make_unique<MemberInfo>(newMd.get(),prot,mi->virt(),mi->inherited());
@@ -3731,13 +3729,13 @@ void ClassDefImpl::mergeCategory(ClassDef *cat)
//----------------------------------------------------------------------------
-void ClassDefImpl::addUsedClass(ClassDef *cd,const char *accessName,
+void ClassDefImpl::addUsedClass(ClassDef *cd,const QCString &accessName,
Protection prot)
{
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);
+ //printf("%s::addUsedClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
auto it = std::find_if(m_impl->usesImplClassList.begin(),
m_impl->usesImplClassList.end(),
@@ -3746,7 +3744,7 @@ void ClassDefImpl::addUsedClass(ClassDef *cd,const char *accessName,
{
m_impl->usesImplClassList.emplace_back(cd);
//printf("Adding used class %s to class %s via accessor %s\n",
- // cd->name().data(),name().data(),accessName);
+ // qPrint(cd->name()),qPrint(name()),accessName);
it = m_impl->usesImplClassList.end()-1;
}
QCString acc = accessName;
@@ -3763,13 +3761,13 @@ void ClassDefImpl::addUsedClass(ClassDef *cd,const char *accessName,
(*it).addAccessor(acc);
}
-void ClassDefImpl::addUsedByClass(ClassDef *cd,const char *accessName,
+void ClassDefImpl::addUsedByClass(ClassDef *cd,const QCString &accessName,
Protection prot)
{
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);
+ //printf("%s::addUsedByClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
//
auto it = std::find_if(m_impl->usedByImplClassList.begin(),
m_impl->usedByImplClassList.end(),
@@ -3778,7 +3776,7 @@ void ClassDefImpl::addUsedByClass(ClassDef *cd,const char *accessName,
{
m_impl->usedByImplClassList.emplace_back(cd);
//printf("Adding used by class %s to class %s\n",
- // cd->name().data(),name().data());
+ // qPrint(cd->name()),qPrint(name()));
it = m_impl->usedByImplClassList.end()-1;
}
QCString acc = accessName;
@@ -3887,7 +3885,7 @@ QCString ClassDefImpl::getSourceFileBase() const
void ClassDefImpl::setGroupDefForAllMembers(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs)
{
gd->addClass(this);
- //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",gd->name().data());
+ //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
for (auto &mni : m_impl->allMemberNameInfoLinkedMap)
{
for (auto &mi : *mni)
@@ -3906,7 +3904,7 @@ void ClassDefImpl::setGroupDefForAllMembers(GroupDef *gd,Grouping::GroupPri_t pr
void ClassDefImpl::addInnerCompound(const Definition *d)
{
- //printf("**** %s::addInnerCompound(%s)\n",name().data(),d->name().data());
+ //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
if (d->definitionType()==Definition::TypeClass) // only classes can be
// nested in classes.
{
@@ -3914,7 +3912,7 @@ void ClassDefImpl::addInnerCompound(const Definition *d)
}
}
-const Definition *ClassDefImpl::findInnerCompound(const char *name) const
+const Definition *ClassDefImpl::findInnerCompound(const QCString &name) const
{
return m_impl->innerClasses.find(name);
}
@@ -3987,9 +3985,9 @@ const TemplateNameMap &ClassDefImpl::getTemplateBaseClassNames() const
return m_impl->templBaseClassNames;
}
-void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const char *templSpec)
+void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const QCString &templSpec)
{
- //printf("%s::addMembersToTemplateInstance(%s,%s)\n",name().data(),cd->name().data(),templSpec);
+ //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
for (const auto &mni : cd->memberNameInfoLinkedMap())
{
for (const auto &mi : *mni)
@@ -3998,7 +3996,7 @@ void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const Argumen
const MemberDef *md = mi->memberDef();
std::unique_ptr<MemberDefMutable> imd { md->createTemplateInstanceMember(
templateArguments,actualArguments_p) };
- //printf("%s->setMemberClass(%p)\n",imd->name().data(),this);
+ //printf("%s->setMemberClass(%p)\n",qPrint(imd->name()),this);
imd->setMemberClass(this);
imd->setTemplateMaster(md);
imd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
@@ -4008,10 +4006,10 @@ void ClassDefImpl::addMembersToTemplateInstance(const ClassDef *cd,const Argumen
imd->setMemberGroupId(md->getMemberGroupId());
insertMember(imd.get());
//printf("Adding member=%s %s%s to class %s templSpec %s\n",
- // imd->typeString(),imd->name().data(),imd->argsString(),
- // imd->getClassDef()->name().data(),templSpec);
+ // imd->typeString(),qPrint(imd->name()),imd->argsString(),
+ // qPrint(imd->getClassDef()->name()),templSpec);
// insert imd in the list of all members
- //printf("Adding member=%s class=%s\n",imd->name().data(),name().data());
+ //printf("Adding member=%s class=%s\n",qPrint(imd->name()),qPrint(name()));
MemberName *mn = Doxygen::memberNameLinkedMap->add(imd->name());
mn->push_back(std::move(imd));
}
@@ -4085,7 +4083,7 @@ QCString ClassDefImpl::className() const
}
}
-void ClassDefImpl::setClassName(const char *name)
+void ClassDefImpl::setClassName(const QCString &name)
{
m_impl->className = name;
}
@@ -4094,7 +4092,7 @@ void ClassDefImpl::addListReferences()
{
SrcLangExt lang = getLanguage();
if (!isLinkableInProject()) return;
- //printf("ClassDef(%s)::addListReferences()\n",name().data());
+ //printf("ClassDef(%s)::addListReferences()\n",qPrint(name()));
{
const RefItemVector &xrefItems = xrefListItems();
addRefItem(xrefItems,
@@ -4103,7 +4101,7 @@ void ClassDefImpl::addListReferences()
: theTranslator->trClass(TRUE,TRUE),
getOutputFileBase(),
displayName(),
- 0,
+ QCString(),
this
);
}
@@ -4133,7 +4131,7 @@ const MemberDef *ClassDefImpl::getMemberByName(const QCString &name) const
const ClassDef *mcd=mi->memberDef()->getClassDef();
int m=minClassDistance(this,mcd);
//printf("found member in %s linkable=%d m=%d\n",
- // mcd->name().data(),mcd->isLinkable(),m);
+ // qPrint(mcd->name()),mcd->isLinkable(),m);
if (m<mdist && mcd->isLinkable())
{
mdist=m;
@@ -4141,7 +4139,7 @@ const MemberDef *ClassDefImpl::getMemberByName(const QCString &name) const
}
}
}
- //printf("getMemberByName(%s)=%p\n",name.data(),xmd);
+ //printf("getMemberByName(%s)=%p\n",qPrint(name),xmd);
return xmd;
}
@@ -4200,7 +4198,7 @@ void ClassDefImpl::sortMemberLists()
int ClassDefImpl::countMemberDeclarations(MemberListType lt,const ClassDef *inheritedFrom,
int lt2,bool invert,bool showAlways,ClassDefSet &visitedClasses) const
{
- //printf("%s: countMemberDeclarations for %d and %d\n",name().data(),lt,lt2);
+ //printf("%s: countMemberDeclarations for %d and %d\n",qPrint(name()),lt,lt2);
int count=0;
MemberList * ml = getMemberList(lt);
MemberList * ml2 = getMemberList((MemberListType)lt2);
@@ -4280,7 +4278,7 @@ int ClassDefImpl::countInheritedDecMembers(MemberListType lt,
int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
bool process = count>0;
//printf("%s: countInheritedDecMembers: lt=%d process=%d count=%d invert=%d\n",
- // name().data(),lt,process,count,invert);
+ // qPrint(name()),lt,process,count,invert);
if ((process^invert) || showAlways)
{
for (const auto &ibcd : m_impl->inherits)
@@ -4291,7 +4289,7 @@ int ClassDefImpl::countInheritedDecMembers(MemberListType lt,
{
convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
//printf("%s: convert %d->(%d,%d) prot=%d\n",
- // icd->name().data(),lt,lt1,lt2,ibcd->prot);
+ // qPrint(icd->name()),lt,lt1,lt2,ibcd->prot);
if (visitedClasses.find(icd)==visitedClasses.end())
{
visitedClasses.insert(icd); // guard for multiple virtual inheritance
@@ -4372,7 +4370,7 @@ int ClassDefImpl::countMembersIncludingGrouped(MemberListType lt,
{
count=ml->countInheritableMembers(inheritedFrom);
}
- //printf("%s:countMembersIncludingGrouped: count=%d\n",name().data(),count);
+ //printf("%s:countMembersIncludingGrouped: count=%d\n",qPrint(name()),count);
for (const auto &mg : m_impl->memberGroups)
{
bool hasOwnSection = !mg->allMembersInSameSection() ||
@@ -4383,7 +4381,7 @@ int ClassDefImpl::countMembersIncludingGrouped(MemberListType lt,
}
}
//printf("%s:countMembersIncludingGrouped(lt=%d,%s)=%d\n",
- // name().data(),lt,ml?ml->listTypeAsString(ml->listType()).data():"<none>",count);
+ // qPrint(name()),lt,ml?qPrint(ml->listTypeAsString(ml->listType())):"<none>",count);
return count;
}
@@ -4397,7 +4395,7 @@ void ClassDefImpl::writeInheritedMemberDeclarations(OutputList &ol,ClassDefSet &
int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
bool process = count>0;
//printf("%s: writeInheritedMemberDec: lt=%d process=%d invert=%d always=%d\n",
- // name().data(),lt,process,invert,showAlways);
+ // qPrint(name()),lt,process,invert,showAlways);
if ((process^invert) || showAlways)
{
for (const auto &ibcd : m_impl->inherits)
@@ -4411,7 +4409,7 @@ void ClassDefImpl::writeInheritedMemberDeclarations(OutputList &ol,ClassDefSet &
{
lt2=lt3;
}
- //printf("%s:convert %d->(%d,%d) prot=%d\n",icd->name().data(),lt,lt1,lt2,ibcd->prot);
+ //printf("%s:convert %d->(%d,%d) prot=%d\n",qPrint(icd->name()),lt,lt1,lt2,ibcd->prot);
if (visitedClasses.find(icd)==visitedClasses.end())
{
visitedClasses.insert(icd); // guard for multiple virtual inheritance
@@ -4423,7 +4421,7 @@ void ClassDefImpl::writeInheritedMemberDeclarations(OutputList &ol,ClassDefSet &
}
else
{
- //printf("%s: class already visited!\n",icd->name().data());
+ //printf("%s: class already visited!\n",qPrint(icd->name()));
}
}
}
@@ -4433,10 +4431,10 @@ void ClassDefImpl::writeInheritedMemberDeclarations(OutputList &ol,ClassDefSet &
void ClassDefImpl::writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedClasses,
MemberListType lt,const QCString &title,
- const char *subTitle,bool showInline,const ClassDef *inheritedFrom,int lt2,
+ const QCString &subTitle,bool showInline,const ClassDef *inheritedFrom,int lt2,
bool invert,bool showAlways) const
{
- //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%d lt2=%d\n",name().data(),lt,lt2);
+ //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%d lt2=%d\n",qPrint(name()),lt,lt2);
MemberList * ml = getMemberList(lt);
MemberList * ml2 = getMemberList((MemberListType)lt2);
if (getLanguage()==SrcLangExt_VHDL) // use specific declarations function
@@ -4454,7 +4452,7 @@ void ClassDefImpl::writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedCl
}
else
{
- //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",name().data(),title.data(),ml,ml2);
+ //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",qPrint(name()),qPrint(title),ml,ml2);
QCString tt = title, st = subTitle;
if (ml)
{
@@ -4481,7 +4479,7 @@ void ClassDefImpl::writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedCl
void ClassDefImpl::addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
const ClassDef *inheritedFrom,const QCString &inheritId) const
{
- //printf("** %s::addGroupedInheritedMembers(%p) inheritId=%s\n",name().data(),m_impl->memberGroupSDict,inheritId.data());
+ //printf("** %s::addGroupedInheritedMembers(%p) inheritId=%s\n",qPrint(name()),m_impl->memberGroupSDict,qPrint(inheritId));
for (const auto &mg : m_impl->memberGroups)
{
if (!mg->allMembersInSameSection() || !m_impl->subGrouping) // group is in its own section
@@ -4493,23 +4491,23 @@ void ClassDefImpl::addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
void ClassDefImpl::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline) const
{
- //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",name().data());
+ //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",qPrint(name()));
MemberList * ml = getMemberList(lt);
if (ml) ml->writeDocumentation(ol,displayName(),this,title,FALSE,showInline);
}
void ClassDefImpl::writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt) const
{
- //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",name().data());
+ //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
MemberList * ml = getMemberList(lt);
if (ml) ml->writeSimpleDocumentation(ol,this);
}
void ClassDefImpl::writePlainMemberDeclaration(OutputList &ol,
MemberListType lt,bool inGroup,
- const ClassDef *inheritedFrom,const char *inheritId) const
+ const ClassDef *inheritedFrom,const QCString &inheritId) const
{
- //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",name().data());
+ //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
MemberList * ml = getMemberList(lt);
if (ml)
{
@@ -4688,11 +4686,6 @@ const MemberGroupList &ClassDefImpl::getMemberGroups() const
return m_impl->memberGroups;
}
-//void ClassDefImpl::setNamespace(NamespaceDef *nd)
-//{
-// m_impl->nspace = nd;
-//}
-
void ClassDefImpl::setFileDef(FileDef *fd)
{
m_impl->fileDef=fd;
@@ -4806,8 +4799,8 @@ bool ClassDefImpl::isEmbeddedInOuterScope() const
//printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
// "inlineSimpleClasses=%d partOfGroups()=%p m_impl->isSimple=%d "
// "getOuterScope()=%s b1=%d b2=%d\n",
- // name().data(),inlineGroupedClasses,inlineSimpleClasses,
- // partOfGroups().pointer(),m_impl->isSimple,getOuterScope()?getOuterScope()->name().data():"<none>",b1,b2);
+ // qPrint(name()),inlineGroupedClasses,inlineSimpleClasses,
+ // partOfGroups().pointer(),m_impl->isSimple,getOuterScope()?qPrint(getOuterScope()->name()):"<none>",b1,b2);
return b1 || b2; // either reason will do
}
@@ -4873,12 +4866,12 @@ bool ClassDefImpl::isSliceLocal() const
return m_impl->spec&Entry::Local;
}
-void ClassDefImpl::setName(const char *name)
+void ClassDefImpl::setName(const QCString &name)
{
DefinitionMixin::setName(name);
}
-void ClassDefImpl::setMetaData(const char *md)
+void ClassDefImpl::setMetaData(const QCString &md)
{
m_impl->metaData = md;
}
diff --git a/src/classdef.h b/src/classdef.h
index c908a70..2c8f870 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -53,7 +53,7 @@ class MemberGroupList;
*/
struct BaseClassDef
{
- BaseClassDef(ClassDef *cd,const char *n,Protection p, Specifier v,const char *t) :
+ BaseClassDef(ClassDef *cd,const QCString &n,Protection p, Specifier v,const QCString &t) :
classDef(cd), usedName(n), prot(p), virt(v), templSpecifiers(t) {}
/** Class definition that this relation inherits from. */
@@ -266,7 +266,7 @@ class ClassDef : public Definition
* available, or 0 otherwise.
* @param name The name of the nested compound
*/
- virtual const Definition *findInnerCompound(const char *name) const = 0;
+ virtual const Definition *findInnerCompound(const QCString &name) const = 0;
/** Returns the template parameter lists that form the template
* declaration of this class.
@@ -377,7 +377,7 @@ class ClassDef : public Definition
virtual ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
const QCString &templSpec,bool &freshInstance) const = 0;
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const = 0;
+ const QCString &header,bool localNames) const = 0;
};
@@ -388,15 +388,14 @@ class ClassDefMutable : public DefinitionMutable, public ClassDef
// --- setters ----
//-----------------------------------------------------------------------------------
- virtual void setIncludeFile(FileDef *fd,const char *incName,bool local,bool force) = 0;
- //virtual void setNamespace(NamespaceDef *nd) = 0;
+ virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force) = 0;
virtual void setFileDef(FileDef *fd) = 0;
virtual void setSubGrouping(bool enabled) = 0;
virtual void setProtection(Protection p) = 0;
virtual void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs) = 0;
virtual void setIsStatic(bool b) = 0;
virtual void setCompoundType(CompoundType t) = 0;
- virtual void setClassName(const char *name) = 0;
+ virtual void setClassName(const QCString &name) = 0;
virtual void setClassSpecifier(uint64 spec) = 0;
virtual void setTemplateArguments(const ArgumentList &al) = 0;
virtual void setTemplateBaseClassNames(const TemplateNameMap &templateNames) = 0;
@@ -405,23 +404,23 @@ class ClassDefMutable : public DefinitionMutable, public ClassDef
virtual void setCategoryOf(ClassDef *cd) = 0;
virtual void setUsedOnly(bool b) = 0;
virtual void setTagLessReference(const ClassDef *cd) = 0;
- virtual void setName(const char *name) = 0;
- virtual void setMetaData(const char *md) = 0;
- virtual void setRequiresClause(const char *req) = 0;
+ virtual void setName(const QCString &name) = 0;
+ virtual void setMetaData(const QCString &md) = 0;
+ virtual void setRequiresClause(const QCString &req) = 0;
//-----------------------------------------------------------------------------------
// --- actions ----
//-----------------------------------------------------------------------------------
- virtual void insertBaseClass(ClassDef *,const char *name,Protection p,Specifier s,const char *t=0) = 0;
- virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const char *t=0) = 0;
+ virtual void insertBaseClass(ClassDef *,const QCString &name,Protection p,Specifier s,const QCString &t=QCString()) = 0;
+ virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const QCString &t=QCString()) = 0;
virtual void insertMember(MemberDef *) = 0;
virtual void insertUsedFile(const FileDef *) = 0;
- virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const char *templSpec) = 0;
+ virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const QCString &templSpec) = 0;
virtual void addInnerCompound(const Definition *d) = 0;
- virtual bool addExample(const char *anchor,const char *name, const char *file) = 0;
- virtual void addUsedClass(ClassDef *cd,const char *accessName,Protection prot) = 0;
- virtual void addUsedByClass(ClassDef *cd,const char *accessName,Protection prot) = 0;
+ virtual bool addExample(const QCString &anchor,const QCString &name, const QCString &file) = 0;
+ virtual void addUsedClass(ClassDef *cd,const QCString &accessName,Protection prot) = 0;
+ virtual void addUsedByClass(ClassDef *cd,const QCString &accessName,Protection prot) = 0;
virtual void makeTemplateArgument(bool b=TRUE) = 0;
virtual void mergeCategory(ClassDef *category) = 0;
virtual void findSectionsInDocumentation() = 0;
@@ -447,14 +446,15 @@ class ClassDefMutable : public DefinitionMutable, public ClassDef
virtual void writeMemberPages(OutputList &ol) const = 0;
virtual void writeMemberList(OutputList &ol) const = 0;
virtual void writeDeclaration(OutputList &ol,const MemberDef *md,bool inGroup,
- const ClassDef *inheritedFrom,const char *inheritId) const = 0;
+ const ClassDef *inheritedFrom,const QCString &inheritId) const = 0;
virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *md) const = 0;
virtual void writeSummaryLinks(OutputList &ol) const = 0;
virtual void writeInlineDocumentation(OutputList &ol) const = 0;
virtual void writeTagFile(TextStream &) = 0;
virtual void writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedClasses,
MemberListType lt,const QCString &title,
- const char *subTitle=0,bool showInline=FALSE,const ClassDef *inheritedFrom=0,
+ const QCString &subTitle=QCString(),
+ bool showInline=FALSE,const ClassDef *inheritedFrom=0,
int lt2=-1,bool invert=FALSE,bool showAlways=FALSE) const = 0;
virtual void addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
const ClassDef *inheritedFrom,const QCString &inheritId) const = 0;
@@ -464,9 +464,9 @@ class ClassDefMutable : public DefinitionMutable, public ClassDef
/** Factory method to create a new ClassDef object */
ClassDefMutable *createClassDef(
- const char *fileName,int startLine,int startColumn,
- const char *name,ClassDef::CompoundType ct,
- const char *ref=0,const char *fName=0,
+ const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,ClassDef::CompoundType ct,
+ const QCString &ref=QCString(),const QCString &fName=QCString(),
bool isSymbol=TRUE,bool isJavaEnum=FALSE);
ClassDef *createClassDefAlias(const Definition *newScope,const ClassDef *cd);
@@ -491,11 +491,11 @@ struct UsesClassDef
~UsesClassDef()
{
}
- void addAccessor(const char *s)
+ void addAccessor(const QCString &s)
{
- if (accessors.find(s)==accessors.end())
+ if (accessors.find(s.str())==accessors.end())
{
- accessors.insert(s);
+ accessors.insert(s.str());
}
}
/** Class definition that this relation uses. */
@@ -528,11 +528,11 @@ struct ConstraintClassDef
~ConstraintClassDef()
{
}
- void addAccessor(const char *s)
+ void addAccessor(const QCString &s)
{
- if (accessors.find(s)==accessors.end())
+ if (accessors.find(s.str())==accessors.end())
{
- accessors.insert(s);
+ accessors.insert(s.str());
}
}
/** Class definition that this relation uses. */
diff --git a/src/classlist.cpp b/src/classlist.cpp
index af64478..b4c2412 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -51,7 +51,7 @@ bool ClassLinkedRefMap::declVisible(const ClassDef::CompoundType *filter) const
}
void ClassLinkedRefMap::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
- const char *header,bool localNames) const
+ const QCString &header,bool localNames) const
{
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
bool found=FALSE;
diff --git a/src/classlist.h b/src/classlist.h
index 709412b..75bc713 100644
--- a/src/classlist.h
+++ b/src/classlist.h
@@ -31,7 +31,7 @@ class ClassLinkedRefMap : public LinkedRefMap<const ClassDef>
{
public:
bool declVisible(const ClassDef::CompoundType *filter=0) const;
- void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,const char *header,bool localNames) const;
+ void writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,const QCString &header,bool localNames) const;
void writeDocumentation(OutputList &ol,const Definition * container=0) const;
};
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index 264a74b..bc8719a 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -233,10 +233,10 @@ CommandMap htmlTagMap[] =
Mapper *Mappers::cmdMapper = new Mapper(cmdMap,true);
Mapper *Mappers::htmlTagMapper = new Mapper(htmlTagMap,false);
-int Mapper::map(const char *n)
+int Mapper::map(const QCString &n)
{
- QCString name=n;
- if (name.isEmpty()) return 0;
+ if (n.isEmpty()) return 0;
+ QCString name = n;
if (!m_cs) name=name.lower();
auto it = m_map.find(name.str());
return it!=m_map.end() ? it->second : 0;
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index 1675e76..17e17e9 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -218,7 +218,7 @@ enum HtmlTagType
class Mapper
{
public:
- int map(const char *n);
+ int map(const QCString &n);
QCString find(const int n);
Mapper(const CommandMap *cm,bool caseSensitive);
private:
diff --git a/src/code.h b/src/code.h
index ba24242..be50b27 100644
--- a/src/code.h
+++ b/src/code.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* 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.
*
@@ -31,11 +31,11 @@ class CCodeParser : public CodeParserInterface
CCodeParser();
virtual ~CCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/code.l b/src/code.l
index 87cc333..c8a1dba 100644
--- a/src/code.l
+++ b/src/code.l
@@ -183,7 +183,7 @@ struct codeYY_state
SymbolResolver symbolResolver;
};
-static bool isCastKeyword(const QCString &s);
+static bool isCastKeyword(const char *s);
//-------------------------------------------------------------------
#if USE_STATE2STRING
@@ -193,9 +193,10 @@ static const char *stateToString(yyscan_t yyscanner,int state);
static void saveObjCContext(yyscan_t yyscanner);
static void restoreObjCContext(yyscan_t yyscanner);
static void addUsingDirective(yyscan_t yyscanner,const char *name);
-static void pushScope(yyscan_t yyscanner,const char *s);
+static void pushScope(yyscan_t yyscanner,const QCString &s);
static void popScope(yyscan_t yyscanner);
static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor);
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text);
static void addToSearchIndex(yyscan_t yyscanner,const char *text);
static void setClassScope(yyscan_t yyscanner,const QCString &name);
static void startCodeLine(yyscan_t yyscanner);
@@ -203,37 +204,41 @@ static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
static void startFontClass(yyscan_t yyscanner,const char *s);
static void endFontClass(yyscan_t yyscanner);
+static void codifyLines(yyscan_t yyscanner,const QCString &text);
static void codifyLines(yyscan_t yyscanner,const char *text);
static void incrementFlowKeyWordCount(yyscan_t yyscanner);
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
- const char *text);
+ const QCString &text);
static void addType(yyscan_t yyscanner);
static void addParmType(yyscan_t yyscanner);
static void addUsingDirective(yyscan_t yyscanner,const char *name);
static void setParameterList(yyscan_t yyscanner,const MemberDef *md);
-static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,const Definition *d);
+static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,const Definition *d);
static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &name);
static void updateCallContextForSmartPointer(yyscan_t yyscanner);
static bool getLinkInScope(yyscan_t yyscanner,const QCString &c, // scope
const QCString &m, // member
- const char *memberText, // exact text
+ const QCString &memberText, // exact text
CodeOutputInterface &ol,
- const char *text,
+ const QCString &text,
bool varOnly=FALSE
);
-static bool getLink(yyscan_t yyscanner,const char *className,
- const char *memberName,
+static bool getLink(yyscan_t yyscanner,const QCString &className,
+ const QCString &memberName,
CodeOutputInterface &ol,
- const char *text=0,
+ const QCString &text=QCString(),
bool varOnly=FALSE);
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &clName,
+ bool typeOnly=FALSE,bool varOnly=FALSE);
static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName,
bool typeOnly=FALSE,bool varOnly=FALSE);
-static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const MemberDef *xmd,const char *memName);
-static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const Definition *def,const char *memName);
+static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const MemberDef *xmd,const QCString &memName);
+static bool generateClassMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const Definition *def,const QCString &memName);
static void generateMemberLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &varName,
- const char *memName);
+ const QCString &memName);
static void generatePHPVariableLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *varName);
+static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &funcName);
static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *funcName);
static int countLines(yyscan_t yyscanner);
static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx);
@@ -241,7 +246,7 @@ static QCString escapeName(yyscan_t yyscanner,const char *s);
static QCString escapeObject(yyscan_t yyscanner,const char *s);
static QCString escapeWord(yyscan_t yyscanner,const char *s);
static QCString escapeComment(yyscan_t yyscanner,const char *s);
-static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const QCString &kw);
+static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const char *kw);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
static void addVariable(yyscan_t yyscanner,QCString type,QCString name);
@@ -493,13 +498,13 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
bool found=FALSE;
const FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,yytext,ambig);
- //printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd);
+ //printf("looking for include %s -> %s fd=%p\n",yytext,qPrint(absPath),fd);
if (fd && fd->isLinkable())
{
if (ambig) // multiple input files match the name
{
DBG_CTX((stderr,"===== yes %s is ambiguous\n",yytext));
- QCString name = Dir::cleanDirPath(yytext);
+ QCString name(Dir::cleanDirPath(yytext));
if (!name.isEmpty() && yyextra->sourceFileDef)
{
const FileName *fn = Doxygen::inputNameLinkedMap->find(name);
@@ -520,7 +525,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
found = TRUE;
}
}
- DBG_CTX((stderr," include file %s found=%d\n",fd ? fd->absFilePath().data() : "<none>",found));
+ DBG_CTX((stderr," include file %s found=%d\n",fd ? qPrint(fd->absFilePath()) : "<none>",found));
if (found)
{
writeMultiLineCodeLink(yyscanner,*yyextra->code,fd,yytext);
@@ -608,7 +613,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN(Body);
}
<Body,ClassVar>"@end" {
- DBG_CTX((stderr,"End of objc scope fd=%s\n",yyextra->sourceFileDef->name().data()));
+ DBG_CTX((stderr,"End of objc scope fd=%s\n",qPrint(yyextra->sourceFileDef->name())));
if (yyextra->sourceFileDef)
{
const FileDef *fd=yyextra->sourceFileDef;
@@ -652,7 +657,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN( Body );
}
<ClassName,ClassVar>[*&^%]+ {
- yyextra->type=yyextra->curClassName.copy();
+ yyextra->type=yyextra->curClassName;
yyextra->name.resize(0);
yyextra->code->codify(yytext);
BEGIN( Body ); // variable of type struct *
@@ -723,7 +728,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
}
<PackageName>{ID}("."{ID})* {
yyextra->curClassName=substitute(yytext,".","::");
- DBG_CTX((stderr,"found package: %s\n",yyextra->curClassName.data()));
+ DBG_CTX((stderr,"found package: %s\n",qPrint(yyextra->curClassName)));
addType(yyscanner);
codifyLines(yyscanner,yytext);
}
@@ -739,14 +744,14 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN( Bases );
}
<ClassVar>("sealed"|"abstract")/{BN}*(":"|"{") {
- DBG_CTX((stderr,"***** C++/CLI modifier %s on yyextra->curClassName=%s\n",yytext,yyextra->curClassName.data()));
+ DBG_CTX((stderr,"***** C++/CLI modifier %s on yyextra->curClassName=%s\n",yytext,qPrint(yyextra->curClassName)));
startFontClass(yyscanner,"keyword");
codifyLines(yyscanner,yytext);
endFontClass(yyscanner);
BEGIN( CppCliTypeModifierFollowup );
}
<ClassVar>{ID} {
- yyextra->type = yyextra->curClassName.copy();
+ yyextra->type = yyextra->curClassName;
yyextra->name = yytext;
if (yyextra->insideBody)
{
@@ -766,7 +771,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
yyextra->code->codify(yytext);
if (YY_START==ClassVar && yyextra->curClassName.isEmpty())
{
- yyextra->curClassName = yyextra->name.copy();
+ yyextra->curClassName = yyextra->name;
}
if (yyextra->searchingForBody)
{
@@ -779,10 +784,10 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
yyextra->scopeStack.push(CLASSBLOCK);
pushScope(yyscanner,yyextra->curClassName);
- DBG_CTX((stderr,"***** yyextra->curClassName=%s\n",yyextra->curClassName.data()));
+ DBG_CTX((stderr,"***** yyextra->curClassName=%s\n",qPrint(yyextra->curClassName)));
if (yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,yyextra->curClassName)==0)
{
- DBG_CTX((stderr,"Adding new class %s\n",yyextra->curClassName.data()));
+ DBG_CTX((stderr,"Adding new class %s\n",qPrint(yyextra->curClassName)));
ScopedTypeVariant var(yyextra->curClassName);
// insert base classes.
for (const auto &s : yyextra->curClassBases)
@@ -793,7 +798,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
{
bcd = toClassDef(it->second.globalDef());
}
- if (bcd==0) bcd=yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,s.c_str());
+ if (bcd==0) bcd=yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,QCString(s));
if (bcd && bcd->name()!=yyextra->curClassName)
{
var.localDef()->insertBaseClass(bcd->name());
@@ -818,7 +823,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
endFontClass(yyscanner);
}
<Bases>{SEP}?({ID}{SEP})*{ID} {
- DBG_CTX((stderr,"%s:addBase(%s)\n",yyextra->curClassName.data(),yytext));
+ DBG_CTX((stderr,"%s:addBase(%s)\n",qPrint(yyextra->curClassName),yytext));
yyextra->curClassBases.push_back(yytext);
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
}
@@ -1132,7 +1137,6 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
<Body>{SCOPENAME}/{BN}*[:;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" , or int var : 5;
addType(yyscanner);
// changed this to generateFunctionLink, see bug 624514
- //generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext,FALSE,TRUE);
generateFunctionLink(yyscanner,*yyextra->code,yytext);
yyextra->name+=yytext;
}
@@ -1163,11 +1167,11 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN( FuncCall );
}
<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>{RAWBEGIN} {
- QCString text=yytext;
+ QCString text(yytext);
uint i=(uint)text.find('R');
yyextra->code->codify(text.left(i+1));
startFontClass(yyscanner,"stringliteral");
- yyextra->code->codify(yytext+i+1);
+ yyextra->code->codify(QCString(yytext+i+1));
yyextra->lastStringContext=YY_START;
yyextra->inForEachExpression = FALSE;
yyextra->delimiter = yytext+i+2;
@@ -1216,7 +1220,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
}
<RawString>{RAWEND} {
yyextra->code->codify(yytext);
- QCString delimiter = yytext+1;
+ QCString delimiter(yytext+1);
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
{
@@ -1346,15 +1350,15 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
else
{
yyextra->code->codify(yytext);
- yyextra->saveName = yyextra->name.copy();
- yyextra->saveType = yyextra->type.copy();
+ yyextra->saveName = yyextra->name;
+ yyextra->saveType = yyextra->type;
if (*yytext!='[' && !yyextra->type.isEmpty())
{
//printf("yyextra->scopeStack.bottom()=%p\n",yyextra->scopeStack.bottom());
//if (yyextra->scopeStack.top()!=CLASSBLOCK) // commented out for bug731363
{
//printf("AddVariable: '%s' '%s' context=%d\n",
- // yyextra->type.data(),yyextra->name.data(),yyextra->theVarContext.count());
+ // qPrint(yyextra->type),qPrint(yyextra->name),yyextra->theVarContext.count());
addVariable(yyscanner,yyextra->type,yyextra->name);
}
yyextra->name.resize(0);
@@ -1373,52 +1377,6 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
yyextra->parmName.resize(0);
}
}
- /*
-<ObjCMemberCall>{ID} {
- if (qstrcmp(yytext,"self")==0 || qstrcmp(yytext,"super")==0)
- {
- // TODO: get proper base class for "super"
- yyextra->theCallContext.setClass(getClass(yyextra->curClassName));
- startFontClass(yyscanner,"keyword");
- yyextra->code->codify(yytext);
- endFontClass(yyscanner);
- }
- else
- {
- generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
- }
- yyextra->name.resize(0);
- BEGIN(ObjCMemberCall2);
- }
-<ObjCMemberCall>"[" {
- yyextra->code->codify(yytext);
- yyextra->theCallContext.pushScope(yyscanner,yyextra->name, yyextra->type);
- }
-<ObjCMemberCall2>{ID}":"? {
- yyextra->name+=yytext;
- if (yyextra->theCallContext.getClass())
- {
- DBG_CTX((stderr,"Calling method %s\n",yyextra->name.data()));
- if (!generateClassMemberLink(yyscanner,*yyextra->code,yyextra->theCallContext.getClass(),yyextra->name))
- {
- yyextra->code->codify(yytext);
- addToSearchIndex(yyscanner,yyextra->name);
- }
- }
- else
- {
- yyextra->code->codify(yytext);
- addToSearchIndex(yyscanner,yyextra->name);
- }
- yyextra->name.resize(0);
- BEGIN(ObjCMemberCall3);
- }
-<ObjCMemberCall2,ObjCMemberCall3>"]" {
- yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
- yyextra->code->codify(yytext);
- BEGIN(Body);
- }
- */
<ObjCCall,ObjCMName>"["|"{" {
saveObjCContext(yyscanner);
yyextra->currentCtx->format+=*yytext;
@@ -1466,7 +1424,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
if (yyextra->braceCount==0)
{
yyextra->currentCtx->objectTypeOrName=yytext;
- DBG_CTX((stderr,"new type=%s\n",yyextra->currentCtx->objectTypeOrName.data()));
+ DBG_CTX((stderr,"new type=%s\n",qPrint(yyextra->currentCtx->objectTypeOrName)));
BEGIN(ObjCMName);
}
}
@@ -1514,8 +1472,8 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
yyextra->code->codify(yytext);
// TODO: nested arrays like: a[b[0]->func()]->func()
- yyextra->name = yyextra->saveName.copy();
- yyextra->type = yyextra->saveType.copy();
+ yyextra->name = yyextra->saveName;
+ yyextra->type = yyextra->saveType;
}
<Body>[0-9]+ {
yyextra->code->codify(yytext);
@@ -1639,7 +1597,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
<MemberCall,MemberCall2,FuncCall>("*"{B}*)?")" {
if (yytext[0]==')') // no a pointer cast
{
- DBG_CTX((stderr,"addVariable(%s,%s)\n",yyextra->parmType.data(),yyextra->parmName.data()));
+ DBG_CTX((stderr,"addVariable(%s,%s)\n",qPrint(yyextra->parmType),qPrint(yyextra->parmName)));
if (yyextra->parmType.isEmpty())
{
yyextra->parmType=yyextra->parmName;
@@ -1679,7 +1637,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
if (*yytext==';') yyextra->searchingForBody=FALSE;
if (!yyextra->type.isEmpty())
{
- DBG_CTX((stderr,"add variable yyextra->type=%s yyextra->name=%s)\n",yyextra->type.data(),yyextra->name.data()));
+ DBG_CTX((stderr,"add variable yyextra->type=%s yyextra->name=%s)\n",qPrint(yyextra->type),qPrint(yyextra->name)));
addVariable(yyscanner,yyextra->type,yyextra->name);
}
yyextra->parmType.resize(0);yyextra->parmName.resize(0);
@@ -1713,11 +1671,11 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
//yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
yyextra->parmType.resize(0);yyextra->parmName.resize(0);
int index = yyextra->name.findRev("::");
- DBG_CTX((stderr,"yyextra->name=%s\n",yyextra->name.data()));
+ DBG_CTX((stderr,"yyextra->name=%s\n",qPrint(yyextra->name)));
if (index!=-1)
{
QCString scope = yyextra->name.left((uint)index);
- if (!yyextra->classScope.isEmpty()) scope.prepend(yyextra->classScope+"::");
+ if (!yyextra->classScope.isEmpty()) scope.prepend((yyextra->classScope+"::"));
const ClassDef *cd=yyextra->symbolResolver.resolveClass(Doxygen::globalScope,scope);
if (cd)
{
@@ -1836,12 +1794,12 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
BEGIN( Body );
}
<SkipInits>{ID}{B}*"{" {
- QCString text = yytext;
+ QCString text(yytext);
int bracketPos = text.find('{');
int spacePos = text.find(' ');
int len = spacePos==-1 ? bracketPos : spacePos;
generateClassOrGlobalLink(yyscanner,*yyextra->code,text.left(len));
- yyextra->code->codify(yytext+len);
+ yyextra->code->codify(QCString(yytext+len));
}
<SkipInits>{ID} {
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
@@ -2213,7 +2171,7 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"VariableContext::addVariable(%s,%s)\n",type.data(),name.data()));
+ DBG_CTX((stderr,"VariableContext::addVariable(%s,%s)\n",qPrint(type),qPrint(name)));
QCString ltype = type.simplifyWhiteSpace();
QCString lname = name.simplifyWhiteSpace();
if (ltype.left(7)=="struct ")
@@ -2226,11 +2184,11 @@ static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
}
if (ltype.isEmpty() || lname.isEmpty()) return;
DBG_CTX((stderr,"** addVariable trying: type='%s' name='%s' currentDefinition=%s\n",
- ltype.data(),lname.data(),yyextra->currentDefinition?yyextra->currentDefinition->name().data():"<none>"));
+ qPrint(ltype),qPrint(lname),yyextra->currentDefinition?qPrint(yyextra->currentDefinition->name()):"<none>"));
auto it = yyextra->codeClassMap.find(ltype.str());
if (it!=yyextra->codeClassMap.end()) // look for class definitions inside the code block
{
- DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",ltype.data(),lname.data()));
+ DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",qPrint(ltype),qPrint(lname)));
yyextra->theVarContext.addVariable(lname,std::move(it->second)); // add it to a list
}
else
@@ -2239,7 +2197,7 @@ static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
int i=0;
if (varDef)
{
- DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",ltype.data(),lname.data()));
+ DBG_CTX((stderr,"** addVariable type='%s' name='%s'\n",qPrint(ltype),qPrint(lname)));
yyextra->theVarContext.addVariable(lname,ScopedTypeVariant(varDef)); // add it to a list
}
else if ((i=ltype.find('<'))!=-1)
@@ -2254,7 +2212,7 @@ static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
// is hidden to avoid false links to global variables with the same name
// TODO: make this work for namespaces as well!
{
- DBG_CTX((stderr,"** addVariable: dummy context for '%s'\n",lname.data()));
+ DBG_CTX((stderr,"** addVariable: dummy context for '%s'\n",qPrint(lname)));
yyextra->theVarContext.addVariable(lname,ScopedTypeVariant());
}
else
@@ -2268,7 +2226,7 @@ static void addVariable(yyscan_t yyscanner,QCString type,QCString name)
//-------------------------------------------------------------------
/*! add class/namespace name s to the scope */
-static void pushScope(yyscan_t yyscanner,const char *s)
+static void pushScope(yyscan_t yyscanner,const QCString &s)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->classScopeLengthStack.push(int(yyextra->classScope.length()));
@@ -2281,7 +2239,7 @@ static void pushScope(yyscan_t yyscanner,const char *s)
yyextra->classScope += "::";
yyextra->classScope += s;
}
- DBG_CTX((stderr,"pushScope(%s) result: '%s'\n",s,yyextra->classScope.data()));
+ DBG_CTX((stderr,"pushScope(%s) result: '%s'\n",qPrint(s),qPrint(yyextra->classScope)));
}
@@ -2299,7 +2257,7 @@ static void popScope(yyscan_t yyscanner)
{
//err("Too many end of scopes found!\n");
}
- DBG_CTX((stderr,"popScope() result: '%s'\n",yyextra->classScope.data()));
+ DBG_CTX((stderr,"popScope() result: '%s'\n",qPrint(yyextra->classScope)));
}
static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor)
@@ -2319,7 +2277,7 @@ static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor)
}
}
-static void addToSearchIndex(yyscan_t yyscanner,const char *text)
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
@@ -2329,10 +2287,16 @@ static void addToSearchIndex(yyscan_t yyscanner,const char *text)
}
}
+static void addToSearchIndex(yyscan_t yyscanner,const char *text)
+{
+ addToSearchIndex(yyscanner,QCString(text));
+}
+
+
static void setClassScope(yyscan_t yyscanner,const QCString &name)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"setClassScope(%s)\n",name.data()));
+ DBG_CTX((stderr,"setClassScope(%s)\n",qPrint(name)));
QCString n=name;
n=n.simplifyWhiteSpace();
int ts=n.find('<'); // start of template
@@ -2355,7 +2319,7 @@ static void setClassScope(yyscan_t yyscanner,const QCString &name)
n = n.mid(i+2);
}
pushScope(yyscanner,n);
- DBG_CTX((stderr,"--->New class scope '%s'\n",yyextra->classScope.data()));
+ DBG_CTX((stderr,"--->New class scope '%s'\n",qPrint(yyextra->classScope)));
}
/*! start a new line of code, inserting a line number if yyextra->sourceFileDef
@@ -2373,7 +2337,7 @@ static void startCodeLine(yyscan_t yyscanner)
//lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
- DBG_CTX((stderr,"%s:startCodeLine(%d)=%p\n",yyextra->sourceFileDef->name().data(),yyextra->yyLineNr,(void*)d));
+ DBG_CTX((stderr,"%s:startCodeLine(%d)=%p\n",qPrint(yyextra->sourceFileDef->name()),yyextra->yyLineNr,(void*)d));
if (!yyextra->includeCodeFragment && d)
{
yyextra->currentDefinition = d;
@@ -2387,7 +2351,7 @@ static void startCodeLine(yyscan_t yyscanner)
yyextra->args.resize(0);
yyextra->parmType.resize(0);
yyextra->parmName.resize(0);
- DBG_CTX((stderr,"Real scope: '%s'\n",yyextra->realScope.data()));
+ DBG_CTX((stderr,"Real scope: '%s'\n",qPrint(yyextra->realScope)));
yyextra->bodyCurlyCount = 0;
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
@@ -2395,27 +2359,28 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(yyextra->currentMemberDef->getReference(),
yyextra->currentMemberDef->getOutputFileBase(),
- yyextra->currentMemberDef->anchor(),yyextra->yyLineNr);
+ yyextra->currentMemberDef->anchor(),
+ yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
else if (d->isLinkableInProject())
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
DBG_CTX((stderr,"startCodeLine(%d)\n",yyextra->yyLineNr));
yyextra->code->startCodeLine(yyextra->sourceFileDef && yyextra->lineNumbers);
if (yyextra->currentFontClass)
{
- yyextra->code->startFontClass(yyextra->currentFontClass);
+ yyextra->code->startFontClass(QCString(yyextra->currentFontClass));
}
}
@@ -2444,11 +2409,12 @@ static void nextCodeLine(yyscan_t yyscanner)
/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
-static void codifyLines(yyscan_t yyscanner,const char *text)
+static void codifyLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text));
- const char *p=text,*sp=p;
+ DBG_CTX((stderr,"codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,qPrint(text)));
+ if (text.isEmpty()) return;
+ const char *p=text.data(),*sp=p;
char c;
bool done=FALSE;
while (!done)
@@ -2463,18 +2429,23 @@ static void codifyLines(yyscan_t yyscanner,const char *text)
char *tmp = (char*)malloc(l+1);
memcpy(tmp,sp,l);
tmp[l]='\0';
- yyextra->code->codify(tmp);
+ yyextra->code->codify(QCString(tmp));
free(tmp);
nextCodeLine(yyscanner);
}
else
{
- yyextra->code->codify(sp);
+ yyextra->code->codify(QCString(sp));
done=TRUE;
}
}
}
+static void codifyLines(yyscan_t yyscanner,const char *text)
+{
+ codifyLines(yyscanner,QCString(text));
+}
+
static void incrementFlowKeyWordCount(yyscan_t yyscanner)
{
std::lock_guard<std::mutex> lock(g_countFlowKeywordsMutex);
@@ -2495,7 +2466,7 @@ static void incrementFlowKeyWordCount(yyscan_t yyscanner)
*/
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
@@ -2509,7 +2480,7 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
tooltip = d->briefDescriptionAsTooltip();
}
bool done=FALSE;
- char *p=(char *)text;
+ char *p=text.rawData();
while (!done)
{
char *sp=p;
@@ -2519,14 +2490,14 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
{
yyextra->yyLineNr++;
*(p-1)='\0';
- DBG_CTX((stderr,"writeCodeLink(%s,%s,%s,%s)\n",ref.data(),file.data(),anchor.data(),sp));
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ DBG_CTX((stderr,"writeCodeLink(%s,%s,%s,%s)\n",qPrint(ref),qPrint(file),qPrint(anchor),sp));
+ ol.writeCodeLink(ref,file,anchor,QCString(sp),tooltip);
nextCodeLine(yyscanner);
}
else
{
- DBG_CTX((stderr,"writeCodeLink(%s,%s,%s,%s)\n",ref.data(),file.data(),anchor.data(),sp));
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ DBG_CTX((stderr,"writeCodeLink(%s,%s,%s,%s)\n",qPrint(ref),qPrint(file),qPrint(anchor),sp));
+ ol.writeCodeLink(ref,file,anchor,QCString(sp),tooltip);
done=TRUE;
}
}
@@ -2569,7 +2540,7 @@ static void addUsingDirective(yyscan_t yyscanner,const char *name)
static void setParameterList(yyscan_t yyscanner,const MemberDef *md)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- yyextra->classScope = md->getClassDef() ? md->getClassDef()->name().data() : "";
+ yyextra->classScope = md->getClassDef() ? md->getClassDef()->name() : QCString();
for (const Argument &a : md->argumentList())
{
yyextra->parmName = a.name;
@@ -2584,7 +2555,7 @@ static void setParameterList(yyscan_t yyscanner,const MemberDef *md)
}
}
-static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,const Definition *d)
+static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,const Definition *d)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int pos=0;
@@ -2603,7 +2574,7 @@ static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,const Def
{
cd=yyextra->symbolResolver.resolveClass(d,clName);
}
- DBG_CTX((stderr,"stripClass trying '%s' = %p\n",clName.data(),(void*)cd));
+ DBG_CTX((stderr,"stripClass trying '%s' = %p\n",qPrint(clName),(void*)cd));
if (cd)
{
return cd;
@@ -2617,21 +2588,21 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
{
if (name.isEmpty()) return 0;
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"setCallContextForVar(%s) yyextra->classScope=%s\n",name.data(),yyextra->classScope.data()));
+ DBG_CTX((stderr,"setCallContextForVar(%s) yyextra->classScope=%s\n",qPrint(name),qPrint(yyextra->classScope)));
int scopeEnd = name.findRev("::");
if (scopeEnd!=-1) // name with explicit scope
{
QCString scope = name.left(scopeEnd);
QCString locName = name.right(name.length()-scopeEnd-2);
- DBG_CTX((stderr,"explicit scope: name=%s scope=%s\n",locName.data(),scope.data()));
+ DBG_CTX((stderr,"explicit scope: name=%s scope=%s\n",qPrint(locName),qPrint(scope)));
const ClassDef *mcd = getClass(scope);
if (mcd && !locName.isEmpty())
{
const MemberDef *md=mcd->getMemberByName(locName);
if (md)
{
- DBG_CTX((stderr,"name=%s scope=%s\n",locName.data(),scope.data()));
+ DBG_CTX((stderr,"name=%s scope=%s\n",qPrint(locName),qPrint(scope)));
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
return md;
}
@@ -2644,7 +2615,7 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
const MemberDef *md=mnd->getMemberByName(locName);
if (md)
{
- DBG_CTX((stderr,"name=%s scope=%s\n",locName.data(),scope.data()));
+ DBG_CTX((stderr,"name=%s scope=%s\n",qPrint(locName),qPrint(scope)));
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
return md;
}
@@ -2659,25 +2630,25 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
DBG_CTX((stderr,"local variable?\n"));
if (mcv->type()!=ScopedTypeVariant::Dummy) // locally found variable
{
- DBG_CTX((stderr,"local var '%s' mcd=%s\n",name.data(),mcv->name().data()));
+ DBG_CTX((stderr,"local var '%s' mcd=%s\n",qPrint(name),qPrint(mcv->name())));
yyextra->theCallContext.setScope(*mcv);
}
}
else
{
- DBG_CTX((stderr,"class member? scope=%s\n",yyextra->classScope.data()));
+ DBG_CTX((stderr,"class member? scope=%s\n",qPrint(yyextra->classScope)));
// look for a class member
const ClassDef *mcd = getClass(yyextra->classScope);
if (mcd)
{
- DBG_CTX((stderr,"Inside class %s\n",mcd->name().data()));
+ DBG_CTX((stderr,"Inside class %s\n",qPrint(mcd->name())));
const MemberDef *md=mcd->getMemberByName(name);
if (md)
{
- DBG_CTX((stderr,"Found member %s\n",md->name().data()));
+ DBG_CTX((stderr,"Found member %s\n",qPrint(md->name())));
if (yyextra->scopeStack.empty() || yyextra->scopeStack.top()!=CLASSBLOCK)
{
- DBG_CTX((stderr,"class member '%s' mcd=%s\n",name.data(),mcd->name().data()));
+ DBG_CTX((stderr,"class member '%s' mcd=%s\n",qPrint(name),qPrint(mcd->name())));
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
}
return md;
@@ -2688,7 +2659,7 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
// look for a global member
if ((mn=Doxygen::functionNameLinkedMap->find(name)))
{
- DBG_CTX((stderr,"global var '%s'\n",name.data()));
+ DBG_CTX((stderr,"global var '%s'\n",qPrint(name)));
if (mn->size()==1) // global defined only once
{
const std::unique_ptr<MemberDef> &md=mn->front();
@@ -2713,7 +2684,7 @@ static const MemberDef *setCallContextForVar(yyscan_t yyscanner,const QCString &
if (!md->isStatic() || md->getBodyDef()==yyextra->sourceFileDef)
{
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,md->typeString(),md->getOuterScope())));
- DBG_CTX((stderr,"returning member %s in source file %s\n",md->name().data(),yyextra->sourceFileDef->name().data()));
+ DBG_CTX((stderr,"returning member %s in source file %s\n",qPrint(md->name()),qPrint(yyextra->sourceFileDef->name())));
return md.get();
}
}
@@ -2727,7 +2698,7 @@ static void updateCallContextForSmartPointer(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
const Definition *d = yyextra->theCallContext.getScope().globalDef();
- //printf("updateCallContextForSmartPointer() cd=%s\n",cd ? d->name().data() : "<none>");
+ //printf("updateCallContextForSmartPointer() cd=%s\n",cd ? qPrint(d->name()) : "<none>");
const MemberDef *md;
if (d && d->definitionType()==Definition::TypeClass && (md=(toClassDef(d))->isSmartPointer()))
{
@@ -2735,7 +2706,7 @@ static void updateCallContextForSmartPointer(yyscan_t yyscanner)
if (ncd)
{
yyextra->theCallContext.setScope(ScopedTypeVariant(ncd));
- //printf("Found smart pointer call %s->%s!\n",cd->name().data(),ncd->name().data());
+ //printf("Found smart pointer call %s->%s!\n",qPrint(cd->name()),qPrint(ncd->name()));
}
}
}
@@ -2743,9 +2714,9 @@ static void updateCallContextForSmartPointer(yyscan_t yyscanner)
static bool getLinkInScope(yyscan_t yyscanner,
const QCString &c, // scope
const QCString &m, // member
- const char *memberText, // exact text
+ const QCString &memberText, // exact text
CodeOutputInterface &ol,
- const char *text,
+ const QCString &text,
bool varOnly
)
{
@@ -2755,20 +2726,20 @@ static bool getLinkInScope(yyscan_t yyscanner,
const FileDef *fd = 0;
const NamespaceDef *nd = 0;
const GroupDef *gd = 0;
- DBG_CTX((stderr,"getLinkInScope: trying '%s'::'%s' varOnly=%d\n",c.data(),m.data(),varOnly));
+ DBG_CTX((stderr,"getLinkInScope: trying '%s'::'%s' varOnly=%d\n",qPrint(c),qPrint(m),varOnly));
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,yyextra->sourceFileDef,FALSE) &&
(!varOnly || md->isVariable()))
{
if (md->isLinkable())
{
- DBG_CTX((stderr,"found it %s!\n",md->qualifiedName().data()));
+ DBG_CTX((stderr,"found it %s!\n",qPrint(md->qualifiedName())));
if (yyextra->exampleBlock)
{
std::lock_guard<std::mutex> lock(g_addExampleMutex);
QCString anchor;
anchor.sprintf("a%d",yyextra->anchorCount);
- DBG_CTX((stderr,"addExampleFile(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
- yyextra->exampleFile.data()));
+ DBG_CTX((stderr,"addExampleFile(%s,%s,%s)\n",qPrint(anchor),qPrint(yyextra->exampleName),
+ qPrint(yyextra->exampleFile)));
MemberDefMutable *mdm = toMemberDefMutable(md);
if (mdm && mdm->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
@@ -2792,17 +2763,17 @@ static bool getLinkInScope(yyscan_t yyscanner,
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(md));
}
- DBG_CTX((stderr,"d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data()));
+ DBG_CTX((stderr,"d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",qPrint(d->getReference()),qPrint(d->getOutputFileBase()),qPrint(d->name()),qPrint(md->name())));
- writeMultiLineCodeLink(yyscanner,ol,md, text ? text : memberText);
- addToSearchIndex(yyscanner,text ? text : memberText);
+ writeMultiLineCodeLink(yyscanner,ol,md, !text.isEmpty() ? text : memberText);
+ addToSearchIndex(yyscanner,!text.isEmpty() ? text : memberText);
return TRUE;
}
}
else // found member, but it is not linkable, so make sure content inside is not assigned
// to the previous member, see bug762760
{
- DBG_CTX((stderr,"unlinkable member %s\n",md->name().data()));
+ DBG_CTX((stderr,"unlinkable member %s\n",qPrint(md->name())));
yyextra->currentMemberDef = 0;
}
}
@@ -2810,14 +2781,15 @@ static bool getLinkInScope(yyscan_t yyscanner,
}
static bool getLink(yyscan_t yyscanner,
- const char *className,
- const char *memberName,
+ const QCString &className,
+ const QCString &memberName,
CodeOutputInterface &ol,
- const char *text,
+ const QCString &text,
bool varOnly)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"getLink(%s,%s) yyextra->curClassName=%s\n",className,memberName,yyextra->curClassName.data()));
+ DBG_CTX((stderr,"getLink(%s,%s) yyextra->curClassName=%s\n",
+ qPrint(className),qPrint(memberName),qPrint(yyextra->curClassName)));
QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className;
if (!getLinkInScope(yyscanner,c,m,memberName,ol,text,varOnly))
@@ -2835,18 +2807,18 @@ static bool getLink(yyscan_t yyscanner,
static void generateClassOrGlobalLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
- const char *clName,
+ const QCString &clName,
bool typeOnly,
bool varOnly)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int i=0;
- if (*clName=='~') // correct for matching negated values i.s.o. destructors.
+ QCString className=clName;
+ if (!className.isEmpty() && className[0]=='~') // correct for matching negated values i.s.o. destructors.
{
yyextra->code->codify("~");
- clName++;
+ className=className.mid(1);
}
- QCString className=clName;
if (className.isEmpty()) return;
if (yyextra->insideProtocolList) // for Obj-C
{
@@ -2865,22 +2837,22 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
const MemberDef *md=0;
bool isLocal=FALSE;
- DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",className.data()));
+ DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",qPrint(className)));
if (!yyextra->isPrefixedWithThis || (lcd=yyextra->theVarContext.findVariable(className))==0) // not a local variable
{
const Definition *d = yyextra->currentDefinition;
- DBG_CTX((stderr,"d=%s yyextra->sourceFileDef=%s\n",d?d->name().data():"<none>",yyextra->sourceFileDef?yyextra->sourceFileDef->name().data():"<none>"));
+ DBG_CTX((stderr,"d=%s yyextra->sourceFileDef=%s\n",d?qPrint(d->name()):"<none>",yyextra->sourceFileDef?qPrint(yyextra->sourceFileDef->name()):"<none>"));
cd = yyextra->symbolResolver.resolveClass(d,className);
md = yyextra->symbolResolver.getTypedef();
DBG_CTX((stderr,"non-local variable name=%s cd=%s md=%s!\n",
- className.data(),cd?cd->name().data():"<none>",
- md?md->name().data():"<none>"));
+ qPrint(className),cd?qPrint(cd->name()):"<none>",
+ md?qPrint(md->name()):"<none>"));
i=className.find('<');
QCString bareName = className;
if (i!=-1) bareName = bareName.left(i);
if (cd==0 && md==0 && i!=-1)
{
- DBG_CTX((stderr,"bareName=%s\n",bareName.data()));
+ DBG_CTX((stderr,"bareName=%s\n",qPrint(bareName)));
if (bareName!=className)
{
cd = yyextra->symbolResolver.resolveClass(d,bareName); // try unspecialized version
@@ -2903,10 +2875,10 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
writeMultiLineCodeLink(yyscanner,*yyextra->code,conceptDef,clName);
return;
}
- DBG_CTX((stderr,"md=%s\n",md?md->name().data():"<none>"));
+ DBG_CTX((stderr,"md=%s\n",md?qPrint(md->name()):"<none>"));
DBG_CTX((stderr,"is found as a type cd=%s nd=%s\n",
- cd?cd->name().data():"<null>",
- nd?nd->name().data():"<null>"));
+ cd?qPrint(cd->name()):"<null>",
+ nd?qPrint(nd->name()):"<null>"));
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
if (getLink(yyscanner,yyextra->classScope,clName,ol,clName,varOnly))
@@ -2920,7 +2892,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
DBG_CTX((stderr,"local variable!\n"));
if (lcd->type()!=ScopedTypeVariant::Dummy)
{
- DBG_CTX((stderr,"non-dummy context lcd=%s!\n",lcd->name().data()));
+ DBG_CTX((stderr,"non-dummy context lcd=%s!\n",qPrint(lcd->name())));
yyextra->theCallContext.setScope(*lcd);
// to following is needed for links to a global variable, but is
@@ -2938,14 +2910,14 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
if (cd && cd->isLinkable()) // is it a linkable class
{
- DBG_CTX((stderr,"is linkable class %s\n",clName));
+ DBG_CTX((stderr,"is linkable class %s\n",qPrint(clName)));
if (yyextra->exampleBlock)
{
std::lock_guard<std::mutex> lock(g_addExampleMutex);
QCString anchor;
anchor.sprintf("_a%d",yyextra->anchorCount);
- DBG_CTX((stderr,"addExampleClass(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
- yyextra->exampleFile.data()));
+ DBG_CTX((stderr,"addExampleClass(%s,%s,%s)\n",qPrint(anchor),qPrint(yyextra->exampleName),
+ qPrint(yyextra->exampleFile)));
ClassDefMutable *cdm = toClassDefMutable(const_cast<ClassDef*>(cd));
if (cdm && cdm->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
@@ -2971,19 +2943,19 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
}
else // not a class, maybe a global member
{
- DBG_CTX((stderr,"class %s not linkable! cd=%p md=%p typeOnly=%d\n",clName,(void*)cd,(void*)md,typeOnly));
+ DBG_CTX((stderr,"class %s not linkable! cd=%p md=%p typeOnly=%d\n",qPrint(clName),(void*)cd,(void*)md,typeOnly));
if (!isLocal && (md!=0 || (cd==0 && !typeOnly))) // not a class, see if it is a global enum/variable/typedef.
{
if (md==0) // not found as a typedef
{
md = setCallContextForVar(yyscanner,clName);
- DBG_CTX((stderr,"setCallContextForVar(%s) md=%p yyextra->currentDefinition=%p\n",clName,(void*)md,(void*)yyextra->currentDefinition));
+ DBG_CTX((stderr,"setCallContextForVar(%s) md=%p yyextra->currentDefinition=%p\n",qPrint(clName),(void*)md,(void*)yyextra->currentDefinition));
if (md && yyextra->currentDefinition)
{
DBG_CTX((stderr,"%s accessible from %s? %d md->getOuterScope=%s\n",
- md->name().data(),yyextra->currentDefinition->name().data(),
+ qPrint(md->name()),qPrint(yyextra->currentDefinition->name()),
yyextra->symbolResolver.isAccessibleFrom(yyextra->currentDefinition,md),
- md->getOuterScope()->name().data()));
+ qPrint(md->getOuterScope()->name())));
}
if (md && yyextra->currentDefinition &&
@@ -2994,7 +2966,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
}
if (md && (!varOnly || md->isVariable()))
{
- DBG_CTX((stderr,"is a global md=%p yyextra->currentDefinition=%s linkable=%d\n",(void*)md,yyextra->currentDefinition?yyextra->currentDefinition->name().data():"<none>",md->isLinkable()));
+ DBG_CTX((stderr,"is a global md=%p yyextra->currentDefinition=%s linkable=%d\n",(void*)md,yyextra->currentDefinition?qPrint(yyextra->currentDefinition->name()):"<none>",md->isLinkable()));
if (md->isLinkable())
{
QCString text=clName;
@@ -3017,26 +2989,32 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
}
}
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName,
+ bool typeOnly,bool varOnly)
+{
+ generateClassOrGlobalLink(yyscanner,ol,QCString(clName),typeOnly,varOnly);
+}
+
static bool generateClassMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
const MemberDef *xmd,
- const char *memName)
+ const QCString &memName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
// extract class definition of the return type in order to resolve
// a->b()->c() like call chains
DBG_CTX((stderr,"type='%s' args='%s' class=%s\n",
- xmd->typeString(),xmd->argsString(),
- xmd->getClassDef()->name().data()));
+ qPrint(xmd->typeString()),qPrint(xmd->argsString()),
+ qPrint(xmd->getClassDef()->name())));
if (yyextra->exampleBlock)
{
std::lock_guard<std::mutex> lock(g_addExampleMutex);
QCString anchor;
anchor.sprintf("a%d",yyextra->anchorCount);
- DBG_CTX((stderr,"addExampleFile(%s,%s,%s)\n",anchor.data(),yyextra->exampleName.data(),
- yyextra->exampleFile.data()));
+ DBG_CTX((stderr,"addExampleFile(%s,%s,%s)\n",qPrint(anchor),qPrint(yyextra->exampleName),
+ qPrint(yyextra->exampleFile)));
MemberDefMutable *mdm = toMemberDefMutable(xmd);
if (mdm && mdm->addExample(anchor,yyextra->exampleName,yyextra->exampleFile))
{
@@ -3046,7 +3024,7 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
}
const ClassDef *typeClass = stripClassName(yyscanner,removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
- DBG_CTX((stderr,"%s -> typeName=%p\n",xmd->typeString(),(void*)typeClass));
+ DBG_CTX((stderr,"%s -> typeName=%p\n",qPrint(xmd->typeString()),(void*)typeClass));
yyextra->theCallContext.setScope(ScopedTypeVariant(typeClass));
const Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ?
@@ -3083,14 +3061,14 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
static bool generateClassMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
const Definition *def,
- const char *memName)
+ const QCString &memName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (def && def->definitionType()==Definition::TypeClass)
{
const ClassDef *cd = toClassDef(def);
const MemberDef *xmd = cd->getMemberByName(memName);
- DBG_CTX((stderr,"generateClassMemberLink(class=%s,member=%s)=%p\n",def->name().data(),memName,(void*)xmd));
+ DBG_CTX((stderr,"generateClassMemberLink(class=%s,member=%s)=%p\n",qPrint(def->name()),qPrint(memName),(void*)xmd));
if (xmd)
{
return generateClassMemberLink(yyscanner,ol,xmd,memName);
@@ -3110,7 +3088,7 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
else if (def && def->definitionType()==Definition::TypeNamespace)
{
const NamespaceDef *nd = toNamespaceDef(def);
- DBG_CTX((stderr,"Looking for %s inside namespace %s\n",memName,nd->name().data()));
+ DBG_CTX((stderr,"Looking for %s inside namespace %s\n",qPrint(memName),qPrint(nd->name())));
const Definition *innerDef = nd->findInnerCompound(memName);
if (innerDef)
{
@@ -3126,11 +3104,11 @@ static bool generateClassMemberLink(yyscan_t yyscanner,
static void generateMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
const QCString &varName,
- const char *memName)
+ const QCString &memName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
DBG_CTX((stderr,"generateMemberLink(object=%s,mem=%s) classScope=%s\n",
- varName.data(),memName,yyextra->classScope.data()));
+ qPrint(varName),qPrint(memName),qPrint(yyextra->classScope)));
if (varName.isEmpty()) return;
@@ -3164,7 +3142,7 @@ static void generateMemberLink(yyscan_t yyscanner,
const ClassDef *vcd = yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,yyextra->classScope);
if (vcd && vcd->isLinkable())
{
- DBG_CTX((stderr,"Found class %s for variable '%s'\n",yyextra->classScope.data(),varName.data()));
+ DBG_CTX((stderr,"Found class %s for variable '%s'\n",qPrint(yyextra->classScope),qPrint(varName)));
MemberName *vmn=Doxygen::memberNameLinkedMap->find(varName);
if (vmn==0)
{
@@ -3175,14 +3153,14 @@ static void generateMemberLink(yyscan_t yyscanner,
const ClassDef *jcd = getClass(vn.left(vi));
vn=vn.right(vn.length()-vi-2);
vmn=Doxygen::memberNameLinkedMap->find(vn);
- //printf("Trying name '%s' scope=%s\n",vn.data(),scope.data());
+ //printf("Trying name '%s' scope=%s\n",qPrint(vn),qPrint(scope));
if (vmn)
{
for (const auto &vmd : *vmn)
{
if (vmd->getClassDef()==jcd)
{
- DBG_CTX((stderr,"Found variable type=%s\n",vmd->typeString()));
+ DBG_CTX((stderr,"Found variable type=%s\n",qPrint(vmd->typeString())));
const ClassDef *mcd=stripClassName(yyscanner,vmd->typeString(),vmd->getOuterScope());
if (mcd && mcd->isLinkable())
{
@@ -3195,12 +3173,12 @@ static void generateMemberLink(yyscan_t yyscanner,
}
if (vmn)
{
- DBG_CTX((stderr,"There is a variable with name '%s'\n",varName.data()));
+ DBG_CTX((stderr,"There is a variable with name '%s'\n",qPrint(varName)));
for (const auto &vmd : *vmn)
{
if (vmd->getClassDef()==vcd)
{
- DBG_CTX((stderr,"Found variable type=%s\n",vmd->typeString()));
+ DBG_CTX((stderr,"Found variable type=%s\n",qPrint(vmd->typeString())));
const ClassDef *mcd=stripClassName(yyscanner,vmd->typeString(),vmd->getOuterScope());
if (mcd && mcd->isLinkable())
{
@@ -3220,16 +3198,16 @@ static void generateMemberLink(yyscan_t yyscanner,
static void generatePHPVariableLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *varName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- QCString name = varName+7; // strip $this->
+ QCString name(varName+7); // strip $this->
name.prepend("$");
- DBG_CTX((stderr,"generatePHPVariableLink(%s) name=%s scope=%s\n",varName,name.data(),yyextra->classScope.data()));
- if (!getLink(yyscanner,yyextra->classScope,name,ol,varName))
+ DBG_CTX((stderr,"generatePHPVariableLink(%s) name=%s scope=%s\n",varName,qPrint(name),qPrint(yyextra->classScope)));
+ if (!getLink(yyscanner,yyextra->classScope,name,ol,QCString(varName)))
{
codifyLines(yyscanner,varName);
}
}
-static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *funcName)
+static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &funcName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//CodeClassDef *ccd=0;
@@ -3240,7 +3218,7 @@ static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,cons
QCString funcWithScope=locFunc;
QCString funcWithFullScope=locFunc;
QCString fullScope=locScope;
- DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()));
+ DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",qPrint(locScope),qPrint(locFunc)));
int len=2;
int i=locFunc.findRev("::");
if (yyextra->currentMemberDef && yyextra->currentMemberDef->resolveAlias()->getClassDef() &&
@@ -3338,6 +3316,11 @@ exit:
return;
}
+static void generateFunctionLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *funcName)
+{
+ generateFunctionLink(yyscanner,ol,QCString(funcName));
+}
+
/*! counts the number of lines in the input */
static int countLines(yyscan_t yyscanner)
{
@@ -3373,7 +3356,7 @@ static void startFontClass(yyscan_t yyscanner,const char *s)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
endFontClass(yyscanner);
- yyextra->code->startFontClass(s);
+ yyextra->code->startFontClass(QCString(s));
yyextra->currentFontClass=s;
}
@@ -3385,15 +3368,14 @@ static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx)
if (ctx==0) return;
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
char c;
- const char *p = ctx->format.data();
if (!ctx->methodName.isEmpty())
{
DBG_CTX((stderr,"writeObjCMethodCall(%s) obj=%s method=%s\n",
- ctx->format.data(),ctx->objectTypeOrName.data(),ctx->methodName.data()));
+ qPrint(ctx->format),qPrint(ctx->objectTypeOrName),qPrint(ctx->methodName)));
if (!ctx->objectTypeOrName.isEmpty() && ctx->objectTypeOrName.at(0)!='$')
{
- DBG_CTX((stderr,"Looking for object=%s method=%s\n",ctx->objectTypeOrName.data(),
- ctx->methodName.data()));
+ DBG_CTX((stderr,"Looking for object=%s method=%s\n",qPrint(ctx->objectTypeOrName),
+ qPrint(ctx->methodName)));
const ScopedTypeVariant *stv = yyextra->theVarContext.findVariable(ctx->objectTypeOrName);
if (stv==0) // not a local variable
{
@@ -3414,7 +3396,7 @@ static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx)
if (ctx->objectType) // found class
{
ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
- DBG_CTX((stderr," yes->method=%s\n",ctx->method?ctx->method->name().data():"<none>"));
+ DBG_CTX((stderr," yes->method=%s\n",ctx->method?qPrint(ctx->method->name()):"<none>"));
}
else if (ctx->method==0) // search for class variable with the same name
{
@@ -3455,229 +3437,233 @@ static void writeObjCMethodCall(yyscan_t yyscanner,ObjCCallCtx *ctx)
}
DBG_CTX((stderr,"["));
- while ((c=*p++)) // for each character in ctx->format
+ if (!ctx->format.isEmpty())
{
- if (c=='$')
+ const char *p = ctx->format.data();
+ while ((c=*p++)) // for each character in ctx->format
{
- char nc=*p++;
- if (nc=='$') // escaped $
- {
- yyextra->code->codify("$");
- }
- else // name fragment or reference to a nested call
+ if (c=='$')
{
- if (nc=='n') // name fragment
+ char nc=*p++;
+ if (nc=='$') // escaped $
+ {
+ yyextra->code->codify("$");
+ }
+ else // name fragment or reference to a nested call
{
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->nameMap.find(refId);
- if (it!=yyextra->nameMap.end())
+ if (nc=='n') // name fragment
{
- QCString name = it->second;
- if (ctx->method && ctx->method->isLinkable())
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->nameMap.find(refId);
+ if (it!=yyextra->nameMap.end())
{
- writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->method,name);
- if (yyextra->currentMemberDef && yyextra->collectXRefs)
+ QCString name = it->second;
+ if (ctx->method && ctx->method->isLinkable())
+ {
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->method,name);
+ if (yyextra->currentMemberDef && yyextra->collectXRefs)
+ {
+ std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
+ addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(ctx->method));
+ }
+ }
+ else
{
- std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
- addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(ctx->method));
+ codifyLines(yyscanner,name);
}
}
else
{
- codifyLines(yyscanner,name);
+ DBG_CTX((stderr,"Invalid name: id=%d\n",refId));
}
}
- else
+ else if (nc=='o') // reference to potential object name
{
- DBG_CTX((stderr,"Invalid name: id=%d\n",refId));
- }
- }
- else if (nc=='o') // reference to potential object name
- {
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->objectMap.find(refId);
- if (it!=yyextra->objectMap.end())
- {
- QCString object = it->second;
- if (object=="self")
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->objectMap.find(refId);
+ if (it!=yyextra->objectMap.end())
{
- if (yyextra->currentDefinition &&
- yyextra->currentDefinition->definitionType()==Definition::TypeClass)
+ QCString object = it->second;
+ if (object=="self")
{
- ctx->objectType = toClassDef(yyextra->currentDefinition);
- if (ctx->objectType->categoryOf())
- {
- ctx->objectType = ctx->objectType->categoryOf();
- }
- if (ctx->objectType && !ctx->methodName.isEmpty())
+ if (yyextra->currentDefinition &&
+ yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
- ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ ctx->objectType = toClassDef(yyextra->currentDefinition);
+ if (ctx->objectType->categoryOf())
+ {
+ ctx->objectType = ctx->objectType->categoryOf();
+ }
+ if (ctx->objectType && !ctx->methodName.isEmpty())
+ {
+ ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ }
}
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,object);
+ endFontClass(yyscanner);
}
- startFontClass(yyscanner,"keyword");
- codifyLines(yyscanner,object);
- endFontClass(yyscanner);
- }
- else if (object=="super")
- {
- if (yyextra->currentDefinition &&
- yyextra->currentDefinition->definitionType()==Definition::TypeClass)
+ else if (object=="super")
{
- const ClassDef *cd = toClassDef(yyextra->currentDefinition);
- if (cd->categoryOf())
+ if (yyextra->currentDefinition &&
+ yyextra->currentDefinition->definitionType()==Definition::TypeClass)
{
- cd = cd->categoryOf();
- }
- for (const auto &bclass : cd->baseClasses())
- {
- if (bclass.classDef->compoundType()!=ClassDef::Protocol)
+ const ClassDef *cd = toClassDef(yyextra->currentDefinition);
+ if (cd->categoryOf())
+ {
+ cd = cd->categoryOf();
+ }
+ for (const auto &bclass : cd->baseClasses())
{
- ctx->objectType = bclass.classDef;
- if (ctx->objectType && !ctx->methodName.isEmpty())
+ if (bclass.classDef->compoundType()!=ClassDef::Protocol)
{
- ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ ctx->objectType = bclass.classDef;
+ if (ctx->objectType && !ctx->methodName.isEmpty())
+ {
+ ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ }
}
}
}
+ startFontClass(yyscanner,"keyword");
+ codifyLines(yyscanner,object);
+ endFontClass(yyscanner);
}
- startFontClass(yyscanner,"keyword");
- codifyLines(yyscanner,object);
- endFontClass(yyscanner);
- }
- else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable
- {
- writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->objectVar,object);
- if (yyextra->currentMemberDef && yyextra->collectXRefs)
+ else if (ctx->objectVar && ctx->objectVar->isLinkable()) // object is class variable
{
- std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
- addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(ctx->objectVar));
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,ctx->objectVar,object);
+ if (yyextra->currentMemberDef && yyextra->collectXRefs)
+ {
+ std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
+ addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(ctx->objectVar));
+ }
}
- }
- else if (ctx->objectType &&
- ctx->objectType->isLinkable()
- ) // object is class name
- {
- const ClassDef *cd = ctx->objectType;
- writeMultiLineCodeLink(yyscanner,*yyextra->code,cd,object);
- }
- else // object still needs to be resolved
- {
- const ClassDef *cd = yyextra->symbolResolver.resolveClass(yyextra->currentDefinition, object);
- if (cd && cd->isLinkable())
+ else if (ctx->objectType &&
+ ctx->objectType->isLinkable()
+ ) // object is class name
{
- if (ctx->objectType==0) ctx->objectType=cd;
+ const ClassDef *cd = ctx->objectType;
writeMultiLineCodeLink(yyscanner,*yyextra->code,cd,object);
}
- else
+ else // object still needs to be resolved
{
- codifyLines(yyscanner,object);
+ const ClassDef *cd = yyextra->symbolResolver.resolveClass(yyextra->currentDefinition, object);
+ if (cd && cd->isLinkable())
+ {
+ if (ctx->objectType==0) ctx->objectType=cd;
+ writeMultiLineCodeLink(yyscanner,*yyextra->code,cd,object);
+ }
+ else
+ {
+ codifyLines(yyscanner,object);
+ }
}
}
+ else
+ {
+ DBG_CTX((stderr,"Invalid object: id=%d\n",refId));
+ }
}
- else
- {
- DBG_CTX((stderr,"Invalid object: id=%d\n",refId));
- }
- }
- else if (nc=='c') // reference to nested call
- {
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->contextMap.find(refId);
- if (it!=yyextra->contextMap.end()) // recurse into nested call
+ else if (nc=='c') // reference to nested call
{
- ObjCCallCtx *ictx = it->second.get();
- writeObjCMethodCall(yyscanner,ictx);
- if (ictx->method) // link to nested call successfully
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->contextMap.find(refId);
+ if (it!=yyextra->contextMap.end()) // recurse into nested call
{
- // get the ClassDef representing the method's return type
- if (QCString(ictx->method->typeString())=="id")
+ ObjCCallCtx *ictx = it->second.get();
+ writeObjCMethodCall(yyscanner,ictx);
+ if (ictx->method) // link to nested call successfully
{
- // see if the method name is unique, if so we link to it
- MemberName *mn=Doxygen::memberNameLinkedMap->find(ctx->methodName);
- //printf("mn->count=%d ictx->method=%s ctx->methodName=%s\n",
- // mn==0?-1:(int)mn->count(),
- // ictx->method->name().data(),
- // ctx->methodName.data());
- if (mn && mn->size()==1) // member name unique
+ // get the ClassDef representing the method's return type
+ if (QCString(ictx->method->typeString())=="id")
{
- ctx->method = mn->front().get();
+ // see if the method name is unique, if so we link to it
+ MemberName *mn=Doxygen::memberNameLinkedMap->find(ctx->methodName);
+ //printf("mn->count=%d ictx->method=%s ctx->methodName=%s\n",
+ // mn==0?-1:(int)mn->count(),
+ // qPrint(ictx->method->name()),
+ // qPrint(ctx->methodName));
+ if (mn && mn->size()==1) // member name unique
+ {
+ ctx->method = mn->front().get();
+ }
}
- }
- else
- {
- ctx->objectType = stripClassName(yyscanner,ictx->method->typeString(),yyextra->currentDefinition);
- if (ctx->objectType && !ctx->methodName.isEmpty())
+ else
{
- ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ ctx->objectType = stripClassName(yyscanner,ictx->method->typeString(),yyextra->currentDefinition);
+ if (ctx->objectType && !ctx->methodName.isEmpty())
+ {
+ ctx->method = ctx->objectType->getMemberByName(ctx->methodName);
+ }
}
+ DBG_CTX((stderr," ***** method=%s -> object=%p\n",qPrint(ictx->method->name()),(void*)ctx->objectType));
}
- DBG_CTX((stderr," ***** method=%s -> object=%p\n",(void*)ictx->method->name().data(),(void*)ctx->objectType));
+ }
+ else
+ {
+ DBG_CTX((stderr,"Invalid context: id=%d\n",refId));
}
}
- else
+ else if (nc=='w') // some word
{
- DBG_CTX((stderr,"Invalid context: id=%d\n",refId));
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->wordMap.find(refId);
+ if (it!=yyextra->wordMap.end())
+ {
+ QCString word = it->second;
+ codifyLines(yyscanner,word);
+ }
}
- }
- else if (nc=='w') // some word
- {
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->wordMap.find(refId);
- if (it!=yyextra->wordMap.end())
+ else if (nc=='d') // comment block
{
- QCString word = it->second;
- codifyLines(yyscanner,word);
+ nc=*p++;
+ QCString refIdStr;
+ while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
+ p--;
+ int refId=refIdStr.toInt();
+ auto it = yyextra->commentMap.find(refId);
+ if (it!=yyextra->commentMap.end())
+ {
+ QCString comment = it->second;
+ startFontClass(yyscanner,"comment");
+ codifyLines(yyscanner,comment);
+ endFontClass(yyscanner);
+ }
}
- }
- else if (nc=='d') // comment block
- {
- nc=*p++;
- QCString refIdStr;
- while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
- p--;
- int refId=refIdStr.toInt();
- auto it = yyextra->commentMap.find(refId);
- if (it!=yyextra->commentMap.end())
+ else // illegal marker
{
- QCString comment = it->second;
- startFontClass(yyscanner,"comment");
- codifyLines(yyscanner,comment);
- endFontClass(yyscanner);
+ ASSERT("invalid escape sequence"==0);
}
}
- else // illegal marker
- {
- ASSERT("invalid escape sequence"==0);
- }
}
- }
- else // normal non-marker character
- {
- char s[2];
- s[0]=c;s[1]=0;
- codifyLines(yyscanner,s);
+ else // normal non-marker character
+ {
+ char s[2];
+ s[0]=c;s[1]=0;
+ codifyLines(yyscanner,s);
+ }
}
}
- DBG_CTX((stderr,"%s %s]\n",ctx->objectTypeOrName.data(),ctx->methodName.data()));
+ DBG_CTX((stderr,"%s %s]\n",qPrint(ctx->objectTypeOrName),qPrint(ctx->methodName)));
DBG_CTX((stderr,"}=(type='%s',name='%s')",
- ctx->objectTypeOrName.data(),
- ctx->methodName.data()));
+ qPrint(ctx->objectTypeOrName),
+ qPrint(ctx->methodName)));
}
// Replaces an Objective-C method name fragment s by a marker of the form
@@ -3723,14 +3709,16 @@ static QCString escapeComment(yyscan_t yyscanner,const char *s)
return result;
}
-static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const QCString &kw)
+static bool skipLanguageSpecificKeyword(yyscan_t yyscanner,const char *keyword)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ QCString kw(keyword);
return yyextra->lang==SrcLangExt_Cpp && (kw == "remove" || kw == "set" || kw == "get");
}
-static bool isCastKeyword(const QCString &s)
+static bool isCastKeyword(const char *keyword)
{
+ QCString s(keyword);
int i=s.find('<');
if (i==-1) return FALSE;
QCString kw = s.left(i).stripWhiteSpace();
@@ -3762,7 +3750,7 @@ static void saveObjCContext(yyscan_t yyscanner)
if (yyextra->braceCount==0 && YY_START==ObjCCall)
{
yyextra->currentCtx->objectTypeOrName=yyextra->currentCtx->format.mid(1);
- DBG_CTX((stderr,"new type=%s\n",yyextra->currentCtx->objectTypeOrName.data()));
+ DBG_CTX((stderr,"new type=%s\n",qPrint(yyextra->currentCtx->objectTypeOrName)));
}
yyextra->contextStack.push(yyextra->currentCtx);
}
@@ -3839,8 +3827,8 @@ void CCodeParser::setStartCodeLine(const bool inp)
yyextra->beginCodeLine = inp;
}
-void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const QCString &s,
- SrcLangExt lang,bool exBlock, const char *exName,FileDef *fd,
+void CCodeParser::parseCode(CodeOutputInterface &od,const QCString &className,const QCString &s,
+ SrcLangExt lang,bool exBlock, const QCString &exName,FileDef *fd,
int startLine,int endLine,bool inlineFragment,
const MemberDef *memberDef,bool showLineNumbers,const Definition *searchCtx,
bool collectXRefs)
@@ -3848,14 +3836,14 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
yyscan_t yyscanner = p->yyscanner;
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
DBG_CTX((stderr,"***parseCode() exBlock=%d exName=%s fd=%p className=%s searchCtx=%s\n",
- exBlock,exName,(void*)fd,className,searchCtx?searchCtx->name().data():"<none>"));
+ exBlock,qPrint(exName),(void*)fd,qPrint(className),searchCtx?qPrint(searchCtx->name()):"<none>"));
if (s.isEmpty()) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, fd ? qPrint(fd->fileName()): NULL);
yyextra->code = &od;
- yyextra->inputString = s;
+ yyextra->inputString = s.data();
yyextra->inputPosition = 0;
codeYYrestart(0,yyscanner);
yyextra->currentFontClass = 0;
@@ -3883,7 +3871,7 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
yyextra->theCallContext.clear();
while (!yyextra->scopeStack.empty()) yyextra->scopeStack.pop();
yyextra->classScope = className;
- DBG_CTX((stderr,"parseCCode %s\n",className));
+ DBG_CTX((stderr,"parseCCode %s\n",qPrint(className)));
yyextra->exampleBlock = exBlock;
yyextra->exampleName = exName;
yyextra->sourceFileDef = fd;
@@ -3892,7 +3880,7 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
if (fd==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exName?exName:"generated"));
+ yyextra->sourceFileDef = createFileDef(QCString(),(!exName.isEmpty()?exName:"generated"));
cleanupSourceDef = TRUE;
}
yyextra->lang = lang;
@@ -3909,10 +3897,10 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
if (!yyextra->exampleName.isEmpty())
{
yyextra->exampleFile = convertNameToFile(yyextra->exampleName+"-example",FALSE,TRUE);
- DBG_CTX((stderr,"yyextra->exampleFile=%s\n",yyextra->exampleFile.data()));
+ DBG_CTX((stderr,"yyextra->exampleFile=%s\n",qPrint(yyextra->exampleFile)));
}
yyextra->includeCodeFragment = inlineFragment;
- DBG_CTX((stderr,"** exBlock=%d exName=%s include=%d\n",exBlock,exName,inlineFragment));
+ DBG_CTX((stderr,"** exBlock=%d exName=%s include=%d\n",exBlock,qPrint(exName),inlineFragment));
if (yyextra->beginCodeLine) startCodeLine(yyscanner);
yyextra->type.resize(0);
yyextra->name.resize(0);
@@ -3938,7 +3926,7 @@ void CCodeParser::parseCode(CodeOutputInterface &od,const char *className,const
// write the tooltips
TooltipManager::instance().writeTooltips(od);
- printlex(yy_flex_debug, FALSE, __FILE__, fd ? fd->fileName().data(): NULL);
+ printlex(yy_flex_debug, FALSE, __FILE__, fd ? qPrint(fd->fileName()): NULL);
return;
}
diff --git a/src/commentcnv.h b/src/commentcnv.h
index a45d29c..973a602 100644
--- a/src/commentcnv.h
+++ b/src/commentcnv.h
@@ -1,12 +1,12 @@
/*****************************************************************************
*
- *
+ *
*
* 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,9 +19,10 @@
#define _COMMENTCNV_H
class BufStr;
+class QCString;
extern void convertCppComments(BufStr *inBuf,BufStr *outBuf,
- const char *fileName);
+ const QCString &fileName);
#endif
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 2d0a4aa..23611a9 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -108,10 +108,10 @@ static inline int computeIndent(const char *s);
static void replaceCommentMarker(yyscan_t yyscanner,const char *s,int len);
static inline void copyToOutput(yyscan_t yyscanner,const char *s,int len);
-static void startCondSection(yyscan_t yyscanner,const char *sectId);
+static void startCondSection(yyscan_t yyscanner,const QCString &sectId);
static void endCondSection(yyscan_t yyscanner);
static void handleCondSectionId(yyscan_t yyscanner,const char *expression);
-static void replaceAliases(yyscan_t yyscanner,const char *s);
+static void replaceAliases(yyscan_t yyscanner,const QCString &s);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
static void replaceComment(yyscan_t yyscanner,int offset);
static void clearCommentStack(yyscan_t yyscanner);
@@ -306,7 +306,7 @@ SLASHopt [/]*
}
yyextra->blockHeadCol=yyextra->col;
copyToOutput(yyscanner,"/**",3);
- replaceAliases(yyscanner,yytext+i);
+ replaceAliases(yyscanner,QCString(yytext+i));
yyextra->inSpecialComment=TRUE;
//BEGIN(SComment);
yyextra->readLineCtx=SComment;
@@ -318,7 +318,7 @@ SLASHopt [/]*
int i=17; //=strlen("//##Documentation");
yyextra->blockHeadCol=yyextra->col;
copyToOutput(yyscanner,"/**",3);
- replaceAliases(yyscanner,yytext+i);
+ replaceAliases(yyscanner,QCString(yytext+i));
yyextra->inRoseComment=TRUE;
BEGIN(SComment);
}
@@ -873,7 +873,7 @@ SLASHopt [/]*
if (*yytext=='\n') yyextra->lineNr++;
}
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9]* { // expand alias without arguments
- replaceAliases(yyscanner,yytext);
+ replaceAliases(yyscanner,QCString(yytext));
}
<CComment,ReadLine>[\\@][a-z_A-Z][a-z_A-Z0-9]*"{" { // expand alias with arguments
yyextra->lastBlockContext=YY_START;
@@ -891,7 +891,7 @@ SLASHopt [/]*
}
else // abort the alias, restart scanning
{
- copyToOutput(yyscanner,yyextra->aliasString,yyextra->aliasString.length());
+ copyToOutput(yyscanner,yyextra->aliasString.data(),yyextra->aliasString.length());
copyToOutput(yyscanner,yytext,(int)yyleng);
BEGIN(Scan);
}
@@ -1043,7 +1043,7 @@ static void clearCommentStack(yyscan_t yyscanner)
while (!yyextra->commentStack.empty()) yyextra->commentStack.pop();
}
-static void startCondSection(yyscan_t yyscanner,const char *sectId)
+static void startCondSection(yyscan_t yyscanner,const QCString &sectId)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("startCondSection: skip=%d stack=%d\n",g_skip,g_condStack.count());
@@ -1077,7 +1077,7 @@ static void handleCondSectionId(yyscan_t yyscanner,const char *expression)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool oldSkip=yyextra->skip;
- startCondSection(yyscanner,expression);
+ startCondSection(yyscanner,QCString(expression));
if ((yyextra->condCtx==CComment || yyextra->readLineCtx==SComment) &&
!oldSkip && yyextra->skip)
{
@@ -1103,11 +1103,11 @@ static void handleCondSectionId(yyscan_t yyscanner,const char *expression)
/** copies string \a s with length \a len to the output, while
* replacing any alias commands found in the string.
*/
-static void replaceAliases(yyscan_t yyscanner,const char *s)
+static void replaceAliases(yyscan_t yyscanner,const QCString &s)
{
QCString result = resolveAliasCmd(s);
//printf("replaceAliases(%s)->'%s'\n",s,result.data());
- copyToOutput(yyscanner,result,result.length());
+ copyToOutput(yyscanner,result.data(),result.length());
}
@@ -1152,7 +1152,7 @@ static void replaceComment(yyscan_t yyscanner,int offset)
* -# It replaces aliases with their definition (see ALIASES)
* -# It handles conditional sections (cond...endcond blocks)
*/
-void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
+void convertCppComments(BufStr *inBuf,BufStr *outBuf,const QCString &fileName)
{
yyscan_t yyscanner;
commentcnvYY_state extra;
@@ -1176,12 +1176,12 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
clearCommentStack(yyscanner);
yyextra->vhdl = FALSE;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
yyextra->isFixedForm = FALSE;
if (yyextra->lang==SrcLangExt_Fortran)
{
FortranFormat fmt = convertFileNameFortranParserCode(fileName);
- yyextra->isFixedForm = recognizeFixedForm(inBuf->data(),fmt);
+ yyextra->isFixedForm = recognizeFixedForm(QCString(inBuf->data()),fmt);
}
if (yyextra->lang==SrcLangExt_Markdown)
@@ -1198,7 +1198,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
while (!yyextra->condStack.empty())
{
const CondCtx &ctx = yyextra->condStack.top();
- QCString sectionInfo = " ";
+ QCString sectionInfo(" ");
if (ctx.sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",ctx.sectionId.stripWhiteSpace().data());
warn(yyextra->fileName,ctx.lineNr,"Conditional section%sdoes not have "
"a corresponding \\endcond command within this file.",sectionInfo.data());
@@ -1206,7 +1206,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
}
if (yyextra->nestingCount>0 && yyextra->lang!=SrcLangExt_Markdown && yyextra->lang!=SrcLangExt_Fortran)
{
- QCString tmp= "(probable line reference: ";
+ QCString tmp("(probable line reference: ");
bool first = TRUE;
while (!yyextra->commentStack.empty())
{
@@ -1225,10 +1225,10 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
{
yyextra->outBuf->at(yyextra->outBuf->curPos())='\0';
Debug::print(Debug::CommentCnv,0,"-----------\nCommentCnv: %s\n"
- "output=[\n%s]\n-----------\n",fileName,yyextra->outBuf->data()
+ "output=[\n%s]\n-----------\n",qPrint(fileName),yyextra->outBuf->data()
);
}
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
commentcnvYYlex_destroy(yyscanner);
}
diff --git a/src/commentscan.h b/src/commentscan.h
index a111352..d9910d7 100644
--- a/src/commentscan.h
+++ b/src/commentscan.h
@@ -81,12 +81,12 @@ class CommentScanner
bool markdownEnabled
);
void initGroupInfo(Entry *entry);
- void enterFile(const char *fileName,int lineNr);
- void leaveFile(const char *fileName,int lineNr);
- void enterCompound(const char *fileName,int line,const char *name);
- void leaveCompound(const char *fileName,int line,const char *name);
- void open(Entry *e,const char *fileName,int line,bool implicit=false);
- void close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit=false);
+ void enterFile(const QCString &fileName,int lineNr);
+ void leaveFile(const QCString &fileName,int lineNr);
+ void enterCompound(const QCString &fileName,int line,const QCString &name);
+ void leaveCompound(const QCString &fileName,int line,const QCString &name);
+ void open(Entry *e,const QCString &fileName,int line,bool implicit=false);
+ void close(Entry *e,const QCString &fileName,int line,bool foundInline,bool implicit=false);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/commentscan.l b/src/commentscan.l
index dc16d4c..b9022a6 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -425,14 +425,15 @@ static void initParser(yyscan_t yyscanner);
static bool makeStructuralIndicator(yyscan_t yyscanner,Entry::Sections s);
static void lineCount(yyscan_t yyscanner);
static void addXRefItem(yyscan_t yyscanner,
- const char *listName,const char *itemTitle,
- const char *listTitle,bool append);
+ const QCString &listName,const QCString &itemTitle,
+ const QCString &listTitle,bool append);
static QCString addFormula(yyscan_t yyscanner);
static void checkFormula(yyscan_t yyscanner);
static void addSection(yyscan_t yyscanner);
static inline void setOutput(yyscan_t yyscanner,OutputContext ctx);
-static void addAnchor(yyscan_t yyscanner,const char *anchor);
+static void addAnchor(yyscan_t yyscanner,const QCString &anchor);
static inline void addOutput(yyscan_t yyscanner,const char *s);
+static inline void addOutput(yyscan_t yyscanner,const QCString &s);
static inline void addOutput(yyscan_t yyscanner,char c);
static void endBrief(yyscan_t yyscanner,bool addToOutput=TRUE);
static void handleGuard(yyscan_t yyscanner,const QCString &expr);
@@ -614,7 +615,7 @@ STopt [^\n@\\]*
addOutput(yyscanner,yytext);
}
<Comment>"<"{CAPTION}{ATTR}">" {
- QCString tag=yytext;
+ QCString tag(yytext);
int s=tag.find("id=");
if (s!=-1) // command has id attribute
{
@@ -672,16 +673,16 @@ STopt [^\n@\\]*
StringVector optList;
if (idx == -1) // no options
{
- cmdName = QCString(yytext).stripWhiteSpace().data()+1; // to remove {CMD}
+ cmdName = QCString(yytext).stripWhiteSpace().mid(1); // to remove {CMD}
}
else // options present
{
- cmdName = fullMatch.left(idx).stripWhiteSpace().data()+1; // to remove {CMD}
+ cmdName = fullMatch.left(idx).stripWhiteSpace().mid(1); // to remove {CMD}
QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
optList = split(optStr.str(),",");
}
- auto it = docCmdMap.find(cmdName.data());
- //printf("lookup command '%s' found=%d\n",cmdName.data(),it!=docCmdMap.end());
+ auto it = docCmdMap.find(cmdName.str());
+ //printf("lookup command '%s' found=%d\n",qPrint(cmdName),it!=docCmdMap.end());
if (it!=docCmdMap.end()) // special action is required
{
int i=0;
@@ -728,9 +729,9 @@ STopt [^\n@\\]*
addOutput(yyscanner,yytext);
}
<Comment>{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command
- QCString langId = QCString(yytext).stripWhiteSpace().data()+2;
+ QCString langId = QCString(yytext).stripWhiteSpace().mid(2);
if (!langId.isEmpty() &&
- qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)!=0)
+ qstricmp(Config_getEnum(OUTPUT_LANGUAGE).data(),langId.data())!=0)
{ // enable language specific section
BEGIN(SkipLang);
}
@@ -738,7 +739,7 @@ STopt [^\n@\\]*
<Comment>{B}*{CMD}"f{"[^}\n]+"}"("{"?) { // start of a formula with custom environment
setOutput(yyscanner,OutputDoc);
yyextra->formulaText="\\begin";
- yyextra->formulaEnv=QCString(yytext).stripWhiteSpace().data()+2;
+ yyextra->formulaEnv=QCString(yytext).stripWhiteSpace().mid(2);
if (yyextra->formulaEnv.at(yyextra->formulaEnv.length()-1)=='{')
{
// remove trailing open brace
@@ -984,7 +985,7 @@ STopt [^\n@\\]*
/* ------------ handle argument of namespace command --------------- */
<NameSpaceDocArg1>{SCOPENAME} { // handle argument
- yyextra->current->name = substitute(yytext,".","::");
+ yyextra->current->name = substitute(QCString(yytext),QCString("."),QCString("::"));
BEGIN( Comment );
}
<NameSpaceDocArg1>{LC} { // line continuation
@@ -1052,11 +1053,11 @@ STopt [^\n@\\]*
/* ------ handle argument of class/struct/union command --------------- */
<ClassDocArg1>{SCOPENAME}{TMPLSPEC} {
- yyextra->current->name = substitute(removeRedundantWhiteSpace(yytext),".","::");
+ yyextra->current->name = substitute(removeRedundantWhiteSpace(QCString(yytext)),".","::");
BEGIN( ClassDocArg2 );
}
<ClassDocArg1>{SCOPENAME} { // first argument
- yyextra->current->name = substitute(yytext,".","::");
+ yyextra->current->name = substitute(QCString(yytext),".","::");
if (yyextra->current->section==Entry::PROTOCOLDOC_SEC)
{
yyextra->current->name+="-p";
@@ -1065,7 +1066,7 @@ STopt [^\n@\\]*
BEGIN( ClassDocArg2 );
}
<CategoryDocArg1>{SCOPENAME}{B}*"("[^\)]+")" {
- yyextra->current->name = substitute(yytext,".","::");
+ yyextra->current->name = substitute(QCString(yytext),".","::");
BEGIN( ClassDocArg2 );
}
<ClassDocArg1,CategoryDocArg1>{LC} { // line continuation
@@ -1075,7 +1076,7 @@ STopt [^\n@\\]*
<ClassDocArg1,CategoryDocArg1>{DOCNL} {
warn(yyextra->fileName,yyextra->lineNr,
"missing argument after "
- "'\\%s'.",yyextra->currentCmd.data()
+ "'\\%s'.",qPrint(yyextra->currentCmd)
);
//addOutput(yyscanner,'\n');
//if (*yytext=='\n') yyextra->lineNr++;
@@ -1163,7 +1164,7 @@ STopt [^\n@\\]*
{
warn(yyextra->fileName,yyextra->lineNr,
"missing title after "
- "\\defgroup %s", yyextra->current->name.data()
+ "\\defgroup %s", qPrint(yyextra->current->name)
);
}
unput_string(yytext,yyleng);
@@ -1206,7 +1207,7 @@ STopt [^\n@\\]*
}
<PageDocArg2>{CMD}[<>] {
// bug 748927
- QCString tmp = yytext;
+ QCString tmp(yytext);
tmp = substitute(substitute(tmp,"@<","&lt;"),"@>","&gt;");
tmp = substitute(substitute(tmp,"\\<","&lt;"),"\\>","&gt;");
yyextra->current->args += tmp;
@@ -1329,7 +1330,7 @@ STopt [^\n@\\]*
}
<RelatesParam1>{DOCNL} { // missing argument
warn(yyextra->fileName,yyextra->lineNr,
- "Missing argument of '\\%s' command",yyextra->currentCmd.data()
+ "Missing argument of '\\%s' command",qPrint(yyextra->currentCmd)
);
unput_string(yytext,yyleng);
//if (*yytext=='\n') yyextra->lineNr++;
@@ -1415,7 +1416,7 @@ STopt [^\n@\\]*
addOutput(yyscanner,yytext);
// we add subpage labels as a kind of "inheritance" relation to prevent
// needing to add another list to the Entry class.
- yyextra->current->extends.push_back(BaseInfo(yytext,Public,Normal));
+ yyextra->current->extends.push_back(BaseInfo(QCString(yytext),Public,Normal));
BEGIN(SubpageTitle);
}
<SubpageLabel>{DOCNL} { // missing argument
@@ -1442,7 +1443,7 @@ STopt [^\n@\\]*
/* ----- handle arguments of the anchor command ------- */
<AnchorLabel>{LABELID} { // found argument
- addAnchor(yyscanner,yytext);
+ addAnchor(yyscanner,QCString(yytext));
addOutput(yyscanner,yytext);
BEGIN( Comment );
}
@@ -1497,7 +1498,7 @@ STopt [^\n@\\]*
if (yyextra->commentCount<0)
{
warn(yyextra->fileName,yyextra->lineNr,
- "found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",yyextra->blockName.data(),yyextra->blockName.data());
+ "found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",qPrint(yyextra->blockName),qPrint(yyextra->blockName));
}
}
}
@@ -1509,7 +1510,7 @@ STopt [^\n@\\]*
if (yyextra->blockName=="startuml") endTag="enduml";
warn(yyextra->fileName,yyextra->lineNr,
"reached end of comment while inside a \\%s block; check for missing \\%s tag!",
- yyextra->blockName.data(),endTag.data()
+ qPrint(yyextra->blockName),qPrint(endTag)
);
yyterminate();
}
@@ -1538,12 +1539,12 @@ STopt [^\n@\\]*
}
<GuardExpr>\n {
warn(yyextra->fileName,yyextra->lineNr,
- "invalid expression '%s' for yyextra->guards",yyextra->guardExpr.data());
+ "invalid expression '%s' for yyextra->guards",qPrint(yyextra->guardExpr));
unput(*yytext);
BEGIN(GuardParam);
}
<GuardParam>{B}*[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot yyextra->guards
- handleGuard(yyscanner,yytext);
+ handleGuard(yyscanner,QCString(yytext));
}
<GuardParam>{DOCNL} { // end of argument
if (*yytext=='\n') yyextra->lineNr++;
@@ -1734,7 +1735,7 @@ STopt [^\n@\\]*
<InGroupParam>{LABELID} { // group id
yyextra->current->groups.push_back(
- Grouping(yytext, Grouping::GROUPING_INGROUP)
+ Grouping(QCString(yytext), Grouping::GROUPING_INGROUP)
);
yyextra->inGroupParamFound=TRUE;
}
@@ -1819,7 +1820,7 @@ STopt [^\n@\\]*
<InheritParam>({ID}("::"|"."))*{ID} { // found argument
yyextra->current->extends.push_back(
- BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
+ BaseInfo(removeRedundantWhiteSpace(QCString(yytext)),Public,Normal)
);
BEGIN( Comment );
}
@@ -1842,13 +1843,13 @@ STopt [^\n@\\]*
<ExtendsParam>({ID}("::"|"."))*{ID} { // found argument
yyextra->current->extends.push_back(
- BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
+ BaseInfo(removeRedundantWhiteSpace(QCString(yytext)),Public,Normal)
);
BEGIN( Comment );
}
<ExtendsParam>{DOCNL} { // missing argument
warn(yyextra->fileName,yyextra->lineNr,
- "'\\%s' command has no argument",yyextra->currentCmd.data()
+ "'\\%s' command has no argument",qPrint(yyextra->currentCmd)
);
//if (*yytext=='\n') yyextra->lineNr++;
//addOutput(yyscanner,'\n');
@@ -1861,9 +1862,9 @@ STopt [^\n@\\]*
/* ----- handle language specific sections ------- */
<SkipLang>[\\@]"~"[a-zA-Z-]* { /* language switch */
- QCString langId = &yytext[2];
+ QCString langId(&yytext[2]);
if (langId.isEmpty() ||
- qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)==0)
+ qstricmp(Config_getEnum(OUTPUT_LANGUAGE).data(),langId.data())==0)
{ // enable language specific section
BEGIN(Comment);
}
@@ -2395,9 +2396,9 @@ static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const String
}
else
{
- addOutput(yyscanner,"@"+s+"{"+join(optList,",")+"} ");
+ addOutput(yyscanner,"@"+s+"{"+QCString(join(optList,","))+"} ");
}
- //printf("handleFormatBlock(%s) with option(%s)\n",s.data(),opt.data());
+ //printf("handleFormatBlock(%s) with option(%s)\n",qPrint(s),qPrint(opt));
yyextra->blockName=s;
yyextra->commentCount=0;
BEGIN(FormatBlock);
@@ -2667,7 +2668,7 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const StringVector &o
{
if (sscanf(opt.right(opt.length() - i - 1).data(),"%d%c",&level,&dum) != 1)
{
- warn(yyextra->fileName,yyextra->lineNr,"Unknown option:level specified with \\tableofcontents: '%s'", QCString(opt_).stripWhiteSpace().data());
+ warn(yyextra->fileName,yyextra->lineNr,"Unknown option:level specified with \\tableofcontents: '%s'", qPrint(QCString(opt_).stripWhiteSpace()));
opt = "";
}
else
@@ -2697,7 +2698,7 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const StringVector &o
}
else
{
- warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\tableofcontents: '%s'", QCString(opt_).stripWhiteSpace().data());
+ warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\tableofcontents: '%s'", qPrint(QCString(opt_).stripWhiteSpace()));
}
}
}
@@ -2862,11 +2863,11 @@ static QCString stripQuotes(const char *s)
//-----------------------------------------------------------------
static void addXRefItem(yyscan_t yyscanner,
- const char *listName,const char *itemTitle,
- const char *listTitle,bool append)
+ const QCString &listName,const QCString &itemTitle,
+ const QCString &listTitle,bool append)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (listName==0) return;
+ if (listName.isEmpty()) return;
//printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append);
std::unique_lock<std::mutex> lock(g_sectionMutex);
@@ -2876,9 +2877,9 @@ static void addXRefItem(yyscan_t yyscanner,
for (auto it = yyextra->current->sli.rbegin(); it != yyextra->current->sli.rend(); ++it)
{
RefItem *i = *it;
- if (i && qstrcmp(i->list()->listName(),listName)==0)
+ if (i && i->list()->listName()==listName)
{
- //printf("found %s lii->type=%s\n",listName,i->list()->listName().data());
+ //printf("found %s lii->type=%s\n",listName,qPrint(i->list()->listName()));
item = i;
break;
}
@@ -2887,7 +2888,7 @@ static void addXRefItem(yyscan_t yyscanner,
{
//printf("listName=%s item id = %d existing\n",listName,item->id());
item->setText(item->text() + " <p>" + yyextra->outputXRef);
- //printf("%s: text +=%s\n",listName,item->text.data());
+ //printf("%s: text +=%s\n",listName,qPrint(item->text));
}
else // new item
{
@@ -2897,12 +2898,12 @@ static void addXRefItem(yyscan_t yyscanner,
item = refList->add();
//printf("listName=%s item id = %d new yyextra->current=%p\n",listName,item->id(),yyextra->current);
QCString anchorLabel;
- anchorLabel.sprintf("_%s%06d",listName,item->id());
+ anchorLabel.sprintf("_%s%06d",listName.data(),item->id());
item->setText(yyextra->outputXRef);
item->setAnchor(anchorLabel);
yyextra->current->sli.push_back(item);
QCString cmdString;
- cmdString.sprintf(" \\xrefitem %s %d.",listName,item->id());
+ cmdString.sprintf(" \\xrefitem %s %d.",qPrint(listName),item->id());
if (yyextra->inBody)
{
yyextra->current->inbodyDocs += cmdString;
@@ -2919,11 +2920,11 @@ static void addXRefItem(yyscan_t yyscanner,
{
if (si->lineNr() != -1)
{
- warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",anchorLabel.data(),si->fileName().data(),si->lineNr());
+ warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",qPrint(anchorLabel),qPrint(si->fileName()),si->lineNr());
}
else
{
- warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s)",anchorLabel.data(),si->fileName().data());
+ warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s)",qPrint(anchorLabel),qPrint(si->fileName()));
}
}
else
@@ -2974,11 +2975,11 @@ static void addSection(yyscan_t yyscanner)
{
if (si->lineNr() != -1)
{
- warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s, line %d)",yyextra->sectionLabel.data(),si->fileName().data(),si->lineNr());
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s, line %d)",qPrint(yyextra->sectionLabel),qPrint(si->fileName()),si->lineNr());
}
else
{
- warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s)",yyextra->sectionLabel.data(),si->fileName().data());
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s)",qPrint(yyextra->sectionLabel),qPrint(si->fileName()));
}
}
else
@@ -3001,13 +3002,13 @@ static void addCite(yyscan_t yyscanner)
{
std::unique_lock<std::mutex> lock(g_citeMutex);
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- QCString name=yytext;
+ QCString name(yytext);
if (yytext[0] =='"')
{
name=yytext+1;
name=name.left((int)yyleng-2);
}
- CitationManager::instance().insert(name.data());
+ CitationManager::instance().insert(name);
}
//-----------------------------------------------------------------------------
@@ -3034,7 +3035,7 @@ static void stripTrailingWhiteSpace(QCString &s)
break;
}
}
- //printf("stripTrailingWhitespace(%s) i=%d len=%d\n",s.data(),i,len);
+ //printf("stripTrailingWhitespace(%s) i=%d len=%d\n",qPrint(s),i,len);
if (i!=(int)len-1)
{
s.resize(i+2); // string up to and including char at pos i and \0 terminator
@@ -3070,28 +3071,28 @@ static inline void setOutput(yyscan_t yyscanner,OutputContext ctx)
switch(yyextra->xrefKind)
{
case XRef_Todo:
- addXRefItem(yyscanner,"todo",
+ addXRefItem(yyscanner,QCString("todo"),
theTranslator->trTodo(),
theTranslator->trTodoList(),
xrefAppendToPrev
);
break;
case XRef_Test:
- addXRefItem(yyscanner,"test",
+ addXRefItem(yyscanner,QCString("test"),
theTranslator->trTest(),
theTranslator->trTestList(),
xrefAppendToPrev
);
break;
case XRef_Bug:
- addXRefItem(yyscanner,"bug",
+ addXRefItem(yyscanner,QCString("bug"),
theTranslator->trBug(),
theTranslator->trBugList(),
xrefAppendToPrev
);
break;
case XRef_Deprecated:
- addXRefItem(yyscanner,"deprecated",
+ addXRefItem(yyscanner,QCString("deprecated"),
theTranslator->trDeprecated(),
theTranslator->trDeprecatedList(),
xrefAppendToPrev
@@ -3165,7 +3166,7 @@ static inline void setOutput(yyscan_t yyscanner,OutputContext ctx)
}
-static void addAnchor(yyscan_t yyscanner,const char *anchor)
+static void addAnchor(yyscan_t yyscanner,const QCString &anchor)
{
std::unique_lock<std::mutex> lock(g_sectionMutex);
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
@@ -3175,16 +3176,19 @@ static void addAnchor(yyscan_t yyscanner,const char *anchor)
{
if (si->lineNr() != -1)
{
- warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s, line %d)",anchor,si->fileName().data(),si->lineNr());
+ warn(yyextra->fileName,yyextra->lineNr,
+ "multiple use of section label '%s' while adding anchor, (first occurrence: %s, line %d)",
+ qPrint(anchor),qPrint(si->fileName()),si->lineNr());
}
else
{
- warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s)",anchor,si->fileName().data());
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s)",
+ qPrint(anchor),qPrint(si->fileName()));
}
}
else
{
- si = sm.add(anchor,yyextra->fileName,yyextra->lineNr,nullptr,SectionType::Anchor,0);
+ si = sm.add(anchor,yyextra->fileName,yyextra->lineNr,QCString(),SectionType::Anchor,0);
yyextra->current->anchors.push_back(si);
}
}
@@ -3197,6 +3201,14 @@ static inline void addOutput(yyscan_t yyscanner,const char *s)
*yyextra->pOutputString+=s;
}
+// add a string to the output
+static inline void addOutput(yyscan_t yyscanner,const QCString &s)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("addOutput(yyscanner,%s)\n",s);
+ *yyextra->pOutputString+=s;
+}
+
// add a character to the output
static inline void addOutput(yyscan_t yyscanner,char c)
{
@@ -3312,7 +3324,7 @@ bool CommentScanner::parseCommentBlock(/* in */ OutlineParserInterface *pars
yyextra->spaceBeforeCmd.resize(0);
yyextra->spaceBeforeIf.resize(0);
- printlex(yy_flex_debug, TRUE, __FILE__, fileName ? fileName.data(): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, !fileName.isEmpty() ? qPrint(fileName): NULL);
if (!yyextra->current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments
{
yyextra->current->inbodyDocs+="\n\n";
@@ -3383,7 +3395,7 @@ bool CommentScanner::parseCommentBlock(/* in */ OutlineParserInterface *pars
//printf("position=%d yyextra->parseMore=%d newEntryNeeded=%d\n",
// position,yyextra->parseMore,newEntryNeeded);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName ? fileName.data(): NULL);
+ printlex(yy_flex_debug, FALSE, __FILE__, !fileName.isEmpty() ? qPrint(fileName): NULL);
return yyextra->parseMore;
}
@@ -3427,37 +3439,37 @@ void CommentScanner::initGroupInfo(Entry *entry)
yyextra->docGroup.initGroupInfo(entry);
}
-void CommentScanner::enterFile(const char *fileName,int lineNr)
+void CommentScanner::enterFile(const QCString &fileName,int lineNr)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.enterFile(fileName,lineNr);
}
-void CommentScanner::leaveFile(const char *fileName,int lineNr)
+void CommentScanner::leaveFile(const QCString &fileName,int lineNr)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.leaveFile(fileName,lineNr);
}
-void CommentScanner::enterCompound(const char *fileName,int lineNr,const char *name)
+void CommentScanner::enterCompound(const QCString &fileName,int lineNr,const QCString &name)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.enterCompound(fileName,lineNr,name);
}
-void CommentScanner::leaveCompound(const char *fileName,int lineNr,const char *name)
+void CommentScanner::leaveCompound(const QCString &fileName,int lineNr,const QCString &name)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.leaveCompound(fileName,lineNr,name);
}
-void CommentScanner::open(Entry *e,const char *fileName,int lineNr,bool implicit)
+void CommentScanner::open(Entry *e,const QCString &fileName,int lineNr,bool implicit)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.open(e,fileName,lineNr,implicit);
}
-void CommentScanner::close(Entry *e,const char *fileName,int lineNr,bool foundInline,bool implicit)
+void CommentScanner::close(Entry *e,const QCString &fileName,int lineNr,bool foundInline,bool implicit)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->docGroup.close(e,fileName,lineNr,foundInline,implicit);
diff --git a/src/conceptdef.cpp b/src/conceptdef.cpp
index c92237f..b9dd085 100644
--- a/src/conceptdef.cpp
+++ b/src/conceptdef.cpp
@@ -29,8 +29,8 @@
class ConceptDefImpl : public DefinitionMixin<ConceptDefMutable>
{
public:
- ConceptDefImpl(const char *fileName,int startLine,int startColumn,
- const char *name,const char *tagRef=0,const char *tagFile=0);
+ ConceptDefImpl(const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,const QCString &tagRef=QCString(),const QCString &tagFile=QCString());
~ConceptDefImpl();
virtual ConceptDef *resolveAlias() { return this; }
@@ -47,18 +47,18 @@ class ConceptDefImpl : public DefinitionMixin<ConceptDefMutable>
virtual bool isLinkable() const;
virtual QCString initializer() const;
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const;
+ const QCString &header,bool localNames) const;
virtual const NamespaceDef *getNamespaceDef() const;
virtual const FileDef *getFileDef() const;
//---------- ConceptDefMutable
- virtual void setIncludeFile(FileDef *fd,const char *incName,bool local,bool force);
+ virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force);
virtual void setTemplateArguments(const ArgumentList &al);
virtual void setNamespace(NamespaceDef *nd);
virtual void setFileDef(FileDef *fd);
virtual void writeTagFile(TextStream &);
virtual void writeDocumentation(OutputList &);
- virtual void setInitializer(const char *init);
+ virtual void setInitializer(const QCString &init);
virtual void findSectionsInDocumentation();
//---------- Helpers
@@ -78,8 +78,8 @@ class ConceptDefImpl : public DefinitionMixin<ConceptDefMutable>
};
ConceptDefMutable *createConceptDef(
- const char *fileName,int startLine,int startColumn,
- const char *name, const char *tagRef,const char *tagFile)
+ const QCString &fileName,int startLine,int startColumn,
+ const QCString &name, const QCString &tagRef,const QCString &tagFile)
{
return new ConceptDefImpl(fileName,startLine,startColumn,name,tagRef,tagFile);
}
@@ -124,7 +124,7 @@ class ConceptDefAliasImpl : public DefinitionAliasMixin<ConceptDef>
virtual const FileDef *getFileDef() const
{ return getCdAlias()->getFileDef(); }
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const
+ const QCString &header,bool localNames) const
{ getCdAlias()->writeDeclarationLink(ol,found,header,localNames); }
};
@@ -136,12 +136,12 @@ ConceptDef *createConceptDefAlias(const Definition *newScope,const ConceptDef *c
//------------------------------------------------------------------------------------
-ConceptDefImpl::ConceptDefImpl(const char *fileName,int startLine,int startColumn,
- const char *name,const char *tagRef,const char *tagFile) : DefinitionMixin(fileName,startLine,startColumn,name)
+ConceptDefImpl::ConceptDefImpl(const QCString &fileName,int startLine,int startColumn,
+ const QCString &name,const QCString &tagRef,const QCString &tagFile) : DefinitionMixin(fileName,startLine,startColumn,name)
{
- if (tagFile)
+ if (!tagFile.isEmpty())
{
- if (tagRef)
+ if (!tagRef.isEmpty())
{
m_fileName = stripExtension(tagFile);
}
@@ -210,10 +210,10 @@ bool ConceptDefImpl::isLinkable() const
return isLinkableInProject() || isReference();
}
-void ConceptDefImpl::setIncludeFile(FileDef *fd,const char *incName,bool local,bool force)
+void ConceptDefImpl::setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force)
{
if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
- if ((incName && m_incInfo->includeName.isEmpty()) ||
+ if ((!incName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
(fd!=0 && m_incInfo->fileDef==0)
)
{
@@ -221,7 +221,7 @@ void ConceptDefImpl::setIncludeFile(FileDef *fd,const char *incName,bool local,b
m_incInfo->includeName = incName;
m_incInfo->local = local;
}
- if (force && incName)
+ if (force && !incName.isEmpty())
{
m_incInfo->includeName = incName;
m_incInfo->local = local;
@@ -253,7 +253,7 @@ const FileDef *ConceptDefImpl::getFileDef() const
return m_fileDef;
}
-void ConceptDefImpl::setInitializer(const char *init)
+void ConceptDefImpl::setInitializer(const QCString &init)
{
m_initializer = init;
}
@@ -283,7 +283,7 @@ void ConceptDefImpl::writeBriefDescription(OutputList &ol) const
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
@@ -318,9 +318,9 @@ void ConceptDefImpl::writeIncludeFiles(OutputList &ol) const
{
QCString nm=m_incInfo->includeName.isEmpty() ?
(m_incInfo->fileDef ?
- m_incInfo->fileDef->docName().data() : ""
+ m_incInfo->fileDef->docName() : QCString()
) :
- m_incInfo->includeName.data();
+ m_incInfo->includeName;
if (!nm.isEmpty())
{
ol.startParagraph();
@@ -337,7 +337,7 @@ void ConceptDefImpl::writeIncludeFiles(OutputList &ol) const
ol.enable(OutputGenerator::Html);
if (m_incInfo->fileDef)
{
- ol.writeObjectLink(0,m_incInfo->fileDef->includeName(),0,nm);
+ ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
}
else
{
@@ -394,7 +394,7 @@ void ConceptDefImpl::writeDefinition(OutputList &ol,const QCString &title) const
conceptDef << name();
conceptDef << " = ";
conceptDef << m_initializer;
- intf->parseCode(ol,scopeName,conceptDef.str(),SrcLangExt_Cpp,false,0,
+ intf->parseCode(ol,scopeName,conceptDef.str(),SrcLangExt_Cpp,false,QCString(),
m_fileDef, -1,-1,true,0,false,this);
ol.endCodeFragment("DoxyCode");
}
@@ -411,7 +411,7 @@ void ConceptDefImpl::writeDetailedDescription(OutputList &ol,const QCString &tit
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
ol.startGroupHeader();
@@ -423,7 +423,7 @@ void ConceptDefImpl::writeDetailedDescription(OutputList &ol,const QCString &tit
if (!briefDescription().isEmpty() && repeatBrief)
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!briefDescription().isEmpty() && repeatBrief &&
!documentation().isEmpty())
@@ -438,7 +438,7 @@ void ConceptDefImpl::writeDetailedDescription(OutputList &ol,const QCString &tit
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
writeSourceDef(ol,name());
@@ -575,14 +575,14 @@ void ConceptDefImpl::writeDocumentation(OutputList &ol)
endFileWithNavPath(this,ol);
}
-void ConceptDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *header,bool localNames) const
+void ConceptDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCString &header,bool localNames) const
{
if (isLinkable())
{
if (!found) // first concept
{
ol.startMemberHeader("concepts");
- if (header)
+ if (!header.isEmpty())
{
ol.parseText(header);
}
@@ -619,7 +619,7 @@ void ConceptDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startMemberDescription(anchor());
@@ -628,7 +628,7 @@ void ConceptDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char
}
delete rootNode;
}
- ol.endMemberDeclaration(anchor(),0);
+ ol.endMemberDeclaration(anchor(),QCString());
}
}
@@ -654,7 +654,7 @@ bool ConceptLinkedRefMap::declVisible() const
return false;
}
-void ConceptLinkedRefMap::writeDeclaration(OutputList &ol,const char *header,bool localNames) const
+void ConceptLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &header,bool localNames) const
{
bool found=FALSE;
for (const auto &cd : *this)
diff --git a/src/conceptdef.h b/src/conceptdef.h
index 224ed57..9a2075c 100644
--- a/src/conceptdef.h
+++ b/src/conceptdef.h
@@ -33,7 +33,7 @@ class ConceptDef : public Definition
virtual bool isLinkable() const = 0;
virtual QCString initializer() const = 0;
virtual void writeDeclarationLink(OutputList &ol,bool &found,
- const char *header,bool localNames) const = 0;
+ const QCString &header,bool localNames) const = 0;
virtual const NamespaceDef *getNamespaceDef() const = 0;
virtual const FileDef *getFileDef() const = 0;
};
@@ -41,19 +41,19 @@ class ConceptDef : public Definition
class ConceptDefMutable : public DefinitionMutable, public ConceptDef
{
public:
- virtual void setIncludeFile(FileDef *fd,const char *incName,bool local,bool force) = 0;
+ virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force) = 0;
virtual void setTemplateArguments(const ArgumentList &al) = 0;
virtual void setNamespace(NamespaceDef *nd) = 0;
virtual void setFileDef(FileDef *fd) = 0;
virtual void writeTagFile(TextStream &) = 0;
virtual void writeDocumentation(OutputList &ol) = 0;
- virtual void setInitializer(const char *init) = 0;
+ virtual void setInitializer(const QCString &init) = 0;
virtual void findSectionsInDocumentation() = 0;
};
ConceptDefMutable *createConceptDef(
- const char *fileName,int startLine,int startColumn,const char *name,
- const char *tagRef=0,const char *tagFile=0);
+ const QCString &fileName,int startLine,int startColumn,const QCString &name,
+ const QCString &tagRef=QCString(),const QCString &tagFile=QCString());
ConceptDef *createConceptDefAlias(const Definition *newScope,const ConceptDef *cd);
@@ -67,7 +67,7 @@ class ConceptLinkedRefMap : public LinkedRefMap<const ConceptDef>
{
public:
bool declVisible() const;
- void writeDeclaration(OutputList &ol,const char *header,bool localNames) const;
+ void writeDeclaration(OutputList &ol,const QCString &header,bool localNames) const;
void writeDocumentation(OutputList &ol,const Definition * container=0) const;
};
diff --git a/src/condparser.cpp b/src/condparser.cpp
index ac6ff61..b968878 100644
--- a/src/condparser.cpp
+++ b/src/condparser.cpp
@@ -33,15 +33,16 @@
* - On error, an error message is returned.
* - On success, the result of the expression is either "1" or "0".
*/
-bool CondParser::parse(const char *fileName,int lineNr,const char *expr)
+bool CondParser::parse(const QCString &fileName,int lineNr,const QCString &expr)
{
+ if (expr.isEmpty()) return false;
m_expr = expr;
m_tokenType = NOTHING;
// initialize all variables
- m_e = m_expr; // let m_e point to the start of the expression
+ m_e = m_expr.data(); // let m_e point to the start of the expression
- bool answer=FALSE;
+ bool answer=false;
getToken();
if (m_tokenType==DELIMITER && m_token.isEmpty())
{
@@ -50,35 +51,11 @@ bool CondParser::parse(const char *fileName,int lineNr,const char *expr)
else if (m_err.isEmpty())
{
answer = parseLevel1();
-
-#if 0
- // check for garbage at the end of the expression
- // an expression ends with a character '\0' and token_type = delimiter
- if (m_tokenType!=DELIMITER || !m_token.isEmpty())
- {
- if (m_tokenType == DELIMITER)
- {
- if (m_token=="(" || m_token==")")
- {
- m_err=QCString("Unexpected parenthesis ")+m_token+"'";
- }
- else
- {
- // user entered a not existing operator like "//"
- m_err=QCString("Unexpected operator ")+m_token+"'";
- }
- }
- else
- {
- m_err=QCString("Unexpected part '")+m_token+"'";
- }
- }
-#endif
}
- if (m_err)
+ if (!m_err.isEmpty())
{
warn(fileName,lineNr,"problem evaluating expression '%s': %s",
- expr,m_err.data());
+ qPrint(expr),qPrint(m_err));
}
//printf("expr='%s' answer=%d\n",expr,answer);
return answer;
@@ -303,9 +280,9 @@ bool CondParser::evalOperator(int opId, bool lhs, bool rhs)
/**
* evaluate a variable
*/
-bool CondParser::evalVariable(const char *varName)
+bool CondParser::evalVariable(const QCString &varName)
{
const StringVector &list = Config_getList(ENABLED_SECTIONS);
- return std::find(list.begin(),list.end(),varName)!=list.end();
+ return std::find(list.begin(),list.end(),varName.str())!=list.end();
}
diff --git a/src/condparser.h b/src/condparser.h
index 692793c..a2f806e 100644
--- a/src/condparser.h
+++ b/src/condparser.h
@@ -29,7 +29,7 @@ class CondParser
// public functions
public:
CondParser() : m_e(0), m_tokenType(NOTHING) {}
- bool parse(const char *fileName,int lineNr,const char *expr);
+ bool parse(const QCString &fileName,int lineNr,const QCString &expr);
// enumerations
private:
@@ -68,7 +68,7 @@ class CondParser
bool parseVar();
bool evalOperator(const int opId, bool lhs, bool rhs);
- bool evalVariable(const char *varName);
+ bool evalVariable(const QCString &varName);
int getOperatorId(const QCString &opName);
};
diff --git a/src/config.h b/src/config.h
index 2886a0a..45fd4f8 100644
--- a/src/config.h
+++ b/src/config.h
@@ -65,7 +65,7 @@ namespace Config
* \returns TRUE if successful, FALSE if the file could not be
* opened or read.
*/
- bool parse(const char *fileName,bool update=FALSE);
+ bool parse(const QCString &fileName,bool update=FALSE);
/*! Post processed the parsed data. Replaces raw string values by the actual values.
* and replaces environment variables.
diff --git a/src/configgen.py b/src/configgen.py
index 0d18e84..d3b9137 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -720,7 +720,7 @@ def main():
print(" StringVector ConfigValues::*l;");
print(" } value;");
print(" };");
- print(" const Info *get(const char *tag) const;");
+ print(" const Info *get(const QCString &tag) const;");
print(" private:")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
@@ -738,7 +738,7 @@ def main():
print("#include \"configimpl.h\"")
print("#include <unordered_map>")
print("")
- print("const ConfigValues::Info *ConfigValues::get(const char *tag) const");
+ print("const ConfigValues::Info *ConfigValues::get(const QCString &tag) const");
print("{");
print(" static const std::unordered_map< std::string, Info > configMap =");
print(" {");
@@ -747,7 +747,7 @@ def main():
if (n.nodeName == "group"):
parseGroupMapInit(n)
print(" };");
- print(" auto it = configMap.find(tag);");
+ print(" auto it = configMap.find(tag.str());");
print(" return it!=configMap.end() ? &it->second : nullptr;");
print("}");
print("")
diff --git a/src/configimpl.h b/src/configimpl.h
index 60811d1..d90fe8c 100644
--- a/src/configimpl.h
+++ b/src/configimpl.h
@@ -161,7 +161,7 @@ class ConfigEnum : public ConfigOption
void writeTemplate(TextStream &t,bool sl,bool);
void convertStrToVal();
void compareDoxyfile(TextStream &t);
- void init() { m_value = m_defValue.copy(); }
+ void init() { m_value = m_defValue; }
private:
std::vector<QCString> m_valueRange;
@@ -192,7 +192,7 @@ class ConfigString : public ConfigOption
void writeTemplate(TextStream &t,bool sl,bool);
void compareDoxyfile(TextStream &t);
void substEnvVars();
- void init() { m_value = m_defValue.copy(); }
+ void init() { m_value = m_defValue; }
void emptyValueToDefault() { if(m_value.isEmpty()) m_value=m_defValue; };
private:
@@ -364,9 +364,9 @@ class ConfigImpl
/*! Returns the ConfigOption corresponding with \a name or 0 if
* the option is not supported.
*/
- ConfigOption *get(const char *name) const
+ ConfigOption *get(const QCString &name) const
{
- auto it = m_dict.find(name);
+ auto it = m_dict.find(name.str());
return it!=m_dict.end() ? it->second : nullptr;
}
/* @} */
@@ -508,14 +508,13 @@ class ConfigImpl
* \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);
+ bool parseString(const QCString &fn,const QCString &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);
+ bool parse(const QCString &fn,bool upd = FALSE);
/*! Called from the constructor, will add doxygen's default options
* to the configuration object
diff --git a/src/configimpl.l b/src/configimpl.l
index cae157b..5171dd6 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -58,14 +58,14 @@ void config_err(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, (QCString(error_str) + fmt).data(), args);
+ vfprintf(stderr, qPrint(QCString(error_str) + fmt), args);
va_end(args);
}
void config_term(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, (QCString(error_str) + fmt).data(), args);
+ vfprintf(stderr, qPrint(QCString(error_str) + fmt), args);
va_end(args);
fprintf(stderr, "%s\n", "Exiting...");
exit(1);
@@ -75,14 +75,14 @@ void config_warn(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, (QCString(warning_str) + fmt).data(), args);
+ vfprintf(stderr, qPrint(QCString(warning_str) + fmt), args);
va_end(args);
}
static QCString configStringRecode(
const QCString &str,
- const char *fromEncoding,
- const char *toEncoding);
+ const QCString &fromEncoding,
+ const QCString &toEncoding);
#define MAX_INCLUDE_DEPTH 10
#define YY_NEVER_INTERACTIVE 1
@@ -91,7 +91,7 @@ static QCString configStringRecode(
*/
static QCString convertToComment(const QCString &s, const QCString &u)
{
- //printf("convertToComment(%s)=%s\n",s.data(),u.data());
+ //printf("convertToComment(%s)=%s\n",qPrint(s),qPrint(u));
QCString result;
if (!s.isEmpty())
{
@@ -145,6 +145,7 @@ void ConfigOption::writeStringValue(TextStream &t,const QCString &s)
bool needsEscaping=FALSE;
// convert the string back to it original g_encoding
QCString se = configStringRecode(s,"UTF-8",m_encoding);
+ if (se.isEmpty()) return;
const char *p=se.data();
if (p)
{
@@ -198,7 +199,7 @@ void ConfigInt::convertStrToVal()
if (!ok || val<m_minVal || val>m_maxVal)
{
config_warn("argument '%s' for option %s is not a valid number in the range [%d..%d]!\n"
- "Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value);
+ "Using the default: %d!\n",qPrint(m_valueString),qPrint(m_name),m_minVal,m_maxVal,m_value);
}
else
{
@@ -223,7 +224,7 @@ void ConfigBool::convertStrToVal()
else
{
config_warn("argument '%s' for option %s is not a valid boolean value\n"
- "Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO");
+ "Using the default: %s!\n",qPrint(m_valueString),qPrint(m_name),m_value?"YES":"NO");
}
}
}
@@ -246,7 +247,7 @@ void ConfigEnum::convertStrToVal()
}
config_warn("argument '%s' for option %s is not a valid enum value\n"
- "Using the default: %s!\n",m_value.data(),m_name.data(),m_defValue.data());
+ "Using the default: %s!\n",qPrint(m_value),qPrint(m_name),qPrint(m_defValue));
m_value = m_defValue;
}
@@ -546,11 +547,9 @@ static yy_size_t yyread(char *buf,yy_size_t max_size)
static QCString configStringRecode(
const QCString &str,
- const char *fromEncoding,
- const char *toEncoding)
+ const QCString &inputEncoding,
+ const QCString &outputEncoding)
{
- QCString inputEncoding = fromEncoding;
- QCString outputEncoding = toEncoding;
if (inputEncoding.isEmpty() || outputEncoding.isEmpty() || inputEncoding==outputEncoding) return str;
int inputSize=str.length();
int outputSize=inputSize*4+1;
@@ -559,7 +558,7 @@ static QCString configStringRecode(
if (cd==(void *)(-1))
{
config_term("Error: unsupported character conversion: '%s'->'%s'\n",
- inputEncoding.data(),outputEncoding.data());
+ qPrint(inputEncoding),qPrint(outputEncoding));
}
size_t iLeft=(size_t)inputSize;
size_t oLeft=(size_t)outputSize;
@@ -570,12 +569,12 @@ static QCString configStringRecode(
outputSize-=(int)oLeft;
output.resize(outputSize+1);
output.at(outputSize)='\0';
- //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
+ //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
}
else
{
config_term("Error: failed to translate characters from %s to %s: %s\n",
- inputEncoding.data(),outputEncoding.data(),strerror(errno));
+ qPrint(inputEncoding),qPrint(outputEncoding),strerror(errno));
}
portable_iconv_close(cd);
return output;
@@ -656,7 +655,7 @@ static void processString()
if (!warned)
{
config_warn("Invalid value for '%s' tag at line %d, file %s: Value '%s' is not properly quoted\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data(),g_string->stripWhiteSpace().data());
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName),qPrint(g_string->stripWhiteSpace()));
}
warned=true;
}
@@ -672,14 +671,14 @@ static void processString()
// update encoding
checkEncoding();
- //printf("Processed string '%s'\n",g_string->data());
+ //printf("Processed string '%s'\n",qPrint(g_string));
}
static void processList()
{
bool allowCommaAsSeparator = g_cmd!="PREDEFINED";
- const QCString s = stripComment(g_listStr.stripWhiteSpace());
+ QCString s = stripComment(g_listStr.stripWhiteSpace());
int l = s.length();
QCString elemStr;
@@ -690,7 +689,7 @@ static void processList()
if (!elemStr.isEmpty())
{
QCString e = configStringRecode(elemStr,g_encoding,"UTF-8");
- //printf("Processed list element '%s'\n",e.data());
+ //printf("Processed list element '%s'\n",qPrint(e));
g_list->push_back(e.str());
elemStr="";
}
@@ -742,7 +741,7 @@ static void processList()
if (!warned)
{
config_warn("Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly space %sseparated\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data(),g_listStr.stripWhiteSpace().data(),allowCommaAsSeparator?"or comma ":"");
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName),qPrint(g_listStr.stripWhiteSpace()),allowCommaAsSeparator?"or comma ":"");
warned=true;
}
needsSeparator=false;
@@ -760,18 +759,18 @@ static void processList()
if (insideQuote)
{
config_warn("Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly quoted\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data(),g_listStr.stripWhiteSpace().data());
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName),qPrint(g_listStr.stripWhiteSpace()));
}
}
-static FILE *tryPath(const char *path,const char *fileName)
+static FILE *tryPath(const QCString &path,const QCString &fileName)
{
- QCString absName=(path ? (QCString)path+"/"+fileName : (QCString)fileName);
+ QCString absName=(!path.isEmpty() ? path+"/"+fileName : fileName);
FileInfo fi(absName.str());
if (fi.exists() && fi.isFile())
{
FILE *f=Portable::fopen(absName,"r");
- if (!f) config_err("could not open file %s for reading\n",absName.data());
+ if (!f) config_err("could not open file %s for reading\n",qPrint(absName));
return f;
}
return 0;
@@ -780,15 +779,15 @@ static FILE *tryPath(const char *path,const char *fileName)
static void substEnvVarsInStrList(StringVector &sl);
static void substEnvVarsInString(QCString &s);
-static FILE *findFile(const char *fileName)
+static FILE *findFile(const QCString &fileName)
{
- if (fileName==0)
+ if (fileName.isEmpty())
{
return 0;
}
if (Portable::isAbsolutePath(fileName))
{
- return tryPath(NULL, fileName);
+ return tryPath(QCString(), fileName);
}
substEnvVarsInStrList(g_includePathList);
for (const auto &s : g_includePathList)
@@ -800,11 +799,11 @@ static FILE *findFile(const char *fileName)
return tryPath(".",fileName);
}
-static void readIncludeFile(const char *incName)
+static void readIncludeFile(const QCString &incName)
{
if (g_includeStack.size()==MAX_INCLUDE_DEPTH) {
config_term("maximum include depth (%d) reached, %s is not included. Aborting...\n",
- MAX_INCLUDE_DEPTH,incName);
+ MAX_INCLUDE_DEPTH,qPrint(incName));
}
QCString inc = incName;
@@ -823,7 +822,7 @@ static void readIncludeFile(const char *incName)
// For debugging
#if SHOW_INCLUDES
for (size_t i=0;i<g_includeStack.size();i++) msg(" ");
- msg("@INCLUDE = %s: parsing...\n",inc.data());
+ msg("@INCLUDE = %s: parsing...\n",qPrint(inc));
#endif
// store the state of the old file
@@ -841,7 +840,7 @@ static void readIncludeFile(const char *incName)
}
else
{
- config_term("@INCLUDE = %s: not found!\n",inc.data());
+ config_term("@INCLUDE = %s: not found!\n",qPrint(inc));
}
}
@@ -879,7 +878,7 @@ static void readIncludeFile(const char *incName)
if (option==0) // oops not known
{
config_warn("ignoring unsupported tag '%s' at line %d, file %s\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
}
else // known tag
@@ -922,13 +921,13 @@ static void readIncludeFile(const char *incName)
if (g_configUpdate)
{
config_warn("Tag '%s' at line %d of file '%s' has become obsolete.\n"
- " This tag has been removed.\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ " This tag has been removed.\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
else
{
config_warn("Tag '%s' at line %d of file '%s' has become obsolete.\n"
" To avoid this warning please remove this line from your configuration "
- "file or upgrade it using \"doxygen -u\"\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ "file or upgrade it using \"doxygen -u\"\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
BEGIN(SkipInvalid);
break;
@@ -936,13 +935,13 @@ static void readIncludeFile(const char *incName)
if (g_configUpdate)
{
config_warn("Tag '%s' at line %d of file '%s' belongs to an option that was not enabled at compile time.\n"
- " This tag has been removed.\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ " This tag has been removed.\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
else
{
config_warn("Tag '%s' at line %d of file '%s' belongs to an option that was not enabled at compile time.\n"
" To avoid this warning please remove this line from your configuration "
- "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
}
BEGIN(SkipInvalid);
break;
@@ -955,7 +954,7 @@ static void readIncludeFile(const char *incName)
if (option==0) // oops not known
{
config_warn("ignoring unsupported tag '%s' at line %d, file %s\n",
- g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
}
else // known tag
@@ -977,19 +976,19 @@ static void readIncludeFile(const char *incName)
case ConfigOption::O_Int:
case ConfigOption::O_Bool:
config_warn("operator += not supported for '%s'. Ignoring line at line %d, file %s\n",
- yytext,g_yyLineNr,g_yyFileName.data());
+ yytext,g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
break;
case ConfigOption::O_Obsolete:
config_warn("Tag '%s' at line %d of file %s has become obsolete.\n"
"To avoid this warning please update your configuration "
- "file using \"doxygen -u\"\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ "file using \"doxygen -u\"\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
break;
case ConfigOption::O_Disabled:
config_warn("Tag '%s' at line %d of file %s belongs to an option that was not enabled at compile time.\n"
"To avoid this warning please remove this line from your configuration "
- "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", g_cmd.data(),g_yyLineNr,g_yyFileName.data());
+ "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", qPrint(g_cmd),g_yyLineNr,qPrint(g_yyFileName));
BEGIN(SkipInvalid);
break;
}
@@ -1026,7 +1025,7 @@ static void readIncludeFile(const char *incName)
}
}
-<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,g_yyLineNr,g_yyFileName.data()); }
+<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,g_yyLineNr,qPrint(g_yyFileName)); }
/*-------------- GetString ---------------*/
<GetString>\n { processString();
@@ -1076,7 +1075,7 @@ static void readIncludeFile(const char *incName)
<*>\\[ \r\t]*\n { g_yyLineNr++; }
<*>[ \t\r]
<*>\n { g_yyLineNr++ ; }
-<*>. { config_warn("ignoring unknown character '%c' at line %d, file %s\n",yytext[0],g_yyLineNr,g_yyFileName.data()); }
+<*>. { config_warn("ignoring unknown character '%c' at line %d, file %s\n",yytext[0],g_yyLineNr,qPrint(g_yyFileName)); }
%%
@@ -1086,7 +1085,7 @@ static void readIncludeFile(const char *incName)
void ConfigImpl::writeTemplate(TextStream &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)
+ if (!m_startComment.isEmpty())
{
t << takeStartComment() << "\n";
}
@@ -1100,7 +1099,7 @@ void ConfigImpl::writeTemplate(TextStream &t,bool sl,bool upd)
option->writeTemplate(t,sl,upd);
}
/* print last lines of user comment that were at the end of the file */
- if (m_userComment)
+ if (!m_userComment.isEmpty())
{
t << "\n";
t << takeUserComment();
@@ -1174,7 +1173,7 @@ static void substEnvVarsInStrList(StringVector &sl)
// here we strip the quote again
substEnvVarsInString(result);
- //printf("Result %s was quoted=%d\n",result.data(),wasQuoted);
+ //printf("Result %s was quoted=%d\n",qPrint(result),wasQuoted);
if (!wasQuoted) /* as a result of the expansion, a single string
may have expanded into a list, which we'll
@@ -1286,7 +1285,7 @@ void ConfigImpl::init()
if (opt==0)
{
config_term("Config option '%s' has invalid depends relation on unknown option '%s'\n",
- option->name().data(),depName.data());
+ qPrint(option->name()),qPrint(depName));
}
}
}
@@ -1299,9 +1298,9 @@ void ConfigImpl::create()
addConfigOptions(this);
}
-static QCString configFileToString(const char *name)
+static QCString configFileToString(const QCString &name)
{
- if (name==0 || name[0]==0) return 0;
+ if (name.isEmpty()) return QCString();
auto stream2string = [](std::istream &in) -> std::string
{
@@ -1313,27 +1312,27 @@ static QCString configFileToString(const char *name)
return ret;
};
- if (name[0]=='-' && name[1]==0) // read from stdin
+ if (name=="-") // read from stdin
{
// read contents from stdin into contents string
return stream2string(std::cin);
}
else // read from file
{
- std::ifstream f(name,std::istream::in);
+ std::ifstream f(name.str(),std::istream::in);
if (!f.is_open())
{
- config_term("file '%s' not found or could not be opened\n",name);
+ config_term("file '%s' not found or could not be opened\n",qPrint(name));
return "";
}
return stream2string(f);
}
}
-bool ConfigImpl::parseString(const char *fn,const char *str,bool update)
+bool ConfigImpl::parseString(const QCString &fn,const QCString &str,bool update)
{
g_config = ConfigImpl::instance();
- g_inputString = str;
+ g_inputString = str.data();
g_inputPosition = 0;
g_yyFileName = fn;
g_yyLineNr = 1;
@@ -1347,13 +1346,13 @@ bool ConfigImpl::parseString(const char *fn,const char *str,bool update)
return TRUE;
}
-bool ConfigImpl::parse(const char *fn,bool update)
+bool ConfigImpl::parse(const QCString &fn,bool update)
{
int retval;
g_encoding = "UTF-8";
- printlex(yy_flex_debug, TRUE, __FILE__, fn);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fn));
retval = parseString(fn,configFileToString(fn), update);
- printlex(yy_flex_debug, FALSE, __FILE__, fn);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fn));
return retval;
}
@@ -1384,7 +1383,7 @@ static bool checkFileName(const QCString &s,const char *optionName)
if ((val=="yes" || val=="true" || val=="1" || val=="all") ||
(val=="no" || val=="false" || val=="0" || val=="none"))
{
- 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,qPrint(s));
return false;
}
return true;
@@ -1406,21 +1405,21 @@ static void checkList(const StringVector &list,const char *name, bool equalRequi
int i=item.find('=');
if (i==-1 && equalRequired)
{
- err("Illegal format for option %s, no equal sign ('=') specified for item '%s'\n",name,item.data());
+ err("Illegal format for option %s, no equal sign ('=') specified for item '%s'\n",name,qPrint(item));
}
if (i!=-1)
{
QCString myName=item.left(i).stripWhiteSpace();
if (myName.isEmpty())
{
- err("Illegal format for option %s, no name specified for item '%s'\n",name,item.data());
+ err("Illegal format for option %s, no name specified for item '%s'\n",name,qPrint(item));
}
else if (valueRequired)
{
QCString myValue=item.right(item.length()-i-1).stripWhiteSpace();
if (myValue.isEmpty())
{
- err("Illegal format for option %s, no value specified for item '%s'\n",name,item.data());
+ err("Illegal format for option %s, no value specified for item '%s'\n",name,qPrint(item));
}
}
}
@@ -1527,7 +1526,7 @@ void Config::checkAndCorrect()
if (!fi.exists())
{
config_term("tag HTML_HEADER: header file '%s' "
- "does not exist\n",headerFile.data());
+ "does not exist\n",qPrint(headerFile));
}
}
@@ -1540,7 +1539,7 @@ void Config::checkAndCorrect()
if (!fi.exists())
{
config_term("tag HTML_FOOTER: footer file '%s' "
- "does not exist\n",footerFile.data());
+ "does not exist\n",qPrint(footerFile));
}
}
@@ -1555,7 +1554,7 @@ void Config::checkAndCorrect()
if (!fi.exists())
{
config_term("tag MATHJAX_CODEFILE file '%s' "
- "does not exist\n",mathJaxCodefile.data());
+ "does not exist\n",qPrint(mathJaxCodefile));
}
}
QCString path = Config_getString(MATHJAX_RELPATH);
@@ -1575,7 +1574,7 @@ void Config::checkAndCorrect()
if (!fi.exists())
{
config_term("tag LATEX_HEADER: header file '%s' "
- "does not exist\n",latexHeaderFile.data());
+ "does not exist\n",qPrint(latexHeaderFile));
}
}
@@ -1588,7 +1587,7 @@ void Config::checkAndCorrect()
if (!fi.exists())
{
config_term("tag LATEX_FOOTER: footer file '%s' "
- "does not exist\n",latexFooterFile.data());
+ "does not exist\n",qPrint(latexFooterFile));
}
}
@@ -1615,7 +1614,7 @@ void Config::checkAndCorrect()
int i_obrace=predef.find('(');
if ((i_obrace==0) || (i_equals==0) || (i_equals==1 && predef.at(i_equals-1)==':'))
{
- err("Illegal PREDEFINED format '%s', no define name specified\n",predef.data());
+ err("Illegal PREDEFINED format '%s', no define name specified\n",qPrint(predef));
}
}
}
@@ -1626,8 +1625,8 @@ void Config::checkAndCorrect()
for (const auto &alias : aliasList)
{
// match aliases of the form re1='name=' and re2='name{2} ='
- static const reg::Ex re1(R"(\a\w*\s*=)");
- static const reg::Ex re2(R"(\a\w*{\d+}\s*=)");
+ static const reg::Ex re1(R"(^\a\w*\s*=)");
+ static const reg::Ex re2(R"(^\a\w*{\d+}\s*=)");
if (!reg::search(alias,re1) && !reg::search(alias,re2))
{
err("Illegal ALIASES format '%s'. Use \"name=value\" or \"name{n}=value\", where n is the number of arguments\n",
@@ -1757,7 +1756,7 @@ void Config::checkAndCorrect()
FileInfo dp(dotExe.str());
if (!dp.exists() || !dp.isFile())
{
- warn_uncond("the dot tool could not be found at %s\n",dotPath.data());
+ warn_uncond("the dot tool could not be found at %s\n",qPrint(dotPath));
dotPath="";
}
else
@@ -1793,7 +1792,7 @@ void Config::checkAndCorrect()
else
{
err("Jar file plantuml.jar not found at location "
- "specified via PLANTUML_JAR_PATH: '%s'\n",plantumlJarPath.data());
+ "specified via PLANTUML_JAR_PATH: '%s'\n",qPrint(plantumlJarPath));
plantumlJarPath="";
}
}
@@ -1804,7 +1803,7 @@ void Config::checkAndCorrect()
else
{
err("path specified via PLANTUML_JAR_PATH does not exist or not a directory: %s\n",
- plantumlJarPath.data());
+ qPrint(plantumlJarPath));
plantumlJarPath="";
}
}
@@ -1819,7 +1818,7 @@ void Config::checkAndCorrect()
FileInfo dp(diaExe.str());
if (!dp.exists() || !dp.isFile())
{
- warn_uncond("dia could not be found at %s\n",diaPath.data());
+ warn_uncond("dia could not be found at %s\n",qPrint(diaPath));
diaPath="";
}
else
@@ -2052,7 +2051,7 @@ void Config::checkAndCorrect()
{
if (option->kind()==ConfigOption::O_Bool)
{
- printf("disabling option %s\n",option->name().data());
+ printf("disabling option %s\n",qPrint(option->name()));
ConfigImpl_getBool("option->name("))=FALSE; // also disable this option
}
}
@@ -2074,7 +2073,7 @@ void Config::compareDoxyfile(TextStream &t)
ConfigImpl::instance()->compareDoxyfile(t);
}
-bool Config::parse(const char *fileName,bool update)
+bool Config::parse(const QCString &fileName,bool update)
{
bool parseRes = ConfigImpl::instance()->parse(fileName,update);
if (!parseRes) return parseRes;
diff --git a/src/constexp.l b/src/constexp.l
index acff1eb..a26d517 100644
--- a/src/constexp.l
+++ b/src/constexp.l
@@ -147,7 +147,7 @@ bool ConstExpressionParser::parse(const char *fileName,int lineNr,const std::str
constexpYYrestart( yyin, p->yyscanner );
printlex(yy_flex_debug, true, __FILE__, fileName);
- //printf("Expression: '%s'\n",s.data());
+ //printf("Expression: '%s'\n",qPrint(s));
constexpYYparse(p->yyscanner);
diff --git a/src/context.cpp b/src/context.cpp
index 8275130..2ae62a0 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -271,11 +271,11 @@ class PropertyMapper
* @returns A variant representing the properties value or an
* invalid variant if it was not found.
*/
- TemplateVariant get(const T *obj,const char *name) const
+ TemplateVariant get(const T *obj,const QCString &name) const
{
//printf("PropertyMapper::get(%s)\n",name);
TemplateVariant result;
- auto it = m_map.find(name);
+ auto it = m_map.find(name.str());
return it!=m_map.end() ? (*it->second)(obj) : TemplateVariant();
}
@@ -326,10 +326,10 @@ ConfigContext::~ConfigContext()
delete p;
}
-TemplateVariant ConfigContext::get(const char *name) const
+TemplateVariant ConfigContext::get(const QCString &name) const
{
TemplateVariant result;
- if (name)
+ if (!name.isEmpty())
{
const ConfigValues::Info *option = ConfigValues::instance().get(name);
if (option)
@@ -397,7 +397,7 @@ class DoxygenContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -425,7 +425,7 @@ DoxygenContext::~DoxygenContext()
delete p;
}
-TemplateVariant DoxygenContext::get(const char *n) const
+TemplateVariant DoxygenContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -1223,7 +1223,7 @@ class TranslateContext::Private
m_vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
m_sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -1248,7 +1248,7 @@ TranslateContext::~TranslateContext()
delete p;
}
-TemplateVariant TranslateContext::get(const char *n) const
+TemplateVariant TranslateContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -1258,7 +1258,7 @@ static TemplateVariant parseDoc(const Definition *def,const QCString &file,int l
{
TemplateVariant result;
DocRoot *root = validatingParseDoc(file,line,def,0,docStr,TRUE,FALSE,
- 0,isBrief,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),isBrief,FALSE,Config_getBool(MARKDOWN_SUPPORT));
TextStream ts;
switch (g_globals.outputFormat)
{
@@ -1301,14 +1301,14 @@ static TemplateVariant parseCode(MemberDef *md,const QCString &scopeName,const Q
case ContextOutputFormat_Html:
{
HtmlCodeGenerator codeGen(t,relPath);
- intf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
+ intf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,QCString(),md->getBodyDef(),
startLine,endLine,TRUE,md,showLineNumbers,md);
}
break;
case ContextOutputFormat_Latex:
{
LatexCodeGenerator codeGen(t,relPath,md->docFile());
- intf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
+ intf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,QCString(),md->getBodyDef(),
startLine,endLine,TRUE,md,showLineNumbers,md);
}
break;
@@ -1317,7 +1317,7 @@ static TemplateVariant parseCode(MemberDef *md,const QCString &scopeName,const Q
err("context.cpp: output format not yet supported\n");
break;
}
- return TemplateVariant(t.str().data(),TRUE);
+ return TemplateVariant(t.str(),TRUE);
}
static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
@@ -1331,11 +1331,11 @@ static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
case ContextOutputFormat_Html:
{
HtmlCodeGenerator codeGen(t,relPath);
- intf->parseCode(codeGen,0,
+ intf->parseCode(codeGen,QCString(),
fileToString(fd->absFilePath(),filterSourceFiles,TRUE), // the sources
fd->getLanguage(), // lang
FALSE, // isExampleBlock
- 0, // exampleName
+ QCString(), // exampleName
const_cast<FileDef*>(fd), // fileDef, TODO: should be const
-1, // startLine
-1, // endLine
@@ -1350,11 +1350,11 @@ static TemplateVariant parseCode(const FileDef *fd,const QCString &relPath)
case ContextOutputFormat_Latex:
{
LatexCodeGenerator codeGen(t,relPath,fd->docFile());
- intf->parseCode(codeGen,0,
+ intf->parseCode(codeGen,QCString(),
fileToString(fd->absFilePath(),filterSourceFiles,TRUE), // the sources
fd->getLanguage(), // lang
FALSE, // isExampleBlock
- 0, // exampleName
+ QCString(), // exampleName
const_cast<FileDef*>(fd), // fileDef, TODO: should be const
-1, // startLine
-1, // endLine
@@ -1694,7 +1694,7 @@ class IncludeInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -1745,7 +1745,7 @@ IncludeInfoContext::~IncludeInfoContext()
delete p;
}
-TemplateVariant IncludeInfoContext::get(const char *n) const
+TemplateVariant IncludeInfoContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -1877,7 +1877,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
if (!cd->cookie()) { cd->setCookie(new ClassContext::Private::Cachable(cd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -2115,7 +2115,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private>
return cache.inheritedByList.get();
}
TemplateVariant getMemberList(SharedPtr<MemberListInfoContext> &list,
- MemberListType type,const char *title,bool=FALSE) const
+ MemberListType type,const QCString &title,bool=FALSE) const
{
if (!list)
{
@@ -2638,7 +2638,7 @@ PropertyMapper<ClassContext::Private> ClassContext::Private::s_inst;
ClassContext::ClassContext(const ClassDef *cd) : RefCountedContext("ClassContext")
{
- //printf("ClassContext::ClassContext(%s)\n",cd?cd->name().data():"<none>");
+ //printf("ClassContext::ClassContext(%s)\n",cd?qPrint(cd->name()):"<none>");
p = new Private(cd);
}
@@ -2647,7 +2647,7 @@ ClassContext::~ClassContext()
delete p;
}
-TemplateVariant ClassContext::get(const char *n) const
+TemplateVariant ClassContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -2694,7 +2694,7 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
if (!nd->cookie()) { nd->setCookie(new NamespaceContext::Private::Cachable(nd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -2777,7 +2777,7 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
return cache.constantgroups.get();
}
TemplateVariant getMemberList(SharedPtr<MemberListInfoContext> &list,
- MemberListType type,const char *title,bool=FALSE) const
+ MemberListType type,const QCString &title,bool=FALSE) const
{
if (!list)
{
@@ -2938,7 +2938,7 @@ NamespaceContext::~NamespaceContext()
delete p;
}
-TemplateVariant NamespaceContext::get(const char *n) const
+TemplateVariant NamespaceContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -2995,7 +2995,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
if (!fd->cookie()) { fd->setCookie(new FileContext::Private::Cachable(fd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -3214,7 +3214,7 @@ class FileContext::Private : public DefinitionContext<FileContext::Private>
return cache.constantgroups.get();
}
TemplateVariant getMemberList(SharedPtr<MemberListInfoContext> &list,
- MemberListType type,const char *title,bool=FALSE) const
+ MemberListType type,const QCString &title,bool=FALSE) const
{
if (!list)
{
@@ -3390,7 +3390,7 @@ FileContext::~FileContext()
delete p;
}
-TemplateVariant FileContext::get(const char *n) const
+TemplateVariant FileContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -3423,7 +3423,7 @@ class DirContext::Private : public DefinitionContext<DirContext::Private>
if (!dd->cookie()) { dd->setCookie(new DirContext::Private::Cachable(dd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -3579,7 +3579,7 @@ DirContext::~DirContext()
delete p;
}
-TemplateVariant DirContext::get(const char *n) const
+TemplateVariant DirContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -3608,7 +3608,7 @@ class PageContext::Private : public DefinitionContext<PageContext::Private>
if (!pd->cookie()) { pd->setCookie(new PageContext::Private::Cachable(pd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -3712,7 +3712,7 @@ PageContext::~PageContext()
delete p;
}
-TemplateVariant PageContext::get(const char *n) const
+TemplateVariant PageContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -3724,13 +3724,13 @@ class TextGeneratorHtml : public TextGeneratorIntf
public:
TextGeneratorHtml(TextStream &ts,const QCString &relPath)
: m_ts(ts), m_relPath(relPath) {}
- void writeString(const char *s,bool keepSpaces) const
+ void writeString(const QCString &s,bool keepSpaces) const
{
static const char *hex="0123456789ABCDEF";
- if (s==0) return;
+ if (s.isEmpty()) return;
if (keepSpaces)
{
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -3773,11 +3773,11 @@ class TextGeneratorHtml : public TextGeneratorIntf
}
}
- void writeLink(const char *ref,const char *f,
- const char *anchor,const char *name
+ void writeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor,const QCString &name
) const
{
- if (ref)
+ if (!ref.isEmpty())
{
m_ts << "<a class=\"elRef\" ";
m_ts << externalLinkTarget();
@@ -3788,8 +3788,8 @@ class TextGeneratorHtml : public TextGeneratorIntf
}
m_ts << "href=\"";
m_ts << externalRef(m_relPath,ref,TRUE);
- if (f) m_ts << f << Doxygen::htmlFileExtension;
- if (anchor) m_ts << "#" << anchor;
+ if (!f.isEmpty()) m_ts << f << Doxygen::htmlFileExtension;
+ if (!anchor.isEmpty()) m_ts << "#" << anchor;
m_ts << "\">";
m_ts << convertToHtml(name);
m_ts << "</a>";
@@ -3806,7 +3806,7 @@ class TextGeneratorLatex : public TextGeneratorIntf
{
public:
TextGeneratorLatex(TextStream &ts) : m_ts(ts) {}
- void writeString(const char *s,bool keepSpaces) const
+ void writeString(const QCString &s,bool keepSpaces) const
{
if (s==0) return;
m_ts << convertToLaTeX(s,FALSE,keepSpaces);
@@ -3819,17 +3819,17 @@ class TextGeneratorLatex : public TextGeneratorIntf
m_ts << "~";
}
}
- void writeLink(const char *ref,const char *f,
- const char *anchor,const char *text
+ void writeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor,const QCString &text
) const
{
static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
- if (!ref && pdfHyperlinks)
+ if (ref.isEmpty() && pdfHyperlinks)
{
m_ts << "\\mbox{\\hyperlink{";
- if (f) m_ts << stripPath(f);
- if (f && anchor) m_ts << "_";
- if (anchor) m_ts << anchor;
+ if (!f.isEmpty()) m_ts << stripPath(f);
+ if (!f.isEmpty() && !anchor.isEmpty()) m_ts << "_";
+ if (!anchor.isEmpty()) m_ts << anchor;
m_ts << "}{";
filterLatexString(m_ts,text,
false, // insideTabbing
@@ -4059,7 +4059,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -5159,7 +5159,7 @@ MemberContext::~MemberContext()
delete p;
}
-TemplateVariant MemberContext::get(const char *n) const
+TemplateVariant MemberContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -5225,7 +5225,7 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
if (!gd->cookie()) { gd->setCookie(new ModuleContext::Private::Cachable(gd)); }
}
virtual ~Private() {}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -5433,7 +5433,7 @@ class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
}
TemplateVariant getMemberList(SharedPtr<MemberListInfoContext> &list,
- MemberListType type,const char *title,bool=FALSE) const
+ MemberListType type,const QCString &title,bool=FALSE) const
{
if (!list)
{
@@ -5670,7 +5670,7 @@ ModuleContext::~ModuleContext()
delete p;
}
-TemplateVariant ModuleContext::get(const char *n) const
+TemplateVariant ModuleContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -5749,7 +5749,7 @@ class ClassIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -5835,7 +5835,7 @@ ClassIndexContext::~ClassIndexContext()
}
// TemplateStructIntf
-TemplateVariant ClassIndexContext::get(const char *n) const
+TemplateVariant ClassIndexContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -5941,7 +5941,7 @@ class ClassHierarchyContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -6048,7 +6048,7 @@ ClassHierarchyContext::~ClassHierarchyContext()
delete p;
}
-TemplateVariant ClassHierarchyContext::get(const char *name) const
+TemplateVariant ClassHierarchyContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -6108,7 +6108,7 @@ class NestingNodeContext::Private
addPages(visitedClasses);
addModules(visitedClasses);
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -6370,7 +6370,7 @@ NestingNodeContext::~NestingNodeContext()
delete p;
}
-TemplateVariant NestingNodeContext::get(const char *n) const
+TemplateVariant NestingNodeContext::get(const QCString &n) const
{
return p->get(n);
}
@@ -6736,7 +6736,7 @@ class ClassTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -6823,7 +6823,7 @@ ClassTreeContext::~ClassTreeContext()
delete p;
}
-TemplateVariant ClassTreeContext::get(const char *name) const
+TemplateVariant ClassTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -6900,7 +6900,7 @@ class NamespaceTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -6989,7 +6989,7 @@ NamespaceTreeContext::~NamespaceTreeContext()
delete p;
}
-TemplateVariant NamespaceTreeContext::get(const char *name) const
+TemplateVariant NamespaceTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7170,7 +7170,7 @@ class FileTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7244,7 +7244,7 @@ FileTreeContext::~FileTreeContext()
delete p;
}
-TemplateVariant FileTreeContext::get(const char *name) const
+TemplateVariant FileTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7278,7 +7278,7 @@ class PageTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7352,7 +7352,7 @@ PageTreeContext::~PageTreeContext()
delete p;
}
-TemplateVariant PageTreeContext::get(const char *name) const
+TemplateVariant PageTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7520,7 +7520,7 @@ class ModuleTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7594,7 +7594,7 @@ ModuleTreeContext::~ModuleTreeContext()
delete p;
}
-TemplateVariant ModuleTreeContext::get(const char *name) const
+TemplateVariant ModuleTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7620,7 +7620,7 @@ class NavPathElemContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7688,7 +7688,7 @@ NavPathElemContext::~NavPathElemContext()
delete p;
}
-TemplateVariant NavPathElemContext::get(const char *name) const
+TemplateVariant NavPathElemContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7722,7 +7722,7 @@ class ExampleTreeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7796,7 +7796,7 @@ ExampleTreeContext::~ExampleTreeContext()
delete p;
}
-TemplateVariant ExampleTreeContext::get(const char *name) const
+TemplateVariant ExampleTreeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7831,7 +7831,7 @@ class GlobalsIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -7949,7 +7949,7 @@ GlobalsIndexContext::~GlobalsIndexContext()
delete p;
}
-TemplateVariant GlobalsIndexContext::get(const char *name) const
+TemplateVariant GlobalsIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -7984,7 +7984,7 @@ class ClassMembersIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8104,7 +8104,7 @@ ClassMembersIndexContext::~ClassMembersIndexContext()
delete p;
}
-TemplateVariant ClassMembersIndexContext::get(const char *name) const
+TemplateVariant ClassMembersIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8139,7 +8139,7 @@ class NamespaceMembersIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8256,7 +8256,7 @@ NamespaceMembersIndexContext::~NamespaceMembersIndexContext()
delete p;
}
-TemplateVariant NamespaceMembersIndexContext::get(const char *name) const
+TemplateVariant NamespaceMembersIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8277,7 +8277,7 @@ class InheritanceGraphContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8317,7 +8317,7 @@ InheritanceGraphContext::~InheritanceGraphContext()
delete p;
}
-TemplateVariant InheritanceGraphContext::get(const char *name) const
+TemplateVariant InheritanceGraphContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8340,7 +8340,7 @@ class InheritanceNodeContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8376,7 +8376,7 @@ InheritanceNodeContext::~InheritanceNodeContext()
delete p;
}
-TemplateVariant InheritanceNodeContext::get(const char *name) const
+TemplateVariant InheritanceNodeContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8409,7 +8409,7 @@ InheritanceListContext::InheritanceListContext(const BaseClassList &list, bool b
{
name = cd->displayName();
}
- //printf("InheritanceListContext: adding %s baseClass=%d\n",name.data(),baseClasses);
+ //printf("InheritanceListContext: adding %s baseClass=%d\n",qPrint(name),baseClasses);
p->addClass(cd,name);
}
}
@@ -8524,7 +8524,7 @@ class MemberInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8587,7 +8587,7 @@ MemberInfoContext::~MemberInfoContext()
delete p;
}
-TemplateVariant MemberInfoContext::get(const char *name) const
+TemplateVariant MemberInfoContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8676,7 +8676,7 @@ class MemberGroupInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8759,7 +8759,7 @@ MemberGroupInfoContext::~MemberGroupInfoContext()
delete p;
}
-TemplateVariant MemberGroupInfoContext::get(const char *name) const
+TemplateVariant MemberGroupInfoContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8850,7 +8850,7 @@ class MemberListInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -8931,7 +8931,7 @@ MemberListInfoContext::~MemberListInfoContext()
delete p;
}
-TemplateVariant MemberListInfoContext::get(const char *name) const
+TemplateVariant MemberListInfoContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -8957,7 +8957,7 @@ class InheritedMemberInfoContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9025,7 +9025,7 @@ InheritedMemberInfoContext::~InheritedMemberInfoContext()
delete p;
}
-TemplateVariant InheritedMemberInfoContext::get(const char *name) const
+TemplateVariant InheritedMemberInfoContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9138,7 +9138,7 @@ void InheritedMemberInfoListContext::addMemberList(
bool memberInSection = cd->countMembersIncludingGrouped(lt,cd,FALSE)>0;
bool show = (additionalList && !memberInSection) || // inherited member to show in the additional inherited members list
(!additionalList && memberInSection); // inherited member to show in a member list of the class
- //printf("%s:%s show=%d\n",cd->name().data(),MemberList::listTypeAsString(lt).data(),show);
+ //printf("%s:%s show=%d\n",qPrint(cd->name()),qPrint(MemberList::listTypeAsString(lt)),show);
if (show)
{
p->findInheritedMembers(cd,cd,lt,-1,title,additionalList,visited);
@@ -9189,7 +9189,7 @@ class ArgumentContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9266,7 +9266,7 @@ ArgumentContext::~ArgumentContext()
delete p;
}
-TemplateVariant ArgumentContext::get(const char *name) const
+TemplateVariant ArgumentContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9356,7 +9356,7 @@ class SymbolContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9460,7 +9460,7 @@ SymbolContext::~SymbolContext()
delete p;
}
-TemplateVariant SymbolContext::get(const char *name) const
+TemplateVariant SymbolContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9533,7 +9533,7 @@ class SymbolGroupContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9579,7 +9579,7 @@ SymbolGroupContext::~SymbolGroupContext()
delete p;
}
-TemplateVariant SymbolGroupContext::get(const char *name) const
+TemplateVariant SymbolGroupContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9660,7 +9660,7 @@ class SymbolIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9706,7 +9706,7 @@ SymbolIndexContext::~SymbolIndexContext()
delete p;
}
-TemplateVariant SymbolIndexContext::get(const char *name) const
+TemplateVariant SymbolIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9771,7 +9771,7 @@ class SearchIndexContext::Private
init=TRUE;
}
}
- TemplateVariant get(const char *n) const
+ TemplateVariant get(const QCString &n) const
{
return s_inst.get(this,n);
}
@@ -9815,7 +9815,7 @@ SearchIndexContext::~SearchIndexContext()
delete p;
}
-TemplateVariant SearchIndexContext::get(const char *name) const
+TemplateVariant SearchIndexContext::get(const QCString &name) const
{
return p->get(name);
}
@@ -9883,6 +9883,7 @@ class LatexSpaceless : public TemplateSpacelessIntf
void reset() { }
QCString remove(const QCString &s)
{
+ if (s.isEmpty()) return s;
TextStream result;
const char *p = s.data();
char c;
@@ -9916,6 +9917,7 @@ class HtmlSpaceless : public TemplateSpacelessIntf
}
QCString remove(const QCString &s)
{
+ if (s.isEmpty()) return s;
TextStream result;
const char *p = s.data();
char c;
@@ -9966,7 +9968,7 @@ class HtmlSpaceless : public TemplateSpacelessIntf
break;
}
}
- //printf("HtmlSpaceless::remove({%s})={%s} m_insideTag=%d m_insideString=%c (%d) removeSpaces=%d\n",s.data(),result.data(),
+ //printf("HtmlSpaceless::remove({%s})={%s} m_insideTag=%d m_insideString=%c (%d) removeSpaces=%d\n",qPrint(s),qPrint(result),
// m_insideTag,m_insideString,m_insideString,m_removeSpaces);
return result.str();
}
@@ -10151,16 +10153,16 @@ void generateOutputViaTemplate()
#endif
}
-void generateTemplateFiles(const char *templateDir)
+void generateTemplateFiles(const QCString &templateDir)
{
- if (!templateDir) return;
+ if (templateDir.isEmpty()) return;
Dir thisDir;
- if (!thisDir.exists(templateDir) && !thisDir.mkdir(templateDir))
+ if (!thisDir.exists(templateDir.str()) && !thisDir.mkdir(templateDir.str()))
{
- err("Failed to create output directory '%s'\n",templateDir);
+ err("Failed to create output directory '%s'\n",qPrint(templateDir));
return;
}
- std::string outDir = std::string(templateDir)+"/html";
+ std::string outDir = templateDir.str()+"/html";
if (!thisDir.exists(outDir) && !thisDir.mkdir(outDir))
{
err("Failed to create output directory '%s'\n",outDir.c_str());
diff --git a/src/context.h b/src/context.h
index 9573643..1fb934e 100644
--- a/src/context.h
+++ b/src/context.h
@@ -80,13 +80,13 @@ class RefCountedContext
int addRef()
{
++s_totalCount;
- printf("%p:%s::addRef()=%d\n",this,m_className.data(),m_refCount);
+ printf("%p:%s::addRef()=%d\n",this,qPrint(m_className),m_refCount);
return ++m_refCount;
}
int release()
{
--s_totalCount;
- printf("%p:%s::release()=%d\n",this,m_className.data(),m_refCount-1);
+ printf("%p:%s::release()=%d\n",this,qPrint(m_className),m_refCount-1);
int count = --m_refCount;
if (count<=0)
{
@@ -134,7 +134,7 @@ class ConfigContext : public RefCountedContext, public TemplateStructIntf
static ConfigContext *alloc() { return new ConfigContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -153,7 +153,7 @@ class DoxygenContext : public RefCountedContext, public TemplateStructIntf
static DoxygenContext *alloc() { return new DoxygenContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -172,7 +172,7 @@ class TranslateContext : public RefCountedContext, public TemplateStructIntf
static TranslateContext *alloc() { return new TranslateContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -216,7 +216,7 @@ class IncludeInfoContext : public RefCountedContext, public TemplateStructIntf
{ return new IncludeInfoContext(info,lang); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -258,7 +258,7 @@ class ClassContext : public RefCountedContext, public TemplateStructIntf
static ClassContext *alloc(const ClassDef *cd) { return new ClassContext(cd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -277,7 +277,7 @@ class NamespaceContext : public RefCountedContext, public TemplateStructIntf
static NamespaceContext *alloc(const NamespaceDef *nd) { return new NamespaceContext(nd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -296,7 +296,7 @@ class FileContext : public RefCountedContext, public TemplateStructIntf
static FileContext *alloc(const FileDef *fd) { return new FileContext(fd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -314,7 +314,7 @@ class DirContext : public RefCountedContext, public TemplateStructIntf
static DirContext *alloc(const DirDef *dd) { return new DirContext(dd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -334,7 +334,7 @@ class PageContext : public RefCountedContext, public TemplateStructIntf
static PageContext *alloc(const PageDef *pd,bool isMainPage,bool isExample) { return new PageContext(pd,isMainPage,isExample); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -353,7 +353,7 @@ class MemberContext : public RefCountedContext, public TemplateStructIntf
static MemberContext *alloc(const MemberDef *md) { return new MemberContext(md); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -373,7 +373,7 @@ class ModuleContext : public RefCountedContext, public TemplateStructIntf
static ModuleContext *alloc(const GroupDef *gd) { return new ModuleContext(gd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -413,7 +413,7 @@ class ClassIndexContext : public RefCountedContext, public TemplateStructIntf
static ClassIndexContext *alloc() { return new ClassIndexContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -433,7 +433,7 @@ class InheritanceGraphContext : public RefCountedContext, public TemplateStructI
{ return new InheritanceGraphContext(hierarchy,n,id); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -453,7 +453,7 @@ class ClassInheritanceNodeContext : public RefCountedContext, public TemplateStr
{ return new ClassInheritanceNodeContext(cd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -495,7 +495,7 @@ class ClassHierarchyContext : public RefCountedContext, public TemplateStructInt
static ClassHierarchyContext *alloc() { return new ClassHierarchyContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -519,7 +519,7 @@ class NestingNodeContext : public RefCountedContext, public TemplateStructIntf
QCString id() const;
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -578,7 +578,7 @@ class ClassTreeContext : public RefCountedContext, public TemplateStructIntf
static ClassTreeContext *alloc() { return new ClassTreeContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -618,7 +618,7 @@ class NamespaceTreeContext : public RefCountedContext, public TemplateStructIntf
static NamespaceTreeContext *alloc() { return new NamespaceTreeContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -679,7 +679,7 @@ class FileTreeContext : public RefCountedContext, public TemplateStructIntf
static FileTreeContext *alloc() { return new FileTreeContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -721,7 +721,7 @@ class PageTreeContext : public RefCountedContext, public TemplateStructIntf
static PageTreeContext *alloc(const PageLinkedMap &pages) { return new PageTreeContext(pages); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -740,7 +740,7 @@ class ModuleNodeContext : public RefCountedContext, public TemplateStructIntf
static ModuleNodeContext *alloc(const GroupDef *gd) { return new ModuleNodeContext(gd); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -783,7 +783,7 @@ class ModuleTreeContext : public RefCountedContext, public TemplateStructIntf
static ModuleTreeContext *alloc() { return new ModuleTreeContext(); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -824,7 +824,7 @@ class ExampleTreeContext : public RefCountedContext, public TemplateStructIntf
static ExampleTreeContext *alloc() { return new ExampleTreeContext; }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -843,7 +843,7 @@ class GlobalsIndexContext : public RefCountedContext, public TemplateStructIntf
static GlobalsIndexContext *alloc() { return new GlobalsIndexContext(); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -862,7 +862,7 @@ class ClassMembersIndexContext : public RefCountedContext, public TemplateStruct
static ClassMembersIndexContext *alloc() { return new ClassMembersIndexContext(); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -881,7 +881,7 @@ class NamespaceMembersIndexContext : public RefCountedContext, public TemplateSt
static NamespaceMembersIndexContext *alloc() { return new NamespaceMembersIndexContext(); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -900,7 +900,7 @@ class NavPathElemContext : public RefCountedContext, public TemplateStructIntf
static NavPathElemContext *alloc(const Definition *def) { return new NavPathElemContext(def); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -921,7 +921,7 @@ class InheritanceNodeContext : public RefCountedContext, public TemplateStructIn
{ return new InheritanceNodeContext(cd,name); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -991,7 +991,7 @@ class MemberGroupInfoContext : public RefCountedContext, public TemplateStructIn
{ return new MemberGroupInfoContext(def,relPath,mg); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1042,7 +1042,7 @@ class MemberListInfoContext : public RefCountedContext, public TemplateStructInt
{ return new MemberListInfoContext(def,relPath,ml,title,subtitle); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1063,7 +1063,7 @@ class MemberInfoContext : public RefCountedContext, public TemplateStructIntf
static MemberInfoContext *alloc(const MemberInfo *mi) { return new MemberInfoContext(mi); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1083,7 +1083,7 @@ class InheritedMemberInfoContext : public RefCountedContext, public TemplateStru
{ return new InheritedMemberInfoContext(cd,ml,title); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1147,7 +1147,7 @@ class ArgumentContext : public RefCountedContext, public TemplateStructIntf
{ return new ArgumentContext(arg,def,relPath); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1191,7 +1191,7 @@ class SymbolContext : public RefCountedContext, public TemplateStructIntf
{ return new SymbolContext(def,prev,next); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1236,7 +1236,7 @@ class SymbolGroupContext : public RefCountedContext, public TemplateStructIntf
{ return new SymbolGroupContext(start,end); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1280,7 +1280,7 @@ class SymbolIndexContext : public RefCountedContext, public TemplateStructIntf
{ return new SymbolIndexContext(letter,sl,name); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1322,7 +1322,7 @@ class SearchIndexContext : public RefCountedContext, public TemplateStructIntf
{ return new SearchIndexContext(info); }
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
@@ -1357,6 +1357,6 @@ class SearchIndicesContext : public RefCountedContext, public TemplateListIntf
//----------------------------------------------------
void generateOutputViaTemplate();
-void generateTemplateFiles(const char *templateDir);
+void generateTemplateFiles(const QCString &templateDir);
#endif
diff --git a/src/cppvalue.cpp b/src/cppvalue.cpp
index 31f0ab5..77677d9 100644
--- a/src/cppvalue.cpp
+++ b/src/cppvalue.cpp
@@ -47,7 +47,7 @@ CPPValue parseHexadecimal(const std::string& token)
else if (*p >= 'a' && *p <= 'f') val = val * 16 + *p - 'a' + 10;
else if (*p >= 'A' && *p <= 'F') val = val * 16 + *p - 'A' + 10;
}
- //printf("parseHexadecimal %s->%x\n",token.data(),val);
+ //printf("parseHexadecimal %s->%x\n",qPrint(token),val);
return CPPValue(val);
}
@@ -79,7 +79,7 @@ CPPValue parseCharacter(const std::string& token) // does not work for '\n' and
return parseOctal(token);
case 'x':
case 'X': return parseHexadecimal(token);
- default: printf("Invalid escape sequence %s found!\n",token.data());
+ default: printf("Invalid escape sequence %s found!\n",token.c_str());
return CPPValue(0L);
}
}
diff --git a/src/debug.cpp b/src/debug.cpp
index bc5abb2..ea6f272 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -22,6 +22,7 @@
#include "debug.h"
#include "message.h"
+#include "qcstring.h"
//------------------------------------------------------------------------
@@ -69,22 +70,22 @@ static char asciiToLower(char in) {
return in;
}
-static int labelToEnumValue(const char *l)
+static int labelToEnumValue(const QCString &l)
{
- std::string s = l;
+ std::string s = l.str();
std::transform(s.begin(),s.end(),s.begin(),asciiToLower);
auto it = s_labels.find(s);
return (it!=s_labels.end()) ? it->second : 0;
}
-int Debug::setFlag(const char *lab)
+int Debug::setFlag(const QCString &lab)
{
int retVal = labelToEnumValue(lab);
curMask = (DebugMask)(curMask | retVal);
return retVal;
}
-void Debug::clearFlag(const char *lab)
+void Debug::clearFlag(const QCString &lab)
{
curMask = (DebugMask)(curMask & ~labelToEnumValue(lab));
}
diff --git a/src/debug.h b/src/debug.h
index 5d4717a..bc93011 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -16,6 +16,8 @@
#ifndef _DEBUG_H
#define _DEBUG_H
+class QCString;
+
/** Class containing a print function for diagnostics. */
class Debug
{
@@ -42,8 +44,8 @@ class Debug
};
static void print(DebugMask mask,int prio,const char *fmt,...);
- static int setFlag(const char *label);
- static void clearFlag(const char *label);
+ static int setFlag(const QCString &label);
+ static void clearFlag(const QCString &label);
static bool isFlagSet(DebugMask mask);
static void printFlags();
static void setPriority(int p);
diff --git a/src/declinfo.l b/src/declinfo.l
index 9ed7738..e340df5 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -118,7 +118,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
REJECT;
}
addTypeName(yyscanner);
- yyextra->name += removeRedundantWhiteSpace(yytext);
+ yyextra->name += removeRedundantWhiteSpace(QCString(yytext));
}
<Start>([~!]{B}*)?{ID}/({B}*"["{B}*"]")* { // the []'s are for Java,
// the / was add to deal with multi-
@@ -126,7 +126,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
// the leading ~ is for a destructor
// the leading ! is for a C++/CLI finalizer (see bug 456475 and 635198)
addTypeName(yyscanner);
- yyextra->name += removeRedundantWhiteSpace(yytext);
+ yyextra->name += removeRedundantWhiteSpace(QCString(yytext));
}
<Start>{B}*"::"{B}* { // found a yyextra->scope specifier
if (!yyextra->scope.isEmpty())
@@ -135,7 +135,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
}
else
{
- yyextra->scope = yyextra->name.copy(); // yyextra->scope becomes yyextra->name
+ yyextra->scope = yyextra->name; // yyextra->scope becomes yyextra->name
}
yyextra->name.resize(0);
}
@@ -152,7 +152,7 @@ ID "$"?([a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*)|(@[0-9]+)
<Start>{B}*"("({ID}"::")*{B}*[&*]({B}*("const"|"volatile"){B}+)? {
if (yyextra->insidePHP) REJECT;
addType(yyscanner);
- QCString text=yytext;
+ QCString text(yytext);
yyextra->type+=text.stripWhiteSpace();
}
<Start>{B}*")" {
@@ -220,7 +220,7 @@ static void addType(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("addType() yyextra->type='%s' yyextra->scope='%s' yyextra->name='%s'\n",
- // yyextra->type.data(),yyextra->scope.data(),yyextra->name.data());
+ // qPrint(yyextra->type),qPrint(yyextra->scope),qPrint(yyextra->name));
if (yyextra->name.isEmpty() && yyextra->scope.isEmpty()) return;
if (!yyextra->type.isEmpty()) yyextra->type+=" ";
if (!yyextra->scope.isEmpty()) yyextra->type+=yyextra->scope+"::";
@@ -233,7 +233,7 @@ static void addTypeName(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("addTypeName() yyextra->type='%s' yyextra->scope='%s' yyextra->name='%s'\n",
- // yyextra->type.data(),yyextra->scope.data(),yyextra->name.data());
+ // qPrint(yyextra->type),qPrint(yyextra->scope),qPrint(yyextra->name));
if (yyextra->name.isEmpty() ||
yyextra->name.at(yyextra->name.length()-1)==':') // end of Objective-C keyword => append to yyextra->name not yyextra->type
{
@@ -276,7 +276,7 @@ void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCStr
#endif
printlex(yy_flex_debug, TRUE, __FILE__, NULL);
- yyextra->inputString = decl;
+ yyextra->inputString = decl.data();
//printf("Input='%s'\n",yyextra->inputString);
yyextra->inputPosition = 0;
yyextra->classTempListFound = FALSE;
@@ -297,7 +297,7 @@ void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCStr
declinfoYYlex(g_yyscanner);
//printf("yyextra->type='%s' class='%s' yyextra->name='%s' yyextra->args='%s'\n",
- // yyextra->type.data(),yyextra->scope.data(),yyextra->name.data(),yyextra->args.data());
+ // qPrint(yyextra->type),qPrint(yyextra->scope),qPrint(yyextra->name),qPrint(yyextra->args));
int nb = yyextra->name.findRev('[');
if (nb!=-1 && yyextra->args.isEmpty()) // correct for [] in yyextra->name ambiguity (due to Java return yyextra->type allowing [])
@@ -350,7 +350,7 @@ void parseFuncDecl(const QCString &decl,const SrcLangExt lang,QCString &cl,QCStr
t=t.left(t.length()-1);
}
//printf("yyextra->type='%s' class='%s' yyextra->name='%s' yyextra->args='%s'\n",
- // t.data(),cl.data(),n.data(),a.data());
+ // qPrint(t),qPrint(cl),qPrint(n),qPrint(a));
printlex(yy_flex_debug, FALSE, __FILE__, NULL);
declinfoYYlex_destroy(g_yyscanner);
@@ -370,8 +370,8 @@ void dumpDecl(const char *s)
parseFuncDecl(s,yyextra->className,classTNames,yyextra->type,yyextra->name,yyextra->args,funcTNames);
msg("yyextra->type='%s' class='%s' classTempl='%s' yyextra->name='%s' "
"funcTemplateNames='%s' yyextra->args='%s'\n",
- yyextra->type.data(),yyextra->className.data(),classTNames.data(),
- yyextra->name.data(),funcTNames.data(),yyextra->args.data()
+ qPrint(yyextra->type),qPrint(yyextra->className),qPrint(classTNames),
+ qPrint(yyextra->name),qPrint(funcTNames),qPrint(yyextra->args)
);
}
diff --git a/src/defargs.h b/src/defargs.h
index 589eb90..a988b0b 100644
--- a/src/defargs.h
+++ b/src/defargs.h
@@ -25,7 +25,7 @@ class ArgumentList;
class QCString;
std::unique_ptr<ArgumentList> stringToArgumentList(SrcLangExt lang,
- const char *argsString,
+ const QCString &argsString,
QCString *extraTypeChars=0);
#endif
diff --git a/src/defargs.l b/src/defargs.l
index 528d44c..9385cc3 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -165,7 +165,7 @@ CPPC "/\/"
<ReadFuncArgDef>"'"\\."'" { yyextra->curArgDefValue+=yytext; }
<ReadFuncArgDef>"'"."'" { yyextra->curArgDefValue+=yytext; }
<ReadFuncArgDef>{RAWBEGIN} { yyextra->curArgDefValue+=yytext;
- QCString text=yytext;
+ QCString text(yytext);
int i=text.find('"');
yyextra->delimiter = yytext+i+1;
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
@@ -329,7 +329,7 @@ CPPC "/\/"
}
<CopyRawString>{RAWEND} {
yyextra->curArgDefValue+=yytext;
- QCString delimiter = yytext+1;
+ QCString delimiter(yytext+1);
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
{
@@ -346,7 +346,7 @@ CPPC "/\/"
<ReadFuncArgType,ReadFuncArgDef>[,)>]{B}*({CCS}[*!]|{CPPC}[/!])"<" {
yyextra->lastDocContext=YY_START;
yyextra->lastDocChar=*yytext;
- QCString text=yytext;
+ QCString text(yytext);
if (text.find("//")!=-1)
BEGIN( ReadDocLine );
else
@@ -362,7 +362,7 @@ CPPC "/\/"
{
yyextra->curArgTypeName=removeRedundantWhiteSpace(yyextra->curArgTypeName);
yyextra->curArgDefValue=yyextra->curArgDefValue.stripWhiteSpace();
- //printf("curArgType='%s' curArgDefVal='%s'\n",yyextra->curArgTypeName.data(),yyextra->curArgDefValue.data());
+ //printf("curArgType='%s' curArgDefVal='%s'\n",qPrint(yyextra->curArgTypeName),qPrint(yyextra->curArgDefValue));
int l=yyextra->curArgTypeName.length();
if (l>0)
{
@@ -370,10 +370,10 @@ CPPC "/\/"
while (i>=0 && (isspace((uchar)yyextra->curArgTypeName.at(i)) || yyextra->curArgTypeName.at(i)=='.')) i--;
while (i>=0 && (isId(yyextra->curArgTypeName.at(i)) || yyextra->curArgTypeName.at(i)=='$')) i--;
Argument a;
- a.attrib = yyextra->curArgAttrib.copy();
+ a.attrib = yyextra->curArgAttrib;
a.typeConstraint = yyextra->curTypeConstraint.stripWhiteSpace();
//printf("a->type=%s a->name=%s i=%d l=%d\n",
- // a->type.data(),a->name.data(),i,l);
+ // qPrint(a->type),qPrint(a->name),i,l);
a.array.resize(0);
if (i==l-1 && yyextra->curArgTypeName.at(i)==')') // function argument
{
@@ -414,7 +414,7 @@ CPPC "/\/"
a.type = a.type + " " + a.name;
a.name.resize(0);
}
- //printf(" --> a->type='%s' a->name='%s'\n",a->type.data(),a->name.data());
+ //printf(" --> a->type='%s' a->name='%s'\n",qPrint(a->type),qPrint(a->name));
}
else // assume only the type was specified, try to determine name later
{
@@ -426,7 +426,7 @@ CPPC "/\/"
a.type = "";
}
a.array += removeRedundantWhiteSpace(yyextra->curArgArray);
- //printf("array=%s\n",a->array.data());
+ //printf("array=%s\n",qPrint(a->array));
int alen = a.array.length();
if (alen>2 && a.array.at(0)=='(' &&
a.array.at(alen-1)==')') // fix-up for int *(a[10])
@@ -439,10 +439,10 @@ CPPC "/\/"
a.array = a.array.mid(i);
}
}
- a.defval = yyextra->curArgDefValue.copy();
- //printf("a->type=%s a->name=%s a->defval=\"%s\"\n",a->type.data(),a->name.data(),a->defval.data());
+ a.defval = yyextra->curArgDefValue;
+ //printf("a->type=%s a->name=%s a->defval=\"%s\"\n",qPrint(a->type),qPrint(a->name),qPrint(a->defval));
a.docs = yyextra->curArgDocs.stripWhiteSpace();
- //printf("Argument '%s' '%s' adding docs='%s'\n",a->type.data(),a->name.data(),a->docs.data());
+ //printf("Argument '%s' '%s' adding docs='%s'\n",qPrint(a->type),qPrint(a->name),qPrint(a->docs));
yyextra->argList->push_back(a);
}
yyextra->curArgAttrib.resize(0);
@@ -475,13 +475,13 @@ CPPC "/\/"
}
}
<ReadFuncArgType,ReadFuncArgPtr>"$"?{ID} {
- QCString name=yytext; //resolveDefines(yytext);
+ QCString name(yytext);
if (YY_START==ReadFuncArgType && yyextra->curArgArray=="[]") // Java style array
{
yyextra->curArgTypeName+=" []";
yyextra->curArgArray.resize(0);
}
- //printf("resolveName '%s'->'%s'\n",yytext,name.data());
+ //printf("resolveName '%s'->'%s'\n",yytext,qPrint(name));
yyextra->curArgTypeName+=name;
}
<ReadFuncArgType,ReadFuncArgPtr>. {
@@ -495,8 +495,7 @@ CPPC "/\/"
yyextra->curArgDefValue+=*yytext;
}
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>{ID} {
- QCString name=yytext; //resolveDefines(yytext);
- *yyextra->copyArgValue+=name;
+ *yyextra->copyArgValue+=yytext;
}
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>. {
*yyextra->copyArgValue += *yytext;
@@ -530,7 +529,7 @@ CPPC "/\/"
BEGIN(FuncQual);
}
<FuncQual>"->" { // C++11 trailing return type
- yyextra->argList->setTrailingReturnType(" -> ");
+ yyextra->argList->setTrailingReturnType(QCString(" -> "));
BEGIN(TrailingReturn);
}
<TrailingReturn>{B}/("final"|"override"){B}* {
@@ -776,13 +775,13 @@ static bool nameIsActuallyPartOfType(QCString &name)
* for complex types are written to
*/
-std::unique_ptr<ArgumentList> stringToArgumentList(SrcLangExt lang, const char *argsString,QCString *extraTypeChars)
+std::unique_ptr<ArgumentList> stringToArgumentList(SrcLangExt lang, const QCString &argsString,QCString *extraTypeChars)
{
std::unique_ptr<ArgumentList> al = std::make_unique<ArgumentList>();
- if (argsString==0) return al;
+ if (argsString.isEmpty()) return al;
yyscan_t yyscanner;
- defargsYY_state extra(argsString,al,lang);
+ defargsYY_state extra(argsString.data(),al,lang);
defargsYYlex_init_extra(&extra,&yyscanner);
#ifdef FLEX_DEBUG
defargsYYset_debug(1,yyscanner);
@@ -798,7 +797,7 @@ std::unique_ptr<ArgumentList> stringToArgumentList(SrcLangExt lang, const char *
yyextra->argList->setNoParameters(TRUE);
}
if (extraTypeChars) *extraTypeChars=yyextra->extraTypeChars;
- //printf("stringToArgumentList(%s) result=%s\n",argsString,argListToString(*al).data());
+ //printf("stringToArgumentList(%s) result=%s\n",argsString,qPrint(argListToString(*al)));
printlex(yy_flex_debug, FALSE, __FILE__, NULL);
defargsYYlex_destroy(yyscanner);
return al;
diff --git a/src/defgen.cpp b/src/defgen.cpp
index 5a3641e..c99d59b 100644
--- a/src/defgen.cpp
+++ b/src/defgen.cpp
@@ -40,17 +40,19 @@
#define DEF_DB(x)
-static inline void writeDEFString(TextStream &t,const char *s)
+static inline void writeDEFString(TextStream &t,const QCString &s)
{
- const char* p=s;
- char c;
-
t << '\'';
- while ((c = *(p++)))
+ if (!s.isEmpty())
{
- if (c == '\'')
- t << '\\';
- t << c;
+ const char* p=s.data();
+ char c;
+
+ while ((c = *(p++)))
+ {
+ if (c == '\'') t << '\\';
+ t << c;
+ }
}
t << '\'';
}
@@ -58,7 +60,7 @@ static inline void writeDEFString(TextStream &t,const char *s)
static void generateDEFForMember(const MemberDef *md,
TextStream &t,
const Definition *def,
- const char* Prefix)
+ const QCString &prefix)
{
QCString memPrefix;
@@ -81,9 +83,9 @@ static void generateDEFForMember(const MemberDef *md,
else if (md->getNamespaceDef())
scopeName=md->getNamespaceDef()->name();
- t << " " << Prefix << "-member = {\n";
+ t << " " << prefix << "-member = {\n";
memPrefix = " ";
- memPrefix.append( Prefix );
+ memPrefix.append( prefix );
memPrefix.append( "-mem-" );
QCString memType;
@@ -291,14 +293,14 @@ static void generateDEFForMember(const MemberDef *md,
}
}
- t << " }; /* " << Prefix << "-member */\n";
+ t << " }; /* " << prefix << "-member */\n";
}
static void generateDEFClassSection(const ClassDef *cd,
TextStream &t,
const MemberList *ml,
- const char *kind)
+ const QCString &kind)
{
if (cd && ml && !ml->empty())
{
@@ -448,7 +450,7 @@ static void generateDEFForClass(const ClassDef *cd,TextStream &t)
static void generateDEFSection(const Definition *d,
TextStream &t,
const MemberList *ml,
- const char *kind)
+ const QCString &kind)
{
if (ml && !ml->empty())
{
@@ -527,7 +529,7 @@ void generateDEF()
Dir defDir(outputDirectory.str());
if (!defDir.exists() && !defDir.mkdir(outputDirectory.str()))
{
- err("Could not create def directory in %s\n",outputDirectory.data());
+ err("Could not create def directory in %s\n",qPrint(outputDirectory));
return;
}
@@ -535,7 +537,7 @@ void generateDEF()
std::ofstream f(fileName.str(),std::ostream::out | std::ostream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
TextStream t(&f);
diff --git a/src/definition.cpp b/src/definition.cpp
index 2820c16..e9f479c 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -56,7 +56,7 @@ class DefinitionImpl::IMPL
{
public:
~IMPL();
- void init(const char *df, const char *n);
+ void init(const QCString &df, const QCString &n);
void setDefFileName(const QCString &df);
Definition *def = 0;
@@ -121,7 +121,7 @@ void DefinitionImpl::IMPL::setDefFileName(const QCString &df)
}
}
-void DefinitionImpl::IMPL::init(const char *df, const char *n)
+void DefinitionImpl::IMPL::init(const QCString &df, const QCString &n)
{
setDefFileName(df);
QCString lname = n;
@@ -134,7 +134,7 @@ void DefinitionImpl::IMPL::init(const char *df, const char *n)
{
localName=n;
}
- //printf("m_localName=%s\n",m_localName.data());
+ //printf("m_localName=%s\n",qPrint(m_localName));
brief = 0;
details = 0;
@@ -158,11 +158,11 @@ void DefinitionImpl::setDefFile(const QCString &df,int defLine,int defCol)
//-----------------------------------------------------------------------------------------
-static bool matchExcludedSymbols(const char *name)
+static bool matchExcludedSymbols(const QCString &name)
{
const StringVector &exclSyms = Config_getList(EXCLUDE_SYMBOLS);
if (exclSyms.empty()) return FALSE; // nothing specified
- std::string symName = name;
+ std::string symName = name.str();
for (const auto &pat : exclSyms)
{
QCString pattern = pat.c_str();
@@ -185,14 +185,14 @@ static bool matchExcludedSymbols(const char *name)
(ui+pl==sl || pattern.at(pattern.length()-1)=='*' || (!isId(symName.at(ui+pl)) && !forceEnd))
)
{
- //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i);
+ //printf("--> name=%s pattern=%s match at %d\n",qPrint(symName),qPrint(pattern),i);
return TRUE;
}
}
}
else if (!pattern.isEmpty()) // match words
{
- size_t i = symName.find(pattern);
+ size_t i = symName.find(pattern.str());
if (i!=std::string::npos) // we have a match!
{
size_t ui=i;
@@ -203,7 +203,7 @@ static bool matchExcludedSymbols(const char *name)
(ui+pl==sl || (!isId(symName.at(ui+pl)) && !forceEnd))
)
{
- //printf("--> name=%s pattern=%s match at %d\n",symName.data(),pattern.data(),i);
+ //printf("--> name=%s pattern=%s match at %d\n",qPrint(symName),qPrint(pattern),i);
return TRUE;
}
}
@@ -213,7 +213,7 @@ static bool matchExcludedSymbols(const char *name)
return FALSE;
}
-static void addToMap(const char *name,Definition *d)
+static void addToMap(const QCString &name,Definition *d)
{
bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
QCString symbolName = name;
@@ -227,14 +227,14 @@ static void addToMap(const char *name,Definition *d)
}
}
-static void removeFromMap(const char *name,Definition *d)
+static void removeFromMap(const QCString &name,Definition *d)
{
Doxygen::symbolMap.remove(name,d);
}
DefinitionImpl::DefinitionImpl(Definition *def,
- const char *df,int dl,int dc,
- const char *name,const char *b,
+ const QCString &df,int dl,int dc,
+ const QCString &name,const char *b,
const char *d,bool isSymbol)
{
m_impl = new DefinitionImpl::IMPL;
@@ -291,23 +291,23 @@ DefinitionImpl::~DefinitionImpl()
m_impl=0;
}
-void DefinitionImpl::setName(const char *name)
+void DefinitionImpl::setName(const QCString &name)
{
- if (name==0) return;
+ if (name.isEmpty()) return;
m_impl->name = name;
m_impl->isAnonymous = m_impl->name.isEmpty() ||
m_impl->name.at(0)=='@' ||
m_impl->name.find("::@")!=-1;
}
-void DefinitionImpl::setId(const char *id)
+void DefinitionImpl::setId(const QCString &id)
{
- if (id==0) return;
+ if (id.isEmpty()) return;
m_impl->id = id;
if (Doxygen::clangUsrMap)
{
- //printf("DefinitionImpl::setId '%s'->'%s'\n",id,m_impl->name.data());
- Doxygen::clangUsrMap->insert(std::make_pair(id,m_impl->def));
+ //printf("DefinitionImpl::setId '%s'->'%s'\n",id,qPrint(m_impl->name));
+ Doxygen::clangUsrMap->insert(std::make_pair(id.str(),m_impl->def));
}
}
@@ -318,14 +318,14 @@ QCString DefinitionImpl::id() const
void DefinitionImpl::addSectionsToDefinition(const std::vector<const SectionInfo*> &anchorList)
{
- //printf("%s: addSectionsToDefinition(%d)\n",name().data(),anchorList->count());
+ //printf("%s: addSectionsToDefinition(%d)\n",qPrint(name()),anchorList->count());
for (const SectionInfo *si : anchorList)
{
//printf("Add section '%s' to definition '%s'\n",
- // si->label().data(),name().data());
+ // qPrint(si->label()),qPrint(name()));
SectionManager &sm = SectionManager::instance();
SectionInfo *gsi=sm.find(si->label());
- //printf("===== label=%s gsi=%p\n",si->label.data(),gsi);
+ //printf("===== label=%s gsi=%p\n",qPrint(si->label),gsi);
if (gsi==0)
{
gsi = sm.add(*si);
@@ -340,7 +340,7 @@ void DefinitionImpl::addSectionsToDefinition(const std::vector<const SectionInfo
bool DefinitionImpl::hasSections() const
{
- //printf("DefinitionImpl::hasSections(%s) #sections=%d\n",name().data(),
+ //printf("DefinitionImpl::hasSections(%s) #sections=%d\n",qPrint(name()),
// m_impl->sectionRefs.size());
if (m_impl->sectionRefs.empty()) return FALSE;
for (const SectionInfo *si : m_impl->sectionRefs)
@@ -364,7 +364,7 @@ void DefinitionImpl::addSectionsToIndex()
SectionType type = si->type();
if (isSection(type))
{
- //printf(" level=%d title=%s\n",level,si->title.data());
+ //printf(" level=%d title=%s\n",level,qPrint(si->title));
int nextLevel = (int)type;
int i;
if (nextLevel>level)
@@ -407,7 +407,7 @@ void DefinitionImpl::writeDocAnchorsToTagFile(TextStream &tagFile) const
{
if (!m_impl->sectionRefs.empty())
{
- //printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionRef.size());
+ //printf("%s: writeDocAnchorsToTagFile(%d)\n",qPrint(name()),m_impl->sectionRef.size());
for (const SectionInfo *si : m_impl->sectionRefs)
{
if (!si->generated() && si->ref().isEmpty() && !si->label().startsWith("autotoc_md"))
@@ -435,7 +435,7 @@ bool DefinitionImpl::_docsAlreadyAdded(const QCString &doc,QCString &sigList)
MD5Buffer((const unsigned char *)docStr.data(),docStr.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.rawData(),33);
//printf("%s:_docsAlreadyAdded doc='%s' sig='%s' docSigs='%s'\n",
- // name().data(),doc.data(),sigStr.data(),sigList.data());
+ // qPrint(name()),qPrint(doc),qPrint(sigStr),qPrint(sigList));
if (sigList.find(sigStr)==-1) // new docs, add signature to prevent re-adding it
{
sigList+=":"+sigStr;
@@ -447,11 +447,11 @@ bool DefinitionImpl::_docsAlreadyAdded(const QCString &doc,QCString &sigList)
}
}
-void DefinitionImpl::_setDocumentation(const char *d,const char *docFile,int docLine,
+void DefinitionImpl::_setDocumentation(const QCString &d,const QCString &docFile,int docLine,
bool stripWhiteSpace,bool atTop)
{
- //printf("%s::setDocumentation(%s,%s,%d,%d)\n",name().data(),d,docFile,docLine,stripWhiteSpace);
- if (d==0) return;
+ //printf("%s::setDocumentation(%s,%s,%d,%d)\n",qPrint(name()),d,docFile,docLine,stripWhiteSpace);
+ if (d.isEmpty()) return;
QCString doc = d;
if (stripWhiteSpace)
{
@@ -463,7 +463,7 @@ void DefinitionImpl::_setDocumentation(const char *d,const char *docFile,int doc
}
if (!_docsAlreadyAdded(doc,m_impl->docSignatures))
{
- //printf("setting docs for %s: '%s'\n",name().data(),m_doc.data());
+ //printf("setting docs for %s: '%s'\n",qPrint(name()),qPrint(m_doc));
if (m_impl->details==0)
{
m_impl->details = new DocInfo;
@@ -493,13 +493,13 @@ void DefinitionImpl::_setDocumentation(const char *d,const char *docFile,int doc
}
}
-void DefinitionImpl::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace)
+void DefinitionImpl::setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace)
{
- if (d==0) return;
+ if (d.isEmpty()) return;
_setDocumentation(d,docFile,docLine,stripWhiteSpace,FALSE);
}
-void DefinitionImpl::_setBriefDescription(const char *b,const char *briefFile,int briefLine)
+void DefinitionImpl::_setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine)
{
static QCString outputLanguage = Config_getEnum(OUTPUT_LANGUAGE);
static bool needsDot = outputLanguage!="Japanese" &&
@@ -556,13 +556,13 @@ void DefinitionImpl::_setBriefDescription(const char *b,const char *briefFile,in
}
}
-void DefinitionImpl::setBriefDescription(const char *b,const char *briefFile,int briefLine)
+void DefinitionImpl::setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine)
{
- if (b==0) return;
+ if (b.isEmpty()) return;
_setBriefDescription(b,briefFile,briefLine);
}
-void DefinitionImpl::_setInbodyDocumentation(const char *doc,const char *inbodyFile,int inbodyLine)
+void DefinitionImpl::_setInbodyDocumentation(const QCString &doc,const QCString &inbodyFile,int inbodyLine)
{
if (m_impl->inbodyDocs==0)
{
@@ -580,9 +580,9 @@ void DefinitionImpl::_setInbodyDocumentation(const char *doc,const char *inbodyF
}
}
-void DefinitionImpl::setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine)
+void DefinitionImpl::setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine)
{
- if (d==0) return;
+ if (d.isEmpty()) return;
_setInbodyDocumentation(d,inbodyFile,inbodyLine);
}
@@ -729,7 +729,7 @@ static FilterCache g_filterCache;
* The line actually containing the bracket is returned via endLine.
* Note that for VHDL code the bracket search is not done.
*/
-bool readCodeFragment(const char *fileName,
+bool readCodeFragment(const QCString &fileName,
int &startLine,int &endLine,QCString &result)
{
//printf("readCodeFragment(%s,startLine=%d,endLine=%d)\n",fileName,startLine,endLine);
@@ -865,7 +865,7 @@ bool readCodeFragment(const char *fileName,
}
result = transcodeCharacterStringToUTF8(result);
if (!result.isEmpty() && result.at(result.length()-1)!='\n') result += "\n";
- //printf("readCodeFragment(%d-%d)=%s\n",startLine,endLine,result.data());
+ //printf("readCodeFragment(%d-%d)=%s\n",startLine,endLine,qPrint(result));
return found;
}
@@ -902,7 +902,7 @@ QCString DefinitionImpl::getSourceAnchor() const
}
/*! Write a reference to the source code defining this definition */
-void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
+void DefinitionImpl::writeSourceDef(OutputList &ol,const QCString &) const
{
static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE);
static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE);
@@ -940,7 +940,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.disable(OutputGenerator::RTF);
}
// write line link (HTML and optionally LaTeX, Docbook, RTF)
- ol.writeObjectLink(0,fn,anchorStr,lineStr);
+ ol.writeObjectLink(QCString(),fn,anchorStr,lineStr);
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
@@ -978,7 +978,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.disable(OutputGenerator::RTF);
}
// write file link (HTML, LaTeX optionally, RTF optionally)
- ol.writeObjectLink(0,fn,0,m_impl->body->fileDef->name());
+ ol.writeObjectLink(QCString(),fn,QCString(),m_impl->body->fileDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
@@ -1019,7 +1019,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.disable(OutputGenerator::RTF);
}
// write file link (HTML only)
- ol.writeObjectLink(0,fn,0,m_impl->body->fileDef->name());
+ ol.writeObjectLink(QCString(),fn,QCString(),m_impl->body->fileDef->name());
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
@@ -1058,7 +1058,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
ol.enable(OutputGenerator::RTF);
}
// write line link (HTML only)
- ol.writeObjectLink(0,fn,anchorStr,lineStr);
+ ol.writeObjectLink(QCString(),fn,anchorStr,lineStr);
ol.enableAll();
ol.disable(OutputGenerator::Html);
if (latexSourceCode)
@@ -1092,7 +1092,7 @@ void DefinitionImpl::writeSourceDef(OutputList &ol,const char *) const
void DefinitionImpl::setBodySegment(int defLine, int bls,int ble)
{
- //printf("setBodySegment(%d,%d) for %s\n",bls,ble,name().data());
+ //printf("setBodySegment(%d,%d) for %s\n",bls,ble,qPrint(name()));
if (m_impl->body==0) m_impl->body = new BodyInfo;
m_impl->body->defLine = defLine;
m_impl->body->startLine = bls;
@@ -1113,11 +1113,11 @@ bool DefinitionImpl::hasSources() const
}
/*! Write code of this definition into the documentation */
-void DefinitionImpl::writeInlineCode(OutputList &ol,const char *scopeName) const
+void DefinitionImpl::writeInlineCode(OutputList &ol,const QCString &scopeName) const
{
static bool inlineSources = Config_getBool(INLINE_SOURCES);
ol.pushGeneratorState();
- //printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
+ //printf("Source Fragment %s: %d-%d bodyDef=%p\n",qPrint(name()),
// m_startBodyLine,m_endBodyLine,m_bodyDef);
if (inlineSources && hasSources())
{
@@ -1128,10 +1128,10 @@ void DefinitionImpl::writeInlineCode(OutputList &ol,const char *scopeName) const
)
{
//printf("Adding code fragment '%s' ext='%s'\n",
- // codeFragment.data(),m_impl->defFileExt.data());
+ // qPrint(codeFragment),qPrint(m_impl->defFileExt));
auto intf = Doxygen::parserManager->getCodeParser(m_impl->defFileExt);
intf->resetCodeParserState();
- //printf("Read:\n'%s'\n\n",codeFragment.data());
+ //printf("Read:\n'%s'\n\n",qPrint(codeFragment));
const MemberDef *thisMd = 0;
if (m_impl->def->definitionType()==Definition::TypeMember)
{
@@ -1144,7 +1144,7 @@ void DefinitionImpl::writeInlineCode(OutputList &ol,const char *scopeName) const
codeFragment, // input
m_impl->lang, // lang
FALSE, // isExample
- 0, // exampleName
+ QCString(), // exampleName
m_impl->body->fileDef, // fileDef
actualStart, // startLine
actualEnd, // endLine
@@ -1176,7 +1176,7 @@ static inline std::vector<const MemberDef*> refMapToVector(const std::unordered_
/*! Write a reference to the source code fragments in which this
* definition is used.
*/
-void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
+void DefinitionImpl::_writeSourceRefList(OutputList &ol,const QCString &scopeName,
const QCString &text,const std::unordered_map<std::string,const MemberDef *> &membersMap,
bool /*funcOnly*/) const
{
@@ -1197,7 +1197,7 @@ void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
{
QCString scope=md->getScopeString();
QCString name=md->name();
- //printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),scope.data(),scopeName);
+ //printf("class=%p scope=%s scopeName=%s\n",md->getClassDef(),qPrint(scope),scopeName);
if (!scope.isEmpty() && scope!=scopeName)
{
name.prepend(scope+getLanguageSpecificSeparator(m_impl->lang));
@@ -1239,8 +1239,8 @@ void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
const int maxLineNrStr = 10;
char anchorStr[maxLineNrStr];
qsnprintf(anchorStr,maxLineNrStr,"l%05d",md->getStartBodyLine());
- //printf("Write object link to %s\n",md->getBodyDef()->getSourceFileBase().data());
- ol.writeObjectLink(0,md->getBodyDef()->getSourceFileBase(),anchorStr,name);
+ //printf("Write object link to %s\n",qPrint(md->getBodyDef()->getSourceFileBase()));
+ ol.writeObjectLink(QCString(),md->getBodyDef()->getSourceFileBase(),anchorStr,name);
ol.popGeneratorState();
// for the other output formats just mention the name
@@ -1324,12 +1324,12 @@ void DefinitionImpl::_writeSourceRefList(OutputList &ol,const char *scopeName,
ol.popGeneratorState();
}
-void DefinitionImpl::writeSourceReffedBy(OutputList &ol,const char *scopeName) const
+void DefinitionImpl::writeSourceReffedBy(OutputList &ol,const QCString &scopeName) const
{
_writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_impl->sourceRefByDict,FALSE);
}
-void DefinitionImpl::writeSourceRefs(OutputList &ol,const char *scopeName) const
+void DefinitionImpl::writeSourceRefs(OutputList &ol,const QCString &scopeName) const
{
_writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_impl->sourceRefsDict,TRUE);
}
@@ -1391,7 +1391,7 @@ void DefinitionImpl::addSourceReferences(const MemberDef *md)
}
}
-const Definition *DefinitionImpl::findInnerCompound(const char *) const
+const Definition *DefinitionImpl::findInnerCompound(const QCString &) const
{
return 0;
}
@@ -1411,7 +1411,7 @@ QCString DefinitionImpl::qualifiedName() const
return m_impl->qualifiedName;
}
- //printf("start %s::qualifiedName() localName=%s\n",name().data(),m_impl->localName.data());
+ //printf("start %s::qualifiedName() localName=%s\n",qPrint(name()),qPrint(m_impl->localName));
if (m_impl->outerScope==0)
{
if (m_impl->localName=="<globalScope>")
@@ -1436,14 +1436,14 @@ QCString DefinitionImpl::qualifiedName() const
getLanguageSpecificSeparator(getLanguage())+
m_impl->localName;
}
- //printf("end %s::qualifiedName()=%s\n",name().data(),m_impl->qualifiedName.data());
+ //printf("end %s::qualifiedName()=%s\n",qPrint(name()),qPrint(m_impl->qualifiedName));
//count--;
return m_impl->qualifiedName;
}
void DefinitionImpl::setOuterScope(Definition *d)
{
- //printf("%s::setOuterScope(%s)\n",name().data(),d?d->name().data():"<none>");
+ //printf("%s::setOuterScope(%s)\n",qPrint(name()),d?qPrint(d->name()):"<none>");
Definition *p = m_impl->outerScope;
bool found=false;
// make sure that we are not creating a recursive scope relation.
@@ -1489,7 +1489,7 @@ void DefinitionImpl::mergeRefItems(Definition *d)
[](RefItem *left,RefItem *right)
{ return left->id() <right->id() ||
(left->id()==right->id() &&
- qstrcmp(left->list()->listName(),right->list()->listName())<0);
+ left->list()->listName() < right->list()->listName());
});
// filter out duplicates
@@ -1501,7 +1501,7 @@ void DefinitionImpl::mergeRefItems(Definition *d)
m_impl->xrefListItems.erase(last, m_impl->xrefListItems.end());
}
-int DefinitionImpl::_getXRefListId(const char *listName) const
+int DefinitionImpl::_getXRefListId(const QCString &listName) const
{
for (const RefItem *item : m_impl->xrefListItems)
{
@@ -1529,14 +1529,14 @@ QCString DefinitionImpl::pathFragment() const
{
if (!result.isEmpty()) result+="/";
if (m_impl->def->definitionType()==Definition::TypeGroup &&
- (toGroupDef(m_impl->def))->groupTitle())
+ !toGroupDef(m_impl->def)->groupTitle().isEmpty())
{
- result+=(toGroupDef(m_impl->def))->groupTitle();
+ result+=toGroupDef(m_impl->def)->groupTitle();
}
else if (m_impl->def->definitionType()==Definition::TypePage &&
- (toPageDef(m_impl->def))->hasTitle())
+ toPageDef(m_impl->def)->hasTitle())
{
- result+=(toPageDef(m_impl->def))->title();
+ result+=toPageDef(m_impl->def)->title();
}
else
{
@@ -1565,19 +1565,22 @@ QCString DefinitionImpl::navigationPathAsString() const
{
result+=outerScope->navigationPathAsString();
}
- else if (m_impl->def->definitionType()==Definition::TypeFile && (toFileDef(m_impl->def))->getDirDef())
+ else if (m_impl->def->definitionType()==Definition::TypeFile &&
+ toFileDef(m_impl->def)->getDirDef())
{
result+=(toFileDef(m_impl->def))->getDirDef()->navigationPathAsString();
}
result+="<li class=\"navelem\">";
if (m_impl->def->isLinkable())
{
- if (m_impl->def->definitionType()==Definition::TypeGroup && (toGroupDef(m_impl->def))->groupTitle())
+ if (m_impl->def->definitionType()==Definition::TypeGroup &&
+ !toGroupDef(m_impl->def)->groupTitle().isEmpty())
{
result+="<a class=\"el\" href=\"$relpath^"+m_impl->def->getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
- convertToHtml((toGroupDef(m_impl->def))->groupTitle())+"</a>";
+ convertToHtml(toGroupDef(m_impl->def)->groupTitle())+"</a>";
}
- else if (m_impl->def->definitionType()==Definition::TypePage && (toPageDef(m_impl->def))->hasTitle())
+ else if (m_impl->def->definitionType()==Definition::TypePage &&
+ toPageDef(m_impl->def)->hasTitle())
{
result+="<a class=\"el\" href=\"$relpath^"+m_impl->def->getOutputFileBase()+Doxygen::htmlFileExtension+"\">"+
convertToHtml((toPageDef(m_impl->def))->title())+"</a>";
@@ -1647,7 +1650,7 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
SectionType type = si->type();
if (isSection(type))
{
- //printf(" level=%d title=%s\n",level,si->title.data());
+ //printf(" level=%d title=%s\n",level,qPrint(si->title));
int nextLevel = (int)type;
if (nextLevel>level)
{
@@ -1713,7 +1716,7 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
SectionType type = si->type();
if (isSection(type))
{
- //printf(" level=%d title=%s\n",level,si->title.data());
+ //printf(" level=%d title=%s\n",level,qPrint(si->title));
int nextLevel = (int)type;
if (nextLevel>level)
{
@@ -1810,7 +1813,7 @@ static bool stripWord(QCString &s,QCString w)
//----------------------------------------------------------------------------
// some quasi intelligent brief description abbreviator :^)
-QCString abbreviate(const char *s,const char *name)
+static QCString abbreviate(const QCString &s,const QCString &name)
{
QCString scopelessName=name;
int i=scopelessName.findRev("::");
@@ -1845,7 +1848,7 @@ QCString abbreviate(const char *s,const char *name)
QCString DefinitionImpl::briefDescription(bool abbr) const
{
- //printf("%s::briefDescription(%d)='%s'\n",name().data(),abbr,m_impl->brief?m_impl->brief->doc.data():"<none>");
+ //printf("%s::briefDescription(%d)='%s'\n",qPrint(name()),abbr,m_impl->brief?qPrint(m_impl->brief->doc):"<none>");
return m_impl->brief ?
(abbr ? abbreviate(m_impl->brief->doc,m_impl->def->displayName()) : m_impl->brief->doc) :
QCString("");
@@ -2019,7 +2022,7 @@ void DefinitionImpl::mergeReferencedBy(const Definition *other)
}
-void DefinitionImpl::setReference(const char *r)
+void DefinitionImpl::setReference(const QCString &r)
{
m_impl->ref=r;
}
@@ -2039,7 +2042,7 @@ void DefinitionImpl::setArtificial(bool b)
m_impl->isArtificial = b;
}
-void DefinitionImpl::setLocalName(const QCString name)
+void DefinitionImpl::setLocalName(const QCString &name)
{
m_impl->localName=name;
}
@@ -2074,7 +2077,7 @@ QCString DefinitionImpl::externalReference(const QCString &relPath) const
auto it = Doxygen::tagDestinationMap.find(ref.str());
if (it!=Doxygen::tagDestinationMap.end())
{
- QCString result = it->second;
+ QCString result(it->second);
uint l = result.length();
if (!relPath.isEmpty() && l>0 && result.at(0)=='.')
{ // relative path -> prepend relPath.
@@ -2151,7 +2154,7 @@ void DefinitionAliasImpl::deinit()
QCString DefinitionAliasImpl::qualifiedName() const
{
- //printf("start %s::qualifiedName() localName=%s\n",name().data(),m_impl->localName.data());
+ //printf("start %s::qualifiedName() localName=%s\n",qPrint(name()),qPrint(m_impl->localName));
if (m_scope==0)
{
return m_def->localName();
diff --git a/src/definition.h b/src/definition.h
index 66d7628..6a1edfa 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -264,7 +264,7 @@ class Definition
virtual const RefItemVector &xrefListItems() const = 0;
- virtual const Definition *findInnerCompound(const char *name) const = 0;
+ virtual const Definition *findInnerCompound(const QCString &name) const = 0;
virtual Definition *getOuterScope() const = 0;
virtual std::vector<const MemberDef *> getReferencesMembers() const = 0;
@@ -317,30 +317,30 @@ class DefinitionMutable
//-----------------------------------------------------------------------------------
/*! Sets a new \a name for the definition */
- virtual void setName(const char *name) = 0;
+ virtual void setName(const QCString &name) = 0;
/*! Sets a unique id for the symbol. Used for libclang integration. */
- virtual void setId(const char *name) = 0;
+ virtual void setId(const QCString &name) = 0;
/*! Set a new file name and position */
virtual void setDefFile(const QCString& df,int defLine,int defColumn) = 0;
/*! Sets the documentation of this definition to \a d. */
- virtual void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE) = 0;
+ virtual void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE) = 0;
/*! Sets the brief description of this definition to \a b.
* A dot is added to the sentence if not available.
*/
- virtual void setBriefDescription(const char *b,const char *briefFile,int briefLine) = 0;
+ virtual void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine) = 0;
/*! Set the documentation that was found inside the body of an item.
* If there was already some documentation set, the new documentation
* will be appended.
*/
- virtual void setInbodyDocumentation(const char *d,const char *docFile,int docLine) = 0;
+ virtual void setInbodyDocumentation(const QCString &d,const QCString &docFile,int docLine) = 0;
/*! Sets the tag file id via which this definition was imported. */
- virtual void setReference(const char *r) = 0;
+ virtual void setReference(const QCString &r) = 0;
// source references
virtual void setBodySegment(int defLine, int bls,int ble) = 0;
@@ -353,7 +353,7 @@ class DefinitionMutable
virtual void setArtificial(bool b) = 0;
virtual void setLanguage(SrcLangExt lang) = 0;
- virtual void setLocalName(const QCString name) = 0;
+ virtual void setLocalName(const QCString &name) = 0;
//-----------------------------------------------------------------------------------
// --- actions ----
@@ -377,10 +377,10 @@ class DefinitionMutable
//-----------------------------------------------------------------------------------
// --- writing output ----
//-----------------------------------------------------------------------------------
- virtual void writeSourceDef(OutputList &ol,const char *scopeName) const = 0;
- virtual void writeInlineCode(OutputList &ol,const char *scopeName) const = 0;
- virtual void writeSourceRefs(OutputList &ol,const char *scopeName) const = 0;
- virtual void writeSourceReffedBy(OutputList &ol,const char *scopeName) const = 0;
+ virtual void writeSourceDef(OutputList &ol,const QCString &scopeName) const = 0;
+ virtual void writeInlineCode(OutputList &ol,const QCString &scopeName) const = 0;
+ virtual void writeSourceRefs(OutputList &ol,const QCString &scopeName) const = 0;
+ virtual void writeSourceReffedBy(OutputList &ol,const QCString &scopeName) const = 0;
virtual void writeNavigationPath(OutputList &ol) const = 0;
virtual void writeQuickMemberLinks(OutputList &,const MemberDef *) const = 0;
virtual void writeSummaryLinks(OutputList &) const = 0;
@@ -404,7 +404,7 @@ DefinitionMutable *toDefinitionMutable(const Definition *d);
* via \a result. The function returns TRUE if successful and FALSE
* in case of an error.
*/
-bool readCodeFragment(const char *fileName,
+bool readCodeFragment(const QCString &fileName,
int &startLine,int &endLine,
QCString &result);
#endif
diff --git a/src/definitionimpl.h b/src/definitionimpl.h
index 2bc6127..aeb3f8d 100644
--- a/src/definitionimpl.h
+++ b/src/definitionimpl.h
@@ -28,8 +28,8 @@ class DefinitionImpl
public:
DefinitionImpl(
Definition *def,
- const char *defFileName,int defLine,int defColumn,
- const char *name,const char *b=0,const char *d=0,
+ const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const char *b=0,const char *d=0,
bool isSymbol=TRUE);
virtual ~DefinitionImpl();
@@ -71,7 +71,7 @@ class DefinitionImpl
const GroupList &partOfGroups() const;
bool isLinkableViaGroup() const;
const RefItemVector &xrefListItems() const;
- const Definition *findInnerCompound(const char *name) const;
+ const Definition *findInnerCompound(const QCString &name) const;
Definition *getOuterScope() const;
std::vector<const MemberDef *> getReferencesMembers() const;
std::vector<const MemberDef *> getReferencedByMembers() const;
@@ -80,13 +80,13 @@ class DefinitionImpl
bool hasBriefDescription() const;
QCString id() const;
const SectionRefs &getSectionRefs() const;
- void setName(const char *name);
- void setId(const char *name);
+ void setName(const QCString &name);
+ void setId(const QCString &name);
void setDefFile(const QCString& df,int defLine,int defColumn);
- void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
- void setBriefDescription(const char *b,const char *briefFile,int briefLine);
- void setInbodyDocumentation(const char *d,const char *docFile,int docLine);
- void setReference(const char *r);
+ void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE);
+ void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine);
+ void setInbodyDocumentation(const QCString &d,const QCString &docFile,int docLine);
+ void setReference(const QCString &r);
void addSectionsToDefinition(const std::vector<const SectionInfo*> &anchorList);
void setBodySegment(int defLine,int bls,int ble);
void setBodyDef(FileDef *fd);
@@ -101,10 +101,10 @@ class DefinitionImpl
void setHidden(bool b);
void setArtificial(bool b);
void setLanguage(SrcLangExt lang);
- void writeSourceDef(OutputList &ol,const char *scopeName) const;
- void writeInlineCode(OutputList &ol,const char *scopeName) const;
- void writeSourceRefs(OutputList &ol,const char *scopeName) const;
- void writeSourceReffedBy(OutputList &ol,const char *scopeName) const;
+ void writeSourceDef(OutputList &ol,const QCString &scopeName) const;
+ void writeInlineCode(OutputList &ol,const QCString &scopeName) const;
+ void writeSourceRefs(OutputList &ol,const QCString &scopeName) const;
+ void writeSourceReffedBy(OutputList &ol,const QCString &scopeName) const;
void makePartOfGroup(const GroupDef *gd);
void writeNavigationPath(OutputList &ol) const;
QCString navigationPathAsString() const;
@@ -112,7 +112,7 @@ class DefinitionImpl
void writeSummaryLinks(OutputList &) const;
QCString pathFragment() const;
void writeDocAnchorsToTagFile(TextStream &) const;
- void setLocalName(const QCString name);
+ void setLocalName(const QCString &name);
void addSectionsToIndex();
void writeToc(OutputList &ol, const LocalToc &lt) const;
void setCookie(Definition::Cookie *cookie) const;
@@ -125,12 +125,12 @@ class DefinitionImpl
private:
- int _getXRefListId(const char *listName) const;
- void _writeSourceRefList(OutputList &ol,const char *scopeName,const QCString &text,
+ int _getXRefListId(const QCString &listName) const;
+ void _writeSourceRefList(OutputList &ol,const QCString &scopeName,const QCString &text,
const std::unordered_map<std::string,const MemberDef *> &members,bool) const;
- void _setBriefDescription(const char *b,const char *briefFile,int briefLine);
- void _setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace,bool atTop);
- void _setInbodyDocumentation(const char *d,const char *docFile,int docLine);
+ void _setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine);
+ void _setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace,bool atTop);
+ void _setInbodyDocumentation(const QCString &d,const QCString &docFile,int docLine);
bool _docsAlreadyAdded(const QCString &doc,QCString &sigList);
// PIMPL idiom
@@ -144,8 +144,8 @@ class DefinitionMixin : public Base
public:
/*! Create a new definition */
DefinitionMixin(
- const char *defFileName,int defLine,int defColumn,
- const char *name,const char *b=0,const char *d=0,
+ const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const char *b=0,const char *d=0,
bool isSymbol=TRUE) : m_impl(this,defFileName,defLine,defColumn,name,b,d,isSymbol) {}
virtual ~DefinitionMixin() {}
@@ -190,7 +190,7 @@ class DefinitionMixin : public Base
virtual const GroupList &partOfGroups() const { return m_impl.partOfGroups(); }
virtual bool isLinkableViaGroup() const { return m_impl.isLinkableViaGroup(); }
virtual const RefItemVector &xrefListItems() const { return m_impl.xrefListItems(); }
- virtual const Definition *findInnerCompound(const char *name) const { return m_impl.findInnerCompound(name); }
+ virtual const Definition *findInnerCompound(const QCString &name) const { return m_impl.findInnerCompound(name); }
virtual Definition *getOuterScope() const { return m_impl.getOuterScope(); }
virtual std::vector<const MemberDef *> getReferencesMembers() const { return m_impl.getReferencesMembers(); }
virtual std::vector<const MemberDef *> getReferencedByMembers() const { return m_impl.getReferencedByMembers(); }
@@ -201,17 +201,17 @@ class DefinitionMixin : public Base
virtual const SectionRefs &getSectionRefs() const { return m_impl.getSectionRefs(); }
//======== DefinitionMutable
- virtual void setName(const char *name) { m_impl.setName(name); }
- virtual void setId(const char *name) { m_impl.setId(name); }
+ virtual void setName(const QCString &name) { m_impl.setName(name); }
+ virtual void setId(const QCString &name) { m_impl.setId(name); }
virtual void setDefFile(const QCString& df,int defLine,int defColumn)
{ m_impl.setDefFile(df,defLine,defColumn); }
- virtual void setDocumentation(const char *doc,const char *docFile,int docLine,bool stripWhiteSpace=TRUE)
+ virtual void setDocumentation(const QCString &doc,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE)
{ m_impl.setDocumentation(doc,docFile,docLine,stripWhiteSpace); }
- virtual void setBriefDescription(const char *brief,const char *briefFile,int briefLine)
+ virtual void setBriefDescription(const QCString &brief,const QCString &briefFile,int briefLine)
{ m_impl.setBriefDescription(brief,briefFile,briefLine); }
- virtual void setInbodyDocumentation(const char *doc,const char *docFile,int docLine)
+ virtual void setInbodyDocumentation(const QCString &doc,const QCString &docFile,int docLine)
{ m_impl.setInbodyDocumentation(doc,docFile,docLine); }
- virtual void setReference(const char *r)
+ virtual void setReference(const QCString &r)
{ m_impl.setReference(r); }
virtual void addSectionsToDefinition(const std::vector<const SectionInfo*> &anchorList)
{ m_impl.addSectionsToDefinition(anchorList); }
@@ -241,13 +241,13 @@ class DefinitionMixin : public Base
{ m_impl.setArtificial(b); }
virtual void setLanguage(SrcLangExt lang)
{ m_impl.setLanguage(lang); }
- virtual void writeSourceDef(OutputList &ol,const char *scopeName) const
+ virtual void writeSourceDef(OutputList &ol,const QCString &scopeName) const
{ m_impl.writeSourceDef(ol,scopeName); }
- virtual void writeInlineCode(OutputList &ol,const char *scopeName) const
+ virtual void writeInlineCode(OutputList &ol,const QCString &scopeName) const
{ m_impl.writeInlineCode(ol,scopeName); }
- virtual void writeSourceRefs(OutputList &ol,const char *scopeName) const
+ virtual void writeSourceRefs(OutputList &ol,const QCString &scopeName) const
{ m_impl.writeSourceRefs(ol,scopeName); }
- virtual void writeSourceReffedBy(OutputList &ol,const char *scopeName) const
+ virtual void writeSourceReffedBy(OutputList &ol,const QCString &scopeName) const
{ m_impl.writeSourceReffedBy(ol,scopeName); }
virtual void makePartOfGroup(const GroupDef *gd)
{ m_impl.makePartOfGroup(gd); }
@@ -263,7 +263,7 @@ class DefinitionMixin : public Base
{ return m_impl.pathFragment(); }
virtual void writeDocAnchorsToTagFile(TextStream &fs) const
{ m_impl.writeDocAnchorsToTagFile(fs); }
- virtual void setLocalName(const QCString name)
+ virtual void setLocalName(const QCString &name)
{ m_impl.setLocalName(name); }
virtual void addSectionsToIndex()
{ m_impl.addSectionsToIndex(); }
@@ -399,7 +399,7 @@ class DefinitionAliasMixin : public Base
{ return m_alias->isLinkableViaGroup(); }
virtual const RefItemVector &xrefListItems() const
{ return m_alias->xrefListItems(); }
- virtual const Definition *findInnerCompound(const char *name) const
+ virtual const Definition *findInnerCompound(const QCString &name) const
{ return m_alias->findInnerCompound(name); }
virtual Definition *getOuterScope() const
{ return const_cast<Definition*>(m_scope); }
diff --git a/src/dia.cpp b/src/dia.cpp
index 11c5270..13c1316 100644
--- a/src/dia.cpp
+++ b/src/dia.cpp
@@ -23,8 +23,8 @@
static const int maxCmdLine = 40960;
-void writeDiaGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,DiaOutputFormat format)
+void writeDiaGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,DiaOutputFormat format)
{
QCString absOutFile = outDir;
absOutFile+=Portable::pathSeparator();
@@ -33,7 +33,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
// chdir to the output dir, so dot can find the font file.
std::string oldDir = Dir::currentDirPath();
// go to the html output directory (i.e. path)
- Dir::setCurrent(outDir);
+ Dir::setCurrent(outDir.str());
//printf("Going to dir %s\n",Dir::currentDirPath().c_str());
QCString diaExe = Config_getString(DIA_PATH)+"dia"+Portable::commandExtension();
QCString diaArgs;
@@ -59,12 +59,12 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
diaArgs+="\"";
int exitCode;
- //printf("*** running: %s %s outDir:%s %s\n",diaExe.data(),diaArgs.data(),outDir,outFile);
+ //printf("*** running: %s %s outDir:%s %s\n",qPrint(diaExe),qPrint(diaArgs),outDir,outFile);
Portable::sysTimerStart();
if ((exitCode=Portable::system(diaExe,diaArgs,FALSE))!=0)
{
err("Problems running %s. Check your installation or look typos in you dia file %s\n",
- diaExe.data(),inFile);
+ qPrint(diaExe),qPrint(inFile));
Portable::sysTimerStop();
goto error;
}
@@ -73,7 +73,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
{
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
- outFile,outFile);
+ qPrint(outFile),qPrint(outFile));
Portable::sysTimerStart();
if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
diff --git a/src/dia.h b/src/dia.h
index 2963ce0..bd0a378 100644
--- a/src/dia.h
+++ b/src/dia.h
@@ -22,8 +22,8 @@ class QCString;
enum DiaOutputFormat { DIA_BITMAP , DIA_EPS };
-void writeDiaGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,DiaOutputFormat format);
+void writeDiaGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,DiaOutputFormat format);
#endif
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 2581b40..0f20636 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -41,7 +41,7 @@ class DiagramItem
{
public:
DiagramItem(DiagramItem *p,uint number,const ClassDef *cd,
- Protection prot,Specifier virt,const char *ts);
+ Protection prot,Specifier virt,const QCString &ts);
QCString label() const;
QCString fileName() const;
DiagramItem *parentItem() { return m_parent; }
@@ -81,7 +81,7 @@ class DiagramRow
using reverse_iterator = typename Vec::reverse_iterator;
DiagramRow(TreeDiagram *d,uint l) : m_diagram(d), m_level(l) {}
void insertClass(DiagramItem *parent,const ClassDef *cd,bool doBases,
- Protection prot,Specifier virt,const char *ts);
+ Protection prot,Specifier virt,const QCString &ts);
uint number() { return m_level; }
DiagramItem *item(int index) { return m_items.at(index).get(); }
@@ -177,7 +177,7 @@ static QCString protToString(Protection p)
case Protected: return "dashed";
case Private: return "dotted";
}
- return 0;
+ return QCString();
}
static uint virtToMask(Specifier p)
@@ -274,7 +274,7 @@ static void writeMapArea(TextStream &t,const ClassDef *cd,QCString relPath,
//-----------------------------------------------------------------------------
DiagramItem::DiagramItem(DiagramItem *p,uint number,const ClassDef *cd,
- Protection pr,Specifier vi,const char *ts)
+ Protection pr,Specifier vi,const QCString &ts)
: m_parent(p), m_num(number), m_prot(pr), m_virt(vi), m_templSpec(ts), m_classDef(cd)
{
}
@@ -333,7 +333,7 @@ void DiagramItem::addChild(DiagramItem *di)
//---------------------------------------------------------------------------
void DiagramRow::insertClass(DiagramItem *parent,const ClassDef *cd,bool doBases,
- Protection prot,Specifier virt,const char *ts)
+ Protection prot,Specifier virt,const QCString &ts)
{
auto di = std::make_unique<DiagramItem>(parent, m_diagram->row(m_level)->numItems(),
cd,prot,virt,ts);
@@ -366,7 +366,7 @@ void DiagramRow::insertClass(DiagramItem *parent,const ClassDef *cd,bool doBases
{
row->insertClass(di_ptr,ccd,doBases,bcd.prot,
doBases?bcd.virt:Normal,
- doBases?bcd.templSpecifiers.data():"");
+ doBases?bcd.templSpecifiers:QCString());
}
}
}
@@ -379,7 +379,7 @@ TreeDiagram::TreeDiagram(const ClassDef *root,bool doBases)
auto row = std::make_unique<DiagramRow>(this,0);
DiagramRow *row_ptr = row.get();
m_rows.push_back(std::move(row));
- row_ptr->insertClass(0,root,doBases,Public,Normal,0);
+ row_ptr->insertClass(0,root,doBases,Public,Normal,QCString());
}
void TreeDiagram::moveChildren(DiagramItem *root,int dx)
@@ -394,7 +394,7 @@ void TreeDiagram::moveChildren(DiagramItem *root,int dx)
bool TreeDiagram::layoutTree(DiagramItem *root,uint r)
{
bool moved=FALSE;
- //printf("layoutTree(%s,%d)\n",root->label().data(),r);
+ //printf("layoutTree(%s,%d)\n",qPrint(root->label()),r);
if (root->numChildren()>0)
{
@@ -1044,8 +1044,8 @@ ClassDiagram::~ClassDiagram()
{
}
-void ClassDiagram::writeFigure(TextStream &output,const char *path,
- const char *fileName) const
+void ClassDiagram::writeFigure(TextStream &output,const QCString &path,
+ const QCString &fileName) const
{
uint baseRows=p->base.computeRows();
uint superRows=p->super.computeRows();
@@ -1090,7 +1090,7 @@ void ClassDiagram::writeFigure(TextStream &output,const char *path,
std::ofstream f(epsName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- term("Could not open file %s for writing\n",epsName.data());
+ term("Could not open file %s for writing\n",qPrint(epsName));
}
else
{
@@ -1326,8 +1326,8 @@ void ClassDiagram::writeFigure(TextStream &output,const char *path,
{
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
- epsBaseName.data(),epsBaseName.data());
- //printf("Converting eps using '%s'\n",epstopdfArgs.data());
+ qPrint(epsBaseName),qPrint(epsBaseName));
+ //printf("Converting eps using '%s'\n",qPrint(epstopdfArgs));
Portable::sysTimerStart();
if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
@@ -1340,8 +1340,8 @@ void ClassDiagram::writeFigure(TextStream &output,const char *path,
}
-void ClassDiagram::writeImage(TextStream &t,const char *path,
- const char *relPath,const char *fileName,
+void ClassDiagram::writeImage(TextStream &t,const QCString &path,
+ const QCString &relPath,const QCString &fileName,
bool generateMap) const
{
uint baseRows=p->base.computeRows();
diff --git a/src/diagram.h b/src/diagram.h
index 2cfb579..e2544e0 100644
--- a/src/diagram.h
+++ b/src/diagram.h
@@ -20,6 +20,7 @@
#define DIAGRAM_H
#include <memory>
+#include "qcstring.h"
class ClassDef;
class TextStream;
@@ -30,10 +31,10 @@ class ClassDiagram
public:
ClassDiagram(const ClassDef *root);
~ClassDiagram();
- void writeFigure(TextStream &t,const char *path,
- const char *file) const;
- void writeImage(TextStream &t,const char *path,const char *relPath,
- const char *file,bool generateMap=true) const;
+ void writeFigure(TextStream &t,const QCString &path,
+ const QCString &file) const;
+ void writeImage(TextStream &t,const QCString &path,const QCString &relPath,
+ const QCString &file,bool generateMap=true) const;
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index 39a5cb1..72681d9 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -37,7 +37,7 @@
class DirDefImpl : public DefinitionMixin<DirDef>
{
public:
- DirDefImpl(const char *path);
+ DirDefImpl(const QCString &path);
virtual ~DirDefImpl();
virtual DefType definitionType() const { return TypeDir; }
@@ -83,7 +83,7 @@ class DirDefImpl : public DefinitionMixin<DirDef>
void startMemberDeclarations(OutputList &ol);
void endMemberDeclarations(OutputList &ol);
- static DirDef *createNewDir(const char *path);
+ static DirDef *createNewDir(const QCString &path);
static bool matchPath(const QCString &path,const StringVector &l);
DirList m_subdirs;
@@ -97,7 +97,7 @@ class DirDefImpl : public DefinitionMixin<DirDef>
UsedDirLinkedMap m_usedDirs;
};
-DirDef *createDirDef(const char *path)
+DirDef *createDirDef(const QCString &path)
{
return new DirDefImpl(path);
}
@@ -108,7 +108,7 @@ DirDef *createDirDef(const char *path)
static int g_dirCount=0;
-DirDefImpl::DirDefImpl(const char *path) : DefinitionMixin(path,1,1,path)
+DirDefImpl::DirDefImpl(const QCString &path) : DefinitionMixin(path,1,1,path)
{
bool fullPathNames = Config_getBool(FULL_PATH_NAMES);
// get display name (stripping the paths mentioned in STRIP_FROM_PATH)
@@ -209,7 +209,7 @@ static QCString encodeDirName(const QCString &anchor)
QCString DirDefImpl::getOutputFileBase() const
{
//printf("DirDefImpl::getOutputFileBase() %s->dir_%s\n",
- // m_diskName.data(),encodeDirName(m_diskName).data());
+ // qPrint(m_diskName),qPrint(encodeDirName(m_diskName)));
return "dir_"+encodeDirName(m_diskName);
}
@@ -224,7 +224,7 @@ void DirDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.popGeneratorState();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
ol.startGroupHeader();
ol.parseText(title);
@@ -234,7 +234,7 @@ void DirDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// separator between brief and details
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
@@ -255,7 +255,7 @@ void DirDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
}
}
@@ -266,7 +266,7 @@ void DirDefImpl::writeBriefDescription(OutputList &ol)
{
DocRoot *rootNode = validatingParseDoc(
briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
@@ -285,7 +285,7 @@ void DirDefImpl::writeBriefDescription(OutputList &ol)
)
{
ol.disableAllBut(OutputGenerator::Html);
- ol.startTextLink(0,"details");
+ ol.startTextLink(QCString(),"details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
}
@@ -306,7 +306,7 @@ void DirDefImpl::writeDirectoryGraph(OutputList &ol)
DotDirDeps dirDep(this);
if (!dirDep.isTrivial())
{
- msg("Generating dependency graph for directory %s\n",displayName().data());
+ msg("Generating dependency graph for directory %s\n",qPrint(displayName()));
ol.disable(OutputGenerator::Man);
//ol.startParagraph();
ol.startDirDepGraph();
@@ -344,7 +344,7 @@ void DirDefImpl::writeSubDirList(OutputList &ol)
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE)+" ");
ol.insertMemberAlign();
- ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
+ ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),QCString(),dd->shortName());
ol.endMemberItem();
if (!dd->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
{
@@ -352,14 +352,14 @@ void DirDefImpl::writeSubDirList(OutputList &ol)
ol.generateDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),
FALSE, // indexWords
FALSE, // isExample
- 0, // exampleName
+ QCString(), // exampleName
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
);
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
}
@@ -395,7 +395,7 @@ void DirDefImpl::writeFileList(OutputList &ol)
ol.insertMemberAlign();
if (fd->isLinkable())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->name());
}
else
{
@@ -408,7 +408,7 @@ void DirDefImpl::writeFileList(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.docify(" ");
- ol.startTextLink(fd->includeName(),0);
+ ol.startTextLink(fd->includeName(),QCString());
ol.docify("[");
ol.parseText(theTranslator->trCode());
ol.docify("]");
@@ -422,14 +422,14 @@ void DirDefImpl::writeFileList(OutputList &ol)
ol.generateDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),
FALSE, // indexWords
FALSE, // isExample
- 0, // exampleName
+ QCString(), // exampleName
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
);
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
}
ol.endMemberList();
@@ -635,10 +635,10 @@ void DirDefImpl::addUsesDependency(const DirDef *dir,const FileDef *srcFd,
if (this==dir) return; // do not add self-dependencies
//static int count=0;
//printf(" %d add dependency %s->%s due to %s->%s\n",
- // count++,shortName().data(),
- // dir->shortName().data(),
- // srcFd->name().data(),
- // dstFd->name().data());
+ // count++,qPrint(shortName()),
+ // qPrint(dir->shortName()),
+ // qPrint(srcFd->name()),
+ // qPrint(dstFd->name()));
// levels match => add direct dependency
bool added=FALSE;
@@ -686,12 +686,12 @@ void DirDefImpl::computeDependencies()
{
for (const auto &fd : m_fileList)
{
- //printf(" File %s\n",fd->name().data());
- //printf("** dir=%s file=%s\n",shortName().data(),fd->name().data());
+ //printf(" File %s\n",qPrint(fd->name()));
+ //printf("** dir=%s file=%s\n",qPrint(shortName()),qPrint(fd->name()));
for (const auto &ii : fd->includeFileList())
{
- //printf(" > %s\n",ii->includeName.data());
- //printf(" #include %s\n",ii->includeName.data());
+ //printf(" > %s\n",qPrint(ii->includeName));
+ //printf(" #include %s\n",qPrint(ii->includeName));
if (ii.fileDef && ii.fileDef->isLinkable()) // linkable file
{
DirDef *usedDir = ii.fileDef->getDirDef();
@@ -699,7 +699,7 @@ void DirDefImpl::computeDependencies()
{
// add dependency: thisDir->usedDir
//static int count=0;
- //printf(" %d: add dependency %s->%s\n",count++,name().data(),usedDir->name().data());
+ //printf(" %d: add dependency %s->%s\n",count++,qPrint(name()),qPrint(usedDir->name()));
addUsesDependency(usedDir,fd,ii.fileDef,FALSE);
}
}
@@ -761,12 +761,12 @@ void UsedDir::sort()
});
}
-FilePair *UsedDir::findFilePair(const char *name)
+FilePair *UsedDir::findFilePair(const QCString &name)
{
return m_filePairs.find(name);
}
-DirDef *DirDefImpl::createNewDir(const char *path)
+DirDef *DirDefImpl::createNewDir(const QCString &path)
{
ASSERT(path!=0);
DirDef *dir = Doxygen::dirLinkedMap->find(path);
@@ -776,7 +776,7 @@ DirDef *DirDefImpl::createNewDir(const char *path)
std::unique_ptr<DirDef>(
createDirDef(path)));
//printf("Adding new dir %s\n",path);
- //printf("createNewDir %s short=%s\n",path,dir->shortName().data());
+ //printf("createNewDir %s short=%s\n",path,qPrint(dir->shortName()));
}
return dir;
}
@@ -799,7 +799,7 @@ bool DirDefImpl::matchPath(const QCString &path,const StringVector &l)
*/
DirDef *DirDefImpl::mergeDirectoryInTree(const QCString &path)
{
- //printf("DirDefImpl::mergeDirectoryInTree(%s)\n",path.data());
+ //printf("DirDefImpl::mergeDirectoryInTree(%s)\n",qPrint(path));
int p=0,i=0;
DirDef *dir=0;
while ((i=path.find('/',p))!=-1)
@@ -830,7 +830,7 @@ static void writePartialDirPath(OutputList &ol,const DirDef *root,const DirDef *
writePartialDirPath(ol,root,target->parent());
ol.writeString("&#160;/&#160;");
}
- ol.writeObjectLink(target->getReference(),target->getOutputFileBase(),0,target->shortName());
+ ol.writeObjectLink(target->getReference(),target->getOutputFileBase(),QCString(),target->shortName());
}
static void writePartialFilePath(OutputList &ol,const DirDef *root,const FileDef *fd)
@@ -842,7 +842,7 @@ static void writePartialFilePath(OutputList &ol,const DirDef *root,const FileDef
}
if (fd->isLinkable())
{
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->name());
}
else
{
@@ -859,11 +859,9 @@ void DirRelation::writeDocumentation(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
QCString shortTitle=theTranslator->trDirRelation(
- m_src->shortName()+" &rarr; "+
- m_dst->dir()->shortName());
+ (m_src->shortName()+" &rarr; "+m_dst->dir()->shortName()));
QCString title=theTranslator->trDirRelation(
- m_src->displayName()+" -> "+
- m_dst->dir()->shortName());
+ (m_src->displayName()+" -> "+m_dst->dir()->shortName()));
startFile(ol,getOutputFileBase(),getOutputFileBase(),
title,HLI_None,!generateTreeView,m_src->getOutputFileBase());
@@ -938,7 +936,7 @@ static void computeCommonDirPrefix()
QCString dirName = dir->name();
if (dirName.length()>path.length())
{
- if (qstrncmp(dirName,path,l)!=0) // dirName does not start with path
+ if (dirName.left(l)!=path) // dirName does not start with path
{
i=path.findRev('/',(int)l-2);
if (i==-1) // no unique prefix -> stop
@@ -983,7 +981,7 @@ static void computeCommonDirPrefix()
{
QCString diskName = dir->name().right(dir->name().length()-path.length());
dir->setDiskName(diskName);
- //printf("set disk name: %s -> %s\n",dir->name().data(),diskName.data());
+ //printf("set disk name: %s -> %s\n",qPrint(dir->name()),qPrint(diskName));
}
}
@@ -994,7 +992,7 @@ void buildDirectories()
{
for (const auto &fd : *fn)
{
- //printf("buildDirectories %s\n",fd->name().data());
+ //printf("buildDirectories %s\n",qPrint(fd->name()));
if (fd->getReference().isEmpty())
{
DirDef *dir;
@@ -1024,7 +1022,7 @@ void buildDirectories()
{
parent->addSubDir(dir.get());
//printf("DirDefImpl::addSubdir(): Adding subdir\n%s to\n%s\n",
- // dir->displayName().data(), parent->displayName().data());
+ // qPrint(dir->displayName()), qPrint(parent->displayName()));
}
}
}
@@ -1054,7 +1052,7 @@ void computeDirDependencies()
// compute uses dependencies between directories
for (const auto &dir : *Doxygen::dirLinkedMap)
{
- //printf("computeDependencies for %s: #dirs=%d\n",dir->name().data(),Doxygen::directories.count());
+ //printf("computeDependencies for %s: #dirs=%d\n",qPrint(dir->name()),Doxygen::directories.count());
dir->computeDependencies();
}
diff --git a/src/dirdef.h b/src/dirdef.h
index 39c0c15..3d775d0 100644
--- a/src/dirdef.h
+++ b/src/dirdef.h
@@ -66,7 +66,7 @@ class UsedDir
UsedDir(const DirDef *dir,bool inherited);
virtual ~UsedDir();
void addFileDep(const FileDef *srcFd,const FileDef *dstFd);
- FilePair *findFilePair(const char *name);
+ FilePair *findFilePair(const QCString &name);
const FilePairLinkedMap &filePairs() const { return m_filePairs; }
const DirDef *dir() const { return m_dir; }
bool inherited() const { return m_inherited; }
@@ -164,6 +164,5 @@ class DirRelationLinkedMap : public LinkedMap<DirRelation>
void buildDirectories();
void generateDirDocs(OutputList &ol);
void computeDirDependencies();
-void writeDirDependencyGraph(const char *file);
#endif
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
index 1c03c07..ab2fb84 100644
--- a/src/docbookgen.cpp
+++ b/src/docbookgen.cpp
@@ -71,13 +71,15 @@
#endif
//------------------
-inline void writeDocbookString(TextStream &t,const char *s)
+inline void writeDocbookString(TextStream &t,const QCString &s)
{
t << convertToDocBook(s);
}
-inline void writeDocbookCodeString(TextStream &t,const char *s, int &col)
+inline void writeDocbookCodeString(TextStream &t,const QCString &str, int &col)
{
+ if (str.isEmpty()) return;
+ const char *s = str.data();
char c;
while ((c=*s++))
{
@@ -129,11 +131,11 @@ static void addIndexTerm(TextStream &t, QCString prim, QCString sec = "")
}
t << "</indexterm>\n";
}
-void writeDocbookLink(TextStream &t,const char * /*extRef*/,const char *compoundId,
- const char *anchorId,const char * text,const char * /*tooltip*/)
+void writeDocbookLink(TextStream &t,const QCString & /*extRef*/,const QCString &compoundId,
+ const QCString &anchorId,const QCString & text,const QCString & /*tooltip*/)
{
t << "<link linkend=\"_" << stripPath(compoundId);
- if (anchorId) t << "_1" << anchorId;
+ if (!anchorId.isEmpty()) t << "_1" << anchorId;
t << "\"";
t << ">";
writeDocbookString(t,text);
@@ -147,42 +149,47 @@ DocbookCodeGenerator::DocbookCodeGenerator(TextStream &t) : m_t(t)
DocbookCodeGenerator::~DocbookCodeGenerator() {}
-void DocbookCodeGenerator::codify(const char *text)
+void DocbookCodeGenerator::codify(const QCString &text)
{
Docbook_DB(("(codify \"%s\")\n",text));
writeDocbookCodeString(m_t,text,m_col);
}
-void DocbookCodeGenerator::writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+
+void DocbookCodeGenerator::writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{
Docbook_DB(("(writeCodeLink)\n"));
writeDocbookLink(m_t,ref,file,anchor,name,tooltip);
- m_col+=(int)strlen(name);
+ m_col+=name.length();
}
-void DocbookCodeGenerator::writeCodeLinkLine(const char *,const char *file,
- const char *,const char *name,
- const char *)
+
+void DocbookCodeGenerator::writeCodeLinkLine(const QCString &,const QCString &file,
+ const QCString &,const QCString &name,
+ const QCString &)
{
Docbook_DB(("(writeCodeLinkLine)\n"));
m_t << "<anchor xml:id=\"_" << stripExtensionGeneral(stripPath(file),".xml");
m_t << "_1l";
writeDocbookString(m_t,name);
m_t << "\"/>";
- m_col+=(int)strlen(name);
+ m_col+=name.length();
}
-void DocbookCodeGenerator::writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+
+void DocbookCodeGenerator::writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
)
{
Docbook_DB(("(writeToolTip)\n"));
}
+
void DocbookCodeGenerator::startCodeLine(bool)
{
Docbook_DB(("(startCodeLine)\n"));
m_insideCodeLine=TRUE;
m_col=0;
}
+
void DocbookCodeGenerator::endCodeLine()
{
if (m_insideCodeLine) m_t << "\n";
@@ -192,24 +199,28 @@ void DocbookCodeGenerator::endCodeLine()
m_external.resize(0);
m_insideCodeLine=FALSE;
}
-void DocbookCodeGenerator::startFontClass(const char *colorClass)
+
+void DocbookCodeGenerator::startFontClass(const QCString &colorClass)
{
Docbook_DB(("(startFontClass)\n"));
m_t << "<emphasis role=\"" << colorClass << "\">";
m_insideSpecialHL=TRUE;
}
+
void DocbookCodeGenerator::endFontClass()
{
Docbook_DB(("(endFontClass)\n"));
m_t << "</emphasis>"; // non DocBook
m_insideSpecialHL=FALSE;
}
-void DocbookCodeGenerator::writeCodeAnchor(const char *)
+
+void DocbookCodeGenerator::writeCodeAnchor(const QCString &)
{
Docbook_DB(("(writeCodeAnchor)\n"));
}
-void DocbookCodeGenerator::writeLineNumber(const char *ref,const char *fileName,
- const char *anchor,int l)
+
+void DocbookCodeGenerator::writeLineNumber(const QCString &ref,const QCString &fileName,
+ const QCString &anchor,int l)
{
Docbook_DB(("(writeLineNumber)\n"));
m_insideCodeLine = TRUE;
@@ -218,10 +229,10 @@ void DocbookCodeGenerator::writeLineNumber(const char *ref,const char *fileName,
QCString lineNumber;
lineNumber.sprintf("%05d",l);
- if (fileName && !m_sourceFileName.isEmpty())
+ if (!fileName.isEmpty() && !m_sourceFileName.isEmpty())
{
- writeCodeLinkLine(ref,m_sourceFileName,anchor,lineNumber,0);
- writeCodeLink(ref,fileName,anchor,lineNumber,0);
+ writeCodeLinkLine(ref,m_sourceFileName,anchor,lineNumber,QCString());
+ writeCodeLink(ref,fileName,anchor,lineNumber,QCString());
}
else
{
@@ -235,23 +246,27 @@ void DocbookCodeGenerator::writeLineNumber(const char *ref,const char *fileName,
}
m_col=0;
}
-void DocbookCodeGenerator::setCurrentDoc(const Definition *,const char *,bool)
+
+void DocbookCodeGenerator::setCurrentDoc(const Definition *,const QCString &,bool)
{
}
-void DocbookCodeGenerator::addWord(const char *,bool)
+
+void DocbookCodeGenerator::addWord(const QCString &,bool)
{
}
+
void DocbookCodeGenerator::finish()
{
endCodeLine();
}
-void DocbookCodeGenerator::startCodeFragment(const char *)
+
+void DocbookCodeGenerator::startCodeFragment(const QCString &)
{
DB_GEN_C1(m_t)
m_t << "<programlisting>";
}
-void DocbookCodeGenerator::endCodeFragment(const char *)
+void DocbookCodeGenerator::endCodeFragment(const QCString &)
{
DB_GEN_C1(m_t)
//endCodeLine checks is there is still an open code line, if so closes it.
@@ -293,13 +308,13 @@ void DocbookGenerator::init()
Dir d(dir.str());
if (!d.exists() && !d.mkdir(dir.str()))
{
- term("Could not create output directory %s\n",dir.data());
+ term("Could not create output directory %s\n",qPrint(dir));
}
createSubDirs(d);
}
-void DocbookGenerator::startFile(const char *name,const char *,const char *,int)
+void DocbookGenerator::startFile(const QCString &name,const QCString &,const QCString &,int)
{
DB_GEN_C
QCString fileName=name;
@@ -603,7 +618,7 @@ DB_GEN_C2("IndexSections " << is)
break;
}
}
-void DocbookGenerator::writePageLink(const char *name, bool /*first*/)
+void DocbookGenerator::writePageLink(const QCString &name, bool /*first*/)
{
DB_GEN_C
for (const auto &pd : *Doxygen::pageLinkedMap)
@@ -629,12 +644,12 @@ void DocbookGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef
{
DB_GEN_C
DocbookDocVisitor *visitor =
- new DocbookDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString(""));
+ new DocbookDocVisitor(m_t,*this,ctx?ctx->getDefFileExtension():QCString());
n->accept(visitor);
delete visitor;
}
-void DocbookGenerator::startParagraph(const char *)
+void DocbookGenerator::startParagraph(const QCString &)
{
DB_GEN_C
m_t << "<para>\n";
@@ -645,12 +660,12 @@ void DocbookGenerator::endParagraph()
DB_GEN_C
m_t << "</para>\n";
}
-void DocbookGenerator::writeString(const char *text)
+void DocbookGenerator::writeString(const QCString &text)
{
DB_GEN_C
m_t << text;
}
-void DocbookGenerator::startMemberHeader(const char *,int)
+void DocbookGenerator::startMemberHeader(const QCString &,int)
{
DB_GEN_C
m_t << "<simplesect>\n";
@@ -663,20 +678,24 @@ void DocbookGenerator::endMemberHeader()
DB_GEN_C
m_t << " </title>\n";
}
-void DocbookGenerator::docify(const char *str)
+void DocbookGenerator::docify(const QCString &str)
{
DB_GEN_C
m_t << convertToDocBook(str);
}
-void DocbookGenerator::writeObjectLink(const char *, const char *f,
- const char *anchor, const char *text)
+void DocbookGenerator::writeObjectLink(const QCString &, const QCString &f,
+ const QCString &anchor, const QCString &text)
{
DB_GEN_C
- if (anchor)
- if (f) m_t << "<link linkend=\"_" << stripPath(f) << "_1" << anchor << "\">";
+ if (!anchor.isEmpty())
+ {
+ if (!f.isEmpty()) m_t << "<link linkend=\"_" << stripPath(f) << "_1" << anchor << "\">";
else m_t << "<link linkend=\"_" << anchor << "\">";
+ }
else
+ {
m_t << "<link linkend=\"_" << stripPath(f) << "\">";
+ }
docify(text);
m_t << "</link>";
}
@@ -696,7 +715,7 @@ DB_GEN_C
if (m_inSimpleSect[m_levelListItem]) m_t << "</simplesect>\n";
m_inSimpleSect[m_levelListItem] = FALSE;
}
-void DocbookGenerator::startMemberItem(const char *,int,const char *)
+void DocbookGenerator::startMemberItem(const QCString &,int,const QCString &)
{
DB_GEN_C
if (m_inListItem[m_levelListItem]) m_t << "</listitem>\n";
@@ -759,7 +778,7 @@ void DocbookGenerator::writeNonBreakableSpace(int n)
DB_GEN_C
for (int i=0;i<n;i++) m_t << " ";
}
-void DocbookGenerator::lineBreak(const char *)
+void DocbookGenerator::lineBreak(const QCString &)
{
DB_GEN_C
m_t << "\n";
@@ -792,7 +811,7 @@ DB_GEN_C
m_t << "</programlisting>";
}
}
-void DocbookGenerator::startMemberDoc(const char *clname, const char *memname, const char *, const char *title,
+void DocbookGenerator::startMemberDoc(const QCString &clname, const QCString &memname, const QCString &, const QCString &title,
int memCount, int memTotal, bool)
{
DB_GEN_C2("m_inLevel " << m_inLevel)
@@ -803,7 +822,7 @@ DB_GEN_C2("m_inLevel " << m_inLevel)
m_t << "<computeroutput>[" << memCount << "/" << memTotal << "]</computeroutput>";
}
m_t << "</title>\n";
- if (memname && memname[0]!='@')
+ if (!memname.isEmpty() && memname[0]!='@')
{
addIndexTerm(m_t,memname,clname);
addIndexTerm(m_t,clname,memname);
@@ -814,20 +833,20 @@ void DocbookGenerator::endMemberDoc(bool)
DB_GEN_C
m_t << "</computeroutput></para>";
}
-void DocbookGenerator::startTitleHead(const char *)
+void DocbookGenerator::startTitleHead(const QCString &)
{
DB_GEN_C
m_t << "<title>";
}
-void DocbookGenerator::endTitleHead(const char *,const char *name)
+void DocbookGenerator::endTitleHead(const QCString &,const QCString &name)
{
DB_GEN_C
m_t << "</title>\n";
- if (name) addIndexTerm(m_t, name);
+ if (!name.isEmpty()) addIndexTerm(m_t, name);
}
-void DocbookGenerator::startDoxyAnchor(const char *fName,const char *,
- const char *anchor,const char *,
- const char *)
+void DocbookGenerator::startDoxyAnchor(const QCString &fName,const QCString &,
+ const QCString &anchor,const QCString &,
+ const QCString &)
{
DB_GEN_C
if (!m_inListItem[m_levelListItem] && !m_descTable)
@@ -835,12 +854,12 @@ DB_GEN_C
if (!m_firstMember) m_t << " </section>";
m_firstMember = FALSE;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
m_t << "<anchor xml:id=\"_" << stripPath(fName) << "_1" << anchor << "\"/>";
}
}
-void DocbookGenerator::endDoxyAnchor(const char *,const char *)
+void DocbookGenerator::endDoxyAnchor(const QCString &,const QCString &)
{
DB_GEN_C
}
@@ -878,7 +897,7 @@ DB_GEN_C
m_t << "<para>";
}
-void DocbookGenerator::endClassDiagram(const ClassDiagram &d, const char *fileName,const char *)
+void DocbookGenerator::endClassDiagram(const ClassDiagram &d, const QCString &fileName,const QCString &)
{
DB_GEN_C
m_t << " <informalfigure>\n";
@@ -897,7 +916,7 @@ void DocbookGenerator::startLabels()
DB_GEN_C
}
-void DocbookGenerator::writeLabel(const char *l,bool isLast)
+void DocbookGenerator::writeLabel(const QCString &l,bool isLast)
{
DB_GEN_C
m_t << "<computeroutput>[" << l << "]</computeroutput>";
@@ -949,13 +968,17 @@ void DocbookGenerator::endMemberDocPrefixItem()
DB_GEN_C
m_t << "</computeroutput>";
}
-void DocbookGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+void DocbookGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
{
DB_GEN_C
- if (prefix)
+ if (!prefix.isEmpty())
+ {
m_t << " " << prefix << "(";
+ }
else if (closeBracket)
+ {
m_t << ")";
+ }
m_t << " ";
}
void DocbookGenerator::startParameterName(bool)
@@ -976,36 +999,36 @@ void DocbookGenerator::startMemberTemplateParams()
DB_GEN_C
}
-void DocbookGenerator::endMemberTemplateParams(const char *,const char *)
+void DocbookGenerator::endMemberTemplateParams(const QCString &,const QCString &)
{
DB_GEN_C
m_t << "</para>";
m_t << "<para>";
}
-void DocbookGenerator::startSection(const char *lab,const char *,SectionType)
+void DocbookGenerator::startSection(const QCString &lab,const QCString &,SectionType)
{
DB_GEN_C
m_t << " <section xml:id=\"_" << stripPath(lab) << "\">";
m_t << "<title>";
}
-void DocbookGenerator::endSection(const char *,SectionType)
+void DocbookGenerator::endSection(const QCString &,SectionType)
{
DB_GEN_C
m_t << "</title>";
m_t << " </section>";
}
-void DocbookGenerator::addIndexItem(const char *prim,const char *sec)
+void DocbookGenerator::addIndexItem(const QCString &prim,const QCString &sec)
{
DB_GEN_C
addIndexTerm(m_t, prim, sec);
}
-void DocbookGenerator::startDescTable(const char *title)
+void DocbookGenerator::startDescTable(const QCString &title)
{
DB_GEN_C
int ncols = 2;
m_t << "<informaltable frame=\"all\">\n";
- if (title)m_t << "<title>" << convertToDocBook(title) << "</title>\n";
+ if (!title.isEmpty()) m_t << "<title>" << convertToDocBook(title) << "</title>\n";
m_t << " <tgroup cols=\"" << ncols << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">\n";
for (int i = 0; i < ncols; i++)
{
@@ -1112,7 +1135,7 @@ void DocbookGenerator::endMemberDocList()
DB_GEN_C
m_inGroup = TRUE;
}
-void DocbookGenerator::startConstraintList(const char *header)
+void DocbookGenerator::startConstraintList(const QCString &header)
{
DB_GEN_C
m_t << "<simplesect><title>";
diff --git a/src/docbookgen.h b/src/docbookgen.h
index fc9d576..aba1527 100644
--- a/src/docbookgen.h
+++ b/src/docbookgen.h
@@ -29,28 +29,28 @@ class DocbookCodeGenerator : public CodeOutputInterface
void setSourceFileName(const QCString &sourceFileName) { m_sourceFileName = sourceFileName; }
QCString sourceFileName() { return m_sourceFileName; }
- void codify(const char *text);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeCodeLinkLine(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+ void codify(const QCString &text);
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeCodeLinkLine(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
);
void startCodeLine(bool);
void endCodeLine();
- void startFontClass(const char *colorClass);
+ void startFontClass(const QCString &colorClass);
void endFontClass();
- void writeCodeAnchor(const char *);
- void writeLineNumber(const char *extRef,const char *compId,
- const char *anchorId,int l);
- void setCurrentDoc(const Definition *,const char *,bool);
- void addWord(const char *,bool);
+ void writeCodeAnchor(const QCString &);
+ void writeLineNumber(const QCString &extRef,const QCString &compId,
+ const QCString &anchorId,int l);
+ void setCurrentDoc(const Definition *,const QCString &,bool);
+ void addWord(const QCString &,bool);
void finish();
- void startCodeFragment(const char *style);
- void endCodeFragment(const char *style);
+ void startCodeFragment(const QCString &style);
+ void endCodeFragment(const QCString &style);
private:
TextStream &m_t;
@@ -103,31 +103,31 @@ class DocbookGenerator : public OutputGenerator
OutputType type() const { return Docbook; }
// --- CodeOutputInterface
- void codify(const char *text)
+ void codify(const QCString &text)
{ m_codeGen.codify(text); }
- void writeCodeLink(const char *ref, const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+ void writeCodeLink(const QCString &ref, const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{ m_codeGen.writeCodeLink(ref,file,anchor,name,tooltip); }
- void writeLineNumber(const char *ref,const char *file,const char *anchor,int lineNumber)
+ void writeLineNumber(const QCString &ref,const QCString &file,const QCString &anchor,int lineNumber)
{ m_codeGen.writeLineNumber(ref,file,anchor,lineNumber); }
- void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl,
- const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
+ void writeTooltip(const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
)
{ m_codeGen.writeTooltip(id,docInfo,decl,desc,defInfo,declInfo); }
void startCodeLine(bool hasLineNumbers)
{ m_codeGen.startCodeLine(hasLineNumbers); }
void endCodeLine()
{ m_codeGen.endCodeLine(); }
- void startFontClass(const char *s)
+ void startFontClass(const QCString &s)
{ m_codeGen.startFontClass(s); }
void endFontClass()
{ m_codeGen.endFontClass(); }
- void writeCodeAnchor(const char *anchor)
+ void writeCodeAnchor(const QCString &anchor)
{ m_codeGen.writeCodeAnchor(anchor); }
- void startCodeFragment(const char *style)
+ void startCodeFragment(const QCString &style)
{ m_codeGen.startCodeFragment(style); }
- void endCodeFragment(const char *style)
+ void endCodeFragment(const QCString &style)
{ m_codeGen.endCodeFragment(style); }
// ---------------------------
@@ -136,19 +136,19 @@ class DocbookGenerator : public OutputGenerator
///////////////////////////////////////////////////////////////
// structural output interface
///////////////////////////////////////////////////////////////
- void startFile(const char *name,const char *manName,
- const char *title,int id);
+ void startFile(const QCString &name,const QCString &manName,
+ const QCString &title,int id);
void writeSearchInfo(){DB_GEN_EMPTY};
- void writeFooter(const char *){DB_GEN_NEW};
+ void writeFooter(const QCString &){DB_GEN_NEW};
void endFile();
void startIndexSection(IndexSections);
void endIndexSection(IndexSections);
- void writePageLink(const char *,bool);
+ void writePageLink(const QCString &,bool);
void startProjectNumber(){DB_GEN_NEW};
void endProjectNumber(){DB_GEN_NEW};
void writeStyleInfo(int){DB_GEN_EMPTY};
- void startTitleHead(const char *);
- void endTitleHead(const char *fileName,const char *name);
+ void startTitleHead(const QCString &);
+ void endTitleHead(const QCString &fileName,const QCString &name);
void startIndexListItem(){DB_GEN_NEW};
void endIndexListItem(){DB_GEN_NEW};
void startIndexList(){DB_GEN_NEW};
@@ -156,21 +156,21 @@ class DocbookGenerator : public OutputGenerator
void startIndexKey(){DB_GEN_NEW};
void endIndexKey(){DB_GEN_NEW};
void startIndexValue(bool){DB_GEN_NEW};
- void endIndexValue(const char *,bool){DB_GEN_NEW};
+ void endIndexValue(const QCString &,bool){DB_GEN_NEW};
void startItemList() {DB_GEN_EMPTY};
void endItemList() {DB_GEN_EMPTY};
- void startIndexItem(const char *,const char *){DB_GEN_NEW};
- void endIndexItem(const char *,const char *){DB_GEN_NEW};
+ void startIndexItem(const QCString &,const QCString &){DB_GEN_NEW};
+ void endIndexItem(const QCString &,const QCString &){DB_GEN_NEW};
void startItemListItem() {DB_GEN_EMPTY};
void endItemListItem() {DB_GEN_EMPTY};
- void docify(const char *text);
+ void docify(const QCString &text);
void writeChar(char);
- void writeString(const char *);
- void startParagraph(const char *);
+ void writeString(const QCString &);
+ void startParagraph(const QCString &);
void endParagraph();
- void writeObjectLink(const char *,const char *,const char *,const char *);
- void startHtmlLink(const char *){DB_GEN_NEW};
+ void writeObjectLink(const QCString &,const QCString &,const QCString &,const QCString &);
+ void startHtmlLink(const QCString &){DB_GEN_NEW};
void endHtmlLink(){DB_GEN_NEW};
void startBold();
void endBold();
@@ -191,17 +191,17 @@ class DocbookGenerator : public OutputGenerator
void endSmall(){DB_GEN_NEW};
void startExamples();
void endExamples();
- void startParamList(BaseOutputDocInterface::ParamListTypes,const char *){DB_GEN_NEW};
+ void startParamList(BaseOutputDocInterface::ParamListTypes,const QCString &){DB_GEN_NEW};
void endParamList(){DB_GEN_NEW};
void startTitle(){DB_GEN_NEW};
void endTitle(){DB_GEN_NEW};
- void writeAnchor(const char *,const char *){DB_GEN_EMPTY};
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void lineBreak(const char *);
- void addIndexItem(const char *,const char *);
+ void writeAnchor(const QCString &,const QCString &){DB_GEN_EMPTY};
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void lineBreak(const QCString &);
+ void addIndexItem(const QCString &,const QCString &);
void writeNonBreakableSpace(int);
- void startDescTable(const char *);
+ void startDescTable(const QCString &);
void endDescTable();
void startDescTableRow();
void endDescTableRow();
@@ -209,10 +209,10 @@ class DocbookGenerator : public OutputGenerator
void endDescTableTitle();
void startDescTableData();
void endDescTableData();
- void startTextLink(const char *,const char *){DB_GEN_NEW};
+ void startTextLink(const QCString &,const QCString &){DB_GEN_NEW};
void endTextLink(){DB_GEN_NEW};
void startPageRef(){DB_GEN_NEW};
- void endPageRef(const char *,const char *){DB_GEN_NEW};
+ void endPageRef(const QCString &,const QCString &){DB_GEN_NEW};
void startSubsection(){DB_GEN_NEW};
void endSubsection(){DB_GEN_NEW};
void startSubsubsection();
@@ -225,7 +225,7 @@ class DocbookGenerator : public OutputGenerator
void endMemberSections(){DB_GEN_EMPTY};
void startHeaderSection(){DB_GEN_EMPTY};
void endHeaderSection(){DB_GEN_EMPTY};
- void startMemberHeader(const char *anchor, int typ);
+ void startMemberHeader(const QCString &anchor, int typ);
void endMemberHeader();
void startMemberSubtitle(){DB_GEN_EMPTY};
void endMemberSubtitle(){DB_GEN_EMPTY};
@@ -237,10 +237,10 @@ class DocbookGenerator : public OutputGenerator
void endInlineHeader(){DB_GEN_NEW};
void startAnonTypeScope(int){DB_GEN_EMPTY};
void endAnonTypeScope(int){DB_GEN_EMPTY};
- void startMemberItem(const char *,int,const char *);
+ void startMemberItem(const QCString &,int,const QCString &);
void endMemberItem();
void startMemberTemplateParams();
- void endMemberTemplateParams(const char *,const char *);
+ void endMemberTemplateParams(const QCString &,const QCString &);
void startCompoundTemplateParams() { startSubsubsection(); }
void endCompoundTemplateParams() { endSubsubsection(); }
void startMemberGroupHeader(bool);
@@ -251,29 +251,29 @@ class DocbookGenerator : public OutputGenerator
void endMemberGroup(bool);
void insertMemberAlign(bool){DB_GEN_EMPTY};
void insertMemberAlignLeft(int,bool){DB_GEN_EMPTY};
- void startMemberDoc(const char *,const char *,
- const char *,const char *,int,int,bool);
+ void startMemberDoc(const QCString &,const QCString &,
+ const QCString &,const QCString &,int,int,bool);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor,const char *name,
- const char *args);
- void endDoxyAnchor(const char *fileName,const char *anchor);
+ void startDoxyAnchor(const QCString &fName,const QCString &manName,
+ const QCString &anchor,const QCString &name,
+ const QCString &args);
+ void endDoxyAnchor(const QCString &fileName,const QCString &anchor);
void writeLatexSpacing(){DB_GEN_EMPTY}
- void writeStartAnnoItem(const char *,const char *,
- const char *,const char *){DB_GEN_NEW};
- void writeEndAnnoItem(const char *){DB_GEN_NEW};
- void startMemberDescription(const char *,const char *,bool){DB_GEN_EMPTY};
+ void writeStartAnnoItem(const QCString &,const QCString &,
+ const QCString &,const QCString &){DB_GEN_NEW};
+ void writeEndAnnoItem(const QCString &){DB_GEN_NEW};
+ void startMemberDescription(const QCString &,const QCString &,bool){DB_GEN_EMPTY};
void endMemberDescription(){DB_GEN_EMPTY};
void startMemberDeclaration(){DB_GEN_EMPTY};
- void endMemberDeclaration(const char *,const char *){DB_GEN_EMPTY};
- void writeInheritedSectionTitle(const char *,const char *,
- const char *,const char *,
- const char *,const char *){DB_GEN_NEW};
+ void endMemberDeclaration(const QCString &,const QCString &){DB_GEN_EMPTY};
+ void writeInheritedSectionTitle(const QCString &,const QCString &,
+ const QCString &,const QCString &,
+ const QCString &,const QCString &){DB_GEN_NEW};
void startIndent(){DB_GEN_EMPTY};
void endIndent(){DB_GEN_EMPTY};
void writeSynopsis(){DB_GEN_EMPTY};
void startClassDiagram();
- void endClassDiagram(const ClassDiagram &,const char *,const char *);
+ void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &);
void startDotGraph();
void endDotGraph(DotClassGraph &g);
void startInclDepGraph();
@@ -287,14 +287,14 @@ class DocbookGenerator : public OutputGenerator
void writeGraphicalHierarchy(DotGfxHierarchyTable &){DB_GEN_NEW};
void startQuickIndices(){DB_GEN_EMPTY};
void endQuickIndices(){DB_GEN_EMPTY};
- void writeSplitBar(const char *){DB_GEN_EMPTY};
- void writeNavigationPath(const char *){DB_GEN_NEW};
+ void writeSplitBar(const QCString &){DB_GEN_EMPTY};
+ void writeNavigationPath(const QCString &){DB_GEN_NEW};
void writeLogo(){DB_GEN_NEW};
- void writeQuickLinks(bool,HighlightedItem,const char *){DB_GEN_EMPTY};
- void writeSummaryLink(const char *,const char *,const char *,bool){DB_GEN_EMPTY};
+ void writeQuickLinks(bool,HighlightedItem,const QCString &){DB_GEN_EMPTY};
+ void writeSummaryLink(const QCString &,const QCString &,const QCString &,bool){DB_GEN_EMPTY};
void startContents(){DB_GEN_EMPTY};
void endContents(){DB_GEN_EMPTY};
- void startPageDoc(const char *){DB_GEN_EMPTY}
+ void startPageDoc(const QCString &){DB_GEN_EMPTY}
void endPageDoc() {DB_GEN_EMPTY}
void startTextBlock(bool);
void endTextBlock(bool);
@@ -303,15 +303,15 @@ class DocbookGenerator : public OutputGenerator
void endMemberDocPrefixItem();
void startMemberDocName(bool);
void endMemberDocName();
- void startParameterType(bool,const char *){DB_GEN_EMPTY};
+ void startParameterType(bool,const QCString &){DB_GEN_EMPTY};
void endParameterType(){DB_GEN_EMPTY};
void startParameterName(bool);
void endParameterName(bool,bool,bool);
void startParameterList(bool);
void endParameterList();
- void exceptionEntry(const char*,bool);
+ void exceptionEntry(const QCString &,bool);
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -330,11 +330,11 @@ class DocbookGenerator : public OutputGenerator
void endInlineMemberDoc(){DB_GEN_NEW};
void startLabels();
- void writeLabel(const char *,bool);
+ void writeLabel(const QCString &,bool);
void endLabels();
- void setCurrentDoc(const Definition *,const char *,bool) {DB_GEN_EMPTY}
- void addWord(const char *,bool) {DB_GEN_EMPTY}
+ void setCurrentDoc(const Definition *,const QCString &,bool) {DB_GEN_EMPTY}
+ void addWord(const QCString &,bool) {DB_GEN_EMPTY}
private:
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index ce43aec..f5133d6 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -48,12 +48,12 @@
#define DB_VIS_C2a(x,y)
#endif
-static QCString filterId(const char *s)
+static QCString filterId(const QCString &s)
{
+ if (s.isEmpty()) return s;
static GrowBuf growBuf;
growBuf.clear();
- if (s==0) return "";
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -150,7 +150,7 @@ void DocbookDocVisitor::visitPostEnd(TextStream &t, bool hasCaption, bool inline
}
}
-DocbookDocVisitor::DocbookDocVisitor(TextStream &t,CodeOutputInterface &ci,const char *langExt)
+DocbookDocVisitor::DocbookDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt)
: DocVisitor(DocVisitor_Docbook), m_t(t), m_ci(ci),m_langExt(langExt)
{
DB_VIS_C
@@ -348,7 +348,7 @@ DB_VIS_C
m_t << "<para>\n";
name.sprintf("%s%d", "dot_inline_dotgraph_", dotindex);
baseName.sprintf("%s%d",
- (Config_getString(DOCBOOK_OUTPUT)+"/inline_dotgraph_").data(),
+ qPrint(Config_getString(DOCBOOK_OUTPUT)+"/inline_dotgraph_"),
dotindex++
);
std::string fileName = baseName.str()+".dot";
@@ -1229,7 +1229,7 @@ DB_VIS_C
{
m_file=fd->absFilePath();
}
- copyFile(m_file,Config_getString(DOCBOOK_OUTPUT)+"/"+baseName.data());
+ copyFile(m_file,Config_getString(DOCBOOK_OUTPUT)+"/"+baseName);
}
else
{
@@ -1298,7 +1298,7 @@ DB_VIS_C
if (m_hide) return;
if (ref->isSubPage())
{
- startLink(0,ref->anchor());
+ startLink(QCString(),ref->anchor());
}
else
{
@@ -1572,7 +1572,7 @@ DB_VIS_C
}
-void DocbookDocVisitor::filter(const char *str)
+void DocbookDocVisitor::filter(const QCString &str)
{
DB_VIS_C
m_t << convertToDocBook(str);
@@ -1584,7 +1584,7 @@ DB_VIS_C
m_t << "<link linkend=\"_" << stripPath(file);
if (!anchor.isEmpty())
{
- if (file) m_t << "_1";
+ if (!file.isEmpty()) m_t << "_1";
m_t << anchor;
}
m_t << "\">";
diff --git a/src/docbookvisitor.h b/src/docbookvisitor.h
index 1407df6..5580de0 100644
--- a/src/docbookvisitor.h
+++ b/src/docbookvisitor.h
@@ -31,7 +31,7 @@ class TextStream;
class DocbookDocVisitor : public DocVisitor
{
public:
- DocbookDocVisitor(TextStream &t,CodeOutputInterface &ci,const char *langExt);
+ DocbookDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
~DocbookDocVisitor();
//--------------------------------------
// visitor functions for leaf nodes
@@ -139,7 +139,7 @@ class DocbookDocVisitor : public DocVisitor
//--------------------------------------
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const QCString &str);
void startLink(const QCString &file,
const QCString &anchor);
void endLink();
diff --git a/src/docgroup.cpp b/src/docgroup.cpp
index 49fb9dc..07ff8f3 100644
--- a/src/docgroup.cpp
+++ b/src/docgroup.cpp
@@ -22,7 +22,7 @@
static std::atomic_int g_groupId;
-void DocGroup::enterFile(const char *fileName,int)
+void DocGroup::enterFile(const QCString &fileName,int)
{
m_openCount = 0;
m_autoGroupStack.clear();
@@ -32,7 +32,7 @@ void DocGroup::enterFile(const char *fileName,int)
m_compoundName=fileName;
}
-void DocGroup::leaveFile(const char *fileName,int line)
+void DocGroup::leaveFile(const QCString &fileName,int line)
{
//if (m_memberGroupId!=DOX_NOGROUP)
//{
@@ -51,11 +51,11 @@ void DocGroup::leaveFile(const char *fileName,int line)
}
}
-void DocGroup::enterCompound(const char *fileName,int line,const char *name)
+void DocGroup::enterCompound(const QCString &fileName,int line,const QCString &name)
{
if (m_memberGroupId!=DOX_NOGROUP)
{
- warn(fileName,line,"try to put compound %s inside a member group\n",name);
+ warn(fileName,line,"try to put compound %s inside a member group\n",qPrint(name));
}
m_memberGroupId=DOX_NOGROUP;
m_memberGroupRelates.resize(0);
@@ -73,12 +73,12 @@ void DocGroup::enterCompound(const char *fileName,int line,const char *name)
//printf("groupEnterCompound(%s)\n",name);
}
-void DocGroup::leaveCompound(const char *,int,const char * /*name*/)
+void DocGroup::leaveCompound(const QCString &,int,const QCString & /*name*/)
{
//printf("groupLeaveCompound(%s)\n",name);
//if (m_memberGroupId!=DOX_NOGROUP)
//{
- // warn(fileName,line,"end of compound %s while inside a member group\n",name);
+ // warn(fileName,line,"end of compound %s while inside a member group\n",qPrint(name));
//}
m_memberGroupId=DOX_NOGROUP;
m_memberGroupRelates.resize(0);
@@ -88,7 +88,7 @@ void DocGroup::leaveCompound(const char *,int,const char * /*name*/)
int DocGroup::findExistingGroup(const MemberGroupInfo *info)
{
- //printf("findExistingGroup %s:%s\n",info->header.data(),info->compoundName.data());
+ //printf("findExistingGroup %s:%s\n",qPrint(info->header),qPrint(info->compoundName));
for (const auto &kv : Doxygen::memberGroupInfoMap)
{
if (m_compoundName==kv.second->compoundName && // same file or scope
@@ -103,18 +103,18 @@ int DocGroup::findExistingGroup(const MemberGroupInfo *info)
return ++g_groupId; // start new group
}
-void DocGroup::open(Entry *e,const char *,int, bool implicit)
+void DocGroup::open(Entry *e,const QCString &,int, bool implicit)
{
if (!implicit) m_openCount++;
//printf("==> openGroup(name=%s,sec=%x) m_autoGroupStack=%d\n",
- // e->name.data(),e->section,m_autoGroupStack.size());
+ // qPrint(e->name),e->section,m_autoGroupStack.size());
if (e->section==Entry::GROUPDOC_SEC) // auto group
{
m_autoGroupStack.push_back(Grouping(e->name,e->groupingPri()));
}
else // start of a member group
{
- //printf(" membergroup id=%d %s\n",m_memberGroupId,m_memberGroupHeader.data());
+ //printf(" membergroup id=%d %s\n",m_memberGroupId,qPrint(m_memberGroupHeader));
if (m_memberGroupId==DOX_NOGROUP) // no group started yet
{
auto info = std::make_unique<MemberGroupInfo>();
@@ -133,7 +133,7 @@ void DocGroup::open(Entry *e,const char *,int, bool implicit)
}
}
-void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit)
+void DocGroup::close(Entry *e,const QCString &fileName,int line,bool foundInline,bool implicit)
{
if (!implicit)
{
@@ -147,7 +147,7 @@ void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,boo
}
}
//printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) m_autoGroupStack=%d\n",
- // e->name.data(),e->section,fileName,line,m_autoGroupStack.size());
+ // qPrint(e->name),e->section,fileName,line,m_autoGroupStack.size());
if (m_memberGroupId!=DOX_NOGROUP) // end of member group
{
auto it = Doxygen::memberGroupInfoMap.find(m_memberGroupId);
@@ -170,7 +170,7 @@ void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,boo
m_autoGroupStack.pop_back();
// see bug577005: we should not remove the last group for e
if (!foundInline && !e->groups.empty()) e->groups.pop_back();
- //printf("Removing %s e=%p\n",grp->groupname.data(),e);
+ //printf("Removing %s e=%p\n",qPrint(grp->groupname),e);
if (!foundInline) initGroupInfo(e);
}
}
@@ -178,14 +178,14 @@ void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,boo
void DocGroup::initGroupInfo(Entry *e)
{
//printf("==> initGroup(id=%d,related=%s,e=%p)\n",m_memberGroupId,
- // m_memberGroupRelates.data(),e);
+ // qPrint(m_memberGroupRelates),e);
e->mGrpId = m_memberGroupId;
e->relates = m_memberGroupRelates;
if (!m_autoGroupStack.empty())
{
//printf("Appending group %s to %s: count=%d entry=%p\n",
- // m_autoGroupStack.top()->groupname.data(),
- // e->name.data(),e->groups->count(),e);
+ // qPrint(m_autoGroupStack.top()->groupname),
+ // qPrint(e->name),e->groups->count(),e);
e->groups.push_back(Grouping(m_autoGroupStack.back()));
}
}
diff --git a/src/docgroup.h b/src/docgroup.h
index 696e4f7..de22098 100644
--- a/src/docgroup.h
+++ b/src/docgroup.h
@@ -27,12 +27,12 @@ class DocGroup
DocGroup() {};
public:
- void enterFile(const char *fileName,int);
- void leaveFile(const char *fileName,int line);
- void enterCompound(const char *fileName,int line,const char *name);
- void leaveCompound(const char *,int,const char * /*name*/);
- void open(Entry *e,const char *,int,bool implicit=false);
- void close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit=false);
+ void enterFile(const QCString &fileName,int);
+ void leaveFile(const QCString &fileName,int line);
+ void enterCompound(const QCString &fileName,int line,const QCString &name);
+ void leaveCompound(const QCString &,int,const QCString & /*name*/);
+ void open(Entry *e,const QCString &,int,bool implicit=false);
+ void close(Entry *e,const QCString &fileName,int line,bool foundInline,bool implicit=false);
void initGroupInfo(Entry *e);
bool isEmpty() const;
void clearHeader();
diff --git a/src/docparser.cpp b/src/docparser.cpp
index a1f982c..23b3729 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -52,7 +52,7 @@
#include "fileinfo.h"
#include "dir.h"
-#define TK_COMMAND_CHAR(token) ((token)==TK_COMMAND_AT ? '@' : '\\')
+#define TK_COMMAND_CHAR(token) ((token)==TK_COMMAND_AT ? "@" : "\\")
// debug off
#define DBG(x) do {} while(0)
@@ -182,7 +182,7 @@ static void docParserPushContext(bool saveParamInfo=TRUE)
{
//QCString indent;
//indent.fill(' ',g_parserStack.count()*2+2);
- //printf("%sdocParserPushContext() count=%d\n",indent.data(),g_nodeStack.count());
+ //printf("%sdocParserPushContext() count=%d\n",qPrint(indent),g_nodeStack.count());
doctokenizerYYpushContext();
@@ -266,7 +266,7 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
//QCString indent;
//indent.fill(' ',g_parserStack.count()*2+2);
- //printf("%sdocParserPopContext() count=%d\n",indent.data(),g_nodeStack.count());
+ //printf("%sdocParserPopContext() count=%d\n",qPrint(indent),g_nodeStack.count());
}
//---------------------------------------------------------------------------
@@ -298,7 +298,7 @@ static void unescapeCRef(QCString &s)
* copies the image to the output directory (which depends on the \a type
* parameter).
*/
-static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool dowarn = true)
+static QCString findAndCopyImage(const QCString &fileName,DocImage::Type type, bool dowarn = true)
{
QCString result;
bool ambig;
@@ -312,7 +312,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName));
text+="Possible candidates:\n";
text+=showFileDefMatches(Doxygen::imageNameLinkedMap,fileName);
- warn_doc_error(g_fileName,getDoctokinizerLineNr(),"%s", text.data());
+ warn_doc_error(g_fileName,getDoctokinizerLineNr(),"%s", qPrint(text));
}
QCString inputFile = fd->absFilePath();
@@ -325,7 +325,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
{
result = result.right((int)result.length()-i-1);
}
- //printf("fileName=%s result=%s\n",fileName,result.data());
+ //printf("fileName=%s result=%s\n",fileName,qPrint(result));
QCString outputDir;
switch(type)
{
@@ -377,8 +377,8 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool
QCString baseName = fd->name().left(fd->name().length()-4);
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
- outputDir.data(), baseName.data(),
- outputDir.data(), baseName.data());
+ qPrint(outputDir), qPrint(baseName),
+ qPrint(outputDir), qPrint(baseName));
Portable::sysTimerStart();
if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
@@ -427,14 +427,14 @@ static void checkArgumentName(const std::string &name)
const auto &match = *it;
QCString aName=match.str();
if (lang==SrcLangExt_Fortran) aName=aName.lower();
- //printf("aName='%s'\n",aName.data());
+ //printf("aName='%s'\n",qPrint(aName));
bool found=FALSE;
for (const Argument &a : al)
{
QCString argName = g_memberDef->isDefine() ? a.type : a.name;
if (lang==SrcLangExt_Fortran) argName=argName.lower();
argName=argName.stripWhiteSpace();
- //printf("argName='%s' aName=%s\n",argName.data(),aName.data());
+ //printf("argName='%s' aName=%s\n",qPrint(argName),qPrint(aName));
if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
if (aName==argName)
{
@@ -481,9 +481,9 @@ static void checkRetvalName(const QCString &name)
warn_doc_error(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
"%s",
- ("return value '" + name + "' of " +
+ qPrint("return value '" + name + "' of " +
QCString(g_memberDef->qualifiedName()) +
- " has multiple documentation sections").data());
+ " has multiple documentation sections"));
}
g_retvalsFound.insert(name.str());
}
@@ -525,7 +525,7 @@ static void checkUnOrMultipleDocumentedParams()
{
for (const auto &par : g_paramsFound)
{
- if (argName == par) count++;
+ if (argName == QCString(par)) count++;
}
}
if ((count > 1) && Config_getBool(WARN_IF_DOC_ERROR))
@@ -533,10 +533,10 @@ static void checkUnOrMultipleDocumentedParams()
warn_doc_error(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
"%s",
- ("argument '" + aName +
+ qPrint("argument '" + aName +
"' from the argument list of " +
QCString(g_memberDef->qualifiedName()) +
- " has multiple @param documentation sections").data());
+ " has multiple @param documentation sections"));
}
}
if ((notArgCnt>0) && Config_getBool(WARN_IF_INCOMPLETE_DOC))
@@ -574,7 +574,7 @@ static void checkUnOrMultipleDocumentedParams()
warn_incomplete_doc(g_memberDef->getDefFileName(),
g_memberDef->getDefLine(),
"%s",
- substitute(errMsg,"%","%%").data());
+ qPrint(substitute(errMsg,"%","%%")));
}
}
}
@@ -583,7 +583,7 @@ static void checkUnOrMultipleDocumentedParams()
//---------------------------------------------------------------------------
/*! Strips known html and tex extensions from \a text. */
-static QCString stripKnownExtensions(const char *text)
+static QCString stripKnownExtensions(const QCString &text)
{
QCString result=text;
if (result.right(4)==".tex")
@@ -673,10 +673,10 @@ static bool insideTable(DocNode *n)
* @retval TRUE if name was found.
* @retval FALSE if name was not found.
*/
-static bool findDocsForMemberOrCompound(const char *commandName,
- QCString *pDoc,
- QCString *pBrief,
- const Definition **pDef)
+static bool findDocsForMemberOrCompound(const QCString &commandName,
+ QCString *pDoc,
+ QCString *pBrief,
+ const Definition **pDef)
{
//printf("findDocsForMemberOrCompound(%s)\n",commandName);
*pDoc="";
@@ -748,11 +748,11 @@ static bool findDocsForMemberOrCompound(const char *commandName,
const ClassDef *cd=0;
const NamespaceDef *nd=0;
bool found = getDefs(
- g_context.find('.')==-1?g_context.data():"", // find('.') is a hack to detect files
+ g_context.find('.')==-1?g_context:QCString(), // find('.') is a hack to detect files
name,
- args.isEmpty()?0:args.data(),
+ args.isEmpty() ? QCString() : args,
md,cd,fd,nd,gd,FALSE,0,TRUE);
- //printf("found=%d context=%s name=%s\n",found,g_context.data(),name.data());
+ //printf("found=%d context=%s name=%s\n",found,qPrint(g_context),qPrint(name));
if (found && md)
{
*pDoc=md->documentation();
@@ -770,7 +770,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
{
fullName.prepend(g_context.left(scopeOffset)+"::");
}
- //printf("Trying fullName='%s'\n",fullName.data());
+ //printf("Trying fullName='%s'\n",qPrint(fullName));
// try class, namespace, group, page, file reference
cd = Doxygen::classLinkedMap->find(fullName);
@@ -806,7 +806,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
//---------------------------------------------------------------------------
inline void errorHandleDefaultToken(DocNode *parent,int tok,
- DocNodeList &children,const char *txt)
+ DocNodeList &children,const QCString &txt)
{
const char *cmd_start = "\\";
switch (tok)
@@ -817,16 +817,16 @@ inline void errorHandleDefaultToken(DocNode *parent,int tok,
case TK_COMMAND_BS:
children.push_back(std::make_unique<DocWord>(parent,TK_COMMAND_CHAR(tok) + g_token->name));
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Illegal command %s as part of a %s",
- qPrint(cmd_start + g_token->name),txt);
+ qPrint(cmd_start + g_token->name),qPrint(txt));
break;
case TK_SYMBOL:
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Unsupported symbol %s found found as part of a %s",
- qPrint(g_token->name), txt);
+ qPrint(g_token->name), qPrint(txt));
break;
default:
children.push_back(std::make_unique<DocWord>(parent,g_token->name));
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Unexpected token %s found as part of a %s",
- tokToString(tok), txt);
+ tokToString(tok), qPrint(txt));
break;
}
}
@@ -902,7 +902,7 @@ static void handleStyleEnter(DocNode *parent,DocNodeList &children,
* encountered.
*/
static void handleStyleLeave(DocNode *parent,DocNodeList &children,
- DocStyleChange::Style s,const char *tagName)
+ DocStyleChange::Style s,const QCString &tagName)
{
DBG(("HandleStyleLeave\n"));
QCString tagNameLower = QCString(tagName).lower();
@@ -1064,7 +1064,7 @@ static void handleLinkedWord(DocNode *parent,DocNodeList &children,bool ignoreAu
ClassDef *cd=0;
bool ambig;
FileDef *fd = findFileDef(Doxygen::inputNameLinkedMap,g_fileName,ambig);
- //printf("handleLinkedWord(%s) g_context=%s\n",g_token->name.data(),g_context.data());
+ //printf("handleLinkedWord(%s) g_context=%s\n",qPrint(g_token->name),qPrint(g_context));
if (!g_insideHtmlLink &&
(resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member,TRUE,fd,TRUE)
|| (!g_context.isEmpty() && // also try with global scope
@@ -1097,7 +1097,7 @@ static void handleLinkedWord(DocNode *parent,DocNodeList &children,bool ignoreAu
}
else if (compound->definitionType()==Definition::TypeGroup)
{
- name=(toGroupDef(compound))->groupTitle();
+ name=toGroupDef(compound)->groupTitle();
}
children.push_back(
std::make_unique<DocLinkedWord>(
@@ -1256,7 +1256,7 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, DocNodeLis
}
if (!defaultHandleToken(parent,tok,children))
{
- errorHandleDefaultToken(parent,tok,children,Mappers::cmdMapper->find(cmd).data());
+ errorHandleDefaultToken(parent,tok,children,Mappers::cmdMapper->find(cmd));
}
}
// parse size attributes
@@ -1285,7 +1285,7 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, DocNodeLis
else
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Unknown option '%s' after \\%s command, expected 'width' or 'height'",
- qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data());
+ qPrint(g_token->name), qPrint(Mappers::cmdMapper->find(cmd)));
break;
}
}
@@ -1507,7 +1507,7 @@ reparsetoken:
(void)doctokenizerYYlex();
scope = g_token->name;
g_context = scope;
- //printf("Found scope='%s'\n",scope.data());
+ //printf("Found scope='%s'\n",qPrint(scope));
doctokenizerYYsetStatePara();
}
break;
@@ -1720,7 +1720,7 @@ static void handleImg(DocNode *parent, DocNodeList &children,const HtmlAttribLis
uint index=0;
for (const auto &opt : tagHtmlAttribs)
{
- //printf("option name=%s value=%s\n",opt.name.data(),opt.value.data());
+ //printf("option name=%s value=%s\n",qPrint(opt.name),qPrint(opt.value));
if (opt.name=="src" && !opt.value.isEmpty())
{
// copy attributes
@@ -1779,7 +1779,7 @@ static int internalValidatingParseDoc(DocNode *parent,DocNodeList &children,
if (doc.isEmpty()) return retval;
- doctokenizerYYinit(doc,g_fileName,g_markdownSupport);
+ doctokenizerYYinit(doc.data(),g_fileName,g_markdownSupport);
// first parse any number of paragraphs
bool isFirst=TRUE;
@@ -1817,7 +1817,7 @@ static int internalValidatingParseDoc(DocNode *parent,DocNodeList &children,
static void readTextFileByName(const QCString &file,QCString &text)
{
- if (Portable::isAbsolutePath(file.data()))
+ if (Portable::isAbsolutePath(file))
{
FileInfo fi(file.str());
if (fi.exists())
@@ -1829,7 +1829,7 @@ static void readTextFileByName(const QCString &file,QCString &text)
const StringVector &examplePathList = Config_getList(EXAMPLE_PATH);
for (const auto &s : examplePathList)
{
- std::string absFileName = s+Portable::pathSeparator()+file.str();
+ std::string absFileName = s+(Portable::pathSeparator()+file).str();
FileInfo fi(absFileName);
if (fi.exists())
{
@@ -1865,7 +1865,7 @@ DocWord::DocWord(DocNode *parent,const QCString &word) :
m_word(word)
{
m_parent = parent;
- //printf("new word %s url=%s\n",word.data(),g_searchUrl.data());
+ //printf("new word %s url=%s\n",qPrint(word),qPrint(g_searchUrl));
if (Doxygen::searchIndex && !g_searchUrl.isEmpty())
{
Doxygen::searchIndex->addWord(word,FALSE);
@@ -1883,7 +1883,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word,
{
m_parent = parent;
//printf("DocLinkedWord: new word %s url=%s tooltip='%s'\n",
- // word.data(),g_searchUrl.data(),tooltip.data());
+ // qPrint(word),qPrint(g_searchUrl),qPrint(tooltip));
if (Doxygen::searchIndex && !g_searchUrl.isEmpty())
{
Doxygen::searchIndex->addWord(word,FALSE);
@@ -1927,7 +1927,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
const SectionInfo *sec = SectionManager::instance().find(id);
if (sec)
{
- //printf("Found anchor %s\n",id.data());
+ //printf("Found anchor %s\n",qPrint(id));
m_file = sec->fileName();
m_anchor = sec->label();
}
@@ -1974,7 +1974,7 @@ void DocInclude::parse()
g_includeFileLength = m_text.length();
g_includeFileLine = 0;
g_includeFileShowLineNo = (m_type == DontIncWithLines || m_type == IncWithLines);
- //printf("g_includeFile=<<%s>>\n",g_includeFileText.data());
+ //printf("g_includeFile=<<%s>>\n",qPrint(g_includeFileText));
break;
case VerbInclude:
// fall through
@@ -1995,7 +1995,7 @@ void DocInclude::parse()
if (!m_blockId.isEmpty() && (count=m_text.contains(m_blockId.data()))!=2)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"block marked with %s for \\snippet should appear twice in file %s, found it %d times\n",
- m_blockId.data(),m_file.data(),count);
+ qPrint(m_blockId),qPrint(m_file),count);
}
break;
case DocInclude::SnippetDoc:
@@ -2018,11 +2018,11 @@ void DocIncOperator::parse()
}
m_includeFileName = g_includeFileName;
- const char *p = g_includeFileText;
+ const char *p = g_includeFileText.data();
uint l = g_includeFileLength;
uint o = g_includeFileOffset;
int il = g_includeFileLine;
- DBG(("DocIncOperator::parse() text=%s off=%d len=%d\n",qPrint(p),o,l));
+ DBG(("DocIncOperator::parse() text=%s off=%d len=%d\n",p,o,l));
uint so = o,bo;
bool nonEmpty = FALSE;
switch(type())
@@ -2148,7 +2148,7 @@ void DocIncOperator::parse()
//---------------------------------------------------------------------------
-DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
+DocXRefItem::DocXRefItem(DocNode *parent,int id,const QCString &key) :
m_id(id), m_key(key), m_relPath(g_relPath)
{
m_parent = parent;
@@ -2175,7 +2175,7 @@ bool DocXRefItem::parse()
}
m_title = refList->sectionTitle();
//printf("DocXRefItem: file=%s anchor=%s title=%s\n",
- // m_file.data(),m_anchor.data(),m_title.data());
+ // qPrint(m_file),qPrint(m_anchor),qPrint(m_title));
if (!item->text().isEmpty())
{
@@ -2384,7 +2384,7 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_parent = parent;
const Definition *compound = 0;
QCString anchor;
- //printf("DocRef::DocRef(target=%s,context=%s)\n",target.data(),context.data());
+ //printf("DocRef::DocRef(target=%s,context=%s)\n",qPrint(target),qPrint(context));
ASSERT(!target.isEmpty());
SrcLangExt lang = getLanguageFromFileName(target);
m_relPath = g_relPath;
@@ -2420,7 +2420,7 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_isSubPage = pd && pd->hasParentPage();
if (sec->type()!=SectionType::Page || m_isSubPage) m_anchor = sec->label();
//printf("m_text=%s,m_ref=%s,m_file=%s,type=%d\n",
- // m_text.data(),m_ref.data(),m_file.data(),m_refType);
+ // qPrint(m_text),qPrint(m_ref),qPrint(m_file),m_refType);
return;
}
else if (resolveLink(context,target,TRUE,&compound,anchor))
@@ -2435,13 +2435,13 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
{
if (anchor.isEmpty() && /* compound link */
compound->definitionType()==Definition::TypeGroup && /* is group */
- (toGroupDef(compound))->groupTitle() /* with title */
+ !toGroupDef(compound)->groupTitle().isEmpty() /* with title */
)
{
m_text=(toGroupDef(compound))->groupTitle(); // use group's title as link
}
else if (compound->definitionType()==Definition::TypeMember &&
- (toMemberDef(compound))->isObjCMethod())
+ toMemberDef(compound)->isObjCMethod())
{
// Objective C Method
const MemberDef *member = toMemberDef(compound);
@@ -2451,12 +2451,12 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_file = compound->getOutputFileBase();
m_ref = compound->getReference();
- //printf("isFile=%d compound=%s (%d)\n",isFile,compound->name().data(),
+ //printf("isFile=%d compound=%s (%d)\n",isFile,qPrint(compound->name()),
// compound->definitionType());
return;
}
else if (compound && compound->definitionType()==Definition::TypeFile &&
- (toFileDef(compound))->generateSourceFile()
+ toFileDef(compound)->generateSourceFile()
) // undocumented file that has source code we can link to
{
m_file = compound->getSourceFileBase();
@@ -2536,12 +2536,12 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
{
size_t numBibFiles = Config_getList(CITE_BIB_FILES).size();
m_parent = parent;
- //printf("DocCite::DocCite(target=%s)\n",target.data());
+ //printf("DocCite::DocCite(target=%s)\n",qPrint(target));
ASSERT(!target.isEmpty());
m_relPath = g_relPath;
const CitationManager &ct = CitationManager::instance();
const CiteInfo *cite = ct.find(target);
- //printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?cite->text.data():"<null>",numBibFiles);
+ //printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?qPrint(cite->text):"<null>",numBibFiles);
if (numBibFiles>0 && cite && !cite->text().isEmpty()) // ref to citation
{
m_text = cite->text();
@@ -2549,7 +2549,7 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
m_anchor = ct.anchorPrefix()+cite->label();
m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
//printf("CITE ==> m_text=%s,m_ref=%s,m_file=%s,m_anchor=%s\n",
- // m_text.data(),m_ref.data(),m_file.data(),m_anchor.data());
+ // qPrint(m_text),qPrint(m_ref),qPrint(m_file),qPrint(m_anchor));
return;
}
m_text = target;
@@ -2582,8 +2582,7 @@ DocLink::DocLink(DocNode *parent,const QCString &target)
{
m_refText = m_refText.right(m_refText.length()-1);
}
- if (resolveLink(g_context,stripKnownExtensions(target),g_inSeeBlock,
- &compound,anchor))
+ if (resolveLink(g_context,stripKnownExtensions(target),g_inSeeBlock,&compound,anchor))
{
m_anchor = anchor;
if (compound && compound->isLinkable())
@@ -3189,7 +3188,7 @@ DocHtmlCaption::DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs)
const SectionInfo *sec = SectionManager::instance().find(opt.value);
if (sec)
{
- //printf("Found anchor %s\n",id.data());
+ //printf("Found anchor %s\n",qPrint(id));
m_file = sec->fileName();
m_anchor = sec->label();
m_hasCaptionId = TRUE;
@@ -4292,7 +4291,7 @@ int DocAutoList::parse()
//printf("DocAutoList::parse(): retval=0x%x g_token->indent=%d m_indent=%d "
// "m_isEnumList=%d g_token->isEnumList=%d g_token->name=%s\n",
// retval,g_token->indent,m_indent,m_isEnumList,g_token->isEnumList,
- // g_token->name.data());
+ // qPrint(g_token->name));
//printf("num=%d g_token->id=%d\n",num,g_token->id);
}
while (retval==TK_LISTITEM && // new list item
@@ -5243,7 +5242,7 @@ void DocPara::handleInheritDoc()
if (reMd) // member from which was inherited.
{
const MemberDef *thisMd = g_memberDef;
- //printf("{InheritDocs:%s=>%s}\n",g_memberDef->qualifiedName().data(),reMd->qualifiedName().data());
+ //printf("{InheritDocs:%s=>%s}\n",qPrint(g_memberDef->qualifiedName()),qPrint(reMd->qualifiedName()));
docParserPushContext();
g_scope=reMd->getOuterScope();
if (g_scope!=Doxygen::globalScope)
@@ -5273,7 +5272,7 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
{
case CMD_UNKNOWN:
m_children.push_back(std::make_unique<DocWord>(this,TK_COMMAND_CHAR(tok) + cmdName));
- warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Found unknown command '%c%s'",TK_COMMAND_CHAR(tok),qPrint(cmdName));
+ warn_doc_error(g_fileName,getDoctokinizerLineNr(),"Found unknown command '%s%s'",TK_COMMAND_CHAR(tok),qPrint(cmdName));
break;
case CMD_EMPHASIS:
m_children.push_back(std::make_unique<DocStyleChange>(this,(uint)g_nodeStack.size(),DocStyleChange::Italic,cmdName,TRUE));
@@ -5796,7 +5795,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR && tagId!=HTML_HR && tagId!=HTML_P)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"HTML tag ('<%s/>') may not use the 'empty tag' XHTML syntax.",
- tagName.data());
+ qPrint(tagName));
}
switch (tagId)
{
@@ -6022,7 +6021,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
QCString paramName;
if (findAttribute(tagHtmlAttribs,"name",&paramName))
{
- //printf("paramName=%s\n",paramName.data());
+ //printf("paramName=%s\n",qPrint(paramName));
m_children.push_back(std::make_unique<DocStyleChange>(this,(uint)g_nodeStack.size(),DocStyleChange::Italic,tagName,TRUE));
m_children.push_back(std::make_unique<DocWord>(this,paramName));
m_children.push_back(std::make_unique<DocStyleChange>(this,(uint)g_nodeStack.size(),DocStyleChange::Italic,tagName,FALSE));
@@ -6577,7 +6576,7 @@ reparsetoken:
{
// simple section cannot start in this paragraph, need
// to unwind the stack and remember the command.
- g_token->simpleSectName = g_token->name.copy();
+ g_token->simpleSectName = g_token->name;
retval=RetVal_SimpleSec;
goto endparagraph;
}
@@ -7170,7 +7169,7 @@ static QCString extractCopyDocId(const char *data, uint &j, uint len)
QCString id(e-s+1);
if (e>s) memcpy(id.rawData(),data+s,e-s);
id.at(e-s)='\0';
- //printf("extractCopyDocId='%s' input='%s'\n",id.data(),&data[s]);
+ //printf("extractCopyDocId='%s' input='%s'\n",qPrint(id),&data[s]);
return id;
}
@@ -7210,7 +7209,7 @@ static uint isVerbatimSection(const char *data,uint i,uint len,QCString &endMark
CHECK_FOR_COMMAND("docbookonly",endMarker="enddocbookonly");
CHECK_FOR_COMMAND("startuml",endMarker="enduml");
}
- //printf("isVerbatimSection(%s)=%d)\n",QCString(&data[i]).left(10).data(),j);
+ //printf("isVerbatimSection(%s)=%d)\n",qPrint(QCString(&data[i]).left(10)),j);
return j;
}
@@ -7221,7 +7220,7 @@ static uint skipToEndMarker(const char *data,uint i,uint len,const QCString &end
if ((data[i]=='@' || data[i]=='\\') && // start of command character
(i==0 || (data[i-1]!='@' && data[i-1]!='\\'))) // that is not escaped
{
- if (i+endMarker.length()+1<=len && qstrncmp(data+i+1,endMarker,endMarker.length())==0)
+ if (i+endMarker.length()+1<=len && qstrncmp(data+i+1,endMarker.data(),endMarker.length())==0)
{
return i+endMarker.length()+1;
}
@@ -7252,10 +7251,10 @@ static QCString processCopyDoc(const char *data,uint &len)
QCString id = extractCopyDocId(data,j,len);
const Definition *def = 0;
QCString doc,brief;
- //printf("resolving docs='%s'\n",id.data());
+ //printf("resolving docs='%s'\n",qPrint(id));
if (findDocsForMemberOrCompound(id,&doc,&brief,&def))
{
- //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,brief.data(),doc.data(),isBrief);
+ //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
auto it = std::find(g_copyStack.begin(),g_copyStack.end(),def);
if (it==g_copyStack.end()) // definition not parsed earlier
{
@@ -7263,12 +7262,12 @@ static QCString processCopyDoc(const char *data,uint &len)
if (isBrief)
{
uint l=brief.length();
- buf.addStr(processCopyDoc(brief,l));
+ buf.addStr(processCopyDoc(brief.data(),l));
}
else
{
uint l=doc.length();
- buf.addStr(processCopyDoc(doc,l));
+ buf.addStr(processCopyDoc(doc.data(),l));
}
g_copyStack.pop_back();
}
@@ -7276,14 +7275,14 @@ static QCString processCopyDoc(const char *data,uint &len)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),
"Found recursive @copy%s or @copydoc relation for argument '%s'.\n",
- isBrief?"brief":"details",id.data());
+ isBrief?"brief":"details",qPrint(id));
}
}
else
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),
"@copy%s or @copydoc target '%s' not found", isBrief?"brief":"details",
- id.data());
+ qPrint(id));
}
// skip over command
i=j;
@@ -7318,15 +7317,15 @@ static QCString processCopyDoc(const char *data,uint &len)
//---------------------------------------------------------------------------
-DocRoot *validatingParseDoc(const char *fileName,int startLine,
+DocRoot *validatingParseDoc(const QCString &fileName,int startLine,
const Definition *ctx,const MemberDef *md,
- const char *input,bool indexWords,
- bool isExample, const char *exampleName,
+ const QCString &input,bool indexWords,
+ bool isExample, const QCString &exampleName,
bool singleLine, bool linkFromIndex,
bool markdownSupport)
{
- //printf("validatingParseDoc(%s,%s)=[%s]\n",ctx?ctx->name().data():"<none>",
- // md?md->name().data():"<none>",
+ //printf("validatingParseDoc(%s,%s)=[%s]\n",ctx?qPrint(ctx->name()):"<none>",
+ // md?qPrint(md->name()):"<none>",
// input);
//printf("========== validating %s at line %d\n",fileName,startLine);
//printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input);
@@ -7461,7 +7460,7 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
g_relPath = (!linkFromIndex && ctx) ?
QCString(relativePathToRoot(ctx->getOutputFileBase())) :
QCString("");
- //printf("ctx->name=%s relPath=%s\n",ctx->name().data(),g_relPath.data());
+ //printf("ctx->name=%s relPath=%s\n",qPrint(ctx->name()),qPrint(g_relPath));
g_memberDef = md;
while (!g_nodeStack.empty()) g_nodeStack.pop();
while (!g_styleStack.empty()) g_styleStack.pop();
@@ -7480,16 +7479,16 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
g_paramsFound.clear();
g_markdownSupport = markdownSupport;
- //printf("Starting comment block at %s:%d\n",g_fileName.data(),startLine);
+ //printf("Starting comment block at %s:%d\n",qPrint(g_fileName),startLine);
setDoctokinizerLineNr(startLine);
- uint inpLen=qstrlen(input);
- QCString inpStr = processCopyDoc(input,inpLen);
+ uint ioLen = input.length();
+ QCString inpStr = processCopyDoc(input.data(),ioLen);
if (inpStr.isEmpty() || inpStr.at(inpStr.length()-1)!='\n')
{
inpStr+='\n';
}
- //printf("processCopyDoc(in='%s' out='%s')\n",input,inpStr.data());
- doctokenizerYYinit(inpStr,g_fileName,markdownSupport);
+ //printf("processCopyDoc(in='%s' out='%s')\n",input,qPrint(inpStr));
+ doctokenizerYYinit(inpStr.data(),g_fileName,markdownSupport);
// build abstract syntax tree
DocRoot *root = new DocRoot(md!=0,singleLine);
@@ -7515,13 +7514,13 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
// restore original parser state
docParserPopContext();
- //printf(">>>>>> end validatingParseDoc(%s,%s)\n",ctx?ctx->name().data():"<none>",
- // md?md->name().data():"<none>");
+ //printf(">>>>>> end validatingParseDoc(%s,%s)\n",ctx?qPrint(ctx->name()):"<none>",
+ // md?qPrint(md->name()):"<none>");
return root;
}
-DocText *validatingParseText(const char *input)
+DocText *validatingParseText(const QCString &input)
{
// store parser state so we can re-enter this function if needed
docParserPushContext();
@@ -7552,10 +7551,10 @@ DocText *validatingParseText(const char *input)
DocText *txt = new DocText;
- if (input)
+ if (!input.isEmpty())
{
setDoctokinizerLineNr(1);
- doctokenizerYYinit(input,g_fileName,Config_getBool(MARKDOWN_SUPPORT));
+ doctokenizerYYinit(input.data(),g_fileName,Config_getBool(MARKDOWN_SUPPORT));
// build abstract syntax tree
txt->parse();
@@ -7574,9 +7573,9 @@ DocText *validatingParseText(const char *input)
return txt;
}
-void docFindSections(const char *input,
+void docFindSections(const QCString &input,
const Definition *d,
- const char *fileName)
+ const QCString &fileName)
{
doctokenizerYYFindSections(input,d,fileName);
}
diff --git a/src/docparser.h b/src/docparser.h
index a510b32..3de54bd 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -56,22 +56,22 @@ class MemberGroup;
* @returns Root node of the abstract syntax tree. Ownership of the
* pointer is handed over to the caller.
*/
-DocRoot *validatingParseDoc(const char *fileName,int startLine,
+DocRoot *validatingParseDoc(const QCString &fileName,int startLine,
const Definition *context, const MemberDef *md,
- const char *input,bool indexWords,
- bool isExample,const char *exampleName,
+ const QCString &input,bool indexWords,
+ bool isExample,const QCString &exampleName,
bool singleLine,bool linkFromIndex,
bool markdownSupport);
/*! Main entry point for parsing simple text fragments. These
* fragments are limited to words, whitespace and symbols.
*/
-DocText *validatingParseText(const char *input);
+DocText *validatingParseText(const QCString &input);
/*! Searches for section and anchor commands in the input */
-void docFindSections(const char *input,
+void docFindSections(const QCString &input,
const Definition *d,
- const char *fileName);
+ const QCString &fileName);
//---------------------------------------------------------------------------
@@ -536,9 +536,9 @@ class DocInclude : public DocNode
IncWithLines, Snippet , IncludeDoc, SnippetDoc, SnipWithLines,
DontIncWithLines, RtfInclude, ManInclude, DocbookInclude, XmlInclude};
DocInclude(DocNode *parent,const QCString &file,
- const QCString context, Type t,
- bool isExample,const QCString exampleFile,
- const QCString blockId, bool isBlock) :
+ const QCString &context, Type t,
+ bool isExample,const QCString &exampleFile,
+ const QCString &blockId, bool isBlock) :
m_file(file), m_context(context), m_type(t),
m_isExample(isExample), m_isBlock(isBlock),
m_exampleFile(exampleFile), m_blockId(blockId) { m_parent = parent; }
@@ -548,7 +548,7 @@ class DocInclude : public DocNode
if (i!=-1)
return m_file.right(m_file.length()-(uint)i);
else
- return "";
+ return QCString();
}
Type type() const { return m_type; }
QCString text() const { return m_text; }
@@ -714,7 +714,7 @@ class DocTitle : public CompAccept<DocTitle>
class DocXRefItem : public CompAccept<DocXRefItem>
{
public:
- DocXRefItem(DocNode *parent,int id,const char *key);
+ DocXRefItem(DocNode *parent,int id,const QCString &key);
Kind kind() const { return Kind_XRefItem; }
QCString file() const { return m_file; }
QCString anchor() const { return m_anchor; }
diff --git a/src/docsets.cpp b/src/docsets.cpp
index 66ef115..bf589c4 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -71,7 +71,7 @@ void DocSets::initialize()
std::ofstream ts(mfName.str(),std::ofstream::out | std::ofstream::binary);
if (!ts.is_open())
{
- term("Could not open file %s for writing\n",mfName.data());
+ term("Could not open file %s for writing\n",qPrint(mfName));
}
ts << "DOCSET_NAME=" << bundleId << ".docset\n"
@@ -120,7 +120,7 @@ void DocSets::initialize()
std::ofstream ts(plName.str(),std::ofstream::out | std::ofstream::binary);
if (!ts.is_open())
{
- term("Could not open file %s for writing\n",plName.data());
+ term("Could not open file %s for writing\n",qPrint(plName));
}
ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -154,7 +154,7 @@ void DocSets::initialize()
p->ntf.open(notes.str(),std::ofstream::out | std::ofstream::binary);
if (!p->ntf.is_open())
{
- term("Could not open file %s for writing\n",notes.data());
+ term("Could not open file %s for writing\n",qPrint(notes));
}
p->nts.setStream(&p->ntf);
//QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
@@ -172,7 +172,7 @@ void DocSets::initialize()
p->ttf.open(tokens.str(),std::ofstream::out | std::ofstream::binary);
if (!p->ttf.is_open())
{
- term("Could not open file %s for writing\n",tokens.data());
+ term("Could not open file %s for writing\n",qPrint(tokens));
}
p->tts.setStream(&p->ttf);
p->tts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
@@ -224,10 +224,10 @@ void DocSets::decContentsDepth()
}
void DocSets::addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /*def*/)
@@ -243,7 +243,7 @@ void DocSets::addContentsItem(bool isDir,
p->indentStack.top()=false;
p->nts << p->indent() << " <Node>\n";
p->nts << p->indent() << " <Name>" << convertToXML(name) << "</Name>\n";
- if (file && file[0]=='^') // URL marker
+ if (!file.isEmpty() && file[0]=='^') // URL marker
{
p->nts << p->indent() << " <URL>" << convertToXML(&file[1])
<< "</URL>\n";
@@ -251,16 +251,16 @@ void DocSets::addContentsItem(bool isDir,
else // relative file
{
p->nts << p->indent() << " <Path>";
- if (file && file[0]=='!') // user specified file
+ if (!file.isEmpty() && file[0]=='!') // user specified file
{
p->nts << convertToXML(&file[1]);
}
- else if (file) // doxygen generated file
+ else if (!file.isEmpty()) // doxygen generated file
{
p->nts << file << Doxygen::htmlFileExtension;
}
p->nts << "</Path>\n";
- if (file && anchor)
+ if (!file.isEmpty() && !anchor.isEmpty())
{
p->nts << p->indent() << " <Anchor>" << anchor << "</Anchor>\n";
}
@@ -269,7 +269,7 @@ void DocSets::addContentsItem(bool isDir,
}
void DocSets::addIndexItem(const Definition *context,const MemberDef *md,
- const char *,const char *)
+ const QCString &,const QCString &)
{
if (md==0 && context==0) return;
@@ -477,7 +477,7 @@ void DocSets::addIndexItem(const Definition *context,const MemberDef *md,
}
if (p->scopes.find(context->getOutputFileBase().str())==p->scopes.end())
{
- writeToken(p->tts,context,type,lang,scope,0,decl);
+ writeToken(p->tts,context,type,lang,scope,QCString(),decl);
p->scopes.insert(context->getOutputFileBase().str());
}
}
@@ -487,9 +487,9 @@ void DocSets::writeToken(TextStream &t,
const Definition *d,
const QCString &type,
const QCString &lang,
- const char *scope,
- const char *anchor,
- const char *decl)
+ const QCString &scope,
+ const QCString &anchor,
+ const QCString &decl)
{
t << " <Token>\n";
t << " <TokenIdentifier>\n";
@@ -504,14 +504,14 @@ void DocSets::writeToken(TextStream &t,
{
t << " <Type>" << type << "</Type>\n";
}
- if (scope)
+ if (!scope.isEmpty())
{
t << " <Scope>" << convertToXML(scope) << "</Scope>\n";
}
t << " </TokenIdentifier>\n";
t << " <Path>" << d->getOutputFileBase()
<< Doxygen::htmlFileExtension << "</Path>\n";
- if (anchor)
+ if (!anchor.isEmpty())
{
t << " <Anchor>" << anchor << "</Anchor>\n";
}
@@ -520,14 +520,14 @@ void DocSets::writeToken(TextStream &t,
{
t << " <Abstract>" << convertToXML(tooltip) << "</Abstract>\n";
}
- if (decl)
+ if (!decl.isEmpty())
{
t << " <DeclaredIn>" << convertToXML(decl) << "</DeclaredIn>\n";
}
t << " </Token>\n";
}
-void DocSets::addIndexFile(const char *name)
+void DocSets::addIndexFile(const QCString &name)
{
(void)name;
}
diff --git a/src/docsets.h b/src/docsets.h
index 39a8509..03146f1 100644
--- a/src/docsets.h
+++ b/src/docsets.h
@@ -40,25 +40,25 @@ class DocSets : public IndexIntf
void incContentsDepth();
void decContentsDepth();
void addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool separateIndex,
bool addToNavIndex,
const Definition *def
);
void addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *title);
- void addIndexFile(const char *name);
- void addImageFile(const char *) {}
- void addStyleSheetFile(const char *) {}
+ const QCString &sectionAnchor,const QCString &title);
+ void addIndexFile(const QCString &name);
+ void addImageFile(const QCString &) {}
+ void addStyleSheetFile(const QCString &) {}
private:
void writeToken(TextStream &t, const Definition *d,
const QCString &type, const QCString &lang,
- const char *scope=0, const char *anchor=0,
- const char *decl=0);
+ const QCString &scope=QCString(), const QCString &anchor=QCString(),
+ const QCString &decl=QCString());
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index 80d757f..02dbecd 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -124,9 +124,9 @@ void setDoctokinizerLineNr(int lineno);
int getDoctokinizerLineNr(void);
// operations on the scanner
-void doctokenizerYYFindSections(const char *input,const Definition *d,
- const char *fileName);
-void doctokenizerYYinit(const char *input,const char *fileName,bool markdownSupport);
+void doctokenizerYYFindSections(const QCString &input,const Definition *d,
+ const QCString &fileName);
+void doctokenizerYYinit(const char *input,const QCString &fileName,bool markdownSupport);
void doctokenizerYYcleanup();
void doctokenizerYYpushContext();
bool doctokenizerYYpopContext();
@@ -157,7 +157,7 @@ void doctokenizerYYsetStateText();
void doctokenizerYYsetStateSkipTitle();
void doctokenizerYYsetStateAnchor();
void doctokenizerYYsetInsidePre(bool b);
-void doctokenizerYYpushBackHtmlTag(const char *tag);
+void doctokenizerYYpushBackHtmlTag(const QCString &tag);
void doctokenizerYYsetStateSnippet();
void doctokenizerYYstartAutoList();
void doctokenizerYYendAutoList();
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 70f2bd1..b29afcb 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -155,7 +155,7 @@ const char *tokToString(int token)
static int computeIndent(const char *str,size_t length)
{
- if (length==std::string::npos) return 0;
+ if (str==0 || length==std::string::npos) return 0;
size_t i;
int indent=0;
static int tabSize=Config_getInt(TAB_SIZE);
@@ -181,7 +181,7 @@ static int computeIndent(const char *str,size_t length)
static void processSection()
{
- //printf("%s: found section/anchor with name '%s'\n",g_fileName.data(),g_secLabel.data());
+ //printf("%s: found section/anchor with name '%s'\n",qPrint(g_fileName),qPrint(g_secLabel));
QCString file;
if (g_definition)
{
@@ -189,7 +189,7 @@ static void processSection()
}
else
{
- warn(g_fileName,g_yyLineNr,"Found section/anchor %s without context\n",g_secLabel.data());
+ warn(g_fileName,g_yyLineNr,"Found section/anchor %s without context\n",qPrint(g_secLabel));
}
SectionInfo *si = SectionManager::instance().find(g_secLabel);
if (si)
@@ -201,7 +201,7 @@ static void processSection()
static void handleHtmlTag()
{
- QCString tagText=yytext;
+ QCString tagText(yytext);
g_token->attribs.clear();
g_token->endTag = FALSE;
g_token->emptyTag = FALSE;
@@ -293,7 +293,7 @@ static void handleHtmlTag()
{
}
//printf("=====> Adding option name=<%s> value=<%s>\n",
- // opt.name.data(),opt.value.data());
+ // qPrint(opt.name),qPrint(opt.value));
g_token->attribs.push_back(opt);
}
g_token->attribsStr = tagText.mid(startAttribList,i-startAttribList);
@@ -499,7 +499,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
<St_Para>\r /* skip carriage return */
<St_Para>^{LISTITEM} { /* list item */
lineCount(yytext,yyleng);
- QCString text=yytext;
+ QCString text(yytext);
size_t dashPos = static_cast<size_t>(text.findRev('-'));
assert(dashPos!=std::string::npos);
g_token->isEnumList = text.at(dashPos+1)=='#';
@@ -515,7 +515,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
else
{
lineCount(yytext,yyleng);
- std::string text=yytext;
+ std::string text(yytext);
static const reg::Ex re(R"([*+][^*+]*$)"); // find last + or *
reg::Match match;
reg::search(text,match,re);
@@ -534,7 +534,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
else
{
- std::string text=yytext;
+ std::string text(yytext);
static const reg::Ex re(R"(\d+)");
reg::Match match;
reg::search(text,match,re);
@@ -548,12 +548,12 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
<St_Para>{BLANK}*(\n|"\\ilinebr"){LISTITEM} { /* list item on next line */
lineCount(yytext,yyleng);
- QCString text=extractPartAfterNewLine(yytext);
+ QCString text=extractPartAfterNewLine(QCString(yytext));
size_t dashPos = static_cast<size_t>(text.findRev('-'));
assert(dashPos!=std::string::npos);
g_token->isEnumList = text.at(dashPos+1)=='#';
g_token->id = -1;
- g_token->indent = computeIndent(text,dashPos);
+ g_token->indent = computeIndent(text.data(),dashPos);
return TK_LISTITEM;
}
<St_Para>{BLANK}*(\n|"\\ilinebr"){MLISTITEM} { /* list item on next line */
@@ -564,7 +564,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
else
{
lineCount(yytext,yyleng);
- std::string text=extractPartAfterNewLine(yytext).str();
+ std::string text=extractPartAfterNewLine(QCString(yytext)).str();
static const reg::Ex re(R"([*+][^*+]*$)"); // find last + or *
reg::Match match;
reg::search(text,match,re);
@@ -584,7 +584,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
else
{
lineCount(yytext,yyleng);
- std::string text=extractPartAfterNewLine(yytext).str();
+ std::string text=extractPartAfterNewLine(QCString(yytext)).str();
static const reg::Ex re(R"(\d+)");
reg::Match match;
reg::search(text,match,re);
@@ -605,9 +605,9 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
<St_Para>{BLANK}*(\n|"\\ilinebr"){ENDLIST} { /* end list on next line */
lineCount(yytext,yyleng);
- QCString text=extractPartAfterNewLine(yytext);
+ QCString text=extractPartAfterNewLine(QCString(yytext));
int dotPos = text.findRev('.');
- g_token->indent = computeIndent(text,dotPos);
+ g_token->indent = computeIndent(text.data(),dotPos);
return TK_ENDLIST;
}
<St_Para>"{"{BLANK}*"@link"/{BLANK}+ {
@@ -723,7 +723,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}")" | /* environment variable */
<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}"("{ID}"))" { /* environment variable */
- QCString name = &yytext[2];
+ QCString name(&yytext[2]);
name = name.left(name.length()-1);
QCString value = Portable::getenv(name);
for (int i=value.length()-1;i>=0;i--) unput(value.at(i));
@@ -1239,7 +1239,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
BEGIN(St_XRefItem2);
}
<St_XRefItem2>[0-9]+"." {
- QCString numStr=yytext;
+ QCString numStr(yytext);
numStr=numStr.left((int)yyleng-1);
g_token->id=numStr.toInt();
return RetVal_OK;
@@ -1255,7 +1255,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
lineCount(yytext,yyleng);
- QCString params = yytext;
+ QCString params(yytext);
int j = params.find('&');
int i = params.find('$');
if (j<i && j!=-1) i=j;
@@ -1306,7 +1306,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
return TK_WORD;
}
<St_File>"\""[^\n\"]+"\"" {
- QCString text=yytext;
+ QCString text(yytext);
g_token->name = text.mid(1,text.length()-2);
return TK_WORD;
}
@@ -1349,7 +1349,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
<St_Sections>{CMD}("<"|{CMD})
<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
lineCount(yytext,yyleng);
- QCString tag=yytext;
+ QCString tag(yytext);
int s=tag.find("id=");
if (s!=-1) // command has id attribute
{
@@ -1435,13 +1435,13 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
BEGIN(St_SecSkip);
}
<St_SecSkip>{CMD}{ID} {
- if (qstrcmp(yytext+1,g_endMarker)==0)
+ if (g_endMarker==yytext+1)
{
BEGIN(St_Sections);
}
}
<St_SecSkip>"-->" {
- if (qstrcmp(yytext,g_endMarker)==0)
+ if (g_endMarker==yytext)
{
BEGIN(St_Sections);
}
@@ -1510,12 +1510,12 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
//--------------------------------------------------------------------------
-void doctokenizerYYFindSections(const char *input,const Definition *d,
- const char *fileName)
+void doctokenizerYYFindSections(const QCString &input,const Definition *d,
+ const QCString &fileName)
{
- if (input==0) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
- g_inputString = input;
+ if (input.isEmpty()) return;
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
+ g_inputString = input.data();
//printf("parsing --->'%s'<---\n",input);
g_inputPos = 0;
g_definition = d;
@@ -1523,10 +1523,10 @@ void doctokenizerYYFindSections(const char *input,const Definition *d,
BEGIN(St_Sections);
g_yyLineNr = 1;
doctokenizerYYlex();
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
}
-void doctokenizerYYinit(const char *input,const char *fileName,bool markdownSupport)
+void doctokenizerYYinit(const char *input,const QCString &fileName,bool markdownSupport)
{
g_autoListLevel = 0;
g_inputString = input;
@@ -1729,7 +1729,7 @@ void doctokenizerYYsetInsidePre(bool b)
g_insidePre = b;
}
-void doctokenizerYYpushBackHtmlTag(const char *tag)
+void doctokenizerYYpushBackHtmlTag(const QCString &tag)
{
QCString tagName = tag;
int i,l = tagName.length();
diff --git a/src/docvisitor.cpp b/src/docvisitor.cpp
index 5356faf..506c9f8 100644
--- a/src/docvisitor.cpp
+++ b/src/docvisitor.cpp
@@ -38,9 +38,9 @@ DocVisitor::~DocVisitor()
{
}
-CodeParserInterface &DocVisitor::getCodeParser(const char *extension)
+CodeParserInterface &DocVisitor::getCodeParser(const QCString &extension)
{
- std::string ext(extension?extension:"");
+ std::string ext = extension.str();
// for each extension we create a code parser once per visitor, so that
// the context of the same parser object is reused throughout multiple passes for instance
// for code fragments shown via dontinclude.
diff --git a/src/docvisitor.h b/src/docvisitor.h
index baf5bef..b19e76e 100644
--- a/src/docvisitor.h
+++ b/src/docvisitor.h
@@ -18,6 +18,8 @@
#include <memory>
+#include "qcstring.h"
+
// ids
const int DocVisitor_Html = 0;
const int DocVisitor_Latex = 1;
@@ -95,7 +97,7 @@ class DocVisitor
DocVisitor(int id);
virtual ~DocVisitor();
int id() const;
- CodeParserInterface &getCodeParser(const char *langExt);
+ CodeParserInterface &getCodeParser(const QCString &langExt);
void pushHidden(bool hide);
bool popHidden();
diff --git a/src/dot.cpp b/src/dot.cpp
index 4275a2c..8aa30b7 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -36,17 +36,16 @@
static QCString g_dotFontPath;
-static void setDotFontPath(const char *path)
+static void setDotFontPath(const QCString &path)
{
ASSERT(g_dotFontPath.isEmpty());
g_dotFontPath = Portable::getenv("DOTFONTPATH");
QCString newFontPath = Config_getString(DOT_FONTPATH);
- QCString spath = path;
- if (!newFontPath.isEmpty() && !spath.isEmpty())
+ if (!newFontPath.isEmpty() && !path.isEmpty())
{
- newFontPath.prepend(spath+Portable::pathListSeparator());
+ newFontPath.prepend(path+Portable::pathListSeparator());
}
- else if (newFontPath.isEmpty() && !spath.isEmpty())
+ else if (newFontPath.isEmpty() && !path.isEmpty())
{
newFontPath=path;
}
@@ -118,22 +117,22 @@ DotManager::~DotManager()
delete m_queue;
}
-DotRunner* DotManager::createRunner(const std::string &absDotName, const std::string& md5Hash)
+DotRunner* DotManager::createRunner(const QCString &absDotName, const QCString& md5Hash)
{
DotRunner* rv = nullptr;
- auto const runit = m_runners.find(absDotName);
+ auto const runit = m_runners.find(absDotName.str());
if (runit == m_runners.end())
{
auto insobj = std::make_unique<DotRunner>(absDotName, md5Hash);
rv = insobj.get();
- m_runners.emplace(absDotName, std::move(insobj));
+ m_runners.emplace(absDotName.str(), std::move(insobj));
}
else
{
// we have a match
if (md5Hash != runit->second->getMd5Hash())
{
- err("md5 hash does not match for two different runs of %s !\n", absDotName.data());
+ err("md5 hash does not match for two different runs of %s !\n", qPrint(absDotName));
}
rv = runit->second.get();
}
@@ -141,13 +140,13 @@ DotRunner* DotManager::createRunner(const std::string &absDotName, const std::st
return rv;
}
-DotFilePatcher *DotManager::createFilePatcher(const std::string &fileName)
+DotFilePatcher *DotManager::createFilePatcher(const QCString &fileName)
{
- auto patcher = m_filePatchers.find(fileName);
+ auto patcher = m_filePatchers.find(fileName.str());
if (patcher != m_filePatchers.end()) return &(patcher->second);
- auto rv = m_filePatchers.emplace(fileName, fileName.c_str());
+ auto rv = m_filePatchers.emplace(fileName.str(), fileName.data());
assert(rv.second);
return &(rv.first->second);
}
@@ -270,13 +269,13 @@ bool DotManager::run() const
//--------------------------------------------------------------------
-void writeDotGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,GraphOutputFormat format)
+void writeDotGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,GraphOutputFormat format)
{
- Dir d(outDir);
+ Dir d(outDir.str());
if (!d.exists())
{
- term("Output dir %s does not exist!\n",outDir);
+ term("Output dir %s does not exist!\n",qPrint(outDir));
}
QCString imgExt = getDotImageExtension();
@@ -329,7 +328,7 @@ void writeDotImageMapFromFile(TextStream &t,
Dir d(outDir.str());
if (!d.exists())
{
- term("Output dir %s does not exist!\n",outDir.data());
+ term("Output dir %s does not exist!\n",qPrint(outDir));
}
QCString mapName = baseName+".map";
@@ -337,7 +336,7 @@ void writeDotImageMapFromFile(TextStream &t,
QCString imgName = baseName+"."+imgExt;
QCString absOutFile = QCString(d.absPath())+"/"+mapName;
- DotRunner dotRun(inFile.data());
+ DotRunner dotRun(inFile);
dotRun.addJob(MAP_CMD,absOutFile);
dotRun.preventCleanUp();
if (!dotRun.run())
diff --git a/src/dot.h b/src/dot.h
index 1ba00be..219d1d5 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -33,8 +33,8 @@ class DotManager
public:
static DotManager *instance();
static void deleteInstance();
- DotRunner* createRunner(const std::string& absDotName, const std::string& md5Hash);
- DotFilePatcher *createFilePatcher(const std::string &fileName);
+ DotRunner* createRunner(const QCString& absDotName, const QCString& md5Hash);
+ DotFilePatcher *createFilePatcher(const QCString &fileName);
bool run() const;
private:
@@ -48,8 +48,8 @@ class DotManager
std::vector< std::unique_ptr<DotWorkerThread> > m_workers;
};
-void writeDotGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,GraphOutputFormat format);
+void writeDotGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,GraphOutputFormat format);
void writeDotImageMapFromFile(TextStream &t,
const QCString& inFile, const QCString& outDir,
const QCString& relPath,const QCString& baseName,
diff --git a/src/dotcallgraph.cpp b/src/dotcallgraph.cpp
index 4426876..1f77e33 100644
--- a/src/dotcallgraph.cpp
+++ b/src/dotcallgraph.cpp
@@ -40,7 +40,7 @@ void DotCallGraph::buildGraph(DotNode *n,const MemberDef *md,int distance)
if (it!=m_usedNodes.end()) // file is already a node in the graph
{
DotNode *bn = it->second;
- n->addChild(bn,0,0,0);
+ n->addChild(bn,0,0);
bn->addParent(n);
bn->setDistance(distance);
}
@@ -64,7 +64,7 @@ void DotCallGraph::buildGraph(DotNode *n,const MemberDef *md,int distance)
uniqueId,
0 //distance
);
- n->addChild(bn,0,0,0);
+ n->addChild(bn,0,0);
bn->addParent(n);
bn->setDistance(distance);
m_usedNodes.insert(std::make_pair(uniqueId.str(),bn));
@@ -134,7 +134,7 @@ DotCallGraph::DotCallGraph(const MemberDef *md,bool inverse)
m_startNode = new DotNode(getNextNodeNumber(),
linkToText(md->getLanguage(),name,FALSE),
tooltip,
- uniqueId.data(),
+ uniqueId,
TRUE // root node
);
m_startNode->setDistance(0);
@@ -182,9 +182,9 @@ QCString DotCallGraph::writeGraph(
TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,bool generateImageMap,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,bool generateImageMap,
int graphId)
{
return DotGraph::writeGraph(out, graphFormat, textFormat, path, fileName, relPath, generateImageMap, graphId);
diff --git a/src/dotcallgraph.h b/src/dotcallgraph.h
index 9fd5c66..e8361a2 100644
--- a/src/dotcallgraph.h
+++ b/src/dotcallgraph.h
@@ -30,8 +30,8 @@ class DotCallGraph : public DotGraph
bool isTooBig() const;
int numNodes() const;
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
- const char *path,const char *fileName,
- const char *relPath,bool writeImageMap=TRUE,
+ const QCString &path,const QCString &fileName,
+ const QCString &relPath,bool writeImageMap=TRUE,
int graphId=-1);
protected:
diff --git a/src/dotclassgraph.cpp b/src/dotclassgraph.cpp
index 95a9b7d..1bbe4de 100644
--- a/src/dotclassgraph.cpp
+++ b/src/dotclassgraph.cpp
@@ -24,11 +24,11 @@
#include "util.h"
void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
- const char *label,const char *usedName,const char *templSpec,bool base,int distance)
+ const QCString &label,const QCString &usedName,const QCString &templSpec,bool base,int distance)
{
if (Config_getBool(HIDE_UNDOC_CLASSES) && !cd->isLinkable()) return;
- int edgeStyle = (label || prot==EdgeInfo::Orange || prot==EdgeInfo::Orange2) ? EdgeInfo::Dashed : EdgeInfo::Solid;
+ int edgeStyle = (!label.isEmpty() || prot==EdgeInfo::Orange || prot==EdgeInfo::Orange2) ? EdgeInfo::Dashed : EdgeInfo::Solid;
QCString className;
QCString fullName;
if (cd->isAnonymous())
@@ -37,12 +37,12 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
className+=label;
fullName = className;
}
- else if (usedName) // name is a typedef
+ else if (!usedName.isEmpty()) // name is a typedef
{
className=usedName;
fullName = className;
}
- else if (templSpec) // name has a template part
+ else if (!templSpec.isEmpty()) // name has a template part
{
className=insertTemplateSpecifierInScope(cd->displayName(),templSpec);
fullName =insertTemplateSpecifierInScope(cd->name(),templSpec);
@@ -53,7 +53,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
fullName = cd->name();
}
//printf("DotClassGraph::addClass(class='%s',parent=%s,prot=%d,label=%s,dist=%d,usedName=%s,templSpec=%s,base=%d)\n",
- // className.data(),n->label().data(),prot,label,distance,usedName,templSpec,base);
+ // qPrint(className),qPrint(n->label()),prot,label,distance,usedName,templSpec,base);
auto it = m_usedNodes.find(fullName.str());
if (it!=m_usedNodes.end()) // class already inserted
{
@@ -69,7 +69,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
n->addParent(bn);
}
bn->setDistance(distance);
- //printf(" add exiting node %s of %s\n",bn->label().data(),n->label().data());
+ //printf(" add exiting node %s of %s\n",qPrint(bn->label()),qPrint(n->label()));
}
else // new class
{
@@ -88,7 +88,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
DotNode *bn = new DotNode(getNextNodeNumber(),
displayName,
tooltip,
- tmp_url.data(),
+ tmp_url,
FALSE, // rootNode
cd
);
@@ -105,7 +105,7 @@ void DotClassGraph::addClass(const ClassDef *cd,DotNode *n,int prot,
bn->setDistance(distance);
m_usedNodes.insert(std::make_pair(fullName.str(),bn));
//printf(" add new child node '%s' to %s hidden=%d url=%s\n",
- // className.data(),n->label().data(),cd->isHidden(),tmp_url.data());
+ // qPrint(className),qPrint(n->label()),cd->isHidden(),qPrint(tmp_url));
buildGraph(cd,bn,base,distance+1);
}
@@ -250,7 +250,7 @@ static QCString joinLabels(const StringSet &ss)
void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int distance)
{
//printf("DocClassGraph::buildGraph(%s,distance=%d,base=%d)\n",
- // cd->name().data(),distance,base);
+ // qPrint(cd->name()),distance,base);
// ---- Add inheritance relations
if (m_graphType == Inheritance || m_graphType==Collaboration)
@@ -258,8 +258,8 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
for (const auto &bcd : base ? cd->baseClasses() : cd->subClasses())
{
//printf("-------- inheritance relation %s->%s templ='%s'\n",
- // cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data());
- addClass(bcd.classDef,n,bcd.prot,0,bcd.usedName,bcd.templSpecifiers,base,distance);
+ // qPrint(cd->name()),qPrint(bcd->classDef->name()),qPrint(bcd->templSpecifiers));
+ addClass(bcd.classDef,n,bcd.prot,QCString(),bcd.usedName,bcd.templSpecifiers,base,distance);
}
}
if (m_graphType == Collaboration)
@@ -270,8 +270,8 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
cd->usedByImplementationClasses() ;
for (const auto &ucd : list)
{
- //printf("addClass: %s templSpec=%s\n",ucd.classDef->name().data(),ucd.templSpecifiers.data());
- addClass(ucd.classDef,n,EdgeInfo::Purple,joinLabels(ucd.accessors),0,
+ //printf("addClass: %s templSpec=%s\n",qPrint(ucd.classDef->name()),qPrint(ucd.templSpecifiers));
+ addClass(ucd.classDef,n,EdgeInfo::Purple,joinLabels(ucd.accessors),QCString(),
ucd.templSpecifiers,base,distance);
}
}
@@ -279,9 +279,9 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
{
for (const auto &ccd : cd->templateTypeConstraints())
{
- //printf("addClass: %s\n",ccd.classDef->name().data());
- addClass(ccd.classDef,n,EdgeInfo::Orange2,joinLabels(ccd.accessors),0,
- 0,TRUE,distance);
+ //printf("addClass: %s\n",qPrint(ccd.classDef->name()));
+ addClass(ccd.classDef,n,EdgeInfo::Orange2,joinLabels(ccd.accessors),QCString(),
+ QCString(),TRUE,distance);
}
}
@@ -297,7 +297,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
for (const auto &ti : templMaster->getTemplateInstances())
if (ti.classDef==cd)
{
- addClass(templMaster,n,EdgeInfo::Orange,ti.templSpec,0,0,TRUE,distance);
+ addClass(templMaster,n,EdgeInfo::Orange,ti.templSpec,QCString(),QCString(),TRUE,distance);
}
}
}
@@ -305,7 +305,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
{
for (const auto &ti : cd->getTemplateInstances())
{
- addClass(ti.classDef,n,EdgeInfo::Orange,ti.templSpec,0,0,FALSE,distance);
+ addClass(ti.classDef,n,EdgeInfo::Orange,ti.templSpec,QCString(),QCString(),FALSE,distance);
}
}
}
@@ -313,7 +313,7 @@ void DotClassGraph::buildGraph(const ClassDef *cd,DotNode *n,bool base,int dista
DotClassGraph::DotClassGraph(const ClassDef *cd,GraphType t)
{
- //printf("--------------- DotClassGraph::DotClassGraph '%s'\n",cd->displayName().data());
+ //printf("--------------- DotClassGraph::DotClassGraph '%s'\n",qPrint(cd->displayName()));
m_graphType = t;
QCString tmp_url="";
if (cd->isLinkable() && !cd->isHidden())
@@ -329,7 +329,7 @@ DotClassGraph::DotClassGraph(const ClassDef *cd,GraphType t)
m_startNode = new DotNode(getNextNodeNumber(),
className,
tooltip,
- tmp_url.data(),
+ tmp_url,
TRUE, // is a root node
cd
);
@@ -447,9 +447,9 @@ QCString DotClassGraph::getImgAltText() const
QCString DotClassGraph::writeGraph(TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool /*isTBRank*/,
bool generateImageMap,
int graphId)
diff --git a/src/dotclassgraph.h b/src/dotclassgraph.h
index cd39608..6ccba08 100644
--- a/src/dotclassgraph.h
+++ b/src/dotclassgraph.h
@@ -32,7 +32,7 @@ public:
bool isTooBig() const;
int numNodes() const;
QCString writeGraph(TextStream &t,GraphOutputFormat gf,EmbeddedOutputFormat ef,
- const char *path, const char *fileName, const char *relPath,
+ const QCString &path, const QCString &fileName, const QCString &relPath,
bool TBRank=TRUE,bool imageMap=TRUE,int graphId=-1);
void writeXML(TextStream &t);
@@ -49,8 +49,8 @@ private:
void buildGraph(const ClassDef *cd,DotNode *n,bool base,int distance);
bool determineVisibleNodes(DotNode *rootNode,int maxNodes,bool includeParents);
void determineTruncatedNodes(DotNodeDeque &queue,bool includeParents);
- void addClass(const ClassDef *cd,DotNode *n,int prot,const char *label,
- const char *usedName,const char *templSpec,
+ void addClass(const ClassDef *cd,DotNode *n,int prot,const QCString &label,
+ const QCString &usedName,const QCString &templSpec,
bool base,int distance);
DotNode * m_startNode;
diff --git a/src/dotdirdeps.cpp b/src/dotdirdeps.cpp
index 8367df9..12236a0 100644
--- a/src/dotdirdeps.cpp
+++ b/src/dotdirdeps.cpp
@@ -124,7 +124,7 @@ void writeDotDirDepGraph(TextStream &t,const DirDef *dd,bool linkRelations)
// add nodes for other used directories
{
- //printf("*** For dir %s\n",shortName().data());
+ //printf("*** For dir %s\n",qPrint(shortName()));
for (const auto &usedDir : usedDirsNotDrawn)
// for each used dir (=directly used or a parent of a directly used dir)
{
@@ -132,10 +132,10 @@ void writeDotDirDepGraph(TextStream &t,const DirDef *dd,bool linkRelations)
while (dir)
{
//printf("*** check relation %s->%s same_parent=%d !%s->isParentOf(%s)=%d\n",
- // dir->shortName().data(),usedDir->shortName().data(),
+ // qPrint(dir->shortName()),qPrint(usedDir->shortName()),
// dir->parent()==usedDir->parent(),
- // usedDir->shortName().data(),
- // shortName().data(),
+ // qPrint(usedDir->shortName()),
+ // qPrint(shortName()),
// !usedDir->isParentOf(this)
// );
if (dir!=usedDir && dir->parent()==usedDir->parent())
@@ -217,9 +217,9 @@ QCString DotDirDeps::getImgAltText() const
QCString DotDirDeps::writeGraph(TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool generateImageMap,
int graphId,
bool linkRelations)
diff --git a/src/dotdirdeps.h b/src/dotdirdeps.h
index 713afb4..4f915f9 100644
--- a/src/dotdirdeps.h
+++ b/src/dotdirdeps.h
@@ -29,9 +29,9 @@ class DotDirDeps : public DotGraph
QCString writeGraph(TextStream &out,
GraphOutputFormat gf,
EmbeddedOutputFormat ef,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool writeImageMap=TRUE,
int graphId=-1,
bool linkRelations=TRUE);
diff --git a/src/dotfilepatcher.cpp b/src/dotfilepatcher.cpp
index bb2bf15..326c1e1 100644
--- a/src/dotfilepatcher.cpp
+++ b/src/dotfilepatcher.cpp
@@ -123,7 +123,7 @@ static const char svgZoomFooter[] =
"</svg>\n"
;
-static QCString replaceRef(const QCString &buf,const QCString relPath,
+static QCString replaceRef(const QCString &buf,const QCString &relPath,
bool urlOnly,const QCString &context,const QCString &target=QCString())
{
// search for href="...", store ... part in link
@@ -152,7 +152,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
DocRef *df = new DocRef( (DocNode*) 0, link.mid(5), context );
result+=externalRef(relPath,df->ref(),TRUE);
if (!df->file().isEmpty())
- result += df->file().data() + Doxygen::htmlFileExtension;
+ result += df->file() + Doxygen::htmlFileExtension;
if (!df->anchor().isEmpty())
result += "#" + df->anchor();
delete df;
@@ -191,7 +191,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
QCString leftPart = buf.left(indexS);
QCString rightPart = buf.mid(indexE+1);
//printf("replaceRef(\n'%s'\n)->\n'%s+%s+%s'\n",
- // buf.data(),leftPart.data(),result.data(),rightPart.data());
+ // qPrint(buf),qPrint(leftPart),qPrint(result),qPrint(rightPart));
return leftPart + result + rightPart;
}
else
@@ -211,16 +211,16 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
* map file was found
* \returns TRUE if successful.
*/
-bool DotFilePatcher::convertMapFile(TextStream &t,const char *mapName,
- const QCString relPath, bool urlOnly,
+bool DotFilePatcher::convertMapFile(TextStream &t,const QCString &mapName,
+ const QCString &relPath, bool urlOnly,
const QCString &context)
{
- std::ifstream f(mapName,std::ifstream::in);
+ std::ifstream f(mapName.str(),std::ifstream::in);
if (!f.is_open())
{
err("problems opening map file %s for inclusion in the docs!\n"
"If you installed Graphviz/dot after a previous failing run, \n"
- "try deleting the output directory and rerun doxygen.\n",mapName);
+ "try deleting the output directory and rerun doxygen.\n",qPrint(mapName));
return FALSE;
}
std::string line;
@@ -245,7 +245,7 @@ bool DotFilePatcher::convertMapFile(TextStream &t,const char *mapName,
return TRUE;
}
-DotFilePatcher::DotFilePatcher(const char *patchFile)
+DotFilePatcher::DotFilePatcher(const QCString &patchFile)
: m_patchFile(patchFile)
{
}
@@ -291,7 +291,7 @@ int DotFilePatcher::addSVGObject(const QCString &baseName,
bool DotFilePatcher::run() const
{
- //printf("DotFilePatcher::run(): %s\n",m_patchFile.data());
+ //printf("DotFilePatcher::run(): %s\n",qPrint(m_patchFile));
bool interactiveSVG_local = Config_getBool(INTERACTIVE_SVG);
bool isSVGFile = m_patchFile.right(4)==".svg";
int graphId = -1;
@@ -303,14 +303,14 @@ bool DotFilePatcher::run() const
graphId = map.graphId;
relPath = map.relPath;
//printf("DotFilePatcher::addSVGConversion: file=%s zoomable=%d\n",
- // m_patchFile.data(),map->zoomable);
+ // qPrint(m_patchFile),map->zoomable);
}
std::string tmpName = m_patchFile.str()+".tmp";
std::string patchFile = m_patchFile.str();
Dir thisDir;
if (!thisDir.rename(patchFile,tmpName))
{
- err("Failed to rename file %s to %s!\n",m_patchFile.data(),tmpName.c_str());
+ err("Failed to rename file %s to %s!\n",qPrint(m_patchFile),tmpName.c_str());
return FALSE;
}
std::ifstream fi(tmpName, std::ifstream::in);
@@ -323,7 +323,7 @@ bool DotFilePatcher::run() const
}
if (!fo.is_open())
{
- err("problem opening file %s for patching!\n",m_patchFile.data());
+ err("problem opening file %s for patching!\n",qPrint(m_patchFile));
thisDir.rename(tmpName,patchFile);
return FALSE;
}
@@ -337,7 +337,7 @@ bool DotFilePatcher::run() const
while (getline(fi,lineStr))
{
QCString line = lineStr+'\n';
- //printf("line=[%s]\n",line.stripWhiteSpace().data());
+ //printf("line=[%s]\n",qPrint(line.stripWhiteSpace()));
int i;
if (isSVGFile)
{
@@ -392,16 +392,16 @@ bool DotFilePatcher::run() const
int e = std::max(line.find("--]"),line.find("-->"));
const Map &map = m_maps.at(mapId);
//printf("DotFilePatcher::writeSVGFigure: file=%s zoomable=%d\n",
- // m_patchFile.data(),map.zoomable);
+ // qPrint(m_patchFile),map.zoomable);
if (!writeSVGFigureLink(t,map.relPath,map.label,map.mapFile))
{
- err("Problem extracting size from SVG file %s\n",map.mapFile.data());
+ err("Problem extracting size from SVG file %s\n",qPrint(map.mapFile));
}
if (e!=-1) t << line.mid(e+3);
}
else // error invalid map id!
{
- err("Found invalid SVG id in file %s!\n",m_patchFile.data());
+ err("Found invalid SVG id in file %s!\n",qPrint(m_patchFile));
t << line.mid(i);
}
}
@@ -415,7 +415,7 @@ bool DotFilePatcher::run() const
TextStream tt;
const Map &map = m_maps.at(mapId);
//printf("patching MAP %d in file %s with contents of %s\n",
- // mapId,m_patchFile.data(),map.mapFile.data());
+ // mapId,qPrint(m_patchFile),qPrint(map.mapFile));
convertMapFile(tt,map.mapFile,map.relPath,map.urlOnly,map.context);
if (!tt.empty())
{
@@ -426,7 +426,7 @@ bool DotFilePatcher::run() const
}
else // error invalid map id!
{
- err("Found invalid MAP id in file %s!\n",m_patchFile.data());
+ err("Found invalid MAP id in file %s!\n",qPrint(m_patchFile));
t << line.mid(i);
}
}
@@ -434,12 +434,12 @@ bool DotFilePatcher::run() const
{
int mapId=-1;
int n = sscanf(line.data()+i+2,"FIG %d",&mapId);
- //printf("line='%s' n=%d\n",line.data()+i,n);
+ //printf("line='%s' n=%d\n",qPrint(line)+i,n);
if (n==1 && mapId>=0 && mapId<(int)m_maps.size())
{
const Map &map = m_maps.at(mapId);
//printf("patching FIG %d in file %s with contents of %s\n",
- // mapId,m_patchFile.data(),map.mapFile.data());
+ // mapId,qPrint(m_patchFile),qPrint(map.mapFile));
if (!writeVecGfxFigure(t,map.label,map.mapFile))
{
err("problem writing FIG %d figure!\n",mapId);
@@ -448,7 +448,7 @@ bool DotFilePatcher::run() const
}
else // error invalid map id!
{
- err("Found invalid bounding FIG %d in file %s!\n",mapId,m_patchFile.data());
+ err("Found invalid bounding FIG %d in file %s!\n",mapId,qPrint(m_patchFile));
t << line;
}
}
@@ -468,7 +468,7 @@ bool DotFilePatcher::run() const
// keep original SVG file so we can refer to it, we do need to replace
// dummy link by real ones
fi.open(tmpName,std::ifstream::in);
- fo.open(orgName,std::ofstream::out | std::ofstream::binary);
+ fo.open(orgName.str(),std::ofstream::out | std::ofstream::binary);
if (!fi.is_open())
{
err("problem opening file %s for reading!\n",tmpName.c_str());
@@ -476,7 +476,7 @@ bool DotFilePatcher::run() const
}
if (!fo.is_open())
{
- err("problem opening file %s for writing!\n",orgName.data());
+ err("problem opening file %s for writing!\n",qPrint(orgName));
return FALSE;
}
t.setStream(&fo);
diff --git a/src/dotfilepatcher.h b/src/dotfilepatcher.h
index e0ac918..af2c855 100644
--- a/src/dotfilepatcher.h
+++ b/src/dotfilepatcher.h
@@ -26,8 +26,7 @@ class TextStream;
class DotFilePatcher
{
public:
- DotFilePatcher(const char *patchFile);
-
+ DotFilePatcher(const QCString &patchFile);
int addMap(const QCString &mapFile,const QCString &relPath,
bool urlOnly,const QCString &context,const QCString &label);
@@ -42,8 +41,8 @@ class DotFilePatcher
bool run() const;
bool isSVGFile() const;
- static bool convertMapFile(TextStream &t,const char *mapName,
- const QCString relPath, bool urlOnly=FALSE,
+ static bool convertMapFile(TextStream &t,const QCString &mapName,
+ const QCString &relPath, bool urlOnly=FALSE,
const QCString &context=QCString());
static bool writeSVGFigureLink(TextStream &out,const QCString &relPath,
diff --git a/src/dotgfxhierarchytable.cpp b/src/dotgfxhierarchytable.cpp
index 042e233..f7b95d9 100644
--- a/src/dotgfxhierarchytable.cpp
+++ b/src/dotgfxhierarchytable.cpp
@@ -29,7 +29,7 @@ QCString DotGfxHierarchyTable::getBaseName() const
if (m_prefix.isEmpty())
baseName.sprintf("inherit_graph_%d", m_graphId);
else
- baseName.sprintf("%sinherit_graph_%d",m_prefix.data(), m_graphId);
+ baseName.sprintf("%sinherit_graph_%d",qPrint(m_prefix), m_graphId);
return baseName;
}
@@ -62,7 +62,7 @@ QCString DotGfxHierarchyTable::getMapLabel() const
}
void DotGfxHierarchyTable::createGraph(DotNode *n,TextStream &out,
- const char *path,const char *fileName,int id)
+ const QCString &path,const QCString &fileName,int id)
{
m_rootSubgraphNode = n;
m_graphId = id;
@@ -72,18 +72,18 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,TextStream &out,
}
void DotGfxHierarchyTable::writeGraph(TextStream &out,
- const char *path,const char *fileName)
+ const QCString &path,const QCString &fileName)
{
//printf("DotGfxHierarchyTable::writeGraph(%s)\n",name);
//printf("m_rootNodes=%p count=%d\n",m_rootNodes,m_rootNodes->count());
if (m_rootSubgraphs.empty()) return;
- Dir d(path);
+ Dir d(path.str());
// store the original directory
if (!d.exists())
{
- term("Output dir %s does not exist!\n",path);
+ term("Output dir %s does not exist!\n",qPrint(path));
}
// put each connected subgraph of the hierarchy in a row of the HTML output
@@ -103,16 +103,16 @@ void DotGfxHierarchyTable::writeGraph(TextStream &out,
void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,ClassDefSet &visitedClasses)
{
- //printf("addHierarchy '%s' baseClasses=%d\n",cd->name().data(),cd->baseClasses()->count());
+ //printf("addHierarchy '%s' baseClasses=%d\n",qPrint(cd->name()),cd->baseClasses()->count());
for (const auto &bcd : cd->subClasses())
{
ClassDef *bClass=bcd.classDef;
- //printf(" Trying sub class='%s' usedNodes=%d\n",bClass->name().data(),m_usedNodes->count());
+ //printf(" Trying sub class='%s' usedNodes=%d\n",qPrint(bClass->name()),m_usedNodes->count());
if (bClass && bClass->isVisibleInHierarchy() && hasVisibleRoot(bClass->baseClasses()))
{
auto it = m_usedNodes.find(bClass->name().str());
- //printf(" Node '%s' Found visible class='%s'\n",n->label().data(),
- // bClass->name().data());
+ //printf(" Node '%s' Found visible class='%s'\n",qPrint(n->label()),
+ // qPrint(bClass->name()));
DotNode *root = 0;
if (it!=m_usedNodes.end()) // node already present
{
@@ -125,8 +125,8 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,ClassDefSe
n->addChild(bn.get(),bcd.prot);
bn->addParent(n);
//printf(" Adding node %s to existing base node %s (c=%d,p=%d)\n",
- // n->label().data(),
- // bn->label().data(),
+ // qPrint(n->label()),
+ // qPrint(bn->label()),
// bn->children() ? bn->children()->count() : 0,
// bn->parents() ? bn->parents()->count() : 0
// );
@@ -151,18 +151,18 @@ void DotGfxHierarchyTable::addHierarchy(DotNode *n,const ClassDef *cd,ClassDefSe
auto bn = std::make_unique<DotNode>(getNextNodeNumber(),
bClass->displayName(),
tooltip,
- tmp_url.data()
+ tmp_url
);
n->addChild(bn.get(),bcd.prot);
bn->addParent(n);
root = bn.get();
//printf(" Adding node %s to new base node %s (c=%d,p=%d)\n",
- // n->label().data(),
- // bn->label().data(),
+ // qPrint(n->label()),
+ // qPrint(bn->label()),
// bn->children() ? bn->children()->count() : 0,
// bn->parents() ? bn->parents()->count() : 0
// );
- //printf(" inserting %s (%p)\n",bClass->name().data(),bn);
+ //printf(" inserting %s (%p)\n",qPrint(bClass->name()),bn);
m_usedNodes.insert(std::make_pair(bClass->name().str(),std::move(bn))); // add node to the used list
}
if (visitedClasses.find(bClass)==visitedClasses.end() && !bClass->subClasses().empty())
@@ -179,7 +179,7 @@ void DotGfxHierarchyTable::addClassList(const ClassLinkedMap &cl,ClassDefSet &vi
{
for (const auto &cd : cl)
{
- //printf("Trying %s subClasses=%d\n",cd->name().data(),cd->subClasses()->count());
+ //printf("Trying %s subClasses=%d\n",qPrint(cd->name()),cd->subClasses()->count());
if (cd->getLanguage()==SrcLangExt_VHDL &&
(VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS
)
@@ -203,12 +203,12 @@ void DotGfxHierarchyTable::addClassList(const ClassLinkedMap &cl,ClassDefSet &vi
tmp_url+="#"+cd->anchor();
}
}
- //printf("Inserting root class %s\n",cd->name().data());
+ //printf("Inserting root class %s\n",qPrint(cd->name()));
QCString tooltip = cd->briefDescriptionAsTooltip();
auto n = std::make_unique<DotNode>(getNextNodeNumber(),
cd->displayName(),
tooltip,
- tmp_url.data());
+ tmp_url);
DotNode *root = n.get();
m_usedNodes.insert(std::make_pair(cd->name().str(),std::move(n)));
@@ -222,7 +222,7 @@ void DotGfxHierarchyTable::addClassList(const ClassLinkedMap &cl,ClassDefSet &vi
}
}
-DotGfxHierarchyTable::DotGfxHierarchyTable(const char *prefix,ClassDef::CompoundType ct)
+DotGfxHierarchyTable::DotGfxHierarchyTable(const QCString &prefix,ClassDef::CompoundType ct)
: m_prefix(prefix)
, m_classType(ct)
{
@@ -243,7 +243,7 @@ DotGfxHierarchyTable::DotGfxHierarchyTable(const char *prefix,ClassDef::Compound
{
if (n->subgraphId()==-1) // not yet colored
{
- //printf("Starting at node %s (%p): %d\n",n->label().data(),n,curColor);
+ //printf("Starting at node %s (%p): %d\n",qPrint(n->label()),n,curColor);
done=FALSE; // still uncolored nodes
n->setSubgraphId(curColor);
n->markAsVisible();
@@ -262,7 +262,7 @@ DotGfxHierarchyTable::DotGfxHierarchyTable(const char *prefix,ClassDef::Compound
for (auto n : m_rootSubgraphs)
{
//printf("Node %s color=%d (c=%d,p=%d)\n",
- // n->label().data(),n->m_subgraphId,
+ // qPrint(n->label()),n->m_subgraphId,
// n->children()?n->children()->count():0,
// n->parents()?n->parents()->count():0);
int number=0;
diff --git a/src/dotgfxhierarchytable.h b/src/dotgfxhierarchytable.h
index 9beff77..0d37881 100644
--- a/src/dotgfxhierarchytable.h
+++ b/src/dotgfxhierarchytable.h
@@ -31,10 +31,10 @@ class ClassLinkedMap;
class DotGfxHierarchyTable : public DotGraph
{
public:
- DotGfxHierarchyTable(const char *prefix="",ClassDef::CompoundType ct=ClassDef::Class);
- void createGraph(DotNode *rootNode,TextStream &t,const char *path,
- const char *fileName,int id);
- void writeGraph(TextStream &t,const char *path, const char *fileName);
+ DotGfxHierarchyTable(const QCString &prefix="",ClassDef::CompoundType ct=ClassDef::Class);
+ void createGraph(DotNode *rootNode,TextStream &t,const QCString &path,
+ const QCString &fileName,int id);
+ void writeGraph(TextStream &t,const QCString &path, const QCString &fileName);
const std::vector<DotNode*> subGraphs() const { return m_rootSubgraphs; }
protected:
diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp
index 9717502..6ab34c8 100644
--- a/src/dotgraph.cpp
+++ b/src/dotgraph.cpp
@@ -104,18 +104,18 @@ QCString DotGraph::imgName() const
}
QCString DotGraph::writeGraph(
- TextStream& t, // output stream for the code file (html, ...)
+ TextStream& t, // output stream for the code file (html, ...)
GraphOutputFormat gf, // bitmap(png/svg) or ps(eps/pdf)
EmbeddedOutputFormat ef, // html, latex, ...
- const char* path, // output folder
- const char* fileName, // name of the code file (for code patcher)
- const char* relPath, // output folder relative to code file
+ const QCString &path, // output folder
+ const QCString &fileName, // name of the code file (for code patcher)
+ const QCString &relPath, // output folder relative to code file
bool generateImageMap, // in case of bitmap, shall there be code generated?
int graphId) // number of this graph in the current code, used in svg code
{
m_graphFormat = gf;
m_textFormat = ef;
- m_dir = Dir(path);
+ m_dir = Dir(path.str());
m_fileName = fileName;
m_relPath = relPath;
m_generateImageMap = generateImageMap;
@@ -167,7 +167,7 @@ bool DotGraph::prepareDotFile()
std::ofstream f(absDotName().str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Could not open file %s for writing\n",absDotName().data());
+ err("Could not open file %s for writing\n",qPrint(absDotName()));
return TRUE;
}
f << m_theGraph;
@@ -176,14 +176,14 @@ bool DotGraph::prepareDotFile()
if (m_graphFormat == GOF_BITMAP)
{
// run dot to create a bitmap image
- DotRunner * dotRun = DotManager::instance()->createRunner(absDotName().data(), sigStr.data());
+ DotRunner * dotRun = DotManager::instance()->createRunner(absDotName(), sigStr);
dotRun->addJob(Config_getEnum(DOT_IMAGE_FORMAT), absImgName());
if (m_generateImageMap) dotRun->addJob(MAP_CMD, absMapName());
}
else if (m_graphFormat == GOF_EPS)
{
// run dot to create a .eps image
- DotRunner *dotRun = DotManager::instance()->createRunner(absDotName().data(), sigStr.data());
+ DotRunner *dotRun = DotManager::instance()->createRunner(absDotName(), sigStr);
if (Config_getBool(USE_PDFLATEX))
{
dotRun->addJob("pdf",absImgName());
@@ -223,11 +223,11 @@ void DotGraph::generateCode(TextStream &t)
if (m_regenerate)
{
DotManager::instance()->
- createFilePatcher(absImgName().data())->
+ createFilePatcher(absImgName())->
addSVGConversion(m_relPath,FALSE,QCString(),m_zoomable,m_graphId);
}
int mapId = DotManager::instance()->
- createFilePatcher(m_fileName.data())->
+ createFilePatcher(m_fileName)->
addSVGObject(m_baseName,absImgName(),m_relPath);
t << "<!-- SVG " << mapId << " -->\n";
}
@@ -242,7 +242,7 @@ void DotGraph::generateCode(TextStream &t)
if (m_regenerate || !insertMapFile(t, absMapName(), m_relPath, correctId(getMapLabel())))
{
int mapId = DotManager::instance()->
- createFilePatcher(m_fileName.data())->
+ createFilePatcher(m_fileName)->
addMap(absMapName(), m_relPath, m_urlOnly, QCString(), getMapLabel());
t << "<!-- MAP " << mapId << " -->\n";
}
@@ -253,7 +253,7 @@ void DotGraph::generateCode(TextStream &t)
if (m_regenerate || !DotFilePatcher::writeVecGfxFigure(t,m_baseName,absBaseName()))
{
int figId = DotManager::instance()->
- createFilePatcher(m_fileName.data())->
+ createFilePatcher(m_fileName)->
addFigure(m_baseName,absBaseName(),FALSE /*TRUE*/);
t << "\n% FIG " << figId << "\n";
}
diff --git a/src/dotgraph.h b/src/dotgraph.h
index 5dc03f9..2a77504 100644
--- a/src/dotgraph.h
+++ b/src/dotgraph.h
@@ -43,9 +43,9 @@ class DotGraph
QCString writeGraph(TextStream &t,
GraphOutputFormat gf,
EmbeddedOutputFormat ef,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool writeImageMap=TRUE,
int graphId=-1
);
diff --git a/src/dotgroupcollaboration.cpp b/src/dotgroupcollaboration.cpp
index 5157778..d409d50 100644
--- a/src/dotgroupcollaboration.cpp
+++ b/src/dotgroupcollaboration.cpp
@@ -241,7 +241,7 @@ QCString DotGroupCollaboration::getMapLabel() const
QCString DotGroupCollaboration::writeGraph( TextStream &t,
GraphOutputFormat graphFormat, EmbeddedOutputFormat textFormat,
- const char *path, const char *fileName, const char *relPath,
+ const QCString &path, const QCString &fileName, const QCString &relPath,
bool generateImageMap,int graphId)
{
m_doNotAddImageToIndex = TRUE;
diff --git a/src/dotgroupcollaboration.h b/src/dotgroupcollaboration.h
index 7353be9..872e7f7 100644
--- a/src/dotgroupcollaboration.h
+++ b/src/dotgroupcollaboration.h
@@ -29,7 +29,7 @@ class DotGroupCollaboration : public DotGraph
DotGroupCollaboration(const GroupDef* gd);
~DotGroupCollaboration();
QCString writeGraph(TextStream &t, GraphOutputFormat gf,EmbeddedOutputFormat ef,
- const char *path,const char *fileName,const char *relPath,
+ const QCString &path,const QCString &fileName,const QCString &relPath,
bool writeImageMap=TRUE,int graphId=-1);
bool isTrivial() const;
@@ -52,7 +52,7 @@ class DotGroupCollaboration : public DotGraph
struct Link
{
- Link(const QCString lab,const QCString &u) : label(lab), url(u) {}
+ Link(const QCString &lab,const QCString &u) : label(lab), url(u) {}
QCString label;
QCString url;
};
diff --git a/src/dotincldepgraph.cpp b/src/dotincldepgraph.cpp
index 87b44ce..5a2f7ca 100644
--- a/src/dotincldepgraph.cpp
+++ b/src/dotincldepgraph.cpp
@@ -26,7 +26,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
{
const FileDef *bfd = ii.fileDef;
QCString in = ii.includeName;
- //printf(">>>> in='%s' bfd=%p\n",ii->includeName.data(),bfd);
+ //printf(">>>> in='%s' bfd=%p\n",qPrint(ii->includeName),bfd);
bool doc=TRUE,src=FALSE;
if (bfd)
{
@@ -37,7 +37,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
if (doc || src || !Config_getBool(HIDE_UNDOC_RELATIONS))
{
QCString url="";
- if (bfd) url=bfd->getOutputFileBase().copy();
+ if (bfd) url=bfd->getOutputFileBase();
if (!doc && src)
{
url=bfd->getSourceFileBase();
@@ -46,7 +46,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
if (it!=m_usedNodes.end()) // file is already a node in the graph
{
DotNode *bn = it->second;
- n->addChild(bn,0,0,0);
+ n->addChild(bn,0,0);
bn->addParent(n);
bn->setDistance(distance);
}
@@ -65,7 +65,7 @@ void DotInclDepGraph::buildGraph(DotNode *n,const FileDef *fd,int distance)
tmp_url, // url
FALSE, // rootNode
0); // cd
- n->addChild(bn,0,0,0);
+ n->addChild(bn,0,0);
bn->addParent(n);
m_usedNodes.insert(std::make_pair(in.str(),bn));
bn->setDistance(distance);
@@ -131,7 +131,7 @@ DotInclDepGraph::DotInclDepGraph(const FileDef *fd,bool inverse)
m_startNode = new DotNode(getNextNodeNumber(),
fd->docName(),
tooltip,
- tmp_url.data(),
+ tmp_url,
TRUE); // root node
m_startNode->setDistance(0);
m_usedNodes.insert(std::make_pair(fd->absFilePath().str(),m_startNode));
@@ -184,9 +184,9 @@ QCString DotInclDepGraph::getMapLabel() const
QCString DotInclDepGraph::writeGraph(TextStream &out,
GraphOutputFormat graphFormat,
EmbeddedOutputFormat textFormat,
- const char *path,
- const char *fileName,
- const char *relPath,
+ const QCString &path,
+ const QCString &fileName,
+ const QCString &relPath,
bool generateImageMap,
int graphId)
{
diff --git a/src/dotincldepgraph.h b/src/dotincldepgraph.h
index e253be1..a0e58bf 100644
--- a/src/dotincldepgraph.h
+++ b/src/dotincldepgraph.h
@@ -31,7 +31,7 @@ class DotInclDepGraph : public DotGraph
DotInclDepGraph(const FileDef *fd,bool inverse);
~DotInclDepGraph();
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef,
- const char *path,const char *fileName,const char *relPath,
+ const QCString &path,const QCString &fileName,const QCString &relPath,
bool writeImageMap=TRUE,int graphId=-1);
bool isTrivial() const;
bool isTooBig() const;
diff --git a/src/dotlegendgraph.cpp b/src/dotlegendgraph.cpp
index 53e2a7a..f512fa2 100644
--- a/src/dotlegendgraph.cpp
+++ b/src/dotlegendgraph.cpp
@@ -23,7 +23,7 @@
#include "language.h"
#include "dotfilepatcher.h"
-void DotLegendGraph::writeGraph(const char *path)
+void DotLegendGraph::writeGraph(const QCString &path)
{
TextStream ts;
DotGraph::writeGraph(ts, GOF_BITMAP, EOF_Html, path, "", "", FALSE, 0);
@@ -31,7 +31,7 @@ void DotLegendGraph::writeGraph(const char *path)
if (getDotImageExtension()=="svg")
{
DotManager::instance()->
- createFilePatcher((absBaseName()+Config_getString(HTML_FILE_EXTENSION)).data())->
+ createFilePatcher(absBaseName()+Config_getString(HTML_FILE_EXTENSION))->
addSVGObject("graph_legend", absImgName(),QCString());
}
}
diff --git a/src/dotlegendgraph.h b/src/dotlegendgraph.h
index 2d8eeec..2adf625 100644
--- a/src/dotlegendgraph.h
+++ b/src/dotlegendgraph.h
@@ -22,7 +22,7 @@
class DotLegendGraph : public DotGraph
{
public:
- void writeGraph(const char *path);
+ void writeGraph(const QCString &path);
private:
virtual QCString getBaseName() const;
diff --git a/src/dotnode.cpp b/src/dotnode.cpp
index 1d3d920..8dcfaaf 100644
--- a/src/dotnode.cpp
+++ b/src/dotnode.cpp
@@ -122,9 +122,9 @@ static UmlDetailLevel getUmlDetailLevelFromConfig()
static QCString escapeTooltip(const QCString &tooltip)
{
+ if (tooltip.isEmpty()) return tooltip;
QCString result;
const char *p=tooltip.data();
- if (p==0) return result;
char c;
while ((c=*p++))
{
@@ -286,7 +286,7 @@ static QCString stripProtectionPrefix(const QCString &s)
}
}
-DotNode::DotNode(int n,const char *lab,const char *tip, const char *url,
+DotNode::DotNode(int n,const QCString &lab,const QCString &tip, const QCString &url,
bool isRoot,const ClassDef *cd)
: m_number(n)
, m_label(lab)
@@ -304,8 +304,8 @@ DotNode::~DotNode()
void DotNode::addChild(DotNode *n,
int edgeColor,
int edgeStyle,
- const char *edgeLab,
- const char *edgeURL,
+ const QCString &edgeLab,
+ const QCString &edgeURL,
int edgeLabCol
)
{
@@ -411,7 +411,7 @@ void DotNode::writeBox(TextStream &t,
}
}
- //printf("DotNode::writeBox for %s\n",m_classDef->name().data());
+ //printf("DotNode::writeBox for %s\n",qPrint(m_classDef->name()));
t << "{" << convertLabel(m_label) << "\\n";
if (getUmlDetailLevelFromConfig()!=UmlDetailLevel::None)
{
@@ -558,7 +558,7 @@ void DotNode::write(TextStream &t,
bool toChildren,
bool backArrows) const
{
- //printf("DotNode::write(%d) name=%s this=%p written=%d visible=%d\n",m_distance,m_label.data(),this,m_written,m_visible);
+ //printf("DotNode::write(%d) name=%s this=%p written=%d visible=%d\n",m_distance,qPrint(m_label),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);
@@ -570,7 +570,7 @@ void DotNode::write(TextStream &t,
{
if (cn->isVisible())
{
- //printf("write arrow %s%s%s\n",label().data(),backArrows?"<-":"->",cn->label().data());
+ //printf("write arrow %s%s%s\n",qPrint(label()),backArrows?"<-":"->",qPrint(cn->label()));
writeArrow(t,gt,format,cn,&(*it),topDown,backArrows);
}
cn->write(t,gt,format,topDown,toChildren,backArrows);
@@ -586,7 +586,7 @@ void DotNode::write(TextStream &t,
const auto &children = pn->children();
auto child_it = std::find(children.begin(),children.end(),this);
size_t index = child_it - children.begin();
- //printf("write arrow %s%s%s\n",label().data(),backArrows?"<-":"->",pn->label().data());
+ //printf("write arrow %s%s%s\n",qPrint(label()),backArrows?"<-":"->",qPrint(pn->label()));
writeArrow(t,
gt,
format,
@@ -599,7 +599,7 @@ void DotNode::write(TextStream &t,
pn->write(t,gt,format,TRUE,FALSE,backArrows);
}
}
- //printf("end DotNode::write(%d) name=%s\n",distance,m_label.data());
+ //printf("end DotNode::write(%d) name=%s\n",distance,qPrint(m_label));
}
void DotNode::writeXML(TextStream &t,bool isClassGraph) const
@@ -807,7 +807,7 @@ void DotNode::colorConnectedNodes(int curColor)
cn->setSubgraphId(curColor);
cn->markAsVisible();
cn->colorConnectedNodes(curColor);
- //printf("coloring node %s (%p): %d\n",cn->label().data(),cn,cn->subgraphId());
+ //printf("coloring node %s (%p): %d\n",qPrint(cn->label()),cn,cn->subgraphId());
}
}
@@ -818,7 +818,7 @@ void DotNode::colorConnectedNodes(int curColor)
pn->setSubgraphId(curColor);
pn->markAsVisible();
pn->colorConnectedNodes(curColor);
- //printf("coloring node %s (%p): %d\n",pn->label().data(),pn,pn->subgraphId());
+ //printf("coloring node %s (%p): %d\n",qPrint(pn->label()),pn,pn->subgraphId());
}
}
}
@@ -839,7 +839,7 @@ void DotNode::renumberNodes(int &number)
const DotNode *DotNode::findDocNode() const
{
if (!m_url.isEmpty()) return this;
- //printf("findDocNode(): '%s'\n",m_label.data());
+ //printf("findDocNode(): '%s'\n",qPrint(m_label));
for (const auto &pn : m_parents)
{
if (!pn->hasDocumentation())
diff --git a/src/dotnode.h b/src/dotnode.h
index 7d1dd62..cd1e75b 100644
--- a/src/dotnode.h
+++ b/src/dotnode.h
@@ -58,7 +58,7 @@ class DotNode
public:
static void deleteNodes(DotNode* node);
static QCString convertLabel(const QCString& l);
- DotNode(int n,const char *lab,const char *tip,const char *url,
+ DotNode(int n,const QCString &lab,const QCString &tip,const QCString &url,
bool rootNode=FALSE,const ClassDef *cd=0);
~DotNode();
@@ -67,8 +67,8 @@ class DotNode
void addChild(DotNode *n,
int edgeColor=EdgeInfo::Purple,
int edgeStyle=EdgeInfo::Solid,
- const char *edgeLab=0,
- const char *edgeURL=0,
+ const QCString &edgeLab=QCString(),
+ const QCString &edgeURL=QCString(),
int edgeLabCol=-1);
void addParent(DotNode *n);
void deleteNode(DotNodeRefVector &deletedList);
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index 7c31c85..f9f077d 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -33,7 +33,7 @@
// since dot silently reproduces the input file when it does not
// support the PNG format, we need to check the result.
-static void checkPngResult(const char *imgName)
+static void checkPngResult(const QCString &imgName)
{
FILE *f = Portable::fopen(imgName,"rb");
if (f)
@@ -46,43 +46,43 @@ static void checkPngResult(const char *imgName)
err("Image '%s' produced by dot is not a valid PNG!\n"
"You should either select a different format "
"(DOT_IMAGE_FORMAT in the config file) or install a more "
- "recent version of graphviz (1.7+)\n",imgName
+ "recent version of graphviz (1.7+)\n",qPrint(imgName)
);
}
}
else
{
- err("Could not read image '%s' generated by dot!\n",imgName);
+ err("Could not read image '%s' generated by dot!\n",qPrint(imgName));
}
fclose(f);
}
else
{
- err("Could not open image '%s' generated by dot!\n",imgName);
+ err("Could not open image '%s' generated by dot!\n",qPrint(imgName));
}
}
-static bool resetPDFSize(const int width,const int height, const char *base)
+static bool resetPDFSize(const int width,const int height, const QCString &base)
{
- std::string tmpName = std::string(base)+".tmp";
- std::string patchFile = std::string(base)+".dot";
+ std::string tmpName = base.str()+".tmp";
+ std::string patchFile = base.str()+".dot";
Dir thisDir;
if (!thisDir.rename(patchFile,tmpName))
{
- err("Failed to rename file %s to %s!\n",patchFile.data(),tmpName.data());
+ err("Failed to rename file %s to %s!\n",qPrint(patchFile),qPrint(tmpName));
return FALSE;
}
std::ifstream fi(tmpName,std::ifstream::in);
std::ofstream t(patchFile,std::ofstream::out | std::ofstream::binary);
if (!fi.is_open())
{
- err("problem opening file %s for patching!\n",tmpName.data());
+ err("problem opening file %s for patching!\n",qPrint(tmpName));
thisDir.rename(tmpName,patchFile);
return FALSE;
}
if (!t.is_open())
{
- err("problem opening file %s for patching!\n",patchFile.data());
+ err("problem opening file %s for patching!\n",qPrint(patchFile));
thisDir.rename(tmpName,patchFile);
return FALSE;
}
@@ -104,7 +104,7 @@ static bool resetPDFSize(const int width,const int height, const char *base)
return TRUE;
}
-bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool isEps)
+bool DotRunner::readBoundingBox(const QCString &fileName,int *width,int *height,bool isEps)
{
const char *bb = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
int bblen = (int)strlen(bb);
@@ -131,23 +131,23 @@ bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool
return TRUE;
}
}
- err("Failed to extract bounding box from generated diagram file %s\n",fileName);
+ err("Failed to extract bounding box from generated diagram file %s\n",qPrint(fileName));
fclose(f);
return FALSE;
}
//---------------------------------------------------------------------------------
-DotRunner::DotRunner(const std::string& absDotName, const std::string& md5Hash)
- : m_file(absDotName.data())
- , m_md5Hash(md5Hash.data())
+DotRunner::DotRunner(const QCString& absDotName, const QCString& md5Hash)
+ : m_file(absDotName)
+ , m_md5Hash(md5Hash)
, m_dotExe(Config_getString(DOT_PATH)+"dot")
, m_cleanUp(Config_getBool(DOT_CLEANUP))
{
}
-void DotRunner::addJob(const char *format, const char *output)
+void DotRunner::addJob(const QCString &format, const QCString &output)
{
for (auto& s: m_jobs)
@@ -157,8 +157,8 @@ void DotRunner::addJob(const char *format, const char *output)
// we have this job already
return;
}
- auto args = std::string ("-T") + format + " -o \"" + output + "\"";
- m_jobs.emplace_back(format, output, args);
+ auto args = QCString("-T") + format + " -o \"" + output + "\"";
+ m_jobs.emplace_back(format.str(), output, args);
}
QCString getBaseNameOfOutput(const QCString &output)
@@ -177,20 +177,20 @@ bool DotRunner::run()
// create output
if (Config_getBool(DOT_MULTI_TARGETS))
{
- dotArgs=QCString("\"")+m_file.data()+"\"";
+ dotArgs=QCString("\"")+m_file+"\"";
for (auto& s: m_jobs)
{
dotArgs+=' ';
- dotArgs+=s.args.data();
+ dotArgs+=s.args;
}
- if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if ((exitCode=Portable::system(m_dotExe,dotArgs,FALSE))!=0) goto error;
}
else
{
for (auto& s : m_jobs)
{
- dotArgs=QCString("\"")+m_file.data()+"\" "+s.args.data();
- if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ dotArgs=QCString("\"")+m_file+"\" "+s.args;
+ if ((exitCode=Portable::system(m_dotExe,dotArgs,FALSE))!=0) goto error;
}
}
@@ -198,35 +198,35 @@ bool DotRunner::run()
// As there should be only one pdf file be generated, we don't need code for regenerating multiple pdf files in one call
for (auto& s : m_jobs)
{
- if (s.format.compare(0, 3, "pdf") == 0)
+ if (s.format.left(3)=="pdf")
{
int width=0,height=0;
- if (!readBoundingBox(s.output.data(),&width,&height,FALSE)) goto error;
+ if (!readBoundingBox(s.output,&width,&height,FALSE)) goto error;
if ((width > MAX_LATEX_GRAPH_SIZE) || (height > MAX_LATEX_GRAPH_SIZE))
{
- if (!resetPDFSize(width,height,getBaseNameOfOutput(s.output.data()))) goto error;
- dotArgs=QCString("\"")+m_file.data()+"\" "+s.args.data();
- if ((exitCode=Portable::system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if (!resetPDFSize(width,height,getBaseNameOfOutput(s.output))) goto error;
+ dotArgs=QCString("\"")+m_file+"\" "+s.args;
+ if ((exitCode=Portable::system(m_dotExe,dotArgs,FALSE))!=0) goto error;
}
}
- if (s.format.compare(0, 3, "png") == 0)
+ if (s.format.left(3)=="png")
{
- checkPngResult(s.output.data());
+ checkPngResult(s.output);
}
}
// remove .dot files
if (m_cleanUp)
{
- //printf("removing dot file %s\n",m_file.data());
- Portable::unlink(m_file.data());
+ //printf("removing dot file %s\n",qPrint(m_file));
+ Portable::unlink(m_file);
}
// create checksum file
- if (!m_md5Hash.empty())
+ if (!m_md5Hash.isEmpty())
{
- QCString md5Name = getBaseNameOfOutput(m_file.data()) + ".md5";
+ QCString md5Name = getBaseNameOfOutput(m_file) + ".md5";
FILE *f = Portable::fopen(md5Name,"w");
if (f)
{
@@ -237,7 +237,7 @@ bool DotRunner::run()
return TRUE;
error:
err("Problems running dot: exit code=%d, command='%s', arguments='%s'\n",
- exitCode,m_dotExe.data(),dotArgs.data());
+ exitCode,qPrint(m_dotExe),qPrint(dotArgs));
return FALSE;
}
diff --git a/src/dotrunner.h b/src/dotrunner.h
index 1b54617..19bdc79 100644
--- a/src/dotrunner.h
+++ b/src/dotrunner.h
@@ -24,26 +24,28 @@
#include <condition_variable>
#include <memory>
+#include "qcstring.h"
+
/** Helper class to run dot from doxygen from multiple threads. */
class DotRunner
{
struct DotJob
{
- DotJob(std::string f, std::string o, std::string a)
+ DotJob(const QCString &f, const QCString &o, const QCString &a)
: format(f), output(o), args(a) {}
- std::string format;
- std::string output;
- std::string args;
+ QCString format;
+ QCString output;
+ QCString args;
};
public:
/** Creates a runner for a dot \a file. */
- DotRunner(const std::string& absDotName, const std::string& md5Hash = std::string());
+ DotRunner(const QCString & absDotName, const QCString& md5Hash = QCString());
/** Adds an additional job to the run.
* Performing multiple jobs one file can be faster.
*/
- void addJob(const char *format,const char *output);
+ void addJob(const QCString &format,const QCString &output);
/** Prevent cleanup of the dot file (for user provided dot files) */
void preventCleanUp() { m_cleanUp = false; }
@@ -51,16 +53,15 @@ class DotRunner
/** Runs dot for all jobs added. */
bool run();
- // DotConstString const& getFileName() { return m_file; }
- std::string const & getMd5Hash() { return m_md5Hash; }
+ QCString getMd5Hash() { return m_md5Hash; }
- static bool readBoundingBox(const char* fileName, int* width, int* height, bool isEps);
+ static bool readBoundingBox(const QCString &fileName, int* width, int* height, bool isEps);
private:
- std::string m_file;
- std::string m_md5Hash;
- std::string m_dotExe;
- bool m_cleanUp;
+ QCString m_file;
+ QCString m_md5Hash;
+ QCString m_dotExe;
+ bool m_cleanUp;
std::vector<DotJob> m_jobs;
};
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 880a3f4..3850448 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -248,7 +248,7 @@ class Statistics
} g_s;
-static void addMemberDocs(const Entry *root,MemberDefMutable *md, const char *funcDecl,
+static void addMemberDocs(const Entry *root,MemberDefMutable *md, const QCString &funcDecl,
const ArgumentList *al,bool over_load,uint64 spec);
static void findMember(const Entry *root,
const QCString &relates,
@@ -309,7 +309,7 @@ static void addRelatedPage(Entry *root)
{
if (!g.groupname.isEmpty() && (gd=Doxygen::groupLinkedMap->find(g.groupname))) break;
}
- //printf("---> addRelatedPage() %s gd=%p\n",root->name.data(),gd);
+ //printf("---> addRelatedPage() %s gd=%p\n",qPrint(root->name),gd);
QCString doc;
if (root->brief.isEmpty())
{
@@ -350,7 +350,7 @@ static void buildGroupListFiltered(const Entry *root,bool additional, bool inclu
{
GroupDef *gd = Doxygen::groupLinkedMap->find(root->name);
//printf("Processing group '%s':'%s' add=%d ext=%d gd=%p\n",
- // root->type.data(),root->name.data(),additional,includeExternal,gd);
+ // qPrint(root->type),qPrint(root->name),additional,includeExternal,gd);
if (gd)
{
@@ -449,7 +449,7 @@ static void organizeSubGroupsFiltered(const Entry *root,bool additional)
GroupDef *gd;
if ((gd=Doxygen::groupLinkedMap->find(root->name)))
{
- //printf("adding %s to group %s\n",root->name.data(),gd->name().data());
+ //printf("adding %s to group %s\n",qPrint(root->name),qPrint(gd->name()));
addGroupToGroups(root,gd);
}
}
@@ -488,7 +488,7 @@ static void buildFileList(const Entry *root)
fd=findFileDef(Doxygen::inputNameLinkedMap,fn.left(newIndex) + "/" + root->name,ambig);
if (!fd) ambig = save_ambig;
}
- //printf("**************** root->name=%s fd=%p\n",root->name.data(),fd);
+ //printf("**************** root->name=%s fd=%p\n",qPrint(root->name),fd);
if (fd && !ambig)
{
//printf("Adding documentation!\n");
@@ -506,13 +506,12 @@ static void buildFileList(const Entry *root)
{
gd->addFile(fd);
fd->makePartOfGroup(gd);
- //printf("File %s: in group %s\n",fd->name().data(),s->data());
+ //printf("File %s: in group %s\n",qPrint(fd->name()),qPrint(gd->name()));
}
}
}
else
{
- const char *fn = root->fileName.data();
QCString text(4096);
text.sprintf("the name '%s' supplied as "
"the argument in the \\file statement ",
@@ -528,7 +527,7 @@ static void buildFileList(const Entry *root)
{
text+="is not an input file";
}
- warn(fn,root->startLine,"%s", text.data());
+ warn(root->fileName,root->startLine,"%s", qPrint(text));
}
}
for (const auto &e : root->children()) buildFileList(e.get());
@@ -544,7 +543,7 @@ static void addIncludeFile(DefMutable *cd,FileDef *ifd,const Entry *root)
) && root->protection!=Private
)
{
- //printf(">>>>>> includeFile=%s\n",root->includeFile.data());
+ //printf(">>>>>> includeFile=%s\n",qPrint(root->includeFile));
bool local=Config_getBool(FORCE_LOCAL_INCLUDES);
QCString includeFile = root->includeFile;
@@ -562,7 +561,7 @@ static void addIncludeFile(DefMutable *cd,FileDef *ifd,const Entry *root)
bool ambig;
FileDef *fd=0;
// see if we need to include a verbatim copy of the header file
- //printf("root->includeFile=%s\n",root->includeFile.data());
+ //printf("root->includeFile=%s\n",qPrint(root->includeFile));
if (!includeFile.isEmpty() &&
(fd=findFileDef(Doxygen::inputNameLinkedMap,includeFile,ambig))==0
)
@@ -583,7 +582,7 @@ static void addIncludeFile(DefMutable *cd,FileDef *ifd,const Entry *root)
{
text+="is not an input file";
}
- warn(root->fileName,root->startLine, "%s", text.data());
+ warn(root->fileName,root->startLine, "%s", qPrint(text));
}
else if (includeFile.isEmpty() && ifd &&
// see if the file extension makes sense
@@ -643,7 +642,7 @@ static bool addNamespace(Entry *root,ClassDef *cd)
{
NamespaceDef *nd=0;
QCString nsName = stripAnonymousNamespaceScope(e->name);
- //printf("addNameSpace() trying: %s\n",nsName.data());
+ //printf("addNameSpace() trying: %s\n",qPrint(nsName));
if (!nsName.isEmpty() && nsName.at(0)!='@' &&
(nd=getResolvedNamespace(nsName))
)
@@ -665,14 +664,14 @@ static bool addNamespace(Entry *root,ClassDef *cd)
static Definition *findScope(Entry *root,int level=0)
{
if (root==0) return 0;
- //printf("start findScope name=%s\n",root->name.data());
+ //printf("start findScope name=%s\n",qPrint(root->name));
Definition *result=0;
if (root->section&Entry::SCOPE_MASK)
{
result = findScope(root->parent,level+1); // traverse to the root of the tree
if (result)
{
- //printf("Found %s inside %s at level %d\n",root->name.data(),result->name().data(),level);
+ //printf("Found %s inside %s at level %d\n",qPrint(root->name),qPrint(result->name()),level);
// TODO: look at template arguments
result = result->findInnerCompound(root->name);
}
@@ -680,11 +679,11 @@ static Definition *findScope(Entry *root,int level=0)
{
// TODO: look at template arguments
result = Doxygen::globalScope->findInnerCompound(root->name);
- //printf("Found in globalScope %s at level %d\n",result->name().data(),level);
+ //printf("Found in globalScope %s at level %d\n",qPrint(result->name()),level);
}
}
- //printf("end findScope(%s,%d)=%s\n",root->name.data(),
- // level,result==0 ? "<none>" : result->name().data());
+ //printf("end findScope(%s,%d)=%s\n",qPrint(root->name),
+ // level,result==0 ? "<none>" : qPrint(result->name()));
return result;
}
#endif
@@ -707,7 +706,7 @@ QCString stripTemplateSpecifiers(const QCString &s)
}
if (c=='>' && round==0 && count>0) count--;
}
- //printf("stripTemplateSpecifiers(%s)=%s\n",s.data(),result.data());
+ //printf("stripTemplateSpecifiers(%s)=%s\n",qPrint(s),qPrint(result));
return result;
}
@@ -715,11 +714,11 @@ QCString stripTemplateSpecifiers(const QCString &s)
* full qualified name \a name. Creates an artificial scope if the scope is
* not found and set the parent/child scope relation if the scope is found.
*/
-static Definition *buildScopeFromQualifiedName(const QCString name_,SrcLangExt lang,const TagInfo *tagInfo)
+static Definition *buildScopeFromQualifiedName(const QCString &name_,SrcLangExt lang,const TagInfo *tagInfo)
{
QCString name = stripTemplateSpecifiers(name_);
int level = name.contains("::");
- //printf("buildScopeFromQualifiedName(%s) level=%d\n",name.data(),level);
+ //printf("buildScopeFromQualifiedName(%s) level=%d\n",qPrint(name),level);
int i=0;
int p=0,l;
Definition *prevScope=Doxygen::globalScope;
@@ -743,7 +742,7 @@ static Definition *buildScopeFromQualifiedName(const QCString name_,SrcLangExt l
else if (nd==0 && cd==0 && fullScope.find('<')==-1) // scope is not known and could be a namespace!
{
// introduce bogus namespace
- //printf("++ adding dummy namespace %s to %s tagInfo=%p\n",nsName.data(),prevScope->name().data(),tagInfo);
+ //printf("++ adding dummy namespace %s to %s tagInfo=%p\n",qPrint(nsName),qPrint(prevScope->name()),tagInfo);
NamespaceDefMutable *newNd=
toNamespaceDefMutable(
Doxygen::namespaceLinkedMap->add(fullScope,
@@ -788,7 +787,7 @@ static Definition *buildScopeFromQualifiedName(const QCString name_,SrcLangExt l
static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,const QCString &n,
FileDef *fileScope,const TagInfo *tagInfo)
{
- //printf("<findScopeFromQualifiedName(%s,%s)\n",startScope ? startScope->name().data() : 0, n.data());
+ //printf("<findScopeFromQualifiedName(%s,%s)\n",startScope ? qPrint(startScope->name()) : 0, qPrint(n));
Definition *resultScope=toDefinition(startScope);
if (resultScope==0) resultScope=Doxygen::globalScope;
QCString scope=stripTemplateSpecifiersFromScope(n,FALSE);
@@ -804,7 +803,7 @@ static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,co
{
QCString nestedNameSpecifier = scope.mid(i1,l1);
Definition *orgScope = resultScope;
- //printf(" nestedNameSpecifier=%s\n",nestedNameSpecifier.data());
+ //printf(" nestedNameSpecifier=%s\n",qPrint(nestedNameSpecifier));
resultScope = const_cast<Definition*>(resultScope->findInnerCompound(nestedNameSpecifier));
//printf(" resultScope=%p\n",resultScope);
if (resultScope==0)
@@ -822,7 +821,7 @@ static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,co
// for a nested class A::I in used namespace N, we get
// N::A::I while looking for A, so we should compare
// resultScope->name() against scope.left(i2+l2)
- //printf(" -> result=%s scope=%s\n",resultScope->name().data(),scope.data());
+ //printf(" -> result=%s scope=%s\n",qPrint(resultScope->name()),qPrint(scope));
if (rightScopeMatch(resultScope->name(),scope.left(i2+l2)))
{
break;
@@ -845,16 +844,16 @@ static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,co
// so use this instead.
QCString fqn = QCString(usedName) + scope.right(scope.length()-p);
resultScope = buildScopeFromQualifiedName(fqn,startScope->getLanguage(),0);
- //printf("Creating scope from fqn=%s result %p\n",fqn.data(),resultScope);
+ //printf("Creating scope from fqn=%s result %p\n",qPrint(fqn),resultScope);
if (resultScope)
{
- //printf("> Match! resultScope=%s\n",resultScope->name().data());
+ //printf("> Match! resultScope=%s\n",qPrint(resultScope->name()));
return resultScope;
}
}
}
- //printf("> name %s not found in scope %s\n",nestedNameSpecifier.data(),orgScope->name().data());
+ //printf("> name %s not found in scope %s\n",qPrint(nestedNameSpecifier),qPrint(orgScope->name()));
return 0;
}
nextFragment:
@@ -862,7 +861,7 @@ static Definition *findScopeFromQualifiedName(NamespaceDefMutable *startScope,co
l1=l2;
p=i2+l2;
}
- //printf(">findScopeFromQualifiedName scope %s\n",resultScope->name().data());
+ //printf(">findScopeFromQualifiedName scope %s\n",qPrint(resultScope->name()));
return resultScope;
}
@@ -987,7 +986,7 @@ static void addClassToContext(const Entry *root)
Debug::print(Debug::Classes,0," Existing class %s!\n",qPrint(cd->name()));
//if (cd->templateArguments()==0)
//{
- // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
+ // //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,qPrint(root->scopeSpec));
// cd->setTemplateArguments(tArgList);
//}
@@ -1033,7 +1032,7 @@ static void addClassToContext(const Entry *root)
extractNamespaceName(fullName,className,namespaceName);
//printf("New class: fullname %s namespace '%s' name='%s' brief='%s' docs='%s'\n",
- // fullName.data(),namespaceName.data(),className.data(),root->brief.data(),root->doc.data());
+ // qPrint(fullName),qPrint(namespaceName),qPrint(className),qPrint(root->brief),qPrint(root->doc));
QCString tagName;
QCString refFileName;
@@ -1063,7 +1062,7 @@ static void addClassToContext(const Entry *root)
tArgList = getTemplateArgumentsFromName(fullName,root->tArgLists);
}
// add class to the list
- //printf("ClassDict.insert(%s)\n",fullName.data());
+ //printf("ClassDict.insert(%s)\n",qPrint(fullName));
cd = toClassDefMutable(
Doxygen::classLinkedMap->add(fullName,
std::unique_ptr<ClassDef>(
@@ -1081,10 +1080,10 @@ static void addClassToContext(const Entry *root)
cd->setArtificial(root->artificial);
cd->setClassSpecifier(root->spec);
cd->setTypeConstraints(root->typeConstr);
- //printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
+ //printf("new ClassDef %s tempArgList=%p specScope=%s\n",qPrint(fullName),root->tArgList,qPrint(root->scopeSpec));
- //printf("class %s template args=%s\n",fullName.data(),
- // tArgList ? tempArgListToString(tArgList,root->lang).data() : "<none>");
+ //printf("class %s template args=%s\n",qPrint(fullName),
+ // tArgList ? tempArgListToString(tArgList,qPrint(root->lang)) : "<none>");
if (tArgList)
{
cd->setTemplateArguments(*tArgList);
@@ -1123,9 +1122,9 @@ static void addClassToContext(const Entry *root)
if (fd && (root->section & Entry::COMPOUND_MASK))
{
//printf(">> Inserting class '%s' in file '%s' (root->fileName='%s')\n",
- // cd->name().data(),
- // fd->name().data(),
- // root->fileName.data()
+ // qPrint(cd->name()),
+ // qPrint(fd->name()),
+ // qPrint(root->fileName)
// );
cd->setFileDef(fd);
fd->insertClass(cd);
@@ -1206,7 +1205,7 @@ static void addConceptToContext(const Entry *root)
extractNamespaceName(qualifiedName,className,namespaceName);
//printf("New concept: fullname %s namespace '%s' name='%s' brief='%s' docs='%s'\n",
- // qualifiedName.data(),namespaceName.data(),className.data(),root->brief.data(),root->doc.data());
+ // qPrint(qualifiedName),qPrint(namespaceName),qPrint(className),qPrint(root->brief),qPrint(root->doc));
QCString tagName;
QCString refFileName;
@@ -1224,7 +1223,7 @@ static void addConceptToContext(const Entry *root)
}
std::unique_ptr<ArgumentList> tArgList = getTemplateArgumentsFromName(qualifiedName,root->tArgLists);
// add concept to the list
- //printf("ClassDict.insert(%s)\n",fullName.data());
+ //printf("ClassDict.insert(%s)\n",qPrint(fullName));
cd = toConceptDefMutable(
Doxygen::conceptLinkedMap->add(qualifiedName,
std::unique_ptr<ConceptDef>(
@@ -1273,9 +1272,9 @@ static void addConceptToContext(const Entry *root)
if (fd)
{
//printf(">> Inserting concept '%s' in file '%s' (root->fileName='%s')\n",
- // cd->name().data(),
- // fd->name().data(),
- // root->fileName.data()
+ // qPrint(cd->name()),
+ // qPrint(fd->name()),
+ // qPrint(root->fileName)
// );
cd->setFileDef(fd);
fd->insertConcept(cd);
@@ -1318,7 +1317,7 @@ static void resolveClassNestingRelations()
{
ClassAlias(const QCString &name,std::unique_ptr<ClassDef> cd,DefinitionMutable *ctx) :
aliasFullName(name),aliasCd(std::move(cd)), aliasContext(ctx) {}
- const QCString aliasFullName;
+ QCString aliasFullName;
std::unique_ptr<ClassDef> aliasCd;
DefinitionMutable *aliasContext;
};
@@ -1329,13 +1328,13 @@ static void resolveClassNestingRelations()
if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
{
QCString name = stripAnonymousNamespaceScope(icd->name());
- //printf("processing=%s, iteration=%d\n",cd->name().data(),iteration);
+ //printf("processing=%s, iteration=%d\n",qPrint(cd->name()),iteration);
// also add class to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,
name,icd->getFileDef(),0);
if (d)
{
- //printf("****** adding %s to scope %s in iteration %d\n",cd->name().data(),d->name().data(),iteration);
+ //printf("****** adding %s to scope %s in iteration %d\n",qPrint(cd->name()),qPrint(d->name()),iteration);
DefinitionMutable *dm = toDefinitionMutable(d);
if (dm)
{
@@ -1374,7 +1373,7 @@ static void resolveClassNestingRelations()
}
//else
//{
- // printf("****** ignoring %s: scope not (yet) found in iteration %d\n",cd->name().data(),iteration);
+ // printf("****** ignoring %s: scope not (yet) found in iteration %d\n",qPrint(cd->name()),iteration);
//}
}
}
@@ -1396,7 +1395,7 @@ static void resolveClassNestingRelations()
if (cd && visitedClasses.find(icd.get())==visitedClasses.end())
{
QCString name = stripAnonymousNamespaceScope(cd->name());
- //printf("processing unresolved=%s, iteration=%d\n",cd->name().data(),iteration);
+ //printf("processing unresolved=%s, iteration=%d\n",qPrint(cd->name()),iteration);
/// create the scope artificially
// anyway, so we can at least relate scopes properly.
Definition *d = buildScopeFromQualifiedName(name,cd->getLanguage(),0);
@@ -1413,7 +1412,7 @@ static void resolveClassNestingRelations()
cd->setOuterScope(d);
warn(cd->getDefFileName(),cd->getDefLine(),
"Internal inconsistency: scope for class %s not "
- "found!",name.data()
+ "found!",qPrint(name)
);
}
}
@@ -1429,7 +1428,7 @@ void distributeClassGroupRelations()
ClassDefSet visitedClasses;
for (const auto &cd : *Doxygen::classLinkedMap)
{
- //printf("Checking %s\n",cd->name().data());
+ //printf("Checking %s\n",qPrint(cd->name()));
// distribute the group to nested classes as well
if (visitedClasses.find(cd.get())==visitedClasses.end() && !cd->partOfGroups().empty())
{
@@ -1440,7 +1439,7 @@ void distributeClassGroupRelations()
ClassDefMutable *ncdm = toClassDefMutable(ncd);
if (ncdm && ncdm->partOfGroups().empty())
{
- //printf(" Adding %s to group '%s'\n",ncd->name().data(),
+ //printf(" Adding %s to group '%s'\n",qPrint(ncd->name()),
// gd->groupTitle());
ncdm->makePartOfGroup(gd);
const_cast<GroupDef*>(gd)->addClass(ncdm);
@@ -1459,7 +1458,7 @@ static ClassDefMutable *createTagLessInstance(const ClassDef *rootCd,const Class
if (fullName.right(2)=="::") fullName=fullName.left(fullName.length()-2);
fullName+="."+fieldName;
- //printf("** adding class %s based on %s\n",fullName.data(),templ->name().data());
+ //printf("** adding class %s based on %s\n",qPrint(fullName),qPrint(templ->name()));
ClassDefMutable *cd = toClassDefMutable(
Doxygen::classLinkedMap->add(fullName,
std::unique_ptr<ClassDef>(
@@ -1503,7 +1502,7 @@ static ClassDefMutable *createTagLessInstance(const ClassDef *rootCd,const Class
{
for (const auto &md : *ml)
{
- //printf(" Member %s type=%s\n",md->name().data(),md->typeString());
+ //printf(" Member %s type=%s\n",qPrint(md->name()),md->typeString());
MemberDefMutable *imd = createMemberDef(md->getDefFileName(),md->getDefLine(),md->getDefColumn(),
md->typeString(),md->name(),md->argsString(),md->excpString(),
md->protection(),md->virtualness(),md->isStatic(),Member,
@@ -1541,8 +1540,8 @@ static void processTagLessClasses(const ClassDef *rootCd,
ClassDefMutable *tagParentCd,
const QCString &prefix,int count)
{
- //printf("%d: processTagLessClasses %s\n",count,cd->name().data());
- //printf("checking members for %s\n",cd->name().data());
+ //printf("%d: processTagLessClasses %s\n",count,qPrint(cd->name()));
+ //printf("checking members for %s\n",qPrint(cd->name()));
if (tagParentCd && !cd->getClasses().empty())
{
MemberList *ml = cd->getMemberList(MemberListType_pubAttribs);
@@ -1555,19 +1554,19 @@ static void processTagLessClasses(const ClassDef *rootCd,
{
for (const auto &icd : cd->getClasses())
{
- //printf(" member %s: type='%s'\n",md->name().data(),type.data());
- //printf(" comparing '%s'<->'%s'\n",type.data(),icd->name().data());
+ //printf(" member %s: type='%s'\n",qPrint(md->name()),qPrint(type));
+ //printf(" comparing '%s'<->'%s'\n",qPrint(type),qPrint(icd->name()));
if (type.find(icd->name())!=-1) // matching tag less struct/union
{
QCString name = md->name();
if (md->isAnonymous()) name = "__unnamed" + name.right(name.length()-1)+"__";
if (!prefix.isEmpty()) name.prepend(prefix+".");
- //printf(" found %s for class %s\n",name.data(),cd->name().data());
+ //printf(" found %s for class %s\n",qPrint(name),qPrint(cd->name()));
ClassDefMutable *ncd = createTagLessInstance(rootCd,icd,name);
if (ncd)
{
processTagLessClasses(rootCd,icd,ncd,name,count+1);
- //printf(" addTagged %s to %s\n",ncd->name().data(),tagParentCd->name().data());
+ //printf(" addTagged %s to %s\n",qPrint(ncd->name()),qPrint(tagParentCd->name()));
ncd->setTagLessReference(icd);
// replace tag-less type for generated/original member
@@ -1650,7 +1649,7 @@ static void buildNamespaceList(const Entry *root)
!root->name.isEmpty()
)
{
- //printf("** buildNamespaceList(%s)\n",root->name.data());
+ //printf("** buildNamespaceList(%s)\n",qPrint(root->name));
QCString fName = root->name;
if (root->section==Entry::PACKAGEDOC_SEC)
@@ -1661,8 +1660,8 @@ static void buildNamespaceList(const Entry *root)
QCString fullName = stripAnonymousNamespaceScope(fName);
if (!fullName.isEmpty())
{
- //printf("Found namespace %s in %s at line %d\n",root->name.data(),
- // root->fileName.data(), root->startLine);
+ //printf("Found namespace %s in %s at line %d\n",qPrint(root->name),
+ // qPrint(root->fileName), root->startLine);
NamespaceDef *ndi = Doxygen::namespaceLinkedMap->find(fullName);
if (ndi) // existing namespace
{
@@ -1704,7 +1703,7 @@ static void buildNamespaceList(const Entry *root)
tagName = tagInfo->tagName;
tagFileName = tagInfo->fileName;
}
- //printf("++ new namespace %s lang=%s tagName=%s\n",fullName.data(),langToString(root->lang).data(),tagName.data());
+ //printf("++ new namespace %s lang=%s tagName=%s\n",qPrint(fullName),qPrint(langToString(root->lang)),qPrint(tagName));
// add namespace to the list
NamespaceDefMutable *nd = toNamespaceDefMutable(
Doxygen::namespaceLinkedMap->add(fullName,
@@ -1741,7 +1740,7 @@ static void buildNamespaceList(const Entry *root)
// also add namespace to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName,0,tagInfo);
- //printf("adding namespace %s to context %s\n",nd->name().data(),d?d->name().data():"<none>");
+ //printf("adding namespace %s to context %s\n",qPrint(nd->name()),d?qPrint(d->name()):"<none>");
if (d==0) // we didn't find anything, create the scope artificially
// anyway, so we can at least relate scopes properly.
{
@@ -1821,7 +1820,7 @@ static void findUsingDirectives(const Entry *root)
if (root->section==Entry::USINGDIR_SEC)
{
//printf("Found using directive %s at line %d of %s\n",
- // root->name.data(),root->startLine,root->fileName.data());
+ // qPrint(root->name),root->startLine,qPrint(root->fileName));
QCString name=substitute(root->name,".","::");
if (name.right(2)=="::")
{
@@ -1857,7 +1856,7 @@ static void findUsingDirectives(const Entry *root)
QCString scope=scopeOffset>0 ?
nsName.left(scopeOffset)+"::" : QCString();
usingNd = getResolvedNamespace(scope+name);
- //printf("Trying with scope='%s' usingNd=%p\n",(scope+name).data(),usingNd);
+ //printf("Trying with scope='%s' usingNd=%p\n",(scope+qPrint(name)),usingNd);
if (scopeOffset==0)
{
scopeOffset=-1;
@@ -1895,7 +1894,7 @@ static void findUsingDirectives(const Entry *root)
usingNd = findUsedNamespace(fd->getUsedNamespaces(),name);
}
- //printf("%s -> %s\n",name.data(),usingNd?usingNd->name().data():"<none>");
+ //printf("%s -> %s\n",qPrint(name),usingNd?qPrint(usingNd->name()):"<none>");
// add the namespace the correct scope
if (usingNd)
@@ -1903,18 +1902,18 @@ static void findUsingDirectives(const Entry *root)
//printf("using fd=%p nd=%p\n",fd,nd);
if (nd)
{
- //printf("Inside namespace %s\n",nd->name().data());
+ //printf("Inside namespace %s\n",qPrint(nd->name()));
nd->addUsingDirective(usingNd);
}
else if (fd)
{
- //printf("Inside file %s\n",fd->name().data());
+ //printf("Inside file %s\n",qPrint(fd->name()));
fd->addUsingDirective(usingNd);
}
}
else // unknown namespace, but add it anyway.
{
- //printf("++ new unknown namespace %s lang=%s\n",name.data(),langToString(root->lang).data());
+ //printf("++ new unknown namespace %s lang=%s\n",qPrint(name),qPrint(langToString(root->lang)));
// add namespace to the list
nd = toNamespaceDefMutable(
Doxygen::namespaceLinkedMap->add(name,
@@ -1925,7 +1924,7 @@ static void findUsingDirectives(const Entry *root)
nd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition
nd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
nd->addSectionsToDefinition(root->anchors);
- //printf("** Adding namespace %s hidden=%d\n",name.data(),root->hidden);
+ //printf("** Adding namespace %s hidden=%d\n",qPrint(name),root->hidden);
nd->setHidden(root->hidden);
nd->setArtificial(TRUE);
nd->setLanguage(root->lang);
@@ -1980,7 +1979,7 @@ static void findUsingDeclarations(const Entry *root)
)
{
//printf("Found using declaration %s at line %d of %s inside section %x\n",
- // root->name.data(),root->startLine,root->fileName.data(),
+ // qPrint(root->name),root->startLine,qPrint(root->fileName),
// rootNav->parent()->section());
if (!root->name.isEmpty())
{
@@ -2020,7 +2019,7 @@ static void findUsingDeclarations(const Entry *root)
usingCd = toClassDefMutable(Doxygen::hiddenClassLinkedMap->find(name)); // check if it is already hidden
}
- //printf("%s -> %p\n",root->name.data(),usingCd);
+ //printf("%s -> %p\n",qPrint(root->name),usingCd);
if (usingCd==0) // definition not in the input => add an artificial class
{
Debug::print(Debug::Classes,0," New using class '%s' (sec=0x%08x)! #tArgLists=%d\n",
@@ -2046,12 +2045,12 @@ static void findUsingDeclarations(const Entry *root)
if (nd)
{
- //printf("Inside namespace %s\n",nd->name().data());
+ //printf("Inside namespace %s\n",qPrint(nd->name()));
nd->addUsingDeclaration(usingCd);
}
else if (fd)
{
- //printf("Inside file %s\n",fd->name().data());
+ //printf("Inside file %s\n",qPrint(fd->name()));
fd->addUsingDeclaration(usingCd);
}
}
@@ -2068,14 +2067,14 @@ static void findUsingDeclImports(const Entry *root)
)
{
//printf("Found using declaration %s inside section %x\n",
- // root->name.data(), root->parent()->section);
+ // qPrint(root->name), root->parent()->section);
QCString fullName=removeRedundantWhiteSpace(root->parent()->name);
fullName=stripAnonymousNamespaceScope(fullName);
fullName=stripTemplateSpecifiersFromScope(fullName);
ClassDefMutable *cd = getClassMutable(fullName);
if (cd)
{
- //printf("found class %s\n",cd->name().data());
+ //printf("found class %s\n",qPrint(cd->name()));
int i=root->name.find("::");
if (i!=-1)
{
@@ -2085,7 +2084,7 @@ static void findUsingDeclImports(const Entry *root)
const ClassDef *bcd = resolver.resolveClass(cd,scope); // todo: file in fileScope parameter
if (bcd && bcd!=cd)
{
- //printf("found class %s memName=%s\n",bcd->name().data(),memName.data());
+ //printf("found class %s memName=%s\n",qPrint(bcd->name()),qPrint(memName));
const MemberNameInfoLinkedMap &mnlm=bcd->memberNameInfoLinkedMap();
const MemberNameInfo *mni = mnlm.find(memName);
if (mni)
@@ -2164,7 +2163,7 @@ static void findIncludedUsingDirectives()
{
for (const auto &fd : *fn)
{
- //printf("----- adding using directives for file %s\n",fd->name().data());
+ //printf("----- adding using directives for file %s\n",qPrint(fd->name()));
fd->addIncludedUsingDirectives(visitedFiles);
}
}
@@ -2252,7 +2251,7 @@ static MemberDef *addVariableToClass(
for (const auto &imd : *mn)
{
//printf("md->getClassDef()=%p cd=%p type=[%s] md->typeString()=[%s]\n",
- // md->getClassDef(),cd,type.data(),md->typeString());
+ // md->getClassDef(),cd,qPrint(type),md->typeString());
MemberDefMutable *md = toMemberDefMutable(imd.get());
if (md &&
md->getClassDef()==cd &&
@@ -2318,7 +2317,7 @@ static MemberDef *addVariableToClass(
addMemberToGroups(root,md.get());
md->setBodyDef(root->fileDef());
- //printf(" New member adding to %s (%p)!\n",cd->name().data(),cd);
+ //printf(" New member adding to %s (%p)!\n",qPrint(cd->name()),cd);
cd->insertMember(md.get());
md->setRefItems(root->sli);
@@ -2326,7 +2325,7 @@ static MemberDef *addVariableToClass(
cd->insertUsedFile(root->fileDef());
root->markAsProcessed();
- //printf(" Adding member=%s\n",md->name().data());
+ //printf(" Adding member=%s\n",qPrint(md->name()));
// add the member to the global list
MemberDef *result = md.get();
mn = Doxygen::memberNameLinkedMap->add(name);
@@ -2524,7 +2523,7 @@ static MemberDef *addVariableToFile(
// new global variable, enum value or typedef
std::unique_ptr<MemberDefMutable> md { createMemberDef(
fileName,root->startLine,root->startColumn,
- type,name,args,0,
+ type,name,args,QCString(),
root->protection, Normal,root->stat,Member,
mtype,!root->tArgLists.empty() ? root->tArgLists.back() : ArgumentList(),
root->argList, root->metaData) };
@@ -2638,7 +2637,7 @@ static bool isVarWithConstructor(const Entry *root)
int ti;
SymbolResolver resolver(fd);
- //printf("isVarWithConstructor(%s)\n",rootNav->name().data());
+ //printf("isVarWithConstructor(%s)\n",qPrint(rootNav->name()));
if (root->parent()->section & Entry::COMPOUND_MASK)
{ // inside a class
result=FALSE;
@@ -2731,7 +2730,7 @@ static bool isVarWithConstructor(const Entry *root)
if (reg::search(resType,match,idChars) && match.position()==0) // resType starts with identifier
{
resType=match.str();
- //printf("resType=%s\n",resType.data());
+ //printf("resType=%s\n",qPrint(resType));
if (resType=="int" || resType=="long" || resType=="float" ||
resType=="double" || resType=="char" || resType=="signed" ||
resType=="const" || resType=="unsigned" || resType=="void")
@@ -2745,8 +2744,8 @@ static bool isVarWithConstructor(const Entry *root)
}
done:
- //printf("isVarWithConstructor(%s,%s)=%d\n",rootNav->parent()->name().data(),
- // root->type.data(),result);
+ //printf("isVarWithConstructor(%s,%s)=%d\n",qPrint(rootNav->parent()->name()),
+ // qPrint(root->type),result);
return result;
}
@@ -2764,7 +2763,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
root->mGrpId,
qPrint(root->relates)
);
- //printf("root->parent->name=%s\n",root->parent->name.data());
+ //printf("root->parent->name=%s\n",qPrint(root->parent->name));
QCString type = root->type;
QCString name = root->name;
@@ -2788,7 +2787,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
if (j!=std::string::npos) args=sargs.substr(0,j); // extract, e.g '[10]' from '[10])'
}
//printf("new: type='%s' name='%s' args='%s'\n",
- // type.data(),name.data(),args.data());
+ // qPrint(type),qPrint(name),qPrint(args));
}
else
{
@@ -2807,7 +2806,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
{
type=type.left(type.length()-1);
args.prepend(") ");
- //printf("type=%s args=%s\n",type.data(),args.data());
+ //printf("type=%s args=%s\n",qPrint(type),qPrint(args));
}
}
}
@@ -2948,8 +2947,8 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
}
//printf("name='%s' scope=%s scope.right=%s\n",
- // name.data(),scope.data(),
- // scope.right(scope.length()-si).data());
+ // qPrint(name),qPrint(scope),
+ // qPrint(scope.right(scope.length()-si)));
addVariableToClass(root, // entry
cd, // class to add member to
mtype, // member type
@@ -2963,7 +2962,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
}
else if (!name.isEmpty()) // global variable
{
- //printf("Inserting member in global scope %s!\n",scope.data());
+ //printf("Inserting member in global scope %s!\n",qPrint(scope));
addVariableToFile(root,mtype,scope,type,name,args,FALSE,/*0,*/0);
}
@@ -2974,7 +2973,7 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
// If found they are stored in their class or in the global list.
static void buildTypedefList(const Entry *root)
{
- //printf("buildVarList(%s)\n",rootNav->name().data());
+ //printf("buildVarList(%s)\n",qPrint(rootNav->name()));
if (!root->name.isEmpty() &&
root->section==Entry::VARIABLE_SEC &&
root->type.find("typedef ")!=-1 // its a typedef
@@ -3027,7 +3026,7 @@ static void buildDictionaryList(const Entry *root)
static void buildVarList(const Entry *root)
{
- //printf("buildVarList(%s) section=%08x\n",rootNav->name().data(),rootNav->section());
+ //printf("buildVarList(%s) section=%08x\n",qPrint(rootNav->name()),rootNav->section());
int isFuncPtr=-1;
if (!root->name.isEmpty() &&
(root->type.isEmpty() || g_compoundKeywords.find(root->type.str())==g_compoundKeywords.end()) &&
@@ -3233,7 +3232,7 @@ static void addMethodToClass(const Entry *root,ClassDefMutable *cd,
}
//printf("root->name='%s; args='%s' root->argList='%s'\n",
- // root->name.data(),args.data(),argListToString(root->argList).data()
+ // qPrint(root->name),qPrint(args),qPrint(argListToString(root->argList))
// );
// adding class member
@@ -3327,7 +3326,7 @@ static void addMethodToClass(const Entry *root,ClassDefMutable *cd,
md->setRefItems(root->sli);
// add member to the global list of all members
- //printf("Adding member=%s class=%s\n",md->name().data(),cd->name().data());
+ //printf("Adding member=%s class=%s\n",qPrint(md->name()),qPrint(cd->name()));
MemberName *mn = Doxygen::memberNameLinkedMap->add(name);
mn->push_back(std::move(md));
}
@@ -3339,7 +3338,7 @@ static void addGlobalFunction(const Entry *root,const QCString &rname,const QCSt
QCString scope = sc;
Debug::print(Debug::Functions,0," --> new function %s found!\n",qPrint(rname));
//printf("New function type='%s' name='%s' args='%s' bodyLine=%d\n",
- // root->type.data(),rname.data(),root->args.data(),root->bodyLine);
+ // qPrint(root->type),qPrint(rname),qPrint(root->args),root->bodyLine);
// new global function
QCString name=removeRedundantWhiteSpace(rname);
@@ -3446,7 +3445,7 @@ static void addGlobalFunction(const Entry *root,const QCString &rname,const QCSt
}
// add member to the list of file members
- //printf("Adding member=%s\n",md->name().data());
+ //printf("Adding member=%s\n",qPrint(md->name()));
MemberName *mn = Doxygen::functionNameLinkedMap->add(name);
mn->push_back(std::move(md));
}
@@ -3478,7 +3477,7 @@ static void buildFunctionList(const Entry *root)
bool isFriend=root->type.find("friend ")!=-1;
QCString rname = removeRedundantWhiteSpace(root->name);
- //printf("rname=%s\n",rname.data());
+ //printf("rname=%s\n",qPrint(rname));
QCString scope=root->parent()->name; //stripAnonymousNamespaceScope(root->parent->name);
if (!rname.isEmpty() && scope.find('@')==-1)
@@ -3560,7 +3559,7 @@ static void buildFunctionList(const Entry *root)
{
const NamespaceDef *mnd = md->getNamespaceDef();
NamespaceDef *rnd = 0;
- //printf("root namespace=%s\n",rootNav->parent()->name().data());
+ //printf("root namespace=%s\n",qPrint(rootNav->parent()->name()));
QCString fullScope = scope;
QCString parentScope = root->parent()->name;
if (!parentScope.isEmpty() && !leftScopeMatch(parentScope,scope))
@@ -3568,14 +3567,14 @@ static void buildFunctionList(const Entry *root)
if (!scope.isEmpty()) fullScope.prepend("::");
fullScope.prepend(parentScope);
}
- //printf("fullScope=%s\n",fullScope.data());
+ //printf("fullScope=%s\n",qPrint(fullScope));
rnd = getResolvedNamespace(fullScope);
const FileDef *mfd = md->getFileDef();
QCString nsName,rnsName;
- if (mnd) nsName = mnd->name().copy();
- if (rnd) rnsName = rnd->name().copy();
+ if (mnd) nsName = mnd->name();
+ if (rnd) rnsName = rnd->name();
//printf("matching arguments for %s%s %s%s\n",
- // md->name().data(),md->argsString(),rname.data(),argListToString(root->argList).data());
+ // qPrint(md->name()),md->argsString(),qPrint(rname),qPrint(argListToString(root->argList)));
const ArgumentList &mdAl = md->argumentList();
const ArgumentList &mdTempl = md->templateArguments();
@@ -3619,7 +3618,7 @@ static void buildFunctionList(const Entry *root)
gd = Doxygen::groupLinkedMap->find(root->groups.front().groupname);
}
//printf("match!\n");
- //printf("mnd=%p rnd=%p nsName=%s rnsName=%s\n",mnd,rnd,nsName.data(),rnsName.data());
+ //printf("mnd=%p rnd=%p nsName=%s rnsName=%s\n",mnd,rnd,qPrint(nsName),qPrint(rnsName));
// see if we need to create a new member
found=(mnd && rnd && nsName==rnsName) || // members are in the same namespace
((mnd==0 && rnd==0 && mfd!=0 && // no external reference and
@@ -3634,7 +3633,7 @@ static void buildFunctionList(const Entry *root)
}
//printf("combining function with prototype found=%d in namespace %s\n",
- // found,nsName.data());
+ // found,qPrint(nsName));
if (found)
{
@@ -3729,7 +3728,7 @@ static void buildFunctionList(const Entry *root)
}
//printf("unrelated function %d '%s' '%s' '%s'\n",
- // root->parent->section,root->type.data(),rname.data(),root->args.data());
+ // root->parent->section,qPrint(root->type),qPrint(rname),qPrint(root->args));
}
else
{
@@ -3931,7 +3930,7 @@ static void transferRelatedFunctionDocumentation()
MemberDefMutable *md = toMemberDefMutable(imd.get());
if (md)
{
- //printf(" Function '%s'\n",md->name().data());
+ //printf(" Function '%s'\n",qPrint(md->name()));
MemberName *rmn;
if ((rmn=Doxygen::memberNameLinkedMap->find(md->name()))) // check if there is a member with the same name
{
@@ -3949,7 +3948,7 @@ static void transferRelatedFunctionDocumentation()
)
)
{
- //printf(" Found related member '%s'\n",md->name().data());
+ //printf(" Found related member '%s'\n",qPrint(md->name()));
if (rmd->relatedAlso())
md->setRelatedAlso(rmd->relatedAlso());
else if (rmd->isForeign())
@@ -3984,7 +3983,7 @@ static TemplateNameMap getTemplateArgumentsInName(const ArgumentList &templateAr
{
const auto &match = *it;
std::string n = match.str();
- if (n==arg.name)
+ if (n==arg.name.str())
{
if (templateNames.find(n)==templateNames.end())
{
@@ -4024,10 +4023,10 @@ static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,co
}
//printf("3. result=%p\n",result);
//printf("** Trying to find %s within context %s class %s result=%s lookup=%p\n",
- // name.data(),
- // context ? context->name().data() : "<none>",
- // cd ? cd->name().data() : "<none>",
- // result ? result->name().data() : "<none>",
+ // qPrint(name),
+ // context ? qPrint(context->name()) : "<none>",
+ // cd ? qPrint(cd->name()) : "<none>",
+ // result ? qPrint(result->name()) : "<none>",
// Doxygen::classLinkedMap->find(name)
// );
return result;
@@ -4051,7 +4050,7 @@ static void findUsedClassesForClass(const Entry *root,
const MemberDef *md=mi->memberDef();
if (md->isVariable() || md->isObjCProperty()) // for each member variable in this class
{
- //printf(" Found variable %s in class %s\n",md->name().data(),masterCd->name().data());
+ //printf(" Found variable %s in class %s\n",qPrint(md->name()),qPrint(masterCd->name()));
QCString type = normalizeNonTemplateArgumentsInString(md->typeString(),masterCd,formalArgs);
QCString typedefValue = resolveTypeDef(masterCd,type);
if (!typedefValue.isEmpty())
@@ -4063,16 +4062,16 @@ static void findUsedClassesForClass(const Entry *root,
QCString templSpec;
bool found=FALSE;
// the type can contain template variables, replace them if present
- type = substituteTemplateArgumentsInString(type.str(),formalArgs,actualArgs);
+ type = substituteTemplateArgumentsInString(type,formalArgs,actualArgs);
- //printf(" template substitution gives=%s\n",type.data());
+ //printf(" template substitution gives=%s\n",qPrint(type));
while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec,root->lang)!=-1)
{
// find the type (if any) that matches usedClassName
SymbolResolver resolver(masterCd->getFileDef());
const ClassDefMutable *typeCd = resolver.resolveClassMutable(masterCd,usedClassName,false,true);
//printf("====> usedClassName=%s -> typeCd=%s\n",
- // usedClassName.data(),typeCd?typeCd->name().data():"<none>");
+ // qPrint(usedClassName),typeCd?qPrint(typeCd->name()):"<none>");
if (typeCd)
{
usedClassName = typeCd->name();
@@ -4088,7 +4087,7 @@ static void findUsedClassesForClass(const Entry *root,
}
// add any template arguments to the class
QCString usedName = removeRedundantWhiteSpace(usedClassName+templSpec);
- //printf(" usedName=%s\n",usedName.data());
+ //printf(" usedName=%s\n",qPrint(usedName));
TemplateNameMap formTemplateNames;
if (templateNames.empty())
@@ -4118,7 +4117,7 @@ static void findUsedClassesForClass(const Entry *root,
ClassDef::Class))));
if (usedCdm)
{
- //printf("making %s a template argument!!!\n",usedCd->name().data());
+ //printf("making %s a template argument!!!\n",qPrint(usedCd->name()));
usedCdm->makeTemplateArgument();
usedCdm->setUsedOnly(TRUE);
usedCdm->setLanguage(masterCd->getLanguage());
@@ -4143,7 +4142,7 @@ static void findUsedClassesForClass(const Entry *root,
{
ClassDef *usedCd=findClassWithinClassContext(context,masterCd,usedName);
//printf("Looking for used class %s: result=%s master=%s\n",
- // usedName.data(),usedCd?usedCd->name().data():"<none>",masterCd?masterCd->name().data():"<none>");
+ // qPrint(usedName),usedCd?qPrint(usedCd->name()):"<none>",masterCd?qPrint(masterCd->name()):"<none>");
if (usedCd)
{
@@ -4215,15 +4214,15 @@ static void findBaseClassesForClass(
for (const BaseInfo &bi : root->extends)
{
//printf("masterCd=%s bi.name='%s' #actualArgs=%d\n",
- // masterCd->localName().data(),bi.name.data(),actualArgs ? (int)actualArgs->size() : -1);
+ // qPrint(masterCd->localName()),qPrint(bi.name),actualArgs ? (int)actualArgs->size() : -1);
TemplateNameMap formTemplateNames;
if (templateNames.empty())
{
formTemplateNames = getTemplateArgumentsInName(formalArgs,bi.name.str());
}
BaseInfo tbi = bi;
- tbi.name = substituteTemplateArgumentsInString(bi.name.str(),formalArgs,actualArgs);
- //printf("bi->name=%s tbi.name=%s\n",bi->name.data(),tbi.name.data());
+ tbi.name = substituteTemplateArgumentsInString(bi.name,formalArgs,actualArgs);
+ //printf("bi->name=%s tbi.name=%s\n",qPrint(bi->name),qPrint(tbi.name));
if (mode==DocumentedOnly)
{
@@ -4258,7 +4257,7 @@ static void findTemplateInstanceRelation(const Entry *root,
Debug::print(Debug::Classes,0," derived from template %s with parameters %s isArtificial=%d\n",
qPrint(templateClass->name()),qPrint(templSpec),isArtificial);
//printf("findTemplateInstanceRelation(base=%s templSpec=%s templateNames=",
- // templateClass->name().data(),templSpec.data());
+ // qPrint(templateClass->name()),qPrint(templSpec));
//for (const auto &kv : templNames)
//{
// printf("(%s->%d) ",kv.first.c_str(),kv.second);
@@ -4286,7 +4285,7 @@ static void findTemplateInstanceRelation(const Entry *root,
// search for new template instances caused by base classes of
// instanceClass
- auto it_pair = g_classEntries.equal_range(templateClass->name().data());
+ auto it_pair = g_classEntries.equal_range(templateClass->name().str());
for (auto it=it_pair.first ; it!=it_pair.second ; ++it)
{
const Entry *templateRoot = it->second;
@@ -4300,7 +4299,7 @@ static void findTemplateInstanceRelation(const Entry *root,
isArtificial,templArgs,templateNames);
}
- //Debug::print(Debug::Classes,0," Template instance %s : \n",instanceClass->name().data());
+ //Debug::print(Debug::Classes,0," Template instance %s : \n",qPrint(instanceClass->name()));
//ArgumentList *tl = templateClass->templateArguments();
}
else
@@ -4401,10 +4400,10 @@ static int findEndOfTemplate(const QCString &s,int startPos)
return brCount==0 ? e : -1;
}
-static int findTemplateSpecializationPosition(const char *name)
+static int findTemplateSpecializationPosition(const QCString &name)
{
- if (name==0 || name[0]=='\0') return 0;
- int l = static_cast<int>(strlen(name));
+ if (name.isEmpty()) return 0;
+ int l = static_cast<int>(name.length());
if (name[l-1]=='>') // search backward to find the matching <, allowing nested <...> and strings.
{
int count=1;
@@ -4442,7 +4441,7 @@ static bool findClassRelation(
)
{
//printf("findClassRelation(class=%s base=%s templateNames=",
- // cd->name().data(),bi->name.data());
+ // qPrint(cd->name()),qPrint(bi->name));
//for (const auto &kv : templateNames)
//{
// printf("(%s->%d) ",kv.first.c_str(),kv.second);
@@ -4451,7 +4450,7 @@ static bool findClassRelation(
QCString biName=bi->name;
bool explicitGlobalScope=FALSE;
- //printf("findClassRelation: biName='%s'\n",biName.data());
+ //printf("findClassRelation: biName='%s'\n",qPrint(biName));
if (biName.left(2)=="::") // explicit global scope
{
biName=biName.right(biName.length()-2);
@@ -4463,12 +4462,12 @@ static bool findClassRelation(
do // for each parent scope, starting with the largest scope
// (in case of nested classes)
{
- QCString scopeName= parentNode ? parentNode->name.data() : "";
+ QCString scopeName= parentNode ? parentNode->name : QCString();
int scopeOffset=explicitGlobalScope ? 0 : scopeName.length();
do // try all parent scope prefixes, starting with the largest scope
{
//printf("scopePrefix='%s' biName='%s'\n",
- // scopeName.left(scopeOffset).data(),biName.data());
+ // qPrint(scopeName.left(scopeOffset)),qPrint(biName));
QCString baseClassName=biName;
if (scopeOffset>0)
@@ -4488,12 +4487,12 @@ static bool findClassRelation(
const MemberDef *baseClassTypeDef = resolver.getTypedef();
QCString templSpec = resolver.getTemplateSpec();
//printf("baseClassName=%s baseClass=%p cd=%p explicitGlobalScope=%d\n",
- // baseClassName.data(),baseClass,cd,explicitGlobalScope);
+ // qPrint(baseClassName),baseClass,cd,explicitGlobalScope);
//printf(" scope='%s' baseClassName='%s' baseClass=%s templSpec=%s\n",
- // cd ? cd->name().data():"<none>",
- // baseClassName.data(),
- // baseClass?baseClass->name().data():"<none>",
- // templSpec.data()
+ // cd ? qPrint(cd->name()):"<none>",
+ // qPrint(baseClassName),
+ // baseClass?qPrint(baseClass->name()):"<none>",
+ // qPrint(templSpec)
// );
//if (baseClassName.left(root->name.length())!=root->name ||
// baseClassName.at(root->name.length())!='<'
@@ -4538,7 +4537,7 @@ static bool findClassRelation(
);
baseClassTypeDef = resolver.getTypedef();
//printf("baseClass=%p -> baseClass=%s templSpec=%s\n",
- // baseClass,baseClassName.data(),templSpec.data());
+ // baseClass,qPrint(baseClassName),qPrint(templSpec));
}
}
else if (baseClass && !templSpec.isEmpty()) // we have a known class, but also
@@ -4547,7 +4546,7 @@ static bool findClassRelation(
// instance (for instance if a class
// derived from a template argument)
{
- //printf("baseClass=%s templSpec=%s\n",baseClass->name().data(),templSpec.data());
+ //printf("baseClass=%s templSpec=%s\n",qPrint(baseClass->name()),qPrint(templSpec));
ClassDefMutable *templClass=getClassMutable(baseClass->name()+templSpec);
if (templClass)
{
@@ -4580,7 +4579,7 @@ static bool findClassRelation(
{
baseClass=toClassDefMutable(findClassWithinClassContext(context,cd,baseClassName));
//printf("findClassWithinClassContext(%s,%s)=%p\n",
- // cd->name().data(),baseClassName.data(),baseClass);
+ // qPrint(cd->name()),qPrint(baseClassName),baseClass);
found = baseClass!=0 && baseClass!=cd;
}
@@ -4589,7 +4588,7 @@ static bool findClassRelation(
{
// for PHP the "use A\B as C" construct map class C to A::B, so we lookup
// the class name also in the alias mapping.
- auto it = Doxygen::namespaceAliasMap.find(baseClassName.data());
+ auto it = Doxygen::namespaceAliasMap.find(baseClassName.str());
if (it!=Doxygen::namespaceAliasMap.end()) // see if it is indeed a class.
{
baseClass=getClassMutable(it->second.c_str());
@@ -4635,7 +4634,7 @@ static bool findClassRelation(
if (baseClassTypeDef || cd->isCSharp())
{
usedName=biName;
- //printf("***** usedName=%s templSpec=%s\n",usedName.data(),templSpec.data());
+ //printf("***** usedName=%s templSpec=%s\n",qPrint(usedName),qPrint(templSpec));
}
Protection prot = bi->prot;
if (Config_getBool(SIP_SUPPORT)) prot=Public;
@@ -4650,7 +4649,7 @@ static bool findClassRelation(
warn(root->fileName,root->startLine,
"Detected potential recursive class relation "
"between class %s and base class %s!",
- cd->name().data(),baseClass->name().data()
+ qPrint(cd->name()),qPrint(baseClass->name())
);
}
}
@@ -4685,7 +4684,7 @@ static bool findClassRelation(
{
baseClass = toClassDefMutable(Doxygen::classLinkedMap->find(baseClassName));
//printf("*** classDDict->find(%s)=%p biName=%s templSpec=%s\n",
- // baseClassName.data(),baseClass,biName.data(),templSpec.data());
+ // qPrint(baseClassName),baseClass,qPrint(biName),qPrint(templSpec));
if (baseClass==0) // not found (or alias)
{
baseClass = toClassDefMutable(
@@ -4752,7 +4751,7 @@ static bool findClassRelation(
warn(root->fileName,root->startLine,
"Detected potential recursive class relation "
"between class %s and base class %s!\n",
- root->name.data(),baseClassName.data()
+ qPrint(root->name),qPrint(baseClassName)
);
}
// for mode==TemplateInstance this case is quite common and
@@ -4852,7 +4851,7 @@ static void findInheritedTemplateInstances()
ClassDefMutable *cdm = toClassDefMutable(cd);
if (cdm)
{
- //printf("Class %s %zu\n",cd->name().data(),root->extends.size());
+ //printf("Class %s %zu\n",qPrint(cd->name()),root->extends.size());
findBaseClassesForClass(root,cd,cdm,cdm,TemplateInstances,FALSE);
}
}
@@ -4905,7 +4904,7 @@ static void computeClassRelations()
warn_undoc(
root->fileName,root->startLine,
"Compound %s is not documented.",
- root->name.data()
+ qPrint(root->name)
);
}
}
@@ -4962,7 +4961,7 @@ static void computeTemplateClassRelations()
}
}
- tbi.name = substituteTemplateArgumentsInString(bi.name.str(),tl,templArgs);
+ tbi.name = substituteTemplateArgumentsInString(bi.name,tl,templArgs);
// find a documented base class in the correct scope
if (!findClassRelation(root,cd,tcd,&tbi,actualTemplateNames,DocumentedOnly,FALSE))
{
@@ -5058,7 +5057,7 @@ static void addListReferences()
addRefItem(xrefItems,
name,
theTranslator->trPage(TRUE,TRUE),
- name,pd->title(),0,0);
+ name,pd->title(),QCString(),0);
}
}
@@ -5073,7 +5072,7 @@ static void addListReferences()
addRefItem(xrefItems,
name,
theTranslator->trDir(TRUE,TRUE),
- name,dd->displayName(),0,0);
+ name,dd->displayName(),QCString(),0);
}
}
@@ -5093,7 +5092,7 @@ static void generateXRefPages()
// over_load is set the standard overload text is added.
static void addMemberDocs(const Entry *root,
- MemberDefMutable *md, const char *funcDecl,
+ MemberDefMutable *md, const QCString &funcDecl,
const ArgumentList *al,
bool over_load,
uint64 spec
@@ -5101,7 +5100,7 @@ static void addMemberDocs(const Entry *root,
{
if (md==0) return;
//printf("addMemberDocs: '%s'::'%s' '%s' funcDecl='%s' mSpec=%lld\n",
- // root->parent()->name.data(),md->name().data(),md->argsString(),funcDecl,spec);
+ // qPrint(root->parent()->name),qPrint(md->name()),md->argsString(),funcDecl,spec);
QCString fDecl=funcDecl;
// strip extern specifier
fDecl.stripPrefix("extern ");
@@ -5178,8 +5177,8 @@ static void addMemberDocs(const Entry *root,
}
//printf("initializer: '%s'(isEmpty=%d) '%s'(isEmpty=%d)\n",
- // md->initializer().data(),md->initializer().isEmpty(),
- // root->initializer.data(),root->initializer.isEmpty()
+ // qPrint(md->initializer()),md->initializer().isEmpty(),
+ // qPrint(root->initializer),root->initializer.isEmpty()
// );
std::string rootInit = root->initializer.str();
if (md->initializer().isEmpty() && !rootInit.empty())
@@ -5227,13 +5226,13 @@ static void addMemberDocs(const Entry *root,
root->fileName,root->startLine,
"member %s belongs to two different groups. The second "
"one found here will be ignored.",
- md->name().data()
+ qPrint(md->name())
);
}
}
else // set group id
{
- //printf("setMemberGroupId=%d md=%s\n",root->mGrpId,md->name().data());
+ //printf("setMemberGroupId=%d md=%s\n",root->mGrpId,qPrint(md->name()));
md->setMemberGroupId(root->mGrpId);
}
}
@@ -5244,7 +5243,7 @@ static void addMemberDocs(const Entry *root,
// template list specifier
static const ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd,
- const char *scopeName)
+ const QCString &scopeName)
{
SymbolResolver resolver(fd);
const ClassDef *tcd = resolver.resolveClass(nd,scopeName,true,true);
@@ -5259,11 +5258,11 @@ static const ClassDef *findClassDefinition(FileDef *fd,NamespaceDef *nd,
static bool findGlobalMember(const Entry *root,
const QCString &namespaceName,
- const char *type,
- const char *name,
- const char *tempArg,
- const char *,
- const char *decl,
+ const QCString &type,
+ const QCString &name,
+ const QCString &tempArg,
+ const QCString &,
+ const QCString &decl,
uint64 spec)
{
Debug::print(Debug::FindMembers,0,
@@ -5339,7 +5338,7 @@ static bool findGlobalMember(const Entry *root,
}
const FileDef *fd=root->fileDef();
- //printf("File %s\n",fd ? fd->name().data() : "<none>");
+ //printf("File %s\n",fd ? qPrint(fd->name()) : "<none>");
LinkedRefMap<const NamespaceDef> nl;
if (fd)
{
@@ -5383,8 +5382,8 @@ static bool findGlobalMember(const Entry *root,
}
//printf("%s<->%s\n",
- // argListToString(md->argumentList()).data(),
- // argListToString(root->argList).data());
+ // qPrint(argListToString(md->argumentList())),
+ // qPrint(argListToString(root->argList)));
// for static members we also check if the comment block was found in
// the same file. This is needed because static members with the same
@@ -5403,7 +5402,7 @@ static bool findGlobalMember(const Entry *root,
//printf("Comparing return types '%s'<->'%s'\n",
// md->typeString(),type);
if (md->templateArguments().size()!=root->tArgLists.back().size() ||
- qstrcmp(md->typeString(),type)!=0 ||
+ md->typeString()!=type ||
md->requiresClause()!=root->req)
{
//printf(" ---> no matching\n");
@@ -5437,7 +5436,7 @@ static bool findGlobalMember(const Entry *root,
" of file "+md->getDefFileName()+"\n";
}
}
- warn(root->fileName,root->startLine, "%s", warnMsg.data());
+ warn(root->fileName,root->startLine, "%s", qPrint(warnMsg));
}
}
else // got docs for an undefined member!
@@ -5451,7 +5450,7 @@ static bool findGlobalMember(const Entry *root,
)
{
warn(root->fileName,root->startLine,
- "documented symbol '%s' was not declared or defined.",decl
+ "documented symbol '%s' was not declared or defined.",qPrint(decl)
);
}
}
@@ -5495,7 +5494,7 @@ static QCString substituteTemplatesInString(
static const reg::Ex re(R"(\a\w*)");
reg::Iterator it(src,re);
reg::Iterator end;
- //printf("type=%s\n",sa->type.data());
+ //printf("type=%s\n",qPrint(sa->type));
size_t p=0;
for (; it!=end ; ++it) // for each word in srcType
{
@@ -5530,9 +5529,9 @@ static QCString substituteTemplatesInString(
++tdaIt;
}
//if (tda) printf("tsa=%s|%s tda=%s|%s\n",
- // tsa.type.data(),tsa.name.data(),
- // tda->type.data(),tda->name.data());
- if (name==tsa.name)
+ // qPrint(tsa.type),qPrint(tsa.name),
+ // qPrint(tda->type),qPrint(tda->name));
+ if (name==tsa.name.str())
{
if (tda && tda->name.isEmpty())
{
@@ -5555,9 +5554,9 @@ static QCString substituteTemplatesInString(
}
//printf(" srcList='%s' dstList='%s faList='%s'\n",
- // argListToString(srclali.current()).data(),
- // argListToString(dstlali.current()).data(),
- // funcTempArgList ? argListToString(funcTempArgList).data() : "<none>");
+ // qPrint(argListToString(srclali.current())),
+ // qPrint(argListToString(dstlali.current())),
+ // funcTempArgList ? qPrint(argListToString(funcTempArgList)) : "<none>");
++srcIt;
}
dst+=name;
@@ -5565,7 +5564,7 @@ static QCString substituteTemplatesInString(
}
dst+=src.substr(p);
//printf(" substituteTemplatesInString(%s)=%s\n",
- // src.data(),dst.data());
+ // qPrint(src),qPrint(dst));
return dst;
}
@@ -5604,7 +5603,7 @@ static void substituteTemplatesInArgList(
srcTempArgLists,dstTempArgLists,
src.trailingReturnType().str()));
//printf("substituteTemplatesInArgList: replacing %s with %s\n",
- // argListToString(src).data(),argListToString(dst).data()
+ // qPrint(argListToString(src)),qPrint(argListToString(dst))
// );
}
@@ -5616,13 +5615,13 @@ static void addLocalObjCMethod(const Entry *root,
const QCString &exceptions,const QCString &funcDecl,
uint64 spec)
{
- //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
+ //printf("scopeName='%s' className='%s'\n",qPrint(scopeName),qPrint(className));
ClassDefMutable *cd=0;
if (Config_getBool(EXTRACT_LOCAL_METHODS) && (cd=getClassMutable(scopeName)))
{
Debug::print(Debug::FindMembers,0,"4. Local objective C method %s\n"
" scopeName=%s\n",qPrint(root->name),qPrint(scopeName));
- //printf("Local objective C method '%s' of class '%s' found\n",root->name.data(),cd->name().data());
+ //printf("Local objective C method '%s' of class '%s' found\n",qPrint(root->name),qPrint(cd->name()));
std::unique_ptr<MemberDefMutable> md { createMemberDef(
root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
@@ -5700,13 +5699,13 @@ static void addMemberFunction(const Entry *root,
qPrint(md->argsString()),
qPrint(root->fileName));
//printf("Member %s (member scopeName=%s) (this scopeName=%s) isEnumValue()=%d\n",
- // md->name().data(),cd->name().data(),scopeName.data(),md->isEnumValue());
+ // qPrint(md->name()),qPrint(cd->name()),qPrint(scopeName),md->isEnumValue());
FileDef *fd=root->fileDef();
NamespaceDef *nd=0;
if (!namespaceName.isEmpty()) nd=getResolvedNamespace(namespaceName);
- //printf("scopeName %s->%s\n",scopeName.data(),
- // stripTemplateSpecifiersFromScope(scopeName,FALSE).data());
+ //printf("scopeName %s->%s\n",qPrint(scopeName),
+ // qPrint(stripTemplateSpecifiersFromScope(scopeName,FALSE)));
// if the member we are searching for is an enum value that is part of
// a "strong" enum, we need to look into the fields of the enum for a match
@@ -5717,7 +5716,7 @@ static void addMemberFunction(const Entry *root,
if (className.left(enumNamePos)==cd->name())
{
MemberName *enumMn=Doxygen::memberNameLinkedMap->find(enumName);
- //printf("enumMn(%s)=%p\n",className.data(),enumMn);
+ //printf("enumMn(%s)=%p\n",qPrint(className),enumMn);
if (enumMn)
{
for (const auto &emd : *enumMn)
@@ -5742,12 +5741,12 @@ static void addMemberFunction(const Entry *root,
tcd=cd;
}
//printf("Looking for %s inside nd=%s result=%p (%s) cd=%p\n",
- // scopeName.data(),nd?nd->name().data():"<none>",tcd,tcd?tcd->name().data():"",cd);
+ // qPrint(scopeName),nd?qPrint(nd->name()):"<none>",tcd,tcd?qPrint(tcd->name()):"",cd);
if (cd && tcd==cd) // member's classes match
{
Debug::print(Debug::FindMembers,0,
- "4. class definition %s found\n",cd->name().data());
+ "4. class definition %s found\n",qPrint(cd->name()));
// get the template parameter lists found at the member declaration
ArgumentLists declTemplArgs = cd->getTemplateParameterLists();
@@ -5816,8 +5815,7 @@ static void addMemberFunction(const Entry *root,
"5b. Comparing return types '%s'<->'%s' #args %d<->%d\n",
qPrint(md->typeString()),qPrint(funcType),
md->templateArguments().size(),root->tArgLists.back().size());
- if (md->templateArguments().size()!=root->tArgLists.back().size() ||
- qstrcmp(memType,funcType))
+ if (md->templateArguments().size()!=root->tArgLists.back().size() || memType!=funcType)
{
//printf(" ---> no matching\n");
matching = FALSE;
@@ -5898,7 +5896,7 @@ static void addMemberFunction(const Entry *root,
{
ClassDefMutable *ccd=md->getClassDefMutable();
MemberDef *cmd=md.get();
- //printf("ccd->name()==%s className=%s\n",ccd->name().data(),className.data());
+ //printf("ccd->name()==%s className=%s\n",qPrint(ccd->name()),qPrint(className));
if (ccd!=0 && rightScopeMatch(ccd->name(),className))
{
const ArgumentList &templAl = md->templateArguments();
@@ -5960,7 +5958,7 @@ static void addMemberFunction(const Entry *root,
warnMsg+='\n';
}
- QCString fullFuncDecl=funcDecl.copy();
+ QCString fullFuncDecl=funcDecl;
if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE);
warnMsg+=" ";
@@ -5984,7 +5982,7 @@ static void addMemberFunction(const Entry *root,
warnMsg+='\n';
warnMsg+=" ";
}
- if (md->typeString())
+ if (!md->typeString().isEmpty())
{
warnMsg+=md->typeString();
warnMsg+=' ';
@@ -5992,8 +5990,7 @@ static void addMemberFunction(const Entry *root,
QCString qScope = cd->qualifiedNameWithTemplateParameters();
if (!qScope.isEmpty())
warnMsg+=qScope+"::"+md->name();
- if (md->argsString())
- warnMsg+=md->argsString();
+ warnMsg+=md->argsString();
if (noMatchCount>1)
{
warnMsg+="' at line "+QCString().setNum(md->getDefLine()) +
@@ -6006,7 +6003,7 @@ static void addMemberFunction(const Entry *root,
}
}
}
- warn_simple(root->fileName,root->startLine,warnMsg);
+ warn_simple(root->fileName,root->startLine,qPrint(warnMsg));
}
}
@@ -6042,7 +6039,7 @@ static void addMemberSpecialization(const Entry *root,
declMd ? declMd->protection() : root->protection,
root->virt,root->stat,Member,
mtype,tArgList,root->argList,root->metaData) };
- //printf("new specialized member %s args='%s'\n",md->name().data(),funcArgs.data());
+ //printf("new specialized member %s args='%s'\n",qPrint(md->name()),qPrint(funcArgs));
md->setTagInfo(root->tagInfo());
md->setLanguage(root->lang);
md->setId(root->id);
@@ -6100,7 +6097,7 @@ static void addOverloaded(const Entry *root,MemberName *mn,
// new overloaded member function
std::unique_ptr<ArgumentList> tArgList =
getTemplateArgumentsFromName(cd->name()+"::"+funcName,root->tArgLists);
- //printf("new related member %s args='%s'\n",md->name().data(),funcArgs.data());
+ //printf("new related member %s args='%s'\n",qPrint(md->name()),qPrint(funcArgs));
std::unique_ptr<MemberDefMutable> md { createMemberDef(
root->fileName,root->startLine,root->startColumn,
funcType,funcName,funcArgs,exceptions,
@@ -6229,17 +6226,17 @@ static void findMember(const Entry *root,
" ::","::"
).stripWhiteSpace();
- //printf("funcDecl='%s'\n",funcDecl.data());
+ //printf("funcDecl='%s'\n",qPrint(funcDecl));
if (isFriend && funcDecl.left(6)=="class ")
{
//printf("friend class\n");
funcDecl=funcDecl.right(funcDecl.length()-6);
- funcName = funcDecl.copy();
+ funcName = funcDecl;
}
else if (isFriend && funcDecl.left(7)=="struct ")
{
funcDecl=funcDecl.right(funcDecl.length()-7);
- funcName = funcDecl.copy();
+ funcName = funcDecl;
}
else
{
@@ -6249,14 +6246,14 @@ static void findMember(const Entry *root,
);
}
//printf("scopeName='%s' funcType='%s' funcName='%s' funcArgs='%s'\n",
- // scopeName.data(),funcType.data(),funcName.data(),funcArgs.data());
+ // qPrint(scopeName),qPrint(funcType),qPrint(funcName),qPrint(funcArgs));
// the class name can also be a namespace name, we decide this later.
// if a related class name is specified and the class name could
// not be derived from the function declaration, then use the
// related field.
//printf("scopeName='%s' className='%s' namespaceName='%s'\n",
- // scopeName.data(),className.data(),namespaceName.data());
+ // qPrint(scopeName),qPrint(className),qPrint(namespaceName));
if (!relates.isEmpty())
{ // related member, prefix user specified scope
isRelated=TRUE;
@@ -6324,12 +6321,12 @@ static void findMember(const Entry *root,
// split scope into a namespace and a class part
extractNamespaceName(scopeName,className,namespaceName,TRUE);
//printf("scopeName='%s' className='%s' namespaceName='%s'\n",
- // scopeName.data(),className.data(),namespaceName.data());
+ // qPrint(scopeName),qPrint(className),qPrint(namespaceName));
//namespaceName=removeAnonymousScopes(namespaceName);
if (namespaceName.find('@')!=-1) return; // skip stuff in anonymous namespace...
- //printf("namespaceName='%s' className='%s'\n",namespaceName.data(),className.data());
+ //printf("namespaceName='%s' className='%s'\n",qPrint(namespaceName),qPrint(className));
// merge class and namespace scopes again
scopeName.resize(0);
if (!namespaceName.isEmpty())
@@ -6352,7 +6349,7 @@ static void findMember(const Entry *root,
{
scopeName=className;
}
- //printf("new scope='%s'\n",scopeName.data());
+ //printf("new scope='%s'\n",qPrint(scopeName));
QCString tempScopeName=scopeName;
ClassDefMutable *cd=getClassMutable(scopeName);
@@ -6369,9 +6366,9 @@ static void findMember(const Entry *root,
}
}
//printf("scopeName=%s cd=%p root->tArgLists=%p result=%s\n",
- // scopeName.data(),cd,root->tArgLists,tempScopeName.data());
+ // qPrint(scopeName),cd,root->tArgLists,qPrint(tempScopeName));
- //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
+ //printf("scopeName='%s' className='%s'\n",qPrint(scopeName),qPrint(className));
// rebuild the function declaration (needed to get the scope right).
if (!scopeName.isEmpty() && !isRelated && !isFriend && !Config_getBool(HIDE_SCOPE_NAMES))
{
@@ -6452,7 +6449,7 @@ static void findMember(const Entry *root,
if (!funcName.isEmpty()) // function name is valid
{
Debug::print(Debug::FindMembers,0,
- "1. funcName='%s'\n",funcName.data());
+ "1. funcName='%s'\n",qPrint(funcName));
// check if 'className' is actually a scoped enum, in which case we need to
// process it as a global, see issue #6471
@@ -6512,7 +6509,7 @@ static void findMember(const Entry *root,
else
{
//printf("*** Specialized member %s of unknown scope %s%s found!\n",
- // scopeName.data(),funcName.data(),funcArgs.data());
+ // qPrint(scopeName),qPrint(funcName),qPrint(funcArgs));
}
}
else if (overloaded) // check if the function belongs to only one class
@@ -6523,11 +6520,11 @@ static void findMember(const Entry *root,
{
if (!findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
{
- QCString fullFuncDecl=funcDecl.copy();
+ QCString fullFuncDecl=funcDecl;
if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE);
warn(root->fileName,root->startLine,
"Cannot determine class for function\n%s",
- fullFuncDecl.data()
+ qPrint(fullFuncDecl)
);
}
}
@@ -6537,7 +6534,7 @@ static void findMember(const Entry *root,
Debug::print(Debug::FindMembers,0,"2. related function\n"
" scopeName=%s className=%s\n",qPrint(scopeName),qPrint(className));
if (className.isEmpty()) className=relates;
- //printf("scopeName='%s' className='%s'\n",scopeName.data(),className.data());
+ //printf("scopeName='%s' className='%s'\n",qPrint(scopeName),qPrint(className));
if ((cd=getClassMutable(scopeName)))
{
bool newMember=TRUE; // assume we have a new member
@@ -6588,7 +6585,7 @@ static void findMember(const Entry *root,
}
if (rmd_found) // member already exists as rmd -> add docs
{
- //printf("addMemberDocs for related member %s\n",root->name.data());
+ //printf("addMemberDocs for related member %s\n",qPrint(root->name));
//rmd->setMemberDefTemplateArguments(root->mtArgList);
addMemberDocs(root,rmd_found,funcDecl,0,overloaded,spec);
}
@@ -6616,7 +6613,7 @@ static void findMember(const Entry *root,
funcDecl=funcType + " " + funcName;
}
- //printf("New related name '%s' '%d'\n",funcName.data(),
+ //printf("New related name '%s' '%d'\n",qPrint(funcName),
// root->argList ? (int)root->argList->count() : -1);
// first note that we pass:
@@ -6657,7 +6654,7 @@ static void findMember(const Entry *root,
md->setTagInfo(root->tagInfo());
//printf("Related member name='%s' decl='%s' bodyLine='%d'\n",
- // funcName.data(),funcDecl.data(),root->bodyLine);
+ // qPrint(funcName),qPrint(funcDecl),root->bodyLine);
// try to find the matching line number of the body from the
// global function list
@@ -6731,18 +6728,18 @@ static void findMember(const Entry *root,
{
addMemberToGroups(root,md.get());
}
- //printf("Adding member=%s\n",md->name().data());
+ //printf("Adding member=%s\n",qPrint(md->name()));
mn->push_back(std::move(md));
}
if (root->relatesType == Duplicate)
{
if (!findGlobalMember(root,namespaceName,funcType,funcName,funcTempList,funcArgs,funcDecl,spec))
{
- QCString fullFuncDecl=funcDecl.copy();
+ QCString fullFuncDecl=funcDecl;
if (isFunc) fullFuncDecl+=argListToString(root->argList,TRUE);
warn(root->fileName,root->startLine,
"Cannot determine file/namespace for relatedalso function\n%s",
- fullFuncDecl.data()
+ qPrint(fullFuncDecl)
);
}
}
@@ -6752,7 +6749,7 @@ static void findMember(const Entry *root,
warn_undoc(root->fileName,root->startLine,
"class '%s' for related function '%s' is not "
"documented.",
- className.data(),funcName.data()
+ qPrint(className),qPrint(funcName)
);
}
}
@@ -6767,14 +6764,14 @@ static void findMember(const Entry *root,
{
warn(root->fileName,root->startLine,
"class for member '%s' cannot "
- "be found.", funcName.data()
+ "be found.", qPrint(funcName)
);
}
else if (!className.isEmpty() && !globMem)
{
warn(root->fileName,root->startLine,
"member '%s' of class '%s' cannot be found",
- funcName.data(),className.data());
+ qPrint(funcName),qPrint(className));
}
}
}
@@ -6791,14 +6788,14 @@ static void findMember(const Entry *root,
// find the members corresponding to the different documentation blocks
// that are extracted from the sources.
-static void filterMemberDocumentation(const Entry *root,const QCString relates)
+static void filterMemberDocumentation(const Entry *root,const QCString &relates)
{
int i=-1,l;
Debug::print(Debug::FindMembers,0,
"findMemberDocumentation(): root->type='%s' root->inside='%s' root->name='%s' root->args='%s' section=%x root->spec=%lld root->mGrpId=%d\n",
qPrint(root->type),qPrint(root->inside),qPrint(root->name),qPrint(root->args),root->section,root->spec,root->mGrpId
);
- //printf("root->parent()->name=%s\n",root->parent()->name.data());
+ //printf("root->parent()->name=%s\n",qPrint(root->parent()->name));
bool isFunc=TRUE;
QCString type = root->type;
@@ -6811,7 +6808,7 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
// fix type and argument
args.prepend(type.right(type.length()-i-l));
type=type.left(i+l);
- //printf("Results type=%s,name=%s,args=%s\n",type.data(),root->name.data(),args.data());
+ //printf("Results type=%s,name=%s,args=%s\n",qPrint(type),qPrint(root->name),qPrint(args));
isFunc=FALSE;
}
else if ((type.left(8)=="typedef " && args.find('(')!=-1))
@@ -6820,12 +6817,12 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
isFunc=FALSE;
}
- //printf("Member %s isFunc=%d\n",root->name.data(),isFunc);
+ //printf("Member %s isFunc=%d\n",qPrint(root->name),isFunc);
if (root->section==Entry::MEMBERDOC_SEC)
{
//printf("Documentation for inline member '%s' found args='%s'\n",
- // root->name.data(),args.data());
- //if (relates.length()) printf(" Relates %s\n",relates.data());
+ // qPrint(root->name),qPrint(args));
+ //if (relates.length()) printf(" Relates %s\n",qPrint(relates));
if (type.isEmpty())
{
findMember(root,
@@ -6849,7 +6846,7 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
}
else if (root->section==Entry::OVERLOADDOC_SEC)
{
- //printf("Overloaded member %s found\n",root->name.data());
+ //printf("Overloaded member %s found\n",qPrint(root->name));
findMember(root,
relates,
type,
@@ -6870,9 +6867,9 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
)
{
//printf("Documentation for member '%s' found args='%s' excp='%s'\n",
- // root->name.data(),args.data(),root->exception.data());
- //if (relates.length()) printf(" Relates %s\n",relates.data());
- //printf("Inside=%s\n Relates=%s\n",root->inside.data(),relates.data());
+ // qPrint(root->name),qPrint(args),qPrint(root->exception));
+ //if (relates.length()) printf(" Relates %s\n",qPrint(relates));
+ //printf("Inside=%s\n Relates=%s\n",qPrint(root->inside),qPrint(relates));
if (type=="friend class" || type=="friend struct" ||
type=="friend union")
{
@@ -6915,8 +6912,8 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
}
else if (root->section==Entry::VARIABLEDOC_SEC)
{
- //printf("Documentation for variable %s found\n",root->name.data());
- //if (!relates.isEmpty()) printf(" Relates %s\n",relates.data());
+ //printf("Documentation for variable %s found\n",qPrint(root->name));
+ //if (!relates.isEmpty()) printf(" Relates %s\n",qPrint(relates));
findMember(root,
relates,
type,
@@ -6982,7 +6979,7 @@ static void findObjCMethodDefinitions(const Entry *root)
{
if (objCMethod->section==Entry::FUNCTION_SEC)
{
- //Printf(" Found ObjC method definition %s\n",objCMethod->name.data());
+ //Printf(" Found ObjC method definition %s\n",qPrint(objCMethod->name));
findMember(objCMethod.get(),
objCMethod->relates,
objCMethod->type,
@@ -7010,7 +7007,7 @@ static void findEnums(const Entry *root)
bool isGlobal;
bool isRelated=FALSE;
bool isMemberOf=FALSE;
- //printf("Found enum with name '%s' relates=%s\n",root->name.data(),root->relates.data());
+ //printf("Found enum with name '%s' relates=%s\n",qPrint(root->name),qPrint(root->relates));
int i;
QCString name;
@@ -7041,13 +7038,13 @@ static void findEnums(const Entry *root)
if (getClass(root->relates)==0 && !scope.isEmpty())
scope=mergeScopes(scope,root->relates);
else
- scope=root->relates.copy();
+ scope=root->relates;
if ((cd=getClassMutable(scope))==0) nd=getResolvedNamespaceMutable(scope);
}
if (cd && !name.isEmpty()) // found a enum inside a compound
{
- //printf("Enum '%s'::'%s'\n",cd->name().data(),name.data());
+ //printf("Enum '%s'::'%s'\n",qPrint(cd->name()),qPrint(name));
fd=0;
mnsd=Doxygen::memberNameLinkedMap;
isGlobal=FALSE;
@@ -7069,7 +7066,7 @@ static void findEnums(const Entry *root)
// new enum type
std::unique_ptr<MemberDefMutable> md { createMemberDef(
root->fileName,root->startLine,root->startColumn,
- 0,name,0,0,
+ QCString(),name,QCString(),QCString(),
root->protection,Normal,FALSE,
isMemberOf ? Foreign : isRelated ? Related : Member,
MemberType_Enumeration,
@@ -7083,16 +7080,16 @@ static void findEnums(const Entry *root)
md->setMemberSpecifiers(root->spec);
md->setEnumBaseType(root->args);
//printf("Enum %s definition at line %d of %s: protection=%d scope=%s\n",
- // root->name.data(),root->bodyLine,root->fileName.data(),root->protection,cd?cd->name().data():"<none>");
+ // qPrint(root->name),root->bodyLine,qPrint(root->fileName),root->protection,cd?qPrint(cd->name()):"<none>");
md->addSectionsToDefinition(root->anchors);
md->setMemberGroupId(root->mGrpId);
md->enableCallGraph(root->callGraph);
md->enableCallerGraph(root->callerGraph);
md->enableReferencedByRelation(root->referencedByRelation);
md->enableReferencesRelation(root->referencesRelation);
- //printf("%s::setRefItems(%zu)\n",md->name().data(),root->sli.size());
+ //printf("%s::setRefItems(%zu)\n",qPrint(md->name()),root->sli.size());
md->setRefItems(root->sli);
- //printf("found enum %s nd=%p\n",md->name().data(),nd);
+ //printf("found enum %s nd=%p\n",qPrint(md->name()),nd);
bool defSet=FALSE;
QCString baseType = root->args;
@@ -7151,7 +7148,7 @@ static void findEnums(const Entry *root)
md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
- //printf("Adding member=%s\n",md->name().data());
+ //printf("Adding member=%s\n",qPrint(md->name()));
addMemberToGroups(root,md.get());
MemberName *mn = mnsd->add(name);
@@ -7177,7 +7174,7 @@ static void addEnumValuesToEnums(const Entry *root)
MemberNameLinkedMap *mnsd=0;
bool isGlobal;
bool isRelated=FALSE;
- //printf("Found enum with name '%s' relates=%s\n",root->name.data(),root->relates.data());
+ //printf("Found enum with name '%s' relates=%s\n",qPrint(root->name),qPrint(root->relates));
int i;
QCString name;
@@ -7207,34 +7204,34 @@ static void addEnumValuesToEnums(const Entry *root)
if (getClassMutable(root->relates)==0 && !scope.isEmpty())
scope=mergeScopes(scope,root->relates);
else
- scope=root->relates.copy();
+ scope=root->relates;
if ((cd=getClassMutable(scope))==0) nd=getResolvedNamespaceMutable(scope);
}
if (cd && !name.isEmpty()) // found a enum inside a compound
{
- //printf("Enum in class '%s'::'%s'\n",cd->name().data(),name.data());
+ //printf("Enum in class '%s'::'%s'\n",qPrint(cd->name()),qPrint(name));
fd=0;
mnsd=Doxygen::memberNameLinkedMap;
isGlobal=FALSE;
}
else if (nd && !nd->isAnonymous()) // found enum inside namespace
{
- //printf("Enum in namespace '%s'::'%s'\n",nd->name().data(),name.data());
+ //printf("Enum in namespace '%s'::'%s'\n",qPrint(nd->name()),qPrint(name));
mnsd=Doxygen::functionNameLinkedMap;
isGlobal=TRUE;
}
else // found a global enum
{
fd=root->fileDef();
- //printf("Enum in file '%s': '%s'\n",fd->name().data(),name.data());
+ //printf("Enum in file '%s': '%s'\n",qPrint(fd->name()),qPrint(name));
mnsd=Doxygen::functionNameLinkedMap;
isGlobal=TRUE;
}
if (!name.isEmpty())
{
- //printf("** name=%s\n",name.data());
+ //printf("** name=%s\n",qPrint(name));
MemberName *mn = mnsd->find(name); // for all members with this name
if (mn)
{
@@ -7268,7 +7265,7 @@ static void addEnumValuesToEnums(const Entry *root)
// values are only visible inside the enum scope, so we must create
// them here and only add them to the enum
//printf("md->qualifiedName()=%s e->name=%s tagInfo=%p name=%s\n",
- // md->qualifiedName().data(),e->name.data(),e->tagInfo,e->name.data());
+ // qPrint(md->qualifiedName()),qPrint(e->name),e->tagInfo,qPrint(e->name));
QCString qualifiedName = substitute(root->name,"::",".");
if (!scope.isEmpty() && root->tagInfo())
{
@@ -7285,7 +7282,7 @@ static void addEnumValuesToEnums(const Entry *root)
}
std::unique_ptr<MemberDefMutable> fmd { createMemberDef(
fileName,e->startLine,e->startColumn,
- e->type,e->name,e->args,0,
+ e->type,e->name,e->args,QCString(),
e->protection, Normal,e->stat,Member,
MemberType_EnumValue,ArgumentList(),ArgumentList(),e->metaData) };
const NamespaceDef *mnd = md->getNamespaceDef();
@@ -7316,7 +7313,7 @@ static void addEnumValuesToEnums(const Entry *root)
}
else
{
- //printf("e->name=%s isRelated=%d\n",e->name.data(),isRelated);
+ //printf("e->name=%s isRelated=%d\n",qPrint(e->name),isRelated);
MemberName *fmn=0;
MemberNameLinkedMap *emnsd = isRelated ? Doxygen::functionNameLinkedMap : mnsd;
if (!e->name.isEmpty() && (fmn=emnsd->find(e->name)))
@@ -7328,7 +7325,7 @@ static void addEnumValuesToEnums(const Entry *root)
if (fmd && fmd->isEnumValue() && fmd->getOuterScope()==md->getOuterScope()) // in same scope
{
//printf("found enum value with same name %s in scope %s\n",
- // fmd->name().data(),fmd->getOuterScope()->name().data());
+ // qPrint(fmd->name()),qPrint(fmd->getOuterScope()->name()));
if (nd && !nd->isAnonymous())
{
const NamespaceDef *fnd=fmd->getNamespaceDef();
@@ -7363,7 +7360,7 @@ static void addEnumValuesToEnums(const Entry *root)
if (fcd==cd) // enum value is inside a class
{
//printf("Inserting enum field %s in enum scope %s\n",
- // fmd->name().data(),md->name().data());
+ // qPrint(fmd->name()),qPrint(md->name()));
md->insertEnumField(fmd); // add field def to list
fmd->setEnumScope(md); // cross ref with enum name
}
@@ -7406,7 +7403,7 @@ static void addEnumDocs(const Entry *root,MemberDefMutable *md)
md->setBriefDescription(root->brief,root->briefFile,root->briefLine);
}
- if (!md->inbodyDocumentation() || !root->parent()->name.isEmpty())
+ if (md->inbodyDocumentation().isEmpty() || !root->parent()->name.isEmpty())
{
md->setInbodyDocumentation(root->inbodyDocs,root->inbodyFile,root->inbodyLine);
}
@@ -7444,7 +7441,7 @@ static void findEnumDocumentation(const Entry *root)
{
name=root->name.right(root->name.length()-i-2); // extract name
scope=root->name.left(i); // extract scope
- //printf("Scope='%s' Name='%s'\n",scope.data(),name.data());
+ //printf("Scope='%s' Name='%s'\n",qPrint(scope),qPrint(name));
}
else // just the name
{
@@ -7461,10 +7458,10 @@ static void findEnumDocumentation(const Entry *root)
const NamespaceDef *nd=Doxygen::namespaceLinkedMap->find(scope);
const FileDef *fd = root->fileDef();
Debug::print(Debug::FindMembers,0,"1. Found docs for enum with name '%s' and scope '%s' in context %s cd=%s, nd=%s fd=%s\n",
- name.data(),scope.data(),root->parent()->name.data(),
- cd?cd->name().data():"<none>",
- nd?nd->name().data():"<none>",
- fd?fd->name().data():"<none>");
+ qPrint(name),qPrint(scope),qPrint(root->parent()->name),
+ cd?qPrint(cd->name()):"<none>",
+ nd?qPrint(nd->name()):"<none>",
+ fd?qPrint(fd->name()):"<none>");
if (!name.isEmpty())
{
@@ -7516,7 +7513,7 @@ static void findEnumDocumentation(const Entry *root)
{
warn(root->fileName,root->startLine,
"Documentation for undefined enum '%s' found.",
- name.data()
+ qPrint(name)
);
}
}
@@ -7649,8 +7646,8 @@ static void computeMemberRelations()
{
const ClassDef *bmcd = bmd->getClassDef();
//printf("Check relation between '%s'::'%s' (%p) and '%s'::'%s' (%p)\n",
- // mcd->name().data(),md->name().data(),md.get(),
- // bmcd->name().data(),bmd->name().data(),bmd.get()
+ // qPrint(mcd->name()),qPrint(md->name()),md.get(),
+ // qPrint(bmcd->name()),qPrint(bmd->name()),bmd.get()
// );
if (bmcd && mcd && bmcd!=mcd &&
(bmd->virtualness()!=Normal ||
@@ -7666,8 +7663,8 @@ static void computeMemberRelations()
const ArgumentList &bmdAl = bmd->argumentList();
const ArgumentList &mdAl = md->argumentList();
//printf(" Base argList='%s'\n Super argList='%s'\n",
- // argListToString(bmdAl).data(),
- // argListToString(mdAl).data()
+ // qPrint(argListToString(bmdAl)),
+ // qPrint(argListToString(mdAl))
// );
if (
matchArguments2(bmd->getOuterScope(),bmd->getFileDef(),&bmdAl,
@@ -7683,7 +7680,7 @@ static void computeMemberRelations()
//printf("setting (new) reimplements member\n");
md->setReimplements(bmd);
}
- //printf("%s: add reimplementedBy member %s\n",bmcd->name().data(),mcd->name().data());
+ //printf("%s: add reimplementedBy member %s\n",qPrint(bmcd->name()),qPrint(mcd->name()));
bmd->insertReimplementedBy(md);
}
else
@@ -7733,7 +7730,7 @@ static void mergeCategories()
if (baseClass)
{
//printf("*** merging members of category %s into %s\n",
- // cd->name().data(),baseClass->name().data());
+ // qPrint(cd->name()),qPrint(baseClass->name()));
baseClass->mergeCategory(cd.get());
}
}
@@ -7754,7 +7751,7 @@ static void buildCompleteMemberLists()
ClassDefMutable *cdm = toClassDefMutable(cd.get());
if (cdm)
{
- //printf("*** merging members for %s\n",cd->name().data());
+ //printf("*** merging members for %s\n",qPrint(cd->name()));
cdm->mergeMembers();
}
}
@@ -7805,7 +7802,7 @@ static void generateFileSources()
auto clangParser = ClangParser::instance()->createTUParser(fd.get());
if (fd->generateSourceFile() && !g_useOutputTemplate) // sources need to be shown in the output
{
- msg("Generating code for file %s...\n",fd->docName().data());
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
fd->writeSourceHeader(*g_outputList);
fd->writeSourceBody(*g_outputList,clangParser.get());
@@ -7814,7 +7811,7 @@ static void generateFileSources()
else if (!fd->isReference() && Doxygen::parseSourcesNeeded)
// we needed to parse the sources even if we do not show them
{
- msg("Parsing code for file %s...\n",fd->docName().data());
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
fd->parseSource(clangParser.get());
}
@@ -7822,7 +7819,7 @@ static void generateFileSources()
for (auto incFile : clangParser->filesInSameTU())
{
if (filesToProcess.find(incFile)!=filesToProcess.end() && // part of input
- fd->absFilePath()!=incFile && // not same file
+ fd->absFilePath()!=QCString(incFile) && // not same file
processedFiles.find(incFile)==processedFiles.end()) // not yet marked as processed
{
StringVector moreFiles;
@@ -7832,7 +7829,7 @@ static void generateFileSources()
{
if (ifd->generateSourceFile() && !g_useOutputTemplate) // sources need to be shown in the output
{
- msg(" Generating code for file %s...\n",ifd->docName().data());
+ msg(" Generating code for file %s...\n",qPrint(ifd->docName()));
ifd->writeSourceHeader(*g_outputList);
ifd->writeSourceBody(*g_outputList,clangParser.get());
ifd->writeSourceFooter(*g_outputList);
@@ -7840,7 +7837,7 @@ static void generateFileSources()
else if (!ifd->isReference() && Doxygen::parseSourcesNeeded)
// we needed to parse the sources even if we do not show them
{
- msg(" Parsing code for file %s...\n",ifd->docName().data());
+ msg(" Parsing code for file %s...\n",qPrint(ifd->docName()));
ifd->parseSource(clangParser.get());
}
processedFiles.insert(incFile);
@@ -7861,7 +7858,7 @@ static void generateFileSources()
if (fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate) // sources need to be shown in the output
{
auto clangParser = ClangParser::instance()->createTUParser(fd.get());
- msg("Generating code for file %s...\n",fd->docName().data());
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
fd->writeSourceHeader(*g_outputList);
fd->writeSourceBody(*g_outputList,clangParser.get());
@@ -7871,7 +7868,7 @@ static void generateFileSources()
// we needed to parse the sources even if we do not show them
{
auto clangParser = ClangParser::instance()->createTUParser(fd.get());
- msg("Parsing code for file %s...\n",fd->docName().data());
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
clangParser->parse();
fd->writeSourceHeader(*g_outputList);
fd->writeSourceBody(*g_outputList,clangParser.get());
@@ -7910,12 +7907,12 @@ static void generateFileSources()
auto ctx = std::make_shared<SourceContext>(fd.get(),generateSourceFile,*g_outputList);
if (generateSourceFile)
{
- msg("Generating code for file %s...\n",fd->docName().data());
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
fd->writeSourceHeader(ctx->ol);
}
else
{
- msg("Parsing code for file %s...\n",fd->docName().data());
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
}
auto processFile = [ctx]() {
StringVector filesInSameTu;
@@ -7951,7 +7948,7 @@ static void generateFileSources()
fd->getAllIncludeFilesRecursively(filesInSameTu);
if (fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate) // sources need to be shown in the output
{
- msg("Generating code for file %s...\n",fd->docName().data());
+ msg("Generating code for file %s...\n",qPrint(fd->docName()));
fd->writeSourceHeader(*g_outputList);
fd->writeSourceBody(*g_outputList,nullptr);
fd->writeSourceFooter(*g_outputList);
@@ -7959,7 +7956,7 @@ static void generateFileSources()
else if (!fd->isReference() && Doxygen::parseSourcesNeeded)
// we needed to parse the sources even if we do not show them
{
- msg("Parsing code for file %s...\n",fd->docName().data());
+ msg("Parsing code for file %s...\n",qPrint(fd->docName()));
fd->parseSource(nullptr);
}
}
@@ -7984,7 +7981,7 @@ static void generateFileDocs()
bool doc = fd->isLinkableInProject();
if (doc)
{
- msg("Generating docs for file %s...\n",fd->docName().data());
+ msg("Generating docs for file %s...\n",qPrint(fd->docName()));
fd->writeDocumentation(*g_outputList);
}
}
@@ -8030,8 +8027,8 @@ static void addSourceReferences()
for (const auto &md : *mn)
{
//printf("class member %s: def=%s body=%d link?=%d\n",
- // md->name().data(),
- // md->getBodyDef()?md->getBodyDef()->name().data():"<none>",
+ // qPrint(md->name()),
+ // md->getBodyDef()?qPrint(md->getBodyDef()->name()):"<none>",
// md->getStartBodyLine(),md->isLinkableInProject());
FileDef *fd=md->getBodyDef();
if (fd &&
@@ -8041,7 +8038,7 @@ static void addSourceReferences()
)
{
//printf("Found member '%s' in file '%s' at line '%d' def=%s\n",
- // md->name().data(),fd->name().data(),md->getStartBodyLine(),md->getOuterScope()->name().data());
+ // qPrint(md->name()),qPrint(fd->name()),md->getStartBodyLine(),qPrint(md->getOuterScope()->name()));
fd->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
}
}
@@ -8052,7 +8049,7 @@ static void addSourceReferences()
{
FileDef *fd=md->getBodyDef();
//printf("member %s body=[%d,%d] fd=%p link=%d parseSources=%d\n",
- // md->name().data(),
+ // qPrint(md->name()),
// md->getStartBodyLine(),md->getEndBodyLine(),fd,
// md->isLinkableInProject(),
// Doxygen::parseSourcesNeeded);
@@ -8063,7 +8060,7 @@ static void addSourceReferences()
)
{
//printf("Found member '%s' in file '%s' at line '%d' def=%s\n",
- // md->name().data(),fd->name().data(),md->getStartBodyLine(),md->getOuterScope()->name().data());
+ // qPrint(md->name()),qPrint(fd->name()),md->getStartBodyLine(),qPrint(md->getOuterScope()->name()));
fd->addSourceRef(md->getStartDefLine(),md->getOuterScope(),md.get());
}
}
@@ -8084,7 +8081,7 @@ static void buildDefineList()
{
std::unique_ptr<MemberDefMutable> md { createMemberDef(
def.fileName,def.lineNr,def.columnNr,
- "#define",def.name,def.args,0,
+ "#define",def.name,def.args,QCString(),
Public,Normal,FALSE,Member,MemberType_Define,
ArgumentList(),ArgumentList(),"") };
@@ -8228,7 +8225,7 @@ static void generateClassList(const ClassLinkedMap &classList)
{
ClassDefMutable *cd=toClassDefMutable(cdi.get());
- //printf("cd=%s getOuterScope=%p global=%p\n",cd->name().data(),cd->getOuterScope(),Doxygen::globalScope);
+ //printf("cd=%s getOuterScope=%p global=%p\n",qPrint(cd->name()),cd->getOuterScope(),Doxygen::globalScope);
if (cd &&
(cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
cd->getOuterScope()==Doxygen::globalScope // only look at global classes
@@ -8239,7 +8236,7 @@ static void generateClassList(const ClassLinkedMap &classList)
// template instances
if ( cd->isLinkableInProject() && cd->templateMaster()==0)
{
- msg("Generating docs for compound %s...\n",cd->name().data());
+ msg("Generating docs for compound %s...\n",qPrint(cd->name()));
cd->writeDocumentation(*g_outputList);
cd->writeMemberList(*g_outputList);
@@ -8264,14 +8261,14 @@ static void generateConceptDocs()
{
ConceptDefMutable *cd=toConceptDefMutable(cdi.get());
- //printf("cd=%s getOuterScope=%p global=%p\n",cd->name().data(),cd->getOuterScope(),Doxygen::globalScope);
+ //printf("cd=%s getOuterScope=%p global=%p\n",qPrint(cd->name()),cd->getOuterScope(),Doxygen::globalScope);
if (cd &&
(cd->getOuterScope()==0 || // <-- should not happen, but can if we read an old tag file
cd->getOuterScope()==Doxygen::globalScope // only look at global concepts
) && !cd->isHidden() && cd->isLinkableInProject()
)
{
- msg("Generating docs for concept %s...\n",cd->name().data());
+ msg("Generating docs for concept %s...\n",qPrint(cd->name()));
cd->writeDocumentation(*g_outputList);
}
}
@@ -8287,7 +8284,7 @@ static void inheritDocumentation()
{
MemberDefMutable *md = toMemberDefMutable(imd.get());
//static int count=0;
- //printf("%04d Member '%s'\n",count++,md->qualifiedName().data());
+ //printf("%04d Member '%s'\n",count++,qPrint(md->qualifiedName()));
if (md && md->documentation().isEmpty() && md->briefDescription().isEmpty())
{ // no documentation yet
const MemberDef *bmd = md->reimplements();
@@ -8295,7 +8292,7 @@ static void inheritDocumentation()
bmd->briefDescription().isEmpty()
)
{ // search up the inheritance tree for a documentation member
- //printf("bmd=%s class=%s\n",bmd->name().data(),bmd->getClassDef()->name().data());
+ //printf("bmd=%s class=%s\n",qPrint(bmd->name()),qPrint(bmd->getClassDef()->name()));
bmd = bmd->reimplements();
}
if (bmd) // copy the documentation from the reimplemented member
@@ -8581,19 +8578,19 @@ static void findDefineDocumentation(Entry *root)
)
{
//printf("found define '%s' '%s' brief='%s' doc='%s'\n",
- // root->name.data(),root->args.data(),root->brief.data(),root->doc.data());
+ // qPrint(root->name),qPrint(root->args),qPrint(root->brief),qPrint(root->doc));
if (root->tagInfo() && !root->name.isEmpty()) // define read from a tag file
{
std::unique_ptr<MemberDefMutable> md { createMemberDef(root->tagInfo()->tagName,1,1,
- "#define",root->name,root->args,0,
+ "#define",root->name,root->args,QCString(),
Public,Normal,FALSE,Member,MemberType_Define,
ArgumentList(),ArgumentList(),"") };
md->setTagInfo(root->tagInfo());
md->setLanguage(root->lang);
- //printf("Searching for '%s' fd=%p\n",filePathName.data(),fd);
+ //printf("Searching for '%s' fd=%p\n",qPrint(filePathName),fd);
md->setFileDef(root->parent()->fileDef());
- //printf("Adding member=%s\n",md->name().data());
+ //printf("Adding member=%s\n",qPrint(md->name()));
MemberName *mn = Doxygen::functionNameLinkedMap->add(root->name);
mn->push_back(std::move(md));
}
@@ -8664,10 +8661,10 @@ static void findDefineDocumentation(Entry *root)
}
}
}
- //warn("define %s found in the following files:\n",root->name.data());
+ //warn("define %s found in the following files:\n",qPrint(root->name));
//warn("Cannot determine where to add the documentation found "
// "at line %d of file %s. \n",
- // root->startLine,root->fileName.data());
+ // root->startLine,qPrint(root->fileName));
}
}
else if (!root->doc.isEmpty() || !root->brief.isEmpty()) // define not found
@@ -8677,7 +8674,7 @@ static void findDefineDocumentation(Entry *root)
{
warn(root->fileName,root->startLine,
"documentation for unknown define %s found.\n",
- root->name.data()
+ qPrint(root->name)
);
}
else
@@ -8685,7 +8682,7 @@ static void findDefineDocumentation(Entry *root)
warn(root->fileName,root->startLine,
"found documented #define %s but ignoring it because "
"ENABLE_PREPROCESSING is NO.\n",
- root->name.data()
+ qPrint(root->name)
);
}
}
@@ -8702,7 +8699,7 @@ static void findDirDocumentation(const Entry *root)
QCString normalizedName = root->name;
normalizedName = substitute(normalizedName,"\\","/");
//printf("root->docFile=%s normalizedName=%s\n",
- // root->docFile.data(),normalizedName.data());
+ // qPrint(root->docFile),qPrint(normalizedName));
if (root->docFile==normalizedName) // current dir?
{
int lastSlashPos=normalizedName.findRev('/');
@@ -8718,7 +8715,7 @@ static void findDirDocumentation(const Entry *root)
DirDef *matchingDir=0;
for (const auto &dir : *Doxygen::dirLinkedMap)
{
- //printf("Dir: %s<->%s\n",dir->name().data(),normalizedName.data());
+ //printf("Dir: %s<->%s\n",qPrint(dir->name()),qPrint(normalizedName));
if (dir->name().right(normalizedName.length())==normalizedName)
{
if (matchingDir)
@@ -8727,7 +8724,7 @@ static void findDirDocumentation(const Entry *root)
"\\dir command matches multiple directories.\n"
" Applying the command for directory %s\n"
" Ignoring the command for directory %s\n",
- matchingDir->name().data(),dir->name().data()
+ qPrint(matchingDir->name()),qPrint(dir->name())
);
}
else
@@ -8738,7 +8735,7 @@ static void findDirDocumentation(const Entry *root)
}
if (matchingDir)
{
- //printf("Match for with dir %s\n",matchingDir->name().data());
+ //printf("Match for with dir %s\n",qPrint(matchingDir->name()));
matchingDir->setBriefDescription(root->brief,root->briefFile,root->briefLine);
matchingDir->setDocumentation(root->doc,root->docFile,root->docLine);
matchingDir->setRefItems(root->sli);
@@ -8747,7 +8744,7 @@ static void findDirDocumentation(const Entry *root)
else
{
warn(root->fileName,root->startLine,"No matching "
- "directory found for command \\dir %s\n",normalizedName.data());
+ "directory found for command \\dir %s\n",qPrint(normalizedName));
}
}
for (const auto &e : root->children()) findDirDocumentation(e.get());
@@ -8777,7 +8774,7 @@ static void buildPageList(Entry *root)
"page",
name,
title,
- 0,0
+ QCString(),0
);
}
for (const auto &e : root->children()) buildPageList(e.get());
@@ -8791,7 +8788,7 @@ static void findMainPage(Entry *root)
if (Doxygen::mainPage==0 && root->tagInfo()==0)
{
//printf("mainpage: docLine=%d startLine=%d\n",root->docLine,root->startLine);
- //printf("Found main page! \n======\n%s\n=======\n",root->doc.data());
+ //printf("Found main page! \n======\n%s\n=======\n",qPrint(root->doc));
QCString title=root->args.stripWhiteSpace();
if (title.isEmpty()) title = Config_getString(PROJECT_NAME);
//QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
@@ -8811,12 +8808,12 @@ static void findMainPage(Entry *root)
if (si->lineNr() != -1)
{
warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s, line %d)",
- Doxygen::mainPage->name().data(),si->fileName().data(),si->lineNr());
+ qPrint(Doxygen::mainPage->name()),qPrint(si->fileName()),si->lineNr());
}
else
{
warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s)",
- Doxygen::mainPage->name().data(),si->fileName().data());
+ qPrint(Doxygen::mainPage->name()),qPrint(si->fileName()));
}
}
else
@@ -8836,7 +8833,7 @@ static void findMainPage(Entry *root)
{
warn(root->fileName,root->startLine,
"found more than one \\mainpage comment block! (first occurrence: %s, line %d), Skipping current block!",
- Doxygen::mainPage->docFile().data(),Doxygen::mainPage->getStartBodyLine());
+ qPrint(Doxygen::mainPage->docFile()),Doxygen::mainPage->getStartBodyLine());
}
}
for (const auto &e : root->children()) findMainPage(e.get());
@@ -8875,13 +8872,13 @@ static void computePageRelations(Entry *root)
{
term("page defined at line %d of file %s with label %s is a direct "
"subpage of itself! Please remove this cyclic dependency.\n",
- pd->docLine(),pd->docFile().data(),pd->name().data());
+ pd->docLine(),qPrint(pd->docFile()),qPrint(pd->name()));
}
else if (subPd)
{
pd->addInnerCompound(subPd);
//printf("*** Added subpage relation: %s->%s\n",
- // pd->name().data(),subPd->name().data());
+ // qPrint(pd->name()),qPrint(subPd->name()));
}
}
}
@@ -8900,7 +8897,7 @@ static void checkPageRelations()
{
term("page defined at line %d of file %s with label %s is a subpage "
"of itself! Please remove this cyclic dependency.\n",
- pd->docLine(),pd->docFile().data(),pd->name().data());
+ pd->docLine(),qPrint(pd->docFile()),qPrint(pd->name()));
}
ppd=ppd->getOuterScope();
}
@@ -8914,8 +8911,8 @@ static void resolveUserReferences()
for (const auto &si : SectionManager::instance())
{
//printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
- // si->label.data(),si->definition?si->definition->name().data():"<none>",
- // si->fileName.data());
+ // qPrint(si->label),si->definition?qPrint(si->definition->name()):"<none>",
+ // qPrint(si->fileName));
PageDef *pd=0;
// hack: the items of a todo/test/bug/deprecated list are all fragments from
@@ -8934,7 +8931,7 @@ static void resolveUserReferences()
}
}
- //printf("start: si->label=%s si->fileName=%s\n",si->label.data(),si->fileName.data());
+ //printf("start: si->label=%s si->fileName=%s\n",qPrint(si->label),qPrint(si->fileName));
if (!si->generated())
{
// if this section is in a page and the page is in a group, then we
@@ -8962,12 +8959,12 @@ static void resolveUserReferences()
}
else
{
- //si->fileName=si->definition->getOutputFileBase().copy();
- //printf("Setting si->fileName to %s\n",si->fileName.data());
+ //si->fileName=si->definition->getOutputFileBase();
+ //printf("Setting si->fileName to %s\n",qPrint(si->fileName));
}
}
}
- //printf("end: si->label=%s si->fileName=%s\n",si->label.data(),si->fileName.data());
+ //printf("end: si->label=%s si->fileName=%s\n",qPrint(si->label),qPrint(si->fileName));
}
}
@@ -8985,7 +8982,7 @@ static void generatePageDocs()
{
if (!pd->getGroupDef() && !pd->isReference())
{
- msg("Generating docs for page %s...\n",pd->name().data());
+ msg("Generating docs for page %s...\n",qPrint(pd->name()));
Doxygen::insideMainPage=TRUE;
pd->writeDocumentation(*g_outputList);
Doxygen::insideMainPage=FALSE;
@@ -9005,7 +9002,7 @@ static void buildExampleList(Entry *root)
warn(root->fileName,root->startLine,
"Example %s was already documented. Ignoring "
"documentation found here.",
- root->name.data()
+ qPrint(root->name)
);
}
else
@@ -9035,8 +9032,8 @@ void printNavTree(Entry *root,int indent)
QCString indentStr;
indentStr.fill(' ',indent);
msg("%s%s (sec=0x%x)\n",
- indentStr.isEmpty()?"":indentStr.data(),
- root->name.isEmpty()?"<empty>":root->name.data(),
+ indentStr.isEmpty()?"":qPrint(indentStr),
+ root->name.isEmpty()?"<empty>":qPrint(root->name),
root->section);
for (const auto &e : root->children())
{
@@ -9053,14 +9050,14 @@ static void generateExampleDocs()
g_outputList->disable(OutputGenerator::Man);
for (const auto &pd : *Doxygen::exampleLinkedMap)
{
- msg("Generating docs for example %s...\n",pd->name().data());
+ msg("Generating docs for example %s...\n",qPrint(pd->name()));
auto intf = Doxygen::parserManager->getCodeParser(".c"); // TODO: do this on code type
intf->resetCodeParserState();
QCString n=pd->getOutputFileBase();
startFile(*g_outputList,n,n,pd->name());
startTitle(*g_outputList,n);
g_outputList->docify(pd->name());
- endTitle(*g_outputList,n,0);
+ endTitle(*g_outputList,n,QCString());
g_outputList->startContents();
QCString lineNoOptStr;
if (pd->showLineNo())
@@ -9116,7 +9113,7 @@ static void generateNamespaceClassDocs(const ClassLinkedRefMap &classList)
&& !cd->isHidden() && !cd->isEmbeddedInOuterScope()
)
{
- msg("Generating docs for compound %s...\n",cd->name().data());
+ msg("Generating docs for compound %s...\n",qPrint(cd->name()));
cdm->writeDocumentation(*g_outputList);
cdm->writeMemberList(*g_outputList);
@@ -9134,7 +9131,7 @@ static void generateNamespaceConceptDocs(const ConceptLinkedRefMap &conceptList)
ConceptDefMutable *cdm = toConceptDefMutable(cd);
if ( cdm && cd->isLinkableInProject() && !cd->isHidden())
{
- msg("Generating docs for concept %s...\n",cd->name().data());
+ msg("Generating docs for concept %s...\n",qPrint(cd->name()));
cdm->writeDocumentation(*g_outputList);
}
}
@@ -9154,7 +9151,7 @@ static void generateNamespaceDocs()
NamespaceDefMutable *ndm = toNamespaceDefMutable(nd.get());
if (ndm)
{
- msg("Generating docs for namespace %s\n",nd->name().data());
+ msg("Generating docs for namespace %s\n",qPrint(nd->name()));
ndm->writeDocumentation(*g_outputList);
}
}
@@ -9198,12 +9195,12 @@ static QCString fixSlashes(QCString &s)
* If the \a shortList parameter is TRUE a configuration file without
* comments will be generated.
*/
-static void generateConfigFile(const char *configFile,bool shortList,
+static void generateConfigFile(const QCString &configFile,bool shortList,
bool updateOnly=FALSE)
{
std::ofstream f;
bool fileOpened=openOutputFile(configFile,f);
- bool writeToStdout=(configFile[0]=='-' && configFile[1]=='\0');
+ bool writeToStdout=configFile=="-";
if (fileOpened)
{
TextStream t(&f);
@@ -9212,33 +9209,30 @@ static void generateConfigFile(const char *configFile,bool shortList,
{
if (!updateOnly)
{
- msg("\n\nConfiguration file '%s' created.\n\n",configFile);
+ msg("\n\nConfiguration file '%s' created.\n\n",qPrint(configFile));
msg("Now edit the configuration file and enter\n\n");
- if (qstrcmp(configFile,"Doxyfile") || qstrcmp(configFile,"doxyfile"))
- msg(" doxygen %s\n\n",configFile);
+ if (configFile!="Doxyfile" && configFile!="doxyfile")
+ msg(" doxygen %s\n\n",qPrint(configFile));
else
msg(" doxygen\n\n");
msg("to generate the documentation for your project\n\n");
}
else
{
- msg("\n\nConfiguration file '%s' updated.\n\n",configFile);
+ msg("\n\nConfiguration file '%s' updated.\n\n",qPrint(configFile));
}
}
}
else
{
- term("Cannot open file %s for writing\n",configFile);
+ term("Cannot open file %s for writing\n",qPrint(configFile));
}
}
static void compareDoxyfile()
{
std::ofstream f;
- char configFile[2];
- configFile[0] = '-';
- configFile[1] = '\0';
- bool fileOpened=openOutputFile(configFile,f);
+ bool fileOpened=openOutputFile("-",f);
if (fileOpened)
{
TextStream t(&f);
@@ -9246,16 +9240,15 @@ static void compareDoxyfile()
}
else
{
- term("Cannot open file %s for writing\n",configFile);
+ term("Cannot open stdout for writing\n");
}
}
//----------------------------------------------------------------------------
// read and parse a tag file
-static void readTagFile(const std::shared_ptr<Entry> &root,const char *tl)
+static void readTagFile(const std::shared_ptr<Entry> &root,const QCString &tagLine)
{
- QCString tagLine = tl;
QCString fileName;
QCString destName;
int eqPos = tagLine.find('=');
@@ -9267,7 +9260,7 @@ static void readTagFile(const std::shared_ptr<Entry> &root,const char *tl)
FileInfo fi(fileName.str());
Doxygen::tagDestinationMap.insert(
std::make_pair(fi.absFilePath(), destName.str()));
- //printf("insert tagDestination %s->%s\n",fi.fileName().data(),destName.data());
+ //printf("insert tagDestination %s->%s\n",qPrint(fi.fileName()),qPrint(destName));
}
else
{
@@ -9278,14 +9271,14 @@ static void readTagFile(const std::shared_ptr<Entry> &root,const char *tl)
if (!fi.exists() || !fi.isFile())
{
err("Tag file '%s' does not exist or is not a file. Skipping it...\n",
- fileName.data());
+ qPrint(fileName));
return;
}
if (!destName.isEmpty())
- msg("Reading tag file '%s', location '%s'...\n",fileName.data(),destName.data());
+ msg("Reading tag file '%s', location '%s'...\n",qPrint(fileName),qPrint(destName));
else
- msg("Reading tag file '%s'...\n",fileName.data());
+ msg("Reading tag file '%s'...\n",qPrint(fileName));
parseTagFile(root,fi.absFilePath().c_str());
}
@@ -9302,7 +9295,7 @@ static void copyLatexStyleSheet()
FileInfo fi(fileName);
if (!fi.exists())
{
- err("Style sheet '%s' specified by LATEX_EXTRA_STYLESHEET does not exist!\n",fileName.data());
+ err("Style sheet '%s' specified by LATEX_EXTRA_STYLESHEET does not exist!\n",qPrint(fileName));
}
else
{
@@ -9311,7 +9304,7 @@ static void copyLatexStyleSheet()
{
destFileName += LATEX_STYLE_EXTENSION;
}
- copyFile(fileName, destFileName);
+ copyFile(QCString(fileName), destFileName);
}
}
}
@@ -9326,7 +9319,7 @@ static void copyStyleSheet()
FileInfo fi(htmlStyleSheet.str());
if (!fi.exists())
{
- err("Style sheet '%s' specified by HTML_STYLESHEET does not exist!\n",htmlStyleSheet.data());
+ err("Style sheet '%s' specified by HTML_STYLESHEET does not exist!\n",qPrint(htmlStyleSheet));
htmlStyleSheet = Config_updateString(HTML_STYLESHEET,""); // revert to the default
}
else
@@ -9348,12 +9341,12 @@ static void copyStyleSheet()
}
else if (fi.fileName()=="doxygen.css" || fi.fileName()=="tabs.css" || fi.fileName()=="navtree.css")
{
- err("Style sheet %s specified by HTML_EXTRA_STYLESHEET is already a built-in stylesheet. Please use a different name\n",fi.fileName().data());
+ err("Style sheet %s specified by HTML_EXTRA_STYLESHEET is already a built-in stylesheet. Please use a different name\n",qPrint(fi.fileName()));
}
else
{
QCString destFileName = Config_getString(HTML_OUTPUT)+"/"+fi.fileName();
- copyFile(fileName, destFileName);
+ copyFile(QCString(fileName), destFileName);
}
}
}
@@ -9367,7 +9360,7 @@ static void copyLogo(const QCString &outputOption)
FileInfo fi(projectLogo.str());
if (!fi.exists())
{
- err("Project logo '%s' specified by PROJECT_LOGO does not exist!\n",projectLogo.data());
+ err("Project logo '%s' specified by PROJECT_LOGO does not exist!\n",qPrint(projectLogo));
projectLogo = Config_updateString(PROJECT_LOGO,""); // revert to the default
}
else
@@ -9388,13 +9381,13 @@ static void copyExtraFiles(const StringVector &files,const QCString &filesOption
FileInfo fi(fileName);
if (!fi.exists())
{
- err("Extra file '%s' specified in %s does not exist!\n", fileName.c_str(),filesOption.data());
+ err("Extra file '%s' specified in %s does not exist!\n", fileName.c_str(),qPrint(filesOption));
}
else
{
QCString destFileName = outputOption+"/"+fi.fileName();
Doxygen::indexList->addImageFile(fi.fileName().c_str());
- copyFile(fileName, destFileName);
+ copyFile(QCString(fileName), destFileName);
}
}
}
@@ -9436,7 +9429,7 @@ static void generateDiskNames()
std::sort(fileEntries.begin(),
fileEntries.end(),
[](const FileEntry &fe1,const FileEntry &fe2)
- { return qstrcmp(fe1.path.data(),fe2.path.data())<0; }
+ { return fe1.path < fe2.path; }
);
// since the entries are sorted, the common prefix of the whole array is same
@@ -9468,7 +9461,7 @@ static void generateDiskNames()
{
QCString prefix = fileEntry.path.right(fileEntry.path.length()-j-1);
fileEntry.fileDef->setName(prefix+fn->fileName());
- //printf("!!!!!!!! non unique disk name=%s:%s\n",prefix.data(),fn->fileName());
+ //printf("!!!!!!!! non unique disk name=%s:%s\n",qPrint(prefix),fn->fileName());
fileEntry.fileDef->setDiskName(prefix+fn->fileName());
}
}
@@ -9479,7 +9472,7 @@ static void generateDiskNames()
//----------------------------------------------------------------------------
-static std::unique_ptr<OutlineParserInterface> getParserForFile(const char *fn)
+static std::unique_ptr<OutlineParserInterface> getParserForFile(const QCString &fn)
{
QCString fileName=fn;
QCString extension;
@@ -9498,7 +9491,7 @@ static std::unique_ptr<OutlineParserInterface> getParserForFile(const char *fn)
}
static std::shared_ptr<Entry> parseFile(OutlineParserInterface &parser,
- FileDef *fd,const char *fn,
+ FileDef *fd,const QCString &fn,
ClangTUParser *clangParser,bool newTU)
{
QCString fileName=fn;
@@ -9527,13 +9520,13 @@ static std::shared_ptr<Entry> parseFile(OutlineParserInterface &parser,
preprocessor.addSearchDir(absPath.c_str());
}
BufStr inBuf((uint)fi.size()+4096);
- msg("Preprocessing %s...\n",fn);
+ msg("Preprocessing %s...\n",qPrint(fn));
readInputFile(fileName,inBuf);
preprocessor.processFile(fileName,inBuf,preBuf);
}
else // no preprocessing
{
- msg("Reading %s...\n",fn);
+ msg("Reading %s...\n",qPrint(fn));
readInputFile(fileName,preBuf);
}
if (preBuf.data() && preBuf.curPos()>0 && *(preBuf.data()+preBuf.curPos()-1)!='\n')
@@ -9783,13 +9776,13 @@ static void parseFilesSingleThreading(const std::shared_ptr<Entry> &root)
// resolves a path that may include symlinks, if a recursive symlink is
// found an empty string is returned.
-static QCString resolveSymlink(QCString path)
+static std::string resolveSymlink(const std::string &path)
{
int sepPos=0;
int oldPos=0;
StringSet nonSymlinks;
StringSet known;
- QCString result = path;
+ QCString result(path);
QCString oldPrefix = "/";
do
{
@@ -9824,7 +9817,7 @@ static QCString resolveSymlink(QCString path)
}
result = Dir::cleanDirPath(target.str());
sepPos = 0;
- if (known.find(result.str())!=known.end()) return QCString(); // recursive symlink!
+ if (known.find(result.str())!=known.end()) return std::string(); // recursive symlink!
known.insert(result.str());
if (isRelative)
{
@@ -9885,7 +9878,7 @@ static void readDir(FileInfo *fi,
g_pathsVisited.insert(dirName);
}
Dir dir(dirName);
- msg("Searching for files in directory %s\n", fi->absFilePath().data());
+ msg("Searching for files in directory %s\n", qPrint(fi->absFilePath()));
//printf("killSet=%p count=%d\n",killSet,killSet ? (int)killSet->count() : -1);
for (const auto &dirEntry : dir.iterator())
@@ -9893,7 +9886,7 @@ static void readDir(FileInfo *fi,
FileInfo cfi(dirEntry.path());
if (exclSet==0 || exclSet->find(cfi.absFilePath())==exclSet->end())
{ // file should not be excluded
- //printf("killSet->find(%s)\n",cfi->absFilePath().data());
+ //printf("killSet->find(%s)\n",qPrint(cfi->absFilePath()));
if (!cfi.exists() || !cfi.isReadable())
{
if (errorIfNotExist)
@@ -9911,11 +9904,11 @@ static void readDir(FileInfo *fi,
std::string name=cfi.fileName();
if (fnMap)
{
- std::unique_ptr<FileDef> fd { createFileDef(cfi.dirPath()+"/",name) };
+ std::unique_ptr<FileDef> fd { createFileDef(QCString(cfi.dirPath()+"/"),QCString(name)) };
FileName *fn=0;
if (!name.empty())
{
- fn = fnMap->add(name.c_str(),cfi.absFilePath().c_str());
+ fn = fnMap->add(QCString(name),QCString(cfi.absFilePath()));
fn->push_back(std::move(fd));
}
}
@@ -9943,7 +9936,7 @@ static void readDir(FileInfo *fi,
// read a file or all files in a directory and append their contents to the
// input string. The names of the files are appended to the 'fiList' list.
-void readFileOrDirectory(const char *s,
+void readFileOrDirectory(const QCString &s,
FileNameLinkedMap *fnMap,
StringUnorderedSet *exclSet,
const StringVector *patList,
@@ -9958,9 +9951,9 @@ void readFileOrDirectory(const char *s,
{
//printf("killSet count=%d\n",killSet ? (int)killSet->size() : -1);
// strip trailing slashes
- if (s==0) return;
+ if (s.isEmpty()) return;
- FileInfo fi(s);
+ FileInfo fi(s.str());
//printf("readFileOrDirectory(%s)\n",s);
{
if (exclSet==0 || exclSet->find(fi.absFilePath())==exclSet->end())
@@ -9969,7 +9962,7 @@ void readFileOrDirectory(const char *s,
{
if (errorIfNotExist)
{
- warn_uncond("source '%s' is not a readable file or directory... skipping.\n",s);
+ warn_uncond("source '%s' is not a readable file or directory... skipping.\n",qPrint(s));
}
}
else if (!Config_getBool(EXCLUDE_SYMLINKS) || !fi.isSymLink())
@@ -9982,16 +9975,16 @@ void readFileOrDirectory(const char *s,
{
paths->insert(dirPath);
}
- //printf("killSet.find(%s)=%d\n",fi.absFilePath().data(),killSet.find(fi.absFilePath())!=killSet.end());
+ //printf("killSet.find(%s)=%d\n",qPrint(fi.absFilePath()),killSet.find(fi.absFilePath())!=killSet.end());
if (killSet==0 || killSet->find(filePath)==killSet->end())
{
std::string name=fi.fileName();
if (fnMap)
{
- std::unique_ptr<FileDef> fd { createFileDef(dirPath+"/",name) };
+ std::unique_ptr<FileDef> fd { createFileDef(QCString(dirPath+"/"),QCString(name)) };
if (!name.empty())
{
- FileName *fn = fnMap->add(name.c_str(),filePath.c_str());
+ FileName *fn = fnMap->add(QCString(name),QCString(filePath));
fn->push_back(std::move(fd));
}
}
@@ -10031,7 +10024,7 @@ static void escapeAliases()
{
for (auto &kv : Doxygen::aliasMap)
{
- QCString value=kv.second;
+ QCString value(kv.second);
QCString newValue;
int in,p=0;
// for each \n in the alias command value
@@ -10065,7 +10058,7 @@ static void escapeAliases()
}
newValue+=value.mid(p,value.length()-p);
kv.second=newValue.str();
- //printf("Alias %s has value %s\n",adi.currentKey().data(),s->data());
+ //printf("Alias %s has value %s\n",kv.first.c_str(),qPrint(newValue));
}
}
@@ -10077,13 +10070,13 @@ void readAliases()
const StringVector &aliasList = Config_getList(ALIASES);
for (const auto &al : aliasList)
{
- QCString alias = al;
+ QCString alias(al);
int i=alias.find('=');
if (i>0)
{
QCString name=alias.left(i).stripWhiteSpace();
QCString value=alias.right(alias.length()-i-1);
- //printf("Alias: found name='%s' value='%s'\n",name.data(),value.data());
+ //printf("Alias: found name='%s' value='%s'\n",qPrint(name),qPrint(value));
if (!name.isEmpty())
{
auto it = Doxygen::aliasMap.find(name.str());
@@ -10157,7 +10150,7 @@ static void devUsage()
static void version(const bool extended)
{
QCString versionString = getFullVersion();
- msg("%s\n",versionString.data());
+ msg("%s\n",qPrint(versionString));
if (extended)
{
QCString extVers;
@@ -10179,7 +10172,7 @@ static void version(const bool extended)
{
int lastComma = extVers.findRev(',');
if (lastComma != -1) extVers = extVers.replace(lastComma,1," and");
- msg(" with %s.\n",extVers.data());
+ msg(" with %s.\n",qPrint(extVers));
}
}
}
@@ -10187,33 +10180,33 @@ static void version(const bool extended)
//----------------------------------------------------------------------------
// print the usage of doxygen
-static void usage(const char *name,const char *versionString)
+static void usage(const QCString &name,const QCString &versionString)
{
- msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2021\n\n",versionString);
+ msg("Doxygen version %s\nCopyright Dimitri van Heesch 1997-2021\n\n",qPrint(versionString));
msg("You can use doxygen in a number of ways:\n\n");
msg("1) Use doxygen to generate a template configuration file:\n");
- msg(" %s [-s] -g [configName]\n\n",name);
+ msg(" %s [-s] -g [configName]\n\n",qPrint(name));
msg("2) Use doxygen to update an old configuration file:\n");
- msg(" %s [-s] -u [configName]\n\n",name);
+ msg(" %s [-s] -u [configName]\n\n",qPrint(name));
msg("3) Use doxygen to generate documentation using an existing ");
msg("configuration file:\n");
- msg(" %s [configName]\n\n",name);
+ msg(" %s [configName]\n\n",qPrint(name));
msg("4) Use doxygen to generate a template file controlling the layout of the\n");
msg(" generated documentation:\n");
- msg(" %s -l [layoutFileName]\n\n",name);
+ msg(" %s -l [layoutFileName]\n\n",qPrint(name));
msg(" In case layoutFileName is omitted layoutFileName.xml will be used as filename.\n");
msg(" If - is used for layoutFileName doxygen will write to standard output.\n\n");
msg("5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.\n");
- msg(" RTF: %s -w rtf styleSheetFile\n",name);
- msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",name);
- msg(" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",name);
+ msg(" RTF: %s -w rtf styleSheetFile\n",qPrint(name));
+ msg(" HTML: %s -w html headerFile footerFile styleSheetFile [configFile]\n",qPrint(name));
+ msg(" LaTeX: %s -w latex headerFile footerFile styleSheetFile [configFile]\n\n",qPrint(name));
msg("6) Use doxygen to generate a rtf extensions file\n");
- msg(" RTF: %s -e rtf extensionsFile\n\n",name);
+ msg(" RTF: %s -e rtf extensionsFile\n\n",qPrint(name));
msg(" If - is used for extensionsFile doxygen will write to standard output.\n\n");
msg("7) Use doxygen to compare the used configuration file with the template configuration file\n");
- msg(" %s -x [configFile]\n\n",name);
+ msg(" %s -x [configFile]\n\n",qPrint(name));
msg("8) Use doxygen to show a list of built-in emojis.\n");
- msg(" %s -f emoji outputFileName\n\n",name);
+ msg(" %s -f emoji outputFileName\n\n",qPrint(name));
msg(" If - is used for outputFileName doxygen will write to standard output.\n\n");
msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n");
msg("If configName is omitted 'Doxyfile' will be used as a default.\n");
@@ -10241,9 +10234,9 @@ static const char *getArg(int argc,char **argv,int &optind)
class NullOutlineParser : public OutlineParserInterface
{
public:
- void parseInput(const char *, const char *,const std::shared_ptr<Entry> &, ClangTUParser*) {}
+ void parseInput(const QCString &file, const char *buf,const std::shared_ptr<Entry> &, ClangTUParser*) {}
bool needsPreprocessing(const QCString &) const { return FALSE; }
- void parsePrototype(const char *) {}
+ void parsePrototype(const QCString &) {}
};
@@ -10255,8 +10248,8 @@ template<class T> std::function< std::unique_ptr<T>() > make_parser_factory()
void initDoxygen()
{
initResources();
- const char *lang = Portable::getenv("LC_ALL");
- if (lang) Portable::setenv("LANG",lang);
+ QCString lang = Portable::getenv("LC_ALL");
+ if (!lang.isEmpty()) Portable::setenv("LANG",lang);
std::setlocale(LC_ALL,"");
std::setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8
std::setlocale(LC_NUMERIC,"C");
@@ -10386,11 +10379,11 @@ void readConfiguration(int argc, char **argv)
**************************************************************************/
int optind=1;
- const char *configName=0;
- const char *layoutName=0;
- const char *debugLabel;
- const char *formatName;
- const char *listName;
+ QCString configName;
+ QCString layoutName;
+ QCString debugLabel;
+ QCString formatName;
+ QCString listName;
bool genConfig=FALSE;
bool shortList=FALSE;
bool diffList=FALSE;
@@ -10421,7 +10414,7 @@ void readConfiguration(int argc, char **argv)
break;
case 'd':
debugLabel=getArg(argc,argv,optind);
- if (!debugLabel)
+ if (debugLabel.isEmpty())
{
devUsage();
cleanUpDoxygen();
@@ -10430,7 +10423,7 @@ void readConfiguration(int argc, char **argv)
retVal = Debug::setFlag(debugLabel);
if (!retVal)
{
- err("option \"-d\" has unknown debug specifier: \"%s\".\n",debugLabel);
+ err("option \"-d\" has unknown debug specifier: \"%s\".\n",qPrint(debugLabel));
devUsage();
cleanUpDoxygen();
exit(1);
@@ -10447,13 +10440,13 @@ void readConfiguration(int argc, char **argv)
break;
case 'e':
formatName=getArg(argc,argv,optind);
- if (!formatName)
+ if (formatName.isEmpty())
{
err("option \"-e\" is missing format specifier rtf.\n");
cleanUpDoxygen();
exit(1);
}
- if (qstricmp(formatName,"rtf")==0)
+ if (qstricmp(formatName.data(),"rtf")==0)
{
if (optind+1>=argc)
{
@@ -10476,13 +10469,13 @@ void readConfiguration(int argc, char **argv)
break;
case 'f':
listName=getArg(argc,argv,optind);
- if (!listName)
+ if (listName.isEmpty())
{
err("option \"-f\" is missing list specifier.\n");
cleanUpDoxygen();
exit(1);
}
- if (qstricmp(listName,"emoji")==0)
+ if (qstricmp(listName.data(),"emoji")==0)
{
if (optind+1>=argc)
{
@@ -10505,13 +10498,13 @@ void readConfiguration(int argc, char **argv)
break;
case 'w':
formatName=getArg(argc,argv,optind);
- if (!formatName)
+ if (formatName.isEmpty())
{
err("option \"-w\" is missing format specifier rtf, html or latex\n");
cleanUpDoxygen();
exit(1);
}
- if (qstricmp(formatName,"rtf")==0)
+ if (qstricmp(formatName.data(),"rtf")==0)
{
if (optind+1>=argc)
{
@@ -10528,7 +10521,7 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen();
exit(1);
}
- else if (qstricmp(formatName,"html")==0)
+ else if (qstricmp(formatName.data(),"html")==0)
{
Config::init();
if (optind+4<argc || FileInfo("Doxyfile").exists())
@@ -10554,7 +10547,7 @@ void readConfiguration(int argc, char **argv)
QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))
{
- warn_uncond("Output language %s not supported! Using English instead.\n", outputLanguage.data());
+ warn_uncond("Output language %s not supported! Using English instead.\n", qPrint(outputLanguage));
}
std::ofstream f;
@@ -10578,7 +10571,7 @@ void readConfiguration(int argc, char **argv)
cleanUpDoxygen();
exit(0);
}
- else if (qstricmp(formatName,"latex")==0)
+ else if (qstricmp(formatName.data(),"latex")==0)
{
Config::init();
if (optind+4<argc || FileInfo("Doxyfile").exists())
@@ -10603,7 +10596,7 @@ void readConfiguration(int argc, char **argv)
QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
if (!setTranslator(outputLanguage))
{
- warn_uncond("Output language %s not supported! Using English instead.\n", outputLanguage.data());
+ warn_uncond("Output language %s not supported! Using English instead.\n", qPrint(outputLanguage));
}
std::ofstream f;
@@ -10629,7 +10622,7 @@ void readConfiguration(int argc, char **argv)
}
else
{
- err("Illegal format specifier \"%s\": should be one of rtf, html or latex\n",formatName);
+ err("Illegal format specifier \"%s\": should be one of rtf, html or latex\n",qPrint(formatName));
cleanUpDoxygen();
exit(1);
}
@@ -10755,7 +10748,7 @@ void readConfiguration(int argc, char **argv)
if (!Config::parse(configName,updateConfig))
{
- err("could not open or read configuration file %s!\n",configName);
+ err("could not open or read configuration file %s!\n",qPrint(configName));
cleanUpDoxygen();
exit(1);
}
@@ -10775,8 +10768,8 @@ void readConfiguration(int argc, char **argv)
}
/* Perlmod wants to know the path to the config file.*/
- FileInfo configFileInfo(configName);
- setPerlModDoxyfile(configFileInfo.absFilePath().data());
+ FileInfo configFileInfo(configName.str());
+ setPerlModDoxyfile(configFileInfo.absFilePath());
}
@@ -10805,7 +10798,7 @@ void adjustConfiguration()
if (!setTranslator(outputLanguage))
{
warn_uncond("Output language %s not supported! Using English instead.\n",
- outputLanguage.data());
+ qPrint(outputLanguage));
}
/* Set the global html file extension. */
@@ -10843,12 +10836,12 @@ void adjustConfiguration()
{
err("Failed to map file extension '%s' to unsupported language '%s'.\n"
"Check the EXTENSION_MAPPING setting in the config file.\n",
- ext.data(),language.data());
+ qPrint(ext),qPrint(language));
}
else
{
msg("Adding custom extension mapping: '%s' will be treated as language '%s'\n",
- ext.data(),language.data());
+ qPrint(ext),qPrint(language));
}
}
}
@@ -10893,7 +10886,7 @@ static void writeTagFile()
if (!f.is_open())
{
err("cannot open tag file %s for writing\n",
- generateTagFile.data()
+ qPrint(generateTagFile)
);
return;
}
@@ -10980,12 +10973,12 @@ static QCString createOutputDirectory(const QCString &baseDirName,
}
else if (formatDirName[0]!='/' && (formatDirName.length()==1 || formatDirName[1]!=':'))
{
- result.prepend(baseDirName+'/');
+ result.prepend(baseDirName+"/");
}
Dir formatDir(result.str());
if (!formatDir.exists() && !formatDir.mkdir(result.str()))
{
- err("Could not create output directory %s\n", result.data());
+ err("Could not create output directory %s\n", qPrint(result));
cleanUpDoxygen();
exit(1);
}
@@ -11199,7 +11192,7 @@ void parseInput()
// we would like to show the versionString earlier, but we first have to handle the configuration file
// to know the value of the QUIET setting.
QCString versionString = getFullVersion();
- msg("Doxygen version used: %s\n",versionString.data());
+ msg("Doxygen version used: %s\n",qPrint(versionString));
/**************************************************************************
* Make sure the output directory exists
@@ -11218,14 +11211,14 @@ void parseInput()
if (!dir.mkdir(outputDirectory.str()))
{
err("tag OUTPUT_DIRECTORY: Output directory '%s' does not "
- "exist and cannot be created\n",outputDirectory.data());
+ "exist and cannot be created\n",qPrint(outputDirectory));
cleanUpDoxygen();
exit(1);
}
else
{
msg("Notice: Output directory '%s' does not exist. "
- "I have created it for you.\n", outputDirectory.data());
+ "I have created it for you.\n", qPrint(outputDirectory));
}
dir.setPath(outputDirectory.str());
}
@@ -11325,11 +11318,11 @@ void parseInput()
newFontPath+=Portable::pathListSeparator();
newFontPath+=curFontPath;
}
- Portable::setenv("DOTFONTPATH",newFontPath);
+ Portable::setenv("DOTFONTPATH",qPrint(newFontPath));
}
else
{
- Portable::setenv("DOTFONTPATH",curFontPath);
+ Portable::setenv("DOTFONTPATH",qPrint(curFontPath));
}
}
@@ -11351,12 +11344,12 @@ void parseInput()
FileInfo fi(layoutFileName.str());
if (fi.exists())
{
- msg("Parsing layout file %s...\n",layoutFileName.data());
+ msg("Parsing layout file %s...\n",qPrint(layoutFileName));
LayoutDocManager::instance().parse(layoutFileName);
}
else if (!defaultLayoutUsed)
{
- warn_uncond("failed to open layout file '%s' for reading!\n",layoutFileName.data());
+ warn_uncond("failed to open layout file '%s' for reading!\n",qPrint(layoutFileName));
}
/**************************************************************************
@@ -11365,12 +11358,12 @@ void parseInput()
// prevent search in the output directories
StringVector exclPatterns = Config_getList(EXCLUDE_PATTERNS);
- if (generateHtml) exclPatterns.push_back(htmlOutput.data());
- if (generateDocbook) exclPatterns.push_back(docbookOutput.data());
- if (generateXml) exclPatterns.push_back(xmlOutput.data());
- if (generateLatex) exclPatterns.push_back(latexOutput.data());
- if (generateRtf) exclPatterns.push_back(rtfOutput.data());
- if (generateMan) exclPatterns.push_back(manOutput.data());
+ if (generateHtml) exclPatterns.push_back(htmlOutput.str());
+ if (generateDocbook) exclPatterns.push_back(docbookOutput.str());
+ if (generateXml) exclPatterns.push_back(xmlOutput.str());
+ if (generateLatex) exclPatterns.push_back(latexOutput.str());
+ if (generateRtf) exclPatterns.push_back(rtfOutput.str());
+ if (generateMan) exclPatterns.push_back(manOutput.str());
Config_updateList(EXCLUDE_PATTERNS,exclPatterns);
searchInputFiles();
@@ -11614,8 +11607,8 @@ void parseInput()
auto memberNameComp = [](const MemberNameLinkedMap::Ptr &n1,const MemberNameLinkedMap::Ptr &n2)
{
- return qstricmp(n1->memberName()+getPrefixIndex(n1->memberName()),
- n2->memberName()+getPrefixIndex(n2->memberName())
+ return qstricmp(n1->memberName().data()+getPrefixIndex(n1->memberName()),
+ n2->memberName().data()+getPrefixIndex(n2->memberName())
)<0;
};
@@ -11773,7 +11766,7 @@ void parseInput()
std::sort(Doxygen::groupLinkedMap->begin(),
Doxygen::groupLinkedMap->end(),
[](const auto &g1,const auto &g2)
- { return qstrcmp(g1->groupTitle(),g2->groupTitle())<0; });
+ { return g1->groupTitle() < g2->groupTitle(); });
for (const auto &gd : *Doxygen::groupLinkedMap)
{
@@ -11886,7 +11879,7 @@ void generateOutput()
if (!searchDir.exists() && !searchDir.mkdir(searchDirName.str()))
{
term("Could not create search results directory '%s' $PWD='%s'\n",
- searchDirName.data(),Dir::currentDirPath().c_str());
+ qPrint(searchDirName),Dir::currentDirPath().c_str());
}
HtmlGenerator::writeSearchData(searchDirName);
if (!serverBasedSearch) // client side search index
@@ -12022,7 +12015,7 @@ void generateOutput()
{
searchDataFile="searchdata.xml";
}
- if (!Portable::isAbsolutePath(searchDataFile))
+ if (!Portable::isAbsolutePath(searchDataFile.data()))
{
searchDataFile.prepend(Config_getString(OUTPUT_DIRECTORY)+"/");
}
@@ -12092,7 +12085,7 @@ void generateOutput()
Dir::setCurrent(Config_getString(HTML_OUTPUT).str());
Portable::setShortDir();
Portable::sysTimerStart();
- if (Portable::system(Config_getString(HHC_LOCATION), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1)
+ if (Portable::system(Config_getString(HHC_LOCATION).data(), "index.hhp", Debug::isFlagSet(Debug::ExtCmd))!=1)
{
err("failed to run html help compiler on index.hhp\n");
}
@@ -12111,11 +12104,11 @@ void generateOutput()
QCString qhpFileName = Qhp::getQhpFileName();
QCString qchFileName = getQchFileName();
- QCString args = QCString().sprintf("%s -o \"%s\"", qhpFileName.data(), qchFileName.data());
+ QCString args = QCString().sprintf("%s -o \"%s\"", qPrint(qhpFileName), qPrint(qchFileName));
std::string oldDir = Dir::currentDirPath();
Dir::setCurrent(Config_getString(HTML_OUTPUT).str());
Portable::sysTimerStart();
- if (Portable::system(Config_getString(QHG_LOCATION), args.data(), FALSE))
+ if (Portable::system(Config_getString(QHG_LOCATION).data(), args.data(), FALSE))
{
err("failed to run qhelpgenerator on index.qhp\n");
}
diff --git a/src/doxygen.h b/src/doxygen.h
index 787b69e..3cc6934 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -130,7 +130,7 @@ void generateOutput();
void readAliases();
void readFormulaRepository(QCString dir, bool cmp = FALSE);
void cleanUpDoxygen();
-void readFileOrDirectory(const char *s,
+void readFileOrDirectory(const QCString &s,
FileNameLinkedMap *fnDict,
StringUnorderedSet *exclSet,
const StringVector *patList,
diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp
index d9ef12f..b2f8193 100644
--- a/src/eclipsehelp.cpp
+++ b/src/eclipsehelp.cpp
@@ -71,7 +71,7 @@ void EclipseHelp::initialize()
m_tocstream.open(name.str(), std::ofstream::out | std::ofstream::binary);
if (!m_tocstream.is_open())
{
- term("Could not open file %s for writing\n", name.data());
+ term("Could not open file %s for writing\n", qPrint(name));
}
// -- write the opening tag
@@ -159,17 +159,17 @@ void EclipseHelp::decContentsDepth()
*/
void EclipseHelp::addContentsItem(
bool /* isDir */,
- const char *name,
- const char * /* ref */,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString & /* ref */,
+ const QCString &file,
+ const QCString &anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /*def*/)
{
// -- write the topic tag
closedTag();
- if (file)
+ if (!file.isEmpty())
{
switch (file[0]) // check for special markers (user defined URLs)
{
@@ -189,7 +189,7 @@ void EclipseHelp::addContentsItem(
m_tocstream << "<topic label=\"" << convertToXML(name) << "\"";
m_tocstream << " href=\"" << convertToXML(m_pathprefix)
<< file << Doxygen::htmlFileExtension;
- if (anchor)
+ if (!anchor.isEmpty())
{
m_tocstream << "#" << anchor;
}
@@ -209,20 +209,20 @@ void EclipseHelp::addContentsItem(
void EclipseHelp::addIndexItem(
const Definition * /* context */,
const MemberDef * /* md */,
- const char * /* sectionAnchor */,
- const char * /* title */)
+ const QCString & /* sectionAnchor */,
+ const QCString & /* title */)
{
}
-void EclipseHelp::addIndexFile(const char * /* name */)
+void EclipseHelp::addIndexFile(const QCString & /* name */)
{
}
-void EclipseHelp::addImageFile(const char * /* name */)
+void EclipseHelp::addImageFile(const QCString & /* name */)
{
}
-void EclipseHelp::addStyleSheetFile(const char * /* name */)
+void EclipseHelp::addStyleSheetFile(const QCString & /* name */)
{
}
diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h
index 1f4a8df..1ba4df4 100644
--- a/src/eclipsehelp.h
+++ b/src/eclipsehelp.h
@@ -48,14 +48,14 @@ class EclipseHelp : public IndexIntf
virtual void finalize();
virtual void incContentsDepth();
virtual void decContentsDepth();
- virtual void addContentsItem(bool isDir, const char *name, const char *ref,
- const char *file, const char *anchor,bool separateIndex,bool addToNavIndex,
+ virtual void addContentsItem(bool isDir, const QCString &name, const QCString &ref,
+ const QCString &file, const QCString &anchor,bool separateIndex,bool addToNavIndex,
const Definition *def);
virtual void addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *title);
- virtual void addIndexFile(const char *name);
- virtual void addImageFile(const char *name);
- virtual void addStyleSheetFile(const char *name);
+ const QCString &sectionAnchor,const QCString &title);
+ virtual void addIndexFile(const QCString &name);
+ virtual void addImageFile(const QCString &name);
+ virtual void addStyleSheetFile(const QCString &name);
private:
int m_depth;
diff --git a/src/entry.cpp b/src/entry.cpp
index a58362c..84d1844 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -124,7 +124,7 @@ Entry::~Entry()
{
//printf("Entry::~Entry(%p) num=%d\n",this,g_num);
//printf("Deleting entry %d name %s type %x children %d\n",
- // num,name.data(),section,sublist->count());
+ // num,qPrint(name),section,sublist->count());
g_num--;
}
diff --git a/src/entry.h b/src/entry.h
index 95b2274..831501c 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -35,7 +35,7 @@ class FileDef;
struct BaseInfo
{
/*! Creates an object representing an inheritance relation */
- BaseInfo(const char *n,Protection p,Specifier v) :
+ BaseInfo(const QCString &n,Protection p,Specifier v) :
name(n),prot(p),virt(v) {}
QCString name; //!< the name of the base class
Protection prot; //!< inheritance type
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 58d38c4..8686636 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -56,7 +56,7 @@ using IncludeInfoMap = std::unordered_map<std::string, const IncludeInfo *>;
class FileDefImpl : public DefinitionMixin<FileDef>
{
public:
- FileDefImpl(const char *p,const char *n,const char *ref=0,const char *dn=0);
+ FileDefImpl(const QCString &p,const QCString &n,const QCString &ref=QCString(),const QCString &dn=QCString());
virtual ~FileDefImpl();
virtual DefType definitionType() const { return TypeFile; }
@@ -124,8 +124,8 @@ class FileDefImpl : public DefinitionMixin<FileDef>
virtual void combineUsingRelations();
virtual bool generateSourceFile() const;
virtual void sortMemberLists();
- virtual void addIncludeDependency(const FileDef *fd,const char *incName,bool local,bool imported);
- virtual void addIncludedByDependency(const FileDef *fd,const char *incName,bool local,bool imported);
+ virtual void addIncludeDependency(const FileDef *fd,const QCString &incName,bool local,bool imported);
+ virtual void addIncludedByDependency(const FileDef *fd,const QCString &incName,bool local,bool imported);
virtual void addMembersToMemberGroup();
virtual void distributeMemberGroupDocumentation();
virtual void findSectionsInDocumentation();
@@ -186,9 +186,9 @@ class FileDefImpl : public DefinitionMixin<FileDef>
bool m_subGrouping;
};
-FileDef *createFileDef(const std::string &p,const std::string &n,const char *ref,const char *dn)
+FileDef *createFileDef(const QCString &p,const QCString &n,const QCString &ref,const QCString &dn)
{
- return new FileDefImpl(p.c_str(),n.c_str(),ref,dn);
+ return new FileDefImpl(p,n,ref,dn);
}
@@ -198,25 +198,24 @@ FileDef *createFileDef(const std::string &p,const std::string &n,const char *ref
class DevNullCodeDocInterface : public CodeOutputInterface
{
public:
- virtual void codify(const char *) {}
- virtual void writeCodeLink(const char *,const char *,
- const char *,const char *,
- const char *) {}
- virtual void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
- ) {}
- virtual void writeLineNumber(const char *,const char *,
- const char *,int) {}
- virtual void startCodeLine(bool) {}
- virtual void endCodeLine() {}
- virtual void startFontClass(const char *) {}
- virtual void endFontClass() {}
- virtual void writeCodeAnchor(const char *) {}
- virtual void linkableSymbol(int, const char *,Definition *,Definition *) {}
- virtual void setCurrentDoc(const Definition *,const char *,bool) {}
- virtual void addWord(const char *,bool) {}
- virtual void startCodeFragment(const char *) {}
- virtual void endCodeFragment(const char *) {}
+ virtual void codify(const QCString &) override {}
+ virtual void writeCodeLink(const QCString &,const QCString &,
+ const QCString &,const QCString &,
+ const QCString &) override {}
+ virtual void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
+ ) override {}
+ virtual void writeLineNumber(const QCString &,const QCString &,
+ const QCString &,int) override {}
+ virtual void startCodeLine(bool) override {}
+ virtual void endCodeLine() override {}
+ virtual void startFontClass(const QCString &) override {}
+ virtual void endFontClass() override {}
+ virtual void writeCodeAnchor(const QCString &) override {}
+ virtual void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ virtual void addWord(const QCString &,bool) override {}
+ virtual void startCodeFragment(const QCString &) override {}
+ virtual void endCodeFragment(const QCString &) override {}
};
//---------------------------------------------------------------------------
@@ -225,22 +224,22 @@ class DevNullCodeDocInterface : public CodeOutputInterface
\a nm the file name, and \a lref is an HTML anchor name if the
file was read from a tag file or 0 otherwise
*/
-FileDefImpl::FileDefImpl(const char *p,const char *nm,
- const char *lref,const char *dn)
+FileDefImpl::FileDefImpl(const QCString &p,const QCString &nm,
+ const QCString &lref,const QCString &dn)
: DefinitionMixin((QCString)p+nm,1,1,nm)
{
m_path=p;
m_filePath=m_path+nm;
m_fileName=nm;
setReference(lref);
- setDiskName(dn?dn:nm);
+ setDiskName(!dn.isEmpty() ? dn : nm);
m_package = 0;
m_isSource = guessSection(nm)==Entry::SOURCE_SEC;
m_docname = nm;
m_dir = 0;
if (Config_getBool(FULL_PATH_NAMES))
{
- m_docname.prepend(stripFromPath(m_path.copy()));
+ m_docname.prepend(stripFromPath(m_path));
}
setLanguage(getLanguageFromFileName(name()));
acquireFileVersion();
@@ -420,7 +419,7 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.popGeneratorState();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
ol.startGroupHeader();
ol.parseText(title);
@@ -430,7 +429,7 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
@@ -448,9 +447,9 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
- //printf("Writing source ref for file %s\n",name().data());
+ //printf("Writing source ref for file %s\n",qPrint(name()));
if (Config_getBool(SOURCE_BROWSER))
{
//if Latex enabled and LATEX_SOURCE_CODE isn't -> skip, bug_738548
@@ -474,8 +473,7 @@ void FileDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title)
if (fileMarkerPos!=-1) // should always pass this.
{
ol.parseText(refText.left(fileMarkerPos)); //text left from marker 1
- ol.writeObjectLink(0,getSourceFileBase(),
- 0,name());
+ ol.writeObjectLink(QCString(),getSourceFileBase(),QCString(),name());
ol.parseText(refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
@@ -497,7 +495,7 @@ void FileDefImpl::writeBriefDescription(OutputList &ol)
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
@@ -517,7 +515,7 @@ void FileDefImpl::writeBriefDescription(OutputList &ol)
)
{
ol.disableAllBut(OutputGenerator::Html);
- ol.startTextLink(0,"details");
+ ol.startTextLink(QCString(),"details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
}
@@ -584,7 +582,7 @@ void FileDefImpl::writeIncludeFiles(OutputList &ol)
{
ol.writeObjectLink(fd->getReference(),
fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(),
- 0,ii.includeName);
+ QCString(),ii.includeName);
}
else
{
@@ -609,12 +607,12 @@ void FileDefImpl::writeIncludeGraph(OutputList &ol)
{
if (Config_getBool(HAVE_DOT) /*&& Config_getBool(INCLUDE_GRAPH)*/)
{
- //printf("Graph for file %s\n",name().data());
+ //printf("Graph for file %s\n",qPrint(name()));
DotInclDepGraph incDepGraph(this,FALSE);
if (incDepGraph.isTooBig())
{
warn_uncond("Include graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
- name().data(), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
+ qPrint(name()), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!incDepGraph.isTrivial())
{
@@ -634,12 +632,12 @@ void FileDefImpl::writeIncludedByGraph(OutputList &ol)
{
if (Config_getBool(HAVE_DOT) /*&& Config_getBool(INCLUDED_BY_GRAPH)*/)
{
- //printf("Graph for file %s\n",name().data());
+ //printf("Graph for file %s\n",qPrint(name()));
DotInclDepGraph incDepGraph(this,TRUE);
if (incDepGraph.isTooBig())
{
warn_uncond("Included by graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
- name().data(), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
+ qPrint(name()), incDepGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
}
else if (!incDepGraph.isTrivial())
{
@@ -658,12 +656,12 @@ void FileDefImpl::writeIncludedByGraph(OutputList &ol)
void FileDefImpl::writeSourceLink(OutputList &ol)
{
- //printf("%s: generateSourceFile()=%d\n",name().data(),generateSourceFile());
+ //printf("%s: generateSourceFile()=%d\n",qPrint(name()),generateSourceFile());
if (generateSourceFile())
{
ol.disableAllBut(OutputGenerator::Html);
ol.startParagraph();
- ol.startTextLink(includeName(),0);
+ ol.startTextLink(includeName(),QCString());
ol.parseText(theTranslator->trGotoSourceCode());
ol.endTextLink();
ol.endParagraph();
@@ -768,42 +766,42 @@ void FileDefImpl::writeSummaryLinks(OutputList &ol) const
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "nested-classes";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileInterfaces && m_interfaces.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "interfaces";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileStructs && m_structs.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "structs";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileExceptions && m_exceptions.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "exceptions";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "namespaces";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::FileConcepts && m_concepts.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "concepts";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
@@ -812,7 +810,7 @@ void FileDefImpl::writeSummaryLinks(OutputList &ol) const
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE;
}
}
@@ -835,10 +833,10 @@ void FileDefImpl::writeDocumentation(OutputList &ol)
//QCString fn = name();
//if (Config_getBool(FULL_PATH_NAMES))
//{
- // fn.prepend(stripFromPath(getPath().copy()));
+ // fn.prepend(stripFromPath(getPath()));
//}
- //printf("WriteDocumentation diskname=%s\n",diskname.data());
+ //printf("WriteDocumentation diskname=%s\n",qPrint(diskname));
QCString versionTitle;
if (!m_fileVersion.isEmpty())
@@ -1129,7 +1127,7 @@ void FileDefImpl::writeSourceHeader(OutputList &ol)
bool genSourceFile = !isDocFile && generateSourceFile();
if (getDirDef())
{
- startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,
+ startFile(ol,getSourceFileBase(),QCString(),pageTitle,HLI_FileVisible,
!generateTreeView,
!isDocFile && genSourceFile ? QCString() : getOutputFileBase());
if (!generateTreeView)
@@ -1143,11 +1141,11 @@ void FileDefImpl::writeSourceHeader(OutputList &ol)
}
else
{
- startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,FALSE,
+ startFile(ol,getSourceFileBase(),QCString(),pageTitle,HLI_FileVisible,FALSE,
!isDocFile && genSourceFile ? QCString() : getOutputFileBase());
startTitle(ol,getSourceFileBase());
ol.parseText(title);
- endTitle(ol,getSourceFileBase(),0);
+ endTitle(ol,getSourceFileBase(),QCString());
}
ol.startContents();
@@ -1158,7 +1156,7 @@ void FileDefImpl::writeSourceHeader(OutputList &ol)
if (latexSourceCode) ol.disable(OutputGenerator::Latex);
if (rtfSourceCode) ol.disable(OutputGenerator::RTF);
if (docbookSourceCode) ol.disable(OutputGenerator::Docbook);
- ol.startTextLink(getOutputFileBase(),0);
+ ol.startTextLink(getOutputFileBase(),QCString());
ol.parseText(theTranslator->trGotoDocumentation());
ol.endTextLink();
ol.popGeneratorState();
@@ -1192,17 +1190,17 @@ void FileDefImpl::writeSourceBody(OutputList &ol,ClangTUParser *clangParser)
if (needs2PassParsing)
{
// parse code for cross-references only (see bug707641)
- intf->parseCode(devNullIntf,0,
+ intf->parseCode(devNullIntf,QCString(),
fileToString(absFilePath(),TRUE,TRUE),
getLanguage(),
- FALSE,0,this
+ FALSE,QCString(),this
);
}
- intf->parseCode(ol,0,
+ intf->parseCode(ol,QCString(),
fileToString(absFilePath(),filterSourceFiles,TRUE),
getLanguage(), // lang
FALSE, // isExampleBlock
- 0, // exampleName
+ QCString(), // exampleName
this, // fileDef
-1, // startLine
-1, // endLine
@@ -1240,10 +1238,10 @@ void FileDefImpl::parseSource(ClangTUParser *clangParser)
auto intf = Doxygen::parserManager->getCodeParser(getDefFileExtension());
intf->resetCodeParserState();
intf->parseCode(
- devNullIntf,0,
+ devNullIntf,QCString(),
fileToString(absFilePath(),filterSourceFiles,TRUE),
getLanguage(),
- FALSE,0,this
+ FALSE,QCString(),this
);
}
}
@@ -1263,7 +1261,7 @@ void FileDefImpl::addMembersToMemberGroup()
{
if (mg->allMembersInSameSection() && m_subGrouping)
{
- //printf("----> addToDeclarationSection(%s)\n",mg->header().data());
+ //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
mg->addToDeclarationSection();
}
}
@@ -1274,7 +1272,7 @@ void FileDefImpl::insertMember(MemberDef *md)
{
if (md->isHidden()) return;
//printf("%s:FileDefImpl::insertMember(%s (=%p) list has %d elements)\n",
- // name().data(),md->name().data(),md,allMemberList.count());
+ // qPrint(name()),qPrint(md->name()),md,allMemberList.count());
MemberList *allMemberList = getMemberList(MemberListType_allMembersList);
if (allMemberList && allMemberList->contains(md))
{
@@ -1324,9 +1322,9 @@ void FileDefImpl::insertMember(MemberDef *md)
default:
err("FileDefImpl::insertMembers(): "
"member '%s' with class scope '%s' inserted in file scope '%s'!\n",
- md->name().data(),
- md->getClassDef() ? md->getClassDef()->name().data() : "<global>",
- name().data());
+ qPrint(md->name()),
+ md->getClassDef() ? qPrint(md->getClassDef()->name()) : "<global>",
+ qPrint(name()));
}
//addMemberToGroup(md,groupId);
}
@@ -1386,21 +1384,21 @@ void FileDefImpl::addSourceRef(int line,const Definition *d,const MemberDef *md)
m_srcDefMap.insert(std::make_pair(line,d));
if (md) m_srcMemberMap.insert(std::make_pair(line,md));
//printf("Adding member %s with anchor %s at line %d to file %s\n",
- // md?md->name().data():"<none>",md?md->anchor().data():"<none>",line,name().data());
+ // md?qPrint(md->name()):"<none>",md?qPrint(md->anchor()):"<none>",line,qPrint(name()));
}
}
const Definition *FileDefImpl::getSourceDefinition(int lineNr) const
{
auto it = m_srcDefMap.find(lineNr);
- //printf("%s::getSourceDefinition(%d)=%s\n",name().data(),lineNr,it!=m_srcDefMap.end()?it->second->name().data():"none");
+ //printf("%s::getSourceDefinition(%d)=%s\n",qPrint(name()),lineNr,it!=m_srcDefMap.end()?qPrint(it->second->name()):"none");
return it!=m_srcDefMap.end() ? it->second : 0;
}
const MemberDef *FileDefImpl::getSourceMember(int lineNr) const
{
auto it = m_srcMemberMap.find(lineNr);
- //printf("%s::getSourceMember(%d)=%s\n",name().data(),lineNr,it!=m_srcMemberMap.end()?it->second->name().data():"none");
+ //printf("%s::getSourceMember(%d)=%s\n",qPrint(name()),lineNr,it!=m_srcMemberMap.end()?qPrint(it->second->name()):"none");
return it!=m_srcMemberMap.end() ? it->second : 0;
}
@@ -1408,12 +1406,12 @@ const MemberDef *FileDefImpl::getSourceMember(int lineNr) const
void FileDefImpl::addUsingDirective(const NamespaceDef *nd)
{
m_usingDirList.add(nd->qualifiedName(),nd);
- //printf("%p: FileDefImpl::addUsingDirective: %s:%d\n",this,name().data(),usingDirList->count());
+ //printf("%p: FileDefImpl::addUsingDirective: %s:%d\n",this,qPrint(name()),usingDirList->count());
}
LinkedRefMap<const NamespaceDef> FileDefImpl::getUsedNamespaces() const
{
- //printf("%p: FileDefImpl::getUsedNamespace: %s:%d\n",this,name().data(),usingDirList?usingDirList->count():0);
+ //printf("%p: FileDefImpl::getUsedNamespace: %s:%d\n",this,qPrint(name()),usingDirList?usingDirList->count():0);
return m_usingDirList;
}
@@ -1422,10 +1420,10 @@ void FileDefImpl::addUsingDeclaration(const ClassDef *cd)
m_usingDeclList.add(cd->qualifiedName(),cd);
}
-void FileDefImpl::addIncludeDependency(const FileDef *fd,const char *incName,bool local,bool imported)
+void FileDefImpl::addIncludeDependency(const FileDef *fd,const QCString &incName,bool local,bool imported)
{
//printf("FileDefImpl::addIncludeDependency(%p,%s,%d)\n",fd,incName,local);
- QCString iName = fd ? fd->absFilePath().data() : incName;
+ QCString iName = fd ? fd->absFilePath() : incName;
if (!iName.isEmpty() && m_includeMap.find(iName.str())==m_includeMap.end())
{
m_includeList.emplace_back(fd,incName,local,imported);
@@ -1437,7 +1435,7 @@ void FileDefImpl::addIncludedUsingDirectives(FileDefSet &visitedFiles)
{
if (visitedFiles.find(this)!=visitedFiles.end()) return; // file already processed
visitedFiles.insert(this);
- //printf("( FileDefImpl::addIncludedUsingDirectives for file %s\n",name().data());
+ //printf("( FileDefImpl::addIncludedUsingDirectives for file %s\n",qPrint(name()));
if (!m_includeList.empty()) // file contains #includes
{
@@ -1476,15 +1474,15 @@ void FileDefImpl::addIncludedUsingDirectives(FileDefSet &visitedFiles)
}
}
}
- //printf(") end FileDefImpl::addIncludedUsingDirectives for file %s\n",name().data());
+ //printf(") end FileDefImpl::addIncludedUsingDirectives for file %s\n",qPrint(name()));
}
-void FileDefImpl::addIncludedByDependency(const FileDef *fd,const char *incName,
+void FileDefImpl::addIncludedByDependency(const FileDef *fd,const QCString &incName,
bool local,bool imported)
{
//printf("FileDefImpl::addIncludedByDependency(%p,%s,%d)\n",fd,incName,local);
- QCString iName = fd ? fd->absFilePath().data() : incName;
+ QCString iName = fd ? fd->absFilePath() : incName;
if (!iName.isEmpty() && m_includedByMap.find(iName.str())==m_includedByMap.end())
{
m_includedByList.emplace_back(fd,incName,local,imported);
@@ -1518,7 +1516,7 @@ void FileDefImpl::addListReferences()
getOutputFileBase(),
theTranslator->trFile(TRUE,TRUE),
getOutputFileBase(),name(),
- 0,
+ QCString(),
0
);
}
@@ -1581,13 +1579,13 @@ void FileDefImpl::acquireFileVersion()
if (!vercmd.isEmpty() && !m_filePath.isEmpty() &&
m_filePath!="generated" && m_filePath!="graph_legend")
{
- msg("Version of %s : ",m_filePath.data());
+ msg("Version of %s : ",qPrint(m_filePath));
QCString cmd = vercmd+" \""+m_filePath+"\"";
Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd));
FILE *f=Portable::popen(cmd,"r");
if (!f)
{
- err("could not execute %s\n",vercmd.data());
+ err("could not execute %s\n",qPrint(vercmd));
return;
}
const int bufSize=1024;
@@ -1600,7 +1598,7 @@ void FileDefImpl::acquireFileVersion()
m_fileVersion=QCString(buf,numRead).stripWhiteSpace();
if (!m_fileVersion.isEmpty())
{
- msg("%s\n",m_fileVersion.data());
+ msg("%s\n",qPrint(m_fileVersion));
return;
}
}
@@ -1716,7 +1714,7 @@ void FileDefImpl::writeMemberDeclarations(OutputList &ol,MemberListType lt,const
}
else
{
- ml->writeDeclarations(ol,0,0,this,0,title,0);
+ ml->writeDeclarations(ol,0,0,this,0,title,QCString());
}
}
}
@@ -1741,7 +1739,7 @@ static void getAllIncludeFilesRecursively(
if (ii.fileDef && !ii.fileDef->isReference() &&
filesVisited.find(ii.fileDef->absFilePath().str())==filesVisited.end())
{
- //printf("FileDefImpl::addIncludeDependency(%s)\n",ii->fileDef->absFilePath().data());
+ //printf("FileDefImpl::addIncludeDependency(%s)\n",qPrint(ii->fileDef->absFilePath()));
incFiles.push_back(ii.fileDef->absFilePath().str());
filesVisited.insert(ii.fileDef->absFilePath().str());
getAllIncludeFilesRecursively(filesVisited,ii.fileDef,incFiles);
diff --git a/src/filedef.h b/src/filedef.h
index 02b484a..7019485 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -181,8 +181,8 @@ class FileDef : public DefinitionMutable, public Definition
virtual bool generateSourceFile() const = 0;
virtual void sortMemberLists() = 0;
- virtual void addIncludeDependency(const FileDef *fd,const char *incName,bool local,bool imported) = 0;
- virtual void addIncludedByDependency(const FileDef *fd,const char *incName,bool local,bool imported) = 0;
+ virtual void addIncludeDependency(const FileDef *fd,const QCString &incName,bool local,bool imported) = 0;
+ virtual void addIncludedByDependency(const FileDef *fd,const QCString &incName,bool local,bool imported) = 0;
virtual void addMembersToMemberGroup() = 0;
virtual void distributeMemberGroupDocumentation() = 0;
@@ -192,7 +192,7 @@ class FileDef : public DefinitionMutable, public Definition
virtual void addListReferences() = 0;
};
-FileDef *createFileDef(const std::string &p,const std::string &n,const char *ref=0,const char *dn=0);
+FileDef *createFileDef(const QCString &p,const QCString &n,const QCString &ref=QCString(),const QCString &dn=QCString());
// --- Cast functions
diff --git a/src/filename.h b/src/filename.h
index d236046..f2eb304 100644
--- a/src/filename.h
+++ b/src/filename.h
@@ -28,10 +28,10 @@ class FileDef;
class FileName : public std::vector< std::unique_ptr<FileDef> >
{
public:
- FileName(const char *nm,const char *fn) : m_name(nm), m_fName(fn), m_pathName("tmp") {}
- const char *fileName() const { return m_name; }
- const char *fullName() const { return m_fName; }
- const char *path() const { return m_pathName; }
+ FileName(const QCString &nm,const QCString &fn) : m_name(nm), m_fName(fn), m_pathName("tmp") {}
+ QCString fileName() const { return m_name; }
+ QCString fullName() const { return m_fName; }
+ QCString path() const { return m_pathName; }
private:
QCString m_name;
diff --git a/src/fileparser.cpp b/src/fileparser.cpp
index 34085dc..33491fc 100644
--- a/src/fileparser.cpp
+++ b/src/fileparser.cpp
@@ -17,19 +17,19 @@
#include "outputgen.h"
void FileCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *, // scopeName
+ const QCString &, // scopeName
const QCString & input,
- SrcLangExt, // lang
- bool, // isExampleBlock
- const char *, // exampleName
+ SrcLangExt, // lang
+ bool, // isExampleBlock
+ const QCString &, // exampleName
FileDef * fileDef,
int startLine,
int endLine,
- bool, // inlineFragment
- const MemberDef *, // memberDef
+ bool, // inlineFragment
+ const MemberDef *, // memberDef
bool showLineNumbers,
- const Definition *, // searchCtx,
- bool // collectXRefs
+ const Definition *, // searchCtx,
+ bool // collectXRefs
)
{
int lineNr = startLine!=-1 ? startLine : 1;
@@ -41,8 +41,11 @@ void FileCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
while (j<length && input[j]!='\n') j++;
QCString lineStr = input.mid(i,j-i);
codeOutIntf.startCodeLine(fileDef != 0 && showLineNumbers);
- if (fileDef != 0 && showLineNumbers) codeOutIntf.writeLineNumber(0,0,0,lineNr);
- if (!lineStr.isEmpty()) codeOutIntf.codify(lineStr);
+ if (fileDef != 0 && showLineNumbers)
+ {
+ codeOutIntf.writeLineNumber(QCString(),QCString(),QCString(),lineNr);
+ }
+ if (!lineStr.isEmpty()) codeOutIntf.codify(lineStr.data());
codeOutIntf.endCodeLine();
lineNr++;
i=j+1;
diff --git a/src/fileparser.h b/src/fileparser.h
index 3245878..c7c07aa 100644
--- a/src/fileparser.h
+++ b/src/fileparser.h
@@ -3,8 +3,8 @@
* 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.
*
@@ -24,11 +24,11 @@ class FileCodeParser : public CodeParserInterface
public:
virtual ~FileCodeParser() {}
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/formula.cpp b/src/formula.cpp
index 6ca93cb..2e5aef9 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -68,9 +68,9 @@ FormulaManager &FormulaManager::instance()
return fm;
}
-void FormulaManager::readFormulas(const char *dir,bool doCompare)
+void FormulaManager::readFormulas(const QCString &dir,bool doCompare)
{
- std::ifstream f(std::string(dir)+"/formula.repository",std::ifstream::in);
+ std::ifstream f(dir.str()+"/formula.repository",std::ifstream::in);
if (f.is_open())
{
uint formulaCount=0;
@@ -85,7 +85,7 @@ void FormulaManager::readFormulas(const char *dir,bool doCompare)
size_t se=line.find(':'); // find name and text separator.
if (ei==std::string::npos || hi==std::string::npos || se==std::string::npos || hi>se || ei<hi || ei>se)
{
- warn_uncond("%s/formula.repository is corrupted at line %d!\n",dir,lineNr);
+ warn_uncond("%s/formula.repository is corrupted at line %d!\n",qPrint(dir),lineNr);
break;
}
else
@@ -127,13 +127,13 @@ void FormulaManager::readFormulas(const char *dir,bool doCompare)
}
}
-void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) const
+void FormulaManager::generateImages(const QCString &path,Format format,HighDPI hd) const
{
- Dir d(path);
+ Dir d(path.str());
// store the original directory
if (!d.exists())
{
- term("Output directory '%s' does not exist!\n",path);
+ term("Output directory '%s' does not exist!\n",qPrint(path));
}
std::string oldDir = Dir::currentDirPath();
QCString macroFile = Config_getString(FORMULA_MACROFILE);
@@ -214,7 +214,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
// run dvips to convert the page with number pageIndex to an
// postscript file.
sprintf(args,"-q -D 600 -n 1 -p %d -o %s_tmp.ps _formulas.dvi",
- pageIndex,formBase.data());
+ pageIndex,qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system("dvips",args)!=0)
{
@@ -227,7 +227,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
// extract the bounding box for the postscript file
sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=bbox %s_tmp.ps 2>%s_tmp.epsi",
- formBase.data(),formBase.data());
+ qPrint(formBase),qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
@@ -251,7 +251,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
}
else
{
- err("Couldn't extract bounding box from %s_tmp.epsi",formBase.data());
+ err("Couldn't extract bounding box from %s_tmp.epsi",qPrint(formBase));
}
}
//printf("Bounding box [%d %d %d %d]\n",x1,y1,x2,y2);
@@ -271,7 +271,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
// crop the image to its bounding box
sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=pdfwrite"
" -o %s_tmp.pdf -c \"[/CropBox [%d %d %d %d] /PAGES pdfmark\" -f %s_tmp.ps",
- formBase.data(),x1,y1,x2,y2,formBase.data());
+ qPrint(formBase),x1,y1,x2,y2,qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
@@ -285,7 +285,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
// if we have pdf2svg available use it to create a SVG image
if (Portable::checkForExecutable("pdf2svg"))
{
- sprintf(args,"%s_tmp.pdf form_%d.svg",formBase.data(),pageNum);
+ sprintf(args,"%s_tmp.pdf form_%d.svg",qPrint(formBase),pageNum);
Portable::sysTimerStart();
if (Portable::system("pdf2svg",args)!=0)
{
@@ -307,11 +307,11 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
}
else if (inkscapeVersion == 0)
{
- sprintf(args,"-l form_%d.svg -z %s_tmp.pdf 2>%s",pageNum,formBase.data(),Portable::devNull());
+ sprintf(args,"-l form_%d.svg -z %s_tmp.pdf 2>%s",pageNum,qPrint(formBase),Portable::devNull());
}
else // inkscapeVersion >= 1
{
- sprintf(args,"--export-type=svg --export-filename=form_%d.svg %s_tmp.pdf 2>%s",pageNum,formBase.data(),Portable::devNull());
+ sprintf(args,"--export-type=svg --export-filename=form_%d.svg %s_tmp.pdf 2>%s",pageNum,qPrint(formBase),Portable::devNull());
}
Portable::sysTimerStart();
if (Portable::system("inkscape",args)!=0)
@@ -338,7 +338,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
{
// crop the image to its bounding box
sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=eps2write"
- " -o %s_tmp.eps -f %s_tmp.ps",formBase.data(),formBase.data());
+ " -o %s_tmp.eps -f %s_tmp.ps",qPrint(formBase),qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
@@ -375,7 +375,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
else
{
err("Problems correcting the eps files from %s_tmp.eps to %s_tmp_corr.eps\n",
- formBase.data(),formBase.data());
+ qPrint(formBase),qPrint(formBase));
Dir::setCurrent(oldDir);
return;
}
@@ -388,7 +388,7 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
Portable::sysTimerStop();
sprintf(args,"-q -dNOSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=pnggray -dGraphicsAlphaBits=4 -dTextAlphaBits=4 "
- "-r%d -sOutputFile=form_%d.png %s_tmp_corr.eps",(int)(scaleFactor*72),pageNum,formBase.data());
+ "-r%d -sOutputFile=form_%d.png %s_tmp_corr.eps",(int)(scaleFactor*72),pageNum,qPrint(formBase));
Portable::sysTimerStart();
if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
diff --git a/src/formula.h b/src/formula.h
index 39fabdd..9baeb24 100644
--- a/src/formula.h
+++ b/src/formula.h
@@ -36,10 +36,10 @@ class FormulaManager
enum class Format { Bitmap, Vector };
enum class HighDPI { On, Off };
static FormulaManager &instance();
- void readFormulas(const char *dir,bool doCompare=false);
+ void readFormulas(const QCString &dir,bool doCompare=false);
void clear();
int addFormula(const std::string &formulaText);
- void generateImages(const char *outputDir,Format format,HighDPI hd = HighDPI::Off) const;
+ void generateImages(const QCString &outputDir,Format format,HighDPI hd = HighDPI::Off) const;
std::string findFormula(int formulaId) const;
bool hasFormulas() const;
DisplaySize displaySize(int formulaId) const;
diff --git a/src/fortrancode.h b/src/fortrancode.h
index b8cac31..7601a39 100644
--- a/src/fortrancode.h
+++ b/src/fortrancode.h
@@ -32,11 +32,11 @@ class FortranCodeParser : public CodeParserInterface
FortranCodeParser(FortranFormat format=FortranFormat_Unknown);
virtual ~FortranCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/fortrancode.l b/src/fortrancode.l
index fbc1a64..67890e4 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -124,12 +124,12 @@ class Scope
struct fortrancodeYY_state
{
QCString docBlock; //!< contents of all lines of a documentation block
- QCString currentModule=0; //!< name of the current enclosing module
- UseMap useMembers; //!< info about used modules
+ QCString currentModule=QCString(); //!< name of the current enclosing module
+ UseMap useMembers; //!< info about used modules
UseEntry useEntry; //!< current use statement info
std::vector<Scope> scopeStack;
bool isExternal = false;
- QCString str=""; //!> contents of fortran string
+ QCString str=QCString(); //!< contents of fortran string
CodeOutputInterface * code = 0;
@@ -181,21 +181,22 @@ static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName
static void endFontClass(yyscan_t yyscanner);
static void startFontClass(yyscan_t yyscanner,const char *s);
static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor);
-static void addToSearchIndex(yyscan_t yyscanner,const char *text);
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text);
static void startCodeLine(yyscan_t yyscanner);
static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
-static void codifyLines(yyscan_t yyscanner,const char *text);
+static void codifyLines(yyscan_t yyscanner,const QCString &text);
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
- Definition *d,const char *text);
+ Definition *d,const QCString &text);
static bool getGenericProcedureLink(yyscan_t yyscanner,const ClassDef *cd,
- const char *memberText,
+ const QCString &memberText,
CodeOutputInterface &ol);
static bool getLink(yyscan_t yyscanner,const UseMap &useMap, // map with used modules
- const char *memberText, // exact member text
+ const QCString &memberText, // exact member text
CodeOutputInterface &ol,
- const char *text);
-static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, char *lname);
+ const QCString &text);
+static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, const QCString &lname);
+static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, const char *lname);
static int countLines(yyscan_t yyscanner);
static void startScope(yyscan_t yyscanner);
static void endScope(yyscan_t yyscanner);
@@ -342,7 +343,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
BEGIN(UseOnly);
}
<Use>{ID} {
- QCString tmp = yytext;
+ QCString tmp(yytext);
tmp = tmp.lower();
yyextra->insideBody=TRUE;
generateLink(yyscanner,*yyextra->code, yytext);
@@ -359,7 +360,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yyextra->contLineNr++;
YY_FTN_RESET}
<UseOnly>{ID} {
- QCString tmp = yytext;
+ QCString tmp(yytext);
tmp = tmp.lower();
yyextra->useEntry.onlyNames.push_back(tmp);
yyextra->insideBody=TRUE;
@@ -430,10 +431,10 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yy_pop_state(yyscanner);
}
<ClassName>({ACCESS_SPEC}|ABSTRACT|EXTENDS)/[,:( ] { //| variable declaration
- startFontClass(yyscanner,"keyword");
- yyextra->code->codify(yytext);
- endFontClass(yyscanner);
- }
+ startFontClass(yyscanner,"keyword");
+ yyextra->code->codify(QCString(yytext));
+ endFontClass(yyscanner);
+ }
<ClassName>\n { // interface may be without name
yy_pop_state(yyscanner);
YY_FTN_REJECT;
@@ -504,18 +505,18 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yy_push_state(YY_START,yyscanner);
BEGIN(Declaration);
startFontClass(yyscanner,"keywordtype");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
<Start>{TYPE_SPEC}/[,:( ] {
- QCString typ = yytext;
+ QCString typ(yytext);
typ = removeRedundantWhiteSpace(typ.lower());
if (typ.startsWith("real")) YY_FTN_REJECT;
if (typ == "type" || typ == "class" || typ == "procedure") yyextra->inTypeDecl = 1;
yy_push_state(YY_START,yyscanner);
BEGIN(Declaration);
startFontClass(yyscanner,"keywordtype");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
<Start>{ATTR_SPEC} {
@@ -526,20 +527,20 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yyextra->isExternal = true;
}
startFontClass(yyscanner,"keywordtype");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
<Declaration>({TYPE_SPEC}|{ATTR_SPEC})/[,:( ] { //| variable declaration
if (QCString(yytext) == "external") yyextra->isExternal = true;
startFontClass(yyscanner,"keywordtype");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
<Declaration>{ID} { // local var
if (yyextra->isFixedForm && yy_my_start == 1)
{
startFontClass(yyscanner,"comment");
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
endFontClass(yyscanner);
}
else if (yyextra->currentMemberDef &&
@@ -552,13 +553,13 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
else
{
- yyextra->code->codify(yytext);
- addLocalVar(yyscanner,yytext);
+ yyextra->code->codify(QCString(yytext));
+ addLocalVar(yyscanner,QCString(yytext));
}
}
<Declaration>{BS}("=>"|"="){BS} { // Procedure binding
BEGIN(DeclarationBinding);
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<DeclarationBinding>{ID} { // Type bound procedure link
generateLink(yyscanner,*yyextra->code, yytext);
@@ -566,17 +567,17 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
<Declaration>[(] { // start of array or type / class specification
yyextra->bracketCount++;
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<Declaration>[)] { // end array specification
yyextra->bracketCount--;
if (!yyextra->bracketCount) yyextra->inTypeDecl = 0;
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<Declaration,DeclarationBinding>"&" { // continuation line
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
if (!yyextra->isFixedForm)
{
yy_push_state(YY_START,yyscanner);
@@ -637,12 +638,12 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
startFontClass(yyscanner,"keywordtype");
yyextra->code->codify(QCString(yytext).stripWhiteSpace());
endFontClass(yyscanner);
- yyextra->code->codify(yytext + 4);
+ yyextra->code->codify(QCString(yytext + 4));
}
else
{
yyextra->insideBody=TRUE;
- generateLink(yyscanner,*yyextra->code, yytext);
+ generateLink(yyscanner,*yyextra->code,yytext);
yyextra->insideBody=FALSE;
}
}
@@ -740,7 +741,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
/*------ variable references? -------------------------------------*/
<Start>"%"{BS}{ID} { // ignore references to elements
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<Start>{ID} {
yyextra->insideBody=TRUE;
@@ -791,7 +792,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
yyextra->contLineNr++;
YY_FTN_RESET
}
-<*>^{BS}"type"{BS}"=" { yyextra->code->codify(yytext); }
+<*>^{BS}"type"{BS}"=" { yyextra->code->codify(QCString(yytext)); }
<*>[\x80-\xFF]* { // keep utf8 characters together...
if (yyextra->isFixedForm && yy_my_start > fixedCommentAfter)
@@ -801,7 +802,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
else
{
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
}
<*>. {
@@ -815,11 +816,11 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
}
else
{
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
}
<*>{LOG_OPER} { // Fortran logical comparison keywords
- yyextra->code->codify(yytext);
+ yyextra->code->codify(QCString(yytext));
}
<*><<EOF>> {
if (YY_START == DocBlock) {
@@ -870,7 +871,7 @@ static void startFontClass(yyscan_t yyscanner,const char *s)
if (!yyextra->currentFontClass || !s || strcmp(yyextra->currentFontClass,s))
{
endFontClass(yyscanner);
- yyextra->code->startFontClass(s);
+ yyextra->code->startFontClass(QCString(s));
yyextra->currentFontClass=s;
}
}
@@ -891,7 +892,7 @@ static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor)
}
}
-static void addToSearchIndex(yyscan_t yyscanner,const char *text)
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
@@ -914,7 +915,7 @@ static void startCodeLine(yyscan_t yyscanner)
//lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
- //printf("startCodeLine %d d=%s\n", yyextra->yyLineNr,d ? d->name().data() : "<null>");
+ //printf("startCodeLine %d d=%s\n", yyextra->yyLineNr,d ? qPrint(d->name()) : "<null>");
if (!yyextra->includeCodeFragment && d)
{
yyextra->currentDefinition = d;
@@ -934,19 +935,19 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
yyextra->code->startCodeLine(yyextra->sourceFileDef);
if (yyextra->currentFontClass)
{
- yyextra->code->startFontClass(yyextra->currentFontClass);
+ yyextra->code->startFontClass(QCString(yyextra->currentFontClass));
}
}
@@ -973,11 +974,12 @@ static void nextCodeLine(yyscan_t yyscanner)
/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
-static void codifyLines(yyscan_t yyscanner,const char *text)
+static void codifyLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
- const char *p=text,*sp=p;
+ if (text.isEmpty()) return;
+ const char *p=text.data(),*sp=p;
char c;
bool done=FALSE;
while (!done)
@@ -991,13 +993,13 @@ static void codifyLines(yyscan_t yyscanner,const char *text)
char *tmp = (char*)malloc(l+1);
memcpy(tmp,sp,l);
tmp[l]='\0';
- yyextra->code->codify(tmp);
+ yyextra->code->codify(QCString(tmp));
free(tmp);
nextCodeLine(yyscanner);
}
else
{
- yyextra->code->codify(sp);
+ yyextra->code->codify(QCString(sp));
done=TRUE;
}
}
@@ -1008,7 +1010,7 @@ static void codifyLines(yyscan_t yyscanner,const char *text)
* split into multiple links with the same destination, one for each line.
*/
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
- Definition *d,const char *text)
+ Definition *d,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
@@ -1022,7 +1024,7 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
tooltip = d->briefDescriptionAsTooltip();
}
bool done=FALSE;
- char *p=(char *)text;
+ char *p=text.rawData();
while (!done)
{
char *sp=p;
@@ -1033,13 +1035,13 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
yyextra->yyLineNr++;
*(p-1)='\0';
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ ol.writeCodeLink(ref,file,anchor,QCString(sp),tooltip);
nextCodeLine(yyscanner);
}
else
{
//printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp);
- ol.writeCodeLink(ref,file,anchor,sp,tooltip);
+ ol.writeCodeLink(ref,file,anchor,QCString(sp),tooltip);
done=TRUE;
}
}
@@ -1083,7 +1085,7 @@ static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName
//cout << "=== type found in global module" << endl;
return TRUE;
}
- else if (moduleName && (cd= Doxygen::classLinkedMap->find(moduleName+"::"+tname)))
+ else if (!moduleName.isEmpty() && (cd= Doxygen::classLinkedMap->find(moduleName+"::"+tname)))
{
//cout << "=== type found in local module" << endl;
return TRUE;
@@ -1200,7 +1202,7 @@ static MemberDef *getFortranDefs(yyscan_t yyscanner,const QCString &memberName,
@todo implementation
*/
static bool getGenericProcedureLink(yyscan_t yyscanner,const ClassDef *cd,
- const char *memberText,
+ const QCString &memberText,
CodeOutputInterface &ol)
{
(void)cd;
@@ -1210,9 +1212,9 @@ static bool getGenericProcedureLink(yyscan_t yyscanner,const ClassDef *cd,
}
static bool getLink(yyscan_t yyscanner,const UseMap &useMap, // dictionary with used modules
- const char *memberText, // exact member text
+ const QCString &memberText, // exact member text
CodeOutputInterface &ol,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
MemberDef *md=0;
@@ -1234,8 +1236,8 @@ static bool getLink(yyscan_t yyscanner,const UseMap &useMap, // dictionary with
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(md));
}
- writeMultiLineCodeLink(yyscanner,ol,md,text ? text : memberText);
- addToSearchIndex(yyscanner, text ? text : memberText);
+ writeMultiLineCodeLink(yyscanner,ol,md,!text.isEmpty() ? text : memberText);
+ addToSearchIndex(yyscanner, !text.isEmpty() ? text : memberText);
return TRUE;
}
}
@@ -1243,36 +1245,36 @@ static bool getLink(yyscan_t yyscanner,const UseMap &useMap, // dictionary with
}
-static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, char *lname)
+static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, const QCString &lname)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
ClassDef *cd=0;
NamespaceDef *nsd=0;
- QCString tmp = lname;
- tmp = removeRedundantWhiteSpace(tmp.lower());
+ QCString name = lname;
+ name = removeRedundantWhiteSpace(name.lower());
// check if lowercase lname is a linkable type or interface
- if ( (getFortranTypeDefs(tmp, yyextra->currentModule, cd, yyextra->useMembers)) && cd->isLinkable() )
+ if ( (getFortranTypeDefs(name, yyextra->currentModule, cd, yyextra->useMembers)) && cd->isLinkable() )
{
if ( (cd->compoundType() == ClassDef::Class) && // was Entry::INTERFACE_SEC) &&
- (getGenericProcedureLink(yyscanner, cd, tmp, ol)) )
+ (getGenericProcedureLink(yyscanner, cd, name, ol)) )
{
//cout << "=== generic procedure resolved" << endl;
}
else
{ // write type or interface link
- writeMultiLineCodeLink(yyscanner, ol,cd,tmp);
- addToSearchIndex(yyscanner, tmp);
+ writeMultiLineCodeLink(yyscanner, ol,cd,name);
+ addToSearchIndex(yyscanner, name);
}
}
// check for module
- else if ( (getFortranNamespaceDefs(tmp, nsd)) && nsd->isLinkable() )
+ else if ( (getFortranNamespaceDefs(name, nsd)) && nsd->isLinkable() )
{ // write module link
- writeMultiLineCodeLink(yyscanner,ol,nsd,tmp);
- addToSearchIndex(yyscanner,tmp);
+ writeMultiLineCodeLink(yyscanner,ol,nsd,name);
+ addToSearchIndex(yyscanner,name);
}
// check for function/variable
- else if (getLink(yyscanner,yyextra->useMembers, tmp, ol, tmp))
+ else if (getLink(yyscanner,yyextra->useMembers, name, ol, name))
{
//cout << "=== found link for lowercase " << lname << endl;
}
@@ -1280,12 +1282,17 @@ static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, char *lname
{
// nothing found, just write out the word
//startFontClass("charliteral"); //test
- codifyLines(yyscanner,tmp);
+ codifyLines(yyscanner,name);
//endFontClass(yyscanner); //test
- addToSearchIndex(yyscanner,tmp);
+ addToSearchIndex(yyscanner,name);
}
}
+static void generateLink(yyscan_t yyscanner,CodeOutputInterface &ol, const char *lname)
+{
+ generateLink(yyscanner,ol,QCString(lname));
+}
+
/*! counts the number of lines in the input */
static int countLines(yyscan_t yyscanner)
{
@@ -1423,11 +1430,11 @@ void FortranCodeParser::resetCodeParserState()
}
void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
- const char * scopeName,
+ const QCString & scopeName,
const QCString & input,
SrcLangExt /*lang*/,
bool isExampleBlock,
- const char * exampleName,
+ const QCString & exampleName,
FileDef * fileDef,
int startLine,
int endLine,
@@ -1449,9 +1456,9 @@ void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
// const MemberDef *,bool,const Definition *searchCtx,
// bool collectXRefs, FortranFormat format)
if (input.isEmpty()) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->isFixedForm = recognizeFixedForm(input,p->format);
yyextra->contLineNr = 1;
@@ -1480,11 +1487,11 @@ void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
if (isExampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",exampleName);
+ yyextra->sourceFileDef = createFileDef(QCString(),exampleName);
}
if (yyextra->sourceFileDef)
{
- setCurrentDoc(yyscanner,"l00001");
+ setCurrentDoc(yyscanner,QCString("l00001"));
}
yyextra->currentDefinition = 0;
yyextra->currentMemberDef = 0;
@@ -1514,7 +1521,7 @@ void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
// write the tooltips
TooltipManager::instance().writeTooltips(codeOutIntf);
- printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
//---------------------------------------------------------
diff --git a/src/fortranscanner.h b/src/fortranscanner.h
index 0fbba89..bf286c3 100644
--- a/src/fortranscanner.h
+++ b/src/fortranscanner.h
@@ -29,12 +29,12 @@ class FortranOutlineParser : public OutlineParserInterface
public:
FortranOutlineParser(FortranFormat format=FortranFormat_Unknown);
~FortranOutlineParser();
- void parseInput(const char *fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &extension) const;
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
private:
struct Private;
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index bfab8c2..f36b6ae 100755
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -206,8 +206,8 @@ struct fortranscannerYY_state
//-----------------------------------------------------------------------------
static int getAmpersandAtTheStart(const char *buf, int length);
static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch);
-static QCString extractFromParens(const QCString name);
-static QCString extractBind(const QCString name);
+static QCString extractFromParens(const QCString &name);
+static QCString extractBind(const QCString &name);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -216,8 +216,8 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief);
static void subrHandleCommentBlockResult(yyscan_t yyscanner,const QCString &doc,bool brief);
static void addCurrentEntry(yyscan_t yyscanner,bool case_insens);
-static void addModule(yyscan_t yyscanner,const char *name, bool isModule=FALSE);
-static void addSubprogram(yyscan_t yyscanner,const char *text);
+static void addModule(yyscan_t yyscanner,const QCString &name=QCString(), bool isModule=FALSE);
+static void addSubprogram(yyscan_t yyscanner,const QCString &text);
static void addInterface(yyscan_t yyscanner,QCString name, InterfaceType type);
static Argument *getParameter(yyscan_t yyscanner,const QCString &name);
static void scanner_abort(yyscan_t yyscanner);
@@ -226,7 +226,7 @@ static void startScope(yyscan_t yyscanner,Entry *scope);
static bool endScope(yyscan_t yyscanner,Entry *scope, bool isGlobalRoot=FALSE);
static void resolveModuleProcedures(yyscan_t yyscanner,Entry *current_root);
static void truncatePrepass(yyscan_t yyscanner,int index);
-static void pushBuffer(yyscan_t yyscanner,QCString &buffer);
+static void pushBuffer(yyscan_t yyscanner,const QCString &buffer);
static void popBuffer(yyscan_t yyscanner);
static const CommentInPrepass* locatePrepassComment(yyscan_t yyscanner,int from, int to);
static void updateVariablePrepassComment(yyscan_t yyscanner,int from, int to);
@@ -445,7 +445,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
}
}
<StrIgnore>.?/\n { yy_pop_state(yyscanner); // comment ends with endline character
- DBG_CTX((stderr,"end comment %d %s\n",yyextra->lineNr,yyextra->debugStr.data()));
+ DBG_CTX((stderr,"end comment %d %s\n",yyextra->lineNr,qPrint(yyextra->debugStr)));
} // comment line ends
<StrIgnore>. { yyextra->debugStr+=yytext; }
@@ -455,7 +455,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
<Start,ModuleBody,SubprogBody>"use"{BS_} {
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
yy_push_state(Use,yyscanner);
@@ -555,7 +555,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
<Start>^{BS}{CONTAINS}/({BS}|\n|!|;) {
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBodyContains,yyscanner); //anon program
}
}
@@ -612,11 +612,11 @@ SCOPENAME ({ID}{BS}"::"{BS})*
}
}
<Module>{ID} {
- addModule(yyscanner,yytext, TRUE);
+ addModule(yyscanner, QCString(yytext), TRUE);
BEGIN(ModuleBody);
}
<Program>{ID} {
- addModule(yyscanner,yytext, FALSE);
+ addModule(yyscanner, QCString(yytext), FALSE);
BEGIN(ModuleBody);
}
@@ -634,7 +634,7 @@ SCOPENAME ({ID}{BS}"::"{BS})*
<Start,ModuleBody>^{BS}type/[^a-z0-9_] {
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner,QCString());
yy_push_state(ModuleBody,yyscanner); //anon program
}
@@ -793,7 +793,7 @@ private {
/* variable declaration starts */
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
yy_push_state(AttributeList,yyscanner);
@@ -802,7 +802,7 @@ private {
/* external can be a "type" or an attribute */
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
QCString tmp = yytext;
@@ -990,7 +990,7 @@ private {
<Variable>";".*"\n" { yyextra->currentModifiers = SymbolModifiers();
yy_pop_state(yyscanner); // end variable declaration list
yyextra->docBlock.resize(0);
- yyextra->inputStringSemi =(const char*)(QCString(" \n") + QCString(yytext+1)).data();
+ yyextra->inputStringSemi = " \n"+QCString(yytext+1);
yyextra->lineNr--;
pushBuffer(yyscanner,yyextra->inputStringSemi);
}
@@ -998,7 +998,7 @@ private {
if (YY_START == Variable) REJECT; // Just be on the safe side
if (YY_START == String) REJECT; // ";" ignored in strings
if (YY_START == StrIgnore) REJECT; // ";" ignored in regular yyextra->comments
- yyextra->inputStringSemi =(const char*)(QCString(" \n") + QCString(yytext+1)).data();
+ yyextra->inputStringSemi = " \n"+QCString(yytext+1);
yyextra->lineNr--;
pushBuffer(yyscanner,yyextra->inputStringSemi);
}
@@ -1060,7 +1060,7 @@ private {
<*>{BS}"enum"{BS}","{BS}"bind"{BS}"("{BS}"c"{BS}")"{BS} {
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
@@ -1753,7 +1753,7 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
return newContents;
}
-static void pushBuffer(yyscan_t yyscanner,QCString& buffer)
+static void pushBuffer(yyscan_t yyscanner,const QCString &buffer)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->includeStackCnt <= yyextra->includeStackPtr)
@@ -1762,10 +1762,9 @@ static void pushBuffer(yyscan_t yyscanner,QCString& buffer)
yyextra->includeStack = (YY_BUFFER_STATE *)realloc(yyextra->includeStack, yyextra->includeStackCnt * sizeof(YY_BUFFER_STATE));
}
yyextra->includeStack[yyextra->includeStackPtr++] = YY_CURRENT_BUFFER;
- yy_switch_to_buffer(yy_scan_string(buffer,yyscanner),yyscanner);
+ yy_switch_to_buffer(yy_scan_string(buffer.data(),yyscanner),yyscanner);
- DBG_CTX((stderr, "--PUSH--%s", (const char *)buffer));
- buffer = NULL;
+ DBG_CTX((stderr, "--PUSH--%s", qPrint(buffer)));
}
static void popBuffer(yyscan_t yyscanner)
@@ -1814,7 +1813,7 @@ void resolveModuleProcedures(yyscan_t yyscanner,Entry *current_root)
}
/*! Extracts string which resides within parentheses of provided string. */
-static QCString extractFromParens(const QCString name)
+static QCString extractFromParens(const QCString &name)
{
QCString extracted = name;
int start = extracted.find("(");
@@ -1834,7 +1833,7 @@ static QCString extractFromParens(const QCString name)
}
/*! remove useless spaces from bind statement */
-static QCString extractBind(const QCString name)
+static QCString extractBind(const QCString &name)
{
QCString parensPart = extractFromParens(name);
if (parensPart.length() == 1)
@@ -2199,8 +2198,8 @@ static bool endScope(yyscan_t yyscanner,Entry *scope, bool isGlobalRoot)
// iterate all symbol yyextra->modifiers of the scope
for (const auto &kv : mdfsMap)
{
- //cout<<it.key()<<": "<<it.data()<<endl;
- Argument *arg = findArgument(scope, kv.first);
+ //cout<<it.key()<<": "<<qPrint(it)<<endl;
+ Argument *arg = findArgument(scope, QCString(kv.first));
if (arg)
{
@@ -2315,23 +2314,23 @@ static void addCurrentEntry(yyscan_t yyscanner,bool case_insens)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (case_insens) yyextra->current->name = yyextra->current->name.lower();
- //printf("===Adding entry %s to %s\n", yyextra->current->name.data(), yyextra->current_root->name.data());
+ //printf("===Adding entry %s to %s\n", qPrint(yyextra->current->name), qPrint(yyextra->current_root->name));
yyextra->last_entry = yyextra->current;
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
initEntry(yyscanner);
}
-static void addModule(yyscan_t yyscanner,const char *name, bool isModule)
+static void addModule(yyscan_t yyscanner,const QCString &name, bool isModule)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr, "0=========> got module %s\n", name));
+ DBG_CTX((stderr, "0=========> got module %s\n", qPrint(name)));
if (isModule)
yyextra->current->section = Entry::NAMESPACE_SEC;
else
yyextra->current->section = Entry::FUNCTION_SEC;
- if (name!=NULL)
+ if (!name.isEmpty())
{
yyextra->current->name = name;
}
@@ -2353,10 +2352,10 @@ static void addModule(yyscan_t yyscanner,const char *name, bool isModule)
}
-static void addSubprogram(yyscan_t yyscanner,const char *text)
+static void addSubprogram(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- DBG_CTX((stderr,"1=========> got subprog, type: %s\n",text));
+ DBG_CTX((stderr,"1=========> got subprog, type: %s\n",qPrint(text)));
yyextra->subrCurrent.push_back(yyextra->current);
yyextra->current->section = Entry::FUNCTION_SEC ;
QCString subtype = text; subtype=subtype.lower().stripWhiteSpace();
@@ -2380,7 +2379,7 @@ static void addInterface(yyscan_t yyscanner,QCString name, InterfaceType type)
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (YY_START == Start)
{
- addModule(yyscanner,NULL);
+ addModule(yyscanner);
yy_push_state(ModuleBody,yyscanner); //anon program
}
@@ -2467,7 +2466,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
yyextra->docBlockInBody = FALSE;
return;
}
- DBG_CTX((stderr,"call parseCommentBlock [%s]\n",doc.data()));
+ DBG_CTX((stderr,"call parseCommentBlock [%s]\n",qPrint(doc)));
int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
int position=0;
bool needsEntry = FALSE;
@@ -2539,8 +2538,8 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b
else
{
// something different specified, give warning and leave error.
- warn(yyextra->fileName,yyextra->lineNr, "%s", ("Routine: " + yyextra->current->name + yyextra->current->args +
- " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName).data());
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: %s%s inconsistency between intent attribute and documentation for parameter %s:",
+ qPrint(yyextra->current->name),qPrint(yyextra->current->args),qPrint(yyextra->argName));
handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
yyextra->argName + " " + loc_doc,brief);
}
@@ -2563,8 +2562,8 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b
}
else
{
- warn(yyextra->fileName,yyextra->lineNr, "%s", ("Routine: " + yyextra->current->name + yyextra->current->args +
- " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName).data());
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: %s%s inconsistency between intent attribute and documentation for parameter %s:",
+ qPrint(yyextra->current->name),qPrint(yyextra->current->args),qPrint(yyextra->argName));
handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
yyextra->argName + " " + loc_doc,brief);
}
@@ -2585,8 +2584,8 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b
}
else
{
- warn(yyextra->fileName,yyextra->lineNr, "%s", ("Routine: " + yyextra->current->name + yyextra->current->args +
- " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName).data());
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: %s%s inconsistency between intent attribute and documentation for parameter %s:",
+ qPrint(yyextra->current->name),qPrint(yyextra->current->args),qPrint(yyextra->argName));
handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
yyextra->argName + " " + loc_doc,brief);
}
@@ -2634,20 +2633,19 @@ static void subrHandleCommentBlockResult(yyscan_t yyscanner,const QCString &doc,
//----------------------------------------------------------------------------
-static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileBuf,
+static void parseMain(yyscan_t yyscanner, const QCString &fileName,const char *fileBuf,
const std::shared_ptr<Entry> &rt, FortranFormat format)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- char *tmpBuf = NULL;
+ char *tmpBuf = nullptr;
initParser(yyscanner);
-
if (fileBuf==0 || fileBuf[0]=='\0') return;
yyextra->defaultProtection = Public;
yyextra->inputString = fileBuf;
yyextra->inputPosition = 0;
- yyextra->inputStringPrepass = NULL;
+ yyextra->inputStringPrepass = nullptr;
yyextra->inputPositionPrepass = 0;
//yyextra->anonCount = 0; // don't reset per file
@@ -2658,13 +2656,13 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
if (yyextra->isFixedForm)
{
- msg("Prepassing fixed form of %s\n", fileName);
+ msg("Prepassing fixed form of %s\n", qPrint(fileName));
//printf("---strlen=%d\n", strlen(fileBuf));
//clock_t start=clock();
//printf("Input fixed form string:\n%s\n", fileBuf);
//printf("===========================\n");
- yyextra->inputString = prepassFixedForm(fileBuf, NULL);
+ yyextra->inputString = prepassFixedForm(fileBuf, nullptr);
Debug::print(Debug::FortranFixed2Free,0,"======== Fixed to Free format =========\n---- Input fixed form string ------- \n%s\n", fileBuf);
Debug::print(Debug::FortranFixed2Free,0,"---- Resulting free form string ------- \n%s\n", yyextra->inputString);
//printf("Resulting free form string:\n%s\n", yyextra->inputString);
@@ -2684,7 +2682,7 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
yyextra->lineNr= 1 ;
yyextra->fileName = fileName;
- msg("Parsing file %s...\n",yyextra->fileName.data());
+ msg("Parsing file %s...\n",qPrint(yyextra->fileName));
yyextra->global_scope = rt.get();
startScope(yyscanner,rt.get()); // implies yyextra->current_root = rt
@@ -2760,19 +2758,19 @@ FortranOutlineParser::~FortranOutlineParser()
{
}
-void FortranOutlineParser::parseInput(const char *fileName,
- const char *fileBuf,
- const std::shared_ptr<Entry> &root,
- ClangTUParser * /*clangParser*/)
+void FortranOutlineParser::parseInput(const QCString &fileName,
+ const char *fileBuf,
+ const std::shared_ptr<Entry> &root,
+ ClangTUParser * /*clangParser*/)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->thisParser = this;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
::parseMain(p->yyscanner,fileName,fileBuf,root,p->format);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
}
bool FortranOutlineParser::needsPreprocessing(const QCString &extension) const
@@ -2780,11 +2778,10 @@ bool FortranOutlineParser::needsPreprocessing(const QCString &extension) const
return extension!=extension.lower(); // use preprocessor only for upper case extensions
}
-void FortranOutlineParser::parsePrototype(const char *text)
+void FortranOutlineParser::parsePrototype(const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
- QCString buffer = QCString(text);
- pushBuffer(p->yyscanner,buffer);
+ pushBuffer(p->yyscanner,text);
yyextra->parsingPrototype = TRUE;
BEGIN(Prototype);
fortranscannerYYlex(p->yyscanner);
@@ -2798,7 +2795,7 @@ static void scanner_abort(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
fprintf(stderr,"********************************************************************\n");
- fprintf(stderr,"Error in file %s line: %d, state: %d(%s)\n",yyextra->fileName.data(),yyextra->lineNr,YY_START,stateToString(YY_START));
+ fprintf(stderr,"Error in file %s line: %d, state: %d(%s)\n",qPrint(yyextra->fileName),yyextra->lineNr,YY_START,stateToString(YY_START));
fprintf(stderr,"********************************************************************\n");
bool start=FALSE;
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index 24e3fbb..24ed957 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -67,8 +67,8 @@ const char *JAVASCRIPT_LICENSE_TEXT = R"LIC(/*
struct FTVNode
{
- FTVNode(bool dir,const char *r,const char *f,const char *a,
- const char *n,bool sepIndex,bool navIndex,const Definition *df)
+ FTVNode(bool dir,const QCString &r,const QCString &f,const QCString &a,
+ const QCString &n,bool sepIndex,bool navIndex,const Definition *df)
: isLast(TRUE), isDir(dir),ref(r),file(f),anchor(a),name(n), index(0),
parent(0), separateIndex(sepIndex), addToNavIndex(navIndex),
def(df) {}
@@ -208,10 +208,10 @@ void FTVHelp::decContentsDepth()
* \param def Definition corresponding to this entry
*/
void FTVHelp::addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool separateIndex,
bool addToNavIndex,
const Definition *def
@@ -302,7 +302,7 @@ void FTVHelp::generateIndent(TextStream &t, FTVNode *n,bool opened)
void FTVHelp::generateLink(TextStream &t,FTVNode *n)
{
//printf("FTVHelp::generateLink(ref=%s,file=%s,anchor=%s\n",
- // n->ref.data(),n->file.data(),n->anchor.data());
+ // qPrint(n->ref),qPrint(n->file),qPrint(n->anchor));
bool setTarget = FALSE;
if (n->file.isEmpty()) // no link
{
@@ -347,12 +347,12 @@ void FTVHelp::generateLink(TextStream &t,FTVNode *n)
static void generateBriefDoc(TextStream &t,const Definition *def)
{
QCString brief = def->briefDescription(TRUE);
- //printf("*** %p: generateBriefDoc(%s)='%s'\n",def,def->name().data(),brief.data());
+ //printf("*** %p: generateBriefDoc(%s)='%s'\n",def,qPrint(def->name()),qPrint(brief));
if (!brief.isEmpty())
{
DocNode *root = validatingParseDoc(def->briefFile(),def->briefLine(),
def,0,brief,FALSE,FALSE,
- 0,TRUE,TRUE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,TRUE,Config_getBool(MARKDOWN_SUPPORT));
QCString relPath = relativePathToRoot(def->getOutputFileBase());
HtmlCodeGenerator htmlGen(t,relPath);
HtmlDocVisitor *visitor = new HtmlDocVisitor(t,htmlGen,def);
@@ -611,7 +611,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,TextStream &t,
if (!n->children.empty()) // write children to separate file for dynamic loading
{
QCString fileId = n->file;
- if (n->anchor)
+ if (!n->anchor.isEmpty())
{
fileId+="_"+n->anchor;
}
@@ -620,7 +620,7 @@ static bool generateJSTree(NavIndexEntryList &navIndex,TextStream &t,
fileId+="_dup";
}
QCString fileName = htmlOutput+"/"+fileId+".js";
- std::ofstream f(fileName,std::ofstream::out | std::ofstream::binary);
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (f.is_open())
{
TextStream tt(&f);
@@ -701,7 +701,7 @@ static void generateJSNavTree(const std::vector<FTVNode*> &nodeList)
// write the navigation index (and sub-indices)
std::sort(navIndex.begin(),navIndex.end(),[](const auto &n1,const auto &n2)
- { return !n1.url.isEmpty() && (n2.url.isEmpty() || qstrcmp(n1.url,n2.url)<0); });
+ { return !n1.url.isEmpty() && (n2.url.isEmpty() || (n1.url<n2.url)); });
int subIndex=0;
int elemCount=0;
diff --git a/src/ftvhelp.h b/src/ftvhelp.h
index 57fbf12..196b01c 100644
--- a/src/ftvhelp.h
+++ b/src/ftvhelp.h
@@ -43,17 +43,17 @@ class FTVHelp : public IndexIntf
void incContentsDepth();
void decContentsDepth();
void addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool separateIndex,
bool addToNavIndex,
const Definition *def);
- void addIndexItem(const Definition *,const MemberDef *,const char *,const char *) {}
- void addIndexFile(const char *) {}
- void addImageFile(const char *) {}
- void addStyleSheetFile(const char *) {}
+ void addIndexItem(const Definition *,const MemberDef *,const QCString &,const QCString &) {}
+ void addIndexFile(const QCString &) {}
+ void addImageFile(const QCString &) {}
+ void addStyleSheetFile(const QCString &) {}
void generateTreeView();
void generateTreeViewInline(TextStream &t);
static void generateTreeViewImages();
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 82a550d..a1ed4d5 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -52,15 +52,15 @@
class GroupDefImpl : public DefinitionMixin<GroupDef>
{
public:
- GroupDefImpl(const char *fileName,int line,const char *name,const char *title,const char *refFileName=0);
+ GroupDefImpl(const QCString &fileName,int line,const QCString &name,const QCString &title,const QCString &refFileName=QCString());
virtual ~GroupDefImpl();
virtual DefType definitionType() const { return TypeGroup; }
virtual QCString getOutputFileBase() const;
virtual QCString anchor() const { return QCString(); }
virtual QCString displayName(bool=TRUE) const { return hasGroupTitle() ? m_title : DefinitionMixin::name(); }
- virtual const char *groupTitle() const { return m_title; }
- virtual void setGroupTitle( const char *newtitle );
+ virtual QCString groupTitle() const { return m_title; }
+ virtual void setGroupTitle( const QCString &newtitle );
virtual bool hasGroupTitle( ) const { return m_titleSet; }
virtual void addFile(const FileDef *def);
virtual bool addClass(const ClassDef *def);
@@ -158,8 +158,8 @@ class GroupDefImpl : public DefinitionMixin<GroupDef>
};
-GroupDef *createGroupDef(const char *fileName,int line,const char *name,
- const char *title,const char *refFileName)
+GroupDef *createGroupDef(const QCString &fileName,int line,const QCString &name,
+ const QCString &title,const QCString &refFileName)
{
return new GroupDefImpl(fileName,line,name,title,refFileName);
}
@@ -167,11 +167,11 @@ GroupDef *createGroupDef(const char *fileName,int line,const char *name,
//---------------------------------------------------------------------------
-GroupDefImpl::GroupDefImpl(const char *df,int dl,const char *na,const char *t,
- const char *refFileName) : DefinitionMixin(df,dl,1,na),
+GroupDefImpl::GroupDefImpl(const QCString &df,int dl,const QCString &na,const QCString &t,
+ const QCString &refFileName) : DefinitionMixin(df,dl,1,na),
m_allMemberList(MemberListType_allMembersList)
{
- if (refFileName)
+ if (!refFileName.isEmpty())
{
m_fileName=stripExtension(refFileName);
}
@@ -190,9 +190,9 @@ GroupDefImpl::~GroupDefImpl()
{
}
-void GroupDefImpl::setGroupTitle( const char *t )
+void GroupDefImpl::setGroupTitle( const QCString &t )
{
- if ( t && *t )
+ if ( !t.isEmpty())
{
m_title = t;
m_titleSet = TRUE;
@@ -294,7 +294,7 @@ void GroupDefImpl::addDir(DirDef *def)
void GroupDefImpl::addPage(const PageDef *def)
{
if (def->isHidden()) return;
- //printf("Making page %s part of a group\n",def->name.data());
+ //printf("Making page %s part of a group\n",qPrint(def->name));
m_pages.add(def->name(),def);
const_cast<PageDef*>(def)->makePartOfGroup(this);
}
@@ -328,7 +328,7 @@ bool GroupDefImpl::insertMember(const MemberDef *md,bool docOnly)
{
if (md->isHidden()) return FALSE;
updateLanguage(md);
- //printf("GroupDef(%s)::insertMember(%s)\n", title.data(), md->name().data());
+ //printf("GroupDef(%s)::insertMember(%s)\n", qPrint(title), qPrint(md->name()));
MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.add(md->name());
for (auto &srcMi : *mni)
{
@@ -470,16 +470,16 @@ bool GroupDefImpl::insertMember(const MemberDef *md,bool docOnly)
default:
err("GroupDefImpl::insertMembers(): "
"member '%s' (typeid=%d) with scope '%s' inserted in group scope '%s'!\n",
- md->name().data(),md->memberType(),
- md->getClassDef() ? md->getClassDef()->name().data() : "",
- name().data());
+ qPrint(md->name()),md->memberType(),
+ md->getClassDef() ? qPrint(md->getClassDef()->name()) : "",
+ qPrint(name()));
}
return TRUE;
}
void GroupDefImpl::removeMember(MemberDef *md)
{
- // fprintf(stderr, "GroupDef(%s)::removeMember( %s )\n", title.data(), md->name().data());
+ // fprintf(stderr, "GroupDef(%s)::removeMember( %s )\n", qPrint(title), qPrint(md->name()));
MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.find(md->name());
if (mni)
{
@@ -569,7 +569,7 @@ bool GroupDefImpl::findGroup(const GroupDef *def) const
void GroupDefImpl::addGroup(const GroupDef *def)
{
- //printf("adding group '%s' to group '%s'\n",def->name().data(),name().data());
+ //printf("adding group '%s' to group '%s'\n",qPrint(def->name()),qPrint(name()));
//if (Config_getBool(SORT_MEMBER_DOCS))
// groupList->inSort(def);
//else
@@ -745,7 +745,7 @@ void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title
ol.popGeneratorState();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
}
else
@@ -761,7 +761,7 @@ void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// write separator between brief and details
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
@@ -782,14 +782,14 @@ void GroupDefImpl::writeDetailedDescription(OutputList &ol,const QCString &title
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// write inbody documentation
if (!inbodyDocumentation().isEmpty())
{
ol.generateDoc(inbodyFile(),inbodyLine(),this,0,inbodyDocumentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
}
}
@@ -800,7 +800,7 @@ void GroupDefImpl::writeBriefDescription(OutputList &ol)
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
@@ -817,7 +817,7 @@ void GroupDefImpl::writeBriefDescription(OutputList &ol)
if (hasDetailedDescription())
{
ol.disableAllBut(OutputGenerator::Html);
- ol.startTextLink(0,"details");
+ ol.startTextLink(QCString(),"details");
ol.parseText(theTranslator->trMore());
ol.endTextLink();
}
@@ -836,7 +836,7 @@ void GroupDefImpl::writeGroupGraph(OutputList &ol)
DotGroupCollaboration graph(this);
if (!graph.isTrivial())
{
- msg("Generating dependency graph for group %s\n",qualifiedName().data());
+ msg("Generating dependency graph for group %s\n",qPrint(qualifiedName()));
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
//ol.startParagraph();
@@ -865,16 +865,16 @@ void GroupDefImpl::writeFiles(OutputList &ol,const QCString &title)
ol.startMemberItem(fd->getOutputFileBase(),0);
ol.docify(theTranslator->trFile(FALSE,TRUE)+" ");
ol.insertMemberAlign();
- ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,fd->name());
+ ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fd->name());
ol.endMemberItem();
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,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
ol.endMemberList();
}
@@ -910,16 +910,16 @@ void GroupDefImpl::writeNestedGroups(OutputList &ol,const QCString &title)
//ol.docify(theTranslator->trGroup(FALSE,TRUE));
//ol.docify(" ");
ol.insertMemberAlign();
- ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
+ ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),QCString(),gd->groupTitle());
ol.endMemberItem();
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,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
}
ol.endMemberList();
@@ -942,16 +942,16 @@ void GroupDefImpl::writeDirs(OutputList &ol,const QCString &title)
ol.startMemberItem(dd->getOutputFileBase(),0);
ol.parseText(theTranslator->trDir(FALSE,TRUE));
ol.insertMemberAlign();
- ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),0,dd->shortName());
+ ol.writeObjectLink(dd->getReference(),dd->getOutputFileBase(),QCString(),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,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
ol.endMemberList();
@@ -990,8 +990,8 @@ void GroupDefImpl::writePageDocumentation(OutputList &ol)
ol.endSection(si->label(),SectionType::Subsection);
}
ol.startTextBlock();
- ol.generateDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation()+pd->inbodyDocumentation(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ ol.generateDoc(pd->docFile(),pd->docLine(),pd,0,(pd->documentation()+pd->inbodyDocumentation()),TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endTextBlock();
}
}
@@ -1072,7 +1072,7 @@ void GroupDefImpl::writeSummaryLinks(OutputList &ol) const
lde->kind()==LayoutDocEntry::GroupFiles ? "files" :
lde->kind()==LayoutDocEntry::GroupNestedGroups ? "groups" :
"dirs";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::MemberDecl)
@@ -1081,7 +1081,7 @@ void GroupDefImpl::writeSummaryLinks(OutputList &ol) const
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE;
}
}
@@ -1138,7 +1138,7 @@ void GroupDefImpl::writeDocumentation(OutputList &ol)
}
}
- Doxygen::indexList->addIndexItem(this,0,0,m_title);
+ Doxygen::indexList->addIndexItem(this,0,QCString(),m_title);
//---------------------------------------- start flexible part -------------------------------
@@ -1352,7 +1352,7 @@ void addClassToGroups(const Entry *root,ClassDef *cd)
{
cdm->makePartOfGroup(gd);
}
- //printf("Compound %s: in group %s\n",cd->name().data(),gd->groupTitle());
+ //printf("Compound %s: in group %s\n",qPrint(cd->name()),gd->groupTitle());
}
}
}
@@ -1369,7 +1369,7 @@ void addConceptToGroups(const Entry *root,ConceptDef *cd)
{
cdm->makePartOfGroup(gd);
}
- //printf("Compound %s: in group %s\n",cd->name().data(),gd->groupTitle());
+ //printf("Compound %s: in group %s\n",qPrint(cd->name()),gd->groupTitle());
}
}
}
@@ -1381,7 +1381,7 @@ void addNamespaceToGroups(const Entry *root,NamespaceDef *nd)
for (const Grouping &g : root->groups)
{
GroupDef *gd = Doxygen::groupLinkedMap->find(g.groupname);
- //printf("group '%s' gd=%p\n",g.groupname.data(),(void*)gd);
+ //printf("group '%s' gd=%p\n",qPrint(g.groupname),(void*)gd);
if (gd && gd->addNamespace(nd))
{
NamespaceDefMutable *ndm = toNamespaceDefMutable(nd);
@@ -1389,7 +1389,7 @@ void addNamespaceToGroups(const Entry *root,NamespaceDef *nd)
{
ndm->makePartOfGroup(gd);
}
- //printf("Namespace %s: in group %s\n",nd->name().data(),s->data());
+ //printf("Namespace %s: in group %s\n",qPrint(nd->name()),qPrint(gd->name()));
}
}
}
@@ -1400,19 +1400,19 @@ void addDirToGroups(const Entry *root,DirDef *dd)
for (const Grouping &g : root->groups)
{
GroupDef *gd = Doxygen::groupLinkedMap->find(g.groupname);
- //printf("group '%s'\n",g->groupname.data());
+ //printf("group '%s'\n",qPrint(g->groupname));
if (gd)
{
gd->addDir(dd);
dd->makePartOfGroup(gd);
- //printf("Dir %s: in group %s\n",dd->name().data(),g->groupname.data());
+ //printf("Dir %s: in group %s\n",qPrint(dd->name()),qPrint(g->groupname));
}
}
}
void addGroupToGroups(const Entry *root,GroupDef *subGroup)
{
- //printf("addGroupToGroups for %s groups=%d\n",root->name.data(),root->groups.size());
+ //printf("addGroupToGroups for %s groups=%d\n",qPrint(root->name),root->groups.size());
for (const Grouping &g : root->groups)
{
GroupDef *gd = Doxygen::groupLinkedMap->find(g.groupname);
@@ -1421,12 +1421,12 @@ void addGroupToGroups(const Entry *root,GroupDef *subGroup)
if (gd==subGroup)
{
warn(root->fileName,root->startLine,"Refusing to add group %s to itself",
- gd->name().data());
+ qPrint(gd->name()));
}
else if (subGroup->findGroup(gd))
{
warn(root->fileName,root->startLine,"Refusing to add group %s to group %s, since the latter is already a "
- "subgroup of the former\n", subGroup->name().data(),gd->name().data());
+ "subgroup of the former\n", qPrint(subGroup->name()),qPrint(gd->name()));
}
else if (!gd->findGroup(subGroup))
{
@@ -1441,7 +1441,7 @@ void addGroupToGroups(const Entry *root,GroupDef *subGroup)
void addMemberToGroups(const Entry *root,MemberDef *md)
{
//printf("addMemberToGroups: Root %p = %s, md %p=%s groups=%zu\n",
- // root, root->name.data(), md, md->name().data(), root->groups.size() );
+ // root, qPrint(root->name), md, qPrint(md->name()), root->groups.size() );
// Search entry's group list for group with highest pri.
Grouping::GroupPri_t pri = Grouping::GROUPING_LOWEST;
@@ -1455,11 +1455,11 @@ void addMemberToGroups(const Entry *root,MemberDef *md)
{
if (fgd && gd!=fgd && g.pri==pri)
{
- warn(root->fileName.data(), root->startLine,
+ warn(root->fileName, root->startLine,
"Member %s found in multiple %s groups! "
"The member will be put in group %s, and not in group %s",
- md->name().data(), Grouping::getGroupPriName( pri ),
- gd->name().data(), fgd->name().data()
+ qPrint(md->name()), Grouping::getGroupPriName( pri ),
+ qPrint(gd->name()), qPrint(fgd->name())
);
}
@@ -1503,10 +1503,10 @@ void addMemberToGroups(const Entry *root,MemberDef *md)
warn(md->getGroupFileName(),md->getGroupStartLine(),
"Member documentation for %s found several times in %s groups!\n"
"%s:%d: The member will remain in group %s, and won't be put into group %s",
- md->name().data(), Grouping::getGroupPriName( pri ),
- root->fileName.data(), root->startLine,
- mgd->name().data(),
- fgd->name().data()
+ qPrint(md->name()), Grouping::getGroupPriName( pri ),
+ qPrint(root->fileName), root->startLine,
+ qPrint(mgd->name()),
+ qPrint(fgd->name())
);
}
}
@@ -1523,8 +1523,8 @@ void addMemberToGroups(const Entry *root,MemberDef *md)
if (insertit)
{
//printf("insertMember found at %s line %d: %s: related %s\n",
- // md->getDefFileName().data(),md->getDefLine(),
- // md->name().data(),root->relates.data());
+ // qPrint(md->getDefFileName()),md->getDefLine(),
+ // qPrint(md->name()),qPrint(root->relates));
bool success = fgd->insertMember(md);
if (success)
{
@@ -1554,7 +1554,7 @@ void addExampleToGroups(const Entry *root,PageDef *eg)
{
gd->addExample(eg);
eg->makePartOfGroup(gd);
- //printf("Example %s: in group %s\n",eg->name().data(),s->data());
+ //printf("Example %s: in group %s\n",qPrint(eg->name()),s->data());
}
}
}
@@ -1572,7 +1572,7 @@ void GroupDefImpl::addListReferences()
getOutputFileBase(),
theTranslator->trGroup(TRUE,TRUE),
getOutputFileBase(),name(),
- 0,
+ QCString(),
0
);
}
@@ -1717,7 +1717,7 @@ void GroupDefImpl::writeMemberDeclarations(OutputList &ol,MemberListType lt,cons
}
if (ml)
{
- ml->writeDeclarations(ol,0,0,0,this,title,0);
+ ml->writeDeclarations(ol,0,0,0,this,title,QCString());
}
}
@@ -1738,7 +1738,7 @@ void GroupDefImpl::sortSubGroups()
std::sort(m_groups.begin(),
m_groups.end(),
[](const auto &g1,const auto &g2)
- { return qstrcmp(g1->groupTitle(),g2->groupTitle())<0; });
+ { return g1->groupTitle() < g2->groupTitle(); });
}
bool GroupDefImpl::isLinkableInProject() const
diff --git a/src/groupdef.h b/src/groupdef.h
index 8d3b78e..587c709 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -55,8 +55,8 @@ class GroupDef : public DefinitionMutable, public Definition
virtual QCString getOutputFileBase() const = 0;
virtual QCString anchor() const = 0;
virtual QCString displayName(bool=TRUE) const = 0;
- virtual const char *groupTitle() const = 0;
- virtual void setGroupTitle( const char *newtitle ) = 0;
+ virtual QCString groupTitle() const = 0;
+ virtual void setGroupTitle( const QCString &newtitle ) = 0;
virtual bool hasGroupTitle( ) const = 0;
virtual void addFile(const FileDef *def) = 0;
virtual bool addClass(const ClassDef *def) = 0;
@@ -110,8 +110,8 @@ class GroupDef : public DefinitionMutable, public Definition
};
-GroupDef *createGroupDef(const char *fileName,int line,const char *name,
- const char *title,const char *refFileName=0);
+GroupDef *createGroupDef(const QCString &fileName,int line,const QCString &name,
+ const QCString &title,const QCString &refFileName=QCString());
// --- Cast functions
diff --git a/src/htags.cpp b/src/htags.cpp
index e59e7c8..cb7b99c 100644
--- a/src/htags.cpp
+++ b/src/htags.cpp
@@ -87,7 +87,7 @@ bool Htags::execute(const QCString &htmldir)
commandLine += " \"" + htmldir + "\"";
std::string oldDir = Dir::currentDirPath();
Dir::setCurrent(g_inputDir.absPath());
- //printf("CommandLine=[%s]\n",commandLine.data());
+ //printf("CommandLine=[%s]\n",qPrint(commandLine));
Portable::sysTimerStart();
bool result=Portable::system("htags",commandLine,FALSE)==0;
if (!result)
@@ -128,8 +128,8 @@ bool Htags::loadFilemap(const QCString &htmlDir)
std::string lineStr;
while (getline(f,lineStr))
{
- QCString line = lineStr;
- //printf("Read line: %s",line.data());
+ QCString line(lineStr);
+ //printf("Read line: %s",qPrint(line));
int sep = line.find('\t');
if (sep!=-1)
{
@@ -138,14 +138,14 @@ bool Htags::loadFilemap(const QCString &htmlDir)
int ext=value.findRev('.');
if (ext!=-1) value=value.left(ext); // strip extension
g_symbolMap.insert(std::make_pair(key.str(),value.str()));
- //printf("Key/Value=(%s,%s)\n",key.data(),value.data());
+ //printf("Key/Value=(%s,%s)\n",qPrint(key),qPrint(value));
}
}
return true;
}
else
{
- err("file %s cannot be opened\n",fileMapName.data());
+ err("file %s cannot be opened\n",qPrint(fileMapName));
}
}
return false;
@@ -167,10 +167,10 @@ QCString Htags::path2URL(const QCString &path)
if (!symName.isEmpty())
{
auto it = g_symbolMap.find(symName.str());
- //printf("path2URL=%s symName=%s result=%p\n",path.data(),symName.data(),result);
+ //printf("path2URL=%s symName=%s result=%p\n",qPrint(path),qPrint(symName),result);
if (it!=g_symbolMap.end())
{
- url = QCString("HTML/") + it->second;
+ url = QCString("HTML/"+it->second);
}
}
return url;
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 545b96e..a11d045 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -278,7 +278,7 @@ HtmlDocVisitor::HtmlDocVisitor(TextStream &t,CodeOutputInterface &ci,
void HtmlDocVisitor::visit(DocWord *w)
{
- //printf("word: %s\n",w->word().data());
+ //printf("word: %s\n",qPrint(w->word()));
if (m_hide) return;
filter(w->word());
}
@@ -286,7 +286,7 @@ void HtmlDocVisitor::visit(DocWord *w)
void HtmlDocVisitor::visit(DocLinkedWord *w)
{
if (m_hide) return;
- //printf("linked word: %s\n",w->word().data());
+ //printf("linked word: %s\n",qPrint(w->word()));
startLink(w->ref(),w->file(),w->relPath(),w->anchor(),w->tooltip());
filter(w->word());
endLink();
@@ -554,14 +554,14 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
forceEndParagraph(s);
fileName.sprintf("%s%d%s",
- (Config_getString(HTML_OUTPUT)+"/inline_dotgraph_").data(),
+ qPrint(Config_getString(HTML_OUTPUT)+"/inline_dotgraph_"),
dotindex++,
".dot"
);
std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!file.is_open())
{
- err("Could not open file %s for writing\n",fileName.data());
+ err("Could not open file %s for writing\n",qPrint(fileName));
}
else
{
@@ -589,13 +589,13 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d",
- (Config_getString(HTML_OUTPUT)+"/inline_mscgraph_").data(),
+ qPrint(Config_getString(HTML_OUTPUT)+"/inline_mscgraph_"),
mscindex++
);
std::ofstream file(baseName.str()+".msc",std::ofstream::out | std::ofstream::binary);
if (!file.is_open())
{
- err("Could not open file %s.msc for writing\n",baseName.data());
+ err("Could not open file %s.msc for writing\n",qPrint(baseName));
}
else
{
@@ -778,7 +778,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
void HtmlDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
if (op->isFirst())
{
forceEndParagraph(op);
@@ -902,9 +902,9 @@ void HtmlDocVisitor::visit(DocIndexEntry *e)
}
m_t << "<a name=\"" << anchor << "\"></a>";
//printf("*** DocIndexEntry: word='%s' scope='%s' member='%s'\n",
- // e->entry().data(),
- // e->scope() ? e->scope()->name().data() : "<null>",
- // e->member() ? e->member()->name().data() : "<null>"
+ // qPrint(e->entry()),
+ // e->scope() ? qPrint(e->scope()->name()) : "<null>",
+ // e->member() ? qPrint(e->member()->name()) : "<null>"
// );
Doxygen::indexList->addIndexItem(e->scope(),e->member(),anchor,e->entry());
}
@@ -1438,7 +1438,7 @@ void HtmlDocVisitor::visitPre(DocSection *s)
m_t << "<h" << s->level() << ">";
m_t << "<a class=\"anchor\" id=\"" << s->anchor();
m_t << "\"></a>\n";
- filter(convertCharEntitiesToUTF8(s->title().data()));
+ filter(convertCharEntitiesToUTF8(s->title()));
m_t << "</h" << s->level() << ">\n";
}
@@ -2054,7 +2054,7 @@ void HtmlDocVisitor::visitPost(DocXRefItem *x)
void HtmlDocVisitor::visitPre(DocInternalRef *ref)
{
if (m_hide) return;
- startLink(0,ref->file(),ref->relPath(),ref->anchor());
+ startLink(QCString(),ref->file(),ref->relPath(),ref->anchor());
}
void HtmlDocVisitor::visitPost(DocInternalRef *)
@@ -2097,9 +2097,9 @@ void HtmlDocVisitor::visitPre(DocVhdlFlow *vf)
m_t << "<p>";
m_t << "flowchart: " ; // TODO: translate me
m_t << "<a href=\"";
- m_t << fname.data();
+ m_t << fname;
m_t << ".svg\">";
- m_t << VhdlDocGen::getFlowMember()->name().data();
+ m_t << VhdlDocGen::getFlowMember()->name();
m_t << "</a>";
if (vf->hasCaption())
{
@@ -2130,10 +2130,10 @@ void HtmlDocVisitor::visitPost(DocParBlock *)
-void HtmlDocVisitor::filter(const char *str)
+void HtmlDocVisitor::filter(const QCString &str)
{
- if (str==0) return;
- const char *p=str;
+ if (str.isEmpty()) return;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -2167,10 +2167,10 @@ void HtmlDocVisitor::filter(const char *str)
/// Escape basic entities to produce a valid CDATA attribute value,
/// assume that the outer quoting will be using the double quote &quot;
-void HtmlDocVisitor::filterQuotedCdataAttr(const char* str)
+void HtmlDocVisitor::filterQuotedCdataAttr(const QCString &str)
{
- if (str==0) return;
- const char *p=str;
+ if (str.isEmpty()) return;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -2207,7 +2207,7 @@ void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file,
const QCString &relPath,const QCString &anchor,
const QCString &tooltip)
{
- //printf("HtmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data());
+ //printf("HtmlDocVisitor: file=%s anchor=%s\n",qPrint(file),qPrint(anchor));
if (!ref.isEmpty()) // link to entity imported via tag file
{
m_t << "<a class=\"elRef\" ";
diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h
index f03504e..287088d 100644
--- a/src/htmldocvisitor.h
+++ b/src/htmldocvisitor.h
@@ -139,8 +139,8 @@ class HtmlDocVisitor : public DocVisitor
//--------------------------------------
void writeObfuscatedMailAddress(const QCString &url);
- void filter(const char *str);
- void filterQuotedCdataAttr(const char* str);
+ void filter(const QCString &str);
+ void filterQuotedCdataAttr(const QCString &str);
void startLink(const QCString &ref,const QCString &file,
const QCString &relPath,const QCString &anchor,
const QCString &tooltip = "");
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index fc00b17..7cd893f 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -65,12 +65,11 @@ static const char *hex="0123456789ABCDEF";
// 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(TextStream &t,const char *relPath)
+static void writeClientSearchBox(TextStream &t,const QCString &relPath)
{
- const char *rp = relPath ? relPath : "";
t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
t << " <span class=\"left\">\n";
- t << " <img id=\"MSearchSelect\" src=\"" << rp << "search/mag_sel.svg\"\n";
+ t << " <img id=\"MSearchSelect\" src=\"" << relPath << "search/mag_sel.svg\"\n";
t << " onmouseover=\"return searchBox.OnSearchSelectShow()\"\n";
t << " onmouseout=\"return searchBox.OnSearchSelectHide()\"\n";
t << " alt=\"\"/>\n";
@@ -81,20 +80,19 @@ static void writeClientSearchBox(TextStream &t,const char *relPath)
t << " onkeyup=\"searchBox.OnSearchFieldChange(event)\"/>\n";
t << " </span><span class=\"right\">\n";
t << " <a id=\"MSearchClose\" href=\"javascript:searchBox.CloseResultsWindow()\">"
- << "<img id=\"MSearchCloseImg\" border=\"0\" src=\"" << rp << "search/close.svg\" alt=\"\"/></a>\n";
+ << "<img id=\"MSearchCloseImg\" border=\"0\" src=\"" << relPath << "search/close.svg\" alt=\"\"/></a>\n";
t << " </span>\n";
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(TextStream &t,const char *relPath,bool highlightSearch)
+static void writeServerSearchBox(TextStream &t,const QCString &relPath,bool highlightSearch)
{
- const char *rp = relPath ? relPath : "";
bool externalSearch = Config_getBool(EXTERNAL_SEARCH);
t << " <div id=\"MSearchBox\" class=\"MSearchBoxInactive\">\n";
t << " <div class=\"left\">\n";
- t << " <form id=\"FSearchBox\" action=\"" << rp;
+ t << " <form id=\"FSearchBox\" action=\"" << relPath;
if (externalSearch)
{
t << "search" << Doxygen::htmlFileExtension;
@@ -104,7 +102,7 @@ static void writeServerSearchBox(TextStream &t,const char *relPath,bool highligh
t << "search.php";
}
t << "\" method=\"get\">\n";
- t << " <img id=\"MSearchSelect\" src=\"" << rp << "search/mag.svg\" alt=\"\"/>\n";
+ t << " <img id=\"MSearchSelect\" src=\"" << relPath << "search/mag.svg\" alt=\"\"/>\n";
if (!highlightSearch)
{
t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\""
@@ -376,7 +374,8 @@ static QCString substituteHtmlKeywords(const QCString &str,
if (timeStamp)
{
- generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), convertToHtml(Config_getString(PROJECT_NAME)));
+ generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE),
+ convertToHtml(Config_getString(PROJECT_NAME)));
}
else
{
@@ -526,12 +525,12 @@ void HtmlCodeGenerator::setRelativePath(const QCString &path)
m_relPath = path;
}
-void HtmlCodeGenerator::codify(const char *str)
+void HtmlCodeGenerator::codify(const QCString &str)
{
int tabSize = Config_getInt(TAB_SIZE);
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
int spacesToNextTabStop;
while (*p)
@@ -590,13 +589,13 @@ void HtmlCodeGenerator::codify(const char *str)
}
}
-void HtmlCodeGenerator::docify(const char *str)
+void HtmlCodeGenerator::docify(const QCString &str)
{
//m_t << getHtmlDirEmbeddingChar(getTextDirByConfig(str));
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -637,8 +636,8 @@ void HtmlCodeGenerator::docify(const char *str)
}
}
-void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
- const char *anchor,int l)
+void HtmlCodeGenerator::writeLineNumber(const QCString &ref,const QCString &filename,
+ const QCString &anchor,int l)
{
const int maxLineNrStr = 10;
char lineNumber[maxLineNrStr];
@@ -653,9 +652,9 @@ void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
}
m_t << "<a name=\"" << lineAnchor << "\"></a><span class=\"lineno\">";
- if (filename)
+ if (!filename.isEmpty())
{
- _writeCodeLink("line",ref,filename,anchor,lineNumber,0);
+ _writeCodeLink("line",ref,filename,anchor,lineNumber,QCString());
}
else
{
@@ -666,20 +665,20 @@ void HtmlCodeGenerator::writeLineNumber(const char *ref,const char *filename,
m_col=0;
}
-void HtmlCodeGenerator::writeCodeLink(const char *ref,const char *f,
- const char *anchor, const char *name,
- const char *tooltip)
+void HtmlCodeGenerator::writeCodeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor, const QCString &name,
+ const QCString &tooltip)
{
//printf("writeCodeLink(ref=%s,f=%s,anchor=%s,name=%s,tooltip=%s)\n",ref,f,anchor,name,tooltip);
_writeCodeLink("code",ref,f,anchor,name,tooltip);
}
-void HtmlCodeGenerator::_writeCodeLink(const char *className,
- const char *ref,const char *f,
- const char *anchor, const char *name,
- const char *tooltip)
+void HtmlCodeGenerator::_writeCodeLink(const QCString &className,
+ const QCString &ref,const QCString &f,
+ const QCString &anchor, const QCString &name,
+ const QCString &tooltip)
{
- if (ref)
+ if (!ref.isEmpty())
{
m_t << "<a class=\"" << className << "Ref\" ";
m_t << externalLinkTarget();
@@ -690,18 +689,18 @@ void HtmlCodeGenerator::_writeCodeLink(const char *className,
}
m_t << "href=\"";
m_t << externalRef(m_relPath,ref,TRUE);
- if (f) m_t << addHtmlExtensionIfMissing(f);
- if (anchor) m_t << "#" << anchor;
+ if (!f.isEmpty()) m_t << addHtmlExtensionIfMissing(f);
+ if (!anchor.isEmpty()) m_t << "#" << anchor;
m_t << "\"";
- if (tooltip) m_t << " title=\"" << convertToHtml(tooltip) << "\"";
+ if (!tooltip.isEmpty()) m_t << " title=\"" << convertToHtml(tooltip) << "\"";
m_t << ">";
docify(name);
m_t << "</a>";
- m_col+=qstrlen(name);
+ m_col+=name.length();
}
-void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
- const char *decl, const char *desc,
+void HtmlCodeGenerator::writeTooltip(const QCString &id, const DocLinkInfo &docInfo,
+ const QCString &decl, const QCString &desc,
const SourceLinkInfo &defInfo,
const SourceLinkInfo &declInfo)
{
@@ -724,13 +723,13 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
m_t << "</a>";
}
m_t << "</div>";
- if (decl)
+ if (!decl.isEmpty())
{
m_t << "<div class=\"ttdeci\">";
docify(decl);
m_t << "</div>";
}
- if (desc)
+ if (!desc.isEmpty())
{
m_t << "<div class=\"ttdoc\">";
docify(desc);
@@ -806,7 +805,7 @@ void HtmlCodeGenerator::endCodeLine()
}
}
-void HtmlCodeGenerator::startFontClass(const char *s)
+void HtmlCodeGenerator::startFontClass(const QCString &s)
{
m_t << "<span class=\"" << s << "\">";
}
@@ -816,17 +815,17 @@ void HtmlCodeGenerator::endFontClass()
m_t << "</span>";
}
-void HtmlCodeGenerator::writeCodeAnchor(const char *anchor)
+void HtmlCodeGenerator::writeCodeAnchor(const QCString &anchor)
{
m_t << "<a name=\"" << anchor << "\"></a>";
}
-void HtmlCodeGenerator::startCodeFragment(const char *)
+void HtmlCodeGenerator::startCodeFragment(const QCString &)
{
m_t << "<div class=\"fragment\">";
}
-void HtmlCodeGenerator::endCodeFragment(const char *)
+void HtmlCodeGenerator::endCodeFragment(const QCString &)
{
//endCodeLine checks is there is still an open code line, if so closes it.
endCodeLine();
@@ -868,13 +867,13 @@ void HtmlGenerator::init()
Dir d(dname.str());
if (!d.exists() && !d.mkdir(dname.str()))
{
- term("Could not create output directory %s\n",dname.data());
+ term("Could not create output directory %s\n",qPrint(dname));
}
//writeLogo(dname);
if (!Config_getString(HTML_HEADER).isEmpty())
{
g_header=fileToString(Config_getString(HTML_HEADER));
- //printf("g_header='%s'\n",g_header.data());
+ //printf("g_header='%s'\n",qPrint(g_header));
}
else
{
@@ -884,7 +883,7 @@ void HtmlGenerator::init()
if (!Config_getString(HTML_FOOTER).isEmpty())
{
g_footer=fileToString(Config_getString(HTML_FOOTER));
- //printf("g_footer='%s'\n",g_footer.data());
+ //printf("g_footer='%s'\n",qPrint(g_footer));
}
else
{
@@ -896,10 +895,10 @@ void HtmlGenerator::init()
if (!Config_getString(MATHJAX_CODEFILE).isEmpty())
{
g_mathjax_code=fileToString(Config_getString(MATHJAX_CODEFILE));
- //printf("g_mathjax_code='%s'\n",g_mathjax_code.data());
+ //printf("g_mathjax_code='%s'\n",qPrint(g_mathjax_code));
}
g_latex_macro=getConvertLatexMacro();
- //printf("converted g_latex_macro='%s'\n",g_latex_macro.data());
+ //printf("converted g_latex_macro='%s'\n",qPrint(g_latex_macro));
}
createSubDirs(d);
@@ -923,7 +922,7 @@ void HtmlGenerator::init()
}
{
- std::ofstream f(dname+"/dynsections.js",std::ofstream::out | std::ofstream::binary);
+ std::ofstream f(dname.str()+"/dynsections.js",std::ofstream::out | std::ofstream::binary);
if (f.is_open())
{
TextStream t(&f);
@@ -972,7 +971,7 @@ void HtmlGenerator::writeTabData()
mgr.copyResource("nav_g.png",dname);
}
-void HtmlGenerator::writeSearchData(const char *dname)
+void HtmlGenerator::writeSearchData(const QCString &dname)
{
bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
//writeImgData(dname,serverBasedSearch ? search_server_data : search_client_data);
@@ -1026,7 +1025,7 @@ void HtmlGenerator::writeStyleSheetFile(TextStream &t)
t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getDoxygenVersion()));
}
-void HtmlGenerator::writeHeaderFile(TextStream &t, const char * /*cssname*/)
+void HtmlGenerator::writeHeaderFile(TextStream &t, const QCString & /*cssname*/)
{
t << "<!-- HTML header for doxygen " << getDoxygenVersion() << "-->\n";
t << ResourceMgr::instance().getAsString("header.html");
@@ -1040,8 +1039,8 @@ void HtmlGenerator::writeFooterFile(TextStream &t)
static std::mutex g_indexLock;
-void HtmlGenerator::startFile(const char *name,const char *,
- const char *title,int id)
+void HtmlGenerator::startFile(const QCString &name,const QCString &,
+ const QCString &title,int id)
{
//printf("HtmlGenerator::startFile(%s)\n",name);
m_relPath = relativePathToRoot(name);
@@ -1057,7 +1056,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
}
m_lastFile = fileName;
- m_t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title?title:"")),m_relPath);
+ m_t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),m_relPath);
m_t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
<< getDoxygenVersion() << " -->\n";
@@ -1105,7 +1104,7 @@ void HtmlGenerator::writeSearchInfo()
}
-QCString HtmlGenerator::writeLogoAsString(const char *path)
+QCString HtmlGenerator::writeLogoAsString(const QCString &path)
{
bool timeStamp = Config_getBool(HTML_TIMESTAMP);
QCString result;
@@ -1140,7 +1139,7 @@ void HtmlGenerator::writePageFooter(TextStream &t,const QCString &lastTitle,
t << substituteHtmlKeywords(g_footer,convertToHtml(lastTitle),relPath,navPath);
}
-void HtmlGenerator::writeFooter(const char *navPath)
+void HtmlGenerator::writeFooter(const QCString &navPath)
{
writePageFooter(m_t,m_lastTitle,m_relPath,navPath);
}
@@ -1184,7 +1183,7 @@ void HtmlGenerator::writeStyleInfo(int part)
FileInfo cssfi(cssname.str());
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!", qPrint(Config_getString(HTML_STYLESHEET)));
}
else
{
@@ -1219,14 +1218,14 @@ void HtmlGenerator::writeStyleInfo(int part)
}
}
-void HtmlGenerator::startDoxyAnchor(const char *,const char *,
- const char *anchor, const char *,
- const char *)
+void HtmlGenerator::startDoxyAnchor(const QCString &,const QCString &,
+ const QCString &anchor, const QCString &,
+ const QCString &)
{
m_t << "<a id=\"" << anchor << "\"></a>";
}
-void HtmlGenerator::endDoxyAnchor(const char *,const char *)
+void HtmlGenerator::endDoxyAnchor(const QCString &,const QCString &)
{
}
@@ -1235,9 +1234,9 @@ void HtmlGenerator::endDoxyAnchor(const char *,const char *)
// t << "\n<p>\n";
//}
-void HtmlGenerator::startParagraph(const char *classDef)
+void HtmlGenerator::startParagraph(const QCString &classDef)
{
- if (classDef)
+ if (!classDef.isEmpty())
m_t << "\n<p class=\"" << classDef << "\">";
else
m_t << "\n<p>";
@@ -1248,7 +1247,7 @@ void HtmlGenerator::endParagraph()
m_t << "</p>\n";
}
-void HtmlGenerator::writeString(const char *text)
+void HtmlGenerator::writeString(const QCString &text)
{
m_t << text;
}
@@ -1263,12 +1262,12 @@ void HtmlGenerator::endIndexListItem()
m_t << "</li>\n";
}
-void HtmlGenerator::startIndexItem(const char *ref,const char *f)
+void HtmlGenerator::startIndexItem(const QCString &ref,const QCString &f)
{
//printf("HtmlGenerator::startIndexItem(%s,%s)\n",ref,f);
- if (ref || f)
+ if (!ref.isEmpty() || !f.isEmpty())
{
- if (ref)
+ if (!ref.isEmpty())
{
m_t << "<a class=\"elRef\" ";
m_t << externalLinkTarget();
@@ -1279,7 +1278,7 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f)
}
m_t << "href=\"";
m_t << externalRef(m_relPath,ref,TRUE);
- if (f) m_t << addHtmlExtensionIfMissing(f);
+ if (!f.isEmpty()) m_t << addHtmlExtensionIfMissing(f);
m_t << "\">";
}
else
@@ -1288,10 +1287,10 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f)
}
}
-void HtmlGenerator::endIndexItem(const char *ref,const char *f)
+void HtmlGenerator::endIndexItem(const QCString &ref,const QCString &f)
{
//printf("HtmlGenerator::endIndexItem(%s,%s,%s)\n",ref,f,name);
- if (ref || f)
+ if (!ref.isEmpty() || !f.isEmpty())
{
m_t << "</a>";
}
@@ -1301,20 +1300,20 @@ void HtmlGenerator::endIndexItem(const char *ref,const char *f)
}
}
-void HtmlGenerator::writeStartAnnoItem(const char *,const char *f,
- const char *path,const char *name)
+void HtmlGenerator::writeStartAnnoItem(const QCString &,const QCString &f,
+ const QCString &path,const QCString &name)
{
m_t << "<li>";
- if (path) docify(path);
+ if (!path.isEmpty()) docify(path);
m_t << "<a class=\"el\" href=\"" << addHtmlExtensionIfMissing(f) << "\">";
docify(name);
m_t << "</a> ";
}
-void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
- const char *anchor, const char *name)
+void HtmlGenerator::writeObjectLink(const QCString &ref,const QCString &f,
+ const QCString &anchor, const QCString &name)
{
- if (ref)
+ if (!ref.isEmpty())
{
m_t << "<a class=\"elRef\" ";
m_t << externalLinkTarget();
@@ -1325,18 +1324,18 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
}
m_t << "href=\"";
m_t << externalRef(m_relPath,ref,TRUE);
- if (f) m_t << addHtmlExtensionIfMissing(f);
- if (anchor) m_t << "#" << anchor;
+ if (!f.isEmpty()) m_t << addHtmlExtensionIfMissing(f);
+ if (!anchor.isEmpty()) m_t << "#" << anchor;
m_t << "\">";
docify(name);
m_t << "</a>";
}
-void HtmlGenerator::startTextLink(const char *f,const char *anchor)
+void HtmlGenerator::startTextLink(const QCString &f,const QCString &anchor)
{
m_t << "<a href=\"";
- if (f) m_t << m_relPath << addHtmlExtensionIfMissing(f);
- if (anchor) m_t << "#" << anchor;
+ if (!f.isEmpty()) m_t << m_relPath << addHtmlExtensionIfMissing(f);
+ if (!anchor.isEmpty()) m_t << "#" << anchor;
m_t << "\">";
}
@@ -1345,13 +1344,13 @@ void HtmlGenerator::endTextLink()
m_t << "</a>";
}
-void HtmlGenerator::startHtmlLink(const char *url)
+void HtmlGenerator::startHtmlLink(const QCString &url)
{
bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
m_t << "<a ";
if (generateTreeView) m_t << "target=\"top\" ";
m_t << "href=\"";
- if (url) m_t << url;
+ if (!url.isEmpty()) m_t << url;
m_t << "\">";
}
@@ -1392,7 +1391,7 @@ void HtmlGenerator::endGroupHeader(int extraIndentLevel)
}
}
-void HtmlGenerator::startSection(const char *lab,const char *,SectionType type)
+void HtmlGenerator::startSection(const QCString &lab,const QCString &,SectionType type)
{
switch(type)
{
@@ -1406,7 +1405,7 @@ void HtmlGenerator::startSection(const char *lab,const char *,SectionType type)
m_t << "<a id=\"" << lab << "\"></a>";
}
-void HtmlGenerator::endSection(const char *,SectionType type)
+void HtmlGenerator::endSection(const QCString &,SectionType type)
{
switch(type)
{
@@ -1419,16 +1418,16 @@ void HtmlGenerator::endSection(const char *,SectionType type)
}
}
-void HtmlGenerator::docify(const char *str)
+void HtmlGenerator::docify(const QCString &str)
{
docify(str,FALSE);
}
-void HtmlGenerator::docify(const char *str,bool inHtmlComment)
+void HtmlGenerator::docify(const QCString &str,bool inHtmlComment)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -1546,7 +1545,7 @@ void HtmlGenerator::startClassDiagram()
}
void HtmlGenerator::endClassDiagram(const ClassDiagram &d,
- const char *fileName,const char *name)
+ const QCString &fileName,const QCString &name)
{
endSectionHeader(m_t);
startSectionSummary(m_t,m_sectionCount);
@@ -1593,7 +1592,7 @@ void HtmlGenerator::endMemberList()
// 0 = single column right aligned
// 1 = double column left aligned
// 2 = single column left aligned
-void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *inheritId)
+void HtmlGenerator::startMemberItem(const QCString &anchor,int annoType,const QCString &inheritId)
{
DBG_HTML(m_t << "<!-- startMemberItem() -->\n")
if (m_emptySection)
@@ -1601,8 +1600,8 @@ void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *
m_t << "<table class=\"memberdecls\">\n";
m_emptySection=FALSE;
}
- m_t << "<tr class=\"memitem:" << (anchor?anchor:"");
- if (inheritId)
+ m_t << "<tr class=\"memitem:" << anchor;
+ if (!inheritId.isEmpty())
{
m_t << " inherit " << inheritId;
}
@@ -1619,11 +1618,11 @@ void HtmlGenerator::startMemberTemplateParams()
{
}
-void HtmlGenerator::endMemberTemplateParams(const char *anchor,const char *inheritId)
+void HtmlGenerator::endMemberTemplateParams(const QCString &anchor,const QCString &inheritId)
{
m_t << "</td></tr>\n";
- m_t << "<tr class=\"memitem:" << (anchor?anchor:"");
- if (inheritId)
+ m_t << "<tr class=\"memitem:" << anchor;
+ if (!inheritId.isEmpty())
{
m_t << " inherit " << inheritId;
}
@@ -1659,16 +1658,16 @@ void HtmlGenerator::insertMemberAlignLeft(int annoType, bool initTag)
}
}
-void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId, bool typ)
+void HtmlGenerator::startMemberDescription(const QCString &anchor,const QCString &inheritId, bool typ)
{
DBG_HTML(m_t << "<!-- startMemberDescription -->\n")
- if (m_emptySection)
- {
- m_t << "<table class=\"memberdecls\">\n";
- m_emptySection=FALSE;
- }
- m_t << "<tr class=\"memdesc:" << (anchor?anchor:"");
- if (inheritId)
+ if (m_emptySection)
+ {
+ m_t << "<table class=\"memberdecls\">\n";
+ m_emptySection=FALSE;
+ }
+ m_t << "<tr class=\"memdesc:" << anchor;
+ if (!inheritId.isEmpty())
{
m_t << " inherit " << inheritId;
}
@@ -1701,7 +1700,7 @@ void HtmlGenerator::endMemberSections()
}
}
-void HtmlGenerator::startMemberHeader(const char *anchor, int typ)
+void HtmlGenerator::startMemberHeader(const QCString &anchor, int typ)
{
DBG_HTML(m_t << "<!-- startMemberHeader -->\n")
if (!m_emptySection)
@@ -1715,7 +1714,7 @@ void HtmlGenerator::startMemberHeader(const char *anchor, int typ)
m_emptySection=FALSE;
}
m_t << "<tr class=\"heading\"><td colspan=\"" << typ << "\"><h2 class=\"groupheader\">";
- if (anchor)
+ if (!anchor.isEmpty())
{
m_t << "<a name=\"" << anchor << "\"></a>\n";
}
@@ -1766,7 +1765,7 @@ void HtmlGenerator::startIndexValue(bool)
m_t << "<td class=\"indexvalue\">";
}
-void HtmlGenerator::endIndexValue(const char *,bool)
+void HtmlGenerator::endIndexValue(const QCString &,bool)
{
m_t << "</td></tr>\n";
}
@@ -1781,8 +1780,8 @@ void HtmlGenerator::endMemberDocList()
DBG_HTML(m_t << "<!-- endMemberDocList -->\n";)
}
-void HtmlGenerator::startMemberDoc( const char *clName, const char *memName,
- const char *anchor, const char *title,
+void HtmlGenerator::startMemberDoc( const QCString &clName, const QCString &memName,
+ const QCString &anchor, const QCString &title,
int memCount, int memTotal, bool showInline)
{
DBG_HTML(m_t << "<!-- startMemberDoc -->\n";)
@@ -1834,7 +1833,7 @@ void HtmlGenerator::startParameterList(bool openBracket)
m_t << "</td>\n";
}
-void HtmlGenerator::startParameterType(bool first,const char *key)
+void HtmlGenerator::startParameterType(bool first,const QCString &key)
{
if (first)
{
@@ -1845,9 +1844,7 @@ void HtmlGenerator::startParameterType(bool first,const char *key)
{
DBG_HTML(m_t << "<!-- startParameterType -->\n";)
m_t << " <tr>\n";
- m_t << " <td class=\"paramkey\">";
- if (key) m_t << key;
- m_t << "</td>\n";
+ m_t << " <td class=\"paramkey\">" << key << "</td>\n";
m_t << " <td></td>\n";
m_t << " <td class=\"paramtype\">";
}
@@ -1902,7 +1899,7 @@ void HtmlGenerator::endParameterList()
m_t << " </tr>\n";
}
-void HtmlGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+void HtmlGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
{
DBG_HTML(m_t << "<!-- exceptionEntry -->\n";)
m_t << "</td>\n";
@@ -1910,7 +1907,7 @@ void HtmlGenerator::exceptionEntry(const char* prefix,bool closeBracket)
m_t << " <tr>\n";
m_t << " <td align=\"right\">";
// colspan 2 so it gets both parameter type and parameter name columns
- if (prefix)
+ if (!prefix.isEmpty())
m_t << prefix << "</td><td>(</td><td colspan=\"2\">";
else if (closeBracket)
m_t << "</td><td>)</td><td></td><td>";
@@ -1947,7 +1944,7 @@ void HtmlGenerator::endDotGraph(DotClassGraph &g)
if (generateLegend && !umlLook)
{
m_t << "<center><span class=\"legend\">[";
- startHtmlLink(m_relPath+"graph_legend"+Doxygen::htmlFileExtension);
+ startHtmlLink((m_relPath+"graph_legend"+Doxygen::htmlFileExtension));
m_t << theTranslator->trLegend();
endHtmlLink();
m_t << "]</span></center>";
@@ -2075,7 +2072,7 @@ void HtmlGenerator::endIndent()
m_t << "\n</div>\n" << "</div>\n";
}
-void HtmlGenerator::addIndexItem(const char *,const char *)
+void HtmlGenerator::addIndexItem(const QCString &,const QCString &)
{
}
@@ -2088,7 +2085,7 @@ void HtmlGenerator::writeNonBreakableSpace(int n)
}
}
-void HtmlGenerator::startDescTable(const char *title)
+void HtmlGenerator::startDescTable(const QCString &title)
{
m_t << "<table class=\"fieldtable\">\n"
<< "<tr><th colspan=\"2\">" << title << "</th></tr>";
@@ -2141,7 +2138,7 @@ void HtmlGenerator::endExamples()
}
void HtmlGenerator::startParamList(ParamListTypes,
- const char *title)
+ const QCString &title)
{
m_t << "<dl><dt><b>";
docify(title);
@@ -2196,7 +2193,7 @@ static void endQuickIndexList(TextStream &t,bool compact)
}
}
-static void startQuickIndexItem(TextStream &t,const char *l,
+static void startQuickIndexItem(TextStream &t,const QCString &l,
bool hl,bool /*compact*/,
const QCString &relPath)
{
@@ -2206,14 +2203,14 @@ static void startQuickIndexItem(TextStream &t,const char *l,
t << " class=\"current\"";
}
t << ">";
- if (l) t << "<a href=\"" << correctURL(l,relPath) << "\">";
+ if (!l.isEmpty()) t << "<a href=\"" << correctURL(l,relPath) << "\">";
t << "<span>";
}
-static void endQuickIndexItem(TextStream &t,const char *l)
+static void endQuickIndexItem(TextStream &t,const QCString &l)
{
t << "</span>";
- if (l) t << "</a>";
+ if (!l.isEmpty()) t << "</a>";
t << "</li>\n";
}
@@ -2359,7 +2356,7 @@ static void renderQuickLinksAsTabs(TextStream &t,const QCString &relPath,
static void writeDefaultQuickLinks(TextStream &t,bool compact,
HighlightedItem hli,
- const char *file,
+ const QCString &file,
const QCString &relPath)
{
bool serverBasedSearch = Config_getBool(SERVER_BASED_SEARCH);
@@ -2455,7 +2452,7 @@ static void writeDefaultQuickLinks(TextStream &t,bool compact,
else if (compact) // && !Config_getBool(HTML_DYNAMIC_MENUS)
{
// find highlighted index item
- LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : 0);
+ LayoutNavEntry *hlEntry = root->find(kind,kind==LayoutNavEntry::UserGroup ? file : QCString());
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...
{
@@ -2487,7 +2484,7 @@ void HtmlGenerator::endQuickIndices()
m_t << "</div><!-- top -->\n";
}
-QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpath)
+QCString HtmlGenerator::writeSplitBarAsString(const QCString &name,const QCString &relpath)
{
bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
QCString result;
@@ -2518,12 +2515,12 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa
return result;
}
-void HtmlGenerator::writeSplitBar(const char *name)
+void HtmlGenerator::writeSplitBar(const QCString &name)
{
m_t << writeSplitBarAsString(name,m_relPath);
}
-void HtmlGenerator::writeNavigationPath(const char *s)
+void HtmlGenerator::writeNavigationPath(const QCString &s)
{
m_t << substitute(s,"$relpath^",m_relPath);
}
@@ -2538,7 +2535,7 @@ void HtmlGenerator::endContents()
m_t << "</div><!-- contents -->\n";
}
-void HtmlGenerator::startPageDoc(const char *pageTitle)
+void HtmlGenerator::startPageDoc(const QCString &pageTitle)
{
m_t << "<div>";
}
@@ -2548,7 +2545,7 @@ void HtmlGenerator::endPageDoc()
m_t << "</div><!-- PageDoc -->\n";
}
-void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const char *file)
+void HtmlGenerator::writeQuickLinks(bool compact,HighlightedItem hli,const QCString &file)
{
writeDefaultQuickLinks(m_t,compact,hli,file,m_relPath);
}
@@ -2610,7 +2607,7 @@ void HtmlGenerator::writeSearchPage()
t << "</script>\n";
if (!Config_getBool(DISABLE_INDEX))
{
- writeDefaultQuickLinks(t,TRUE,HLI_Search,0,"");
+ writeDefaultQuickLinks(t,TRUE,HLI_Search,QCString(),QCString());
}
else
{
@@ -2641,7 +2638,7 @@ void HtmlGenerator::writeSearchPage()
}
else
{
- err("Failed to open file '%s' for writing...\n",scriptName.data());
+ err("Failed to open file '%s' for writing...\n",qPrint(scriptName));
}
}
@@ -2666,7 +2663,7 @@ void HtmlGenerator::writeExternalSearchPage()
t << "</script>\n";
if (!Config_getBool(DISABLE_INDEX))
{
- writeDefaultQuickLinks(t,TRUE,HLI_Search,0,"");
+ writeDefaultQuickLinks(t,TRUE,HLI_Search,QCString(),QCString());
t << " <input type=\"text\" id=\"MSearchField\" name=\"query\" value=\"\" size=\"20\" accesskey=\"S\" onfocus=\"searchBox.OnSearchFieldFocus(true)\" onblur=\"searchBox.OnSearchFieldFocus(false)\"/>\n";
t << " </form>\n";
t << " </div><div class=\"right\"></div>\n";
@@ -2747,11 +2744,11 @@ void HtmlGenerator::writeExternalSearchPage()
}
else
{
- err("Failed to open file '%s' for writing...\n",scriptName.data());
+ err("Failed to open file '%s' for writing...\n",qPrint(scriptName));
}
}
-void HtmlGenerator::startConstraintList(const char *header)
+void HtmlGenerator::startConstraintList(const QCString &header)
{
m_t << "<div class=\"typeconstraint\">\n";
m_t << "<dl><dt><b>" << header << "</b></dt><dd>\n";
@@ -2796,9 +2793,9 @@ void HtmlGenerator::endConstraintList()
m_t << "</div>\n";
}
-void HtmlGenerator::lineBreak(const char *style)
+void HtmlGenerator::lineBreak(const QCString &style)
{
- if (style)
+ if (!style.isEmpty())
{
m_t << "<br class=\"" << style << "\" />\n";
}
@@ -2813,13 +2810,13 @@ void HtmlGenerator::startHeaderSection()
m_t << "<div class=\"header\">\n";
}
-void HtmlGenerator::startTitleHead(const char *)
+void HtmlGenerator::startTitleHead(const QCString &)
{
m_t << " <div class=\"headertitle\">\n";
startTitle();
}
-void HtmlGenerator::endTitleHead(const char *,const char *)
+void HtmlGenerator::endTitleHead(const QCString &,const QCString &)
{
endTitle();
m_t << " </div>\n";
@@ -2902,7 +2899,7 @@ void HtmlGenerator::startLabels()
m_t << "<span class=\"mlabels\">";
}
-void HtmlGenerator::writeLabel(const char *l,bool /*isLast*/)
+void HtmlGenerator::writeLabel(const QCString &l,bool /*isLast*/)
{
DBG_HTML(m_t << "<!-- writeLabel(" << l << ") -->\n";)
//m_t << "<tt>[" << l << "]</tt>";
@@ -2917,15 +2914,15 @@ void HtmlGenerator::endLabels()
}
void HtmlGenerator::writeInheritedSectionTitle(
- const char *id, const char *ref,
- const char *file, const char *anchor,
- const char *title, const char *name)
+ const QCString &id, const QCString &ref,
+ const QCString &file, const QCString &anchor,
+ const QCString &title, const QCString &name)
{
DBG_HTML(m_t << "<!-- writeInheritedSectionTitle -->\n";)
QCString a = anchor;
if (!a.isEmpty()) a.prepend("#");
QCString classLink = QCString("<a class=\"el\" ");
- if (ref)
+ if (!ref.isEmpty())
{
classLink+= externalLinkTarget();
classLink += " href=\"";
@@ -2945,7 +2942,7 @@ void HtmlGenerator::writeInheritedSectionTitle(
<< "</td></tr>\n";
}
-void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const char *title,bool first)
+void HtmlGenerator::writeSummaryLink(const QCString &file,const QCString &anchor,const QCString &title,bool first)
{
if (first)
{
@@ -2956,11 +2953,11 @@ void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const c
m_t << " &#124;\n";
}
m_t << "<a href=\"";
- if (file)
+ if (!file.isEmpty())
{
m_t << m_relPath << addHtmlExtensionIfMissing(file);
}
- else if (anchor)
+ else if (!anchor.isEmpty())
{
m_t << "#";
m_t << anchor;
@@ -2970,17 +2967,17 @@ void HtmlGenerator::writeSummaryLink(const char *file,const char *anchor,const c
m_t << "</a>";
}
-void HtmlGenerator::endMemberDeclaration(const char *anchor,const char *inheritId)
+void HtmlGenerator::endMemberDeclaration(const QCString &anchor,const QCString &inheritId)
{
- m_t << "<tr class=\"separator:" << (anchor?anchor:"");
- if (inheritId)
+ m_t << "<tr class=\"separator:" << anchor;
+ if (!inheritId.isEmpty())
{
m_t << " inherit " << inheritId;
}
m_t << "\"><td class=\"memSeparator\" colspan=\"2\">&#160;</td></tr>\n";
}
-void HtmlGenerator::setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile)
+void HtmlGenerator::setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile)
{
if (Doxygen::searchIndex)
{
@@ -2988,7 +2985,7 @@ void HtmlGenerator::setCurrentDoc(const Definition *context,const char *anchor,b
}
}
-void HtmlGenerator::addWord(const char *word,bool hiPriority)
+void HtmlGenerator::addWord(const QCString &word,bool hiPriority)
{
if (Doxygen::searchIndex)
{
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 3abb733..845f259 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -26,34 +26,34 @@ class HtmlCodeGenerator : public CodeOutputInterface
int id() const { return m_id; }
void setId(int id) { m_id = id; }
void setRelativePath(const QCString &path);
- void codify(const char *text);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *id,
+ void codify(const QCString &text);
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeTooltip(const QCString &id,
const DocLinkInfo &docInfo,
- const char *decl,
- const char *desc,
+ const QCString &decl,
+ const QCString &desc,
const SourceLinkInfo &defInfo,
const SourceLinkInfo &declInfo
);
- void writeLineNumber(const char *,const char *,const char *,int);
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int);
void startCodeLine(bool);
void endCodeLine();
- void startFontClass(const char *s);
+ void startFontClass(const QCString &s);
void endFontClass();
- void writeCodeAnchor(const char *anchor);
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
- void startCodeFragment(const char *style);
- void endCodeFragment(const char *);
+ void writeCodeAnchor(const QCString &anchor);
+ void setCurrentDoc(const Definition *,const QCString &,bool) {}
+ void addWord(const QCString &,bool) {}
+ void startCodeFragment(const QCString &style);
+ void endCodeFragment(const QCString &);
private:
- void _writeCodeLink(const char *className,
- const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void docify(const char *str);
+ void _writeCodeLink(const QCString &className,
+ const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void docify(const QCString &str);
TextStream &m_t;
int m_col = 0;
QCString m_relPath;
@@ -74,69 +74,69 @@ class HtmlGenerator : public OutputGenerator
virtual OutputType type() const { return Html; }
static void init();
static void writeStyleSheetFile(TextStream &t);
- static void writeHeaderFile(TextStream &t, const char *cssname);
+ static void writeHeaderFile(TextStream &t, const QCString &cssname);
static void writeFooterFile(TextStream &t);
static void writeTabData();
static void writeSearchInfo(TextStream &t,const QCString &relPath);
- static void writeSearchData(const char *dir);
+ static void writeSearchData(const QCString &dir);
static void writeSearchPage();
static void writeExternalSearchPage();
- static QCString writeLogoAsString(const char *path);
- static QCString writeSplitBarAsString(const char *name,const char *relpath);
+ static QCString writeLogoAsString(const QCString &path);
+ static QCString writeSplitBarAsString(const QCString &name,const QCString &relpath);
// ---- CodeOutputInterface
- void codify(const char *text)
+ void codify(const QCString &text)
{ m_codeGen.codify(text); }
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{ m_codeGen.writeCodeLink(ref,file,anchor,name,tooltip); }
- void writeLineNumber(const char *ref,const char *file,const char *anchor,int lineNumber)
+ void writeLineNumber(const QCString &ref,const QCString &file,const QCString &anchor,int lineNumber)
{ m_codeGen.writeLineNumber(ref,file,anchor,lineNumber); }
- void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl,
- const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
+ void writeTooltip(const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
)
{ m_codeGen.writeTooltip(id,docInfo,decl,desc,defInfo,declInfo); }
void startCodeLine(bool hasLineNumbers)
{ m_codeGen.startCodeLine(hasLineNumbers); }
void endCodeLine()
{ m_codeGen.endCodeLine(); }
- void startFontClass(const char *s)
+ void startFontClass(const QCString &s)
{ m_codeGen.startFontClass(s); }
void endFontClass()
{ m_codeGen.endFontClass(); }
- void writeCodeAnchor(const char *anchor)
+ void writeCodeAnchor(const QCString &anchor)
{ m_codeGen.writeCodeAnchor(anchor); }
- void startCodeFragment(const char *style)
+ void startCodeFragment(const QCString &style)
{ m_codeGen.startCodeFragment(style); }
- void endCodeFragment(const char *style)
+ void endCodeFragment(const QCString &style)
{ m_codeGen.endCodeFragment(style); }
// ---------------------------
- void setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile);
- void addWord(const char *word,bool hiPriority);
+ void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile);
+ void addWord(const QCString &word,bool hiPriority);
void writeDoc(DocNode *,const Definition *,const MemberDef *,int id);
- void startFile(const char *name,const char *manName,const char *title,int id);
- void writeFooter(const char *navPath);
+ void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
+ void writeFooter(const QCString &navPath);
void endFile();
void clearBuffer();
void writeSearchInfo();
void startIndexSection(IndexSections) {}
void endIndexSection(IndexSections) {}
- void writePageLink(const char *,bool) {}
+ void writePageLink(const QCString &,bool) {}
void startProjectNumber();
void endProjectNumber();
void writeStyleInfo(int part);
- void startTitleHead(const char *);
- void endTitleHead(const char *,const char *);
+ void startTitleHead(const QCString &);
+ void endTitleHead(const QCString &,const QCString &);
void startTitle() { m_t << "<div class=\"title\">"; }
void endTitle() { m_t << "</div>"; }
- void startParagraph(const char *classDef);
+ void startParagraph(const QCString &classDef);
void endParagraph();
- void writeString(const char *text);
+ void writeString(const QCString &text);
void startIndexListItem();
void endIndexListItem();
void startIndexList();
@@ -144,19 +144,19 @@ class HtmlGenerator : public OutputGenerator
void startIndexKey();
void endIndexKey();
void startIndexValue(bool);
- void endIndexValue(const char *,bool);
+ void endIndexValue(const QCString &,bool);
void startItemList() { m_t << "<ul>\n"; }
void endItemList() { m_t << "</ul>\n"; }
- void startIndexItem(const char *ref,const char *file);
- void endIndexItem(const char *ref,const char *file);
- void docify(const char *text);
+ void startIndexItem(const QCString &ref,const QCString &file);
+ void endIndexItem(const QCString &ref,const QCString &file);
+ void docify(const QCString &text);
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor,const char *name);
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name);
- void startTextLink(const char *file,const char *anchor);
+ void startTextLink(const QCString &file,const QCString &anchor);
void endTextLink();
- void startHtmlLink(const char *url);
+ void startHtmlLink(const QCString &url);
void endHtmlLink();
void startTypewriter() { m_t << "<code>"; }
void endTypewriter() { m_t << "</code>"; }
@@ -169,7 +169,7 @@ class HtmlGenerator : public OutputGenerator
void endMemberSections();
void startHeaderSection();
void endHeaderSection();
- void startMemberHeader(const char *, int);
+ void startMemberHeader(const QCString &, int);
void endMemberHeader();
void startMemberSubtitle();
void endMemberSubtitle();
@@ -181,10 +181,10 @@ class HtmlGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int) {}
void endAnonTypeScope(int) {}
- void startMemberItem(const char *anchor,int,const char *inheritId);
+ void startMemberItem(const QCString &anchor,int,const QCString &inheritId);
void endMemberItem();
void startMemberTemplateParams();
- void endMemberTemplateParams(const char *anchor,const char *inheritId);
+ void endMemberTemplateParams(const QCString &anchor,const QCString &inheritId);
void startCompoundTemplateParams();
void endCompoundTemplateParams();
@@ -197,16 +197,16 @@ class HtmlGenerator : public OutputGenerator
void insertMemberAlign(bool);
void insertMemberAlignLeft(int,bool);
- void startMemberDescription(const char *anchor,const char *inheritId, bool typ);
+ void startMemberDescription(const QCString &anchor,const QCString &inheritId, bool typ);
void endMemberDescription();
void startMemberDeclaration() {}
- void endMemberDeclaration(const char *anchor,const char *inheritId);
- void writeInheritedSectionTitle(const char *id, const char *ref,
- const char *file, const char *anchor,
- const char *title,const char *name);
+ void endMemberDeclaration(const QCString &anchor,const QCString &inheritId);
+ void writeInheritedSectionTitle(const QCString &id, const QCString &ref,
+ const QCString &file, const QCString &anchor,
+ const QCString &title,const QCString &name);
void writeRuler() { m_t << "<hr/>"; }
- void writeAnchor(const char *,const char *name)
+ void writeAnchor(const QCString &,const QCString &name)
{ m_t << "<a name=\"" << name <<"\" id=\"" << name << "\"></a>"; }
void startEmphasis() { m_t << "<em>"; }
void endEmphasis() { m_t << "</em>"; }
@@ -218,20 +218,20 @@ class HtmlGenerator : public OutputGenerator
void endDescItem() { m_t << "</dt>"; }
void startDescForItem() { m_t << "<dd>"; }
void endDescForItem() { m_t << "</dd>\n"; }
- void lineBreak(const char *style);
+ void lineBreak(const QCString &style);
void writeChar(char c);
- void startMemberDoc(const char *clName, const char *memName,
- const char *anchor, const char *title,
+ void startMemberDoc(const QCString &clName, const QCString &memName,
+ const QCString &anchor, const QCString &title,
int memCount, int memTotal, bool showInline);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor,const char *name,
- const char *args);
- void endDoxyAnchor(const char *fName,const char *anchor);
+ void startDoxyAnchor(const QCString &fName,const QCString &manName,
+ const QCString &anchor,const QCString &name,
+ const QCString &args);
+ void endDoxyAnchor(const QCString &fName,const QCString &anchor);
void writeLatexSpacing() {}
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name);
- void writeEndAnnoItem(const char *) { m_t << "\n"; }
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name);
+ void writeEndAnnoItem(const QCString &) { m_t << "\n"; }
void startSubsection() { m_t << "<h2>"; }
void endSubsection() { m_t << "</h2>\n"; }
void startSubsubsection() { m_t << "<h3>"; }
@@ -242,32 +242,32 @@ class HtmlGenerator : public OutputGenerator
void endSmall() { m_t << "</small>\n"; }
void startExamples();
void endExamples();
- void startParamList(ParamListTypes,const char *);
+ void startParamList(ParamListTypes,const QCString &);
void endParamList();
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void addIndexItem(const char *,const char *);
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void addIndexItem(const QCString &,const QCString &);
void startIndent();
void endIndent();
void writeSynopsis() {}
void startClassDiagram();
- void endClassDiagram(const ClassDiagram &,const char *,const char *);
+ void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &);
void startPageRef() {}
- void endPageRef(const char *,const char *) {}
+ void endPageRef(const QCString &,const QCString &) {}
void startQuickIndices() {}
void endQuickIndices();
- void writeSplitBar(const char *name);
- void writeNavigationPath(const char *s);
+ void writeSplitBar(const QCString &name);
+ void writeNavigationPath(const QCString &s);
void writeLogo();
- void writeQuickLinks(bool compact,HighlightedItem hli,const char *file);
- void writeSummaryLink(const char *file,const char *anchor,const char *title,bool first);
+ void writeQuickLinks(bool compact,HighlightedItem hli,const QCString &file);
+ void writeSummaryLink(const QCString &file,const QCString &anchor,const QCString &title,bool first);
void startContents();
void endContents();
- void startPageDoc(const char *pageTitle);
+ void startPageDoc(const QCString &pageTitle);
void endPageDoc();
void writeNonBreakableSpace(int);
- void startDescTable(const char *title);
+ void startDescTable(const QCString &title);
void endDescTable();
void startDescTableRow();
void endDescTableRow();
@@ -298,15 +298,15 @@ class HtmlGenerator : public OutputGenerator
void endMemberDocPrefixItem();
void startMemberDocName(bool);
void endMemberDocName();
- void startParameterType(bool first,const char *key);
+ void startParameterType(bool first,const QCString &key);
void endParameterType();
void startParameterName(bool);
void endParameterName(bool last,bool emptyList,bool closeBracket);
void startParameterList(bool);
void endParameterList();
- virtual void exceptionEntry(const char*,bool);
+ void exceptionEntry(const QCString &,bool);
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -325,7 +325,7 @@ class HtmlGenerator : public OutputGenerator
void endInlineMemberDoc();
void startLabels();
- void writeLabel(const char *l,bool isLast);
+ void writeLabel(const QCString &l,bool isLast);
void endLabels();
private:
@@ -333,7 +333,7 @@ class HtmlGenerator : public OutputGenerator
QCString m_lastTitle;
QCString m_lastFile;
QCString m_relPath;
- void docify(const char *text,bool inHtmlComment);
+ void docify(const QCString &text,bool inHtmlComment);
int m_sectionCount = 0;
bool m_emptySection = false;
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index b6816b8..1672b69 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -49,12 +49,12 @@ class HtmlHelpRecoder
void initialize()
{
- const char *str = Config_getString(CHM_INDEX_ENCODING);
- if (!str) str = "CP1250"; // use safe and likely default
+ QCString str = Config_getString(CHM_INDEX_ENCODING);
+ if (str.isEmpty()) str = "CP1250"; // use safe and likely default
m_fromUtf8 = portable_iconv_open(str,"UTF-8");
if (m_fromUtf8==m_iconv_null)
{
- term("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", str);
+ term("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", qPrint(str));
}
}
void finalize()
@@ -98,7 +98,7 @@ class HtmlHelpRecoder
/** Class representing a field in the HTML help index. */
struct IndexField
{
- IndexField(const char *k,const char *n,const char *u,const char *a,bool l,bool r) :
+ IndexField(const QCString &k,const QCString &n,const QCString &u,const QCString &a,bool l,bool r) :
key(k), name(n), url(u), anchor(a), link(l), reversed(r) {}
QCString key;
QCString name;
@@ -116,8 +116,8 @@ class HtmlHelpIndex
public:
HtmlHelpIndex(HtmlHelpRecoder &recoder);
~HtmlHelpIndex();
- void addItem(const char *first,const char *second,
- const char *url, const char *anchor,
+ void addItem(const QCString &first,const QCString &second,
+ const QCString &url, const QCString &anchor,
bool hasLink,bool reversed);
void writeFields(std::ostream &t);
size_t size() const { return m_map.size(); }
@@ -149,21 +149,21 @@ HtmlHelpIndex::~HtmlHelpIndex()
* \param reversed TRUE if level1 is the member name and level2 the compound
* name.
*/
-void HtmlHelpIndex::addItem(const char *level1,const char *level2,
- const char *url,const char *anchor,bool hasLink,
+void HtmlHelpIndex::addItem(const QCString &level1,const QCString &level2,
+ const QCString &url,const QCString &anchor,bool hasLink,
bool reversed)
{
static const reg::Ex re(R"(@\d+)");
- std::string key = level1;
- if (level2) key+= std::string("?") + level2;
+ std::string key = level1.str();
+ if (!level2.isEmpty()) key+= std::string("?") + level2.str();
if (reg::search(key,re)) // skip anonymous stuff
{
return;
}
std::string key_anchor;
- if (anchor)
+ if (!anchor.isEmpty())
{
- key_anchor = key+anchor;
+ key_anchor = key+anchor.str();
}
else
{
@@ -447,7 +447,7 @@ void HtmlHelp::initialize()
p->cts.open(fName.str(),std::ofstream::out | std::ofstream::binary);
if (!p->cts.is_open())
{
- term("Could not open file %s for writing\n",fName.data());
+ term("Could not open file %s for writing\n",qPrint(fName));
}
/* Write the header of the contents file */
p->cts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
@@ -462,7 +462,7 @@ void HtmlHelp::initialize()
p->kts.open(fName.str(),std::ofstream::out | std::ofstream::binary);
if (!p->kts.is_open())
{
- term("Could not open file %s for writing\n",fName.data());
+ term("Could not open file %s for writing\n",qPrint(fName));
}
/* Write the header of the contents file */
p->kts << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n"
@@ -482,7 +482,7 @@ QCString HtmlHelp::getLanguageString()
auto it = s_languageDict.find(theTranslator->idLanguage().str());
if (it!=s_languageDict.end())
{
- return it->second;
+ return QCString(it->second);
}
}
// default language
@@ -559,13 +559,13 @@ void HtmlHelp::Private::createProjectFile()
}
else
{
- err("Could not open file %s for writing\n",fName.data());
+ err("Could not open file %s for writing\n",qPrint(fName));
}
}
-void HtmlHelp::addIndexFile(const char *s)
+void HtmlHelp::addIndexFile(const QCString &s)
{
- p->indexFiles.insert(s);
+ p->indexFiles.insert(s.str());
}
/*! Finalizes the HTML help. This will finish and close the
@@ -626,10 +626,10 @@ void HtmlHelp::decContentsDepth()
* \param def not used.
*/
void HtmlHelp::addContentsItem(bool isDir,
- const char *name,
- const char * /*ref*/,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString & /*ref*/,
+ const QCString &file,
+ const QCString &anchor,
bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /* def */)
@@ -647,9 +647,9 @@ void HtmlHelp::addContentsItem(bool isDir,
int i; for (i=0;i<p->dc;i++) p->cts << " ";
p->cts << "<LI><OBJECT type=\"text/sitemap\">";
p->cts << "<param name=\"Name\" value=\"" << convertToHtml(p->recoder.recode(name),TRUE) << "\">";
- if (file) // made file optional param - KPW
+ if (!file.isEmpty()) // made file optional param - KPW
{
- if (file && (file[0]=='!' || file[0]=='^')) // special markers for user defined URLs
+ if (file[0]=='!' || file[0]=='^') // special markers for user defined URLs
{
p->cts << "<param name=\"";
if (file[0]=='^') p->cts << "URL"; else p->cts << "Local";
@@ -660,7 +660,7 @@ void HtmlHelp::addContentsItem(bool isDir,
{
p->cts << "<param name=\"Local\" value=\"";
p->cts << file << Doxygen::htmlFileExtension;
- if (anchor) p->cts << "#" << anchor;
+ if (!anchor.isEmpty()) p->cts << "#" << anchor;
}
p->cts << "\">";
}
@@ -679,7 +679,7 @@ void HtmlHelp::addContentsItem(bool isDir,
void HtmlHelp::addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *word)
+ const QCString &sectionAnchor,const QCString &word)
{
if (md)
{
@@ -699,19 +699,19 @@ void HtmlHelp::addIndexItem(const Definition *context,const MemberDef *md,
QCString level2 = md->name();
QCString contRef = separateMemberPages ? cfname : cfiname;
QCString memRef = cfname;
- QCString anchor = sectionAnchor ? QCString(sectionAnchor) : md->anchor();
+ QCString anchor = !sectionAnchor.isEmpty() ? sectionAnchor : md->anchor();
p->index.addItem(level1,level2,contRef,anchor,TRUE,FALSE);
p->index.addItem(level2,level1,memRef,anchor,TRUE,TRUE);
}
else if (context)
{
- QCString level1 = word ? QCString(word) : context->name();
- p->index.addItem(level1,0,context->getOutputFileBase(),sectionAnchor,TRUE,FALSE);
+ QCString level1 = !word.isEmpty() ? word : context->name();
+ p->index.addItem(level1,QCString(),context->getOutputFileBase(),sectionAnchor,TRUE,FALSE);
}
}
-void HtmlHelp::addImageFile(const char *fileName)
+void HtmlHelp::addImageFile(const QCString &fileName)
{
- p->imageFiles.insert(fileName);
+ p->imageFiles.insert(fileName.str());
}
diff --git a/src/htmlhelp.h b/src/htmlhelp.h
index 421320e..9d8eea5 100644
--- a/src/htmlhelp.h
+++ b/src/htmlhelp.h
@@ -66,18 +66,18 @@ class HtmlHelp : public IndexIntf
void incContentsDepth();
void decContentsDepth();
void addContentsItem(bool isDir,
- const char *name,
- const char *ref,
- const char *file,
- const char *anchor,
+ const QCString &name,
+ const QCString &ref,
+ const QCString &file,
+ const QCString &anchor,
bool separateIndex,
bool addToNavIndex,
const Definition *def);
void addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor, const char *title);
- void addIndexFile(const char *name);
- void addImageFile(const char *);
- void addStyleSheetFile(const char *) {}
+ const QCString &sectionAnchor, const QCString &title);
+ void addIndexFile(const QCString &name);
+ void addImageFile(const QCString &);
+ void addStyleSheetFile(const QCString &) {}
static QCString getLanguageString();
private:
diff --git a/src/image.cpp b/src/image.cpp
index 033332f..0b353a9 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -297,12 +297,13 @@ void Image::writeChar(uint x,uint y,char c,uchar fg)
}
}
-void Image::writeString(uint x,uint y,const char *s,uchar fg)
+void Image::writeString(uint x,uint y,const QCString &s,uchar fg)
{
- if (s)
+ if (!s.isEmpty())
{
+ const char *p = s.data();
char c;
- while ((c=*s++))
+ while ((c=*p++))
{
writeChar(x,y,c,fg);
x+=charWidth[c-' '];
@@ -310,13 +311,14 @@ void Image::writeString(uint x,uint y,const char *s,uchar fg)
}
}
-uint Image::stringLength(const char *s)
+uint Image::stringLength(const QCString &s)
{
uint w=0;
- if (s)
+ if (!s.isEmpty())
{
+ const char *p = s.data();
char c;
- while ((c=*s++)) w+=charWidth[c-' '];
+ while ((c=*p++)) w+=charWidth[c-' '];
}
return w;
}
@@ -379,7 +381,7 @@ void Image::fillRect(uint x,uint y,uint width,uint height,uchar colIndex,uint ma
setPixel(xp,yp,colIndex);
}
-bool Image::save(const char *fileName,int mode)
+bool Image::save(const QCString &fileName,int mode)
{
static bool useTransparency = Config_getBool(FORMULA_TRANSPARENT);
uchar* buffer;
@@ -399,7 +401,7 @@ bool Image::save(const char *fileName,int mode)
encoder.infoPng.color.colorType = 3;
encoder.infoRaw.color.colorType = 3;
LodePNG_encode(&encoder, &buffer, &bufferSize, m_data, m_width, m_height);
- LodePNG_saveFile(buffer, bufferSize, fileName);
+ LodePNG_saveFile(buffer, bufferSize, fileName.data());
free(buffer);
LodePNG_Encoder_cleanup(&encoder);
return TRUE;
@@ -504,7 +506,7 @@ ColoredImage::~ColoredImage()
free(m_data);
}
-bool ColoredImage::save(const char *fileName)
+bool ColoredImage::save(const QCString &fileName)
{
uchar *buffer;
size_t bufferSize;
@@ -513,7 +515,7 @@ bool ColoredImage::save(const char *fileName)
encoder.infoPng.color.colorType = m_hasAlpha ? 6 : 2; // 2=RGB 24 bit, 6=RGBA 32 bit
encoder.infoRaw.color.colorType = 6; // 6=RGBA 32 bit
LodePNG_encode(&encoder, &buffer, &bufferSize, m_data, m_width, m_height);
- LodePNG_saveFile(buffer, bufferSize, fileName);
+ LodePNG_saveFile(buffer, bufferSize, fileName.data());
LodePNG_Encoder_cleanup(&encoder);
free(buffer);
return TRUE;
diff --git a/src/image.h b/src/image.h
index 6eb2c21..cbeea87 100644
--- a/src/image.h
+++ b/src/image.h
@@ -20,6 +20,7 @@
#define _IMAGE_H
#include "types.h"
+#include "qcstring.h"
/** Class representing a bitmap image generated by doxygen. */
class Image
@@ -31,19 +32,19 @@ class Image
void setPixel(uint x,uint y,uchar val);
uchar getPixel(uint x,uint y) const;
void writeChar(uint x,uint y,char c,uchar fg);
- void writeString(uint x,uint y,const char *s,uchar fg);
+ void writeString(uint x,uint y,const QCString &s,uchar fg);
void drawHorzLine(uint y,uint xs,uint xe,uchar colIndex,uint mask);
void drawHorzArrow(uint y,uint xs,uint xe,uchar colIndex,uint mask);
void drawVertLine(uint x,uint ys,uint ye,uchar colIndex,uint mask);
void drawVertArrow(uint x,uint ys,uint ye,uchar colIndex,uint mask);
void drawRect(uint x,uint y,uint width,uint height,uchar colIndex,uint mask);
void fillRect(uint x,uint y,uint width,uint height,uchar colIndex,uint mask);
- bool save(const char *fileName,int mode=0);
- friend uint stringLength(const char *s);
+ bool save(const QCString &fileName,int mode=0);
+ friend uint stringLength(const QCString &s);
uint width() const { return m_width; }
uint height() const { return m_height; }
uchar *data() const { return m_data; }
- static uint stringLength(const char *s);
+ static uint stringLength(const QCString &s);
private:
uint m_width;
@@ -59,7 +60,7 @@ class ColoredImage
const uchar *greyLevels,const uchar *alphaLevels,
int saturation,int hue,int gamma);
~ColoredImage();
- bool save(const char *fileName);
+ bool save(const QCString &fileName);
static void hsl2rgb(double h,double s,double l,
double *pRed,double *pGreen,double *pBlue);
private:
diff --git a/src/index.cpp b/src/index.cpp
index 64b6492..1497aad 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -190,7 +190,7 @@ static void endQuickIndexList(OutputList &ol)
ol.writeString(" </div>\n");
}
-static void startQuickIndexItem(OutputList &ol,const char *l,
+static void startQuickIndexItem(OutputList &ol,const QCString &l,
bool hl,bool compact,bool &first)
{
first=FALSE;
@@ -217,7 +217,7 @@ QCString fixSpaces(const QCString &s)
return substitute(s," ","&#160;");
}
-void startTitle(OutputList &ol,const char *fileName,const DefinitionMutable *def)
+void startTitle(OutputList &ol,const QCString &fileName,const DefinitionMutable *def)
{
ol.startHeaderSection();
if (def) def->writeSummaryLinks(ol);
@@ -226,16 +226,16 @@ void startTitle(OutputList &ol,const char *fileName,const DefinitionMutable *def
ol.disable(OutputGenerator::Man);
}
-void endTitle(OutputList &ol,const char *fileName,const char *name)
+void endTitle(OutputList &ol,const QCString &fileName,const QCString &name)
{
ol.popGeneratorState();
ol.endTitleHead(fileName,name);
ol.endHeaderSection();
}
-void startFile(OutputList &ol,const char *name,const char *manName,
- const char *title,HighlightedItem hli,bool additionalIndices,
- const char *altSidebarName)
+void startFile(OutputList &ol,const QCString &name,const QCString &manName,
+ const QCString &title,HighlightedItem hli,bool additionalIndices,
+ const QCString &altSidebarName)
{
static bool disableIndex = Config_getBool(DISABLE_INDEX);
ol.startFile(name,manName,title);
@@ -248,7 +248,7 @@ void startFile(OutputList &ol,const char *name,const char *manName,
{
ol.endQuickIndices();
}
- ol.writeSplitBar(altSidebarName ? altSidebarName : name);
+ ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name);
ol.writeSearchInfo();
}
@@ -373,7 +373,7 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
if (cd->isLinkable()) numConcepts++;
}
}
- //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",def->name().data(),hasMembers,numClasses);
+ //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
if (hasMembers || numClasses>0 || numConcepts>0)
{
Doxygen::indexList->incContentsDepth();
@@ -419,7 +419,7 @@ void addMembersToIndex(T *def,LayoutDocManager::LayoutPart part,
if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
{
Doxygen::indexList->addContentsItem(false,cd->displayName(),
- cd->getReference(),cd->getOutputFileBase(),0,
+ cd->getReference(),cd->getOutputFileBase(),QCString(),
addToIndex,
false,
cd);
@@ -477,10 +477,10 @@ static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int l
//printf("Passed...\n");
bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
classHasVisibleChildren(cd);
- //printf("tree4: Has children %s: %d\n",cd->name().data(),hasChildren);
+ //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
if (cd->isLinkable())
{
- //printf("Writing class %s\n",cd->displayName().data());
+ //printf("Writing class %s\n",qPrint(cd->displayName()));
ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
ol.parseText(cd->displayName());
ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
@@ -508,21 +508,21 @@ static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int l
}
else
{
- ol.startIndexItem(0,0);
+ ol.startIndexItem(QCString(),QCString());
ol.parseText(cd->name());
- ol.endIndexItem(0,0);
+ ol.endIndexItem(QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),0,0,0);
+ Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString());
}
if (ftv)
{
- ftv->addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE,cd);
+ ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd);
}
}
if (hasChildren)
{
- //printf("Class %s at %p visited=%d\n",cd->name().data(),cd,cd->visited);
+ //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
visitedClasses.insert(cd);
if (cd->getLanguage()==SrcLangExt_VHDL)
{
@@ -586,7 +586,7 @@ static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHel
{
warn(dd->getDefFileName(),dd->getDefLine(),
"maximum nesting level exceeded for directory %s: "
- "check for possible recursive directory relation!\n",dd->name().data()
+ "check for possible recursive directory relation!\n",qPrint(dd->name())
);
return;
}
@@ -601,16 +601,16 @@ static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHel
(tocExpand && // or toc expand and
!dd->getFiles().empty() // there are files
);
- //printf("gd='%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
+ //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
if (ftv)
{
ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
- dd->getOutputFileBase(),0,FALSE,TRUE,dd);
+ dd->getOutputFileBase(),QCString(),FALSE,TRUE,dd);
ftv->incContentsDepth();
}
@@ -682,7 +682,7 @@ static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHel
ftv->addContentsItem(FALSE,
fd->displayName(),
reference,outputBase,
- 0,FALSE,FALSE,fd);
+ QCString(),FALSE,FALSE,fd);
}
}
}
@@ -709,8 +709,8 @@ static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHel
else if (src)
{
Doxygen::indexList->addContentsItem(
- FALSE, fd->name(), 0,
- fd->getSourceFileBase(), 0, FALSE, TRUE, fd);
+ FALSE, fd->name(), QCString(),
+ fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd);
}
}
}
@@ -765,7 +765,7 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
if (doc || src)
{
ftv->addContentsItem(FALSE,fd->displayName(),
- reference, outputBase, 0,
+ reference, outputBase, QCString(),
FALSE,FALSE,fd.get());
}
if (addToIndex)
@@ -777,8 +777,8 @@ static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
else if (src)
{
Doxygen::indexList->addContentsItem(
- FALSE, fd->name(), 0,
- fd->getSourceFileBase(), 0, FALSE, TRUE, fd.get());
+ FALSE, fd->name(), QCString(),
+ fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd.get());
}
}
}
@@ -802,7 +802,7 @@ static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &
for (const auto &cd : cl)
{
//printf("class %s hasVisibleRoot=%d isVisibleInHierarchy=%d\n",
- // cd->name().data(),
+ // qPrint(cd->name()),
// hasVisibleRoot(cd->baseClasses()),
// cd->isVisibleInHierarchy()
// );
@@ -840,11 +840,11 @@ static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &
ol.startIndexListItem();
bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
classHasVisibleChildren(cd.get());
- //printf("list: Has children %s: %d\n",cd->name().data(),hasChildren);
+ //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
if (cd->isLinkable())
{
//printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->templateMaster()=%p\n",
- // cd->displayName().data(),cd->isLinkable(),cd->isLinkableInProject(),cd->templateMaster());
+ // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->templateMaster());
ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
ol.parseText(cd->displayName());
ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
@@ -866,16 +866,16 @@ static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &
}
else
{
- ol.startIndexItem(0,0);
+ ol.startIndexItem(QCString(),QCString());
ol.parseText(cd->displayName());
- ol.endIndexItem(0,0);
+ ol.endIndexItem(QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE);
+ Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE);
}
if (ftv)
{
- ftv->addContentsItem(hasChildren,cd->displayName(),0,0,0,FALSE,FALSE,cd.get());
+ ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd.get());
}
}
if (cd->getLanguage()==SrcLangExt_VHDL && hasChildren)
@@ -967,10 +967,10 @@ static void writeHierarchicalIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"hierarchy",0, title, HLI_ClassHierarchy);
- startTitle(ol,0);
+ startFile(ol,"hierarchy",QCString(), title, HLI_ClassHierarchy);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
@@ -981,7 +981,7 @@ static void writeHierarchicalIndex(OutputList &ol)
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Docbook);
ol.startParagraph();
- ol.startTextLink("inherits",0);
+ ol.startTextLink("inherits",QCString());
ol.parseText(theTranslator->trGotoGraphicalHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1014,7 +1014,7 @@ static void writeHierarchicalIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"hierarchy",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"hierarchy",QCString(),TRUE,TRUE);
}
FTVHelp* ftv = new FTVHelp(FALSE);
writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Class);
@@ -1043,14 +1043,14 @@ static void writeGraphicalClassHierarchy(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
- startFile(ol,"inherits",0,title,HLI_ClassHierarchy,FALSE,"hierarchy");
- startTitle(ol,0);
+ startFile(ol,"inherits",QCString(),title,HLI_ClassHierarchy,FALSE,"hierarchy");
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.startParagraph();
- ol.startTextLink("hierarchy",0);
+ ol.startTextLink("hierarchy",QCString());
ol.parseText(theTranslator->trGotoTextualHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1074,10 +1074,10 @@ static void writeHierarchicalInterfaceIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"interfacehierarchy",0, title, HLI_InterfaceHierarchy);
- startTitle(ol,0);
+ startFile(ol,"interfacehierarchy",QCString(), title, HLI_InterfaceHierarchy);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
@@ -1086,7 +1086,7 @@ static void writeHierarchicalInterfaceIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.startParagraph();
- ol.startTextLink("interfaceinherits",0);
+ ol.startTextLink("interfaceinherits",QCString());
ol.parseText(theTranslator->trGotoGraphicalHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1120,7 +1120,7 @@ static void writeHierarchicalInterfaceIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"interfacehierarchy",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"interfacehierarchy",QCString(),TRUE,TRUE);
}
FTVHelp* ftv = new FTVHelp(FALSE);
writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Interface);
@@ -1149,14 +1149,14 @@ static void writeGraphicalInterfaceHierarchy(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
- startFile(ol,"interfaceinherits",0,title,HLI_InterfaceHierarchy,FALSE,"interfacehierarchy");
- startTitle(ol,0);
+ startFile(ol,"interfaceinherits",QCString(),title,HLI_InterfaceHierarchy,FALSE,"interfacehierarchy");
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.startParagraph();
- ol.startTextLink("interfacehierarchy",0);
+ ol.startTextLink("interfacehierarchy",QCString());
ol.parseText(theTranslator->trGotoTextualHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1180,10 +1180,10 @@ static void writeHierarchicalExceptionIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"exceptionhierarchy",0, title, HLI_ExceptionHierarchy);
- startTitle(ol,0);
+ startFile(ol,"exceptionhierarchy",QCString(), title, HLI_ExceptionHierarchy);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
@@ -1192,7 +1192,7 @@ static void writeHierarchicalExceptionIndex(OutputList &ol)
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.startParagraph();
- ol.startTextLink("exceptioninherits",0);
+ ol.startTextLink("exceptioninherits",QCString());
ol.parseText(theTranslator->trGotoGraphicalHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1226,7 +1226,7 @@ static void writeHierarchicalExceptionIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"exceptionhierarchy",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
}
FTVHelp* ftv = new FTVHelp(FALSE);
writeClassHierarchy(ol,ftv,addToIndex,ClassDef::Exception);
@@ -1255,14 +1255,14 @@ static void writeGraphicalExceptionHierarchy(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
- startFile(ol,"exceptioninherits",0,title,HLI_ExceptionHierarchy,FALSE,"exceptionhierarchy");
- startTitle(ol,0);
+ startFile(ol,"exceptioninherits",QCString(),title,HLI_ExceptionHierarchy,FALSE,"exceptionhierarchy");
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.startParagraph();
- ol.startTextLink("exceptionhierarchy",0);
+ ol.startTextLink("exceptionhierarchy",QCString());
ol.parseText(theTranslator->trGotoTextualHierarchy());
ol.endTextLink();
ol.endParagraph();
@@ -1299,7 +1299,7 @@ static void countFiles(int &htmlFiles,int &files)
static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
{
- //printf("Found filedef %s\n",fd->name().data());
+ //printf("Found filedef %s\n",qPrint(fd->name()));
bool doc = fd->isLinkableInProject();
bool src = fd->generateSourceFile();
bool nameOk = !fd->isDocumentationFile();
@@ -1308,7 +1308,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
QCString path;
if (Config_getBool(FULL_PATH_NAMES))
{
- path=stripFromPath(fd->getPath().copy());
+ path=stripFromPath(fd->getPath());
}
QCString fullName=fd->name();
if (!path.isEmpty())
@@ -1321,7 +1321,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
ol.docify(path);
if (doc)
{
- ol.writeObjectLink(0,fd->getOutputFileBase(),0,fd->name());
+ ol.writeObjectLink(QCString(),fd->getOutputFileBase(),QCString(),fd->name());
//if (addToIndex)
//{
// addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
@@ -1334,7 +1334,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
ol.endBold();
//if (addToIndex)
//{
- // Doxygen::indexList->addContentsItem(FALSE,fullName,0,0,0);
+ // Doxygen::indexList->addContentsItem(FALSE,fullName,QCString(),QCString(),QCString());
//}
}
if (src)
@@ -1342,7 +1342,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.docify(" ");
- ol.startTextLink(fd->includeName(),0);
+ ol.startTextLink(fd->includeName(),QCString());
ol.docify("[");
ol.parseText(theTranslator->trCode());
ol.docify("]");
@@ -1361,7 +1361,7 @@ static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
fd->briefDescription(TRUE),
FALSE, // index words
FALSE, // isExample
- 0, // example name
+ QCString(), // example name
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
@@ -1390,20 +1390,20 @@ static void writeFileIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trFileList();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"files",0,title,HLI_Files);
- startTitle(ol,0);
+ startFile(ol,"files",QCString(),title,HLI_Files);
+ startTitle(ol,QCString());
//if (!Config_getString(PROJECT_NAME).isEmpty())
//{
// title.prepend(Config_getString(PROJECT_NAME)+" ");
//}
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"files",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"files",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
@@ -1550,7 +1550,7 @@ static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool
if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS)
{
QCString n=cd->name();
- cdm->setClassName(n.data());
+ cdm->setClassName(n);
}
}
@@ -1633,7 +1633,7 @@ static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
{
for (const auto &md : *ml)
{
- //printf(" member %s visible=%d\n",md->name().data(),memberVisibleInIndex(md));
+ //printf(" member %s visible=%d\n",qPrint(md->name()),memberVisibleInIndex(md));
if (memberVisibleInIndex(md))
{
writeMemberToIndex(nd,md,addToIndex);
@@ -1661,7 +1661,7 @@ static void writeNamespaceTreeElement(const NamespaceDef *nd,FTVHelp *ftv,
bool isLinkable = nd->isLinkableInProject();
int visibleMembers = countVisibleMembers(nd);
- //printf("namespace %s hasChildren=%d visibleMembers=%d\n",nd->name().data(),hasChildren,visibleMembers);
+ //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
QCString ref;
QCString file;
@@ -1678,7 +1678,7 @@ static void writeNamespaceTreeElement(const NamespaceDef *nd,FTVHelp *ftv,
bool isDir = hasChildren || visibleMembers>0;
if ((isLinkable) || isDir)
{
- ftv->addContentsItem(hasChildren,nd->localName(),ref,file,0,FALSE,nd->partOfGroups().empty(),nd);
+ ftv->addContentsItem(hasChildren,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
if (addToIndex)
{
@@ -1738,7 +1738,7 @@ static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHelp
bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
bool isLinkable = nd->isLinkableInProject();
- //printf("namespace %s isDir=%d\n",nd->name().data(),isDir);
+ //printf("namespace %s isDir=%d\n",qPrint(nd->name()),isDir);
QCString ref;
QCString file;
@@ -1754,7 +1754,7 @@ static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHelp
if (isDir)
{
- ftv->addContentsItem(isDir,nd->localName(),ref,file,0,FALSE,TRUE,nd);
+ ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
if (addToIndex)
{
@@ -1828,10 +1828,10 @@ static void writeNamespaceIndex(OutputList &ol)
if (lne==0) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"namespaces",0,title,HLI_Namespaces);
- startTitle(ol,0);
+ startFile(ol,"namespaces",QCString(),title,HLI_Namespaces);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
@@ -1858,11 +1858,11 @@ static void writeNamespaceIndex(OutputList &ol)
ol.startIndexKey();
if (nd->getLanguage()==SrcLangExt_VHDL)
{
- ol.writeObjectLink(0, nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),0,nd->displayName());
+ ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
}
else
{
- ol.writeObjectLink(0,nd->getOutputFileBase(),0,nd->displayName());
+ ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
}
ol.endIndexKey();
@@ -1877,7 +1877,7 @@ static void writeNamespaceIndex(OutputList &ol)
nd->briefDescription(TRUE),
FALSE, // index words
FALSE, // isExample
- 0, // example name
+ QCString(), // example name
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
@@ -1901,7 +1901,7 @@ static void writeNamespaceIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"namespaces",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"namespaces",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
FTVHelp* ftv = new FTVHelp(FALSE);
@@ -1991,10 +1991,10 @@ static void writeAnnotatedClassList(OutputList &ol,ClassDef::CompoundType ct)
if (cd->getLanguage()==SrcLangExt_VHDL)
{
QCString prot= VhdlDocGen::getProtectionName((VhdlDocGen::VhdlClasses)cd->protection());
- ol.docify(prot.data());
+ ol.docify(prot);
ol.writeString(" ");
}
- ol.writeObjectLink(0,cd->getOutputFileBase(),cd->anchor(),cd->displayName());
+ ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
ol.endIndexKey();
bool hasBrief = !cd->briefDescription().isEmpty();
ol.startIndexValue(hasBrief);
@@ -2006,7 +2006,7 @@ static void writeAnnotatedClassList(OutputList &ol,ClassDef::CompoundType ct)
cd->briefDescription(TRUE),
FALSE, // indexWords
FALSE, // isExample
- 0, // example name
+ QCString(), // example name
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
@@ -2029,10 +2029,10 @@ inline bool isId1(int c)
return (c<127 && c>31); // printable ASCII character
}
-static QCString letterToLabel(const char *startLetter)
+static QCString letterToLabel(const QCString &startLetter)
{
- const char *p = startLetter;
- if (startLetter==0 || *startLetter==0) return "";
+ if (startLetter.isEmpty()) return startLetter;
+ const char *p = startLetter.data();
char c = *p;
QCString result;
if (isId1(c))
@@ -2113,9 +2113,9 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
if (!first) alphaLinks += "&#160;|&#160;";
first=false;
QCString li = letterToLabel(letter.c_str());
- alphaLinks += (QCString)"<a class=\"qindex\" href=\"#letter_" +
+ alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
li + "\">" +
- letter + "</a>";
+ QCString(letter) + "</a>";
}
alphaLinks += "</div>\n";
ol.writeString(alphaLinks);
@@ -2214,7 +2214,7 @@ static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct
if (nd && nd->isLinkable())
{
ol.writeObjectLink(nd->getReference(),
- nd->getOutputFileBase(),0,nsDispName);
+ nd->getOutputFileBase(),QCString(),nsDispName);
}
else
{
@@ -2242,15 +2242,15 @@ static void writeAlphabeticalIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"classes",0,title,HLI_Classes);
+ startFile(ol,"classes",QCString(),title,HLI_Classes);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,title,0,"classes",0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
}
ol.startContents();
@@ -2271,15 +2271,15 @@ static void writeAlphabeticalInterfaceIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"interfaces",0,title,HLI_Interfaces);
+ startFile(ol,"interfaces",QCString(),title,HLI_Interfaces);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,title,0,"interfaces",0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
}
ol.startContents();
@@ -2300,15 +2300,15 @@ static void writeAlphabeticalStructIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trStructIndex();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"structs",0,title,HLI_Structs);
+ startFile(ol,"structs",QCString(),title,HLI_Structs);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,title,0,"structs",0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
}
ol.startContents();
@@ -2329,15 +2329,15 @@ static void writeAlphabeticalExceptionIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"exceptions",0,title,HLI_Exceptions);
+ startFile(ol,"exceptions",QCString(),title,HLI_Exceptions);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,title,0,"exceptions",0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
}
ol.startContents();
@@ -2392,11 +2392,11 @@ static void writeAnnotatedIndexGeneric(OutputList &ol,const AnnotatedIndexContex
QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,ctx.fileBaseName,0,title,ctx.hiItem);
+ startFile(ol,ctx.fileBaseName,QCString(),title,ctx.hiItem);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
@@ -2425,7 +2425,7 @@ static void writeAnnotatedIndexGeneric(OutputList &ol,const AnnotatedIndexContex
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,ctx.fileBaseName,0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
FTVHelp ftv(false);
@@ -2504,7 +2504,7 @@ static void writeAnnotatedExceptionIndex(OutputList &ol)
}
//----------------------------------------------------------------------------
-static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const char *separator,
+static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
QCString &prevClassName)
{
const ClassDef *cd=md->getClassDef();
@@ -2518,7 +2518,7 @@ static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const cha
}
}
-static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const char *separator,
+static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
QCString &prevFileName)
{
const FileDef *fd=md->getFileDef();
@@ -2532,7 +2532,7 @@ static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const char
}
}
-static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const char *separator,
+static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
QCString &prevNamespaceName)
{
const NamespaceDef *nd=md->getNamespaceDef();
@@ -2553,7 +2553,7 @@ static void writeMemberList(OutputList &ol,bool useSections,const std::string &p
int index = (int)type;
ASSERT(index<3);
- typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const char *separator,
+ typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
QCString &prevNamespaceName);
// each index tab has its own write function
@@ -2594,7 +2594,7 @@ static void writeMemberList(OutputList &ol,bool useSections,const std::string &p
(md->isFunction() || md->isSlot() || md->isSignal());
QCString name=md->name();
int startIndex = getPrefixIndex(name);
- if (QCString(name.data()+startIndex)!=prevName) // new entry
+ if (name.data()+startIndex!=prevName) // new entry
{
if ((prevName.isEmpty() ||
tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
@@ -2940,7 +2940,7 @@ static void writeQuickMemberIndex(OutputList &ol,
/** Helper class representing a class member in the navigation menu. */
struct CmhlInfo
{
- CmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
+ CmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
const char *fname;
QCString title;
};
@@ -2990,8 +2990,8 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,0,
- getCmhlInfo(hl)->fname,0,multiPageIndex,TRUE);
+ Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
+ getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
if (multiPageIndex) Doxygen::indexList->incContentsDepth();
}
@@ -3002,23 +3002,23 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
QCString fileName = getCmhlInfo(hl)->fname;
if (multiPageIndex)
{
- QCString cs = page;
+ QCString cs(page);
if (!first)
{
fileName+="_"+letterToLabel(cs);
}
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
}
}
bool quickIndex = documentedClassMembers[hl]>maxItemsBeforeQuickIndex;
- ol.startFile(fileName+extension,0,title);
+ ol.startFile(fileName+extension,QCString(),title);
ol.startQuickIndices();
if (!disableIndex)
{
- ol.writeQuickLinks(TRUE,HLI_Functions,0);
+ ol.writeQuickLinks(TRUE,HLI_Functions,QCString());
if (!Config_getBool(HTML_DYNAMIC_MENUS))
{
@@ -3039,7 +3039,7 @@ static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight h
startQuickIndexItem(ol,getCmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
ol.writeString(fixSpaces(getCmhlInfo(i)->title));
//printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
- // multiPageIndex,first,fileName.data(),getCmhlInfo(i)->fname,getCmhlInfo(i)->title.data());
+ // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
endQuickIndexItem(ol);
}
}
@@ -3093,7 +3093,7 @@ static void writeClassMemberIndex(OutputList &ol)
if (documentedClassMembers[CMHL_All]>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),0,"functions",0);
+ Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
Doxygen::indexList->incContentsDepth();
}
writeClassMemberIndexFiltered(ol,CMHL_All);
@@ -3117,7 +3117,7 @@ static void writeClassMemberIndex(OutputList &ol)
/** Helper class representing a file member in the navigation menu. */
struct FmhlInfo
{
- FmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
+ FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
const char *fname;
QCString title;
};
@@ -3167,8 +3167,8 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,0,
- getFmhlInfo(hl)->fname,0,multiPageIndex,TRUE);
+ Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
+ getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
if (multiPageIndex) Doxygen::indexList->incContentsDepth();
}
@@ -3179,23 +3179,23 @@ static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight hl)
QCString fileName = getFmhlInfo(hl)->fname;
if (multiPageIndex)
{
- QCString cs = page;
+ QCString cs(page);
if (!first)
{
fileName+="_"+letterToLabel(cs);
}
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
}
}
bool quickIndex = documentedFileMembers[hl]>maxItemsBeforeQuickIndex;
- ol.startFile(fileName+extension,0,title);
+ ol.startFile(fileName+extension,QCString(),title);
ol.startQuickIndices();
if (!disableIndex)
{
- ol.writeQuickLinks(TRUE,HLI_Globals,0);
+ ol.writeQuickLinks(TRUE,HLI_Globals,QCString());
if (!Config_getBool(HTML_DYNAMIC_MENUS))
{
startQuickIndexList(ol);
@@ -3264,7 +3264,7 @@ static void writeFileMemberIndex(OutputList &ol)
bool addToIndex = lne==0 || lne->visible();
if (documentedFileMembers[FMHL_All]>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),0,"globals",0);
+ Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
Doxygen::indexList->incContentsDepth();
}
writeFileMemberIndexFiltered(ol,FMHL_All);
@@ -3288,7 +3288,7 @@ static void writeFileMemberIndex(OutputList &ol)
/** Helper class representing a namespace member in the navigation menu. */
struct NmhlInfo
{
- NmhlInfo(const char *fn,const char *t) : fname(fn), title(t) {}
+ NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
const char *fname;
QCString title;
};
@@ -3341,8 +3341,8 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,0,
- getNmhlInfo(hl)->fname,0,multiPageIndex,TRUE);
+ Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
+ getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
if (multiPageIndex) Doxygen::indexList->incContentsDepth();
}
@@ -3353,23 +3353,23 @@ static void writeNamespaceMemberIndexFiltered(OutputList &ol,
QCString fileName = getNmhlInfo(hl)->fname;
if (multiPageIndex)
{
- QCString cs = page;
+ QCString cs(page);
if (!first)
{
fileName+="_"+letterToLabel(cs);
}
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,cs,0,fileName,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
}
}
bool quickIndex = documentedNamespaceMembers[hl]>maxItemsBeforeQuickIndex;
- ol.startFile(fileName+extension,0,title);
+ ol.startFile(fileName+extension,QCString(),title);
ol.startQuickIndices();
if (!disableIndex)
{
- ol.writeQuickLinks(TRUE,HLI_NamespaceMembers,0);
+ ol.writeQuickLinks(TRUE,HLI_NamespaceMembers,QCString());
if (!Config_getBool(HTML_DYNAMIC_MENUS))
{
startQuickIndexList(ol);
@@ -3438,7 +3438,7 @@ static void writeNamespaceMemberIndex(OutputList &ol)
bool addToIndex = lne==0 || lne->visible();
if (documentedNamespaceMembers[NMHL_All]>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),0,"namespacemembers",0);
+ Doxygen::indexList->addContentsItem(FALSE,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
Doxygen::indexList->incContentsDepth();
}
//bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
@@ -3471,17 +3471,17 @@ static void writeExampleIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trExamples();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"examples",0,title,HLI_Examples);
+ startFile(ol,"examples",QCString(),title,HLI_Examples);
- startTitle(ol,0);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"examples",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
@@ -3496,18 +3496,18 @@ static void writeExampleIndex(OutputList &ol)
QCString n=pd->getOutputFileBase();
if (!pd->title().isEmpty())
{
- ol.writeObjectLink(0,n,0,pd->title());
+ ol.writeObjectLink(QCString(),n,QCString(),pd->title());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title().str()),pd->getReference(),n,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title().str()),pd->getReference(),n,QCString(),FALSE,TRUE);
}
}
else
{
- ol.writeObjectLink(0,n,0,pd->name());
+ ol.writeObjectLink(QCString(),n,QCString(),pd->name());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,0,FALSE,TRUE);
+ Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
}
}
ol.endItemListItem();
@@ -3557,7 +3557,7 @@ static bool mainPageHasOwnTitle()
static void writePages(const PageDef *pd,FTVHelp *ftv)
{
- //printf("writePages()=%s pd=%p mainpage=%p\n",pd->name().data(),pd,Doxygen::mainPage);
+ //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),pd,Doxygen::mainPage);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
bool addToIndex = lne==0 || lne->visible();
if (!addToIndex) return;
@@ -3576,18 +3576,18 @@ static void writePages(const PageDef *pd,FTVHelp *ftv)
if (ftv)
{
- //printf("*** adding %s hasSubPages=%d hasSections=%d\n",pageTitle.data(),hasSubPages,hasSections);
+ //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
ftv->addContentsItem(
hasSubPages,pageTitle,
pd->getReference(),pd->getOutputFileBase(),
- 0,hasSubPages,TRUE,pd);
+ QCString(),hasSubPages,TRUE,pd);
}
if (addToIndex && pd!=Doxygen::mainPage.get())
{
Doxygen::indexList->addContentsItem(
hasSubPages || hasSections,pageTitle,
pd->getReference(),pd->getOutputFileBase(),
- 0,hasSubPages,TRUE);
+ QCString(),hasSubPages,TRUE);
}
}
if (hasSubPages && ftv) ftv->incContentsDepth();
@@ -3610,7 +3610,7 @@ static void writePages(const PageDef *pd,FTVHelp *ftv)
{
Doxygen::indexList->decContentsDepth();
}
- //printf("end writePages()=%s\n",pd->title().data());
+ //printf("end writePages()=%s\n",qPrint(pd->title()));
}
//----------------------------------------------------------------------------
@@ -3622,10 +3622,10 @@ static void writePageIndex(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
- startFile(ol,"pages",0,title,HLI_Pages);
- startTitle(ol,0);
+ startFile(ol,"pages",QCString(),title,HLI_Pages);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
@@ -3708,10 +3708,10 @@ void writeGraphInfo(OutputList &ol)
// temporarily disable create subdirs for linking to our example
createSubdirs = Config_updateBool(CREATE_SUBDIRS,FALSE);
- startFile(ol,"graph_legend",0,theTranslator->trLegendTitle().data());
- startTitle(ol,0);
+ startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
+ startTitle(ol,QCString());
ol.parseText(theTranslator->trLegendTitle());
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
QCString legendDocs = theTranslator->trLegendDocs();
int s = legendDocs.find("<center>");
@@ -3720,11 +3720,11 @@ void writeGraphInfo(OutputList &ol)
if (imgExt=="svg" && s!=-1 && e!=-1)
{
legendDocs = legendDocs.left(s+8) + "[!-- SVG 0 --]\n" + legendDocs.mid(e);
- //printf("legendDocs=%s\n",legendDocs.data());
+ //printf("legendDocs=%s\n",qPrint(legendDocs));
}
FileDef *fd = createFileDef("","graph_legend.dox");
ol.generateDoc("graph_legend",1,fd,0,legendDocs,FALSE,FALSE,
- 0,FALSE,FALSE,FALSE);
+ QCString(),FALSE,FALSE,FALSE);
delete fd;
// restore config settings
@@ -3748,7 +3748,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
if (level>20)
{
warn(gd->getDefFileName(),gd->getDefLine(),
- "maximum nesting level exceeded for group %s: check for possible recursive group relation!\n",gd->name().data()
+ "maximum nesting level exceeded for group %s: check for possible recursive group relation!\n",qPrint(gd->name())
);
return;
}
@@ -3761,7 +3761,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
(!gd->isReference() || Config_getBool(EXTERNAL_GROUPS)) // hide external groups by default
)
{
- //printf("gd->name()=%s #members=%d\n",gd->name().data(),gd->countMembers());
+ //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
// write group info
bool hasSubGroups = !gd->getSubGroups().empty();
bool hasSubPages = !gd->getPages().empty();
@@ -3784,16 +3784,16 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
}
bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
- //printf("gd='%s': pageDict=%d\n",gd->name().data(),gd->pageDict->count());
+ //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),0,isDir,TRUE);
+ Doxygen::indexList->addContentsItem(isDir,gd->groupTitle(),gd->getReference(),gd->getOutputFileBase(),QCString(),isDir,TRUE);
Doxygen::indexList->incContentsDepth();
}
if (ftv)
{
ftv->addContentsItem(hasSubGroups,gd->groupTitle(),
- gd->getReference(),gd->getOutputFileBase(),0,
+ gd->getReference(),gd->getOutputFileBase(),QCString(),
FALSE,FALSE,gd);
ftv->incContentsDepth();
}
@@ -3856,7 +3856,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
//bool nestedClassInSameGroup =
// cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
// cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
- //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",cd->name().data(),cd->isVisible(),nestedClassInSameGroup);
+ //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
{
addMembersToIndex(cd,
@@ -3876,7 +3876,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
{
Doxygen::indexList->addContentsItem(FALSE,
nd->displayName(),nd->getReference(),
- nd->getOutputFileBase(),0,FALSE,addToIndex);
+ nd->getOutputFileBase(),QCString(),FALSE,addToIndex);
}
}
}
@@ -3888,7 +3888,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
{
Doxygen::indexList->addContentsItem(FALSE,
cd->displayName(),cd->getReference(),
- cd->getOutputFileBase(),0,FALSE,addToIndex);
+ cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
}
}
}
@@ -3900,7 +3900,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
{
Doxygen::indexList->addContentsItem(FALSE,
fd->displayName(),fd->getReference(),
- fd->getOutputFileBase(),0,FALSE,FALSE);
+ fd->getOutputFileBase(),QCString(),FALSE,FALSE);
}
}
}
@@ -3912,7 +3912,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
{
Doxygen::indexList->addContentsItem(FALSE,
dd->shortName(),dd->getReference(),
- dd->getOutputFileBase(),0,FALSE,FALSE);
+ dd->getOutputFileBase(),QCString(),FALSE,FALSE);
}
}
}
@@ -3929,7 +3929,7 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT
pd->title(),
gd->getReference(),
gd->getOutputFileBase(),
- si ? si->label().data() : 0,
+ si ? si->label() : QCString(),
hasSubPages || hasSections,
TRUE); // addToNavIndex
if (hasSections || hasSubPages)
@@ -4007,10 +4007,10 @@ static void writeGroupIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trModules();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"modules",0,title,HLI_Modules);
- startTitle(ol,0);
+ startFile(ol,"modules",QCString(),title,HLI_Modules);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.parseText(lne ? lne->intro() : theTranslator->trModulesDescription());
@@ -4040,7 +4040,7 @@ static void writeGroupIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"modules",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
FTVHelp* ftv = new FTVHelp(FALSE);
@@ -4070,11 +4070,11 @@ static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,b
for (const auto &cd : concepts)
{
ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
- cd->getOutputFileBase(),0,false,cd->partOfGroups().empty(),cd);
+ cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
if (addToIndex)
{
Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
- cd->getOutputFileBase(),0,false,cd->partOfGroups().empty());
+ cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
}
}
}
@@ -4101,7 +4101,7 @@ static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHel
bool isDir = namespaceHasNestedConcept(nd);
bool isLinkable = nd->isLinkableInProject();
- //printf("namespace %s isDir=%d\n",nd->name().data(),isDir);
+ //printf("namespace %s isDir=%d\n",qPrint(nd->name()),isDir);
QCString ref;
QCString file;
@@ -4113,7 +4113,7 @@ static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd,FTVHel
if (isDir)
{
- ftv->addContentsItem(isDir,nd->localName(),ref,file,0,FALSE,TRUE,nd);
+ ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
if (addToIndex)
{
@@ -4150,15 +4150,15 @@ static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
if (cd->getOuterScope()==0 ||
cd->getOuterScope()==Doxygen::globalScope)
{
- //printf("*** adding %s hasSubPages=%d hasSections=%d\n",pageTitle.data(),hasSubPages,hasSections);
+ //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
ftv->addContentsItem(
false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
- 0,false,true,cd.get());
+ QCString(),false,true,cd.get());
if (addToIndex)
{
Doxygen::indexList->addContentsItem(
false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
- 0,false,true);
+ QCString(),false,true);
}
}
}
@@ -4175,10 +4175,10 @@ static void writeConceptIndex(OutputList &ol)
QCString title = lne ? lne->title() : theTranslator->trConceptList();
bool addToIndex = lne==0 || lne->visible();
- startFile(ol,"concepts",0,title,HLI_Concepts);
- startTitle(ol,0);
+ startFile(ol,"concepts",QCString(),title,HLI_Concepts);
+ startTitle(ol,QCString());
ol.parseText(title);
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
ol.startTextBlock();
ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
@@ -4203,7 +4203,7 @@ static void writeConceptIndex(OutputList &ol)
}
//ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
ol.startIndexKey();
- ol.writeObjectLink(0,cd->getOutputFileBase(),0,cd->displayName());
+ ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
ol.endIndexKey();
bool hasBrief = !cd->briefDescription().isEmpty();
@@ -4217,7 +4217,7 @@ static void writeConceptIndex(OutputList &ol)
cd->briefDescription(TRUE),
FALSE, // index words
FALSE, // isExample
- 0, // example name
+ QCString(), // example name
TRUE, // single line
TRUE, // link from index
Config_getBool(MARKDOWN_SUPPORT)
@@ -4243,7 +4243,7 @@ static void writeConceptIndex(OutputList &ol)
{
if (addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,title,0,"concepts",0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
Doxygen::indexList->incContentsDepth();
}
FTVHelp ftv(false);
@@ -4276,10 +4276,10 @@ static void writeUserGroupStubPage(OutputList &ol,LayoutNavEntry *lne)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- startFile(ol,lne->baseFile(),0,lne->title(),HLI_UserGroup);
- startTitle(ol,0);
+ startFile(ol,lne->baseFile(),QCString(),lne->title(),HLI_UserGroup);
+ startTitle(ol,QCString());
ol.parseText(lne->title());
- endTitle(ol,0,0);
+ endTitle(ol,QCString(),QCString());
ol.startContents();
int count=0;
for (const auto &entry: lne->children())
@@ -4327,7 +4327,7 @@ static void writeIndex(OutputList &ol)
ol.disableAllBut(OutputGenerator::Html);
QCString defFileName =
- Doxygen::mainPage ? Doxygen::mainPage->docFile().data() : "[generated]";
+ Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
int defLine =
Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
@@ -4342,7 +4342,7 @@ static void writeIndex(OutputList &ol)
}
QCString indexName="index";
- ol.startFile(indexName,0,title);
+ ol.startFile(indexName,QCString(),title);
if (Doxygen::mainPage)
{
@@ -4350,7 +4350,7 @@ static void writeIndex(OutputList &ol)
(!projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0)
) // to avoid duplicate entries in the treeview
{
- Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,0,indexName,0,Doxygen::mainPage->hasSubPages(),TRUE);
+ Doxygen::indexList->addContentsItem(Doxygen::mainPage->hasSubPages(),title,QCString(),indexName,QCString(),Doxygen::mainPage->hasSubPages(),TRUE);
}
if (Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections())
{
@@ -4361,7 +4361,7 @@ static void writeIndex(OutputList &ol)
ol.startQuickIndices();
if (!Config_getBool(DISABLE_INDEX))
{
- ol.writeQuickLinks(TRUE,HLI_Main,0);
+ ol.writeQuickLinks(TRUE,HLI_Main,QCString());
}
ol.endQuickIndices();
ol.writeSplitBar(indexName);
@@ -4384,10 +4384,10 @@ static void writeIndex(OutputList &ol)
if (Doxygen::mainPage->title().lower()!="notitle")
{
ol.startHeaderSection();
- ol.startTitleHead(0);
+ ol.startTitleHead(QCString());
ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
Doxygen::mainPage.get(),0,Doxygen::mainPage->title(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
headerWritten = TRUE;
}
}
@@ -4396,21 +4396,21 @@ static void writeIndex(OutputList &ol)
if (!projectName.isEmpty())
{
ol.startHeaderSection();
- ol.startTitleHead(0);
+ ol.startTitleHead(QCString());
ol.parseText(projPrefix+theTranslator->trDocumentation());
headerWritten = TRUE;
}
}
if (headerWritten)
{
- ol.endTitleHead(0,0);
+ ol.endTitleHead(QCString(),QCString());
ol.endHeaderSection();
}
ol.startContents();
if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==0)
{
- ol.writeQuickLinks(FALSE,HLI_Main,0);
+ ol.writeQuickLinks(FALSE,HLI_Main,QCString());
}
if (Doxygen::mainPage)
@@ -4424,7 +4424,7 @@ static void writeIndex(OutputList &ol)
ol.startTextBlock();
ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,
Doxygen::mainPage->documentation(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endTextBlock();
ol.endPageDoc();
@@ -4441,7 +4441,7 @@ static void writeIndex(OutputList &ol)
ol.enable(OutputGenerator::Docbook);
ol.enable(OutputGenerator::RTF);
- ol.startFile("refman",0,0);
+ ol.startFile("refman",QCString(),QCString());
ol.startIndexSection(isTitlePageStart);
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::Docbook);
@@ -4459,7 +4459,7 @@ static void writeIndex(OutputList &ol)
{
ol.startProjectNumber();
ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,Config_getString(PROJECT_NUMBER),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endProjectNumber();
}
ol.endIndexSection(isTitlePageStart);
@@ -4518,7 +4518,7 @@ static void writeIndex(OutputList &ol)
ol.endIndexSection(isPageDocumentation2);
ol.popGeneratorState();
- ol.writeAnchor(0,pd->getOutputFileBase());
+ ol.writeAnchor(QCString(),pd->getOutputFileBase());
ol.writePageLink(pd->getOutputFileBase(),first);
first=FALSE;
@@ -4678,12 +4678,12 @@ static void writeIndex(OutputList &ol)
{
Doxygen::insideMainPage=TRUE;
ol.disable(OutputGenerator::Man);
- startFile(ol,Doxygen::mainPage->name(),0,Doxygen::mainPage->title());
+ startFile(ol,Doxygen::mainPage->name(),QCString(),Doxygen::mainPage->title());
ol.startContents();
ol.startTextBlock();
ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),0,
Doxygen::mainPage->documentation(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
);
ol.endTextBlock();
endFile(ol);
@@ -4711,7 +4711,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
indexWritten.resize(newSize);
for (i=oldSize;i<newSize;i++) indexWritten.at(i)=FALSE;
}
- //printf("starting %s kind=%d\n",lne->title().data(),lne->kind());
+ //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
bool addToIndex=lne->visible();
bool needsClosing=FALSE;
if (!indexWritten.at(index))
@@ -4737,7 +4737,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
{
if (documentedNamespaces>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4766,7 +4766,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
case LayoutNavEntry::Classes:
if (annotatedClasses>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4807,7 +4807,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
case LayoutNavEntry::Interfaces:
if (sliceOpt && annotatedInterfaces>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4841,7 +4841,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
case LayoutNavEntry::Structs:
if (sliceOpt && annotatedStructs>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4863,7 +4863,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
case LayoutNavEntry::Exceptions:
if (sliceOpt && annotatedExceptions>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4901,7 +4901,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
{
if (documentedHtmlFiles>0 && addToIndex)
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
}
@@ -4941,7 +4941,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
url.prepend("^"); // prepend ^ to absolute URL
}
bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref";
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),url,QCString(),FALSE,isRef || isRelative);
}
break;
case LayoutNavEntry::UserGroup:
@@ -4952,7 +4952,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
{
if (url=="![none]")
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,0,0,FALSE,FALSE);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
}
else
{
@@ -4962,12 +4962,12 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
url.prepend("^"); // prepend ^ to absolute URL
}
bool isRef = lne->baseFile().left(4)=="@ref" || lne->baseFile().left(4)=="\\ref";
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,url,0,FALSE,isRef || isRelative);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),url,QCString(),FALSE,isRef || isRelative);
}
}
else
{
- Doxygen::indexList->addContentsItem(TRUE,lne->title(),0,lne->baseFile(),0,TRUE,TRUE);
+ Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
}
Doxygen::indexList->incContentsDepth();
needsClosing=TRUE;
@@ -4998,7 +4998,7 @@ static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &
break;
}
}
- //printf("ending %s kind=%d\n",lne->title().data(),lne->kind());
+ //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
}
}
@@ -5082,8 +5082,8 @@ void renderMemberIndicesAsJs(std::ostream &t,
{
if (!firstLetter) t << ",\n";
std::string letter = kv.first;
- QCString ci = letter;
- QCString is = letterToLabel(ci);
+ QCString ci(letter);
+ QCString is(letterToLabel(ci));
QCString anchor;
QCString extension=Doxygen::htmlFileExtension;
QCString fullName = getInfo(i)->fname;
diff --git a/src/index.h b/src/index.h
index a595ec2..a10cbc9 100644
--- a/src/index.h
+++ b/src/index.h
@@ -36,14 +36,14 @@ class IndexIntf
virtual void finalize() = 0;
virtual void incContentsDepth() = 0;
virtual void decContentsDepth() = 0;
- virtual void addContentsItem(bool isDir, const char *name, const char *ref,
- const char *file, const char *anchor, bool separateIndex,
+ virtual void addContentsItem(bool isDir, const QCString &name, const QCString &ref,
+ const QCString &file, const QCString &anchor, bool separateIndex,
bool addToNavIndex,const Definition *def) = 0;
virtual void addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *title) = 0;
- virtual void addIndexFile(const char *name) = 0;
- virtual void addImageFile(const char *name) = 0;
- virtual void addStyleSheetFile(const char *name) = 0;
+ const QCString &sectionAnchor,const QCString &title) = 0;
+ virtual void addIndexFile(const QCString &name) = 0;
+ virtual void addImageFile(const QCString &name) = 0;
+ virtual void addStyleSheetFile(const QCString &name) = 0;
};
/** \brief A list of index interfaces.
@@ -93,17 +93,17 @@ class IndexList : public IndexIntf
{ if (m_enabled) foreach(&IndexIntf::incContentsDepth); }
void decContentsDepth()
{ if (m_enabled) foreach(&IndexIntf::decContentsDepth); }
- void addContentsItem(bool isDir, const char *name, const char *ref,
- const char *file, const char *anchor,bool separateIndex=FALSE,bool addToNavIndex=FALSE,
+ void addContentsItem(bool isDir, const QCString &name, const QCString &ref,
+ const QCString &file, const QCString &anchor,bool separateIndex=FALSE,bool addToNavIndex=FALSE,
const Definition *def=0)
{ if (m_enabled) foreach(&IndexIntf::addContentsItem,isDir,name,ref,file,anchor,separateIndex,addToNavIndex,def); }
- void addIndexItem(const Definition *context,const MemberDef *md,const char *sectionAnchor=0,const char *title=0)
+ void addIndexItem(const Definition *context,const MemberDef *md,const QCString &sectionAnchor=QCString(),const QCString &title=QCString())
{ if (m_enabled) foreach(&IndexIntf::addIndexItem,context,md,sectionAnchor,title); }
- void addIndexFile(const char *name)
+ void addIndexFile(const QCString &name)
{ if (m_enabled) foreach(&IndexIntf::addIndexFile,name); }
- void addImageFile(const char *name)
+ void addImageFile(const QCString &name)
{ if (m_enabled) foreach(&IndexIntf::addImageFile,name); }
- void addStyleSheetFile(const char *name)
+ void addStyleSheetFile(const QCString &name)
{ if (m_enabled) foreach(&IndexIntf::addStyleSheetFile,name); }
private:
@@ -251,11 +251,11 @@ extern int documentedDirs;
extern int documentedHtmlFiles;
extern int documentedPages;
-void startTitle(OutputList &ol,const char *fileName,const DefinitionMutable *def=0);
-void endTitle(OutputList &ol,const char *fileName,const char *name);
-void startFile(OutputList &ol,const char *name,const char *manName,
- const char *title,HighlightedItem hli=HLI_None,
- bool additionalIndices=FALSE,const char *altSidebarName=0);
+void startTitle(OutputList &ol,const QCString &fileName,const DefinitionMutable *def=0);
+void endTitle(OutputList &ol,const QCString &fileName,const QCString &name);
+void startFile(OutputList &ol,const QCString &name,const QCString &manName,
+ const QCString &title,HighlightedItem hli=HLI_None,
+ bool additionalIndices=FALSE,const QCString &altSidebarName=QCString());
void endFile(OutputList &ol,bool skipNavIndex=FALSE,bool skipEndContents=FALSE,
const QCString &navPath=QCString());
void endFileWithNavPath(const Definition *d,OutputList &ol);
diff --git a/src/language.cpp b/src/language.cpp
index 299c452..af2ca3d 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -152,11 +152,11 @@
#endif
#endif // !ENGLISH_ONLY
-#define L_EQUAL(a) !qstricmp(langName,a)
+#define L_EQUAL(a) !qstricmp(langName.data(),a)
Translator *theTranslator=0;
-bool setTranslator(const char *langName)
+bool setTranslator(const QCString &langName)
{
if (L_EQUAL("english"))
{
@@ -417,6 +417,6 @@ bool setTranslator(const char *langName)
}
QCString msg = theTranslator->updateNeededMessage();
- if (!msg.isEmpty()) warn_uncond("%s", msg.data());
+ if (!msg.isEmpty()) warn_uncond("%s", qPrint(msg));
return TRUE;
}
diff --git a/src/language.h b/src/language.h
index 7c8eef9..8f38bfc 100644
--- a/src/language.h
+++ b/src/language.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* 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.
*
@@ -21,6 +21,6 @@
#include "translator.h"
extern Translator *theTranslator;
-extern bool setTranslator(const char *languageName);
+extern bool setTranslator(const QCString &languageName);
#endif
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 68c050f..5bb695a 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -177,7 +177,7 @@ QCString LatexDocVisitor::escapeMakeIndexChars(const char *s)
LatexDocVisitor::LatexDocVisitor(TextStream &t,LatexCodeGenerator &ci,
- const char *langExt,bool insideTabbing)
+ const QCString &langExt,bool insideTabbing)
: DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_insideItem(FALSE), m_hide(FALSE), m_hideCaption(FALSE), m_insideTabbing(insideTabbing),
m_langExt(langExt)
@@ -378,14 +378,14 @@ void LatexDocVisitor::visit(DocVerbatim *s)
QCString fileName(4096);
fileName.sprintf("%s%d%s",
- (Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_").data(),
+ qPrint(Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_"),
dotindex++,
".dot"
);
std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!file.is_open())
{
- err("Could not open file %s for writing\n",fileName.data());
+ err("Could not open file %s for writing\n",qPrint(fileName));
}
else
{
@@ -406,7 +406,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d",
- (Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_").data(),
+ qPrint(Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_"),
mscindex++
);
std::string fileName = baseName.str()+".msc";
@@ -556,7 +556,7 @@ void LatexDocVisitor::visit(DocInclude *inc)
void LatexDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
if (op->isFirst())
{
if (!m_hide) m_ci.startCodeFragment("DoxyCodeInclude");
@@ -904,7 +904,7 @@ void LatexDocVisitor::visitPre(DocSection *s)
m_t << "\\hypertarget{" << stripPath(s->file()) << "_" << s->anchor() << "}{}";
}
m_t << "\\" << getSectionName(s->level()) << "{";
- filter(convertCharEntitiesToUTF8(s->title().data()));
+ filter(convertCharEntitiesToUTF8(s->title()));
m_t << "}\\label{" << stripPath(s->file()) << "_" << s->anchor() << "}\n";
}
@@ -1450,7 +1450,7 @@ void LatexDocVisitor::visitPre(DocRef *ref)
// ref->anchor() for LaTeX/RTF
if (ref->isSubPage())
{
- startLink(ref->ref(),0,ref->anchor());
+ startLink(ref->ref(),QCString(),ref->anchor());
}
else
{
@@ -1464,7 +1464,7 @@ void LatexDocVisitor::visitPost(DocRef *ref)
if (m_hide) return;
if (ref->isSubPage())
{
- endLink(ref->ref(),0,ref->anchor());
+ endLink(ref->ref(),QCString(),ref->anchor());
}
else
{
@@ -1708,13 +1708,13 @@ void LatexDocVisitor::visitPost(DocXRefItem *x)
void LatexDocVisitor::visitPre(DocInternalRef *ref)
{
if (m_hide) return;
- startLink(0,ref->file(),ref->anchor());
+ startLink(QCString(),ref->file(),ref->anchor());
}
void LatexDocVisitor::visitPost(DocInternalRef *ref)
{
if (m_hide) return;
- endLink(0,ref->file(),ref->anchor());
+ endLink(QCString(),ref->file(),ref->anchor());
}
void LatexDocVisitor::visitPre(DocText *)
@@ -1757,7 +1757,7 @@ void LatexDocVisitor::visitPost(DocParBlock *)
if (m_hide) return;
}
-void LatexDocVisitor::filter(const char *str)
+void LatexDocVisitor::filter(const QCString &str)
{
filterLatexString(m_t,str,
m_insideTabbing,
diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h
index 8c04f39..696147f 100644
--- a/src/latexdocvisitor.h
+++ b/src/latexdocvisitor.h
@@ -29,7 +29,7 @@ class LatexDocVisitor : public DocVisitor
{
public:
LatexDocVisitor(TextStream &t,LatexCodeGenerator &ci,
- const char *langExt,bool insideTabbing);
+ const QCString &langExt,bool insideTabbing);
//--------------------------------------
// visitor functions for leaf nodes
@@ -152,7 +152,7 @@ class LatexDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const QCString &str);
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor,bool refToTable=FALSE);
void endLink(const QCString &ref,const QCString &file,
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 92bbfd7..fdcb993 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -70,11 +70,11 @@ void LatexCodeGenerator::setSourceFileName(const QCString &name)
m_sourceFileName = name;
}
-void LatexCodeGenerator::codify(const char *str)
+void LatexCodeGenerator::codify(const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const signed char *p=(const signed char*)str;
+ const signed char *p=(const signed char*)str.data();
signed char c;
//char cs[5];
int spacesToNextTabStop;
@@ -148,19 +148,19 @@ void LatexCodeGenerator::codify(const char *str)
}
-void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
- const char *anchor,const char *name,
- const char *)
+void LatexCodeGenerator::writeCodeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor,const QCString &name,
+ const QCString &)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
- int l = qstrlen(name);
- if (!ref && usePDFLatex && pdfHyperlinks)
+ uint l = name.length();
+ if (ref.isEmpty() && usePDFLatex && pdfHyperlinks)
{
m_t << "\\mbox{\\hyperlink{";
- if (f) m_t << stripPath(f);
- if (f && anchor) m_t << "_";
- if (anchor) m_t << anchor;
+ if (!f.isEmpty()) m_t << stripPath(f);
+ if (!f.isEmpty() && !anchor.isEmpty()) m_t << "_";
+ if (!anchor.isEmpty()) m_t << anchor;
m_t << "}{";
codify(name);
m_t << "}}";
@@ -172,7 +172,7 @@ void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
m_col+=l;
}
-void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
+void LatexCodeGenerator::writeLineNumber(const QCString &ref,const QCString &fileName,const QCString &anchor,int l)
{
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
@@ -186,7 +186,7 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
QCString lineNumber;
lineNumber.sprintf("%05d",l);
- if (fileName && !m_sourceFileName.isEmpty())
+ if (!fileName.isEmpty() && !m_sourceFileName.isEmpty())
{
QCString lineAnchor;
lineAnchor.sprintf("_l%05d",l);
@@ -196,7 +196,7 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
{
m_t << "\\Hypertarget{" << stripPath(lineAnchor) << "}";
}
- writeCodeLink(ref,fileName,anchor,lineNumber,0);
+ writeCodeLink(ref,fileName,anchor,lineNumber,QCString());
}
else
{
@@ -232,7 +232,7 @@ void LatexCodeGenerator::endCodeLine()
codify("\n");
}
-void LatexCodeGenerator::startFontClass(const char *name)
+void LatexCodeGenerator::startFontClass(const QCString &name)
{
m_t << "\\textcolor{" << name << "}{";
}
@@ -242,12 +242,12 @@ void LatexCodeGenerator::endFontClass()
m_t << "}";
}
-void LatexCodeGenerator::startCodeFragment(const char *style)
+void LatexCodeGenerator::startCodeFragment(const QCString &style)
{
m_t << "\n\\begin{" << style << "}{" << m_usedTableLevel << "}\n";
}
-void LatexCodeGenerator::endCodeFragment(const char *style)
+void LatexCodeGenerator::endCodeFragment(const QCString &style)
{
//endCodeLine checks is there is still an open code line, if so closes it.
endCodeLine();
@@ -289,7 +289,7 @@ static void writeLatexMakefile()
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- term("Could not open file %s for writing\n",fileName.data());
+ term("Could not open file %s for writing\n",qPrint(fileName));
}
TextStream t(&f);
// inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
@@ -387,7 +387,7 @@ static void writeMakeBat()
std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!t.is_open())
{
- term("Could not open file %s for writing\n",fileName.data());
+ term("Could not open file %s for writing\n",qPrint(fileName));
}
t << "set Dir_Old=%cd%\r\n";
t << "cd /D %~dp0\r\n\r\n";
@@ -466,13 +466,13 @@ void LatexGenerator::init()
Dir d(dname.str());
if (!d.exists() && !d.mkdir(dname.str()))
{
- term("Could not create output directory %s\n",dname.data());
+ term("Could not create output directory %s\n",qPrint(dname));
}
if (!Config_getString(LATEX_HEADER).isEmpty())
{
g_header=fileToString(Config_getString(LATEX_HEADER));
- //printf("g_header='%s'\n",g_header.data());
+ //printf("g_header='%s'\n",qPrint(g_header));
}
else
{
@@ -481,7 +481,7 @@ void LatexGenerator::init()
if (!Config_getString(LATEX_FOOTER).isEmpty())
{
g_footer=fileToString(Config_getString(LATEX_FOOTER));
- //printf("g_footer='%s'\n",g_footer.data());
+ //printf("g_footer='%s'\n",qPrint(g_footer));
}
else
{
@@ -517,7 +517,7 @@ void LatexGenerator::writeStyleSheetFile(TextStream &t)
writeDefaultStyleSheet(t);
}
-void LatexGenerator::startFile(const char *name,const char *,const char *,int)
+void LatexGenerator::startFile(const QCString &name,const QCString &,const QCString &,int)
{
#if 0
setEncoding(Config_getString(LATEX_OUTPUT_ENCODING));
@@ -583,7 +583,7 @@ static QCString makeIndex()
if (latex_mkidx_command[0] == '\\')
result += latex_mkidx_command;
else
- result += '\\'+latex_mkidx_command;
+ result += "\\"+latex_mkidx_command;
}
else
{
@@ -612,7 +612,8 @@ static QCString substituteLatexKeywords(const QCString &str,
QCString generatedBy;
if (timeStamp)
{
- generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), Config_getString(PROJECT_NAME));
+ generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE).data(),
+ Config_getString(PROJECT_NAME).data());
}
else
{
@@ -646,7 +647,7 @@ static QCString substituteLatexKeywords(const QCString &str,
{
FileInfo fi(formulaMacrofile.str());
formulaMacrofile=fi.absFilePath();
- QCString stripMacroFile = fi.fileName().data();
+ QCString stripMacroFile = fi.fileName();
copyFile(formulaMacrofile,Config_getString(LATEX_OUTPUT) + "/" + stripMacroFile);
}
@@ -1042,7 +1043,7 @@ void LatexGenerator::endIndexSection(IndexSections is)
}
}
-void LatexGenerator::writePageLink(const char *name, bool /*first*/)
+void LatexGenerator::writePageLink(const QCString &name, bool /*first*/)
{
//bool &compactLatex = Config_getBool(COMPACT_LATEX);
// next is remove for bug615957
@@ -1076,7 +1077,7 @@ void LatexGenerator::newParagraph()
m_t << "\n" << "\n";
}
-void LatexGenerator::startParagraph(const char *)
+void LatexGenerator::startParagraph(const QCString &)
{
m_t << "\n" << "\n";
}
@@ -1086,29 +1087,29 @@ void LatexGenerator::endParagraph()
m_t << "\n" << "\n";
}
-void LatexGenerator::writeString(const char *text)
+void LatexGenerator::writeString(const QCString &text)
{
m_t << text;
}
-void LatexGenerator::startIndexItem(const char *ref,const char *fn)
+void LatexGenerator::startIndexItem(const QCString &ref,const QCString &fn)
{
m_t << "\\item ";
- if (!ref && fn)
+ if (ref.isEmpty() && !fn.isEmpty())
{
m_t << "\\contentsline{section}{";
}
}
-void LatexGenerator::endIndexItem(const char *ref,const char *fn)
+void LatexGenerator::endIndexItem(const QCString &ref,const QCString &fn)
{
- if (!ref && fn)
+ if (ref.isEmpty() && !fn.isEmpty())
{
m_t << "}{\\pageref{" << stripPath(fn) << "}}{}\n";
}
}
-//void LatexGenerator::writeIndexFileItem(const char *,const char *text)
+//void LatexGenerator::writeIndexFileItem(const QCString &,const QCString &text)
//{
// m_t << "\\item\\contentsline{section}{";
// docify(text);
@@ -1116,7 +1117,7 @@ void LatexGenerator::endIndexItem(const char *ref,const char *fn)
//}
-void LatexGenerator::startHtmlLink(const char *url)
+void LatexGenerator::startHtmlLink(const QCString &url)
{
if (Config_getBool(PDF_HYPERLINKS))
{
@@ -1132,7 +1133,7 @@ void LatexGenerator::endHtmlLink()
m_t << "}}";
}
-//void LatexGenerator::writeMailLink(const char *url)
+//void LatexGenerator::writeMailLink(const QCString &url)
//{
// if (Config_getBool(PDF_HYPERLINKS))
// {
@@ -1145,16 +1146,16 @@ void LatexGenerator::endHtmlLink()
// m_t << "}";
//}
-void LatexGenerator::writeStartAnnoItem(const char *,const char *,
- const char *path,const char *name)
+void LatexGenerator::writeStartAnnoItem(const QCString &,const QCString &,
+ const QCString &path,const QCString &name)
{
m_t << "\\item\\contentsline{section}\\textbf{ ";
- if (path) docify(path);
+ if (!path.isEmpty()) docify(path);
docify(name);
m_t << "} ";
}
-void LatexGenerator::writeEndAnnoItem(const char *name)
+void LatexGenerator::writeEndAnnoItem(const QCString &name)
{
m_t << "}{\\pageref{" << stripPath(name) << "}}{}\n";
}
@@ -1174,28 +1175,28 @@ void LatexGenerator::startIndexValue(bool hasBrief)
if (hasBrief) m_t << "\\\\*";
}
-void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/)
+void LatexGenerator::endIndexValue(const QCString &name,bool /*hasBrief*/)
{
//if (hasBrief) m_t << ")";
m_t << "}{\\pageref{" << stripPath(name) << "}}{}\n";
}
-//void LatexGenerator::writeClassLink(const char *,const char *,
-// const char *,const char *name)
+//void LatexGenerator::writeClassLink(const QCString &,const QCString &,
+// const QCString &,const QCString &name)
//{
// m_t << "\\textbf{ ";
// docify(name);
// m_t << "}";
//}
-void LatexGenerator::startTextLink(const char *f,const char *anchor)
+void LatexGenerator::startTextLink(const QCString &f,const QCString &anchor)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (!m_disableLinks && pdfHyperlinks)
{
m_t << "\\mbox{\\hyperlink{";
- if (f) m_t << stripPath(f);
- if (anchor) m_t << "_" << anchor;
+ if (!f.isEmpty()) m_t << stripPath(f);
+ if (!anchor.isEmpty()) m_t << "_" << anchor;
m_t << "}{";
}
else
@@ -1214,16 +1215,16 @@ void LatexGenerator::endTextLink()
m_t << "}";
}
-void LatexGenerator::writeObjectLink(const char *ref, const char *f,
- const char *anchor, const char *text)
+void LatexGenerator::writeObjectLink(const QCString &ref, const QCString &f,
+ const QCString &anchor, const QCString &text)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
- if (!m_disableLinks && !ref && pdfHyperlinks)
+ if (!m_disableLinks && ref.isEmpty() && pdfHyperlinks)
{
m_t << "\\mbox{\\hyperlink{";
- if (f) m_t << stripPath(f);
- if (f && anchor) m_t << "_";
- if (anchor) m_t << anchor;
+ if (!f.isEmpty()) m_t << stripPath(f);
+ if (!f.isEmpty() && !anchor.isEmpty()) m_t << "_";
+ if (!anchor.isEmpty()) m_t << anchor;
m_t << "}{";
docify(text);
m_t << "}}";
@@ -1241,20 +1242,20 @@ void LatexGenerator::startPageRef()
m_t << " \\doxyref{}{";
}
-void LatexGenerator::endPageRef(const char *clname, const char *anchor)
+void LatexGenerator::endPageRef(const QCString &clname, const QCString &anchor)
{
m_t << "}{";
- if (clname) m_t << clname;
- if (anchor) m_t << "_" << anchor;
+ if (!clname.isEmpty()) m_t << clname;
+ if (!anchor.isEmpty()) m_t << "_" << anchor;
m_t << "}";
}
-void LatexGenerator::startTitleHead(const char *fileName)
+void LatexGenerator::startTitleHead(const QCString &fileName)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
- if (usePDFLatex && pdfHyperlinks && fileName)
+ if (usePDFLatex && pdfHyperlinks && !fileName.isEmpty())
{
m_t << "\\hypertarget{" << stripPath(fileName) << "}{}";
}
@@ -1268,10 +1269,10 @@ void LatexGenerator::startTitleHead(const char *fileName)
}
}
-void LatexGenerator::endTitleHead(const char *fileName,const char *name)
+void LatexGenerator::endTitleHead(const QCString &fileName,const QCString &name)
{
m_t << "}\n";
- if (name)
+ if (!name.isEmpty())
{
m_t << "\\label{" << stripPath(fileName) << "}\\index{";
m_t << latexEscapeLabelName(name);
@@ -1325,7 +1326,7 @@ void LatexGenerator::endGroupHeader(int)
m_t << "}\n";
}
-void LatexGenerator::startMemberHeader(const char *,int)
+void LatexGenerator::startMemberHeader(const QCString &,int)
{
if (Config_getBool(COMPACT_LATEX))
{
@@ -1344,18 +1345,18 @@ void LatexGenerator::endMemberHeader()
m_t << "}\n";
}
-void LatexGenerator::startMemberDoc(const char *clname,
- const char *memname,
- const char *,
- const char *title,
+void LatexGenerator::startMemberDoc(const QCString &clname,
+ const QCString &memname,
+ const QCString &,
+ const QCString &title,
int memCount,
int memTotal,
bool showInline)
{
- if (memname && memname[0]!='@')
+ if (!memname.isEmpty() && memname[0]!='@')
{
m_t << "\\index{";
- if (clname)
+ if (!clname.isEmpty())
{
m_t << latexEscapeLabelName(clname);
m_t << "@{";
@@ -1372,7 +1373,7 @@ void LatexGenerator::startMemberDoc(const char *clname,
m_t << "@{";
m_t << latexEscapeIndexChars(memname);
m_t << "}";
- if (clname)
+ if (!clname.isEmpty())
{
m_t << "!";
m_t << latexEscapeLabelName(clname);
@@ -1416,9 +1417,9 @@ void LatexGenerator::endMemberDoc(bool)
//if (Config_getBool(COMPACT_LATEX)) m_t << "\\hfill";
}
-void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
- const char *anchor, const char *,
- const char *)
+void LatexGenerator::startDoxyAnchor(const QCString &fName,const QCString &,
+ const QCString &anchor, const QCString &,
+ const QCString &)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
@@ -1426,21 +1427,21 @@ void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
if (usePDFLatex && pdfHyperlinks)
{
m_t << "\\Hypertarget{";
- if (fName) m_t << stripPath(fName);
- if (anchor) m_t << "_" << anchor;
+ if (!fName.isEmpty()) m_t << stripPath(fName);
+ if (!anchor.isEmpty()) m_t << "_" << anchor;
m_t << "}";
}
m_t << "\\label{";
- if (fName) m_t << stripPath(fName);
- if (anchor) m_t << "_" << anchor;
+ if (!fName.isEmpty()) m_t << stripPath(fName);
+ if (!anchor.isEmpty()) m_t << "_" << anchor;
m_t << "}} \n";
}
-void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor)
+void LatexGenerator::endDoxyAnchor(const QCString &fName,const QCString &anchor)
{
}
-void LatexGenerator::writeAnchor(const char *fName,const char *name)
+void LatexGenerator::writeAnchor(const QCString &fName,const QCString &name)
{
//printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name);
m_t << "\\label{" << stripPath(name) << "}\n";
@@ -1448,7 +1449,7 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name)
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
if (usePDFLatex && pdfHyperlinks)
{
- if (fName)
+ if (!fName.isEmpty())
{
m_t << "\\Hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}\n";
}
@@ -1460,21 +1461,21 @@ void LatexGenerator::writeAnchor(const char *fName,const char *name)
}
-//void LatexGenerator::writeLatexLabel(const char *clName,const char *anchor)
+//void LatexGenerator::writeLatexLabel(const QCString &clName,const QCString &anchor)
//{
// writeDoxyAnchor(0,clName,anchor,0);
//}
-void LatexGenerator::addIndexItem(const char *s1,const char *s2)
+void LatexGenerator::addIndexItem(const QCString &s1,const QCString &s2)
{
- if (s1)
+ if (!s1.isEmpty())
{
m_t << "\\index{";
m_t << latexEscapeLabelName(s1);
m_t << "@{";
m_t << latexEscapeIndexChars(s1);
m_t << "}";
- if (s2)
+ if (!s2.isEmpty())
{
m_t << "!";
m_t << latexEscapeLabelName(s2);
@@ -1487,7 +1488,7 @@ void LatexGenerator::addIndexItem(const char *s1,const char *s2)
}
-void LatexGenerator::startSection(const char *lab,const char *,SectionType type)
+void LatexGenerator::startSection(const QCString &lab,const QCString &,SectionType type)
{
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
bool usePDFLatex = Config_getBool(USE_PDFLATEX);
@@ -1524,13 +1525,13 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionType type)
}
}
-void LatexGenerator::endSection(const char *lab,SectionType)
+void LatexGenerator::endSection(const QCString &lab,SectionType)
{
m_t << "}\\label{" << lab << "}\n";
}
-void LatexGenerator::docify(const char *str)
+void LatexGenerator::docify(const QCString &str)
{
filterLatexString(m_t,str,
m_insideTabbing, // insideTabbing
@@ -1556,7 +1557,7 @@ void LatexGenerator::startClassDiagram()
}
void LatexGenerator::endClassDiagram(const ClassDiagram &d,
- const char *fileName,const char *)
+ const QCString &fileName,const QCString &)
{
d.writeFigure(m_t,dir(),fileName);
}
@@ -1591,7 +1592,7 @@ void LatexGenerator::startMemberTemplateParams()
}
}
-void LatexGenerator::endMemberTemplateParams(const char *,const char *)
+void LatexGenerator::endMemberTemplateParams(const QCString &,const QCString &)
{
if (templateMemberItem)
{
@@ -1599,7 +1600,7 @@ void LatexGenerator::endMemberTemplateParams(const char *,const char *)
}
}
-void LatexGenerator::startMemberItem(const char *,int annoType,const char *)
+void LatexGenerator::startMemberItem(const QCString &,int annoType,const QCString &)
{
//printf("LatexGenerator::startMemberItem(%d)\n",annType);
if (!m_insideTabbing)
@@ -1619,7 +1620,7 @@ void LatexGenerator::endMemberItem()
m_t << "\n";
}
-void LatexGenerator::startMemberDescription(const char *,const char *,bool)
+void LatexGenerator::startMemberDescription(const QCString &,const QCString &,bool)
{
if (!m_insideTabbing)
{
@@ -1673,7 +1674,7 @@ void LatexGenerator::writeNonBreakableSpace(int)
// - endDescTableRow()
// endDescTable()
-void LatexGenerator::startDescTable(const char *title)
+void LatexGenerator::startDescTable(const QCString &title)
{
m_codeGen.incUsedTableLevel();
m_t << "\\begin{DoxyEnumFields}{" << title << "}\n";
@@ -1868,7 +1869,7 @@ void LatexGenerator::endExamples()
m_t << "\\end{Desc}\n";
}
-void LatexGenerator::startParamList(ParamListTypes,const char *title)
+void LatexGenerator::startParamList(ParamListTypes,const QCString &title)
{
m_t << "\\begin{Desc}\n\\item[";
docify(title);
@@ -1891,10 +1892,10 @@ void LatexGenerator::endParameterList()
{
}
-void LatexGenerator::startParameterType(bool first,const char *key)
+void LatexGenerator::startParameterType(bool first,const QCString &key)
{
m_t << "\\item[{";
- if (!first && key) docify(key);
+ if (!first && !key.isEmpty()) docify(key);
}
void LatexGenerator::endParameterType()
@@ -1917,12 +1918,16 @@ void LatexGenerator::endParameterName(bool last,bool /*emptyList*/,bool closeBra
}
}
-void LatexGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+void LatexGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
{
- if (prefix)
- m_t << " " << prefix << "(";
+ if (!prefix.isEmpty())
+ {
+ m_t << " " << prefix << "(";
+ }
else if (closeBracket)
- m_t << ")";
+ {
+ m_t << ")";
+ }
m_t << " ";
}
@@ -1934,7 +1939,7 @@ void LatexGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *
delete visitor;
}
-void LatexGenerator::startConstraintList(const char *header)
+void LatexGenerator::startConstraintList(const QCString &header)
{
m_t << "\\begin{Desc}\n\\item[";
docify(header);
@@ -1992,7 +1997,7 @@ void LatexGenerator::endInlineHeader()
m_t << "}\n";
}
-void LatexGenerator::lineBreak(const char *)
+void LatexGenerator::lineBreak(const QCString &)
{
if (m_insideTabbing)
{
@@ -2069,7 +2074,7 @@ void LatexGenerator::startLabels()
m_t << "\\hspace{0.3cm}";
}
-void LatexGenerator::writeLabel(const char *l,bool isLast)
+void LatexGenerator::writeLabel(const QCString &l,bool isLast)
{
m_t << "{\\ttfamily [" << l << "]}";
if (!isLast) m_t << ", ";
diff --git a/src/latexgen.h b/src/latexgen.h
index 4a8be62..f457d79 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -32,27 +32,27 @@ class LatexCodeGenerator : public CodeOutputInterface
LatexCodeGenerator(TextStream &t);
void setRelativePath(const QCString &path);
void setSourceFileName(const QCString &sourceFileName);
- void codify(const char *text);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *,
+ void codify(const QCString &text) override;
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip) override;
+ void writeTooltip(const QCString &,
const DocLinkInfo &,
- const char *,
- const char *,
+ const QCString &,
+ const QCString &,
const SourceLinkInfo &,
const SourceLinkInfo &
- ) {}
- void writeLineNumber(const char *,const char *,const char *,int);
- void startCodeLine(bool);
- void endCodeLine();
- void startFontClass(const char *);
- void endFontClass();
- void writeCodeAnchor(const char *) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
- void startCodeFragment(const char *style);
- void endCodeFragment(const char *style);
+ ) override{}
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int) override;
+ void startCodeLine(bool) override;
+ void endCodeLine() override;
+ void startFontClass(const QCString &) override;
+ void endFontClass() override;
+ void writeCodeAnchor(const QCString &) override {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ void addWord(const QCString &,bool) override {}
+ void startCodeFragment(const QCString &style) override;
+ void endCodeFragment(const QCString &style) override;
// extra methods not part of CodeOutputInterface
void incUsedTableLevel() { m_usedTableLevel++; }
@@ -60,11 +60,11 @@ class LatexCodeGenerator : public CodeOutputInterface
int usedTableLevel() const { return m_usedTableLevel; }
private:
- void _writeCodeLink(const char *className,
- const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void docify(const char *str);
+ void _writeCodeLink(const QCString &className,
+ const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void docify(const QCString &str);
bool m_streamSet = false;
TextStream &m_t;
QCString m_relPath;
@@ -93,58 +93,58 @@ class LatexGenerator : public OutputGenerator
virtual OutputType type() const { return Latex; }
// --- CodeOutputInterface
- void codify(const char *text)
+ void codify(const QCString &text)
{ m_codeGen.codify(text); }
- void writeCodeLink(const char *ref, const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+ void writeCodeLink(const QCString &ref, const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{ m_codeGen.writeCodeLink(ref,file,anchor,name,tooltip); }
- void writeLineNumber(const char *ref,const char *file,const char *anchor,int lineNumber)
+ void writeLineNumber(const QCString &ref,const QCString &file,const QCString &anchor,int lineNumber)
{ m_codeGen.writeLineNumber(ref,file,anchor,lineNumber); }
- void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl,
- const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
+ void writeTooltip(const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo
)
{ m_codeGen.writeTooltip(id,docInfo,decl,desc,defInfo,declInfo); }
void startCodeLine(bool hasLineNumbers)
{ m_codeGen.startCodeLine(hasLineNumbers); }
void endCodeLine()
{ m_codeGen.endCodeLine(); }
- void startFontClass(const char *s)
+ void startFontClass(const QCString &s)
{ m_codeGen.startFontClass(s); }
void endFontClass()
{ m_codeGen.endFontClass(); }
- void writeCodeAnchor(const char *anchor)
+ void writeCodeAnchor(const QCString &anchor)
{ m_codeGen.writeCodeAnchor(anchor); }
- void startCodeFragment(const char *style)
+ void startCodeFragment(const QCString &style)
{ m_codeGen.startCodeFragment(style); }
- void endCodeFragment(const char *style)
+ void endCodeFragment(const QCString &style)
{ m_codeGen.endCodeFragment(style); }
// ---------------------------
void writeDoc(DocNode *,const Definition *ctx,const MemberDef *,int id);
- void startFile(const char *name,const char *manName,const char *title,int id);
+ void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
void writeSearchInfo() {}
- void writeFooter(const char *) {}
+ void writeFooter(const QCString &) {}
void endFile();
void clearBuffer();
void startIndexSection(IndexSections);
void endIndexSection(IndexSections);
- void writePageLink(const char *,bool);
+ void writePageLink(const QCString &,bool);
void startProjectNumber();
void endProjectNumber() {}
void writeStyleInfo(int part);
- void startTitleHead(const char *);
+ void startTitleHead(const QCString &);
void startTitle();
- void endTitleHead(const char *,const char *name);
+ void endTitleHead(const QCString &,const QCString &name);
void endTitle() { m_t << "}"; }
void newParagraph();
- void startParagraph(const char *classDef);
+ void startParagraph(const QCString &classDef);
void endParagraph();
- void writeString(const char *text);
+ void writeString(const QCString &text);
void startIndexListItem() {}
void endIndexListItem() {}
void startIndexList() { m_t << "\\begin{DoxyCompactList}\n"; }
@@ -152,18 +152,18 @@ class LatexGenerator : public OutputGenerator
void startIndexKey();
void endIndexKey();
void startIndexValue(bool);
- void endIndexValue(const char *,bool);
+ void endIndexValue(const QCString &,bool);
void startItemList() { m_t << "\\begin{DoxyCompactItemize}\n"; }
void endItemList() { m_t << "\\end{DoxyCompactItemize}\n"; }
- void startIndexItem(const char *ref,const char *file);
- void endIndexItem(const char *ref,const char *file);
- void docify(const char *text);
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor,const char *name);
+ void startIndexItem(const QCString &ref,const QCString &file);
+ void endIndexItem(const QCString &ref,const QCString &file);
+ void docify(const QCString &text);
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name);
- void startTextLink(const char *,const char *);
+ void startTextLink(const QCString &,const QCString &);
void endTextLink();
- void startHtmlLink(const char *url);
+ void startHtmlLink(const QCString &url);
void endHtmlLink();
void startTypewriter() { m_t << "{\\ttfamily "; }
void endTypewriter() { m_t << "}"; }
@@ -176,7 +176,7 @@ class LatexGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection() {}
- void startMemberHeader(const char *,int);
+ void startMemberHeader(const QCString &,int);
void endMemberHeader();
void startMemberSubtitle() {}
void endMemberSubtitle() {}
@@ -188,10 +188,10 @@ class LatexGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int);
void endAnonTypeScope(int);
- void startMemberItem(const char *,int,const char *);
+ void startMemberItem(const QCString &,int,const QCString &);
void endMemberItem();
void startMemberTemplateParams();
- void endMemberTemplateParams(const char *,const char *);
+ void endMemberTemplateParams(const QCString &,const QCString &);
void startCompoundTemplateParams() { startSubsubsection(); }
void endCompoundTemplateParams() { endSubsubsection(); }
@@ -206,7 +206,7 @@ class LatexGenerator : public OutputGenerator
void insertMemberAlignLeft(int,bool){}
void writeRuler() { m_t << "\n\n"; }
- void writeAnchor(const char *fileName,const char *name);
+ void writeAnchor(const QCString &fileName,const QCString &name);
void startEmphasis() { m_t << "{\\em "; }
void endEmphasis() { m_t << "}"; }
void startBold() { m_t << "{\\bfseries "; }
@@ -215,16 +215,16 @@ class LatexGenerator : public OutputGenerator
void endDescription();
void startDescItem();
void endDescItem();
- void lineBreak(const char *style=0);
- void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
+ void lineBreak(const QCString &style=QCString());
+ void startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
- void endDoxyAnchor(const char *,const char *);
+ void startDoxyAnchor(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &);
+ void endDoxyAnchor(const QCString &,const QCString &);
void writeChar(char c);
void writeLatexSpacing() { m_t << "\\hspace{0.3cm}"; }
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name);
- void writeEndAnnoItem(const char *name);
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name);
+ void writeEndAnnoItem(const QCString &name);
void startSubsection() { m_t << "\\subsection*{"; }
void endSubsection() { m_t << "}\n"; }
void startSubsubsection() { m_t << "\\subsubsection*{"; }
@@ -233,42 +233,42 @@ class LatexGenerator : public OutputGenerator
void endCenter() { m_t << "\\end{center}\n"; }
void startSmall() { m_t << "\\footnotesize "; }
void endSmall() { m_t << "\\normalsize "; }
- void startMemberDescription(const char *,const char *,bool);
+ void startMemberDescription(const QCString &,const QCString &,bool);
void endMemberDescription();
void startMemberDeclaration() {}
- void endMemberDeclaration(const char *,const char *) {}
- void writeInheritedSectionTitle(const char *,const char *,const char *,
- const char *,const char *,const char *) {}
+ void endMemberDeclaration(const QCString &,const QCString &) {}
+ void writeInheritedSectionTitle(const QCString &,const QCString &,const QCString &,
+ const QCString &,const QCString &,const QCString &) {}
void startDescList(SectionTypes) { m_t << "\\begin{Desc}\n\\item["; }
void endDescList() { m_t << "\\end{Desc}\n"; }
void startExamples();
void endExamples();
- void startParamList(ParamListTypes,const char *title);
+ void startParamList(ParamListTypes,const QCString &title);
void endParamList();
void startDescForItem() { m_t << "\\par\n"; }
void endDescForItem() {}
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void addIndexItem(const char *,const char *);
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void addIndexItem(const QCString &,const QCString &);
void startIndent() {}
void endIndent() {}
void writeSynopsis() {}
void startClassDiagram();
- void endClassDiagram(const ClassDiagram &,const char *,const char *);
+ void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &);
void startPageRef();
- void endPageRef(const char *,const char *);
+ void endPageRef(const QCString &,const QCString &);
void startQuickIndices() {}
void endQuickIndices() {}
- void writeSplitBar(const char *) {}
- void writeNavigationPath(const char *) {}
+ void writeSplitBar(const QCString &) {}
+ void writeNavigationPath(const QCString &) {}
void writeLogo() {}
- void writeQuickLinks(bool,HighlightedItem,const char*) {}
- void writeSummaryLink(const char *,const char *,const char *,bool) {}
+ void writeQuickLinks(bool,HighlightedItem,const QCString &) {}
+ void writeSummaryLink(const QCString &,const QCString &,const QCString &,bool) {}
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int);
- void startDescTable(const char *title);
+ void startDescTable(const QCString &title);
void endDescTable();
void startDescTableRow();
void endDescTableRow();
@@ -297,15 +297,15 @@ class LatexGenerator : public OutputGenerator
void endMemberDocPrefixItem() { m_t << "\\\\\n"; }
void startMemberDocName(bool) {}
void endMemberDocName() {}
- void startParameterType(bool,const char *);
+ void startParameterType(bool,const QCString &);
void endParameterType();
void startParameterName(bool);
void endParameterName(bool,bool,bool);
void startParameterList(bool);
void endParameterList();
- void exceptionEntry(const char*,bool);
+ void exceptionEntry(const QCString &,bool);
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -324,11 +324,11 @@ class LatexGenerator : public OutputGenerator
void endInlineMemberDoc();
void startLabels();
- void writeLabel(const char *l,bool isLast);
+ void writeLabel(const QCString &l,bool isLast);
void endLabels();
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) {}
+ void addWord(const QCString &,bool) {}
private:
diff --git a/src/layout.cpp b/src/layout.cpp
index c0f3a37..49405aa 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -92,7 +92,7 @@ static bool elemIsVisible(const XMLHandlers::Attributes &attrib,bool defVal=TRUE
else if (!opt)
{
err("found unsupported value %s for visible attribute in layout file\n",
- visible.data());
+ qPrint(visible));
}
}
return visible!="no" && visible!="0";
@@ -101,7 +101,7 @@ static bool elemIsVisible(const XMLHandlers::Attributes &attrib,bool defVal=TRUE
//---------------------------------------------------------------------------------
LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind,
- const char *file) const
+ const QCString &file) const
{
LayoutNavEntry *result=0;
for (const auto &entry : m_children)
@@ -133,7 +133,7 @@ QCString LayoutNavEntry::url() const
const Definition *d = 0;
QCString anchor;
bool found=FALSE;
- if (resolveLink(0,url.mid(5).stripWhiteSpace(),TRUE,&d,anchor))
+ if (resolveLink(QCString(),url.mid(5).stripWhiteSpace(),TRUE,&d,anchor))
{
if (d && d->isLinkable())
{
@@ -150,7 +150,7 @@ QCString LayoutNavEntry::url() const
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());
+ //printf("LayoutNavEntry::url()=%s\n",qPrint(url));
return url;
}
@@ -195,7 +195,7 @@ class LayoutParser
bool isVisible = elemIsVisible(attrib);
QCString userTitle = XMLHandlers::value(attrib,"title");
//printf("startSectionEntry: title='%s' userTitle='%s'\n",
- // title.data(),userTitle.data());
+ // qPrint(title),qPrint(userTitle));
if (userTitle.isEmpty()) userTitle = title;
if (m_part!=-1 && isVisible)
{
@@ -214,7 +214,7 @@ class LayoutParser
QCString userSubscript = XMLHandlers::value(attrib,"subtitle");
if (userTitle.isEmpty()) userTitle = title;
if (userSubscript.isEmpty()) userSubscript = subscript;
- //printf("memberdecl: %s\n",userTitle.data());
+ //printf("memberdecl: %s\n",qPrint(userTitle));
if (m_part!=-1 /*&& isVisible*/)
{
LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
@@ -227,7 +227,7 @@ class LayoutParser
{
QCString userTitle = XMLHandlers::value(attrib,"title");
if (userTitle.isEmpty()) userTitle = title;
- //printf("memberdef: %s\n",userTitle.data());
+ //printf("memberdef: %s\n",qPrint(userTitle));
if (m_part!=-1 /*&& isVisible*/)
{
LayoutDocManager::instance().addEntry((LayoutDocManager::LayoutPart)m_part,
@@ -517,7 +517,7 @@ class LayoutParser
}
else
{
- ::warn(fileName.c_str(),m_locator->lineNr(),"the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",type.data());
+ ::warn(fileName.c_str(),m_locator->lineNr(),"the type '%s' is not supported for the entry tag within a navindex! Check your layout file!\n",qPrint(type));
}
m_invalidEntry=TRUE;
return;
@@ -1497,7 +1497,7 @@ static const std::map< std::string, ElementCallbacks > g_elementHandlers =
void LayoutParser::startElement( const std::string &name, const XMLHandlers::Attributes& attrib )
{
- //printf("startElement [%s]::[%s]\n",m_scope.data(),name.data());
+ //printf("startElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
auto it = g_elementHandlers.find(m_scope.str()+name);
if (it!=g_elementHandlers.end())
{
@@ -1507,13 +1507,13 @@ void LayoutParser::startElement( const std::string &name, const XMLHandlers::Att
{
std::string fileName = m_locator->fileName();
::warn(fileName.c_str(),m_locator->lineNr(),"Unexpected start tag '%s' found in scope='%s'!\n",
- name.data(),m_scope.data());
+ qPrint(name),qPrint(m_scope));
}
}
void LayoutParser::endElement( const std::string &name )
{
- //printf("endElement [%s]::[%s]\n",m_scope.data(),name.data());
+ //printf("endElement [%s]::[%s]\n",qPrint(m_scope),qPrint(name));
auto it=g_elementHandlers.end();
if (!m_scope.isEmpty() && m_scope.right(static_cast<uint>(name.length())+1)==name+"/")
@@ -1559,7 +1559,7 @@ void LayoutDocManager::init()
XMLParser parser(handlers);
layoutParser.setDocumentLocator(&parser);
QCString layout_default = ResourceMgr::instance().getAsString("layout_default.xml");
- parser.parse("layout_default.xml",layout_default,Debug::isFlagSet(Debug::Lex));
+ parser.parse("layout_default.xml",qPrint(layout_default),Debug::isFlagSet(Debug::Lex));
}
LayoutDocManager::~LayoutDocManager()
@@ -1593,7 +1593,7 @@ void LayoutDocManager::clear(LayoutDocManager::LayoutPart p)
d->docEntries[(int)p].clear();
}
-void LayoutDocManager::parse(const char *fileName)
+void LayoutDocManager::parse(const QCString &fileName)
{
LayoutParser &layoutParser = LayoutParser::instance();
XMLHandlers handlers;
@@ -1602,12 +1602,12 @@ void LayoutDocManager::parse(const char *fileName)
handlers.error = [&layoutParser](const std::string &fn,int lineNr,const std::string &msg) { layoutParser.error(fn,lineNr,msg); };
XMLParser parser(handlers);
layoutParser.setDocumentLocator(&parser);
- parser.parse(fileName,fileToString(fileName),Debug::isFlagSet(Debug::Lex));
+ parser.parse(fileName.data(),fileToString(fileName).data(),Debug::isFlagSet(Debug::Lex));
}
//---------------------------------------------------------------------------------
-void writeDefaultLayoutFile(const char *fileName)
+void writeDefaultLayoutFile(const QCString &fileName)
{
std::ofstream f;
if (openOutputFile(fileName,f))
@@ -1618,10 +1618,10 @@ void writeDefaultLayoutFile(const char *fileName)
}
else
{
- err("Failed to open file %s for writing!\n",fileName);
+ err("Failed to open file %s for writing!\n",qPrint(fileName));
return;
- }
- f.close();
+ }
+ f.close();
}
//----------------------------------------------------------------------------------
diff --git a/src/layout.h b/src/layout.h
index 900d192..04fdf52 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -177,7 +177,7 @@ struct LayoutNavEntry
void addChild(LayoutNavEntry *e) { m_children.push_back(std::unique_ptr<LayoutNavEntry>(e)); }
void prependChild(LayoutNavEntry *e) { m_children.insert(m_children.begin(),std::unique_ptr<LayoutNavEntry>(e)); }
const LayoutNavEntryList &children() const { return m_children; }
- LayoutNavEntry *find(LayoutNavEntry::Kind k,const char *file=0) const;
+ LayoutNavEntry *find(LayoutNavEntry::Kind k,const QCString &file=QCString()) const;
private:
LayoutNavEntry() : m_parent(0), m_kind(None), m_visible(FALSE) {}
@@ -213,7 +213,7 @@ class LayoutDocManager
LayoutNavEntry *rootNavEntry() const;
/** Parses a user provided layout */
- void parse(const char *fileName);
+ void parse(const QCString &fileName);
void init();
private:
void addEntry(LayoutPart p,LayoutDocEntry*e);
@@ -224,7 +224,7 @@ class LayoutDocManager
friend class LayoutParser;
};
-void writeDefaultLayoutFile(const char *fileName);
+void writeDefaultLayoutFile(const QCString &fileName);
#endif
diff --git a/src/lexcode.h b/src/lexcode.h
index 38aec50..b64b691 100644
--- a/src/lexcode.h
+++ b/src/lexcode.h
@@ -33,11 +33,11 @@ class LexCodeParser : public CodeParserInterface
LexCodeParser();
virtual ~LexCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/lexcode.l b/src/lexcode.l
index a118703..23b2000 100644
--- a/src/lexcode.l
+++ b/src/lexcode.l
@@ -93,7 +93,7 @@ static void startCodeLine(yyscan_t yyscanner);
static void endFontClass(yyscan_t yyscanner);
static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
-static void codifyLines(yyscan_t yyscanner,const char *text);
+static void codifyLines(yyscan_t yyscanner,const QCString &text);
static void startFontClass(yyscan_t yyscanner,const char *s);
static int countLines(yyscan_t yyscanner);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -393,7 +393,7 @@ NONLopt [^\n]*
if (!yyextra->rulesPatternBuffer.isEmpty())
{
startFontClass(yyscanner,"stringliteral");
- codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
+ codifyLines(yyscanner,yyextra->rulesPatternBuffer);
yyextra->rulesPatternBuffer.resize(0);
endFontClass(yyscanner);
}
@@ -413,7 +413,7 @@ NONLopt [^\n]*
if (!yyextra->rulesPatternBuffer.isEmpty())
{
startFontClass(yyscanner,"stringliteral");
- codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
+ codifyLines(yyscanner,yyextra->rulesPatternBuffer);
yyextra->rulesPatternBuffer.resize(0);
endFontClass(yyscanner);
}
@@ -428,7 +428,7 @@ NONLopt [^\n]*
if (!yyextra->rulesPatternBuffer.isEmpty())
{
startFontClass(yyscanner,"stringliteral");
- codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
+ codifyLines(yyscanner,yyextra->rulesPatternBuffer);
yyextra->rulesPatternBuffer.resize(0);
endFontClass(yyscanner);
}
@@ -500,7 +500,7 @@ NONLopt [^\n]*
}
<SkipCurly>{B}*{RAWBEGIN} {
QCString raw=QCString(yytext).stripWhiteSpace();
- yyextra->delimiter = raw.data()+2;
+ yyextra->delimiter = raw.mid(2);
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
yyextra->lastRawStringContext = YY_START;
yyextra->CCodeBuffer += yytext;
@@ -930,7 +930,7 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->currentDefinition = d;
yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
- yyextra->classScope = d->name().copy();
+ yyextra->classScope = d->name();
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
if (yyextra->currentMemberDef)
@@ -944,13 +944,13 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
@@ -991,10 +991,11 @@ static void nextCodeLine(yyscan_t yyscanner)
}
}
-static void codifyLines(yyscan_t yyscanner,const char *text)
+static void codifyLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- const char *p=text,*sp=p;
+ if (text.isEmpty()) return;
+ const char *p=text.data(),*sp=p;
char c;
bool done=false;
while (!done)
@@ -1148,11 +1149,11 @@ void LexCodeParser::resetCodeParserState()
}
void LexCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName,
+ const QCString &exampleName,
FileDef *fileDef,
int startLine,
int endLine,
@@ -1168,10 +1169,10 @@ void LexCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (input.isEmpty()) return;
- printlex(yy_flex_debug, true, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, true, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = false;
@@ -1202,7 +1203,7 @@ void LexCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (isExampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exampleName?exampleName:"generated"));
+ yyextra->sourceFileDef = createFileDef(QCString(),!exampleName.isEmpty() ? exampleName : QCString("generated"));
cleanupSourceDef = true;
}
@@ -1230,7 +1231,7 @@ void LexCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
yyextra->sourceFileDef=0;
}
- printlex(yy_flex_debug, false, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, false, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
//---------------------------------------------------------------------------------
diff --git a/src/lexscanner.h b/src/lexscanner.h
index 8734c59..dbb1f56 100644
--- a/src/lexscanner.h
+++ b/src/lexscanner.h
@@ -29,12 +29,12 @@ class LexOutlineParser : public OutlineParserInterface
public:
LexOutlineParser();
~LexOutlineParser();
- void parseInput(const char *fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &extension) const { return TRUE; };
- void parsePrototype(const char *text){}
+ void parsePrototype(const QCString &text){}
private:
struct Private;
diff --git a/src/lexscanner.l b/src/lexscanner.l
index f148e16..fdb0229 100644
--- a/src/lexscanner.l
+++ b/src/lexscanner.l
@@ -74,7 +74,7 @@ struct lexscannerYY_state
bool nestedComment = false;
QCString prefix = "yy";
- QCString CCodeBuffer;
+ QCString cCodeBuffer;
int roundCount = 0;
int squareCount = 0;
@@ -188,80 +188,80 @@ NONLopt [^\n]*
yyextra->prefix = yyextra->prefix.mid(1,yyleng-2);
}
<OptPrefix>{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN (DefSection);
}
<DefSection>^{RulesStart} {
- yyextra->CCodeBuffer += "int " + yyextra->prefix + "lex (yyscan_t yyscanner) {\n";
+ yyextra->cCodeBuffer += "int " + yyextra->prefix + "lex (yyscan_t yyscanner) {\n";
BEGIN (RulesSectionInit);
}
<DefSection>^{TopStart} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
yyextra->lastContext = YY_START;
BEGIN (TopSection);
}
<DefSection>^{LiteralStart} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
yyextra->lastContext = YY_START;
BEGIN (LiteralSection);
}
<TopSection>^{TopEnd} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
BEGIN( yyextra->lastContext ) ;
}
<TopSection>.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<LiteralSection>^{LiteralEnd} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
BEGIN( yyextra->lastContext ) ;
}
<LiteralSection>.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DefSection>^{nws} {
BEGIN(DefSectionLine);
}
<DefSection>{CPPC}.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DefSection>^{ws}*{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastContext = YY_START;
BEGIN(COMMENT);
}
<COMMENT>{CCE}{ws}*{nl} {
- yyextra->CCodeBuffer+=yytext;
+ yyextra->cCodeBuffer+=yytext;
BEGIN(yyextra->lastContext);
}
<COMMENT>{CCE} {
- yyextra->CCodeBuffer+=yytext;
+ yyextra->cCodeBuffer+=yytext;
BEGIN(yyextra->lastContext);
}
<COMMENT>[^*\n]+ {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<COMMENT>{CPPC}|{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<COMMENT>{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<COMMENT>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DefSection>^{nl} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
}
<DefSection>^{ws}.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DefSectionLine>.*{nl} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
BEGIN(DefSection);
}
<RulesSectionInit,RulesPattern>^{RulesEnd} {
- yyextra->CCodeBuffer += "}\n";
+ yyextra->cCodeBuffer += "}\n";
BEGIN (UserSection);
}
<RulesSectionInit>^{nws} {
@@ -269,116 +269,116 @@ NONLopt [^\n]*
BEGIN(RulesPattern);
}
<RulesSectionInit>^{ws}.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RulesSectionInit>^{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RulesPattern>"<<EOF>>" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{EscapeRulesChar} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{RulesSharp} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{RulesCurly} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{StartDouble} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
yyextra->lastContext = YY_START;
BEGIN(RulesDouble);
}
<RulesDouble,RulesRoundDouble>"\\\\" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesDouble,RulesRoundDouble>"\\\"" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesDouble>"\"" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
BEGIN( yyextra->lastContext ) ;
}
<RulesRoundDouble>"\"" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
BEGIN(RulesRound) ;
}
<RulesDouble,RulesRoundDouble>. {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{StartSquare} {
yyextra->squareCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
yyextra->lastContext = YY_START;
BEGIN(RulesSquare);
}
<RulesSquare,RulesRoundSquare>"\\[" |
<RulesSquare,RulesRoundSquare>"\\]" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesSquare,RulesRoundSquare>"[" {
yyextra->squareCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesSquare>"]" {
yyextra->squareCount--;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
if (!yyextra->squareCount) BEGIN(RulesPattern);
}
<RulesRoundSquare>"]" {
yyextra->squareCount--;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
if (!yyextra->squareCount) BEGIN(RulesRound) ;
}
<RulesSquare,RulesRoundSquare>"\\\\" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesSquare,RulesRoundSquare>. {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{StartRound} {
yyextra->roundCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
yyextra->lastContext = YY_START;
BEGIN(RulesRound);
}
<RulesRound>{RulesCurly} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesRound>{StartSquare} {
yyextra->squareCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
BEGIN(RulesRoundSquare);
}
<RulesRound>{StartDouble} {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
BEGIN(RulesRoundDouble);
}
<RulesRound>"\\(" |
<RulesRound>"\\)" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesRound>"(" {
yyextra->roundCount++;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesRound>")" {
yyextra->roundCount--;
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
if (!yyextra->roundCount) BEGIN( yyextra->lastContext ) ;
}
<RulesRound>. {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{ws}+"|" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
yyextra->curlyCount = 0;
BEGIN(SkipCurly);
}
<RulesPattern>^{ws}*{nl} {
- yyextra->CCodeBuffer += "\n";
+ yyextra->cCodeBuffer += "\n";
}
<RulesPattern>^{ws}+ {
}
@@ -389,45 +389,45 @@ NONLopt [^\n]*
BEGIN(SkipCurly);
}
<RulesPattern>"\\\\" {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<RulesPattern>{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastContext = YY_START;
BEGIN(COMMENT);
}
<RulesPattern>. {
- yyextra->CCodeBuffer += repeatChar(' ', yyleng);
+ yyextra->cCodeBuffer += repeatChar(' ', yyleng);
}
<SkipCurly>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastPreLineCtrlContext = YY_START;
BEGIN( PreLineCtrl );
}
<PreLineCtrl>"\""[^\n\"]*"\"" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<PreLineCtrl>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<PreLineCtrl>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->lastPreLineCtrlContext );
}
<SkipCurly>"{" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
++yyextra->curlyCount ;
}
<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | /* see bug710917 */
<SkipCurly>"}" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if( yyextra->curlyCount )
{
--yyextra->curlyCount ;
}
}
<SkipCurly>"}"{BN}*{DCOMM}"<" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if ( yyextra->curlyCount )
{
--yyextra->curlyCount ;
@@ -446,53 +446,53 @@ NONLopt [^\n]*
}
}
<SkipCurly>\" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastStringContext=SkipCurly;
BEGIN( SkipString );
}
<SkipCurly>^{B}*"#" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastPreLineCtrlContext = YY_START;
BEGIN( PreLineCtrl );
}
<SkipCurly>{B}*{RAWBEGIN} {
QCString raw=QCString(yytext).stripWhiteSpace();
- yyextra->delimiter = raw.data()+2;
+ yyextra->delimiter = raw.mid(2);
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
yyextra->lastRawStringContext = YY_START;
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN(RawString);
}
<SkipCurly>[^\n#"'@\\/{}<]+ {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurly>{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastCContext = YY_START;
BEGIN(SkipComment);
}
<SkipCurly>{CPPC} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->lastCContext = YY_START;
BEGIN(SkipCxxComment);
}
<SkipCurly>{CHARLIT} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurly>\' {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurly>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurly>({CPPC}{B}*)?{CCS}"!" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockContext = YY_START;
BEGIN( DocBlock );
}
<SkipCurly>{CCS}"*"[*]+{BL} {
bool javadocBanner = Config_getBool(JAVADOC_BANNER);
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if( javadocBanner )
{
yyextra->docBlockContext = YY_START;
@@ -504,88 +504,88 @@ NONLopt [^\n]*
}
}
<SkipCurly>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockContext = YY_START;
BEGIN( DocBlock );
}
<SkipCurly>{CPPC}"!" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockContext = YY_START;
BEGIN( DocLine );
}
<SkipCurly>{CPPC}"/"/[^/] {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockContext = YY_START;
BEGIN( DocLine );
}
<SkipCurly>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yyextra->curlyCount<=0)
{
BEGIN(RulesPattern);
}
}
<SkipString>\\. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipString>\" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->lastStringContext );
}
<SkipString>{CCS}|{CCE}|{CPPC} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipString>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipString>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCxxComment>.*"\\\n" { // line continuation
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCxxComment>{ANYopt}/\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->lastCContext ) ;
}
<Comment>{BN}+ {
- yyextra->CCodeBuffer += yytext ;
+ yyextra->cCodeBuffer += yytext ;
}
-<Comment>{CCS} { yyextra->CCodeBuffer += yytext ; }
-<Comment>{CPPC} { yyextra->CCodeBuffer += yytext ; }
+<Comment>{CCS} { yyextra->cCodeBuffer += yytext ; }
+<Comment>{CPPC} { yyextra->cCodeBuffer += yytext ; }
<Comment>{CMD}("code"|"verbatim") {
yyextra->insideCode=TRUE;
- yyextra->CCodeBuffer += yytext ;
+ yyextra->cCodeBuffer += yytext ;
}
<Comment>{CMD}("endcode"|"endverbatim") {
yyextra->insideCode=FALSE;
- yyextra->CCodeBuffer += yytext ;
+ yyextra->cCodeBuffer += yytext ;
}
-<Comment>[^ \.\t\r\n\/\*]+ { yyextra->CCodeBuffer += yytext ; }
-<Comment>{CCE} { yyextra->CCodeBuffer += yytext ;
+<Comment>[^ \.\t\r\n\/\*]+ { yyextra->cCodeBuffer += yytext ; }
+<Comment>{CCE} { yyextra->cCodeBuffer += yytext ;
if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
}
-<Comment>. { yyextra->CCodeBuffer += *yytext ; }
+<Comment>. { yyextra->cCodeBuffer += *yytext ; }
<SkipComment>{CPPC}|{CCS} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipComment>[^\*\n]+ {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipComment>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipComment>{B}*{CCE} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->lastCContext );
}
<SkipComment>"*" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RawString>{RAWEND} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString delimiter = yytext+1;
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
@@ -594,60 +594,60 @@ NONLopt [^\n]*
}
}
<RawString>[^)\n]+ {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RawString>. {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<RawString>\n {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
/* ---- Single line comments ------ */
<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? { // continuation of multiline C++-style comment
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" { // ignore marker line (see bug700345)
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->docBlockContext );
}
<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" { // next line is an end group marker, see bug 752712
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->docBlockContext );
}
<DocLine>{NONLopt}/"\n" { // whole line
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN( yyextra->docBlockContext );
}
/* ---- Comments blocks ------ */
<DocBlock>"*"*{CCE} { // end of comment block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN(yyextra->docBlockContext);
}
<DocBlock>^{B}*"*"+/[^/] {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] { // start of a comment line
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>^{B}*({CPPC}){B}* { // strip embedded C++ comments if at the start of a line
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>{CPPC} { // slashes in the middle of a comment block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>{CCS} { // start of a new comment in the
// middle of a comment block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] { // escaped command
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>{CMD}("f$"|"f["|"f{") {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockName=&yytext[1];
if (yyextra->docBlockName.at(1)=='{')
{
@@ -658,21 +658,21 @@ NONLopt [^\n]*
BEGIN(DocCopyBlock);
}
<DocBlock>{B}*"<"{PRE}">" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockName="<pre>";
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
yyextra->docBlockName=&yytext[1];
yyextra->fencedSize=0;
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString pat = substitute(yytext,"*"," ");
yyextra->docBlockName="~~~";
yyextra->fencedSize=pat.stripWhiteSpace().length();
@@ -680,7 +680,7 @@ NONLopt [^\n]*
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString pat = substitute(yytext,"*"," ");
yyextra->docBlockName="```";
yyextra->fencedSize=pat.stripWhiteSpace().length();
@@ -691,43 +691,43 @@ NONLopt [^\n]*
REJECT;
}
<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>\n { // newline
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocBlock>. { // command block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
/* ---- Copy verbatim sections ------ */
<DocCopyBlock>"</"{PRE}">" { // end of a <pre> block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yyextra->docBlockName=="<pre>")
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>"</"{CODE}">" { // end of a <code> block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yyextra->docBlockName=="<code>")
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>[\\@]("f$"|"f]"|"f}") {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN(DocBlock);
}
<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (&yytext[4]==yyextra->docBlockName)
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>^{B}*"*"+/{BN}+ { // start of a comment line
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yyextra->docBlockName=="verbatim")
{
REJECT;
@@ -738,13 +738,13 @@ NONLopt [^\n]*
}
else
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
}
<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* { // start of a comment line with two *'s
if (yyextra->docBlockName=="code")
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
else
{
@@ -754,7 +754,7 @@ NONLopt [^\n]*
<DocCopyBlock>^{B}*"*"+/({ID}|"(") { // Assume *var or *(... is part of source code (see bug723516)
if (yyextra->docBlockName=="code")
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
else
{
@@ -766,11 +766,11 @@ NONLopt [^\n]*
{
if (yyextra->nestedComment) // keep * it is part of the code
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
else // remove * it is part of the comment block
{
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
}
else
@@ -779,7 +779,7 @@ NONLopt [^\n]*
}
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString pat = substitute(yytext,"*"," ");
if (yyextra->fencedSize==pat.stripWhiteSpace().length())
{
@@ -787,7 +787,7 @@ NONLopt [^\n]*
}
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
QCString pat = substitute(yytext,"*"," ");
if (yyextra->fencedSize==pat.stripWhiteSpace().length())
{
@@ -795,7 +795,7 @@ NONLopt [^\n]*
}
}
<DocCopyBlock>[^\<@/\*\]~\$\\\n]+ { // any character that is not special
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
if (yytext[1]=='*')
@@ -806,17 +806,17 @@ NONLopt [^\n]*
{
yyextra->nestedComment=FALSE;
}
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocCopyBlock>\n { // newline
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<DocCopyBlock>. { // any other character
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" { // desc is followed by another one
yyextra->docBlockContext = SkipCurlyEndDoc;
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
if (yytext[yyleng-3]=='/')
{
BEGIN( DocLine );
@@ -827,12 +827,12 @@ NONLopt [^\n]*
}
}
<SkipCurlyEndDoc>"}" {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
BEGIN(SkipCurly);
}
<UserSection>.*{nl} {
- yyextra->CCodeBuffer += yytext;
+ yyextra->cCodeBuffer += yytext;
}
/*
@@ -861,7 +861,7 @@ static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size)
//-----------------------------------------------------------------------------
static void parseMain(yyscan_t yyscanner,
- const char *fileName,
+ const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &rt,
ClangTUParser *clangParser)
@@ -877,7 +877,7 @@ static void parseMain(yyscan_t yyscanner,
yyextra->clangParser = clangParser;
yyextra->language = getLanguageFromFileName(yyextra->yyFileName);
rt->lang = yyextra->language;
- msg("Parsing file %s...\n",yyextra->yyFileName.data());
+ msg("Parsing file %s...\n",qPrint(yyextra->yyFileName));
yyextra->current_root = rt;
yyextra->current = std::make_shared<Entry>();
@@ -903,13 +903,12 @@ static void handleCCode(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (yyextra->CCodeBuffer.isEmpty()) return;
+ if (yyextra->cCodeBuffer.isEmpty()) return;
yyextra->cOutlineParser.parseInput(yyextra->yyFileName,
- yyextra->CCodeBuffer,
+ yyextra->cCodeBuffer.data(),
yyextra->current_root,
yyextra->clangParser);
- // SrcLangExt_Cpp,
- yyextra->CCodeBuffer.resize(0);
+ yyextra->cCodeBuffer.resize(0);
return;
}
//----------------------------------------------------------------------------
@@ -933,18 +932,18 @@ LexOutlineParser::~LexOutlineParser()
lexscannerYYlex_destroy(p->yyscanner);
}
-void LexOutlineParser::parseInput(const char *fileName,
+void LexOutlineParser::parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
::parseMain(p->yyscanner,fileName,fileBuf,root,clangParser);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
}
diff --git a/src/linkedmap.h b/src/linkedmap.h
index 0e866d9..db3f7b1 100644
--- a/src/linkedmap.h
+++ b/src/linkedmap.h
@@ -23,6 +23,8 @@
#include <algorithm>
#include <cctype>
+#include "qcstring.h"
+
//! @brief Container class representing a vector of objects with keys.
//! @details Objects can efficiently be looked up given the key.
//! Objects are owned by the container.
@@ -50,6 +52,14 @@ class LinkedMap
//! Find an object given the key.
//! Returns a pointer to the element if found or nullptr if it is not found.
+ const T *find(const QCString &key) const
+ {
+ auto it = m_lookup.find(key.str());
+ return it!=m_lookup.end() ? it->second : nullptr;
+ }
+
+ //! Find an object given the key.
+ //! Returns a pointer to the element if found or nullptr if it is not found.
const T *find(const char *key) const
{
return find(std::string(key ? key : ""));
@@ -62,6 +72,12 @@ class LinkedMap
}
//! A non-const wrapper for find() const
+ T* find(const QCString &key)
+ {
+ return const_cast<T*>(static_cast<const LinkedMap&>(*this).find(key));
+ }
+
+ //! A non-const wrapper for find() const
T* find(const std::string &key)
{
return const_cast<T*>(static_cast<const LinkedMap&>(*this).find(key));
@@ -77,7 +93,22 @@ class LinkedMap
if (result==nullptr)
{
std::string key(k ? k : "");
- Ptr ptr = std::make_unique<T>(key.c_str(),std::forward<Args>(args)...);
+ Ptr ptr = std::make_unique<T>(QCString(k),std::forward<Args>(args)...);
+ result = ptr.get();
+ m_lookup.insert({key,result});
+ m_entries.push_back(std::move(ptr));
+ }
+ return result;
+ }
+
+ template<class...Args>
+ T *add(const QCString &k, Args&&... args)
+ {
+ std::string key = k.str();
+ T *result = find(key);
+ if (result==nullptr)
+ {
+ Ptr ptr = std::make_unique<T>(k,std::forward<Args>(args)...);
result = ptr.get();
m_lookup.insert({key,result});
m_entries.push_back(std::move(ptr));
@@ -102,6 +133,19 @@ class LinkedMap
return result;
}
+ T *add(const QCString &k, Ptr &&ptr)
+ {
+ std::string key = k.str();
+ T *result = find(key);
+ if (result==nullptr)
+ {
+ result = ptr.get();
+ m_lookup.insert({key,result});
+ m_entries.push_back(std::move(ptr));
+ }
+ return result;
+ }
+
//! Prepends a new object to the ordered vector if it was not added already.
//! Return a non-owning pointer to the newly added object, or to the existing object if
//! it was already inserted before under the given key.
@@ -120,12 +164,25 @@ class LinkedMap
return result;
}
+ template<class...Args>
+ T *prepend(const QCString &key, Args&&... args)
+ {
+ T *result = find(key);
+ if (result==nullptr)
+ {
+ Ptr ptr = std::make_unique<T>(key,std::forward<Args>(args)...);
+ result = ptr.get();
+ m_lookup.insert({key.str(),result});
+ m_entries.push_front(std::move(ptr));
+ }
+ return result;
+ }
+
//! Removes an object from the container and deletes it.
//! Returns true if the object was deleted or false it is was not found.
- bool del(const char *key_)
+ bool del(const QCString &key)
{
- std::string key(key_ ? key_ : "");
- auto it = m_lookup.find(key);
+ auto it = m_lookup.find(key.str());
if (it!=m_lookup.end())
{
auto vecit = std::find_if(m_entries.begin(),m_entries.end(),[obj=it->second](auto &el) { return el.get()==obj; });
@@ -191,6 +248,14 @@ class LinkedRefMap
//! find an object given the key.
//! Returns a pointer to the object if found or nullptr if it is not found.
+ const T *find(const QCString &key) const
+ {
+ auto it = m_lookup.find(key.str());
+ return it!=m_lookup.end() ? it->second : nullptr;
+ }
+
+ //! find an object given the key.
+ //! Returns a pointer to the object if found or nullptr if it is not found.
const T *find(const char *key) const
{
return find(std::string(key ? key : ""));
@@ -202,6 +267,11 @@ class LinkedRefMap
return const_cast<T*>(static_cast<const LinkedRefMap&>(*this).find(key));
}
+ T* find(const QCString &key)
+ {
+ return const_cast<T*>(static_cast<const LinkedRefMap&>(*this).find(key));
+ }
+
//! non-const wrapper for find() const
T* find(const std::string &key)
{
@@ -226,6 +296,21 @@ class LinkedRefMap
}
}
+ bool add(const QCString &k, T* obj)
+ {
+ std::string key = k.str();
+ if (find(key)==nullptr) // new element
+ {
+ m_lookup.insert({key,obj});
+ m_entries.push_back(obj);
+ return true;
+ }
+ else // already existing, don't add
+ {
+ return false;
+ }
+ }
+
//! Prepends an object reference to the ordered vector if it was not added already.
//! Return true if the reference was added, and false if an object with the same key
//! was already added before
@@ -244,12 +329,25 @@ class LinkedRefMap
}
}
+ bool prepend(const QCString &key, T* obj)
+ {
+ if (find(key)==nullptr) // new element
+ {
+ m_lookup.insert({key.str(),obj});
+ m_entries.insert(m_entries.begin(),obj);
+ return true;
+ }
+ else // already existing, don't add
+ {
+ return false;
+ }
+ }
+
//! Removes an object from the container and deletes it.
//! Returns true if the object was deleted or false it is was not found.
- bool del(const char *key_)
+ bool del(const QCString &key)
{
- std::string key(key_ ? key_ : "");
- auto it = m_lookup.find(key);
+ auto it = m_lookup.find(key.str());
if (it!=m_lookup.end())
{
auto vecit = std::find_if(m_entries.begin(),m_entries.end(),[obj=it->second](auto &el) { return el.get()==obj; });
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index 894c910..d565648 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -29,7 +29,7 @@
#include "fileinfo.h"
ManDocVisitor::ManDocVisitor(TextStream &t,CodeOutputInterface &ci,
- const char *langExt)
+ const QCString &langExt)
: DocVisitor(DocVisitor_Man), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(FALSE),
m_indent(0), m_langExt(langExt)
{
@@ -371,7 +371,7 @@ void ManDocVisitor::visit(DocIncOperator *op)
if (locLangExt.isEmpty()) locLangExt = m_langExt;
SrcLangExt langExt = getLanguageFromFileName(locLangExt);
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
if (op->isFirst())
{
if (!m_hide)
@@ -1049,11 +1049,11 @@ void ManDocVisitor::visitPost(DocParBlock *)
}
-void ManDocVisitor::filter(const char *str)
+void ManDocVisitor::filter(const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c=0;
while ((c=*p++))
{
diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h
index d644111..341f37a 100644
--- a/src/mandocvisitor.h
+++ b/src/mandocvisitor.h
@@ -31,7 +31,7 @@ class TextStream;
class ManDocVisitor : public DocVisitor
{
public:
- ManDocVisitor(TextStream &t,CodeOutputInterface &ci,const char *langExt);
+ ManDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -144,7 +144,7 @@ class ManDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const QCString &str);
//--------------------------------------
// state variables
diff --git a/src/mangen.cpp b/src/mangen.cpp
index dc4cbb2..05c5e77 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -105,22 +105,22 @@ void ManGenerator::init()
Dir d(manOutput.str());
if (!d.exists() && !d.mkdir(manOutput.str()))
{
- term("Could not create output directory %s\n",manOutput.data());
+ term("Could not create output directory %s\n",qPrint(manOutput));
}
std::string manDir = manOutput.str()+"/"+getSubdir().str();
if (!d.exists(manDir) && !d.mkdir(manDir))
{
- term("Could not create output directory %s/%s\n",manOutput.data(), getSubdir().data());
+ term("Could not create output directory %s/%s\n",qPrint(manOutput), qPrint(getSubdir()));
}
createSubDirs(d);
}
-static QCString buildFileName(const char *name)
+static QCString buildFileName(const QCString &name)
{
QCString fileName;
- if (name==0) return "noname";
+ if (name.isEmpty()) return "noname";
- const char *p=name;
+ const char *p=name.data();
char c;
while ((c=*p++))
{
@@ -156,7 +156,7 @@ static QCString buildFileName(const char *name)
return fileName;
}
-void ManGenerator::startFile(const char *,const char *manName,const char *,int)
+void ManGenerator::startFile(const QCString &,const QCString &manName,const QCString &,int)
{
startPlainFile( buildFileName( manName ) );
m_firstCol=TRUE;
@@ -168,7 +168,7 @@ void ManGenerator::endFile()
endPlainFile();
}
-void ManGenerator::endTitleHead(const char *,const char *name)
+void ManGenerator::endTitleHead(const QCString &,const QCString &name)
{
m_t << ".TH \"" << name << "\" " << getExtension() << " \""
<< dateToString(FALSE) << "\" \"";
@@ -199,7 +199,7 @@ void ManGenerator::newParagraph()
m_paragraph=TRUE;
}
-void ManGenerator::startParagraph(const char *)
+void ManGenerator::startParagraph(const QCString &)
{
if (!m_paragraph)
{
@@ -214,38 +214,38 @@ void ManGenerator::endParagraph()
{
}
-void ManGenerator::writeString(const char *text)
+void ManGenerator::writeString(const QCString &text)
{
docify(text);
}
-void ManGenerator::startIndexItem(const char *,const char *)
+void ManGenerator::startIndexItem(const QCString &,const QCString &)
{
}
-void ManGenerator::endIndexItem(const char *,const char *)
+void ManGenerator::endIndexItem(const QCString &,const QCString &)
{
}
-void ManGenerator::writeStartAnnoItem(const char *,const char *,
- const char *,const char *)
+void ManGenerator::writeStartAnnoItem(const QCString &,const QCString &,
+ const QCString &,const QCString &)
{
}
-void ManGenerator::writeObjectLink(const char *,const char *,
- const char *, const char *name)
+void ManGenerator::writeObjectLink(const QCString &,const QCString &,
+ const QCString &, const QCString &name)
{
startBold(); docify(name); endBold();
}
-void ManGenerator::writeCodeLink(const char *,const char *,
- const char *, const char *name,
- const char *)
+void ManGenerator::writeCodeLink(const QCString &,const QCString &,
+ const QCString &, const QCString &name,
+ const QCString &)
{
docify(name);
}
-void ManGenerator::startHtmlLink(const char *)
+void ManGenerator::startHtmlLink(const QCString &)
{
}
@@ -253,7 +253,7 @@ void ManGenerator::endHtmlLink()
{
}
-//void ManGenerator::writeMailLink(const char *url)
+//void ManGenerator::writeMailLink(const QCString &url)
//{
// docify(url);
//}
@@ -274,7 +274,7 @@ void ManGenerator::endGroupHeader(int)
m_upperCase=FALSE;
}
-void ManGenerator::startMemberHeader(const char *,int)
+void ManGenerator::startMemberHeader(const QCString &,int)
{
if (!m_firstCol) m_t << "\n";
m_t << ".SS \"";
@@ -287,11 +287,11 @@ void ManGenerator::endMemberHeader()
m_paragraph=FALSE;
}
-void ManGenerator::docify(const char *str)
+void ManGenerator::docify(const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c=0;
while ((c=*p++))
{
@@ -311,12 +311,12 @@ void ManGenerator::docify(const char *str)
m_paragraph=FALSE;
}
-void ManGenerator::codify(const char *str)
+void ManGenerator::codify(const QCString &str)
{
//static char spaces[]=" ";
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
int spacesToNextTabStop;
while (*p)
@@ -392,7 +392,7 @@ void ManGenerator::endItemListItem()
{
}
-void ManGenerator::startCodeFragment(const char *)
+void ManGenerator::startCodeFragment(const QCString &)
{
newParagraph();
m_t << ".nf\n";
@@ -400,7 +400,7 @@ void ManGenerator::startCodeFragment(const char *)
m_paragraph=FALSE;
}
-void ManGenerator::endCodeFragment(const char *)
+void ManGenerator::endCodeFragment(const QCString &)
{
if (!m_firstCol) m_t << "\n";
m_t << ".fi\n";
@@ -409,7 +409,7 @@ void ManGenerator::endCodeFragment(const char *)
m_col=0;
}
-void ManGenerator::startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool)
+void ManGenerator::startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool)
{
if (!m_firstCol) m_t << "\n";
m_t << ".SS \"";
@@ -417,9 +417,9 @@ void ManGenerator::startMemberDoc(const char *,const char *,const char *,const c
m_paragraph=FALSE;
}
-void ManGenerator::startDoxyAnchor(const char *,const char *manName,
- const char *, const char *name,
- const char *)
+void ManGenerator::startDoxyAnchor(const QCString &,const QCString &manName,
+ const QCString &, const QCString &name,
+ const QCString &)
{
// something to be done?
if( !Config_getBool(MAN_LINKS) )
@@ -434,7 +434,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
if (i!=-1) baseName=baseName.right(baseName.length()-i-2);
//printf("Converting man link '%s'->'%s'->'%s'\n",
- // name,baseName.data(),buildFileName(baseName).data());
+ // name,qPrint(baseName),qPrint(buildFileName(baseName)));
// - remove dangerous characters and append suffix, then add dir prefix
QCString fileName=dir()+"/"+buildFileName( baseName );
@@ -539,7 +539,7 @@ void ManGenerator::endAnonTypeScope(int indentLevel)
}
-void ManGenerator::startMemberItem(const char *,int,const char *)
+void ManGenerator::startMemberItem(const QCString &,int,const QCString &)
{
if (m_firstCol && !m_insideTabbing) m_t << ".in +1c\n";
m_t << "\n.ti -1c\n.RI \"";
@@ -598,7 +598,7 @@ void ManGenerator::endMemberGroup(bool)
m_firstCol=FALSE;
}
-void ManGenerator::startSection(const char *,const char *,SectionType type)
+void ManGenerator::startSection(const QCString &,const QCString &,SectionType type)
{
if( !m_inHeader )
{
@@ -606,15 +606,15 @@ void ManGenerator::startSection(const char *,const char *,SectionType type)
{
case SectionType::Page: startGroupHeader(FALSE); break;
case SectionType::Section: startGroupHeader(FALSE); break;
- case SectionType::Subsection: startMemberHeader(0, -1); break;
- case SectionType::Subsubsection: startMemberHeader(0, -1); break;
- case SectionType::Paragraph: startMemberHeader(0, -1); break;
+ case SectionType::Subsection: startMemberHeader(QCString(), -1); break;
+ case SectionType::Subsubsection: startMemberHeader(QCString(), -1); break;
+ case SectionType::Paragraph: startMemberHeader(QCString(), -1); break;
default: ASSERT(0); break;
}
}
}
-void ManGenerator::endSection(const char *,SectionType type)
+void ManGenerator::endSection(const QCString &,SectionType type)
{
if( !m_inHeader )
{
@@ -655,7 +655,7 @@ void ManGenerator::endExamples()
{
}
-void ManGenerator::startDescTable(const char *title)
+void ManGenerator::startDescTable(const QCString &title)
{
if (!m_firstCol)
{ m_t << "\n.PP\n";
@@ -675,7 +675,7 @@ void ManGenerator::endDescTable()
endDescForItem();
}
-void ManGenerator::startParamList(ParamListTypes,const char *title)
+void ManGenerator::startParamList(ParamListTypes,const QCString &title)
{
if (!m_firstCol)
{ m_t << "\n.PP\n";
@@ -702,7 +702,7 @@ void ManGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,i
m_paragraph = FALSE;
}
-void ManGenerator::startConstraintList(const char *header)
+void ManGenerator::startConstraintList(const QCString &header)
{
if (!m_firstCol)
{ m_t << "\n.PP\n";
@@ -830,7 +830,7 @@ void ManGenerator::startLabels()
{
}
-void ManGenerator::writeLabel(const char *l,bool isLast)
+void ManGenerator::writeLabel(const QCString &l,bool isLast)
{
m_t << "\\fC [" << l << "]\\fP";
if (!isLast) m_t << ", ";
diff --git a/src/mangen.h b/src/mangen.h
index 8b9c3cd..c552580 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -35,27 +35,27 @@ class ManGenerator : public OutputGenerator
void writeDoc(DocNode *,const Definition *,const MemberDef *,int);
static void init();
- void startFile(const char *name,const char *manName,const char *title,int);
+ void startFile(const QCString &name,const QCString &manName,const QCString &title,int);
void writeSearchInfo() {}
- void writeFooter(const char *) {}
+ void writeFooter(const QCString &) {}
void endFile();
void clearBuffer();
void startIndexSection(IndexSections) {}
void endIndexSection(IndexSections) {}
- void writePageLink(const char *,bool) {}
+ void writePageLink(const QCString &,bool) {}
void startProjectNumber() {}
void endProjectNumber() {}
void writeStyleInfo(int) {}
- void startTitleHead(const char *) {}
- void endTitleHead(const char *,const char *);
+ void startTitleHead(const QCString &) {}
+ void endTitleHead(const QCString &,const QCString &);
void startTitle();
void endTitle();
void newParagraph();
- void startParagraph(const char *classDef);
+ void startParagraph(const QCString &classDef);
void endParagraph();
- void writeString(const char *text);
+ void writeString(const QCString &text);
void startIndexListItem() {}
void endIndexListItem() {}
void startIndexList() {}
@@ -63,24 +63,24 @@ class ManGenerator : public OutputGenerator
void startIndexKey() {}
void endIndexKey() {}
void startIndexValue(bool) {}
- void endIndexValue(const char *,bool) {}
+ void endIndexValue(const QCString &,bool) {}
void startItemList() {}
void endItemList() { newParagraph(); }
- void startIndexItem(const char *ref,const char *file);
- void endIndexItem(const char *ref,const char *file);
- void docify(const char *text);
- void codify(const char *text);
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor,const char *name);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+ void startIndexItem(const QCString &ref,const QCString &file);
+ void endIndexItem(const QCString &ref,const QCString &file);
+ void docify(const QCString &text);
+ void codify(const QCString &text);
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name);
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
) {}
- void startTextLink(const char *,const char *) {}
+ void startTextLink(const QCString &,const QCString &) {}
void endTextLink() {}
- void startHtmlLink(const char *url);
+ void startHtmlLink(const QCString &url);
void endHtmlLink();
void startTypewriter() { m_t << "\\fC"; m_firstCol=FALSE; }
void endTypewriter() { m_t << "\\fP"; m_firstCol=FALSE; }
@@ -90,7 +90,7 @@ class ManGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection();
- void startMemberHeader(const char *,int);
+ void startMemberHeader(const QCString &,int);
void endMemberHeader();
void insertMemberAlign(bool) {}
void insertMemberAlignLeft(int,bool){}
@@ -107,10 +107,10 @@ class ManGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int);
void endAnonTypeScope(int);
- void startMemberItem(const char *,int,const char *);
+ void startMemberItem(const QCString &,int,const QCString &);
void endMemberItem();
void startMemberTemplateParams() {}
- void endMemberTemplateParams(const char *,const char *) {}
+ void endMemberTemplateParams(const QCString &,const QCString &) {}
void startCompoundTemplateParams() { startSubsubsection(); }
void endCompoundTemplateParams() { endSubsubsection(); }
@@ -122,10 +122,10 @@ class ManGenerator : public OutputGenerator
void endMemberGroup(bool);
void writeRuler() {}
- void writeAnchor(const char *,const char *) {}
- void startCodeFragment(const char *);
- void endCodeFragment(const char *);
- void writeLineNumber(const char *,const char *,const char *,int l) { m_t << l << " "; m_col=0; }
+ void writeAnchor(const QCString &,const QCString &) {}
+ void startCodeFragment(const QCString &);
+ void endCodeFragment(const QCString &);
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int l) { m_t << l << " "; m_col=0; }
void startCodeLine(bool) {}
void endCodeLine() { codify("\n"); m_col=0; }
void startEmphasis() { m_t << "\\fI"; m_firstCol=FALSE; }
@@ -136,16 +136,16 @@ class ManGenerator : public OutputGenerator
void endDescription() {}
void startDescItem();
void endDescItem();
- void lineBreak(const char *) { m_t << "\n.br\n"; }
+ void lineBreak(const QCString &) { m_t << "\n.br\n"; }
void writeChar(char c);
- void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
+ void startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
- void endDoxyAnchor(const char *,const char *) {}
+ void startDoxyAnchor(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &);
+ void endDoxyAnchor(const QCString &,const QCString &) {}
void writeLatexSpacing() {}
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name);
- void writeEndAnnoItem(const char *) { m_t << "\n"; m_firstCol=TRUE; }
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name);
+ void writeEndAnnoItem(const QCString &) { m_t << "\n"; m_firstCol=TRUE; }
void startSubsection();
void endSubsection();
void startSubsubsection();
@@ -154,43 +154,43 @@ class ManGenerator : public OutputGenerator
void endCenter() {}
void startSmall() {}
void endSmall() {}
- void startMemberDescription(const char *,const char *,bool) { m_t << "\n.RI \""; m_firstCol=FALSE; }
+ void startMemberDescription(const QCString &,const QCString &,bool) { m_t << "\n.RI \""; m_firstCol=FALSE; }
void endMemberDescription() { m_t << "\""; m_firstCol=FALSE; }
void startMemberDeclaration() {}
- void endMemberDeclaration(const char *,const char *) {}
- void writeInheritedSectionTitle(const char *,const char *,const char *,
- const char *,const char *,const char *) {}
+ void endMemberDeclaration(const QCString &,const QCString &) {}
+ void writeInheritedSectionTitle(const QCString &,const QCString &,const QCString &,
+ const QCString &,const QCString &,const QCString &) {}
void startDescList(SectionTypes);
void endDescList() {}
void startExamples();
void endExamples();
- void startParamList(ParamListTypes,const char *title);
+ void startParamList(ParamListTypes,const QCString &title);
void endParamList();
//void writeDescItem();
void startDescForItem();
void endDescForItem();
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void addIndexItem(const char *,const char *) {}
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void addIndexItem(const QCString &,const QCString &) {}
void startIndent() {}
void endIndent() {}
void writeSynopsis();
void startClassDiagram() {}
- void endClassDiagram(const ClassDiagram &,const char *,const char *) {}
+ void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &) {}
void startPageRef() {}
- void endPageRef(const char *,const char *) {}
+ void endPageRef(const QCString &,const QCString &) {}
void startQuickIndices() {}
void endQuickIndices() {}
- void writeSplitBar(const char *) {}
- void writeNavigationPath(const char *) {}
+ void writeSplitBar(const QCString &) {}
+ void writeNavigationPath(const QCString &) {}
void writeLogo() {}
- void writeQuickLinks(bool,HighlightedItem,const char *) {}
- void writeSummaryLink(const char *,const char *,const char *,bool) {}
+ void writeQuickLinks(bool,HighlightedItem,const QCString &) {}
+ void writeSummaryLink(const QCString &,const QCString &,const QCString &,bool) {}
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int n) { int i; for (i=0;i<n;i++) m_t << " "; }
- void startDescTable(const char *t);
+ void startDescTable(const QCString &t);
void endDescTable();
void startDescTableRow() {}
void endDescTableRow() {}
@@ -219,18 +219,18 @@ class ManGenerator : public OutputGenerator
void endMemberDocPrefixItem() {}
void startMemberDocName(bool) {}
void endMemberDocName() {}
- void startParameterType(bool,const char *) {}
+ void startParameterType(bool,const QCString &) {}
void endParameterType() {}
void startParameterName(bool) {}
void endParameterName(bool,bool,bool) {}
void startParameterList(bool) {}
void endParameterList() {}
- void exceptionEntry(const char*,bool) {}
+ void exceptionEntry(const QCString &,bool) {}
- void startFontClass(const char *) {}
+ void startFontClass(const QCString &) {}
void endFontClass() {}
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -249,12 +249,12 @@ class ManGenerator : public OutputGenerator
void endInlineMemberDoc();
void startLabels();
- void writeLabel(const char *l,bool isLast);
+ void writeLabel(const QCString &l,bool isLast);
void endLabels();
- void writeCodeAnchor(const char *) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
+ void writeCodeAnchor(const QCString &) {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) {}
+ void addWord(const QCString &,bool) {}
private:
bool m_firstCol = true;
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 3de454b..8426c36 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -69,22 +69,22 @@
class Trace
{
public:
- Trace(const char *func) : m_func(func)
+ Trace(const QCString &func) : m_func(func)
{
if (Debug::isFlagSet(Debug::Markdown))
{
- fprintf(IOSTREAM,"> %s\n",func);
+ fprintf(IOSTREAM,"> %s\n",qPrint(func));
s_indent++;
}
}
- Trace(const char *func,const char *data) : m_func(func)
+ Trace(const QCString &func,const QCString &data) : m_func(func)
{
if (Debug::isFlagSet(Debug::Markdown))
{
indent();
char data_s[DATA_BUFSIZE*2+1] = ""; // worst case each input char outputs 2 chars + 0 terminator.
int j=0;
- if (data)
+ if (!data.isEmpty())
{
for (int i=0;i<DATA_BUFSIZE;i++)
{
@@ -98,7 +98,7 @@ class Trace
}
}
data_s[j++]=0;
- fprintf(IOSTREAM,"> %s data=[%s…]\n",func,data_s);
+ fprintf(IOSTREAM,"> %s data=[%s…]\n",qPrint(func),data_s);
s_indent++;
}
}
@@ -108,7 +108,7 @@ class Trace
{
s_indent--;
indent();
- fprintf(IOSTREAM,"< %s\n",m_func);
+ fprintf(IOSTREAM,"< %s\n",qPrint(m_func));
}
}
void trace(const char *fmt,...)
@@ -116,7 +116,7 @@ class Trace
if (Debug::isFlagSet(Debug::Markdown))
{
indent();
- fprintf(IOSTREAM,": %s: ",m_func);
+ fprintf(IOSTREAM,": %s: ",qPrint(m_func));
va_list args;
va_start(args,fmt);
vfprintf(IOSTREAM, fmt, args);
@@ -125,7 +125,7 @@ class Trace
}
private:
void indent() { for (int i=0;i<s_indent;i++) fputs(" ",IOSTREAM); }
- const char *m_func;
+ QCString m_func;
static int s_indent;
};
@@ -173,7 +173,7 @@ struct TableCell
bool colSpan;
};
-Markdown::Markdown(const char *fileName,int lineNr,int indentLevel)
+Markdown::Markdown(const QCString &fileName,int lineNr,int indentLevel)
: m_fileName(fileName), m_lineNr(lineNr), m_indentLevel(indentLevel)
{
using namespace std::placeholders;
@@ -217,10 +217,10 @@ inline int isNewline(const char *data)
// escape double quotes in string
static QCString escapeDoubleQuotes(const QCString &s)
{
- TRACE(s.data());
- if (s.isEmpty()) return "";
+ TRACE(s);
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c,pc='\0';
while ((c=*p++))
{
@@ -237,11 +237,11 @@ static QCString escapeDoubleQuotes(const QCString &s)
// escape characters that have a special meaning later on.
static QCString escapeSpecialChars(const QCString &s)
{
- TRACE(s.data());
- if (s.isEmpty()) return "";
+ TRACE(s);
+ if (s.isEmpty()) return s;
bool insideQuote=FALSE;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c,pc='\0';
while ((c=*p++))
{
@@ -263,7 +263,7 @@ static QCString escapeSpecialChars(const QCString &s)
static void convertStringFragment(QCString &result,const char *data,int size)
{
- TRACE(result.data());
+ TRACE(result);
if (size<0) size=0;
result.resize(size+1);
memcpy(result.rawData(),data,size);
@@ -435,7 +435,7 @@ int Markdown::findEmphasisChar(const char *data, int size, char c, int c_size)
if ((data[i]=='\\' || data[i]=='@') && // command
data[i-1]!='\\' && data[i-1]!='@') // not escaped
{
- if (qstrncmp(&data[i+1],endBlockName,l)==0)
+ if (qstrncmp(&data[i+1],endBlockName.data(),l)==0)
{
break;
}
@@ -697,13 +697,13 @@ int Markdown::processHtmlTagWrite(const char *data,int offset,int size,bool doWr
{
if (data[i]=='/' && i<size-1 && data[i+1]=='>') // <bla/>
{
- //printf("Found htmlTag={%s}\n",QCString(data).left(i+2).data());
+ //printf("Found htmlTag={%s}\n",qPrint(QCString(data).left(i+2)));
if (doWrite) m_out.addStr(data,i+2);
return i+2;
}
else if (data[i]=='>') // <bla>
{
- //printf("Found htmlTag={%s}\n",QCString(data).left(i+1).data());
+ //printf("Found htmlTag={%s}\n",qPrint(QCString(data).left(i+1)));
if (doWrite) m_out.addStr(data,i+1);
return i+1;
}
@@ -723,7 +723,7 @@ int Markdown::processHtmlTagWrite(const char *data,int offset,int size,bool doWr
}
else if (!insideAttr && data[i]=='>') // found end of tag
{
- //printf("Found htmlTag={%s}\n",QCString(data).left(i+1).data());
+ //printf("Found htmlTag={%s}\n",qPrint(QCString(data).left(i+1)));
if (doWrite) m_out.addStr(data,i+1);
return i+1;
}
@@ -862,7 +862,7 @@ int Markdown::processLink(const char *data,int,int size)
if (i>=size) return 0; // premature end of comment -> no link
contentEnd=i;
convertStringFragment(content,data+contentStart,contentEnd-contentStart);
- //printf("processLink: content={%s}\n",content.data());
+ //printf("processLink: content={%s}\n",qPrint(content));
if (!isImageLink && content.isEmpty()) return 0; // no link text
i++; // skip over ]
@@ -911,7 +911,7 @@ int Markdown::processLink(const char *data,int,int size)
if (i>=size || data[i]=='\n') return 0;
convertStringFragment(link,data+linkStart,i-linkStart);
link = link.stripWhiteSpace();
- //printf("processLink: link={%s}\n",link.data());
+ //printf("processLink: link={%s}\n",qPrint(link));
if (link.isEmpty()) return 0;
if (link.at(link.length()-1)=='>') link=link.left(link.length()-1);
@@ -941,7 +941,7 @@ int Markdown::processLink(const char *data,int,int size)
if (data[titleEnd]==c) // found it
{
convertStringFragment(title,data+titleStart,titleEnd-titleStart);
- //printf("processLink: title={%s}\n",title.data());
+ //printf("processLink: title={%s}\n",qPrint(title));
}
else
{
@@ -968,7 +968,7 @@ int Markdown::processLink(const char *data,int,int size)
if (i>=size) return 0;
// extract link
convertStringFragment(link,data+linkStart,i-linkStart);
- //printf("processLink: link={%s}\n",link.data());
+ //printf("processLink: link={%s}\n",qPrint(link));
link = link.stripWhiteSpace();
if (link.isEmpty()) // shortcut link
{
@@ -981,11 +981,11 @@ int Markdown::processLink(const char *data,int,int size)
{
link = lr_it->second.link;
title = lr_it->second.title;
- //printf("processLink: ref: link={%s} title={%s}\n",link.data(),title.data());
+ //printf("processLink: ref: link={%s} title={%s}\n",qPrint(link),qPrint(title));
}
else // reference not found!
{
- //printf("processLink: ref {%s} do not exist\n",link.lower().data());
+ //printf("processLink: ref {%s} do not exist\n",link.qPrint(lower()));
return 0;
}
i++;
@@ -994,7 +994,7 @@ int Markdown::processLink(const char *data,int,int size)
{
QCString content_lower = content.lower();
auto lr_it = m_linkRefs.find(content_lower.str());
- //printf("processLink: minimal link {%s} lr=%p",content.data(),lr);
+ //printf("processLink: minimal link {%s} lr=%p",qPrint(content),lr);
if (lr_it!=m_linkRefs.end()) // found it
{
link = lr_it->second.link;
@@ -1113,12 +1113,12 @@ int Markdown::processLink(const char *data,int,int size)
}
m_out.addStr(">");
content = content.simplifyWhiteSpace();
- processInline(content,content.length());
+ processInline(content.data(),content.length());
m_out.addStr("</a>");
}
else // avoid link to e.g. F[x](y)
{
- //printf("no link for '%s'\n",link.data());
+ //printf("no link for '%s'\n",qPrint(link));
return 0;
}
}
@@ -1186,7 +1186,7 @@ int Markdown::processCodeSpan(const char *data, int /*offset*/, int size)
f_end--;
}
- //printf("found code span '%s'\n",QCString(data+f_begin).left(f_end-f_begin).data());
+ //printf("found code span '%s'\n",qPrint(QCString(data+f_begin).left(f_end-f_begin)));
/* real code span */
if (f_begin < f_end)
@@ -1228,7 +1228,7 @@ int Markdown::processSpecialCommand(const char *data, int offset, int size)
if ((data[i]=='\\' || data[i]=='@') && // command
data[i-1]!='\\' && data[i-1]!='@') // not escaped
{
- if (qstrncmp(&data[i+1],endBlockName,l)==0)
+ if (qstrncmp(&data[i+1],endBlockName.data(),l)==0)
{
//printf("found end at %d\n",i);
addStrEscapeUtf8Nbsp(data,i+1+l);
@@ -1365,7 +1365,7 @@ static int isLinkRef(const char *data,int size,
if (i>=size || data[i]!=']') return 0;
convertStringFragment(refid,data+refIdStart,i-refIdStart);
if (refid.isEmpty()) return 0;
- //printf(" isLinkRef: found refid='%s'\n",refid.data());
+ //printf(" isLinkRef: found refid='%s'\n",qPrint(refid));
i++;
if (i>=size || data[i]!=':') return 0;
i++;
@@ -1386,7 +1386,7 @@ static int isLinkRef(const char *data,int size,
if (i<size && data[i]=='>') i++;
if (linkStart==linkEnd) return 0; // empty link
convertStringFragment(link,data+linkStart,linkEnd-linkStart);
- //printf(" isLinkRef: found link='%s'\n",link.data());
+ //printf(" isLinkRef: found link='%s'\n",qPrint(link));
if (link=="@ref" || link=="\\ref")
{
int argStart=i;
@@ -1431,7 +1431,7 @@ static int isLinkRef(const char *data,int size,
{
convertStringFragment(title,data+titleStart,end-titleStart);
}
- //printf(" title found: '%s'\n",title.data());
+ //printf(" title found: '%s'\n",qPrint(title));
}
while (i<size && data[i]==' ') i++;
//printf("end of isLinkRef: i=%d size=%d data[i]='%c' eol=%d\n",
@@ -1471,7 +1471,7 @@ static int isHRuler(const char *data,int size)
static QCString extractTitleId(QCString &title, int level)
{
- TRACE(title.data());
+ TRACE(title);
// match e.g. '{#id-b11} ' and capture 'id-b11'
static const reg::Ex r2(R"({#(\a[\w-]*)}\s*$)");
reg::Match match;
@@ -1480,7 +1480,7 @@ static QCString extractTitleId(QCString &title, int level)
{
std::string id = match[1].str();
title = title.left((int)match.position());
- //printf("found match id='%s' title=%s\n",id.c_str(),title.data());
+ //printf("found match id='%s' title=%s\n",id.c_str(),qPrint(title));
return id;
}
if ((level > 0) && (level <= Config_getInt(TOC_INCLUDE_HEADINGS)))
@@ -1488,10 +1488,10 @@ static QCString extractTitleId(QCString &title, int level)
static AtomicInt autoId { 0 };
QCString id;
id.sprintf("autotoc_md%d",autoId++);
- //printf("auto-generated id='%s' title='%s'\n",id.data(),title.data());
+ //printf("auto-generated id='%s' title='%s'\n",qPrint(id),qPrint(title));
return id;
}
- //printf("no id found in title '%s'\n",title.data());
+ //printf("no id found in title '%s'\n",qPrint(title));
return "";
}
@@ -1641,7 +1641,7 @@ static int computeIndentExcludingListMarkers(const char *data,int size)
}
indent++,i++;
}
- //printf("{%s}->%d\n",QCString(data).left(size).data(),indent);
+ //printf("{%s}->%d\n",QCString(data).qPrint(left(size)),indent);
return indent;
}
@@ -1731,8 +1731,8 @@ static bool isCodeBlock(const char *data,int offset,int size,int &indent)
{
//printf(" positions: nl_pos=[%d,%d,%d] line[-2]='%s' line[-1]='%s'\n",
// nl_pos[0],nl_pos[1],nl_pos[2],
- // QCString(data+nl_pos[1]).left(nl_pos[0]-nl_pos[1]-1).data(),
- // QCString(data+nl_pos[2]).left(nl_pos[1]-nl_pos[2]-1).data());
+ // qPrint(QCString(data+nl_pos[1]).left(nl_pos[0]-nl_pos[1]-1)),
+ // qPrint(QCString(data+nl_pos[2]).left(nl_pos[1]-nl_pos[2]-1)));
// check that line -1 is empty
if (!isEmptyLine(data+nl_pos[1],nl_pos[0]-nl_pos[1]-1))
@@ -2177,7 +2177,7 @@ int Markdown::writeCodeBlock(const char *data,int size,int refIndent)
{
TRACE(data);
int i=0,end;
- //printf("writeCodeBlock: data={%s}\n",QCString(data).left(size).data());
+ //printf("writeCodeBlock: data={%s}\n",qPrint(QCString(data).left(size)));
// no need for \ilinebr here as the previous line was empty and was skipped
m_out.addStr("@verbatim\n");
int emptyLines=0;
@@ -2190,7 +2190,7 @@ int Markdown::writeCodeBlock(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),qPrint(QCString(data+i).left(end-i-1)));
if (j==end-1) // empty line
{
emptyLines++;
@@ -2254,10 +2254,10 @@ void Markdown::findEndOfLine(const char *data,int size,
data[end-1]!='\\' && data[end-1]!='@'
)
{
- if (qstrncmp(&data[end+1],endBlockName,l)==0)
+ if (qstrncmp(&data[end+1],endBlockName.data(),l)==0)
{
// found end marker, skip over this block
- //printf("feol.block m_out={%s}\n",QCString(data+i).left(end+l+1-i).data());
+ //printf("feol.block m_out={%s}\n",qPrint(QCString(data+i).left(end+l+1-i)));
end = end + l + 2;
break;
}
@@ -2297,7 +2297,7 @@ void Markdown::findEndOfLine(const char *data,int size,
}
}
if (j>0) end+=j-1;
- //printf("findEndOfLine pi=%d i=%d end=%d {%s}\n",pi,i,end,QCString(data+i).left(end-i).data());
+ //printf("findEndOfLine pi=%d i=%d end=%d {%s}\n",pi,i,end,qPrint(QCString(data+i).left(end-i)));
}
void Markdown::writeFencedCodeBlock(const char *data,const char *lng,
@@ -2317,7 +2317,7 @@ void Markdown::writeFencedCodeBlock(const char *data,const char *lng,
QCString Markdown::processQuotations(const QCString &s,int refIndent)
{
- TRACE(s.data());
+ TRACE(s);
m_out.clear();
const char *data = s.data();
int size = s.length();
@@ -2333,7 +2333,7 @@ QCString Markdown::processQuotations(const QCString &s,int refIndent)
{
if (isFencedCodeBlock(data+pi,size-pi,refIndent,lang,blockStart,blockEnd,blockOffset))
{
- writeFencedCodeBlock(data+pi,lang,blockStart,blockEnd);
+ writeFencedCodeBlock(data+pi,lang.data(),blockStart,blockEnd);
i=pi+blockOffset;
pi=-1;
end=i+1;
@@ -2369,14 +2369,14 @@ QCString Markdown::processQuotations(const QCString &s,int refIndent)
m_out.addChar(0);
//printf("Process quotations\n---- input ----\n%s\n---- output ----\n%s\n------------\n",
- // s.data(),m_out.get());
+ // qPrint(s),m_out.get());
return m_out.get();
}
QCString Markdown::processBlocks(const QCString &s,int indent)
{
- TRACE(s.data());
+ TRACE(s);
m_out.clear();
const char *data = s.data();
int size = s.length();
@@ -2441,7 +2441,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
if ((data[i]=='\\' || data[i]=='@') && // command
data[i-1]!='\\' && data[i-1]!='@') // not escaped
{
- if (qstrncmp(&data[i+1],endBlockName,l)==0)
+ if (qstrncmp(&data[i+1],endBlockName.data(),l)==0)
{
m_out.addChar(data[i]);
m_out.addStr(endBlockName);
@@ -2461,7 +2461,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
QCString header;
convertStringFragment(header,data+pi,i-pi-1);
id = extractTitleId(header, level);
- //printf("header='%s' is='%s'\n",header.data(),id.data());
+ //printf("header='%s' is='%s'\n",qPrint(header),qPrint(id));
if (!header.isEmpty())
{
if (!id.isEmpty())
@@ -2491,7 +2491,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
else if ((ref=isLinkRef(data+pi,size-pi,id,link,title)))
{
//printf("found link ref: id='%s' link='%s' title='%s'\n",
- // id.data(),link.data(),title.data());
+ // qPrint(id),qPrint(link),qPrint(title));
m_linkRefs.insert({id.lower().str(),LinkRef(link,title)});
i=ref+pi;
pi=-1;
@@ -2500,8 +2500,8 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
else if (isFencedCodeBlock(data+pi,size-pi,indent,lang,blockStart,blockEnd,blockOffset))
{
//printf("Found FencedCodeBlock lang='%s' start=%d end=%d code={%s}\n",
- // lang.data(),blockStart,blockEnd,QCString(data+pi+blockStart).left(blockEnd-blockStart).data());
- writeFencedCodeBlock(data+pi,lang,blockStart,blockEnd);
+ // qPrint(lang),blockStart,blockEnd,QCString(data+pi+blockStart).left(blockEnd-blockStart).data());
+ writeFencedCodeBlock(data+pi,lang.data(),blockStart,blockEnd);
i=pi+blockOffset;
pi=-1;
end=i+1;
@@ -2536,7 +2536,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
if (isLinkRef(data+pi,size-pi,id,link,title))
{
//printf("found link ref: id='%s' link='%s' title='%s'\n",
- // id.data(),link.data(),title.data());
+ // qPrint(id),qPrint(link),qPrint(title));
m_linkRefs.insert({id.lower().str(),LinkRef(link,title)});
}
else
@@ -2552,7 +2552,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent)
/** returns TRUE if input string docs starts with \@page or \@mainpage command */
static bool isExplicitPage(const QCString &docs)
{
- TRACE(docs.data());
+ TRACE(docs);
int i=0;
const char *data = docs.data();
if (data)
@@ -2575,7 +2575,7 @@ static bool isExplicitPage(const QCString &docs)
QCString Markdown::extractPageTitle(QCString &docs,QCString &id, int &prepend)
{
- TRACE(docs.data());
+ TRACE(docs);
// first first non-empty line
prepend = 0;
QCString title;
@@ -2618,13 +2618,13 @@ QCString Markdown::extractPageTitle(QCString &docs,QCString &id, int &prepend)
docs=docs_org;
id = extractTitleId(title, 0);
}
- //printf("extractPageTitle(title='%s' docs='%s' id='%s')\n",title.data(),docs.data(),id.data());
+ //printf("extractPageTitle(title='%s' docs='%s' id='%s')\n",qPrint(title),qPrint(docs),qPrint(id));
return title;
}
QCString Markdown::detab(const QCString &s,int &refIndent)
{
- TRACE(s.data());
+ TRACE(s);
int tabSize = Config_getInt(TAB_SIZE);
int size = s.length();
m_out.clear();
@@ -2701,19 +2701,19 @@ QCString Markdown::process(const QCString &input, int &startNewlines)
QCString s = input;
if (s.at(s.length()-1)!='\n') s += "\n"; // see PR #6766
s = detab(s,refIndent);
- //printf("======== DeTab =========\n---- output -----\n%s\n---------\n",s.data());
+ //printf("======== DeTab =========\n---- output -----\n%s\n---------\n",qPrint(s));
// then process quotation blocks (as these may contain other blocks)
s = processQuotations(s,refIndent);
- //printf("======== Quotations =========\n---- output -----\n%s\n---------\n",s.data());
+ //printf("======== Quotations =========\n---- output -----\n%s\n---------\n",qPrint(s));
// then process block items (headers, rules, and code blocks, references)
s = processBlocks(s,refIndent);
- //printf("======== Blocks =========\n---- output -----\n%s\n---------\n",s.data());
+ //printf("======== Blocks =========\n---- output -----\n%s\n---------\n",qPrint(s));
// finally process the inline markup (links, emphasis and code spans)
m_out.clear();
- processInline(s,s.length());
+ processInline(s.data(),s.length());
m_out.addChar(0);
Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n=========\n",qPrint(input),qPrint(m_out.get()));
@@ -2738,7 +2738,7 @@ QCString Markdown::process(const QCString &input, int &startNewlines)
QCString markdownFileNameToId(const QCString &fileName)
{
- TRACE(fileName.data());
+ TRACE(fileName);
std::string absFileName = FileInfo(fileName.str()).absFilePath();
QCString baseFn = stripFromPath(absFileName.c_str());
int i = baseFn.findRev('.');
@@ -2770,7 +2770,7 @@ MarkdownOutlineParser::~MarkdownOutlineParser()
{
}
-void MarkdownOutlineParser::parseInput(const char *fileName,
+void MarkdownOutlineParser::parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser* /*clangParser*/)
@@ -2788,7 +2788,7 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
if (id.startsWith("autotoc_md")) id = "";
int indentLevel=title.isEmpty() ? 0 : -1;
markdown.setIndentLevel(indentLevel);
- QCString fn = FileInfo(fileName).fileName();
+ QCString fn = FileInfo(fileName.str()).fileName();
QCString titleFn = stripExtensionGeneral(fn,getFileNameExtension(fn));
QCString mdfileAsMainPage = Config_getString(USE_MDFILE_AS_MAINPAGE);
bool wasEmpty = id.isEmpty();
@@ -2797,7 +2797,7 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
{
if (!mdfileAsMainPage.isEmpty() &&
(fn==mdfileAsMainPage || // name reference
- FileInfo(fileName).absFilePath()==
+ FileInfo(fileName.str()).absFilePath()==
FileInfo(mdfileAsMainPage.str()).absFilePath()) // file reference with path
)
{
@@ -2855,7 +2855,7 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
p->commentScanner.leaveFile(fileName,lineNr);
}
-void MarkdownOutlineParser::parsePrototype(const char *text)
+void MarkdownOutlineParser::parsePrototype(const QCString &text)
{
Doxygen::parserManager->getOutlineParser("*.cpp")->parsePrototype(text);
}
diff --git a/src/markdown.h b/src/markdown.h
index 6744149..afed003 100644
--- a/src/markdown.h
+++ b/src/markdown.h
@@ -32,7 +32,7 @@ QCString markdownFileNameToId(const QCString &fileName);
class Markdown
{
public:
- Markdown(const char *fileName,int lineNr,int indentLevel=0);
+ Markdown(const QCString &fileName,int lineNr,int indentLevel=0);
QCString process(const QCString &input, int &startNewlines);
QCString extractPageTitle(QCString &docs,QCString &id,int &prepend);
void setIndentLevel(int level) { m_indentLevel = level; }
@@ -73,7 +73,7 @@ class Markdown
private:
struct LinkRef
{
- LinkRef(const char *l,const char *t) : link(l), title(t) {}
+ LinkRef(const QCString &l,const QCString &t) : link(l), title(t) {}
QCString link;
QCString title;
};
@@ -93,12 +93,12 @@ class MarkdownOutlineParser : public OutlineParserInterface
public:
MarkdownOutlineParser();
virtual ~MarkdownOutlineParser();
- void parseInput(const char *fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &) const { return FALSE; }
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 4e9f4a9..243f3fb 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -50,11 +50,11 @@
class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
{
public:
- MemberDefImpl(const char *defFileName,int defLine,int defColumn,
- const char *type,const char *name,const char *args,
- const char *excp,Protection prot,Specifier virt,bool stat,
+ MemberDefImpl(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &type,const QCString &name,const QCString &args,
+ const QCString &excp,Protection prot,Specifier virt,bool stat,
Relationship related,MemberType t,const ArgumentList &tal,
- const ArgumentList &al,const char *metaData);
+ const ArgumentList &al,const QCString &metaData);
virtual ~MemberDefImpl();
virtual DefType definitionType() const { return TypeMember; }
@@ -65,13 +65,13 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual QCString getOutputFileBase() const;
virtual QCString getReference() const;
virtual QCString anchor() const;
- virtual const char *declaration() const;
- virtual const char *definition() const;
- virtual const char *typeString() const;
- virtual const char *argsString() const;
- virtual const char *excpString() const;
- virtual const char *bitfieldString() const;
- virtual const char *extraTypeChars() const;
+ virtual QCString declaration() const;
+ virtual QCString definition() const;
+ virtual QCString typeString() const;
+ virtual QCString argsString() const;
+ virtual QCString excpString() const;
+ virtual QCString bitfieldString() const;
+ virtual QCString extraTypeChars() const;
virtual const QCString &initializer() const;
virtual int initializerLines() const;
virtual uint64 getMemberSpecifiers() const;
@@ -82,10 +82,10 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual const NamespaceDef* getNamespaceDef() const;
virtual const GroupDef *getGroupDef() const;
virtual ClassDef *accessorClass() const;
- virtual const char *getReadAccessor() const;
- virtual const char *getWriteAccessor() const;
+ virtual QCString getReadAccessor() const;
+ virtual QCString getWriteAccessor() const;
virtual Grouping::GroupPri_t getGroupPri() const;
- virtual const char *getGroupFileName() const;
+ virtual QCString getGroupFileName() const;
virtual int getGroupStartLine() const;
virtual bool getGroupHasDocs() const;
virtual QCString qualifiedName() const;
@@ -93,7 +93,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual Protection protection() const;
virtual Specifier virtualness(int count=0) const;
virtual MemberType memberType() const;
- virtual QCString memberTypeName() const;
+ virtual QCString memberTypeName() const;
virtual bool isSignal() const;
virtual bool isSlot() const;
virtual bool isVariable() const;
@@ -238,28 +238,28 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual int getDeclLine() const;
virtual int getDeclColumn() const;
virtual void setMemberType(MemberType t);
- virtual void setDefinition(const char *d);
+ virtual void setDefinition(const QCString &d);
virtual void setFileDef(const FileDef *fd);
virtual void setAnchor();
virtual void setProtection(Protection p);
virtual void setMemberSpecifiers(uint64 s);
virtual void mergeMemberSpecifiers(uint64 s);
- virtual void setInitializer(const char *i);
- virtual void setBitfields(const char *s);
+ virtual void setInitializer(const QCString &i);
+ virtual void setBitfields(const QCString &s);
virtual void setMaxInitLines(int lines);
virtual void setMemberClass(const ClassDef *cd);
virtual void setSectionList(const Definition *container,const MemberList *sl);
virtual void setGroupDef(const GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,bool hasDocs,
MemberDef *member=0);
- virtual void setReadAccessor(const char *r);
- virtual void setWriteAccessor(const char *w);
+ virtual void setReadAccessor(const QCString &r);
+ virtual void setWriteAccessor(const QCString &w);
virtual void setTemplateSpecialization(bool b);
virtual void makeRelated();
virtual void makeForeign();
virtual void setInheritsDocsFrom(const MemberDef *md);
virtual void setTagInfo(const TagInfo *i);
- virtual void setArgsString(const char *as);
+ virtual void setArgsString(const QCString &as);
virtual void setReimplements(const MemberDef *md);
virtual void insertReimplementedBy(const MemberDef *md);
virtual void setRelatedAlso(ClassDef *cd);
@@ -268,7 +268,7 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual void setEnumClassScope(const ClassDef *cd);
virtual void setDocumentedEnumValues(bool value);
virtual void setAnonymousEnumType(const MemberDef *md);
- virtual bool addExample(const char *anchor,const char *name,const char *file);
+ virtual bool addExample(const QCString &anchor,const QCString &name,const QCString &file);
virtual void setPrototype(bool p,const QCString &df,int line, int column);
virtual void setExplicitExternal(bool b,const QCString &df,int line,int column);
virtual void setDeclFile(const QCString &df,int line,int column);
@@ -276,8 +276,8 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual void moveDeclArgumentList(std::unique_ptr<ArgumentList> al);
virtual void setDefinitionTemplateParameterLists(const ArgumentLists &lists);
virtual void setTypeConstraints(const ArgumentList &al);
- virtual void setType(const char *t);
- virtual void setAccessorType(ClassDef *cd,const char *t);
+ virtual void setType(const QCString &t);
+ virtual void setAccessorType(ClassDef *cd,const QCString &t);
virtual void setNamespace(const NamespaceDef *nd);
virtual void setMemberGroup(MemberGroup *grp);
virtual void setMemberGroupId(int id);
@@ -301,17 +301,17 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
virtual void copyArgumentNames(const MemberDef *bmd);
virtual void setCategory(ClassDef *);
virtual void setCategoryRelation(const MemberDef *);
- virtual void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
- virtual void setBriefDescription(const char *b,const char *briefFile,int briefLine);
- virtual void setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine);
+ virtual void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE);
+ virtual void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine);
+ virtual void setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine);
virtual void setHidden(bool b);
- virtual void setRequiresClause(const char *req);
+ virtual void setRequiresClause(const QCString &req);
virtual void incrementFlowKeyWordCount();
virtual void writeDeclaration(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- bool inGroup, const ClassDef *inheritFrom=0,const char *inheritId=0) const;
+ bool inGroup, const ClassDef *inheritFrom=0,const QCString &inheritId=QCString()) const;
virtual void writeDocumentation(const MemberList *ml,int memCount,int memTotal,OutputList &ol,
- const char *scopeName,const Definition *container,
+ const QCString &scopeName,const Definition *container,
bool inGroup,bool showEnumValues=FALSE,bool
showInline=FALSE) const;
virtual void writeMemberDocSimple(OutputList &ol,const Definition *container) const;
@@ -364,11 +364,11 @@ class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
uchar m_isDestructorCached; // 1 = not cached, 1=FALSE, 2=TRUE
};
-MemberDefMutable *createMemberDef(const char *defFileName,int defLine,int defColumn,
- const char *type,const char *name,const char *args,
- const char *excp,Protection prot,Specifier virt,bool stat,
+MemberDefMutable *createMemberDef(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &type,const QCString &name,const QCString &args,
+ const QCString &excp,Protection prot,Specifier virt,bool stat,
Relationship related,MemberType t,const ArgumentList &tal,
- const ArgumentList &al,const char *metaData)
+ const ArgumentList &al,const QCString &metaData)
{
return new MemberDefImpl(defFileName,defLine,defColumn,type,name,args,excp,prot,virt,
stat,related,t,tal,al,metaData);
@@ -401,19 +401,19 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
{ return getMdAlias()->getReference(); }
virtual QCString anchor() const
{ return getMdAlias()->anchor(); }
- virtual const char *declaration() const
+ virtual QCString declaration() const
{ return getMdAlias()->declaration(); }
- virtual const char *definition() const
+ virtual QCString definition() const
{ return getMdAlias()->definition(); }
- virtual const char *typeString() const
+ virtual QCString typeString() const
{ return getMdAlias()->typeString(); }
- virtual const char *argsString() const
+ virtual QCString argsString() const
{ return getMdAlias()->argsString(); }
- virtual const char *excpString() const
+ virtual QCString excpString() const
{ return getMdAlias()->excpString(); }
- virtual const char *bitfieldString() const
+ virtual QCString bitfieldString() const
{ return getMdAlias()->bitfieldString(); }
- virtual const char *extraTypeChars() const
+ virtual QCString extraTypeChars() const
{ return getMdAlias()->extraTypeChars(); }
virtual const QCString &initializer() const
{ return getMdAlias()->initializer(); }
@@ -433,15 +433,15 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
{ return getMdAlias()->getNamespaceDef(); }
virtual const ClassDef *accessorClass() const
{ return getMdAlias()->accessorClass(); }
- virtual const char *getReadAccessor() const
+ virtual QCString getReadAccessor() const
{ return getMdAlias()->getReadAccessor(); }
- virtual const char *getWriteAccessor() const
+ virtual QCString getWriteAccessor() const
{ return getMdAlias()->getWriteAccessor(); }
virtual const GroupDef *getGroupDef() const
{ return getMdAlias()->getGroupDef(); }
virtual Grouping::GroupPri_t getGroupPri() const
{ return getMdAlias()->getGroupPri(); }
- virtual const char *getGroupFileName() const
+ virtual QCString getGroupFileName() const
{ return getMdAlias()->getGroupFileName(); }
virtual int getGroupStartLine() const
{ return getMdAlias()->getGroupStartLine(); }
@@ -752,7 +752,7 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
virtual void writeDeclaration(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- bool inGroup, const ClassDef *inheritFrom=0,const char *inheritId=0) const
+ bool inGroup, const ClassDef *inheritFrom=0,const QCString &inheritId=QCString()) const
{
getMdAlias()->writeDeclaration(ol,cd,nd,fd,gd,inGroup,inheritFrom,inheritId);
}
@@ -769,7 +769,7 @@ class MemberDefAliasImpl : public DefinitionAliasMixin<MemberDef>
MemberDef *createMemberDefAlias(const Definition *newScope,const MemberDef *aliasMd)
{
MemberDef *amd = new MemberDefAliasImpl(newScope,aliasMd);
- //printf("amd: name=%s displayName=%s\n",amd->name().data(),amd->displayName().data());
+ //printf("amd: name=%s displayName=%s\n",qPrint(amd->name()),qPrint(amd->displayName()));
return amd;
}
@@ -798,18 +798,18 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr
uint j=clRealName.length()+i;
if (s.length()==j || (s.at(j)!='<' && !isId(s.at(j))))
{ // add template names
- //printf("Adding %s+%s\n",clRealName.data(),t.data());
+ //printf("Adding %s+%s\n",qPrint(clRealName),qPrint(t));
result+=clRealName+t;
}
else
{ // template names already present
- //printf("Adding %s\n",clRealName.data());
+ //printf("Adding %s\n",qPrint(clRealName));
result+=clRealName;
}
p=i+clRealName.length();
}
result+=s.right(s.length()-p);
- //printf("addTemplateNames(%s,%s,%s)=%s\n",s.data(),n.data(),t.data(),result.data());
+ //printf("addTemplateNames(%s,%s,%s)=%s\n",qPrint(s),qPrint(n),qPrint(t),qPrint(result));
return result;
}
@@ -850,7 +850,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
{
const ArgumentList &defArgList=(md->isDocsForDefinition()) ?
md->argumentList() : md->declArgumentList();
- //printf("writeDefArgumentList '%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition());
+ //printf("writeDefArgumentList '%s' isDocsForDefinition()=%d\n",qPrint(md->name()),md->isDocsForDefinition());
if (!defArgList.hasParameters() || md->isProperty() || md->isTypedef())
{
return FALSE; // member has no function like argument list
@@ -883,7 +883,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
ol.endMemberDocName();
}
ol.popGeneratorState();
- //printf("===> name=%s isDefine=%d\n",md->name().data(),md->isDefine());
+ //printf("===> name=%s isDefine=%d\n",qPrint(md->name()),md->isDefine());
QCString cName;
if (scope)
@@ -894,20 +894,20 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
if (il!=-1 && ir!=-1 && ir>il)
{
cName=cName.mid(il,ir-il+1);
- //printf("1. cName=%s\n",cName.data());
+ //printf("1. cName=%s\n",qPrint(cName));
}
else if (scope->definitionType()==Definition::TypeClass)
{
cName=tempArgListToString((toClassDef(scope))->templateArguments(),
scope->getLanguage());
- //printf("2. cName=%s\n",cName.data());
+ //printf("2. cName=%s\n",qPrint(cName));
}
else // no template specifier
{
cName.resize(0);
}
}
- //printf("~~~ %s cName=%s\n",md->name().data(),cName.data());
+ //printf("~~~ %s cName=%s\n",qPrint(md->name()),qPrint(cName));
bool first=TRUE;
bool paramTypeStarted=FALSE;
@@ -918,7 +918,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
Argument a = *alIt;
if (isDefine || first)
{
- ol.startParameterType(first,0);
+ ol.startParameterType(first,QCString());
paramTypeStarted=TRUE;
if (isDefine)
{
@@ -997,7 +997,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
QCString key;
if (md->isObjCMethod() && a.attrib.length()>=2)
{
- //printf("Found parameter keyword %s\n",a.attrib.data());
+ //printf("Found parameter keyword %s\n",a.qPrint(attrib));
// strip [ and ]
key=a.attrib.mid(1,a.attrib.length()-2);
if (key!=",") key+=":"; // for normal keywords add colon
@@ -1029,7 +1029,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
if (first) ol.startParameterName(defArgList.size()<2);
ol.endParameterName(TRUE,defArgList.size()<2,!md->isObjCMethod());
ol.popGeneratorState();
- if (md->extraTypeChars())
+ if (!md->extraTypeChars().isEmpty())
{
ol.docify(md->extraTypeChars());
}
@@ -1067,7 +1067,7 @@ static void writeExceptionListImpl(
OutputList &ol, const ClassDef *cd, const MemberDef *md, QCString const& exception)
{
// this is ordinary exception spec - there must be a '('
- //printf("exception='%s'\n",exception.data());
+ //printf("exception='%s'\n",qPrint(exception));
int index = exception.find('(');
if (index!=-1)
{
@@ -1078,7 +1078,7 @@ static void writeExceptionListImpl(
++comma; // include comma
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md,
exception.mid(index,comma-index));
- ol.exceptionEntry(0,false);
+ ol.exceptionEntry(QCString(),false);
index=comma;
comma = exception.find(',', index);
}
@@ -1087,7 +1087,7 @@ static void writeExceptionListImpl(
{
QCString type=removeRedundantWhiteSpace(exception.mid(index,close-index));
linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md,type);
- ol.exceptionEntry(0,true);
+ ol.exceptionEntry(QCString(),true);
}
else
{
@@ -1134,10 +1134,10 @@ class MemberDefImpl::IMPL
public:
IMPL();
~IMPL();
- void init(Definition *def,const char *t,const char *a,const char *e,
+ void init(Definition *def,const QCString &t,const QCString &a,const QCString &e,
Protection p,Specifier v,bool s,Relationship r,
MemberType mt,const ArgumentList &tal,
- const ArgumentList &al,const char *meta
+ const ArgumentList &al,const QCString &meta
);
const ClassDef *classDef = 0; // member of or related to
@@ -1267,10 +1267,10 @@ MemberDefImpl::IMPL::~IMPL()
}
void MemberDefImpl::IMPL::init(Definition *d,
- const char *t,const char *a,const char *e,
+ const QCString &t,const QCString &a,const QCString &e,
Protection p,Specifier v,bool s,Relationship r,
MemberType mt,const ArgumentList &tal,
- const ArgumentList &al,const char *meta
+ const ArgumentList &al,const QCString &meta
)
{
classDef=0;
@@ -1329,8 +1329,8 @@ void MemberDefImpl::IMPL::init(Definition *d,
if (!args.isEmpty())
{
declArgList = *stringToArgumentList(d->getLanguage(),args,&extraTypeChars);
- //printf("setDeclArgList %s to %s const=%d\n",args.data(),
- // argListToString(declArgList).data(),declArgList->constSpecifier);
+ //printf("setDeclArgList %s to %s const=%d\n",qPrint(args),
+ // qPrint(argListToString(declArgList)),declArgList->constSpecifier);
}
metaData = meta;
templateMaster = 0;
@@ -1374,10 +1374,10 @@ void MemberDefImpl::IMPL::init(Definition *d,
* \param meta Slice metadata.
*/
-MemberDefImpl::MemberDefImpl(const char *df,int dl,int dc,
- const char *t,const char *na,const char *a,const char *e,
+MemberDefImpl::MemberDefImpl(const QCString &df,int dl,int dc,
+ const QCString &t,const QCString &na,const QCString &a,const QCString &e,
Protection p,Specifier v,bool s,Relationship r,MemberType mt,
- const ArgumentList &tal,const ArgumentList &al,const char *meta
+ const ArgumentList &tal,const ArgumentList &al,const QCString &meta
) : DefinitionMixin(df,dl,dc,removeRedundantWhiteSpace(na))
{
//printf("MemberDefImpl::MemberDef(%s)\n",na);
@@ -1493,9 +1493,9 @@ void MemberDefImpl::insertEnumField(const MemberDef *md)
m_impl->enumFields.push_back(md);
}
-bool MemberDefImpl::addExample(const char *anchor,const char *nameStr, const char *file)
+bool MemberDefImpl::addExample(const QCString &anchor,const QCString &nameStr, const QCString &file)
{
- //printf("%s::addExample(%s,%s,%s)\n",name().data(),anchor,nameStr,file);
+ //printf("%s::addExample(%s,%s,%s)\n",qPrint(name()),anchor,nameStr,file);
return m_impl->examples.inSort(Example(anchor,nameStr,file));
}
@@ -1511,7 +1511,7 @@ QCString MemberDefImpl::getOutputFileBase() const
QCString baseName;
//printf("Member: %s: templateMaster=%p group=%p classDef=%p nspace=%p fileDef=%p\n",
- // name().data(),m_impl->templateMaster,m_impl->group,m_impl->classDef,
+ // qPrint(name()),m_impl->templateMaster,m_impl->group,m_impl->classDef,
// m_impl->nspace,m_impl->fileDef);
const NamespaceDef *nspace = getNamespaceDef();
const FileDef *fileDef = getFileDef();
@@ -1630,7 +1630,7 @@ void MemberDefImpl::_computeLinkableInProject()
static bool extractStatic = Config_getBool(EXTRACT_STATIC);
static bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
m_isLinkableCached = 2; // linkable
- //printf("MemberDefImpl::isLinkableInProject(name=%s)\n",name().data());
+ //printf("MemberDefImpl::isLinkableInProject(name=%s)\n",qPrint(name()));
if (isHidden())
{
//printf("is hidden\n");
@@ -1703,19 +1703,19 @@ void MemberDefImpl::_computeLinkableInProject()
return; // linkable!
}
-void MemberDefImpl::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace)
+void MemberDefImpl::setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace)
{
DefinitionMixin::setDocumentation(d,docFile,docLine,stripWhiteSpace);
m_isLinkableCached = 0;
}
-void MemberDefImpl::setBriefDescription(const char *b,const char *briefFile,int briefLine)
+void MemberDefImpl::setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine)
{
DefinitionMixin::setBriefDescription(b,briefFile,briefLine);
m_isLinkableCached = 0;
}
-void MemberDefImpl::setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine)
+void MemberDefImpl::setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine)
{
DefinitionMixin::setInbodyDocumentation(d,inbodyFile,inbodyLine);
m_isLinkableCached = 0;
@@ -1814,8 +1814,8 @@ void MemberDefImpl::writeLink(OutputList &ol,
*/
ClassDef *MemberDefImpl::getClassDefOfAnonymousType() const
{
- //printf("%s:getClassDefOfAnonymousType() cache=%s\n",name().data(),
- // m_impl->cachedAnonymousType?m_impl->cachedAnonymousType->name().data():"<empty>");
+ //printf("%s:getClassDefOfAnonymousType() cache=%s\n",qPrint(name()),
+ // m_impl->cachedAnonymousType?qPrint(m_impl->cachedAnonymousType->name()):"<empty>");
if (m_impl->cachedAnonymousType) return m_impl->cachedAnonymousType;
QCString cname;
@@ -1875,9 +1875,9 @@ bool MemberDefImpl::isBriefSectionVisible() const
static bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
//printf("Member %s grpId=%d docs=%s file=%s args=%s\n",
- // name().data(),
+ // qPrint(name()),
// 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
- // "", //getFileDef()->name().data(),
+ // "", //qPrint(getFileDef()->name()),
// argsString());
auto it = Doxygen::memberGroupInfoMap.find(m_impl->grpId);
@@ -1885,7 +1885,7 @@ bool MemberDefImpl::isBriefSectionVisible() const
if (it!=Doxygen::memberGroupInfoMap.end())
{
auto &info = it->second;
- //printf("name=%s m_impl->grpId=%d info=%p\n",name().data(),m_impl->grpId,info);
+ //printf("name=%s m_impl->grpId=%d info=%p\n",qPrint(name()),m_impl->grpId,info);
//QCString *pMemGrp = Doxygen::memberDocDict[grpId];
hasDocs = hasDocs ||
// part of a documented member group
@@ -2037,9 +2037,9 @@ void MemberDefImpl::_writeTemplatePrefix(OutputList &ol, const Definition *def,
void MemberDefImpl::writeDeclaration(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- bool inGroup, const ClassDef *inheritedFrom,const char *inheritId) const
+ bool inGroup, const ClassDef *inheritedFrom,const QCString &inheritId) const
{
- //printf("%s MemberDefImpl::writeDeclaration() inGroup=%d\n",qualifiedName().data(),inGroup);
+ //printf("%s MemberDefImpl::writeDeclaration() inGroup=%d\n",qPrint(qualifiedName()),inGroup);
// hide enum value, since they appear already as part of the enum, unless they
// are explicitly grouped.
@@ -2069,7 +2069,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
// start a new member declaration
bool isAnonType = annoClassDef || m_impl->annMemb || m_impl->annEnumType;
- ///printf("startMemberItem for %s\n",name().data());
+ ///printf("startMemberItem for %s\n",qPrint(name()));
ol.startMemberItem(anchor(),
isAnonType ? 1 : !m_impl->tArgList.empty() ? 3 : 0,
inheritId
@@ -2139,7 +2139,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
int i = (int)match.position();
int l = (int)match.length();
//printf("annoClassDef=%p annMemb=%p scopeName='%s' anonymous='%s'\n",
- // annoClassDef,annMemb,cname.data(),ltype.mid(i,l).data());
+ // annoClassDef,annMemb,qPrint(cname),qPrint(ltype.mid(i,l)));
if (annoClassDef) // type is an anonymous compound
{
@@ -2155,7 +2155,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
ol.writeNonBreakableSpace(3);
}
QCString varName=ltype.right(ltype.length()-ir).stripWhiteSpace();
- //printf(">>>>>> ltype='%s' varName='%s'\n",ltype.data(),varName.data());
+ //printf(">>>>>> ltype='%s' varName='%s'\n",qPrint(ltype),qPrint(varName));
ol.docify("}");
if (varName.isEmpty() && isAnonymous())
{
@@ -2245,7 +2245,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
static bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
static bool extractStatic = Config_getBool(EXTRACT_STATIC);
MemberDefMutable *annMemb = toMemberDefMutable(m_impl->annMemb);
- //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d hasDocumentation=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable(),hasDocumentation());
+ //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d hasDocumentation=%d\n",qPrint(name()),gd,getGroupDef(),inGroup,isLinkable(),hasDocumentation());
if (!name().isEmpty() && // name valid
(hasDocumentation() || isReference()) && // has docs
!(m_impl->prot==Private && !extractPrivate && (m_impl->virt==Normal || !extractPrivateVirtual) && m_impl->mtype!=MemberType_Friend) && // hidden due to protection
@@ -2265,7 +2265,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
}
else
{
- //printf("writeLink %s->%d\n",name.data(),hasDocumentation());
+ //printf("writeLink %s->%d\n",qPrint(name),hasDocumentation());
const ClassDef *rcd = cd;
if (isReference() && getClassDef()) rcd = getClassDef();
writeLink(ol,rcd,nd,fd,gd);
@@ -2313,7 +2313,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
}
// *** write arguments
- if (argsString() && !isObjCMethod())
+ if (!argsString().isEmpty() && !isObjCMethod())
{
if (!isDefine() && !isTypedef()) ol.writeString(" ");
linkifyText(TextGeneratorOLImpl(ol), // out
@@ -2321,9 +2321,9 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
getBodyDef(), // fileScope
this, // self
isDefine() ?
- (const char*)substitute(argsString(),",",", ") :
+ substitute(argsString(),",",", ") :
isTypedef() ?
- (const char*)substitute(argsString(),")(",") (") :
+ substitute(argsString(),")(",") (") :
argsString(), // text
m_impl->annMemb, // autoBreak
TRUE, // external
@@ -2332,7 +2332,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
);
}
// *** write exceptions
- if (excpString())
+ if (!excpString().isEmpty())
{
ol.writeString(" ");
ol.docify(excpString());
@@ -2437,7 +2437,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
}
//printf("endMember %s annoClassDef=%p annEnumType=%p\n",
- // name().data(),annoClassDef,annEnumType);
+ // qPrint(name()),annoClassDef,annEnumType);
ol.endMemberItem();
if (endAnonScopeNeeded)
{
@@ -2452,7 +2452,7 @@ void MemberDefImpl::writeDeclaration(OutputList &ol,
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),
getOuterScope()?getOuterScope():d,this,briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
@@ -2564,7 +2564,7 @@ bool MemberDefImpl::isDetailedSectionVisible(bool inGroup,bool inFile) const
!isReference();
bool result = visible || simpleFilter;
//printf("%s::isDetailedSectionVisible: %d groupFilter=%d fileFilter=%d\n",
- // name().data(),result,groupFilter,fileFilter);
+ // qPrint(name()),result,groupFilter,fileFilter);
return result;
}
@@ -2778,7 +2778,7 @@ void MemberDefImpl::_writeReimplements(OutputList &ol) const
else
{
ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
- 0,bcd->displayName());
+ QCString(),bcd->displayName());
if (bcd->isLinkableInProject()/* && !Config_getBool(PDF_HYPERLINKS)*/ )
{
writePageRef(ol,bcd->getOutputFileBase(),bcd->anchor());
@@ -2871,11 +2871,11 @@ void MemberDefImpl::_writeCategoryRelation(OutputList &ol) const
if (getClassDef()) // this should be a member of a class/category
{
//printf("%s: category %s relation %s class=%s categoryOf=%s\n",
- // name().data(),
- // m_impl->category ? m_impl->category->name().data() : "<none>",
- // m_impl->categoryRelation ? m_impl->categoryRelation->name().data() : "<none>",
- // m_impl->classDef->name().data(),
- // m_impl->classDef->categoryOf() ? m_impl->classDef->categoryOf()->name().data() : "<none>"
+ // qPrint(name()),
+ // m_impl->category ? qPrint(m_impl->category->name()) : "<none>",
+ // m_impl->categoryRelation ? qPrint(m_impl->categoryRelation->name()) : "<none>",
+ // qPrint(m_impl->classDef->name()),
+ // m_impl->classDef->categoryOf() ? qPrint(m_impl->classDef->categoryOf()->name()) : "<none>"
// );
QCString text;
QCString ref;
@@ -2948,7 +2948,7 @@ void MemberDefImpl::_writeEnumValues(OutputList &ol,const Definition *container,
if (isEnumerate())
{
bool first=TRUE;
- //printf("** %s: enum values=%zu\n",name().data(),enumFieldList().size());
+ //printf("** %s: enum values=%zu\n",qPrint(name()),enumFieldList().size());
for (const auto &fmd : enumFieldList())
{
//printf("Enum %p: isLinkable()=%d\n",fmd,fmd->isLinkable());
@@ -2984,7 +2984,7 @@ void MemberDefImpl::_writeEnumValues(OutputList &ol,const Definition *container,
ol.generateDoc(fmd->briefFile(),fmd->briefLine(),
getOuterScope()?getOuterScope():container,
fmd,fmd->briefDescription(),TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
// FIXME:PARA
//if (!fmd->briefDescription().isEmpty() &&
@@ -2997,7 +2997,7 @@ void MemberDefImpl::_writeEnumValues(OutputList &ol,const Definition *container,
ol.generateDoc(fmd->docFile(),fmd->docLine(),
getOuterScope()?getOuterScope():container,
fmd,fmd->documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
ol.endDescTableData();
ol.endDescTableRow();
@@ -3071,7 +3071,7 @@ QCString MemberDefImpl::displayDefinition() const
ldef=ldef.left(dp+1);
}
int l=ldef.length();
- //printf("start >%s<\n",ldef.data());
+ //printf("start >%s<\n",qPrint(ldef));
int i=l-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
while (i>=0 && isspace((uchar)ldef.at(i))) i--;
@@ -3081,7 +3081,7 @@ QCString MemberDefImpl::displayDefinition() const
QCString tmp("("+ldef.left(i+1)+")"+ldef.mid(i+1));
ldef=tmp;
}
- //printf("end >%s< i=%d\n",ldef.data(),i);
+ //printf("end >%s< i=%d\n",qPrint(ldef),i);
if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
}
SrcLangExt lang = getLanguage();
@@ -3136,7 +3136,7 @@ void MemberDefImpl::_writeGroupInclude(OutputList &ol,bool inGroup) const
void MemberDefImpl::writeDocumentation(const MemberList *ml,
int memCount,int memTotal,
OutputList &ol,
- const char *scName,
+ const QCString &scName,
const Definition *container,
bool inGroup,
bool showEnumValues,
@@ -3147,13 +3147,13 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
bool hasParameterList = FALSE;
//printf("MemberDefImpl::writeDocumentation(): name='%s' hasDocs='%d' containerType=%d inGroup=%d sectionLinkable=%d\n",
- // name().data(),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable());
+ // qPrint(name()),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable());
//if ( !hasDocs ) return;
//if (isEnumValue() && !showEnumValues) return;
SrcLangExt lang = getLanguage();
- //printf("member=%s lang=%d\n",name().data(),lang);
+ //printf("member=%s lang=%d\n",qPrint(name()),lang);
bool optVhdl = lang==SrcLangExt_VHDL;
QCString sep = getLanguageSpecificSeparator(lang,TRUE);
@@ -3188,7 +3188,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
QCString ldef = definition();
QCString title = name();
- //printf("member '%s' def='%s'\n",name().data(),ldef.data());
+ //printf("member '%s' def='%s'\n",qPrint(name()),qPrint(ldef));
if (isEnumerate())
{
if (title.at(0)=='@')
@@ -3262,7 +3262,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
}
if (!found) // anonymous compound
{
- //printf("Anonymous compound '%s'\n",cname.data());
+ //printf("Anonymous compound '%s'\n",qPrint(cname));
ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
ol.startMemberDoc(ciname,name(),memAnchor,"",memCount,memTotal,showInline);
// search for the last anonymous compound name in the definition
@@ -3372,7 +3372,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ldef=ldef.left(dp+1);
}
int dl=ldef.length();
- //printf("start >%s<\n",ldef.data());
+ //printf("start >%s<\n",qPrint(ldef));
int i=dl-1;
while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
while (i>=0 && isspace((uchar)ldef.at(i))) i--;
@@ -3382,7 +3382,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
QCString tmp("("+ldef.left(i+1)+")"+ldef.mid(i+1));
ldef=tmp;
}
- //printf("end >%s< i=%d\n",ldef.data(),i);
+ //printf("end >%s< i=%d\n",qPrint(ldef),i);
if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
}
@@ -3433,7 +3433,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,m_impl->initializer);
}
}
- if (excpString()) // add exception list
+ if (!excpString().isEmpty()) // add exception list
{
writeExceptionList(ol,cd,this);
hasParameterList=true; // call endParameterList below
@@ -3502,7 +3502,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
// )
)
{
- //printf("md=%s initLines=%d init='%s'\n",name().data(),initLines,init.data());
+ //printf("md=%s initLines=%d init='%s'\n",qPrint(name()),initLines,qPrint(init));
ol.startBold();
if (m_impl->mtype==MemberType_Define)
ol.parseText(theTranslator->trDefineValue());
@@ -3519,7 +3519,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
auto intf = Doxygen::parserManager->getCodeParser(langCorrected);
intf->resetCodeParserState();
ol.startCodeFragment("DoxyCode");
- intf->parseCode(ol,scopeName,m_impl->initializer,srcLangExt,FALSE,0,const_cast<FileDef*>(getFileDef()),
+ intf->parseCode(ol,scopeName,m_impl->initializer,srcLangExt,FALSE,QCString(),const_cast<FileDef*>(getFileDef()),
-1,-1,TRUE,this,FALSE,this);
ol.endCodeFragment("DoxyCode");
}
@@ -3545,7 +3545,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ol.generateDoc(briefFile(),briefLine(),
scopedContainer,this,
brief,FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endParagraph();
}
@@ -3562,7 +3562,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
else
{
ol.generateDoc(docFile(),docLine(),scopedContainer,this,detailed+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!inbodyDocumentation().isEmpty())
@@ -3570,7 +3570,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
ol.generateDoc(inbodyFile(),inbodyLine(),
scopedContainer,this,
inbodyDocumentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
}
else if (!brief.isEmpty() && (Config_getBool(REPEAT_BRIEF) ||
@@ -3579,7 +3579,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
if (!inbodyDocumentation().isEmpty())
{
ol.generateDoc(inbodyFile(),inbodyLine(),scopedContainer,this,inbodyDocumentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
}
@@ -3607,7 +3607,7 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
paramDocs, // docStr
TRUE, // indexWords
FALSE, // isExample
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
);
}
@@ -3659,7 +3659,7 @@ static QCString simplifyTypeForTable(const QCString &s)
{
ts = match[1].str(); // take the identifier after the last ::
}
- //printf("simplifyTypeForTable(%s)->%s\n",s.data(),ts.data());
+ //printf("simplifyTypeForTable(%s)->%s\n",qPrint(s),qPrint(ts));
return ts;
}
@@ -3690,7 +3690,7 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
}
ClassDef *cd = m_impl->accessorClass;
- //printf("===> %s::anonymous: %s\n",name().data(),cd?cd->name().data():"<none>");
+ //printf("===> %s::anonymous: %s\n",qPrint(name()),cd?qPrint(cd->name()):"<none>");
if (container && container->definitionType()==Definition::TypeClass &&
!(toClassDef(container))->isJavaEnum())
@@ -3735,7 +3735,7 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
ol.startInlineMemberName();
ol.docify(doxyName);
- if (isVariable() && argsString() && !isObjCMethod())
+ if (isVariable() && !argsString().isEmpty() && !isObjCMethod())
{
linkifyText(TextGeneratorOLImpl(ol),getOuterScope(),getBodyDef(),this,argsString());
}
@@ -3756,7 +3756,7 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
ol.generateDoc(briefFile(),briefLine(),
getOuterScope()?getOuterScope():container,this,
brief,FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
/* write detailed description */
@@ -3765,7 +3765,7 @@ void MemberDefImpl::writeMemberDocSimple(OutputList &ol, const Definition *conta
ol.generateDoc(docFile(),docLine(),
getOuterScope()?getOuterScope():container,this,
detailed+"\n",FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
@@ -3822,7 +3822,7 @@ void MemberDefImpl::warnIfUndocumented() const
static bool extractAll = Config_getBool(EXTRACT_ALL);
//printf("%s:warnIfUndoc: hasUserDocs=%d isFriendClass=%d protection=%d isRef=%d isDel=%d\n",
- // name().data(),
+ // qPrint(name()),
// hasUserDocumentation(),isFriendClass(),protectionLevelVisible(m_impl->prot),isReference(),isDeleted());
if ((!hasUserDocumentation() && !extractAll) &&
!isFriendClass() &&
@@ -3839,7 +3839,7 @@ void MemberDefImpl::warnIfUndocumented() const
warnIfUndocumentedParams();
}
}
-static QCString stripTrailingReturn(const QCString trailRet)
+static QCString stripTrailingReturn(const QCString &trailRet)
{
QCString ret = trailRet;
@@ -3873,7 +3873,7 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
if (!m_impl->hasDocumentedParams && hasParamCommand)
{
- //printf("%s:hasDocumentedParams=TRUE;\n",name().data());
+ //printf("%s:hasDocumentedParams=TRUE;\n",qPrint(name()));
m_impl->hasDocumentedParams = TRUE;
}
else if (!m_impl->hasDocumentedParams)
@@ -3896,7 +3896,7 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
allDoc = !a.docs.isEmpty();
}
//printf("a->type=%s a->name=%s doc=%s\n",
- // a->type.data(),a->name.data(),a->docs.data());
+ // qPrint(a->type),qPrint(a->name),qPrint(a->docs));
}
if (!allDoc && declAl.empty()) // try declaration arguments as well
{
@@ -3910,19 +3910,19 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
{
allDoc = !a.docs.isEmpty();
}
- //printf("a->name=%s doc=%s\n",a->name.data(),a->docs.data());
+ //printf("a->name=%s doc=%s\n",qPrint(a->name),qPrint(a->docs));
}
}
}
if (allDoc)
{
- //printf("%s:hasDocumentedParams=TRUE;\n",name().data());
+ //printf("%s:hasDocumentedParams=TRUE;\n",qPrint(name()));
m_impl->hasDocumentedParams = TRUE;
}
}
//printf("Member %s hasDocumentedReturnType=%d hasReturnCommand=%d\n",
- // name().data(),m_impl->hasDocumentedReturnType,hasReturnCommand);
+ // qPrint(name()),m_impl->hasDocumentedReturnType,hasReturnCommand);
if (!m_impl->hasDocumentedReturnType && // docs not yet found
hasReturnCommand)
{
@@ -3939,7 +3939,7 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
)
{
warn_doc_error(getDefFileName(),getDefLine(),"documented empty return type of %s",
- qualifiedName().data());
+ qPrint(qualifiedName()));
}
else if ( // see if return needs to documented
m_impl->hasDocumentedReturnType ||
@@ -4091,7 +4091,7 @@ void MemberDefImpl::setGroupDef(const GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,
bool hasDocs,MemberDef *member)
{
- //printf("%s MemberDefImpl::setGroupDef(%s)\n",name().data(),gd->name().data());
+ //printf("%s MemberDefImpl::setGroupDef(%s)\n",qPrint(name()),qPrint(gd->name()));
m_impl->group=gd;
m_impl->grouppri=pri;
m_impl->groupFileName=fileName;
@@ -4133,36 +4133,36 @@ void MemberDefImpl::setNamespace(const NamespaceDef *nd)
MemberDefMutable *MemberDefImpl::createTemplateInstanceMember(
const ArgumentList &formalArgs,const std::unique_ptr<ArgumentList> &actualArgs) const
{
- //printf(" Member %s %s %s\n",typeString(),name().data(),argsString());
+ //printf(" Member %s %s %s\n",typeString(),qPrint(name()),argsString());
std::unique_ptr<ArgumentList> actualArgList = std::make_unique<ArgumentList>(m_impl->defArgList);
if (!m_impl->defArgList.empty())
{
// replace formal arguments with actuals
for (Argument &arg : *actualArgList)
{
- arg.type = substituteTemplateArgumentsInString(arg.type.str(),formalArgs,actualArgs);
+ arg.type = substituteTemplateArgumentsInString(arg.type,formalArgs,actualArgs);
}
actualArgList->setTrailingReturnType(
- substituteTemplateArgumentsInString(actualArgList->trailingReturnType().str(),formalArgs,actualArgs));
+ substituteTemplateArgumentsInString(actualArgList->trailingReturnType(),formalArgs,actualArgs));
}
QCString methodName=name();
if (methodName.left(9)=="operator ") // conversion operator
{
- methodName=substituteTemplateArgumentsInString(methodName.str(),formalArgs,actualArgs);
+ methodName=substituteTemplateArgumentsInString(methodName,formalArgs,actualArgs);
}
MemberDefMutable *imd = createMemberDef(
getDefFileName(),getDefLine(),getDefColumn(),
- substituteTemplateArgumentsInString(m_impl->type.str(),formalArgs,actualArgs),
+ substituteTemplateArgumentsInString(m_impl->type,formalArgs,actualArgs),
methodName,
- substituteTemplateArgumentsInString(m_impl->args.str(),formalArgs,actualArgs),
+ substituteTemplateArgumentsInString(m_impl->args,formalArgs,actualArgs),
m_impl->exception, m_impl->prot,
m_impl->virt, m_impl->stat, m_impl->related, m_impl->mtype,
ArgumentList(), ArgumentList(), ""
);
imd->moveArgumentList(std::move(actualArgList));
- imd->setDefinition(substituteTemplateArgumentsInString(m_impl->def.str(),formalArgs,actualArgs));
+ imd->setDefinition(substituteTemplateArgumentsInString(m_impl->def,formalArgs,actualArgs));
imd->setBodyDef(getBodyDef());
imd->setBodySegment(getDefLine(),getStartBodyLine(),getEndBodyLine());
//imd->setBodyMember(this);
@@ -4175,7 +4175,7 @@ MemberDefMutable *MemberDefImpl::createTemplateInstanceMember(
bool MemberDefImpl::hasOneLineInitializer() const
{
//printf("%s: init=%s, initLines=%d maxInitLines=%d userInitLines=%d\n",
- // name().data(),m_impl->initializer.data(),m_impl->initLines,
+ // qPrint(name()),qPrint(m_impl->initializer),m_impl->initLines,
// m_impl->maxInitLines,m_impl->userInitLines);
return !m_impl->initializer.isEmpty() && m_impl->initLines==0 && // one line initializer
((m_impl->maxInitLines>0 && m_impl->userInitLines==-1) || m_impl->userInitLines>0); // enabled by default or explicitly
@@ -4191,7 +4191,7 @@ bool MemberDefImpl::hasMultiLineInitializer() const
);
}
-void MemberDefImpl::setInitializer(const char *initializer)
+void MemberDefImpl::setInitializer(const QCString &initializer)
{
m_impl->initializer=initializer;
int l=m_impl->initializer.length();
@@ -4199,7 +4199,7 @@ void MemberDefImpl::setInitializer(const char *initializer)
while (p>=0 && isspace((uchar)m_impl->initializer.at(p))) p--;
m_impl->initializer=m_impl->initializer.left(p+1);
m_impl->initLines=m_impl->initializer.contains('\n');
- //printf("%s::setInitializer(%s)\n",name().data(),m_impl->initializer.data());
+ //printf("%s::setInitializer(%s)\n",qPrint(name()),qPrint(m_impl->initializer));
}
void MemberDefImpl::addListReference(Definition *)
@@ -4266,7 +4266,7 @@ const MemberList *MemberDefImpl::getSectionList(const Definition *container) con
void MemberDefImpl::setSectionList(const Definition *container,const MemberList *sl)
{
- //printf("MemberDefImpl::setSectionList(%s,%p) name=%s\n",d->name().data(),sl,name().data());
+ //printf("MemberDefImpl::setSectionList(%s,%p) name=%s\n",qPrint(d->name()),sl,qPrint(name()));
m_impl->sectionMap.insert(std::make_pair(container,sl));
}
@@ -4594,12 +4594,12 @@ void MemberDefImpl::setTypeConstraints(const ArgumentList &al)
m_impl->typeConstraints = al;
}
-void MemberDefImpl::setType(const char *t)
+void MemberDefImpl::setType(const QCString &t)
{
m_impl->type = t;
}
-void MemberDefImpl::setAccessorType(ClassDef *cd,const char *t)
+void MemberDefImpl::setAccessorType(ClassDef *cd,const QCString &t)
{
m_impl->accessorClass = cd;
m_impl->accessorType = t;
@@ -4651,8 +4651,8 @@ bool MemberDefImpl::protectionVisible() const
#endif
#if 0
-void MemberDefImpl::setInbodyDocumentation(const char *docs,
- const char *docFile,int docLine)
+void MemberDefImpl::setInbodyDocumentation(const QCString &docs,
+ const QCString &docFile,int docLine)
{
m_impl->inbodyDocs = docs;
m_impl->inbodyDocs = m_impl->inbodyDocs.stripWhiteSpace();
@@ -4701,7 +4701,7 @@ void MemberDefImpl::setTagInfo(const TagInfo *ti)
{
if (ti)
{
- //printf("%s: Setting tag name=%s anchor=%s\n",name().data(),ti->tagName.data(),ti->anchor.data());
+ //printf("%s: Setting tag name=%s anchor=%s\n",qPrint(name()),qPrint(ti->tagName),qPrint(ti->anchor));
m_impl->anc=ti->anchor;
setReference(ti->tagName);
m_impl->explicitOutputFileBase = stripExtension(ti->fileName);
@@ -4725,37 +4725,37 @@ QCString MemberDefImpl::objCMethodName(bool localLink,bool showStatic) const
return qm;
}
-const char *MemberDefImpl::declaration() const
+QCString MemberDefImpl::declaration() const
{
return m_impl->decl;
}
-const char *MemberDefImpl::definition() const
+QCString MemberDefImpl::definition() const
{
return m_impl->def;
}
-const char *MemberDefImpl::extraTypeChars() const
+QCString MemberDefImpl::extraTypeChars() const
{
return m_impl->extraTypeChars;
}
-const char *MemberDefImpl::typeString() const
+QCString MemberDefImpl::typeString() const
{
return m_impl->type;
}
-const char *MemberDefImpl::argsString() const
+QCString MemberDefImpl::argsString() const
{
return m_impl->args;
}
-const char *MemberDefImpl::excpString() const
+QCString MemberDefImpl::excpString() const
{
return m_impl->exception;
}
-const char *MemberDefImpl::bitfieldString() const
+QCString MemberDefImpl::bitfieldString() const
{
return m_impl->bitfields;
}
@@ -4790,12 +4790,12 @@ const NamespaceDef* MemberDefImpl::getNamespaceDef() const
return m_impl->nspace;
}
-const char *MemberDefImpl::getReadAccessor() const
+QCString MemberDefImpl::getReadAccessor() const
{
return m_impl->read;
}
-const char *MemberDefImpl::getWriteAccessor() const
+QCString MemberDefImpl::getWriteAccessor() const
{
return m_impl->write;
}
@@ -4810,7 +4810,7 @@ Grouping::GroupPri_t MemberDefImpl::getGroupPri() const
return m_impl->grouppri;
}
-const char *MemberDefImpl::getGroupFileName() const
+QCString MemberDefImpl::getGroupFileName() const
{
return m_impl->groupFileName;
}
@@ -5367,7 +5367,7 @@ QCString MemberDefImpl::getCachedTypedefTemplSpec() const
QCString MemberDefImpl::getCachedResolvedTypedef() const
{
- //printf("MemberDefImpl::getCachedResolvedTypedef()=%s m_impl=%p\n",m_impl->cachedResolvedType.data(),m_impl);
+ //printf("MemberDefImpl::getCachedResolvedTypedef()=%s m_impl=%p\n",qPrint(m_impl->cachedResolvedType),m_impl);
return m_impl->cachedResolvedType;
}
@@ -5415,7 +5415,7 @@ void MemberDefImpl::setMemberType(MemberType t)
m_isLinkableCached = 0;
}
-void MemberDefImpl::setDefinition(const char *d)
+void MemberDefImpl::setDefinition(const QCString &d)
{
m_impl->def=d;
}
@@ -5444,7 +5444,7 @@ void MemberDefImpl::mergeMemberSpecifiers(uint64 s)
m_impl->memSpec|=s;
}
-void MemberDefImpl::setBitfields(const char *s)
+void MemberDefImpl::setBitfields(const QCString &s)
{
m_impl->bitfields = QCString(s).simplifyWhiteSpace();
}
@@ -5457,12 +5457,12 @@ void MemberDefImpl::setMaxInitLines(int lines)
}
}
-void MemberDefImpl::setReadAccessor(const char *r)
+void MemberDefImpl::setReadAccessor(const QCString &r)
{
m_impl->read=r;
}
-void MemberDefImpl::setWriteAccessor(const char *w)
+void MemberDefImpl::setWriteAccessor(const QCString &w)
{
m_impl->write=w;
}
@@ -5489,7 +5489,7 @@ void MemberDefImpl::setInheritsDocsFrom(const MemberDef *md)
m_impl->docProvider = md;
}
-void MemberDefImpl::setArgsString(const char *as)
+void MemberDefImpl::setArgsString(const QCString &as)
{
m_impl->args = as;
}
@@ -5636,7 +5636,7 @@ QCString MemberDefImpl::enumBaseType() const
return m_impl->enumBaseType;
}
-void MemberDefImpl::setRequiresClause(const char *req)
+void MemberDefImpl::setRequiresClause(const QCString &req)
{
m_impl->requiresClause = req;
}
@@ -5652,7 +5652,7 @@ void MemberDefImpl::cacheTypedefVal(const ClassDef*val, const QCString & templSp
m_impl->cachedTypedefValue=val;
m_impl->cachedTypedefTemplSpec=templSpec;
m_impl->cachedResolvedType=resolvedType;
- //printf("MemberDefImpl::cacheTypedefVal=%s m_impl=%p\n",m_impl->cachedResolvedType.data(),m_impl);
+ //printf("MemberDefImpl::cacheTypedefVal=%s m_impl=%p\n",qPrint(m_impl->cachedResolvedType),m_impl);
}
void MemberDefImpl::copyArgumentNames(const MemberDef *bmd)
@@ -5781,15 +5781,15 @@ static void transferArgumentDocumentation(ArgumentList &decAl,ArgumentList &defA
void combineDeclarationAndDefinition(MemberDefMutable *mdec,MemberDefMutable *mdef)
{
- //printf("mdec=%s isPrototype()=%d\n",mdec->name().data(),mdec->isPrototype());
+ //printf("mdec=%s isPrototype()=%d\n",qPrint(mdec->name()),mdec->isPrototype());
if (
(mdef->isFunction() && !mdef->isStatic() && !mdef->isPrototype()) ||
(mdef->isVariable() && !mdef->isExternal() && !mdef->isStatic())
)
{
//printf("mdef=(%p,%s) mdec=(%p,%s)\n",
- // mdef, mdef ? mdef->name().data() : "",
- // mdec, mdec ? mdec->name().data() : "");
+ // mdef, mdef ? qPrint(mdef->name()) : "",
+ // mdec, mdec ? qPrint(mdec->name()) : "");
ArgumentList &mdefAl = const_cast<ArgumentList&>(mdef->argumentList());
ArgumentList &mdecAl = const_cast<ArgumentList&>(mdec->argumentList());
@@ -5801,8 +5801,8 @@ void combineDeclarationAndDefinition(MemberDefMutable *mdec,MemberDefMutable *md
{
//printf("Found member %s: definition in %s (doc='%s') and declaration in %s (doc='%s')\n",
// mn->memberName(),
- // mdef->getFileDef()->name().data(),mdef->documentation().data(),
- // mdec->getFileDef()->name().data(),mdec->documentation().data()
+ // qPrint(mdef->getFileDef()->name()),qPrint(mdef->documentation()),
+ // qPrint(mdec->getFileDef()->name()),qPrint(mdec->documentation())
// );
if (Config_getBool(RESOLVE_UNNAMED_PARAMS))
@@ -5987,7 +5987,7 @@ bool MemberDefImpl::isReference() const
void addDocCrossReference(MemberDefMutable *src,MemberDefMutable *dst)
{
if (src==0 || dst==0) return;
- //printf("--> addDocCrossReference src=%s,dst=%s\n",src->name().data(),dst->name().data());
+ //printf("--> addDocCrossReference src=%s,dst=%s\n",qPrint(src->name()),qPrint(dst->name()));
if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types
if ((dst->hasReferencedByRelation() || dst->hasCallerGraph()) &&
src->showInCallGraph()
diff --git a/src/memberdef.h b/src/memberdef.h
index caa7f7d..91b0c6d 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -64,13 +64,13 @@ class MemberDef : public Definition
virtual QCString getReference() const = 0;
virtual QCString anchor() const = 0;
- virtual const char *declaration() const = 0;
- virtual const char *definition() const = 0;
- virtual const char *typeString() const = 0;
- virtual const char *argsString() const = 0;
- virtual const char *excpString() const = 0;
- virtual const char *bitfieldString() const = 0;
- virtual const char *extraTypeChars() const = 0;
+ virtual QCString declaration() const = 0;
+ virtual QCString definition() const = 0;
+ virtual QCString typeString() const = 0;
+ virtual QCString argsString() const = 0;
+ virtual QCString excpString() const = 0;
+ virtual QCString bitfieldString() const = 0;
+ virtual QCString extraTypeChars() const = 0;
virtual const QCString &initializer() const = 0;
virtual int initializerLines() const = 0;
virtual uint64 getMemberSpecifiers() const = 0;
@@ -84,13 +84,13 @@ class MemberDef : public Definition
virtual const ClassDef *accessorClass() const = 0;
// grabbing the property read/write accessor names
- virtual const char *getReadAccessor() const = 0;
- virtual const char *getWriteAccessor() const = 0;
+ virtual QCString getReadAccessor() const = 0;
+ virtual QCString getWriteAccessor() const = 0;
// querying the grouping definition
virtual const GroupDef *getGroupDef() const = 0;
virtual Grouping::GroupPri_t getGroupPri() const = 0;
- virtual const char *getGroupFileName() const = 0;
+ virtual QCString getGroupFileName() const = 0;
virtual int getGroupStartLine() const = 0;
virtual bool getGroupHasDocs() const = 0;
@@ -278,7 +278,7 @@ class MemberDef : public Definition
const std::unique_ptr<ArgumentList> &actualArgs) const = 0;
virtual void writeDeclaration(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- bool inGroup, const ClassDef *inheritFrom=0,const char *inheritId=0) const = 0;
+ bool inGroup, const ClassDef *inheritFrom=0,const QCString &inheritId=QCString()) const = 0;
virtual void writeEnumDeclaration(OutputList &typeDecl, const ClassDef *cd,
const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd) const = 0;
virtual void detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const = 0;
@@ -299,29 +299,29 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
// set functions
virtual void setMemberType(MemberType t) = 0;
- virtual void setDefinition(const char *d) = 0;
+ virtual void setDefinition(const QCString &d) = 0;
virtual void setFileDef(const FileDef *fd) = 0;
virtual void setAnchor() = 0;
virtual void setProtection(Protection p) = 0;
virtual void setMemberSpecifiers(uint64 s) = 0;
virtual void mergeMemberSpecifiers(uint64 s) = 0;
- virtual void setInitializer(const char *i) = 0;
- virtual void setBitfields(const char *s) = 0;
+ virtual void setInitializer(const QCString &i) = 0;
+ virtual void setBitfields(const QCString &s) = 0;
virtual void setMaxInitLines(int lines) = 0;
virtual void setMemberClass(const ClassDef *cd) = 0;
virtual void setSectionList(const Definition *container,const MemberList *sl) = 0;
virtual void setGroupDef(const GroupDef *gd,Grouping::GroupPri_t pri,
const QCString &fileName,int startLine,bool hasDocs,
MemberDef *member=0) = 0;
- virtual void setReadAccessor(const char *r) = 0;
- virtual void setWriteAccessor(const char *w) = 0;
+ virtual void setReadAccessor(const QCString &r) = 0;
+ virtual void setWriteAccessor(const QCString &w) = 0;
virtual void setTemplateSpecialization(bool b) = 0;
virtual void makeRelated() = 0;
virtual void makeForeign() = 0;
virtual void setInheritsDocsFrom(const MemberDef *md) = 0;
virtual void setTagInfo(const TagInfo *i) = 0;
- virtual void setArgsString(const char *as) = 0;
+ virtual void setArgsString(const QCString &as) = 0;
virtual void incrementFlowKeyWordCount() = 0;
virtual void setEnumBaseType(const QCString &type) = 0;
@@ -339,7 +339,7 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
virtual void setAnonymousEnumType(const MemberDef *md) = 0;
// example related members
- virtual bool addExample(const char *anchor,const char *name,const char *file) = 0;
+ virtual bool addExample(const QCString &anchor,const QCString &name,const QCString &file) = 0;
// prototype related members
virtual void setPrototype(bool p,const QCString &df,int line, int column) = 0;
@@ -352,8 +352,8 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
virtual void resolveUnnamedParameters(const MemberDef *md) = 0;
virtual void setDefinitionTemplateParameterLists(const ArgumentLists &lists) = 0;
virtual void setTypeConstraints(const ArgumentList &al) = 0;
- virtual void setType(const char *t) = 0;
- virtual void setAccessorType(ClassDef *cd,const char *t) = 0;
+ virtual void setType(const QCString &t) = 0;
+ virtual void setAccessorType(ClassDef *cd,const QCString &t) = 0;
// namespace related members
virtual void setNamespace(const NamespaceDef *nd) = 0;
@@ -390,13 +390,13 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
virtual void setCategory(ClassDef *) = 0;
virtual void setCategoryRelation(const MemberDef *) = 0;
- virtual void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE) = 0;
- virtual void setBriefDescription(const char *b,const char *briefFile,int briefLine) = 0;
- virtual void setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine) = 0;
+ virtual void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE) = 0;
+ virtual void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine) = 0;
+ virtual void setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine) = 0;
virtual void setHidden(bool b) = 0;
- virtual void setRequiresClause(const char *req) = 0;
+ virtual void setRequiresClause(const QCString &req) = 0;
//-----------------------------------------------------------------------------------
// --- actions ----
@@ -410,7 +410,7 @@ class MemberDefMutable : public DefinitionMutable, public MemberDef
//-----------------------------------------------------------------------------------
virtual void writeDocumentation(const MemberList *ml,int memCount,int memTotal,OutputList &ol,
- const char *scopeName,const Definition *container,
+ const QCString &scopeName,const Definition *container,
bool inGroup,bool showEnumValues=FALSE,bool
showInline=FALSE) const = 0;
virtual void writeMemberDocSimple(OutputList &ol,const Definition *container) const = 0;
@@ -442,11 +442,11 @@ MemberDefMutable *toMemberDefMutable(const Definition *d);
/** Factory method to create a new instance of a MemberDef */
-MemberDefMutable *createMemberDef(const char *defFileName,int defLine,int defColumn,
- const char *type,const char *name,const char *args,
- const char *excp,Protection prot,Specifier virt,bool stat,
+MemberDefMutable *createMemberDef(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &type,const QCString &name,const QCString &args,
+ const QCString &excp,Protection prot,Specifier virt,bool stat,
Relationship related,MemberType t,const ArgumentList &tal,
- const ArgumentList &al,const char *metaData);
+ const ArgumentList &al,const QCString &metaData);
MemberDef *createMemberDefAlias(const Definition *newScope,const MemberDef *aliasMd);
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 3b5ccd6..9f7f6ef 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -29,14 +29,14 @@
#include "entry.h"
#include "md5.h"
-MemberGroup::MemberGroup(const Definition *container,int id,const char *hdr,const char *d,const char *docFile,int docLine)
+MemberGroup::MemberGroup(const Definition *container,int id,const QCString &hdr,const QCString &d,const QCString &docFile,int docLine)
: m_container(container),
memberList(std::make_unique<MemberList>(MemberListType_memberGroup)),
grpId(id), grpHeader(hdr), doc(d), m_docFile(docFile), m_docLine(docLine)
{
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList->setNeedsSorting(Config_getBool(SORT_BRIEF_DOCS)); // detailed sections are already sorted elsewhere.
- //printf("Member group docs='%s'\n",doc.data());
+ //printf("Member group docs='%s'\n",qPrint(doc));
}
MemberGroup::~MemberGroup()
@@ -50,7 +50,7 @@ void MemberGroup::insertMember(const MemberDef *md)
// memberList->first() ? memberList->first()->getSectionList() : 0,
// memberList->count(),
// md->getSectionList(),
- // md,md->name().data());
+ // md,qPrint(md->name()));
const MemberDef *firstMd = memberList->empty() ? 0 : memberList->front();
if (inSameSection && firstMd &&
@@ -91,7 +91,7 @@ void MemberGroup::writeDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
bool showInline) const
{
- //printf("MemberGroup::writeDeclarations() %s\n",grpHeader.data());
+ //printf("MemberGroup::writeDeclarations() %s\n",qPrint(grpHeader));
QCString ldoc = doc;
if (!ldoc.isEmpty()) ldoc.prepend("<a name=\""+anchor()+"\" id=\""+anchor()+"\"></a>");
memberList->writeDeclarations(ol,cd,nd,fd,gd,grpHeader,ldoc,FALSE,showInline);
@@ -99,21 +99,21 @@ void MemberGroup::writeDeclarations(OutputList &ol,
void MemberGroup::writePlainDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const ClassDef *inheritedFrom,const char *inheritId
+ const ClassDef *inheritedFrom,const QCString &inheritId
) const
{
//printf("MemberGroup::writePlainDeclarations() memberList->count()=%d\n",memberList->count());
memberList->writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
}
-void MemberGroup::writeDocumentation(OutputList &ol,const char *scopeName,
+void MemberGroup::writeDocumentation(OutputList &ol,const QCString &scopeName,
const Definition *container,bool showEnumValues,bool showInline) const
{
- //printf("MemberGroup::writeDocumentation() %s\n",grpHeader.data());
- memberList->writeDocumentation(ol,scopeName,container,0,showEnumValues,showInline);
+ //printf("MemberGroup::writeDocumentation() %s\n",qPrint(grpHeader));
+ memberList->writeDocumentation(ol,scopeName,container,QCString(),showEnumValues,showInline);
}
-void MemberGroup::writeDocumentationPage(OutputList &ol,const char *scopeName,
+void MemberGroup::writeDocumentationPage(OutputList &ol,const QCString &scopeName,
const DefinitionMutable *container) const
{
memberList->writeDocumentationPage(ol,scopeName,container);
@@ -196,11 +196,11 @@ int MemberGroup::countInheritableMembers(const ClassDef *inheritedFrom) const
void MemberGroup::distributeMemberGroupDocumentation()
{
- //printf("MemberGroup::distributeMemberGroupDocumentation() %s\n",grpHeader.data());
+ //printf("MemberGroup::distributeMemberGroupDocumentation() %s\n",qPrint(grpHeader));
const MemberDef *md = 0;
for (const auto &smd : *memberList)
{
- //printf("checking md=%s\n",md->name().data());
+ //printf("checking md=%s\n",qPrint(md->name()));
// find the first member of the group with documentation
if (!smd->documentation().isEmpty() ||
!smd->briefDescription().isEmpty() ||
@@ -214,7 +214,7 @@ void MemberGroup::distributeMemberGroupDocumentation()
}
if (md) // distribute docs of md to other members of the list
{
- //printf("Member %s has documentation!\n",md->name().data());
+ //printf("Member %s has documentation!\n",qPrint(md->name()));
for (const auto &iomd : *memberList)
{
MemberDefMutable *omd = toMemberDefMutable(iomd);
@@ -223,7 +223,7 @@ void MemberGroup::distributeMemberGroupDocumentation()
omd->inbodyDocumentation().isEmpty()
)
{
- //printf("Copying documentation to member %s\n",omd->name().data());
+ //printf("Copying documentation to member %s\n",qPrint(omd->name()));
omd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
omd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
omd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine());
@@ -280,7 +280,7 @@ void MemberGroup::addListReferences(Definition *def)
name,
theTranslator->trGroup(TRUE,TRUE),
name,
- grpHeader,0,def);
+ grpHeader,QCString(),def);
}
}
diff --git a/src/membergroup.h b/src/membergroup.h
index 64d75b2..31705c0 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -44,8 +44,8 @@ class MemberGroup
{
public:
//MemberGroup();
- MemberGroup(const Definition *container,int id,const char *header,
- const char *docs,const char *docFile,int docLine);
+ MemberGroup(const Definition *container,int id,const QCString &header,
+ const QCString &docs,const QCString &docFile,int docLine);
~MemberGroup();
QCString header() const { return grpHeader; }
int groupId() const { return grpId; }
@@ -53,13 +53,13 @@ class MemberGroup
void setAnchors();
void writePlainDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const ClassDef *inheritedFrom,const char *inheritId) const;
+ const ClassDef *inheritedFrom,const QCString &inheritId) const;
void writeDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
bool showInline=FALSE) const;
- void writeDocumentation(OutputList &ol,const char *scopeName,
+ void writeDocumentation(OutputList &ol,const QCString &scopeName,
const Definition *container,bool showEnumValues,bool showInline) const;
- void writeDocumentationPage(OutputList &ol,const char *scopeName,
+ void writeDocumentationPage(OutputList &ol,const QCString &scopeName,
const DefinitionMutable *container) const;
void writeTagFile(TextStream &);
void addGroupedInheritedMembers(OutputList &ol,const ClassDef *cd,
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 6aec867..bd89739 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -73,7 +73,7 @@ int genericCompareMembers(const MemberDef *c1,const MemberDef *c2)
// sort on name
int cmp = qstricmp(c1->name(),c2->name());
// then on argument list
- if (cmp==0 && c1->argsString() && c2->argsString())
+ if (cmp==0 && !c1->argsString().isEmpty() && !c2->argsString().isEmpty())
{
cmp = qstricmp(c1->argsString(),c2->argsString());
}
@@ -100,8 +100,8 @@ int MemberList::countInheritableMembers(const ClassDef *inheritedFrom) const
if (md->memberType()!=MemberType_Friend &&
md->memberType()!=MemberType_EnumValue)
{
- //printf("member %s: isReimplementedBy(%s)=%d\n",md->name().data(),
- // inheritedFrom->name().data(),
+ //printf("member %s: isReimplementedBy(%s)=%d\n",qPrint(md->name()),
+ // qPrint(inheritedFrom->name()),
// md->isReimplementedBy(inheritedFrom));
if (md->memberType()==MemberType_Function)
{
@@ -119,8 +119,8 @@ int MemberList::countInheritableMembers(const ClassDef *inheritedFrom) const
count+=mg->countInheritableMembers(inheritedFrom);
}
//printf("%s::countInheritableMembers(%s)=%d\n",
- // listTypeAsString().data(),
- // inheritedFrom->name().data(),count);
+ // qPrint(listTypeAsString()),
+ // qPrint(inheritedFrom->name()),count);
return count;
}
@@ -139,7 +139,7 @@ void MemberList::countDecMembers()
m_numDecMembers=0;
for (const auto &md : m_members)
{
- //printf("MemberList::countDecMembers(md=%s,%d)\n",md->name().data(),md->isBriefSectionVisible());
+ //printf("MemberList::countDecMembers(md=%s,%d)\n",qPrint(md->name()),md->isBriefSectionVisible());
if (md->isBriefSectionVisible())
{
switch(md->memberType())
@@ -176,7 +176,7 @@ void MemberList::countDecMembers()
break;
//case MemberType_Prototype: m_protoCnt++,m_numDecMembers++; break;
case MemberType_Define: if (Config_getBool(EXTRACT_ALL) ||
- md->argsString() ||
+ !md->argsString().isEmpty() ||
!md->initializer().isEmpty() ||
md->hasDocumentation()
) /*m_defCnt++,*/ m_numDecMembers++;
@@ -185,7 +185,7 @@ void MemberList::countDecMembers()
m_numDecMembers++;
break;
default:
- err("Unknown member type found for member '%s'\n!",md->name().data());
+ err("Unknown member type found for member '%s'\n!",qPrint(md->name()));
}
}
}
@@ -340,7 +340,7 @@ bool MemberList::declVisible() const
void MemberList::writePlainDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,
- const GroupDef *gd,const ClassDef *inheritedFrom,const char *inheritId
+ const GroupDef *gd,const ClassDef *inheritedFrom,const QCString &inheritId
) const
{
//printf("----- writePlainDeclaration() ----\n");
@@ -363,7 +363,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
for (const auto &md : m_members)
{
//printf(">>> Member '%s' type=%d visible=%d\n",
- // md->name().data(),md->memberType(),md->isBriefSectionVisible());
+ // qPrint(md->name()),md->memberType(),md->isBriefSectionVisible());
if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) &&
md->isBriefSectionVisible())
{
@@ -406,7 +406,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
bool detailsLinkable = md->isDetailedSectionLinkable();
if (!detailsLinkable)
{
- ol.startDoxyAnchor(md->getOutputFileBase(),0,md->anchor(),md->name(),QCString());
+ ol.startDoxyAnchor(md->getOutputFileBase(),QCString(),md->anchor(),md->name(),QCString());
}
if (md->isSliceLocal())
{
@@ -431,7 +431,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
cd,md,
md->briefDescription(),
TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
);
if (rootNode && !rootNode->isEmpty())
{
@@ -532,7 +532,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
*/
void MemberList::writeDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const char *title,const char *subtitle, bool showEnumValues,
+ const QCString &title,const QCString &subtitle, bool showEnumValues,
bool showInline,const ClassDef *inheritedFrom,MemberListType lt) const
{
(void)showEnumValues; // unused
@@ -561,7 +561,7 @@ void MemberList::writeDeclarations(OutputList &ol,
ol.disableAllBut(OutputGenerator::Html);
inheritId = substitute(listTypeAsString(lt),"-","_")+"_"+
stripPath(cd->getOutputFileBase());
- if (title)
+ if (!title.isEmpty())
{
ol.writeInheritedSectionTitle(inheritId,cd->getReference(),
cd->getOutputFileBase(),
@@ -572,7 +572,7 @@ void MemberList::writeDeclarations(OutputList &ol,
}
else if (num>numEnumValues)
{
- if (title)
+ if (!title.isEmpty())
{
if (showInline)
{
@@ -592,17 +592,12 @@ void MemberList::writeDeclarations(OutputList &ol,
ol.endMemberHeader();
}
}
- if (subtitle)
+ if (!subtitle.stripWhiteSpace().isEmpty())
{
- QCString st=subtitle;
- st = st.stripWhiteSpace();
- if (!st.isEmpty())
- {
- ol.startMemberSubtitle();
- ol.generateDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
- ol.endMemberSubtitle();
- }
+ ol.startMemberSubtitle();
+ ol.generateDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ ol.endMemberSubtitle();
}
}
if (num>numEnumValues)
@@ -628,7 +623,7 @@ void MemberList::writeDeclarations(OutputList &ol,
bool hasHeader=!mg->header().isEmpty() && mg->header()!="[NOHEADER]";
if (inheritId.isEmpty())
{
- //printf("mg->header=%s hasHeader=%d\n",mg->header().data(),hasHeader);
+ //printf("mg->header=%s hasHeader=%d\n",qPrint(mg->header()),hasHeader);
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
{
@@ -640,7 +635,7 @@ void MemberList::writeDeclarations(OutputList &ol,
//printf("Member group has docs!\n");
ol.startMemberGroupDocs();
ol.generateDoc(mg->docFile(),mg->docLine(),ctx,0,mg->documentation()+"\n",FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberGroupDocs();
}
ol.startMemberGroup();
@@ -667,8 +662,8 @@ void MemberList::writeDeclarations(OutputList &ol,
}
void MemberList::writeDocumentation(OutputList &ol,
- const char *scopeName, const Definition *container,
- const char *title,bool showEnumValues,bool showInline) const
+ const QCString &scopeName, const Definition *container,
+ const QCString &title,bool showEnumValues,bool showInline) const
{
if (numDocMembers()==-1)
{
@@ -679,7 +674,7 @@ void MemberList::writeDocumentation(OutputList &ol,
if (numDocMembers()==0) return;
if (!showEnumValues && numDocMembers()<=numDocEnumValues()) return;
- if (title)
+ if (!title.isEmpty())
{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
@@ -703,7 +698,7 @@ void MemberList::writeDocumentation(OutputList &ol,
if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) &&
!(md->isEnumValue() && !showInline))
{
- auto it = overloadInfo.insert(std::make_pair(md->name(),OverloadInfo())).first;
+ auto it = overloadInfo.insert(std::make_pair(md->name().str(),OverloadInfo())).first;
it->second.total++;
}
}
@@ -758,7 +753,7 @@ void MemberList::writeSimpleDocumentation(OutputList &ol,
// separate member pages
void MemberList::writeDocumentationPage(OutputList &ol,
- const char *scopeName, const DefinitionMutable *container) const
+ const QCString &scopeName, const DefinitionMutable *container) const
{
static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
@@ -776,7 +771,7 @@ void MemberList::writeDocumentationPage(OutputList &ol,
if (md && md->isDetailedSectionLinkable())
{
- auto it = overloadInfo.insert(std::make_pair(md->name(),OverloadInfo())).first;
+ auto it = overloadInfo.insert(std::make_pair(md->name().str(),OverloadInfo())).first;
it->second.total++;
}
}
@@ -856,7 +851,7 @@ void MemberList::addListReferences(Definition *def)
MemberDefMutable *vmdm = toMemberDefMutable(vmd);
if (vmdm)
{
- //printf(" adding %s\n",vmd->name().data());
+ //printf(" adding %s\n",qPrint(vmd->name()));
vmdm->addListReference(def);
}
}
diff --git a/src/memberlist.h b/src/memberlist.h
index 7b73dc5..33920d5 100644
--- a/src/memberlist.h
+++ b/src/memberlist.h
@@ -88,18 +88,18 @@ class MemberList
int countInheritableMembers(const ClassDef *inheritedFrom) const;
void writePlainDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd, const GroupDef *gd,
- const ClassDef *inheritedFrom,const char *inheritId) const;
+ const ClassDef *inheritedFrom,const QCString &inheritId) const;
void writeDeclarations(OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const char *title,const char *subtitle,
+ const QCString &title,const QCString &subtitle,
bool showEnumValues=FALSE,bool showInline=FALSE,
const ClassDef *inheritedFrom=0,MemberListType lt=MemberListType_pubMethods) const;
- void writeDocumentation(OutputList &ol,const char *scopeName,
- const Definition *container,const char *title,
+ void writeDocumentation(OutputList &ol,const QCString &scopeName,
+ const Definition *container,const QCString &title,
bool showEnumValues=FALSE,bool showInline=FALSE) const;
void writeSimpleDocumentation(OutputList &ol,const Definition *container) const;
void writeDocumentationPage(OutputList &ol,
- const char *scopeName, const DefinitionMutable *container) const;
+ const QCString &scopeName, const DefinitionMutable *container) const;
void writeTagFile(TextStream &);
bool declVisible() const;
void addMemberGroup(MemberGroup *mg);
diff --git a/src/membername.h b/src/membername.h
index 2141d22..f600c8b 100644
--- a/src/membername.h
+++ b/src/membername.h
@@ -31,8 +31,8 @@ class MemberName
using reverse_iterator = typename Vec::reverse_iterator;
using const_reverse_iterator = typename Vec::const_reverse_iterator;
- MemberName(const char *name) : m_name(name) {}
- const char *memberName() const { return m_name; }
+ MemberName(const QCString &name) : m_name(name) {}
+ QCString memberName() const { return m_name; }
iterator begin() { return m_members.begin(); }
iterator end() { return m_members.end(); }
@@ -103,8 +103,8 @@ class MemberNameInfo
using iterator = typename Vec::iterator;
using const_iterator = typename Vec::const_iterator;
- MemberNameInfo(const char *name) : m_name(name) {}
- const char *memberName() const { return m_name; }
+ MemberNameInfo(const QCString &name) : m_name(name) {}
+ QCString memberName() const { return m_name; }
iterator begin() { return m_members.begin(); }
iterator end() { return m_members.end(); }
diff --git a/src/message.cpp b/src/message.cpp
index eb20c19..c973de6 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -45,7 +45,7 @@ void initWarningFormat()
if (!Config_getString(WARN_LOGFILE).isEmpty())
{
- warnFile = Portable::fopen(Config_getString(WARN_LOGFILE),"w");
+ warnFile = Portable::fopen(Config_getString(WARN_LOGFILE).data(),"w");
}
if (!warnFile) // point it to something valid, because warn() relies on it
{
@@ -79,9 +79,9 @@ void msg(const char *fmt, ...)
}
}
-static void format_warn(const char *file,int line,const char *text)
+static void format_warn(const QCString &file,int line,const QCString &text)
{
- QCString fileSubst = file==0 ? "<unknown>" : file;
+ QCString fileSubst = file.isEmpty() ? "<unknown>" : file;
QCString lineSubst; lineSubst.setNum(line);
QCString textSubst = text;
QCString versionSubst;
@@ -132,7 +132,7 @@ static void handle_warn_as_error()
warnStat = true;
}
-static void do_warn(bool enabled, const char *file, int line, const char *prefix, const char *fmt, va_list args)
+static void do_warn(bool enabled, const QCString &file, int line, const char *prefix, const char *fmt, va_list args)
{
if (!enabled) return; // warning type disabled
@@ -149,18 +149,17 @@ static void do_warn(bool enabled, const char *file, int line, const char *prefix
// prefix
// 1 position for `\0`
int bufSize = vsnprintf(NULL, 0, fmt, args) + l + 1;
- char *text = (char *)malloc(sizeof(char) * bufSize);
+ QCString text(bufSize);
if (prefix)
{
- qstrncpy(text,prefix,bufSize);
+ qstrncpy(text.rawData(),prefix,bufSize);
}
- vsnprintf(text+l, bufSize-l, fmt, argsCopy);
+ vsnprintf(text.rawData()+l, bufSize-l, fmt, argsCopy);
text[bufSize-1]='\0';
format_warn(file,line,text);
- free(text);
}
-void warn(const char *file,int line,const char *fmt, ...)
+void warn(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -168,18 +167,18 @@ void warn(const char *file,int line,const char *fmt, ...)
va_end(args);
}
-void va_warn(const char *file,int line,const char *fmt,va_list args)
+void va_warn(const QCString &file,int line,const char *fmt,va_list args)
{
do_warn(Config_getBool(WARNINGS), file, line, warning_str, fmt, args);
}
-void warn_simple(const char *file,int line,const char *text)
+void warn_simple(const QCString &file,int line,const char *text)
{
if (!Config_getBool(WARNINGS)) return; // warning type disabled
format_warn(file,line,QCString(warning_str) + text);
}
-void warn_undoc(const char *file,int line,const char *fmt, ...)
+void warn_undoc(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -187,7 +186,7 @@ void warn_undoc(const char *file,int line,const char *fmt, ...)
va_end(args);
}
-void warn_incomplete_doc(const char *file,int line,const char *fmt, ...)
+void warn_incomplete_doc(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -195,7 +194,7 @@ void warn_incomplete_doc(const char *file,int line,const char *fmt, ...)
va_end(args);
}
-void warn_doc_error(const char *file,int line,const char *fmt, ...)
+void warn_doc_error(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -221,7 +220,7 @@ void err(const char *fmt, ...)
handle_warn_as_error();
}
-extern void err_full(const char *file,int line,const char *fmt, ...)
+extern void err_full(const QCString &file,int line,const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
diff --git a/src/message.h b/src/message.h
index aa63ecb..3c3ccd9 100644
--- a/src/message.h
+++ b/src/message.h
@@ -17,6 +17,7 @@
#define MESSAGE_H
#include <cstdarg>
+#include "qcstring.h"
#ifdef __GNUC__
#define PRINTFLIKE(FORMAT, PARAM ) __attribute__((format(printf, FORMAT, PARAM)))
@@ -25,15 +26,15 @@
#endif
extern void msg(const char *fmt, ...) PRINTFLIKE(1,2);
-extern void warn(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void va_warn(const char* file, int line, const char* fmt, va_list args);
-extern void warn_simple(const char *file,int line,const char *text);
-extern void warn_undoc(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void warn_incomplete_doc(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
-extern void warn_doc_error(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void va_warn(const QCString &file, int line, const char* fmt, va_list args);
+extern void warn_simple(const QCString &file,int line,const char *text);
+extern void warn_undoc(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn_incomplete_doc(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void warn_doc_error(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
extern void warn_uncond(const char *fmt, ...) PRINTFLIKE(1, 2);
extern void err(const char *fmt, ...) PRINTFLIKE(1, 2);
-extern void err_full(const char *file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
+extern void err_full(const QCString &file,int line,const char *fmt, ...) PRINTFLIKE(3, 4);
extern void term(const char *fmt, ...) PRINTFLIKE(1, 2);
void initWarningFormat();
void warn_flush();
diff --git a/src/msc.cpp b/src/msc.cpp
index 7247689..b486389 100644
--- a/src/msc.cpp
+++ b/src/msc.cpp
@@ -29,15 +29,15 @@
static const int maxCmdLine = 40960;
-static bool convertMapFile(TextStream &t,const char *mapName,const QCString relPath,
+static bool convertMapFile(TextStream &t,const QCString &mapName,const QCString &relPath,
const QCString &context)
{
- std::ifstream f(mapName,std::ifstream::in);
+ std::ifstream f(mapName.str(),std::ifstream::in);
if (!f.is_open())
{
err("failed to open map file %s for inclusion in the docs!\n"
"If you installed Graphviz/dot after a previous failing run, \n"
- "try deleting the output directory and rerun doxygen.\n",mapName);
+ "try deleting the output directory and rerun doxygen.\n",qPrint(mapName));
return false;
}
const int maxLineLen=1024;
@@ -88,8 +88,8 @@ static bool convertMapFile(TextStream &t,const char *mapName,const QCString relP
return true;
}
-void writeMscGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,MscOutputFormat format)
+void writeMscGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,MscOutputFormat format)
{
QCString absOutFile = outDir;
absOutFile+=Portable::pathSeparator();
@@ -115,10 +115,10 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
return;
}
int code;
- if ((code=mscgen_generate(inFile,imgName,msc_format))!=0)
+ if ((code=mscgen_generate(inFile.data(),imgName.data(),msc_format))!=0)
{
err("Problems generating msc output (error=%s). Look for typos in you msc file %s\n",
- mscgen_error2str(code),inFile);
+ mscgen_error2str(code),qPrint(inFile));
return;
}
@@ -126,7 +126,7 @@ void writeMscGraphFromFile(const char *inFile,const char *outDir,
{
QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
- absOutFile.data(),absOutFile.data());
+ qPrint(absOutFile),qPrint(absOutFile));
Portable::sysTimerStart();
if (Portable::system("epstopdf",epstopdfArgs)!=0)
{
@@ -146,11 +146,11 @@ static QCString getMscImageMapFromFile(const QCString& inFile, const QCString& o
QCString outFile = inFile + ".map";
int code;
- if ((code=mscgen_generate(inFile,outFile,
+ if ((code=mscgen_generate(inFile.data(),outFile.data(),
writeSVGMap ? mscgen_format_svgmap : mscgen_format_pngmap))!=0)
{
err("Problems generating msc output (error=%s). Look for typos in you msc file %s\n",
- mscgen_error2str(code),inFile.data());
+ mscgen_error2str(code),qPrint(inFile));
return "";
}
diff --git a/src/msc.h b/src/msc.h
index 64b1238..2e8e111 100644
--- a/src/msc.h
+++ b/src/msc.h
@@ -21,8 +21,8 @@ class TextStream;
enum MscOutputFormat { MSC_BITMAP , MSC_EPS, MSC_SVG };
-void writeMscGraphFromFile(const char *inFile,const char *outDir,
- const char *outFile,MscOutputFormat format);
+void writeMscGraphFromFile(const QCString &inFile,const QCString &outDir,
+ const QCString &outFile,MscOutputFormat format);
QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir,
const QCString& relPath,const QCString& context);
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 4bfaa2b..cb2e4de 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -44,7 +44,7 @@ static QCString makeDisplayName(const NamespaceDef *nd,bool includeScope)
{
result = substitute(result,"::",sep);
}
- //printf("makeDisplayName() %s->%s lang=%d\n",name().data(),result.data(),lang);
+ //printf("makeDisplayName() %s->%s lang=%d\n",qPrint(name()),qPrint(result),lang);
return result;
}
//------------------------------------------------------------------
@@ -52,9 +52,9 @@ static QCString makeDisplayName(const NamespaceDef *nd,bool includeScope)
class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
{
public:
- NamespaceDefImpl(const char *defFileName,int defLine,int defColumn,
- const char *name,const char *ref=0,
- const char *refFile=0,const char*type=0,
+ NamespaceDefImpl(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const QCString &ref=QCString(),
+ const QCString &refFile=QCString(),const QCString &type=QCString(),
bool isPublished=false);
virtual ~NamespaceDefImpl();
virtual DefType definitionType() const { return TypeNamespace; }
@@ -91,7 +91,7 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
virtual void distributeMemberGroupDocumentation();
virtual void findSectionsInDocumentation();
virtual void sortMemberLists();
- virtual const Definition *findInnerCompound(const char *name) const;
+ virtual const Definition *findInnerCompound(const QCString &name) const;
virtual void addInnerCompound(const Definition *d);
virtual void addListReferences();
virtual void setFileName(const QCString &fn);
@@ -158,9 +158,9 @@ class NamespaceDefImpl : public DefinitionMixin<NamespaceDefMutable>
bool m_inline = false;
};
-NamespaceDefMutable *createNamespaceDef(const char *defFileName,int defLine,int defColumn,
- const char *name,const char *ref,
- const char *refFile,const char*type,
+NamespaceDefMutable *createNamespaceDef(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const QCString &ref,
+ const QCString &refFile,const QCString &type,
bool isPublished)
{
return new NamespaceDefImpl(defFileName,defLine,defColumn,name,ref,refFile,type,isPublished);
@@ -207,7 +207,7 @@ class NamespaceDefAliasImpl : public DefinitionAliasMixin<NamespaceDef>
{ return getNSAlias()->isLinkable(); }
virtual bool hasDetailedDescription() const
{ return getNSAlias()->hasDetailedDescription(); }
- virtual const Definition *findInnerCompound(const char *name) const
+ virtual const Definition *findInnerCompound(const QCString &name) const
{ return getNSAlias()->findInnerCompound(name); }
virtual bool subGrouping() const
{ return getNSAlias()->subGrouping(); }
@@ -241,23 +241,23 @@ NamespaceDef *createNamespaceDefAlias(const Definition *newScope,const Namespace
{
NamespaceDef *alnd = new NamespaceDefAliasImpl(newScope,nd);
//printf("alnd name=%s localName=%s qualifiedName=%s displayName()=%s\n",
- // alnd->name().data(),alnd->localName().data(),alnd->qualifiedName().data(),
- // alnd->displayName().data());
+ // qPrint(alnd->name()),qPrint(alnd->localName()),qPrint(alnd->qualifiedName()),
+ // qPrint(alnd->displayName()));
return alnd;
}
//------------------------------------------------------------------
-NamespaceDefImpl::NamespaceDefImpl(const char *df,int dl,int dc,
- const char *name,const char *lref,
- const char *fName, const char*type,
+NamespaceDefImpl::NamespaceDefImpl(const QCString &df,int dl,int dc,
+ const QCString &name,const QCString &lref,
+ const QCString &fName, const QCString &type,
bool isPublished) :
DefinitionMixin(df,dl,dc,name)
,m_isPublished(isPublished)
{
- if (fName)
+ if (!fName.isEmpty())
{
- if (lref)
+ if (!lref.isEmpty())
{
fileName = stripExtension(fName);
}
@@ -273,15 +273,15 @@ NamespaceDefImpl::NamespaceDefImpl(const char *df,int dl,int dc,
setReference(lref);
m_inline=FALSE;
m_subGrouping=Config_getBool(SUBGROUPING);
- if (type && !strcmp("module", type))
+ if (type=="module")
{
m_type = MODULE;
}
- else if (type && !strcmp("constants", type))
+ else if (type=="constants")
{
m_type = CONSTANT_GROUP;
}
- else if (type && !strcmp("library", type))
+ else if (type=="library")
{
m_type = LIBRARY;
}
@@ -408,7 +408,7 @@ void NamespaceDefImpl::addMembersToMemberGroup()
{
if (mg->allMembersInSameSection() && m_subGrouping)
{
- //printf("----> addToDeclarationSection(%s)\n",mg->header().data());
+ //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
mg->addToDeclarationSection();
}
}
@@ -461,7 +461,7 @@ void NamespaceDefImpl::insertMember(MemberDef *md)
allMemberList = m_memberLists.back().get();
}
allMemberList->push_back(md);
- //printf("%s::m_allMembersDict->append(%s)\n",name().data(),md->localName().data());
+ //printf("%s::m_allMembersDict->append(%s)\n",qPrint(name()),qPrint(md->localName()));
m_allMembers.add(md->localName(),md);
//::addNamespaceMemberNameToIndex(md);
//static bool sortBriefDocs=Config_getBool(SORT_BRIEF_DOCS);
@@ -500,9 +500,9 @@ void NamespaceDefImpl::insertMember(MemberDef *md)
default:
err("NamespaceDefImpl::insertMembers(): "
"member '%s' with class scope '%s' inserted in namespace scope '%s'!\n",
- md->name().data(),
- md->getClassDef() ? md->getClassDef()->name().data() : "",
- name().data());
+ qPrint(md->name()),
+ md->getClassDef() ? qPrint(md->getClassDef()->name()) : "",
+ qPrint(name()));
}
// if this is an inline namespace, then insert an alias of this member in the outer scope.
if (isInline())
@@ -636,7 +636,7 @@ void NamespaceDefImpl::writeDetailedDescription(OutputList &ol,const QCString &t
ol.popGeneratorState();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeAnchor(0,"details");
+ ol.writeAnchor(QCString(),"details");
ol.popGeneratorState();
ol.startGroupHeader();
ol.parseText(title);
@@ -646,7 +646,7 @@ void NamespaceDefImpl::writeDetailedDescription(OutputList &ol,const QCString &t
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
{
ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
!documentation().isEmpty())
@@ -664,7 +664,7 @@ void NamespaceDefImpl::writeDetailedDescription(OutputList &ol,const QCString &t
if (!documentation().isEmpty())
{
ol.generateDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
}
ol.endTextBlock();
}
@@ -676,7 +676,7 @@ void NamespaceDefImpl::writeBriefDescription(OutputList &ol)
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
@@ -815,42 +815,42 @@ void NamespaceDefImpl::writeSummaryLinks(OutputList &ol) const
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "nested-classes";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && interfaces.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "interfaces";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceStructs && structs.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "structs";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && exceptions.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "exceptions";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "namespaces";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible())
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "concepts";
- ol.writeSummaryLink(0,label,ls->title(lang),first);
+ ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
else if (lde->kind()== LayoutDocEntry::MemberDecl)
@@ -859,7 +859,7 @@ void NamespaceDefImpl::writeSummaryLinks(OutputList &ol) const
MemberList * ml = getMemberList(lmd->type);
if (ml && ml->declVisible())
{
- ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
+ ol.writeSummaryLink(QCString(),MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
first=FALSE;
}
}
@@ -1163,7 +1163,7 @@ int NamespaceDefImpl::numDocMembers() const
void NamespaceDefImpl::addUsingDirective(const NamespaceDef *nd)
{
m_usingDirList.add(nd->qualifiedName(),nd);
- //printf("%p: NamespaceDefImpl::addUsingDirective: %s:%d\n",this,name().data(),m_usingDirList->count());
+ //printf("%p: NamespaceDefImpl::addUsingDirective: %s:%d\n",this,qPrint(name()),m_usingDirList->count());
}
void NamespaceDefImpl::addUsingDeclaration(const ClassDef *cd)
@@ -1176,7 +1176,7 @@ QCString NamespaceDefImpl::getOutputFileBase() const
return fileName;
}
-const Definition *NamespaceDefImpl::findInnerCompound(const char *n) const
+const Definition *NamespaceDefImpl::findInnerCompound(const QCString &n) const
{
if (n==0) return 0;
const Definition *d = m_innerCompounds.find(n);
@@ -1205,7 +1205,7 @@ void NamespaceDefImpl::addListReferences()
theTranslator->trModule(TRUE,TRUE) :
theTranslator->trNamespace(TRUE,TRUE),
getOutputFileBase(),displayName(),
- 0,
+ QCString(),
this
);
}
@@ -1282,7 +1282,7 @@ bool NamespaceLinkedRefMap::declVisible() const
return FALSE;
}
-void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const char *title,
+void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &title,
bool const isConstantGroup,bool localName)
{
@@ -1347,16 +1347,16 @@ void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const char *title,
{
name = nd->displayName();
}
- ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),0,name);
+ ol.writeObjectLink(nd->getReference(),nd->getOutputFileBase(),QCString(),name);
ol.endMemberItem();
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,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberDescription();
}
- ol.endMemberDeclaration(0,0);
+ ol.endMemberDeclaration(QCString(),QCString());
}
}
ol.endMemberList();
@@ -1431,7 +1431,7 @@ MemberList *NamespaceDefImpl::getMemberList(MemberListType lt) const
void NamespaceDefImpl::writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title)
{
MemberList * ml = getMemberList(lt);
- if (ml) ml->writeDeclarations(ol,0,this,0,0,title,0);
+ if (ml) ml->writeDeclarations(ol,0,this,0,0,title,QCString());
}
void NamespaceDefImpl::writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title)
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 711c9df..93fff75 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -45,7 +45,7 @@ class NamespaceLinkedMap : public LinkedMap<NamespaceDef>
class NamespaceLinkedRefMap : public LinkedRefMap<const NamespaceDef>
{
public:
- void writeDeclaration(OutputList &ol,const char *title,
+ void writeDeclaration(OutputList &ol,const QCString &title,
bool isConstantGroup=false, bool localName=FALSE);
bool declVisible() const;
};
@@ -72,7 +72,7 @@ class NamespaceDef : public Definition
virtual bool isLinkableInProject() const = 0;
virtual bool isLinkable() const = 0;
virtual bool hasDetailedDescription() const = 0;
- virtual const Definition *findInnerCompound(const char *name) const = 0;
+ virtual const Definition *findInnerCompound(const QCString &name) const = 0;
virtual bool subGrouping() const = 0;
virtual MemberList *getMemberList(MemberListType lt) const = 0;
virtual const MemberLists &getMemberLists() const = 0;
@@ -134,9 +134,9 @@ class NamespaceDefMutable : public DefinitionMutable, public NamespaceDef
};
/** Factory method to create new NamespaceDef instance */
-NamespaceDefMutable *createNamespaceDef(const char *defFileName,int defLine,int defColumn,
- const char *name,const char *ref=0,
- const char *refFile=0,const char*type=0,
+NamespaceDefMutable *createNamespaceDef(const QCString &defFileName,int defLine,int defColumn,
+ const QCString &name,const QCString &ref=QCString(),
+ const QCString &refFile=QCString(),const QCString &type=QCString(),
bool isPublished=false);
/** Factory method to create an alias of an existing namespace. Used for inline namespaces. */
diff --git a/src/outputgen.cpp b/src/outputgen.cpp
index ff03498..82c470c 100644
--- a/src/outputgen.cpp
+++ b/src/outputgen.cpp
@@ -24,7 +24,7 @@
#include "message.h"
#include "portable.h"
-OutputGenerator::OutputGenerator(const char *dir) : m_t(nullptr), m_dir(dir)
+OutputGenerator::OutputGenerator(const QCString &dir) : m_t(nullptr), m_dir(dir)
{
//printf("OutputGenerator::OutputGenerator()\n");
}
@@ -57,7 +57,7 @@ OutputGenerator &OutputGenerator::operator=(const OutputGenerator &og)
return *this;
}
-void OutputGenerator::startPlainFile(const char *name)
+void OutputGenerator::startPlainFile(const QCString &name)
{
//printf("startPlainFile(%s)\n",name);
m_fileName=m_dir+"/"+name;
diff --git a/src/outputgen.h b/src/outputgen.h
index 6cfb14b..2af9fcb 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -69,7 +69,7 @@ class CodeOutputInterface
* spaces visible, should break lines at a newline and should convert
* tabs to the right number of spaces.
*/
- virtual void codify(const char *s) = 0;
+ virtual void codify(const QCString &s) = 0;
/*! Writes a link to an object in a code fragment.
* \param ref If this is non-zero, the object is to be found in
@@ -80,9 +80,9 @@ class CodeOutputInterface
* \param name The text to display as a placeholder for the link.
* \param tooltip The tooltip to display when the mouse is on the link.
*/
- virtual void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip) = 0;
+ virtual void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip) = 0;
/*! Writes the line number of a source listing
* \param ref External reference (when imported from a tag file)
@@ -90,8 +90,8 @@ class CodeOutputInterface
* \param anchor The anchor part of the URL pointing to the docs.
* \param lineNumber The line number to write
*/
- virtual void writeLineNumber(const char *ref,const char *file,
- const char *anchor,int lineNumber) = 0;
+ virtual void writeLineNumber(const QCString &ref,const QCString &file,
+ const QCString &anchor,int lineNumber) = 0;
/*! Writes a tool tip definition
* \param id unique identifier for the tooltip
@@ -101,10 +101,10 @@ class CodeOutputInterface
* \param defInfo Info about the symbol's definition in the source code
* \param declInfo Info about the symbol's declaration in the source code
*/
- virtual void writeTooltip(const char *id,
+ virtual void writeTooltip(const QCString &id,
const DocLinkInfo &docInfo,
- const char *decl,
- const char *desc,
+ const QCString &decl,
+ const QCString &desc,
const SourceLinkInfo &defInfo,
const SourceLinkInfo &declInfo
) = 0;
@@ -118,7 +118,7 @@ class CodeOutputInterface
* which elements of the same type are rendered using the same 'font class'.
* \param clsName The category name.
*/
- virtual void startFontClass(const char *clsName) = 0;
+ virtual void startFontClass(const QCString &clsName) = 0;
/*! Ends a block started with startFontClass() */
virtual void endFontClass() = 0;
@@ -126,10 +126,10 @@ class CodeOutputInterface
/*! Write an anchor to a source listing.
* \param name The name of the anchor.
*/
- virtual void writeCodeAnchor(const char *name) = 0;
+ virtual void writeCodeAnchor(const QCString &name) = 0;
- virtual void setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile) = 0;
- virtual void addWord(const char *word,bool hiPriority) = 0;
+ virtual void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile) = 0;
+ virtual void addWord(const QCString &word,bool hiPriority) = 0;
/*! Starts a source code fragment. The fragment will be
* fed to the code parser (see code.h) for syntax highlighting
@@ -137,9 +137,9 @@ class CodeOutputInterface
* endCodeFragment()
* @param style The kind of code fragment.
*/
- virtual void startCodeFragment(const char *style) = 0;
+ virtual void startCodeFragment(const QCString &style) = 0;
/*! Ends a block of code */
- virtual void endCodeFragment(const char *style) = 0;
+ virtual void endCodeFragment(const QCString &style) = 0;
};
/** Base Interface used for generating output outside of the
@@ -187,7 +187,7 @@ class BaseOutputDocInterface : public CodeOutputInterface
/*! Writes an ASCII string to the output. Converts characters that have
* A special meaning, like \c & in html.
*/
- virtual void docify(const char *s) = 0;
+ virtual void docify(const QCString &s) = 0;
/*! Writes a single ASCII character to the output. Converts characters
* that have a special meaning.
@@ -197,13 +197,13 @@ class BaseOutputDocInterface : public CodeOutputInterface
/*! Writes an ASCII string to the output, \e without converting
* special characters.
*/
- virtual void writeString(const char *text) = 0;
+ virtual void writeString(const QCString &text) = 0;
/*! Starts a new paragraph */
//virtual void newParagraph() = 0;
/*! Starts a new paragraph */
- virtual void startParagraph(const char *classDef) = 0;
+ virtual void startParagraph(const QCString &classDef) = 0;
/*! Ends a paragraph */
virtual void endParagraph() = 0;
@@ -215,14 +215,14 @@ class BaseOutputDocInterface : public CodeOutputInterface
* the file.
* \param name The text to display as a placeholder for the link.
*/
- virtual void writeObjectLink(const char *ref,const char *file,
- const char *anchor, const char *name) = 0;
+ virtual void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor, const QCString &name) = 0;
/*! Starts a (link to an) URL found in the documentation.
* \param url The URL to link to.
*/
- virtual void startHtmlLink(const char *url) = 0;
+ virtual void startHtmlLink(const QCString &url) = 0;
/*! Ends a link started by startHtmlLink().
*/
@@ -282,22 +282,22 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void startExamples() = 0;
virtual void endExamples() = 0;
- virtual void startParamList(ParamListTypes t,const char *title) = 0;
+ virtual void startParamList(ParamListTypes t,const QCString &title) = 0;
virtual void endParamList() = 0;
//virtual void writeDescItem() = 0;
virtual void startTitle() = 0;
virtual void endTitle() = 0;
- virtual void writeAnchor(const char *fileName,const char *name) = 0;
- virtual void startSection(const char *,const char *,SectionType) = 0;
- virtual void endSection(const char *,SectionType) = 0;
+ virtual void writeAnchor(const QCString &fileName,const QCString &name) = 0;
+ virtual void startSection(const QCString &,const QCString &,SectionType) = 0;
+ virtual void endSection(const QCString &,SectionType) = 0;
- virtual void lineBreak(const char *style) = 0;
- virtual void addIndexItem(const char *s1,const char *s2) = 0;
+ virtual void lineBreak(const QCString &style) = 0;
+ virtual void addIndexItem(const QCString &s1,const QCString &s2) = 0;
virtual void writeNonBreakableSpace(int) = 0;
- virtual void startDescTable(const char *title) = 0;
+ virtual void startDescTable(const QCString &title) = 0;
virtual void endDescTable() = 0;
virtual void startDescTableRow() = 0;
virtual void endDescTableRow() = 0;
@@ -305,10 +305,10 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void endDescTableTitle() = 0;
virtual void startDescTableData() = 0;
virtual void endDescTableData() = 0;
- virtual void startTextLink(const char *file,const char *anchor) = 0;
+ virtual void startTextLink(const QCString &file,const QCString &anchor) = 0;
virtual void endTextLink() = 0;
virtual void startPageRef() = 0;
- virtual void endPageRef(const char *,const char *) = 0;
+ virtual void endPageRef(const QCString &,const QCString &) = 0;
virtual void startSubsection() = 0;
virtual void endSubsection() = 0;
virtual void startSubsubsection() = 0;
@@ -324,7 +324,7 @@ class OutputGenerator : public BaseOutputDocInterface
public:
enum OutputType { Html, Latex, Man, RTF, XML, DEF, Perl , Docbook};
- OutputGenerator(const char *dir);
+ OutputGenerator(const QCString &dir);
OutputGenerator(const OutputGenerator &o);
OutputGenerator &operator=(const OutputGenerator &o);
virtual ~OutputGenerator();
@@ -345,7 +345,7 @@ class OutputGenerator : public BaseOutputDocInterface
QCString dir() const;
QCString fileName() const;
- void startPlainFile(const char *name);
+ void startPlainFile(const QCString &name);
void endPlainFile();
//QCString getContents() const;
bool isEnabled() const { return m_active; }
@@ -359,19 +359,19 @@ class OutputGenerator : public BaseOutputDocInterface
///////////////////////////////////////////////////////////////
// structural output interface
///////////////////////////////////////////////////////////////
- virtual void startFile(const char *name,const char *manName,
- const char *title,int id=0) = 0;
+ virtual void startFile(const QCString &name,const QCString &manName,
+ const QCString &title,int id=0) = 0;
virtual void writeSearchInfo() = 0;
- virtual void writeFooter(const char *navPath) = 0;
+ virtual void writeFooter(const QCString &navPath) = 0;
virtual void endFile() = 0;
virtual void startIndexSection(IndexSections) = 0;
virtual void endIndexSection(IndexSections) = 0;
- virtual void writePageLink(const char *,bool) = 0;
+ virtual void writePageLink(const QCString &,bool) = 0;
virtual void startProjectNumber() = 0;
virtual void endProjectNumber() = 0;
virtual void writeStyleInfo(int part) = 0;
- virtual void startTitleHead(const char *) = 0;
- virtual void endTitleHead(const char *fileName,const char *name) = 0;
+ virtual void startTitleHead(const QCString &) = 0;
+ virtual void endTitleHead(const QCString &fileName,const QCString &name) = 0;
virtual void startIndexListItem() = 0;
virtual void endIndexListItem() = 0;
virtual void startIndexList() = 0;
@@ -379,16 +379,16 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void startIndexKey() = 0;
virtual void endIndexKey() = 0;
virtual void startIndexValue(bool) = 0;
- virtual void endIndexValue(const char *,bool) = 0;
- virtual void startIndexItem(const char *ref,const char *file) = 0;
- virtual void endIndexItem(const char *ref,const char *file) = 0;
+ virtual void endIndexValue(const QCString &,bool) = 0;
+ virtual void startIndexItem(const QCString &ref,const QCString &file) = 0;
+ virtual void endIndexItem(const QCString &ref,const QCString &file) = 0;
virtual void startGroupHeader(int) = 0;
virtual void endGroupHeader(int) = 0;
virtual void startMemberSections() = 0;
virtual void endMemberSections() = 0;
virtual void startHeaderSection() = 0;
virtual void endHeaderSection() = 0;
- virtual void startMemberHeader(const char *anchor, int typ) = 0;
+ virtual void startMemberHeader(const QCString &anchor, int typ) = 0;
virtual void endMemberHeader() = 0;
virtual void startMemberSubtitle() = 0;
virtual void endMemberSubtitle() = 0;
@@ -400,10 +400,10 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endInlineHeader() = 0;
virtual void startAnonTypeScope(int) = 0;
virtual void endAnonTypeScope(int) = 0;
- virtual void startMemberItem(const char *,int,const char *) = 0;
+ virtual void startMemberItem(const QCString &,int,const QCString &) = 0;
virtual void endMemberItem() = 0;
virtual void startMemberTemplateParams() = 0;
- virtual void endMemberTemplateParams(const char *,const char *) = 0;
+ virtual void endMemberTemplateParams(const QCString &,const QCString &) = 0;
virtual void startCompoundTemplateParams() = 0;
virtual void endCompoundTemplateParams() = 0;
virtual void startMemberGroupHeader(bool) = 0;
@@ -414,29 +414,29 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberGroup(bool) = 0;
virtual void insertMemberAlign(bool) = 0;
virtual void insertMemberAlignLeft(int,bool) = 0;
- virtual void startMemberDoc(const char *,const char *,
- const char *,const char *,int,int,bool) = 0;
+ virtual void startMemberDoc(const QCString &,const QCString &,
+ const QCString &,const QCString &,int,int,bool) = 0;
virtual void endMemberDoc(bool) = 0;
- virtual void startDoxyAnchor(const char *fName,const char *manName,
- const char *anchor,const char *name,
- const char *args) = 0;
- virtual void endDoxyAnchor(const char *fileName,const char *anchor) = 0;
+ virtual void startDoxyAnchor(const QCString &fName,const QCString &manName,
+ const QCString &anchor,const QCString &name,
+ const QCString &args) = 0;
+ virtual void endDoxyAnchor(const QCString &fileName,const QCString &anchor) = 0;
virtual void writeLatexSpacing() = 0;
- virtual void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name) = 0;
- virtual void writeEndAnnoItem(const char *name) = 0;
- virtual void startMemberDescription(const char *anchor,const char *inheritId, bool typ) = 0;
+ virtual void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name) = 0;
+ virtual void writeEndAnnoItem(const QCString &name) = 0;
+ virtual void startMemberDescription(const QCString &anchor,const QCString &inheritId, bool typ) = 0;
virtual void endMemberDescription() = 0;
virtual void startMemberDeclaration() = 0;
- virtual void endMemberDeclaration(const char *anchor,const char *inheritId) = 0;
- virtual void writeInheritedSectionTitle(const char *id,const char *ref,
- const char *file,const char *anchor,
- const char *title,const char *name) = 0;
+ virtual void endMemberDeclaration(const QCString &anchor,const QCString &inheritId) = 0;
+ virtual void writeInheritedSectionTitle(const QCString &id,const QCString &ref,
+ const QCString &file,const QCString &anchor,
+ const QCString &title,const QCString &name) = 0;
virtual void startIndent() = 0;
virtual void endIndent() = 0;
virtual void writeSynopsis() = 0;
virtual void startClassDiagram() = 0;
- virtual void endClassDiagram(const ClassDiagram &,const char *,const char *) = 0;
+ virtual void endClassDiagram(const ClassDiagram &,const QCString &,const QCString &) = 0;
virtual void startDotGraph() = 0;
virtual void endDotGraph(DotClassGraph &g) = 0;
virtual void startInclDepGraph() = 0;
@@ -450,14 +450,14 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void writeGraphicalHierarchy(DotGfxHierarchyTable &g) = 0;
virtual void startQuickIndices() = 0;
virtual void endQuickIndices() = 0;
- virtual void writeSplitBar(const char *) = 0;
- virtual void writeNavigationPath(const char *) = 0;
+ virtual void writeSplitBar(const QCString &) = 0;
+ virtual void writeNavigationPath(const QCString &) = 0;
virtual void writeLogo() = 0;
- virtual void writeQuickLinks(bool compact,HighlightedItem hli,const char *file) = 0;
- virtual void writeSummaryLink(const char *file,const char *anchor,const char *title,bool first) = 0;
+ virtual void writeQuickLinks(bool compact,HighlightedItem hli,const QCString &file) = 0;
+ virtual void writeSummaryLink(const QCString &file,const QCString &anchor,const QCString &title,bool first) = 0;
virtual void startContents() = 0;
virtual void endContents() = 0;
- virtual void startPageDoc(const char *) {}
+ virtual void startPageDoc(const QCString &) {}
virtual void endPageDoc() {}
virtual void startTextBlock(bool) = 0;
virtual void endTextBlock(bool) = 0;
@@ -466,15 +466,15 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberDocPrefixItem() = 0;
virtual void startMemberDocName(bool) = 0;
virtual void endMemberDocName() = 0;
- virtual void startParameterType(bool,const char *key) = 0;
+ virtual void startParameterType(bool,const QCString &key) = 0;
virtual void endParameterType() = 0;
virtual void startParameterName(bool) = 0;
virtual void endParameterName(bool,bool,bool) = 0;
virtual void startParameterList(bool) = 0;
virtual void endParameterList() = 0;
- virtual void exceptionEntry(const char*,bool) = 0;
+ virtual void exceptionEntry(const QCString &,bool) = 0;
- virtual void startConstraintList(const char *) = 0;
+ virtual void startConstraintList(const QCString &) = 0;
virtual void startConstraintParam() = 0;
virtual void endConstraintParam() = 0;
virtual void startConstraintType() = 0;
@@ -494,7 +494,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void startLabels() = 0;
- virtual void writeLabel(const char *,bool) = 0;
+ virtual void writeLabel(const QCString &,bool) = 0;
virtual void endLabels() = 0;
protected:
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 0226a10..e4f0fe2 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -139,10 +139,10 @@ void OutputList::popGeneratorState()
}
}
-void OutputList::generateDoc(const char *fileName,int startLine,
+void OutputList::generateDoc(const QCString &fileName,int startLine,
const Definition *ctx,const MemberDef * md,
const QCString &docStr,bool indexWords,
- bool isExample,const char *exampleName,
+ bool isExample,const QCString &exampleName,
bool singleLine,bool linkFromIndex,
bool markdownSupport)
{
@@ -171,7 +171,7 @@ void OutputList::writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *m
for (const auto &og : m_outputs)
{
//printf("og->printDoc(extension=%s)\n",
- // ctx?ctx->getDefFileExtension().data():"<null>");
+ // ctx?qPrint(ctx->getDefFileExtension()):"<null>");
if (og->isEnabled()) og->writeDoc(root,ctx,md,m_id);
}
VhdlDocGen::setFlowMember(0);
diff --git a/src/outputlist.h b/src/outputlist.h
index fbb8801..eadf85f 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -65,9 +65,9 @@ class OutputList : public OutputDocInterface
// OutputDocInterface implementation
//////////////////////////////////////////////////
- void generateDoc(const char *fileName,int startLine,
+ void generateDoc(const QCString &fileName,int startLine,
const Definition *ctx,const MemberDef *md,const QCString &docStr,
- bool indexWords,bool isExample,const char *exampleName /*=0*/,
+ bool indexWords,bool isExample,const QCString &exampleName /*=0*/,
bool singleLine /*=FALSE*/,bool linkFromIndex /*=FALSE*/,
bool markdownSupport /*=FALSE*/);
void writeDoc(DocRoot *root,const Definition *ctx,const MemberDef *md,int id=0);
@@ -77,7 +77,7 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startIndexSection,is); }
void endIndexSection(IndexSections is)
{ forall(&OutputGenerator::endIndexSection,is); }
- void writePageLink(const char *name,bool first)
+ void writePageLink(const QCString &name,bool first)
{ forall(&OutputGenerator::writePageLink,name,first); }
void startProjectNumber()
{ forall(&OutputGenerator::startProjectNumber); }
@@ -85,30 +85,30 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endProjectNumber); }
void writeStyleInfo(int part)
{ forall(&OutputGenerator::writeStyleInfo,part); }
- void startFile(const char *name,const char *manName,const char *title)
+ void startFile(const QCString &name,const QCString &manName,const QCString &title)
{
newId();
forall(&OutputGenerator::startFile,name,manName,title,m_id);
}
void writeSearchInfo()
{ forall(&OutputGenerator::writeSearchInfo); }
- void writeFooter(const char *navPath)
+ void writeFooter(const QCString &navPath)
{ forall(&OutputGenerator::writeFooter,navPath); }
void endFile()
{ forall(&OutputGenerator::endFile); }
- void startTitleHead(const char *fileName)
+ void startTitleHead(const QCString &fileName)
{ forall(&OutputGenerator::startTitleHead,fileName); }
- void endTitleHead(const char *fileName,const char *name)
+ void endTitleHead(const QCString &fileName,const QCString &name)
{ forall(&OutputGenerator::endTitleHead,fileName,name); }
void startTitle()
{ forall(&OutputGenerator::startTitle); }
void endTitle()
{ forall(&OutputGenerator::endTitle); }
- void startParagraph(const char *classDef=0)
+ void startParagraph(const QCString &classDef=QCString())
{ forall(&OutputGenerator::startParagraph,classDef); }
void endParagraph()
{ forall(&OutputGenerator::endParagraph); }
- void writeString(const char *text)
+ void writeString(const QCString &text)
{ forall(&OutputGenerator::writeString,text); }
void startIndexListItem()
{ forall(&OutputGenerator::startIndexListItem); }
@@ -124,42 +124,42 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endIndexKey); }
void startIndexValue(bool b)
{ forall(&OutputGenerator::startIndexValue,b); }
- void endIndexValue(const char *name,bool b)
+ void endIndexValue(const QCString &name,bool b)
{ forall(&OutputGenerator::endIndexValue,name,b); }
void startItemList()
{ forall(&OutputGenerator::startItemList); }
void endItemList()
{ forall(&OutputGenerator::endItemList); }
- void startIndexItem(const char *ref,const char *file)
+ void startIndexItem(const QCString &ref,const QCString &file)
{ forall(&OutputGenerator::startIndexItem,ref,file); }
- void endIndexItem(const char *ref,const char *file)
+ void endIndexItem(const QCString &ref,const QCString &file)
{ forall(&OutputGenerator::endIndexItem,ref,file); }
- void docify(const char *s)
+ void docify(const QCString &s)
{ forall(&OutputGenerator::docify,s); }
- void codify(const char *s)
+ void codify(const QCString &s)
{ forall(&OutputGenerator::codify,s); }
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor, const char *name)
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor, const QCString &name)
{ forall(&OutputGenerator::writeObjectLink,ref,file,anchor,name); }
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{ forall(&OutputGenerator::writeCodeLink,ref,file,anchor,name,tooltip); }
- void writeTooltip(const char *id, const DocLinkInfo &docInfo, const char *decl,
- const char *desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo)
+ void writeTooltip(const QCString &id, const DocLinkInfo &docInfo, const QCString &decl,
+ const QCString &desc, const SourceLinkInfo &defInfo, const SourceLinkInfo &declInfo)
{ forall(&OutputGenerator::writeTooltip,id,docInfo,decl,desc,defInfo,declInfo); }
- void startTextLink(const char *file,const char *anchor)
+ void startTextLink(const QCString &file,const QCString &anchor)
{ forall(&OutputGenerator::startTextLink,file,anchor); }
void endTextLink()
{ forall(&OutputGenerator::endTextLink); }
- void startHtmlLink(const char *url)
+ void startHtmlLink(const QCString &url)
{ forall(&OutputGenerator::startHtmlLink,url); }
void endHtmlLink()
{ forall(&OutputGenerator::endHtmlLink); }
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name)
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name)
{ forall(&OutputGenerator::writeStartAnnoItem,type,file,path,name); }
- void writeEndAnnoItem(const char *name)
+ void writeEndAnnoItem(const QCString &name)
{ forall(&OutputGenerator::writeEndAnnoItem,name); }
void startTypewriter()
{ forall(&OutputGenerator::startTypewriter); }
@@ -181,7 +181,7 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startHeaderSection); }
void endHeaderSection()
{ forall(&OutputGenerator::endHeaderSection); }
- void startMemberHeader(const char *anchor, int typ = 2)
+ void startMemberHeader(const QCString &anchor, int typ = 2)
{ forall(&OutputGenerator::startMemberHeader,anchor,typ); }
void endMemberHeader()
{ forall(&OutputGenerator::endMemberHeader); }
@@ -205,13 +205,13 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startAnonTypeScope,i1); }
void endAnonTypeScope(int i1)
{ forall(&OutputGenerator::endAnonTypeScope,i1); }
- void startMemberItem(const char *anchor,int i1,const char *id=0)
+ void startMemberItem(const QCString &anchor,int i1,const QCString &id=QCString())
{ forall(&OutputGenerator::startMemberItem,anchor,i1,id); }
void endMemberItem()
{ forall(&OutputGenerator::endMemberItem); }
void startMemberTemplateParams()
{ forall(&OutputGenerator::startMemberTemplateParams); }
- void endMemberTemplateParams(const char *anchor,const char *inheritId)
+ void endMemberTemplateParams(const QCString &anchor,const QCString &inheritId)
{ forall(&OutputGenerator::endMemberTemplateParams,anchor,inheritId); }
void startCompoundTemplateParams()
{ forall(&OutputGenerator::startCompoundTemplateParams); }
@@ -235,17 +235,17 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::insertMemberAlignLeft,typ,templ); }
void writeRuler()
{ forall(&OutputGenerator::writeRuler); }
- void writeAnchor(const char *fileName,const char *name)
+ void writeAnchor(const QCString &fileName,const QCString &name)
{ forall(&OutputGenerator::writeAnchor,fileName,name); }
- void startCodeFragment(const char *style)
+ void startCodeFragment(const QCString &style)
{ forall(&OutputGenerator::startCodeFragment,style); }
- void endCodeFragment(const char *style)
+ void endCodeFragment(const QCString &style)
{ forall(&OutputGenerator::endCodeFragment,style); }
void startCodeLine(bool hasLineNumbers)
{ forall(&OutputGenerator::startCodeLine,hasLineNumbers); }
void endCodeLine()
{ forall(&OutputGenerator::endCodeLine); }
- void writeLineNumber(const char *ref,const char *file,const char *anchor,
+ void writeLineNumber(const QCString &ref,const QCString &file,const QCString &anchor,
int lineNumber)
{ forall(&OutputGenerator::writeLineNumber,ref,file,anchor,lineNumber); }
void startEmphasis()
@@ -254,17 +254,17 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endEmphasis); }
void writeChar(char c)
{ forall(&OutputGenerator::writeChar,c); }
- void startMemberDoc(const char *clName,const char *memName,
- const char *anchor,const char *title,
+ void startMemberDoc(const QCString &clName,const QCString &memName,
+ const QCString &anchor,const QCString &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,
- const char *anchor, const char *name,
- const char *args)
+ void startDoxyAnchor(const QCString &fName,const QCString &manName,
+ const QCString &anchor, const QCString &name,
+ const QCString &args)
{ forall(&OutputGenerator::startDoxyAnchor,fName,manName,anchor,name,args); }
- void endDoxyAnchor(const char *fn,const char *anchor)
+ void endDoxyAnchor(const QCString &fn,const QCString &anchor)
{ forall(&OutputGenerator::endDoxyAnchor,fn,anchor); }
void writeLatexSpacing()
{ forall(&OutputGenerator::writeLatexSpacing); }
@@ -296,30 +296,30 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startSmall); }
void endSmall()
{ forall(&OutputGenerator::endSmall); }
- void lineBreak(const char *style=0)
+ void lineBreak(const QCString &style=QCString())
{ forall(&OutputGenerator::lineBreak,style); }
void startBold()
{ forall(&OutputGenerator::startBold); }
void endBold()
{ forall(&OutputGenerator::endBold); }
- void startMemberDescription(const char *anchor,const char *inheritId=0, bool typ = false)
+ void startMemberDescription(const QCString &anchor,const QCString &inheritId=QCString(), bool typ = false)
{ forall(&OutputGenerator::startMemberDescription,anchor,inheritId, typ); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
void startMemberDeclaration()
{ forall(&OutputGenerator::startMemberDeclaration); }
- void endMemberDeclaration(const char *anchor,const char *inheritId)
+ void endMemberDeclaration(const QCString &anchor,const QCString &inheritId)
{ forall(&OutputGenerator::endMemberDeclaration,anchor,inheritId); }
- void writeInheritedSectionTitle(const char *id, const char *ref,
- const char *file, const char *anchor,
- const char *title,const char *name)
+ void writeInheritedSectionTitle(const QCString &id, const QCString &ref,
+ const QCString &file, const QCString &anchor,
+ const QCString &title,const QCString &name)
{ forall(&OutputGenerator::writeInheritedSectionTitle,id,ref,
file,anchor,title,name); }
void startExamples()
{ forall(&OutputGenerator::startExamples); }
void endExamples()
{ forall(&OutputGenerator::endExamples); }
- void startParamList(ParamListTypes t,const char *title)
+ void startParamList(ParamListTypes t,const QCString &title)
{ forall(&OutputGenerator::startParamList,t,title); }
void endParamList()
{ forall(&OutputGenerator::endParamList); }
@@ -327,47 +327,47 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startIndent); }
void endIndent()
{ forall(&OutputGenerator::endIndent); }
- void startSection(const char *lab,const char *title,SectionType t)
+ void startSection(const QCString &lab,const QCString &title,SectionType t)
{ forall(&OutputGenerator::startSection,lab,title,t); }
- void endSection(const char *lab,SectionType t)
+ void endSection(const QCString &lab,SectionType t)
{ forall(&OutputGenerator::endSection,lab,t); }
- void addIndexItem(const char *s1,const char *s2)
+ void addIndexItem(const QCString &s1,const QCString &s2)
{ forall(&OutputGenerator::addIndexItem,s1,s2); }
void writeSynopsis()
{ forall(&OutputGenerator::writeSynopsis); }
void startClassDiagram()
{ forall(&OutputGenerator::startClassDiagram); }
- void endClassDiagram(const ClassDiagram &d,const char *f,const char *n)
+ void endClassDiagram(const ClassDiagram &d,const QCString &f,const QCString &n)
{ forall(&OutputGenerator::endClassDiagram,d,f,n); }
void startPageRef()
{ forall(&OutputGenerator::startPageRef); }
- void endPageRef(const char *c,const char *a)
+ void endPageRef(const QCString &c,const QCString &a)
{ forall(&OutputGenerator::endPageRef,c,a); }
void startQuickIndices()
{ forall(&OutputGenerator::startQuickIndices); }
void endQuickIndices()
{ forall(&OutputGenerator::endQuickIndices); }
- void writeSplitBar(const char *name)
+ void writeSplitBar(const QCString &name)
{ forall(&OutputGenerator::writeSplitBar,name); }
- void writeNavigationPath(const char *s)
+ void writeNavigationPath(const QCString &s)
{ forall(&OutputGenerator::writeNavigationPath,s); }
void writeLogo()
{ forall(&OutputGenerator::writeLogo); }
- void writeQuickLinks(bool compact,HighlightedItem hli,const char *file)
+ void writeQuickLinks(bool compact,HighlightedItem hli,const QCString &file)
{ forall(&OutputGenerator::writeQuickLinks,compact,hli,file); }
- void writeSummaryLink(const char *file,const char *anchor,const char *title,bool first)
+ void writeSummaryLink(const QCString &file,const QCString &anchor,const QCString &title,bool first)
{ forall(&OutputGenerator::writeSummaryLink,file,anchor,title,first); }
void startContents()
{ forall(&OutputGenerator::startContents); }
void endContents()
{ forall(&OutputGenerator::endContents); }
- void startPageDoc(const char *pageTitle)
+ void startPageDoc(const QCString &pageTitle)
{ forall(&OutputGenerator::startPageDoc, pageTitle); }
void endPageDoc()
{ forall(&OutputGenerator::endPageDoc); }
void writeNonBreakableSpace(int num)
{ forall(&OutputGenerator::writeNonBreakableSpace,num); }
- void startDescTable(const char *title)
+ void startDescTable(const QCString &title)
{ forall(&OutputGenerator::startDescTable,title); }
void endDescTable()
{ forall(&OutputGenerator::endDescTable); }
@@ -419,7 +419,7 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberDocName,align); }
void endMemberDocName()
{ forall(&OutputGenerator::endMemberDocName); }
- void startParameterType(bool first,const char *key)
+ void startParameterType(bool first,const QCString &key)
{ forall(&OutputGenerator::startParameterType,first,key); }
void endParameterType()
{ forall(&OutputGenerator::endParameterType); }
@@ -431,10 +431,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startParameterList,openBracket); }
void endParameterList()
{ forall(&OutputGenerator::endParameterList); }
- void exceptionEntry(const char* prefix,bool closeBracket)
+ void exceptionEntry(const QCString &prefix,bool closeBracket)
{ forall(&OutputGenerator::exceptionEntry,prefix,closeBracket); }
- void startConstraintList(const char *header)
+ void startConstraintList(const QCString &header)
{ forall(&OutputGenerator::startConstraintList,header); }
void startConstraintParam()
{ forall(&OutputGenerator::startConstraintParam); }
@@ -470,23 +470,23 @@ class OutputList : public OutputDocInterface
void startLabels()
{ forall(&OutputGenerator::startLabels); }
- void writeLabel(const char *l,bool isLast)
+ void writeLabel(const QCString &l,bool isLast)
{ forall(&OutputGenerator::writeLabel,l,isLast); }
void endLabels()
{ forall(&OutputGenerator::endLabels); }
- void startFontClass(const char *c)
+ void startFontClass(const QCString &c)
{ forall(&OutputGenerator::startFontClass,c); }
void endFontClass()
{ forall(&OutputGenerator::endFontClass); }
- void writeCodeAnchor(const char *name)
+ void writeCodeAnchor(const QCString &name)
{ forall(&OutputGenerator::writeCodeAnchor,name); }
- void setCurrentDoc(const Definition *context,const char *anchor,bool isSourceFile)
+ void setCurrentDoc(const Definition *context,const QCString &anchor,bool isSourceFile)
{ forall(&OutputGenerator::setCurrentDoc,context,anchor,isSourceFile); }
- void addWord(const char *word,bool hiPriority)
+ void addWord(const QCString &word,bool hiPriority)
{ forall(&OutputGenerator::addWord,word,hiPriority); }
- void startPlainFile(const char *name)
+ void startPlainFile(const QCString &name)
{ forall(&OutputGenerator::startPlainFile,name); }
void endPlainFile()
{ forall(&OutputGenerator::endPlainFile); }
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index ef5c4eb..07a1f9e 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -30,10 +30,10 @@
class PageDefImpl : public DefinitionMixin<PageDef>
{
public:
- PageDefImpl(const char *f,int l,const char *n,const char *d,const char *t);
+ PageDefImpl(const QCString &f,int l,const QCString &n,const QCString &d,const QCString &t);
virtual ~PageDefImpl();
- virtual void setFileName(const char *name);
+ virtual void setFileName(const QCString &name);
virtual void setLocalToc(const LocalToc &tl);
virtual void setShowLineNo(bool);
virtual DefType definitionType() const { return TypePage; }
@@ -71,16 +71,16 @@ class PageDefImpl : public DefinitionMixin<PageDef>
bool m_showLineNo;
};
-PageDef *createPageDef(const char *f,int l,const char *n,const char *d,const char *t)
+PageDef *createPageDef(const QCString &f,int l,const QCString &n,const QCString &d,const QCString &t)
{
return new PageDefImpl(f,l,n,d,t);
}
//------------------------------------------------------------------------------------------
-PageDefImpl::PageDefImpl(const char *f,int l,const char *n,
- const char *d,const char *t)
- : DefinitionMixin(f,l,1,n), m_title(t?t:n)
+PageDefImpl::PageDefImpl(const QCString &f,int l,const QCString &n,
+ const QCString &d,const QCString &t)
+ : DefinitionMixin(f,l,1,n), m_title(!t.isEmpty() ? t : n)
{
setDocumentation(d,f,l);
m_pageScope = 0;
@@ -112,7 +112,7 @@ QCString PageDefImpl::getOutputFileBase() const
return m_fileName;
}
-void PageDefImpl::setFileName(const char *name)
+void PageDefImpl::setFileName(const QCString &name)
{
m_fileName = name;
}
@@ -232,7 +232,7 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
if (si->title() != manPageName)
{
ol.generateDoc(docFile(),getStartBodyLine(),this,0,si->title(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endSection(si->label(),si->type());
}
}
@@ -252,7 +252,7 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
//ol.startSection(si->label,si->title,si->type);
startTitle(ol,getOutputFileBase(),this);
ol.generateDoc(docFile(),getStartBodyLine(),this,0,si->title(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
//stringToSearchIndex(getOutputFileBase(),
// theTranslator->trPage(TRUE,TRUE)+" "+si->title,
// si->title);
@@ -286,7 +286,7 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
ol.popGeneratorState();
//1.}
- Doxygen::indexList->addIndexItem(this,0,0,filterTitle(title().str()));
+ Doxygen::indexList->addIndexItem(this,0,QCString(),filterTitle(title().str()));
}
void PageDefImpl::writePageDocumentation(OutputList &ol) const
@@ -308,7 +308,7 @@ void PageDefImpl::writePageDocumentation(OutputList &ol) const
docStr, // docStr
TRUE, // index words
FALSE, // not an example
- 0, // exampleName
+ QCString(), // exampleName
FALSE, // singleLine
FALSE, // linkFromIndex
TRUE // markdown support
diff --git a/src/pagedef.h b/src/pagedef.h
index ee77612..1a7b301 100644
--- a/src/pagedef.h
+++ b/src/pagedef.h
@@ -28,7 +28,7 @@ class PageDef : public DefinitionMutable, public Definition
virtual ~PageDef() {}
// setters
- virtual void setFileName(const char *name) = 0;
+ virtual void setFileName(const QCString &name) = 0;
virtual void setLocalToc(const LocalToc &tl) = 0;
virtual void setShowLineNo(bool) = 0;
@@ -61,7 +61,7 @@ class PageDef : public DefinitionMutable, public Definition
};
-PageDef *createPageDef(const char *f,int l,const char *n,const char *d,const char *t);
+PageDef *createPageDef(const QCString &f,int l,const QCString &n,const QCString &d,const QCString &t);
// --- Cast functions
diff --git a/src/parserintf.h b/src/parserintf.h
index 9c43e93..ccb4359 100644
--- a/src/parserintf.h
+++ b/src/parserintf.h
@@ -52,7 +52,7 @@ class OutlineParserInterface
* @param[in] clangParser The clang translation unit parser object
* or nullptr if disabled.
*/
- virtual void parseInput(const char *fileName,
+ virtual void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser) = 0;
@@ -70,7 +70,7 @@ class OutlineParserInterface
* in the Entry node that corresponds with the node for which the
* comment block parser was invoked.
*/
- virtual void parsePrototype(const char *text) = 0;
+ virtual void parsePrototype(const QCString &text) = 0;
};
@@ -108,11 +108,11 @@ class CodeParserInterface
* @param[in] collectXRefs collect cross-reference relations.
*/
virtual void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
@@ -147,7 +147,7 @@ class ParserManager
struct ParserPair
{
- ParserPair(OutlineParserFactory opf, CodeParserFactory cpf, const QCString pn)
+ ParserPair(OutlineParserFactory opf, CodeParserFactory cpf, const QCString &pn)
: outlineParserFactory(opf), codeParserFactory(cpf), parserName(pn)
{
}
@@ -164,7 +164,7 @@ class ParserManager
*/
ParserManager(OutlineParserFactory outlineParserFactory,
CodeParserFactory codeParserFactory)
- : m_defaultParsers(outlineParserFactory,codeParserFactory, "")
+ : m_defaultParsers(outlineParserFactory,codeParserFactory, QCString())
{
}
@@ -176,28 +176,28 @@ class ParserManager
* @param[in] codeParserFactory A factory method to create a code parser that is to be used
* for the given name.
*/
- void registerParser(const char *name,OutlineParserFactory outlineParserFactory,
+ void registerParser(const QCString &name,OutlineParserFactory outlineParserFactory,
CodeParserFactory codeParserFactory)
{
- m_parsers.emplace(std::string(name),ParserPair(outlineParserFactory,codeParserFactory,name));
+ m_parsers.emplace(name.str(),ParserPair(outlineParserFactory,codeParserFactory,name));
}
/** Registers a file \a extension with a parser with name \a parserName.
* Returns TRUE if the extension was successfully registered.
*/
- bool registerExtension(const char *extension, const char *parserName)
+ bool registerExtension(const QCString &extension, const QCString &parserName)
{
- if (parserName==0 || extension==0) return FALSE;
+ if (parserName.isEmpty() || extension.isEmpty()) return FALSE;
- const auto &parserIt = m_parsers.find(parserName);
+ const auto &parserIt = m_parsers.find(parserName.str());
if (parserIt == m_parsers.end()) return FALSE;
- auto extensionIt = m_extensions.find(extension);
+ auto extensionIt = m_extensions.find(extension.str());
if (extensionIt != m_extensions.end()) // extension already exists
{
m_extensions.erase(extensionIt); // remove it (e.g. user specified extension overrules built in one)
}
- m_extensions.emplace(std::string(extension),parserIt->second); // add new mapping
+ m_extensions.emplace(extension.str(),parserIt->second); // add new mapping
return TRUE;
}
@@ -205,7 +205,7 @@ class ParserManager
* If there is no parser explicitly registered for the supplied extension,
* the interface to the default parser will be returned.
*/
- std::unique_ptr<OutlineParserInterface> getOutlineParser(const char *extension)
+ std::unique_ptr<OutlineParserInterface> getOutlineParser(const QCString &extension)
{
return getParsers(extension).outlineParserFactory();
}
@@ -214,14 +214,14 @@ class ParserManager
* If there is no parser explicitly registered for the supplied extension,
* the interface to the default parser will be returned.
*/
- std::unique_ptr<CodeParserInterface> getCodeParser(const char *extension)
+ std::unique_ptr<CodeParserInterface> getCodeParser(const QCString &extension)
{
auto factory = getCodeParserFactory(extension);
return factory();
}
/** Get the factory for create code parser objects with a given \a extension. */
- CodeParserFactory &getCodeParserFactory(const char *extension)
+ CodeParserFactory &getCodeParserFactory(const QCString &extension)
{
return getParsers(extension).codeParserFactory;
}
@@ -230,15 +230,15 @@ class ParserManager
* If there is no parser explicitly registered for the supplied extension,
* te empty string will be reurned.
*/
- QCString getParserName(const char *extension)
+ QCString getParserName(const QCString &extension)
{
return getParsers(extension).parserName;
}
private:
- ParserPair &getParsers(const char *extension)
+ ParserPair &getParsers(const QCString &extension)
{
- QCString ext = QCString(extension).lower().data();
+ QCString ext = extension.lower();
if (ext.isEmpty()) ext=".no_extension";
auto it = m_extensions.find(ext.data());
if (it==m_extensions.end() && ext.length()>4)
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 6bf7319..b86f9aa 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -55,8 +55,7 @@ class PerlModOutputStream
PerlModOutputStream(std::ostream &t) : m_t(t) { }
void add(char c);
- void add(const char *s);
- void add(QCString &s);
+ void add(const QCString &s);
void add(int n);
void add(unsigned int n);
};
@@ -70,7 +69,7 @@ void PerlModOutputStream::add(char c)
// m_s += c;
}
-void PerlModOutputStream::add(const char *s)
+void PerlModOutputStream::add(const QCString &s)
{
m_t << s;
//if (m_t != 0)
@@ -79,15 +78,6 @@ void PerlModOutputStream::add(const char *s)
// m_s += s;
}
-void PerlModOutputStream::add(QCString &s)
-{
- m_t << s.str();
- //if (m_t != 0)
- // (*m_t) << s;
- //else
- // m_s += s;
-}
-
void PerlModOutputStream::add(int n)
{
m_t << n;
@@ -136,12 +126,12 @@ public:
}
inline PerlModOutput &add(char c) { m_stream->add(c); return *this; }
- inline PerlModOutput &add(const char *s) { m_stream->add(s); return *this; }
+ inline PerlModOutput &add(const QCString &s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(QCString &s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(int n) { m_stream->add(n); return *this; }
inline PerlModOutput &add(unsigned int n) { m_stream->add(n); return *this; }
- PerlModOutput &addQuoted(const char *s) { iaddQuoted(s); return *this; }
+ PerlModOutput &addQuoted(const QCString &s) { iaddQuoted(s); return *this; }
inline PerlModOutput &indent()
{
@@ -152,25 +142,25 @@ public:
return *this;
}
- inline PerlModOutput &open(char c, const char *s = 0) { iopen(c, s); return *this; }
+ inline PerlModOutput &open(char c, const QCString &s = QCString()) { iopen(c, s); return *this; }
inline PerlModOutput &close(char c = 0) { iclose(c); return *this; }
- inline PerlModOutput &addField(const char *s) { iaddField(s); return *this; }
- inline PerlModOutput &addFieldQuotedChar(const char *field, char content)
+ inline PerlModOutput &addField(const QCString &s) { iaddField(s); return *this; }
+ inline PerlModOutput &addFieldQuotedChar(const QCString &field, char content)
{
iaddFieldQuotedChar(field, content); return *this;
}
- inline PerlModOutput &addFieldQuotedString(const char *field, const char *content)
+ inline PerlModOutput &addFieldQuotedString(const QCString &field, const QCString &content)
{
iaddFieldQuotedString(field, content); return *this;
}
- inline PerlModOutput &addFieldBoolean(const char *field, bool content)
+ inline PerlModOutput &addFieldBoolean(const QCString &field, bool content)
{
return addFieldQuotedString(field, content ? "yes" : "no");
}
- inline PerlModOutput &openList(const char *s = 0) { open('[', s); return *this; }
+ inline PerlModOutput &openList(const QCString &s = QCString()) { open('[', s); return *this; }
inline PerlModOutput &closeList() { close(']'); return *this; }
- inline PerlModOutput &openHash(const char *s = 0 ) { open('{', s); return *this; }
+ inline PerlModOutput &openHash(const QCString &s = QCString() ) { open('{', s); return *this; }
inline PerlModOutput &closeHash() { close('}'); return *this; }
protected:
@@ -181,12 +171,12 @@ protected:
void incIndent();
void decIndent();
- void iaddQuoted(const char *);
- void iaddFieldQuotedChar(const char *, char);
- void iaddFieldQuotedString(const char *, const char *);
- void iaddField(const char *);
+ void iaddQuoted(const QCString &);
+ void iaddFieldQuotedChar(const QCString &, char);
+ void iaddFieldQuotedString(const QCString &, const QCString &);
+ void iaddField(const QCString &);
- void iopen(char, const char *);
+ void iopen(char, const QCString &);
void iclose(char);
private:
@@ -230,24 +220,29 @@ void PerlModOutput::decIndent()
m_spaces[m_indentation * 2] = 0;
}
-void PerlModOutput::iaddQuoted(const char *s)
+void PerlModOutput::iaddQuoted(const QCString &str)
{
+ if (str.isEmpty()) return;
+ const char *s = str.data();
char c;
- while ((c = *s++) != 0) {
+ while ((c = *s++) != 0)
+ {
if ((c == '\'') || (c == '\\'))
+ {
m_stream->add('\\');
+ }
m_stream->add(c);
}
}
-void PerlModOutput::iaddField(const char *s)
+void PerlModOutput::iaddField(const QCString &s)
{
continueBlock();
m_stream->add(s);
m_stream->add(m_pretty ? " => " : "=>");
}
-void PerlModOutput::iaddFieldQuotedChar(const char *field, char content)
+void PerlModOutput::iaddFieldQuotedChar(const QCString &field, char content)
{
iaddField(field);
m_stream->add('\'');
@@ -257,7 +252,7 @@ void PerlModOutput::iaddFieldQuotedChar(const char *field, char content)
m_stream->add('\'');
}
-void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content)
+void PerlModOutput::iaddFieldQuotedString(const QCString &field, const QCString &content)
{
if (content == 0)
return;
@@ -267,7 +262,7 @@ void PerlModOutput::iaddFieldQuotedString(const char *field, const char *content
m_stream->add('\'');
}
-void PerlModOutput::iopen(char c, const char *s)
+void PerlModOutput::iopen(char c, const QCString &s)
{
if (s != 0)
iaddField(s);
@@ -413,10 +408,10 @@ private:
void enterText();
void leaveText();
- void openItem(const char *);
+ void openItem(const QCString &);
void closeItem();
- void singleItem(const char *);
- void openSubBlock(const char * = 0);
+ void singleItem(const QCString &);
+ void openSubBlock(const QCString & = QCString());
void closeSubBlock();
//void openOther();
//void closeOther();
@@ -452,7 +447,7 @@ void PerlModDocVisitor::addLink(const QCString &,const QCString &file,const QCSt
m_output.addFieldQuotedString("link", link);
}
-void PerlModDocVisitor::openItem(const char *name)
+void PerlModDocVisitor::openItem(const QCString &name)
{
leaveText();
m_output.openHash().addFieldQuotedString("type", name);
@@ -483,13 +478,13 @@ void PerlModDocVisitor::leaveText()
.closeHash();
}
-void PerlModDocVisitor::singleItem(const char *name)
+void PerlModDocVisitor::singleItem(const QCString &name)
{
openItem(name);
closeItem();
}
-void PerlModDocVisitor::openSubBlock(const char *s)
+void PerlModDocVisitor::openSubBlock(const QCString &s)
{
leaveText();
m_output.openList(s);
@@ -1363,7 +1358,7 @@ void PerlModDocVisitor::visitPost(DocXRefItem *x)
void PerlModDocVisitor::visitPre(DocInternalRef *ref)
{
openItem("ref");
- addLink(0,ref->file(),ref->anchor());
+ addLink(QCString(),ref->file(),ref->anchor());
openSubBlock("content");
}
@@ -1410,7 +1405,7 @@ void PerlModDocVisitor::visitPost(DocParBlock *)
}
-static void addTemplateArgumentList(const ArgumentList &al,PerlModOutput &output,const char *)
+static void addTemplateArgumentList(const ArgumentList &al,PerlModOutput &output,const QCString &)
{
if (!al.hasParameters()) return;
output.openList("template_parameters");
@@ -1440,7 +1435,7 @@ static void addTemplateList(const ConceptDef *cd,PerlModOutput &output)
}
static void addPerlModDocBlock(PerlModOutput &output,
- const char *name,
+ const QCString &name,
const QCString &fileName,
int lineNr,
const Definition *scope,
@@ -1452,7 +1447,7 @@ static void addPerlModDocBlock(PerlModOutput &output,
output.addField(name).add("{}");
else {
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext,FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
output.openHash(name);
PerlModDocVisitor *visitor = new PerlModDocVisitor(output);
root->accept(visitor);
@@ -1519,7 +1514,7 @@ public:
void generatePerlModForMember(const MemberDef *md, const Definition *);
void generatePerlUserDefinedSection(const Definition *d, const MemberGroupList &mgl);
void generatePerlModSection(const Definition *d, MemberList *ml,
- const char *name, const char *header=0);
+ const QCString &name, const QCString &header=QCString());
void addListOfAllMembers(const ClassDef *cd);
void addIncludeInfo(const IncludeInfo *ii);
void generatePerlModForClass(const ClassDef *cd);
@@ -1529,7 +1524,7 @@ public:
void generatePerlModForGroup(const GroupDef *gd);
void generatePerlModForPage(PageDef *pi);
- bool createOutputFile(std::ofstream &f, const char *s);
+ bool createOutputFile(std::ofstream &f, const QCString &s);
bool createOutputDir(Dir &perlModDir);
bool generateDoxyLatexTex();
bool generateDoxyFormatTex();
@@ -1661,7 +1656,7 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
if (!md->initializer().isEmpty())
m_output.addFieldQuotedString("initializer", md->initializer());
- if (md->excpString())
+ if (!md->excpString().isEmpty())
m_output.addFieldQuotedString("exceptions", md->excpString());
if (md->memberType()==MemberType_Enumeration) // enum
@@ -1688,7 +1683,7 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
}
}
- if (md->memberType() == MemberType_Variable && md->bitfieldString())
+ if (md->memberType() == MemberType_Variable && !md->bitfieldString().isEmpty())
{
QCString bitfield = md->bitfieldString();
if (bitfield.at(0) == ':') bitfield = bitfield.mid(1);
@@ -1716,13 +1711,13 @@ void PerlModGenerator::generatePerlModForMember(const MemberDef *md,const Defini
}
void PerlModGenerator::generatePerlModSection(const Definition *d,
- MemberList *ml,const char *name,const char *header)
+ MemberList *ml,const QCString &name,const QCString &header)
{
if (ml==0) return; // empty list
m_output.openHash(name);
- if (header)
+ if (!header.isEmpty())
m_output.addFieldQuotedString("header", header);
m_output.openList("members");
@@ -1769,8 +1764,10 @@ void PerlModGenerator::generatePerlUserDefinedSection(const Definition *d, const
for (const auto &mg : mgl)
{
m_output.openHash();
- if (mg->header())
+ if (!mg->header().isEmpty())
+ {
m_output.addFieldQuotedString("header", mg->header());
+ }
if (!mg->members().empty())
{
@@ -2219,12 +2216,12 @@ bool PerlModGenerator::generatePerlModOutput()
return true;
}
-bool PerlModGenerator::createOutputFile(std::ofstream &f, const char *s)
+bool PerlModGenerator::createOutputFile(std::ofstream &f, const QCString &s)
{
- f.open(s,std::ofstream::out | std::ofstream::binary);
+ f.open(s.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n", s);
+ err("Cannot open file %s for writing!\n", qPrint(s));
return false;
}
return true;
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index da26ba7..81f7df8 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -85,7 +85,7 @@ QCString PlantumlManager::writePlantUMLSource(const QCString &outDirArg,const QC
return baseName;
}
-void PlantumlManager::generatePlantUMLOutput(const char *baseName,const char *outDir,OutputFormat format)
+void PlantumlManager::generatePlantUMLOutput(const QCString &baseName,const QCString &outDir,OutputFormat format)
{
QCString plantumlJarPath = Config_getString(PLANTUML_JAR_PATH);
QCString plantumlConfigFile = Config_getString(PLANTUML_CFG_FILE);
@@ -239,7 +239,7 @@ static void runPlantumlContent(const PlantumlManager::FilesMap &plantumlFiles,
Debug::print(Debug::Plantuml,0,"*** %s Running Plantuml arguments:%s\n","PlantumlManager::runPlantumlContent",qPrint(pumlArguments));
Portable::sysTimerStart();
- if ((exitCode=Portable::system(pumlExe,pumlArguments,TRUE))!=0)
+ if ((exitCode=Portable::system(pumlExe.data(),pumlArguments.data(),TRUE))!=0)
{
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);
@@ -264,7 +264,7 @@ static void runPlantumlContent(const PlantumlManager::FilesMap &plantumlFiles,
epstopdfArgs.sprintf("\"%s%s.eps\" --outfile=\"%s%s.pdf\"",
pumlOutDir.data(),str.c_str(), pumlOutDir.data(),str.c_str());
Portable::sysTimerStart();
- if ((exitCode=Portable::system("epstopdf",epstopdfArgs))!=0)
+ if ((exitCode=Portable::system("epstopdf",epstopdfArgs.data()))!=0)
{
err("Problems running epstopdf. Check your TeX installation! Exit code: %d\n",exitCode);
}
diff --git a/src/plantuml.h b/src/plantuml.h
index b92cd0c..6b439f4 100644
--- a/src/plantuml.h
+++ b/src/plantuml.h
@@ -29,14 +29,10 @@
class QCString;
struct PlantumlContent
{
- QCString outDir;
+ PlantumlContent(const QCString &content_, const QCString &outDir_)
+ : content(content_), outDir(outDir_) {}
QCString content;
- PlantumlContent(const QCString Content, const QCString OutDir)
- {
- outDir = OutDir;
- content = Content;
- };
- ~PlantumlContent(){};
+ QCString outDir;
};
/** Singleton that manages plantuml relation actions */
@@ -65,7 +61,7 @@ class PlantumlManager
* @param[in] outDir the directory to write the resulting image into.
* @param[in] format the image format to generate.
*/
- void generatePlantUMLOutput(const char *baseName,const char *outDir,OutputFormat format);
+ void generatePlantUMLOutput(const QCString &baseName,const QCString &outDir,OutputFormat format);
using FilesMap = std::map< std::string, StringVector >;
using ContentMap = std::map< std::string, PlantumlContent >;
diff --git a/src/portable.cpp b/src/portable.cpp
index 98c7465..7448e55 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -39,10 +39,10 @@ static double g_sysElapsedTime;
static std::chrono::steady_clock::time_point g_startTime;
-int Portable::system(const char *command,const char *args,bool commandHasConsole)
+int Portable::system(const QCString &command,const QCString &args,bool commandHasConsole)
{
- if (command==0) return 1;
+ if (command.isEmpty()) return 1;
#if defined(_WIN32) && !defined(__CYGWIN__)
QCString commandCorrectedPath = substitute(command,'/','\\');
@@ -136,7 +136,7 @@ int Portable::system(const char *command,const char *args,bool commandHasConsole
#else // Win32 specific
if (commandHasConsole)
{
- return ::system(fullCmd);
+ return ::system(fullCmd.data());
}
else
{
@@ -243,56 +243,56 @@ void loadEnvironment()
}
#endif
-void Portable::setenv(const char *name,const char *value)
+void Portable::setenv(const QCString &name,const QCString &value)
{
- if (value==0) value="";
#if defined(_WIN32) && !defined(__CYGWIN__)
- SetEnvironmentVariable(name,value);
+ SetEnvironmentVariable(name.data(),!value.isEmpty() ? value.data() : "");
#else
if(!environmentLoaded) // if the environment variables are not loaded already...
{ // ...call loadEnvironment to store them in class
loadEnvironment();
}
- proc_env[name] = std::string(value); // create or replace existing value
+ proc_env[name.str()] = value.str(); // create or replace existing value
#endif
}
-void Portable::unsetenv(const char *variable)
+void Portable::unsetenv(const QCString &variable)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- SetEnvironmentVariable(variable,0);
+ SetEnvironmentVariable(variable.data(),0);
#else
/* Some systems don't have unsetenv(), so we do it ourselves */
- if (variable == NULL || *variable == '\0' || strchr (variable, '=') != NULL)
+ if (variable.isEmpty() || variable.find('=')!=-1)
{
return; // not properly formatted
}
- if(proc_env.find(variable) != proc_env.end())
+ auto it = proc_env.find(variable.str());
+ if (it != proc_env.end())
{
- proc_env[variable].erase();
+ proc_env.erase(it);
}
#endif
}
-const char *Portable::getenv(const char *variable)
+QCString Portable::getenv(const QCString &variable)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- return ::getenv(variable);
+ return ::getenv(variable.data());
#else
if(!environmentLoaded) // if the environment variables are not loaded already...
- { // ...call loadEnvironment to store them in class
+ { // ...call loadEnvironment to store them in class
loadEnvironment();
}
- if(proc_env.find(variable) != proc_env.end())
+ if (proc_env.find(variable.str()) != proc_env.end())
{
- return proc_env[variable].c_str();
+ return QCString(proc_env[variable.str()]);
}
else
{
- return NULL;
+ return QCString();
}
#endif
}
@@ -319,7 +319,7 @@ portable_off_t Portable::ftell(FILE *f)
#endif
}
-FILE *Portable::fopen(const char *fileName,const char *mode)
+FILE *Portable::fopen(const QCString &fileName,const QCString &mode)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
uint16_t *fn = 0;
@@ -335,37 +335,36 @@ FILE *Portable::fopen(const char *fileName,const char *mode)
delete[] m;
return result;
#else
- return ::fopen(fileName,mode);
+ return ::fopen(fileName.data(),mode.data());
#endif
}
-char Portable::pathSeparator()
+QCString Portable::pathSeparator()
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- return '\\';
+ return "\\";
#else
- return '/';
+ return "/";
#endif
}
-char Portable::pathListSeparator()
+QCString Portable::pathListSeparator()
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- return ';';
+ return ";";
#else
- return ':';
+ return ":";
#endif
}
-static bool ExistsOnPath(const char *fileName)
+static bool ExistsOnPath(const QCString &fileName)
{
- FileInfo fi1(fileName);
+ FileInfo fi1(fileName.str());
if (fi1.exists()) return true;
- const char *p = Portable::getenv("PATH");
- char listSep = Portable::pathListSeparator();
- char pathSep = Portable::pathSeparator();
- QCString paths(p);
+ QCString paths = Portable::getenv("PATH");
+ char listSep = Portable::pathListSeparator()[0];
+ char pathSep = Portable::pathSeparator()[0];
int strt = 0;
int idx;
while ((idx = paths.find(listSep,strt)) != -1)
@@ -389,13 +388,13 @@ static bool ExistsOnPath(const char *fileName)
return false;
}
-bool Portable::checkForExecutable(const char *fileName)
+bool Portable::checkForExecutable(const QCString &fileName)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
char *extensions[] = {".bat",".com",".exe"};
for (int i = 0; i < sizeof(extensions) / sizeof(*extensions); i++)
{
- if (ExistsOnPath(QCString(fileName) + extensions[i])) return true;
+ if (ExistsOnPath(fileName + extensions[i])) return true;
}
return false;
#else
@@ -445,12 +444,12 @@ bool Portable::fileSystemIsCaseSensitive()
#endif
}
-FILE * Portable::popen(const char *name,const char *type)
+FILE * Portable::popen(const QCString &name,const QCString &type)
{
#if defined(_MSC_VER) || defined(__BORLANDC__)
- return ::_popen(name,type);
+ return ::_popen(name.data(),type.data());
#else
- return ::popen(name,type);
+ return ::popen(name.data(),type.data());
#endif
}
@@ -489,19 +488,16 @@ void Portable::sleep(int ms)
#endif
}
-bool Portable::isAbsolutePath(const char *fileName)
+bool Portable::isAbsolutePath(const QCString &fileName)
{
+ const char *fn = fileName.data();
# ifdef _WIN32
- if (isalpha (fileName [0]) && fileName[1] == ':')
- fileName += 2;
+ if (fileName.length()>1 && isalpha(fileName[0]) && fileName[1]==':') fn+=2;
# endif
- char const fst = fileName [0];
- if (fst == '/') {
- return true;
- }
+ char const fst = fn[0];
+ if (fst == '/') return true;
# ifdef _WIN32
- if (fst == '\\')
- return true;
+ if (fst == '\\') return true;
# endif
return false;
}
@@ -514,19 +510,19 @@ bool Portable::isAbsolutePath(const char *fileName)
void Portable::correct_path()
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- const char *p = Portable::getenv("PATH");
- if (!p) return; // no path nothing to correct
- QCString result = substitute(p,'/','\\');
+ QCString p = Portable::getenv("PATH");
+ if (p.isEmpty()) return; // no path nothing to correct
+ QCString result = substitute(p,"/","\\");
if (result!=p) Portable::setenv("PATH",result.data());
#endif
}
-void Portable::unlink(const char *fileName)
+void Portable::unlink(const QCString &fileName)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- _unlink(fileName);
+ _unlink(fileName.data());
#else
- ::unlink(fileName);
+ ::unlink(fileName.data());
#endif
}
@@ -600,17 +596,18 @@ const char *Portable::devNull()
#endif
}
-size_t Portable::recodeUtf8StringToW(const char *inputStr,uint16_t **outBuf)
+size_t Portable::recodeUtf8StringToW(const QCString &inputStr,uint16_t **outBuf)
{
- if (inputStr==0 || outBuf==0) return 0; // empty input or invalid output
+ if (inputStr.isEmpty() || outBuf==0) return 0; // empty input or invalid output
void *handle = portable_iconv_open("UTF-16LE","UTF-8");
if (handle==(void *)(-1)) return 0; // invalid encoding
- size_t len = strlen(inputStr);
+ size_t len = inputStr.length();
uint16_t *buf = new uint16_t[len+1];
*outBuf = buf;
size_t inRemains = len;
size_t outRemains = len*sizeof(uint16_t)+2; // chars + \0
- portable_iconv(handle,(char**)&inputStr,&inRemains,(char**)&buf,&outRemains);
+ const char *p = inputStr.data();
+ portable_iconv(handle,(char**)&p,&inRemains,(char**)&buf,&outRemains);
*buf=0;
portable_iconv_close(handle);
return len;
diff --git a/src/portable.h b/src/portable.h
index d1bfed1..bf4cb47 100644
--- a/src/portable.h
+++ b/src/portable.h
@@ -5,6 +5,8 @@
#include <sys/types.h>
#include <stdint.h>
+#include "qcstring.h"
+
class Buf;
#if defined(_WIN32)
@@ -19,38 +21,38 @@ typedef off_t portable_off_t;
namespace Portable
{
- int system(const char *command,const char *args,bool commandHasConsole=true);
+ int system(const QCString &command,const QCString &args,bool commandHasConsole=true);
unsigned int pid();
- const char * getenv(const char *variable);
- void setenv(const char *variable,const char *value);
- void unsetenv(const char *variable);
+ QCString getenv(const QCString &variable);
+ void setenv(const QCString &variable,const QCString &value);
+ void unsetenv(const QCString &variable);
portable_off_t fseek(FILE *f,portable_off_t offset, int whence);
portable_off_t ftell(FILE *f);
- FILE * fopen(const char *fileName,const char *mode);
- void unlink(const char *fileName);
- char pathSeparator();
- char pathListSeparator();
+ FILE * fopen(const QCString &fileName,const QCString &mode);
+ void unlink(const QCString &fileName);
+ QCString pathSeparator();
+ QCString pathListSeparator();
const char * ghostScriptCommand();
const char * commandExtension();
bool fileSystemIsCaseSensitive();
- FILE * popen(const char *name,const char *type);
+ FILE * popen(const QCString &name,const QCString &type);
int pclose(FILE *stream);
void sysTimerStart();
void sysTimerStop();
double getSysElapsedTime();
void sleep(int ms);
- bool isAbsolutePath(const char *fileName);
+ bool isAbsolutePath(const QCString &fileName);
void correct_path();
void setShortDir();
const char * strnstr(const char *haystack, const char *needle, size_t haystack_len);
const char * devNull();
- bool checkForExecutable(const char *fileName);
- size_t recodeUtf8StringToW(const char *inputStr,uint16_t **buf);
+ bool checkForExecutable(const QCString &fileName);
+ size_t recodeUtf8StringToW(const QCString &inputStr,uint16_t **buf);
}
extern "C" {
- void * portable_iconv_open(const char* tocode, const char* fromcode);
+ void * portable_iconv_open(const QCString &tocode, const QCString &fromcode);
size_t portable_iconv (void *cd, char** inbuf, size_t *inbytesleft,
char* * outbuf, size_t *outbytesleft);
int portable_iconv_close (void *cd);
diff --git a/src/pre.h b/src/pre.h
index 47f6652..fcf511e 100644
--- a/src/pre.h
+++ b/src/pre.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- *
+ *
*
* 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.
*
@@ -21,14 +21,15 @@
#include <memory>
class BufStr;
+class QCString;
class Preprocessor
{
public:
Preprocessor();
~Preprocessor();
- void processFile(const char *fileName,BufStr &input,BufStr &output);
- void addSearchDir(const char *dir);
+ void processFile(const QCString &fileName,BufStr &input,BufStr &output);
+ void addSearchDir(const QCString &dir);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/pre.l b/src/pre.l
index 6c46f39..580b553 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -96,7 +96,7 @@ struct FileState
struct PreIncludeInfo
{
- PreIncludeInfo(const char *fn,FileDef *srcFd, FileDef *dstFd,const char *iName,bool loc, bool imp)
+ PreIncludeInfo(const QCString &fn,FileDef *srcFd, FileDef *dstFd,const QCString &iName,bool loc, bool imp)
: fileName(fn), fromFileDef(srcFd), toFileDef(dstFd), includeName(iName), local(loc), imported(imp)
{
}
@@ -154,7 +154,7 @@ class DefineManager
{
includeStack.insert(incFile);
dpf->retrieveRec(toMap,includeStack);
- //printf(" retrieveRec: processing include %s: #toMap=%zu\n",incFile.data(),toMap.size());
+ //printf(" retrieveRec: processing include %s: #toMap=%zu\n",qPrint(incFile),toMap.size());
}
}
for (auto &kv : m_defines)
@@ -307,12 +307,13 @@ struct preYY_state
};
// stateless functions
-static QCString escapeAt(const char *text);
-static QCString extractTrailingComment(const char *s);
+static QCString escapeAt(const QCString &text);
+static QCString extractTrailingComment(const QCString &s);
static char resolveTrigraph(char c);
// statefull functions
-static inline void outputArray(yyscan_t yyscanner,const char *a,int len);
+static inline void outputArray(yyscan_t yyscanner,const char *a,yy_size_t len);
+static inline void outputString(yyscan_t yyscanner,const QCString &s);
static inline void outputChar(yyscan_t yyscanner,char c);
static QCString expandMacro(yyscan_t yyscanner,const QCString &name);
static void readIncludeFile(yyscan_t yyscanner,const QCString &inc);
@@ -321,13 +322,13 @@ static void decrLevel(yyscan_t yyscanner);
static void setCaseDone(yyscan_t yyscanner,bool value);
static bool otherCaseDone(yyscan_t yyscanner);
static bool computeExpression(yyscan_t yyscanner,const QCString &expr);
-static void startCondSection(yyscan_t yyscanner,const char *sectId);
+static void startCondSection(yyscan_t yyscanner,const QCString &sectId);
static void endCondSection(yyscan_t yyscanner);
static void addMacroDefinition(yyscan_t yyscanner);
static void addDefine(yyscan_t yyscanner);
-static void setFileName(yyscan_t yyscanner,const char *name);
+static void setFileName(yyscan_t yyscanner,const QCString &name);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
-static Define * isDefined(yyscan_t yyscanner,const char *name);
+static Define * isDefined(yyscan_t yyscanner,const QCString &name);
/* ----------------------------------------------------------------- */
@@ -411,11 +412,11 @@ WSopt [ \t\r]*
<Start>^{B}*"#" { BEGIN(Command); yyextra->yyColNr+=(int)yyleng; yyextra->yyMLines=0;}
<Start>^("%top{"|"%{") {
if (getLanguageFromFileName(yyextra->yyFileName)!=SrcLangExt_Lex) REJECT
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
BEGIN(LexCopyLine);
}
<Start>^{Bopt}/[^#] {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
BEGIN(CopyLine);
}
<Start>^{B}*[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]+{B}*"("[^\)\n]*")"/{BN}{1,10}*[:{] { // constructors?
@@ -460,12 +461,12 @@ WSopt [ \t\r]*
<CopyLine,LexCopyLine>"extern"{BN}{0,80}"\"C\""*{BN}{0,80}"{" {
QCString text=yytext;
yyextra->yyLineNr+=text.contains('\n');
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>{RAWBEGIN} {
yyextra->delimiter = yytext+2;
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
BEGIN(CopyRawString);
}
<CopyLine,LexCopyLine>"{" { // count brackets inside the main file
@@ -476,7 +477,7 @@ WSopt [ \t\r]*
outputChar(yyscanner,*yytext);
}
<LexCopyLine>^"%}" {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>"}" { // count brackets inside the main file
if (yyextra->includeStack.empty() && yyextra->curlyCount>0)
@@ -486,17 +487,17 @@ WSopt [ \t\r]*
outputChar(yyscanner,*yytext);
}
<CopyLine,LexCopyLine>"'"\\[0-7]{1,3}"'" {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>"'"\\."'" {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>"'"."'" {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyLine,LexCopyLine>@\" {
if (getLanguageFromFileName(yyextra->yyFileName)!=SrcLangExt_CSharp) REJECT;
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
BEGIN( CopyStringCs );
}
<CopyLine,LexCopyLine>\" {
@@ -516,40 +517,40 @@ WSopt [ \t\r]*
BEGIN( CopyStringFtn );
}
<CopyString>[^\"\\\r\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringCs>[^\"\r\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyString>\\. {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyString,CopyStringCs>\" {
outputChar(yyscanner,*yytext);
BEGIN( CopyLine );
}
<CopyStringFtnDouble>[^\"\\\r\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringFtnDouble>\\. {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringFtnDouble>\" {
outputChar(yyscanner,*yytext);
BEGIN( CopyLine );
}
<CopyStringFtn>[^\'\\\r\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringFtn>\\. {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyStringFtn>\' {
outputChar(yyscanner,*yytext);
BEGIN( CopyLine );
}
<CopyRawString>{RAWEND} {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
QCString delimiter = yytext+1;
delimiter=delimiter.left(delimiter.length()-1);
if (delimiter==yyextra->delimiter)
@@ -558,7 +559,7 @@ WSopt [ \t\r]*
}
}
<CopyRawString>[^)]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<CopyRawString>. {
outputChar(yyscanner,*yytext);
@@ -587,7 +588,7 @@ WSopt [ \t\r]*
if (def->nargs==-1) // no function macro
{
QCString result = def->isPredefined ? def->definition : expandMacro(yyscanner,yyextra->defArgsStr);
- outputArray(yyscanner,result,result.length());
+ outputString(yyscanner,result);
}
else // zero or more arguments
{
@@ -597,7 +598,7 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
}
<CopyLine,LexCopyLine>{ID} {
@@ -611,11 +612,11 @@ WSopt [ \t\r]*
)
{
QCString result=def->isPredefined ? def->definition : expandMacro(yyscanner,yytext);
- outputArray(yyscanner,result,result.length());
+ outputString(yyscanner,result);
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
}
<CopyLine,LexCopyLine>"\\"\r?/\n { // strip line continuation characters
@@ -640,10 +641,10 @@ WSopt [ \t\r]*
if (yyextra->roundCount==0)
{
QCString result=expandMacro(yyscanner,yyextra->defArgsStr);
- //printf("yyextra->defArgsStr='%s'->'%s'\n",yyextra->defArgsStr.data(),result.data());
+ //printf("yyextra->defArgsStr='%s'->'%s'\n",qPrint(yyextra->defArgsStr),qPrint(result));
if (yyextra->findDefArgContext==CopyLine)
{
- outputArray(yyscanner,result,result.length());
+ outputString(yyscanner,result);
BEGIN(yyextra->findDefArgContext);
}
else // yyextra->findDefArgContext==IncludeID
@@ -848,7 +849,7 @@ WSopt [ \t\r]*
<Guard>\n {
unput(*yytext);
//printf("Guard: '%s'\n",
- // yyextra->guardExpr.data());
+ // qPrint(yyextra->guardExpr));
bool guard=computeExpression(yyscanner,yyextra->guardExpr);
setCaseDone(yyscanner,guard);
if (guard)
@@ -1020,11 +1021,11 @@ WSopt [ \t\r]*
yyextra->defName = yyextra->defName.left(yyextra->defName.length()-1).stripWhiteSpace();
yyextra->defVarArgs = FALSE;
//printf("Guard check: %s!=%s || %d\n",
- // yyextra->defName.data(),yyextra->lastGuardName.data(),yyextra->expectGuard);
+ // qPrint(yyextra->defName),qPrint(yyextra->lastGuardName),yyextra->expectGuard);
if (yyextra->curlyCount>0 || yyextra->defName!=yyextra->lastGuardName || !yyextra->expectGuard)
{ // define may appear in the output
QCString tmp=(QCString)"#define "+yyextra->defName;
- outputArray(yyscanner,tmp.data(),tmp.length());
+ outputString(yyscanner,tmp);
yyextra->quoteArg=FALSE;
yyextra->insideComment=FALSE;
yyextra->lastGuardName.resize(0);
@@ -1050,11 +1051,11 @@ WSopt [ \t\r]*
yyextra->defLitText.resize(0);
yyextra->defVarArgs = FALSE;
//printf("Guard check: %s!=%s || %d\n",
- // yyextra->defName.data(),yyextra->lastGuardName.data(),yyextra->expectGuard);
+ // qPrint(yyextra->defName),qPrint(yyextra->lastGuardName),yyextra->expectGuard);
if (yyextra->curlyCount>0 || yyextra->defName!=yyextra->lastGuardName || !yyextra->expectGuard)
{ // define may appear in the output
QCString tmp=(QCString)"#define "+yyextra->defName;
- outputArray(yyscanner,tmp.data(),tmp.length());
+ outputString(yyscanner,tmp);
yyextra->quoteArg=FALSE;
yyextra->insideComment=FALSE;
if (yyextra->insideCS) yyextra->defText="1"; // for C#, use "1" as define text
@@ -1079,7 +1080,7 @@ WSopt [ \t\r]*
yyextra->defName = yytext;
yyextra->defVarArgs = FALSE;
QCString tmp=(QCString)"#define "+yyextra->defName+yyextra->defArgsStr;
- outputArray(yyscanner,tmp.data(),tmp.length());
+ outputString(yyscanner,tmp);
yyextra->quoteArg=FALSE;
yyextra->insideComment=FALSE;
BEGIN(DefineText);
@@ -1093,7 +1094,7 @@ WSopt [ \t\r]*
<DefineArg>{B}*")"{B}* {
yyextra->defArgsStr+=yytext;
QCString tmp=(QCString)"#define "+yyextra->defName+yyextra->defArgsStr+yyextra->defExtraSpacing;
- outputArray(yyscanner,tmp.data(),tmp.length());
+ outputString(yyscanner,tmp);
yyextra->quoteArg=FALSE;
yyextra->insideComment=FALSE;
BEGIN(DefineText);
@@ -1137,7 +1138,7 @@ WSopt [ \t\r]*
BEGIN(CopyCComment);
}
<DefineText>{CPPC}[!/]? {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->lastCPPContext=YY_START;
yyextra->defLitText+=' ';
BEGIN(SkipCPPComment);
@@ -1157,14 +1158,14 @@ WSopt [ \t\r]*
}
}
<SkipCComment>{CPPC}("/")* {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCComment>{CCS} {
outputChar(yyscanner,'/');outputChar(yyscanner,'*');
//yyextra->commentCount++;
}
<SkipCComment>[\\@][\\@]("f{"|"f$"|"f[") {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCComment>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
bool markdownSupport = Config_getBool(MARKDOWN_SUPPORT);
@@ -1174,7 +1175,7 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->fenceSize=(int)yyleng;
BEGIN(SkipVerbatim);
}
@@ -1187,17 +1188,17 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->fenceSize=(int)yyleng;
BEGIN(SkipVerbatim);
}
}
<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"("{"[^}]*"}")?){BN}+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->yyLineNr+=QCString(yytext).contains('\n');
}
<SkipCComment>[\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"("{"[^}]*"}")?){BN}+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->yyLineNr+=QCString(yytext).contains('\n');
yyextra->fenceSize=0;
if (yytext[1]=='f')
@@ -1214,7 +1215,7 @@ WSopt [ \t\r]*
BEGIN(SkipVerbatim);
}
<SkipCComment,SkipCPPComment>[\\@][\\@]"cond"[ \t]+ { // escaped @cond
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCPPComment>[\\@]"cond"[ \t]+ { // conditional section
yyextra->ccomment=TRUE;
@@ -1292,7 +1293,7 @@ WSopt [ \t\r]*
<SkipCond,SkipCComment,SkipCPPComment>[\\@][\\@]"endcond"/[^a-z_A-Z0-9\x80-\xFF] {
if (!yyextra->skip)
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
}
<SkipCond>[\\@]"endcond"/[^a-z_A-Z0-9\x80-\xFF] {
@@ -1316,7 +1317,7 @@ WSopt [ \t\r]*
}
}
<SkipVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}") { /* end of verbatim block */
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
if (yytext[1]=='f' && yyextra->blockName=="f")
{
BEGIN(SkipCComment);
@@ -1327,24 +1328,24 @@ WSopt [ \t\r]*
}
}
<SkipVerbatim>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
if (yyextra->fenceSize==(yy_size_t)yyleng)
{
BEGIN(SkipCComment);
}
}
<SkipVerbatim>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
if (yyextra->fenceSize==(yy_size_t)yyleng)
{
BEGIN(SkipCComment);
}
}
<SkipVerbatim>{CCE}|{CCS} {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCComment,SkipVerbatim>[^*\\@\x06~`\n\/]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCComment,SkipVerbatim>\n {
yyextra->yyLineNr++;
@@ -1390,7 +1391,7 @@ WSopt [ \t\r]*
<RemoveCComment>\n { yyextra->yyLineNr++; outputChar(yyscanner,'\n'); }
<RemoveCComment>.
<SkipCPPComment>[^\n\/\\@]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCPPComment,RemoveCPPComment>\n {
unput(*yytext);
@@ -1403,7 +1404,7 @@ WSopt [ \t\r]*
outputChar(yyscanner,'/');outputChar(yyscanner,'/');
}
<SkipCPPComment>[^\x06\@\\\n]+ {
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
}
<SkipCPPComment>. {
outputChar(yyscanner,*yytext);
@@ -1462,12 +1463,12 @@ WSopt [ \t\r]*
yyextra->defLitText+=yytext;
if (!comment.isEmpty())
{
- outputArray(yyscanner,comment,comment.length());
+ outputString(yyscanner,comment);
yyextra->defLitText=yyextra->defLitText.left(yyextra->defLitText.length()-comment.length()-1);
}
outputChar(yyscanner,'\n');
Define *def=0;
- //printf("Define name='%s' text='%s' litTexti='%s'\n",yyextra->defName.data(),yyextra->defText.data(),yyextra->defLitText.data());
+ //printf("Define name='%s' text='%s' litTexti='%s'\n",qPrint(yyextra->defName),qPrint(yyextra->defText),qPrint(yyextra->defLitText));
if (yyextra->includeStack.empty() || yyextra->curlyCount>0)
{
addMacroDefinition(yyscanner);
@@ -1475,7 +1476,7 @@ WSopt [ \t\r]*
def=isDefined(yyscanner,yyextra->defName);
if (def==0) // new define
{
- //printf("new define '%s'!\n",yyextra->defName.data());
+ //printf("new define '%s'!\n",qPrint(yyextra->defName));
addDefine(yyscanner);
}
else if (def /*&& macroIsAccessible(def)*/)
@@ -1489,13 +1490,13 @@ WSopt [ \t\r]*
def->name = yyextra->defName;
def->definition = yyextra->defText.stripWhiteSpace();
def->nargs = yyextra->defArgs;
- def->fileName = yyextra->yyFileName.copy();
+ def->fileName = yyextra->yyFileName;
def->lineNr = yyextra->yyLineNr-yyextra->yyMLines;
def->columnNr = yyextra->yyColNr;
}
else
{
- //printf("error: define %s is defined more than once!\n",yyextra->defName.data());
+ //printf("error: define %s is defined more than once!\n",qPrint(yyextra->defName));
}
}
yyextra->argMap.clear();
@@ -1560,13 +1561,13 @@ WSopt [ \t\r]*
yyextra->inputBufPos = fs->oldFileBufPos;
yyextra->curlyCount = fs->curlyCount;
setFileName(yyscanner,fs->fileName);
- DBG_CTX((stderr,"######## FileName %s\n",yyextra->yyFileName.data()));
+ DBG_CTX((stderr,"######## FileName %s\n",qPrint(yyextra->yyFileName)));
// Deal with file changes due to
// #include's within { .. } blocks
QCString lineStr(15+yyextra->yyFileName.length());
- lineStr.sprintf("# %d \"%s\" 2",yyextra->yyLineNr,yyextra->yyFileName.data());
- outputArray(yyscanner,lineStr.data(),lineStr.length());
+ lineStr.sprintf("# %d \"%s\" 2",yyextra->yyLineNr,qPrint(yyextra->yyFileName));
+ outputString(yyscanner,lineStr);
yyextra->includeStack.pop_back();
@@ -1611,7 +1612,7 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->lastCContext=YY_START;
yyextra->commentCount=1;
if (yyleng==3)
@@ -1633,7 +1634,7 @@ WSopt [ \t\r]*
}
else
{
- outputArray(yyscanner,yytext,(int)yyleng);
+ outputArray(yyscanner,yytext,yyleng);
yyextra->lastCPPContext=YY_START;
if (yyleng==3)
{
@@ -1670,11 +1671,11 @@ static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size)
return bytesToCopy;
}
-static void setFileName(yyscan_t yyscanner,const char *name)
+static void setFileName(yyscan_t yyscanner,const QCString &name)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
bool ambig;
- FileInfo fi(name);
+ FileInfo fi(name.str());
state->yyFileName=fi.absFilePath();
state->yyFileDef=findFileDef(Doxygen::inputNameLinkedMap,state->yyFileName,ambig);
if (state->yyFileDef==0) // if this is not an input file check if it is an
@@ -1683,7 +1684,7 @@ static void setFileName(yyscan_t yyscanner,const char *name)
state->yyFileDef=findFileDef(Doxygen::includeNameLinkedMap,state->yyFileName,ambig);
}
//printf("setFileName(%s) state->yyFileName=%s state->yyFileDef=%p\n",
- // name,state->yyFileName.data(),state->yyFileDef);
+ // name,qPrint(state->yyFileName),state->yyFileDef);
if (state->yyFileDef && state->yyFileDef->isReference()) state->yyFileDef=0;
state->insideCS = getLanguageFromFileName(state->yyFileName)==SrcLangExt_CSharp;
state->insideFtn = getLanguageFromFileName(state->yyFileName)==SrcLangExt_Fortran;
@@ -1694,13 +1695,13 @@ static void incrLevel(yyscan_t yyscanner)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
state->levelGuard.push(false);
- //printf("%s line %d: incrLevel %d\n",yyextra->yyFileName.data(),yyextra->yyLineNr,yyextra->levelGuard.size());
+ //printf("%s line %d: incrLevel %d\n",qPrint(yyextra->yyFileName),yyextra->yyLineNr,yyextra->levelGuard.size());
}
static void decrLevel(yyscan_t yyscanner)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf("%s line %d: decrLevel %d\n",state->yyFileName.data(),state->yyLineNr,state->levelGuard.size());
+ //printf("%s line %d: decrLevel %d\n",qPrint(state->yyFileName),state->yyLineNr,state->levelGuard.size());
if (!state->levelGuard.empty())
{
state->levelGuard.pop();
@@ -1737,7 +1738,7 @@ static FileState *checkAndOpenFile(yyscan_t yyscanner,const QCString &fileName,b
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
alreadyProcessed = FALSE;
FileState *fs = 0;
- //printf("checkAndOpenFile(%s)\n",fileName.data());
+ //printf("checkAndOpenFile(%s)\n",qPrint(fileName));
FileInfo fi(fileName.str());
if (fi.exists() && fi.isFile())
{
@@ -1771,7 +1772,7 @@ static FileState *checkAndOpenFile(yyscan_t yyscanner,const QCString &fileName,b
//printf(" already included 2\n");
return 0;
}
- //printf("#include %s\n",absName.data());
+ //printf("#include %s\n",qPrint(absName));
fs = new FileState(fi.size()+4096);
if (!readInputFile(absName,fs->fileBuf))
@@ -1789,10 +1790,10 @@ static FileState *checkAndOpenFile(yyscan_t yyscanner,const QCString &fileName,b
return fs;
}
-static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localInclude,bool &alreadyProcessed)
+static FileState *findFile(yyscan_t yyscanner, const QCString &fileName,bool localInclude,bool &alreadyProcessed)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf("** findFile(%s,%d) state->yyFileName=%s\n",fileName,localInclude,state->yyFileName.data());
+ //printf("** findFile(%s,%d) state->yyFileName=%s\n",qPrint(fileName),localInclude,qPrint(state->yyFileName));
if (Portable::isAbsolutePath(fileName))
{
FileState *fs = checkAndOpenFile(yyscanner,fileName,alreadyProcessed);
@@ -1812,7 +1813,7 @@ static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localIn
FileInfo fi(state->yyFileName.str());
if (fi.exists())
{
- QCString absName = QCString(fi.dirPath(TRUE).data())+"/"+fileName;
+ QCString absName = QCString(fi.dirPath(TRUE))+"/"+fileName;
FileState *fs = checkAndOpenFile(yyscanner,absName,alreadyProcessed);
if (fs)
{
@@ -1832,7 +1833,7 @@ static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localIn
}
for (auto path : state->pathList)
{
- std::string absName = path+"/"+fileName;
+ std::string absName = (path+"/"+fileName).str();
//printf(" Looking for %s in %s\n",fileName,path.c_str());
FileState *fs = checkAndOpenFile(yyscanner,absName.c_str(),alreadyProcessed);
if (fs)
@@ -1850,10 +1851,10 @@ static FileState *findFile(yyscan_t yyscanner, const char *fileName,bool localIn
return 0;
}
-static QCString extractTrailingComment(const char *s)
+static QCString extractTrailingComment(const QCString &s)
{
- if (s==0) return "";
- int i=(int)strlen(s)-1;
+ if (s.isEmpty()) return "";
+ int i=(int)s.length()-1;
while (i>=0)
{
char c=s[i];
@@ -1969,7 +1970,7 @@ static QCString stringize(const QCString &s)
}
}
}
- //printf("stringize '%s'->'%s'\n",s.data(),result.data());
+ //printf("stringize '%s'->'%s'\n",qPrint(s),qPrint(result));
return result;
}
@@ -1981,7 +1982,7 @@ static QCString stringize(const QCString &s)
static void processConcatOperators(QCString &expr)
{
if (expr.isEmpty()) return;
- //printf("processConcatOperators: in='%s'\n",expr.data());
+ //printf("processConcatOperators: in='%s'\n",qPrint(expr));
std::string e = expr.str();
static const reg::Ex r(R"(\s*##\s*)");
reg::Iterator end;
@@ -1995,13 +1996,13 @@ static void processConcatOperators(QCString &expr)
const auto &match = *it;
size_t n = match.position();
size_t l = match.length();
- //printf("Match: '%s'\n",expr.data()+i);
+ //printf("Match: '%s'\n",qPrint(expr.mid(i)));
if (n+l+1<e.length() && e[static_cast<int>(n+l)]=='@' && expr[static_cast<int>(n+l+1)]=='-')
{
// remove no-rescan marker after ID
l+=2;
}
- //printf("found '%s'\n",expr.mid(n,l).data());
+ //printf("found '%s'\n",qPrint(expr.mid(n,l)));
// remove the ## operator and the surrounding whitespace
e=e.substr(0,n)+e.substr(n+l);
int k=static_cast<int>(n)-1;
@@ -2022,7 +2023,7 @@ static void processConcatOperators(QCString &expr)
expr = e;
- //printf("processConcatOperators: out='%s'\n",expr.data());
+ //printf("processConcatOperators: out='%s'\n",qPrint(expr));
}
static void returnCharToStream(yyscan_t yyscanner,char c)
@@ -2053,7 +2054,7 @@ static inline void addTillEndOfString(yyscan_t yyscanner,const QCString &expr,QC
static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result,int level)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf(">replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s') level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),state->levelGuard.size());
+ //printf(">replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s') level=%d\n",qPrint(expr),rest ? qPrint(*rest) : 0,pos,qPrint(def->name),state->levelGuard.size());
uint j=pos;
len=0;
result.resize(0);
@@ -2206,7 +2207,7 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
// substitution of all formal arguments
QCString resExpr;
const QCString d=def->definition.stripWhiteSpace();
- //printf("Macro definition: '%s'\n",d.data());
+ //printf("Macro definition: '%s'\n",qPrint(d));
bool inString=FALSE;
while (k<d.length())
{
@@ -2242,12 +2243,12 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
while (l<(int)d.length() && d.at(l)==' ') l++;
if (l<(int)d.length()-1 && d.at(l)=='#' && d.at(l+1)=='#') hash=TRUE;
}
- //printf("request key %s result %s\n",key.data(),argTable[key]->data());
- auto it = argTable.find(key.data());
+ //printf("request key %s result %s\n",qPrint(key),argTable[key]->data());
+ auto it = argTable.find(key.str());
if (it!=argTable.end())
{
QCString substArg = it->second.c_str();
- //printf("substArg='%s'\n",substArg.data());
+ //printf("substArg='%s'\n",qPrint(substArg));
// only if no ## operator is before or after the argument
// marker we do macro expansion.
if (!hash)
@@ -2256,7 +2257,7 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
}
if (inString)
{
- //printf("'%s'=stringize('%s')\n",stringize(*subst).data(),subst->data());
+ //printf("'%s'=stringize('%s')\n",qPrint(stringize(*subst)),subst->data());
// if the marker is inside a string (because a # was put
// before the macro name) we must escape " and \ characters
@@ -2295,10 +2296,10 @@ static bool replaceFunctionMacro(yyscan_t yyscanner,const QCString &expr,QCStrin
}
len=j-pos;
result=resExpr;
- //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=TRUE\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),result.data(),state->levelGuard.size());
+ //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=TRUE\n",qPrint(expr),rest ? qPrint(*rest) : 0,pos,qPrint(def->name),qPrint(result),state->levelGuard.size());
return TRUE;
}
- //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=FALSE\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),result.data(),state->levelGuard.size());
+ //printf("<replaceFunctionMacro(expr='%s',rest='%s',pos=%d,def='%s',result='%s') level=%d return=FALSE\n",qPrint(expr),rest ? qPrint(*rest) : 0,pos,qPrint(def->name),qPrint(result),state->levelGuard.size());
return FALSE;
}
@@ -2370,21 +2371,21 @@ static int getNextId(const QCString &expr,int p,int *l)
static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,int pos,int level)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
- //printf(">expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",expr.data(),rest ? rest->data() : "", pos, level);
+ //printf(">expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",qPrint(expr),rest ? qPrint(*rest) : "", pos, level);
if (expr.isEmpty())
{
//printf("<expandExpression: empty\n");
return TRUE;
}
- if (state->expanded.find(expr.data())!=state->expanded.end() &&
+ if (state->expanded.find(expr.str())!=state->expanded.end() &&
level>MAX_EXPANSION_DEPTH) // check for too deep recursive expansions
{
- //printf("<expandExpression: already expanded expr='%s'\n",expr.data());
+ //printf("<expandExpression: already expanded expr='%s'\n",qPrint(expr));
return FALSE;
}
else
{
- state->expanded.insert(expr.data());
+ state->expanded.insert(expr.str());
}
QCString macroName;
QCString expMacro;
@@ -2396,15 +2397,15 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
{
bool replaced=FALSE;
macroName=expr.mid(p,l);
- //printf(" p=%d macroName=%s\n",p,macroName.data());
+ //printf(" p=%d macroName=%s\n",p,qPrint(macroName));
if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker?
{
- if (state->expandedDict.find(macroName.data())==state->expandedDict.end()) // expand macro
+ if (state->expandedDict.find(macroName.str())==state->expandedDict.end()) // expand macro
{
Define *def=isDefined(yyscanner,macroName);
if (macroName=="defined")
{
- //printf("found defined inside macro definition '%s'\n",expr.right(expr.length()-p).data());
+ //printf("found defined inside macro definition '%s'\n",qPrint(expr.right(expr.length()-p)));
definedTest=TRUE;
}
else if (definedTest) // macro name was found after defined
@@ -2417,7 +2418,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
else if (def && def->nargs==-1) // simple macro
{
// substitute the definition of the macro
- //printf("macro '%s'->'%s'\n",macroName.data(),def->definition.data());
+ //printf("macro '%s'->'%s'\n",qPrint(macroName),qPrint(def->definition));
if (state->nospaces)
{
expMacro=def->definition.stripWhiteSpace();
@@ -2429,7 +2430,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
//expMacro=def->definition.stripWhiteSpace();
replaced=TRUE;
len=l;
- //printf("simple macro expansion='%s'->'%s'\n",macroName.data(),expMacro.data());
+ //printf("simple macro expansion='%s'->'%s'\n",qPrint(macroName),qPrint(expMacro));
}
else if (def && def->nargs>=0) // function macro
{
@@ -2438,15 +2439,15 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
//printf(" <<<< call replaceFunctionMacro: replaced=%d\n",replaced);
len+=l;
}
- //printf(" macroName='%s' expMacro='%s' replaced=%d\n",macroName.data(),expMacro.data(),replaced);
+ //printf(" macroName='%s' expMacro='%s' replaced=%d\n",qPrint(macroName),qPrint(expMacro),replaced);
if (replaced) // expand the macro and rescan the expression
{
- //printf(" replacing '%s'->'%s'\n",expr.mid(p,len).data(),expMacro.data());
+ //printf(" replacing '%s'->'%s'\n",expr.mid(p,qPrint(len)),qPrint(expMacro));
QCString resultExpr=expMacro;
QCString restExpr=expr.right(expr.length()-len-p);
processConcatOperators(resultExpr);
- //printf(" macroName=%s restExpr='%s' def->nonRecursive=%d\n",macroName.data(),restExpr.data(),def->nonRecursive);
+ //printf(" macroName=%s restExpr='%s' def->nonRecursive=%d\n",qPrint(macroName),qPrint(restExpr),def->nonRecursive);
bool expanded=false;
if (def && !def->nonRecursive)
{
@@ -2461,7 +2462,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
if (expanded)
{
expr=expr.left(p)+resultExpr+restExpr;
- //printf(" new expression: '%s' old i=%d new i=%d\n",expr.data(),i,p);
+ //printf(" new expression: '%s' old i=%d new i=%d\n",qPrint(expr),i,p);
i=p;
}
else
@@ -2479,7 +2480,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
else // move to the next macro name
{
expr=expr.left(p)+"@-"+expr.right(expr.length()-p);
- //printf("macro already expanded, moving to the next macro expr=%s\n",expr.data());
+ //printf("macro already expanded, moving to the next macro expr=%s\n",qPrint(expr));
i=p+l+2;
//i=p+l;
}
@@ -2504,7 +2505,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
i=p+l;
}
}
- //printf("<expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",expr.data(),rest ? rest->data() : 0, pos,level);
+ //printf("<expandExpression(expr='%s',rest='%s',pos=%d,level=%d)\n",qPrint(expr),rest ? qPrint(*rest) : "", pos,level);
return TRUE;
}
@@ -2550,10 +2551,11 @@ static const char *processUntilMatchingTerminator(const char *inputStr,QCString
* and removes all occurrences of @@E.
* All identifiers found are replaced by 0L
*/
-static QCString removeIdsAndMarkers(const char *s)
+static QCString removeIdsAndMarkers(const QCString &s)
{
//printf("removeIdsAndMarkers(%s)\n",s);
- const char *p=s;
+ if (s.isEmpty()) return s;
+ const char *p=s.data();
char c;
bool inNum=FALSE;
QCString result;
@@ -2661,7 +2663,7 @@ nextChar:
}
}
}
- //printf("removeIdsAndMarkers(%s)=%s\n",s,result.data());
+ //printf("removeIdsAndMarkers(%s)=%s\n",s,qPrint(result));
return result;
}
@@ -2669,9 +2671,10 @@ nextChar:
* \par assumption:
* \a s only contains pairs of @@'s
*/
-static QCString removeMarkers(const char *s)
+static QCString removeMarkers(const QCString &s)
{
- const char *p=s;
+ if (s.isEmpty()) return s;
+ const char *p=s.data();
char c;
QCString result;
if (p)
@@ -2722,7 +2725,7 @@ static QCString removeMarkers(const char *s)
}
}
}
- //printf("RemoveMarkers(%s)=%s\n",s,result.data());
+ //printf("RemoveMarkers(%s)=%s\n",s,qPrint(result));
return result;
}
@@ -2736,11 +2739,11 @@ static bool computeExpression(yyscan_t yyscanner,const QCString &expr)
QCString e=expr;
state->expanded.clear();
expandExpression(yyscanner,e,0,0,0);
- //printf("after expansion '%s'\n",e.data());
+ //printf("after expansion '%s'\n",qPrint(e));
e = removeIdsAndMarkers(e);
if (e.isEmpty()) return FALSE;
- //printf("parsing '%s'\n",e.data());
- return state->constExpParser.parse(state->yyFileName,state->yyLineNr,e.str());
+ //printf("parsing '%s'\n",qPrint(e));
+ return state->constExpParser.parse(state->yyFileName.data(),state->yyLineNr,e.str());
}
/*! expands the macro definition in \a name
@@ -2754,7 +2757,7 @@ static QCString expandMacro(yyscan_t yyscanner,const QCString &name)
state->expanded.clear();
expandExpression(yyscanner,n,0,0,0);
n=removeMarkers(n);
- //printf("expandMacro '%s'->'%s'\n",name.data(),n.data());
+ //printf("expandMacro '%s'->'%s'\n",qPrint(name),qPrint(n));
return n;
}
@@ -2770,9 +2773,9 @@ static void addDefine(yyscan_t yyscanner)
def.lineNr = state->yyLineNr-state->yyMLines;
def.columnNr = state->yyColNr;
def.varArgs = state->defVarArgs;
- //printf("newDefine: %s %s file: %s\n",def.name.data(),def.definition.data(),
- // def.fileDef ? def.fileDef->name().data() : def.fileName.data());
- //printf("newDefine: '%s'->'%s'\n",def.name.data(),def.definition.data());
+ //printf("newDefine: %s %s file: %s\n",qPrint(def.name),qPrint(def.definition),
+ // def.fileDef ? qPrint(def.fileDef->name()) : qPrint(def.fileName));
+ //printf("newDefine: '%s'->'%s'\n",qPrint(def.name),qPrint(def.definition));
if (!def.name.isEmpty() &&
Doxygen::expandAsDefinedSet.find(def.name.str())!=Doxygen::expandAsDefinedSet.end())
{
@@ -2836,12 +2839,18 @@ static inline void outputChar(yyscan_t yyscanner,char c)
if (state->includeStack.empty() || state->curlyCount>0) state->outputBuf->addChar(c);
}
-static inline void outputArray(yyscan_t yyscanner,const char *a,int len)
+static inline void outputArray(yyscan_t yyscanner,const char *a,yy_size_t len)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
if (state->includeStack.empty() || state->curlyCount>0) state->outputBuf->addArray(a,len);
}
+static inline void outputString(yyscan_t yyscanner,const QCString &a)
+{
+ YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
+ if (state->includeStack.empty() || state->curlyCount>0) state->outputBuf->addArray(a.data(),a.length());
+}
+
static QCString determineAbsoluteIncludeName(const QCString &curFile,const QCString &incFileName)
{
bool searchIncludes = Config_getBool(SEARCH_INCLUDES);
@@ -2849,7 +2858,7 @@ static QCString determineAbsoluteIncludeName(const QCString &curFile,const QCStr
FileInfo fi(curFile.str());
if (fi.exists())
{
- QCString absName = QCString(fi.dirPath(TRUE).data())+"/"+incFileName;
+ QCString absName = QCString(fi.dirPath(TRUE))+"/"+incFileName;
FileInfo fi2(absName.str());
if (fi2.exists())
{
@@ -2864,18 +2873,18 @@ static QCString determineAbsoluteIncludeName(const QCString &curFile,const QCStr
if (fi3.exists() && fi3.isDir())
{
absName = QCString(fi3.absFilePath())+"/"+incFileName;
- //printf("trying absName=%s\n",absName.data());
+ //printf("trying absName=%s\n",qPrint(absName));
FileInfo fi4(absName.str());
if (fi4.exists())
{
absIncFileName=fi4.absFilePath();
break;
}
- //printf( "absIncFileName = %s\n", absIncFileName.data() );
+ //printf( "absIncFileName = %s\n", qPrint(absIncFileName) );
}
}
}
- //printf( "absIncFileName = %s\n", absIncFileName.data() );
+ //printf( "absIncFileName = %s\n", qPrint(absIncFileName) );
}
return absIncFileName;
}
@@ -2912,14 +2921,14 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
QCString oldFileName = state->yyFileName;
FileDef *oldFileDef = state->yyFileDef;
int oldLineNr = state->yyLineNr;
- //printf("Searching for '%s'\n",incFileName.data());
+ //printf("Searching for '%s'\n",qPrint(incFileName));
QCString absIncFileName = determineAbsoluteIncludeName(state->yyFileName,incFileName);
// findFile will overwrite state->yyFileDef if found
FileState *fs;
bool alreadyProcessed = FALSE;
- //printf("calling findFile(%s)\n",incFileName.data());
+ //printf("calling findFile(%s)\n",qPrint(incFileName));
if ((fs=findFile(yyscanner,incFileName,localInclude,alreadyProcessed))) // see if the include file can be found
{
{
@@ -2934,7 +2943,7 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
{
Debug::print(Debug::Preprocessor,0," ");
}
- Debug::print(Debug::Preprocessor,0,"#include %s: parsing...\n",incFileName.data());
+ Debug::print(Debug::Preprocessor,0,"#include %s: parsing...\n",qPrint(incFileName));
}
if (state->includeStack.empty() && oldFileDef)
@@ -2968,10 +2977,10 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
// Deal with file changes due to
// #include's within { .. } blocks
QCString lineStr(state->yyFileName.length()+20);
- lineStr.sprintf("# 1 \"%s\" 1\n",state->yyFileName.data());
- outputArray(yyscanner,lineStr.data(),lineStr.length());
+ lineStr.sprintf("# 1 \"%s\" 1\n",qPrint(state->yyFileName));
+ outputString(yyscanner,lineStr);
- DBG_CTX((stderr,"Switching to include file %s\n",incFileName.data()));
+ DBG_CTX((stderr,"Switching to include file %s\n",qPrint(incFileName)));
state->expectGuard=TRUE;
state->inputBuf = &fs->fileBuf;
state->inputBufPos=0;
@@ -3022,7 +3031,7 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
}
if (state->curlyCount>0 && !alreadyProcessed) // failed to find #include inside { ... }
{
- warn(state->yyFileName,state->yyLineNr,"include file %s not found, perhaps you forgot to add its directory to INCLUDE_PATH?",incFileName.data());
+ warn(state->yyFileName,state->yyLineNr,"include file %s not found, perhaps you forgot to add its directory to INCLUDE_PATH?",qPrint(incFileName));
}
}
}
@@ -3030,12 +3039,12 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc)
/* ----------------------------------------------------------------- */
-static void startCondSection(yyscan_t yyscanner,const char *sectId)
+static void startCondSection(yyscan_t yyscanner,const QCString &sectId)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
//printf("startCondSection: skip=%d stack=%d\n",state->skip,state->condStack.size());
CondParser prs;
- bool expResult = prs.parse(state->yyFileName,state->yyLineNr,sectId);
+ bool expResult = prs.parse(state->yyFileName.data(),state->yyLineNr,sectId.data());
state->condStack.emplace(std::make_unique<CondCtx>(state->yyLineNr,sectId,state->skip));
if (!expResult)
{
@@ -3070,13 +3079,13 @@ static void forceEndCondSection(yyscan_t yyscanner)
state->skip=FALSE;
}
-static QCString escapeAt(const char *text)
+static QCString escapeAt(const QCString &text)
{
QCString result;
- if (text)
+ if (!text.isEmpty())
{
char c;
- const char *p=text;
+ const char *p=text.data();
while ((c=*p++))
{
if (c=='@') result+="@@"; else result+=c;
@@ -3107,7 +3116,7 @@ static char resolveTrigraph(char c)
static int getNextChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint &pos)
{
- //printf("getNextChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
+ //printf("getNextChar(%s,%s,%d)\n",qPrint(expr),rest ? rest->data() : 0,pos);
if (pos<expr.length())
{
//printf("%c=expr()\n",expr.at(pos));
@@ -3130,7 +3139,7 @@ static int getNextChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,ui
static int getCurrentChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint pos)
{
- //printf("getCurrentChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
+ //printf("getCurrentChar(%s,%s,%d)\n",qPrint(expr),rest ? rest->data() : 0,pos);
if (pos<expr.length())
{
//printf("%c=expr()\n",expr.at(pos));
@@ -3153,7 +3162,7 @@ static int getCurrentChar(yyscan_t yyscanner,const QCString &expr,QCString *rest
static void unputChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uint &pos,char c)
{
- //printf("unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
+ //printf("unputChar(%s,%s,%d,%c)\n",qPrint(expr),rest ? rest->data() : 0,pos,c);
if (pos<expr.length())
{
pos++;
@@ -3169,13 +3178,13 @@ static void unputChar(yyscan_t yyscanner,const QCString &expr,QCString *rest,uin
//unput(c);
returnCharToStream(yyscanner,c);
}
- //printf("result: unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
+ //printf("result: unputChar(%s,%s,%d,%c)\n",qPrint(expr),rest ? rest->data() : 0,pos,c);
}
/** Returns a reference to a Define object given its name or 0 if the Define does
* not exist.
*/
-static Define *isDefined(yyscan_t yyscanner,const char *name)
+static Define *isDefined(yyscan_t yyscanner,const QCString &name)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
@@ -3183,7 +3192,7 @@ static Define *isDefined(yyscan_t yyscanner,const char *name)
auto findDefine = [&undef,&name](DefineMap &map)
{
Define *d=0;
- auto it = map.find(name);
+ auto it = map.find(name.str());
if (it!=map.end())
{
d = &it->second;
@@ -3204,7 +3213,7 @@ static Define *isDefined(yyscan_t yyscanner,const char *name)
return def;
}
-static void initPredefined(yyscan_t yyscanner,const char *fileName)
+static void initPredefined(yyscan_t yyscanner,const QCString &fileName)
{
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
@@ -3282,7 +3291,7 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName)
int argIndex = it->second;
QCString marker;
marker.sprintf(" @%d ",argIndex);
- definition+=marker;
+ definition+=marker.str();
}
else
{
@@ -3308,7 +3317,7 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName)
state->contextDefines.insert(std::make_pair(def.name.str(),def));
//printf("#define '%s' '%s' #nargs=%d\n",
- // def->name.data(),def->definition.data(),def->nargs);
+ // qPrint(def->name),qPrint(def->definition),def->nargs);
}
}
else if (!ds.empty()) // predefined non-function macro definition
@@ -3347,10 +3356,10 @@ struct Preprocessor::Private
preYY_state state;
};
-void Preprocessor::addSearchDir(const char *dir)
+void Preprocessor::addSearchDir(const QCString &dir)
{
YY_EXTRA_TYPE state = preYYget_extra(p->yyscanner);
- FileInfo fi(dir);
+ FileInfo fi(dir.str());
if (fi.isDir()) state->pathList.push_back(fi.absFilePath());
}
@@ -3365,7 +3374,7 @@ Preprocessor::~Preprocessor()
preYYlex_destroy(p->yyscanner);
}
-void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output)
+void Preprocessor::processFile(const QCString &fileName,BufStr &input,BufStr &output)
{
// printf("Preprocessor::processFile(%s)\n",fileName);
yyscan_t yyscanner = p->yyscanner;
@@ -3376,10 +3385,10 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
preYYset_debug(1,yyscanner);
#endif
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
uint orgOffset=output.curPos();
//printf("##########################\n%s\n####################\n",
- // input.data());
+ // qPrint(input));
state->macroExpansion = Config_getBool(MACRO_EXPANSION);
state->expandOnlyPredef = Config_getBool(EXPAND_ONLY_PREDEF);
@@ -3418,9 +3427,9 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
{
const std::unique_ptr<CondCtx> &ctx = state->condStack.top();
QCString sectionInfo = " ";
- if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",ctx->sectionId.stripWhiteSpace().data());
+ if (ctx->sectionId!=" ") sectionInfo.sprintf(" with label '%s' ",qPrint(ctx->sectionId.stripWhiteSpace()));
warn(fileName,ctx->lineNr,"Conditional section%sdoes not have "
- "a corresponding \\endcond command within this file.",sectionInfo.data());
+ "a corresponding \\endcond command within this file.",qPrint(sectionInfo));
state->condStack.pop();
}
// make sure we don't extend a \cond with missing \endcond over multiple files (see bug 624829)
@@ -3431,7 +3440,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
std::lock_guard<std::mutex> lock(g_debugMutex);
char *orgPos=output.data()+orgOffset;
char *newPos=output.data()+output.curPos();
- Debug::print(Debug::Preprocessor,0,"Preprocessor output of %s (size: %d bytes):\n",fileName,newPos-orgPos);
+ Debug::print(Debug::Preprocessor,0,"Preprocessor output of %s (size: %d bytes):\n",qPrint(fileName),newPos-orgPos);
int line=1;
Debug::print(Debug::Preprocessor,0,"---------\n");
if (!Debug::isFlagSet(Debug::NoLineNo)) Debug::print(Debug::Preprocessor,0,"00001 ");
@@ -3444,7 +3453,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
Debug::print(Debug::Preprocessor,0,"\n---------\n");
if (yyextra->contextDefines.size()>0)
{
- Debug::print(Debug::Preprocessor,0,"Macros accessible in this file (%s):\n", fileName);
+ Debug::print(Debug::Preprocessor,0,"Macros accessible in this file (%s):\n", qPrint(fileName));
Debug::print(Debug::Preprocessor,0,"---------\n");
for (auto &kv : yyextra->contextDefines)
{
@@ -3458,7 +3467,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
}
else
{
- Debug::print(Debug::Preprocessor,0,"No macros accessible in this file (%s).\n", fileName);
+ Debug::print(Debug::Preprocessor,0,"No macros accessible in this file (%s).\n", qPrint(fileName));
}
}
@@ -3480,7 +3489,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
}
//yyextra->defineManager.endContext();
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
// printf("Preprocessor::processFile(%s) finished\n",fileName);
}
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index 2992717..5ad0205 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -36,19 +36,19 @@ class PrintDocVisitor : public DocVisitor
void visit(DocWord *w)
{
indent_leaf();
- printf("%s",w->word().data());
+ printf("%s",qPrint(w->word()));
}
void visit(DocLinkedWord *w)
{
indent_leaf();
- printf("%s",w->word().data());
+ printf("%s",qPrint(w->word()));
}
void visit(DocWhiteSpace *w)
{
indent_leaf();
if (m_insidePre)
{
- printf("%s",w->chars().data());
+ printf("%s",qPrint(w->chars()));
}
else
{
@@ -84,7 +84,7 @@ class PrintDocVisitor : public DocVisitor
void visit(DocURL *u)
{
indent_leaf();
- printf("%s",u->url().data());
+ printf("%s",qPrint(u->url()));
}
void visit(DocLineBreak *)
{
@@ -165,7 +165,7 @@ class PrintDocVisitor : public DocVisitor
case DocVerbatim::Msc: printf("<msc>"); break;
case DocVerbatim::PlantUML: printf("<plantuml>"); break;
}
- printf("%s",s->text().data());
+ printf("%s",qPrint(s->text()));
switch(s->type())
{
case DocVerbatim::Code: printf("</code>"); break;
@@ -184,12 +184,12 @@ class PrintDocVisitor : public DocVisitor
void visit(DocAnchor *a)
{
indent_leaf();
- printf("<anchor name=\"%s\"/>",a->anchor().data());
+ printf("<anchor name=\"%s\"/>",qPrint(a->anchor()));
}
void visit(DocInclude *inc)
{
indent_leaf();
- printf("<include file=\"%s\" type=\"",inc->file().data());
+ printf("<include file=\"%s\" type=\"",qPrint(inc->file()));
switch(inc->type())
{
case DocInclude::Include: printf("include"); break;
@@ -219,7 +219,7 @@ class PrintDocVisitor : public DocVisitor
void visit(DocIncOperator *op)
{
indent_leaf();
- printf("<incoperator pattern=\"%s\" type=\"",op->pattern().data());
+ printf("<incoperator pattern=\"%s\" type=\"",qPrint(op->pattern()));
switch(op->type())
{
case DocIncOperator::Line: printf("line"); break;
@@ -232,12 +232,12 @@ class PrintDocVisitor : public DocVisitor
void visit(DocFormula *f)
{
indent_leaf();
- printf("<formula name=%s text=%s/>",f->name().data(),f->text().data());
+ printf("<formula name=%s text=%s/>",qPrint(f->name()),qPrint(f->text()));
}
void visit(DocIndexEntry *i)
{
indent_leaf();
- printf("<indexentry>%s</indexentry\n",i->entry().data());
+ printf("<indexentry>%s</indexentry\n",qPrint(i->entry()));
}
void visit(DocSimpleSectSep *)
{
@@ -250,8 +250,8 @@ class PrintDocVisitor : public DocVisitor
printf("<cite ref=\"%s\" file=\"%s\" "
"anchor=\"%s\" text=\"%s\""
"/>\n",
- cite->ref().data(),cite->file().data(),cite->anchor().data(),
- cite->text().data());
+ qPrint(cite->ref()),qPrint(cite->file()),qPrint(cite->anchor()),
+ qPrint(cite->text()));
}
//--------------------------------------
@@ -498,7 +498,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocHRef *href)
{
indent_pre();
- printf("<a url=\"%s\">\n",href->url().data());
+ printf("<a url=\"%s\">\n",qPrint(href->url()));
}
void visitPost(DocHRef *)
{
@@ -518,7 +518,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocImage *img)
{
indent_pre();
- printf("<image src=\"%s\" type=\"",img->name().data());
+ printf("<image src=\"%s\" type=\"",qPrint(img->name()));
switch(img->type())
{
case DocImage::Html: printf("html"); break;
@@ -526,7 +526,7 @@ class PrintDocVisitor : public DocVisitor
case DocImage::Rtf: printf("rtf"); break;
case DocImage::DocBook: printf("docbook"); break;
}
- printf("\" %s %s inline=\"%s\">\n",img->width().data(),img->height().data(),img->isInlineImage() ? "yes" : "no");
+ printf("\" %s %s inline=\"%s\">\n",qPrint(img->width()),qPrint(img->height()),img->isInlineImage() ? "yes" : "no");
}
void visitPost(DocImage *)
{
@@ -536,7 +536,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocDotFile *df)
{
indent_pre();
- printf("<dotfile src=\"%s\">\n",df->name().data());
+ printf("<dotfile src=\"%s\">\n",qPrint(df->name()));
}
void visitPost(DocDotFile *)
{
@@ -546,7 +546,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocMscFile *df)
{
indent_pre();
- printf("<mscfile src=\"%s\">\n",df->name().data());
+ printf("<mscfile src=\"%s\">\n",qPrint(df->name()));
}
void visitPost(DocMscFile *)
{
@@ -556,7 +556,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocDiaFile *df)
{
indent_pre();
- printf("<diafile src=\"%s\">\n",df->name().data());
+ printf("<diafile src=\"%s\">\n",qPrint(df->name()));
}
void visitPost(DocDiaFile *)
{
@@ -567,7 +567,7 @@ class PrintDocVisitor : public DocVisitor
{
indent_pre();
printf("<link ref=\"%s\" file=\"%s\" anchor=\"%s\">\n",
- lnk->ref().data(),lnk->file().data(),lnk->anchor().data());
+ qPrint(lnk->ref()),qPrint(lnk->file()),qPrint(lnk->anchor()));
}
void visitPost(DocLink *)
{
@@ -580,8 +580,8 @@ class PrintDocVisitor : public DocVisitor
printf("<ref ref=\"%s\" file=\"%s\" "
"anchor=\"%s\" targetTitle=\"%s\""
" hasLinkText=\"%s\" refToAnchor=\"%s\" refToSection=\"%s\" refToTable=\"%s\">\n",
- ref->ref().data(),ref->file().data(),ref->anchor().data(),
- ref->targetTitle().data(),ref->hasLinkText()?"yes":"no",
+ qPrint(ref->ref()),qPrint(ref->file()),qPrint(ref->anchor()),
+ qPrint(ref->targetTitle()),ref->hasLinkText()?"yes":"no",
ref->refToAnchor()?"yes":"no", ref->refToSection()?"yes":"no",
ref->refToTable()?"yes":"no");
}
@@ -593,7 +593,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocSecRefItem *ref)
{
indent_pre();
- printf("<secrefitem target=\"%s\">\n",ref->target().data());
+ printf("<secrefitem target=\"%s\">\n",qPrint(ref->target()));
}
void visitPost(DocSecRefItem *)
{
@@ -613,7 +613,7 @@ class PrintDocVisitor : public DocVisitor
//void visitPre(DocLanguage *l)
//{
// indent_pre();
- // printf("<language id=%s>\n",l->id().data());
+ // printf("<language id=%s>\n",qPrint(l->id()));
//}
//void visitPost(DocLanguage *)
//{
@@ -675,7 +675,7 @@ class PrintDocVisitor : public DocVisitor
{
indent_pre();
printf("<xrefitem file=\"%s\" anchor=\"%s\" title=\"%s\">\n",
- x->file().data(),x->anchor().data(),x->title().data());
+ qPrint(x->file()),qPrint(x->anchor()),qPrint(x->title()));
}
void visitPost(DocXRefItem *)
{
@@ -685,7 +685,7 @@ class PrintDocVisitor : public DocVisitor
void visitPre(DocInternalRef *r)
{
indent_pre();
- printf("<internalref file=%s anchor=%s>\n",r->file().data(),r->anchor().data());
+ printf("<internalref file=%s anchor=%s>\n",qPrint(r->file()),qPrint(r->anchor()));
}
void visitPost(DocInternalRef *)
{
diff --git a/src/pycode.h b/src/pycode.h
index 8bce2a9..43179da 100644
--- a/src/pycode.h
+++ b/src/pycode.h
@@ -37,11 +37,11 @@ class PythonCodeParser : public CodeParserInterface
PythonCodeParser();
virtual ~PythonCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/pycode.l b/src/pycode.l
index 107d855..fa65e22 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -118,27 +118,27 @@ static const char *stateToString(int state);
static void startCodeLine(yyscan_t yyscanner);
static int countLines(yyscan_t yyscanner);
static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor);
-static void addToSearchIndex(yyscan_t yyscanner, const char *text);
-static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,Definition *d);
-static void codify(yyscan_t yyscanner,const char* text);
+static void addToSearchIndex(yyscan_t yyscanner, const QCString &text);
+static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,Definition *d);
+static void codify(yyscan_t yyscanner,const QCString &text);
static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
-static void writeMultiLineCodeLink(yyscan_t yyscanner, CodeOutputInterface &ol, const Definition *d, const char *text);
+static void writeMultiLineCodeLink(yyscan_t yyscanner, CodeOutputInterface &ol, const Definition *d, const QCString &text);
static void startFontClass(yyscan_t yyscanner,const char *s);
static void endFontClass(yyscan_t yyscanner);
-static void codifyLines(yyscan_t yyscanner,const char *text);
+static void codifyLines(yyscan_t yyscanner,const QCString &text);
static bool getLinkInScope(yyscan_t yyscanner, const QCString &c, const QCString &m,
- const char *memberText, CodeOutputInterface &ol, const char *text);
-static bool getLink(yyscan_t yyscanner, const char *className, const char *memberName,
- CodeOutputInterface &ol, const char *text=0);
+ const QCString &memberText, CodeOutputInterface &ol, const QCString &text);
+static bool getLink(yyscan_t yyscanner, const QCString &className, const QCString &memberName,
+ CodeOutputInterface &ol, const QCString &text=QCString());
static void generateClassOrGlobalLink(yyscan_t yyscanner, CodeOutputInterface &ol,
- const char *clName, bool typeOnly=FALSE);
+ const QCString &clName, bool typeOnly=FALSE);
static void generateFunctionLink(yyscan_t yyscanner, CodeOutputInterface &ol,
- const char *funcName);
+ const QCString &funcName);
static bool findMemberLink(yyscan_t yyscanner, CodeOutputInterface &ol,
- Definition *sym, const char *symName);
+ Definition *sym, const QCString &symName);
static void findMemberLink(yyscan_t yyscanner, CodeOutputInterface &ol,
- const char *symName);
+ const QCString &symName);
static void adjustScopesAndSuites(yyscan_t yyscanner,unsigned indentLength);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -395,7 +395,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU
// Push a class scope
- std::unique_ptr<ClassDef> classDefToAdd { createClassDef("<code>",1,1,yyextra->curClassName,ClassDef::Class,0,0,FALSE) };
+ std::unique_ptr<ClassDef> classDefToAdd { createClassDef("<code>",1,1,yyextra->curClassName,ClassDef::Class,QCString(),QCString(),FALSE) };
ScopedTypeVariant var(yyextra->curClassName);
for (const auto &s : yyextra->curClassBases)
{
@@ -829,7 +829,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU
static void addVariable(yyscan_t yyscanner, QCString type, QCString name)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("PyVariableContext::addVariable(%s,%s)\n",type.data(),name.data());
+ //printf("PyVariableContext::addVariable(%s,%s)\n",qPrint(type),qPrint(name));
QCString ltype = type.simplifyWhiteSpace();
QCString lname = name.simplifyWhiteSpace();
@@ -951,7 +951,7 @@ static void setCurrentDoc(yyscan_t yyscanner, const QCString &anchor)
//-------------------------------------------------------------------------------
-static void addToSearchIndex(yyscan_t yyscanner, const char *text)
+static void addToSearchIndex(yyscan_t yyscanner, const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
@@ -963,7 +963,7 @@ static void addToSearchIndex(yyscan_t yyscanner, const char *text)
//-------------------------------------------------------------------------------
-static const ClassDef *stripClassName(yyscan_t yyscanner,const char *s,Definition *d)
+static const ClassDef *stripClassName(yyscan_t yyscanner,const QCString &s,Definition *d)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int pos=0;
@@ -1018,9 +1018,9 @@ static void startCodeLine(yyscan_t yyscanner)
//yyextra->insideBody = FALSE;
yyextra->endComment = FALSE;
yyextra->searchingForBody = TRUE;
- yyextra->realScope = d->name().copy();
- yyextra->classScope = d->name().copy();
- //printf("Real scope: '%s'\n",yyextra->realScope.data());
+ yyextra->realScope = d->name();
+ yyextra->classScope = d->name();
+ //printf("Real scope: '%s'\n",qPrint(yyextra->realScope));
yyextra->bodyCurlyCount = 0;
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
@@ -1035,14 +1035,14 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
//yyextra->code->codify(lineNumber);
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
//yyextra->code->endLineNumber();
}
@@ -1055,7 +1055,7 @@ static void startCodeLine(yyscan_t yyscanner)
//-------------------------------------------------------------------------------
-static void codify(yyscan_t yyscanner,const char* text)
+static void codify(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
yyextra->code->codify(text);
@@ -1093,9 +1093,10 @@ static void nextCodeLine(yyscan_t yyscanner)
static void writeMultiLineCodeLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
const Definition *d,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (text.isEmpty()) return;
bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance().addTooltip(ol,d);
QCString ref = d->getReference();
@@ -1107,7 +1108,7 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,
tooltip = d->briefDescriptionAsTooltip();
}
bool done=FALSE;
- char *p=(char *)text;
+ char *p=text.rawData();
while (!done)
{
char *sp=p;
@@ -1159,11 +1160,12 @@ static void endFontClass(yyscan_t yyscanner)
//-------------------------------------------------------------------------------
-static void codifyLines(yyscan_t yyscanner,const char *text)
+static void codifyLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (text.isEmpty()) return;
//printf("codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
- const char *p=text,*sp=p;
+ const char *p=text.data(),*sp=p;
char c;
bool done=FALSE;
while (!done)
@@ -1194,9 +1196,9 @@ static void codifyLines(yyscan_t yyscanner,const char *text)
static bool getLinkInScope(yyscan_t yyscanner,
const QCString &c, // scope
const QCString &m, // member
- const char *memberText, // exact text
+ const QCString &memberText, // exact text
CodeOutputInterface &ol,
- const char *text
+ const QCString &text
)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
@@ -1205,7 +1207,7 @@ static bool getLinkInScope(yyscan_t yyscanner,
const FileDef *fd = 0;
const NamespaceDef *nd = 0;
const GroupDef *gd = 0;
- //printf("Trying '%s'::'%s'\n",c.data(),m.data());
+ //printf("Trying '%s'::'%s'\n",qPrint(c),qPrint(m));
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,yyextra->sourceFileDef) &&
md->isLinkable())
{
@@ -1214,7 +1216,7 @@ static bool getLinkInScope(yyscan_t yyscanner,
const Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
- //printf("Found! d=%s\n",d?d->name().data():"<none>");
+ //printf("Found! d=%s\n",d?qPrint(d->name()):"<none>");
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable())
{
@@ -1228,10 +1230,10 @@ static bool getLinkInScope(yyscan_t yyscanner,
std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(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());
+ //printf("d->getReference()='%s' d->getOutputBase()='%s' name='%s' member name='%s'\n",qPrint(d->getReference()),qPrint(d->getOutputFileBase()),qPrint(d->name()),qPrint(md->name()));
- writeMultiLineCodeLink(yyscanner,ol,md, text ? text : memberText);
- addToSearchIndex(yyscanner,text ? text : memberText);
+ writeMultiLineCodeLink(yyscanner,ol,md, !text.isEmpty() ? text : memberText);
+ addToSearchIndex(yyscanner,!text.isEmpty() ? text : memberText);
return TRUE;
}
}
@@ -1241,10 +1243,10 @@ static bool getLinkInScope(yyscan_t yyscanner,
//-------------------------------------------------------------------------------
static bool getLink(yyscan_t yyscanner,
- const char *className,
- const char *memberName,
+ const QCString &className,
+ const QCString &memberName,
CodeOutputInterface &ol,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString m=removeRedundantWhiteSpace(memberName);
@@ -1270,7 +1272,7 @@ static bool getLink(yyscan_t yyscanner,
*/
static void generateClassOrGlobalLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
- const char *clName,
+ const QCString &clName,
bool typeOnly)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
@@ -1279,7 +1281,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
// Don't do anything for empty text
if (className.isEmpty()) return;
- DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",className.data()));
+ DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",qPrint(className)));
const ScopedTypeVariant *lcd = 0;
const ClassDef *cd=0; // Class def that we may find
@@ -1295,9 +1297,9 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
md = yyextra->symbolResolver.getTypedef();
DBG_CTX((stderr,"d=%s yyextra->sourceFileDef=%s\n",
- d?d->displayName().data():"<null>",
- yyextra->currentDefinition?yyextra->currentDefinition->displayName().data():"<null>"));
- DBG_CTX((stderr,"is found as a type %s\n",cd?cd->name().data():"<null>"));
+ d?qPrint(d->displayName()):"<null>",
+ yyextra->currentDefinition?qPrint(yyextra->currentDefinition->displayName()):"<null>"));
+ DBG_CTX((stderr,"is found as a type %s\n",cd?qPrint(cd->name()):"<null>"));
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
@@ -1349,7 +1351,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
QCString scope = substitute(className.left(scopeEnd),".","::");
QCString locName = className.right(className.length()-scopeEnd-1);
ClassDef *mcd = getClass(scope);
- DBG_CTX((stderr,"scope=%s locName=%s mcd=%p\n",scope.data(),locName.data(),mcd));
+ DBG_CTX((stderr,"scope=%s locName=%s mcd=%p\n",qPrint(scope),qPrint(locName),mcd));
if (mcd)
{
const MemberDef *mmd = mcd->getMemberByName(locName);
@@ -1378,7 +1380,7 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
const MemberDef *mmd=mnd->getMemberByName(locName);
if (mmd)
{
- //printf("name=%s scope=%s\n",locName.data(),scope.data());
+ //printf("name=%s scope=%s\n",qPrint(locName),qPrint(scope));
yyextra->theCallContext.setScope(ScopedTypeVariant(stripClassName(yyscanner,mmd->typeString(),mmd->getOuterScope())));
writeMultiLineCodeLink(yyscanner,ol,mmd,clName);
addToSearchIndex(yyscanner,className);
@@ -1414,26 +1416,26 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
*/
static void generateFunctionLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
- const char *funcName)
+ const QCString &funcName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString locScope=yyextra->classScope;
QCString locFunc=removeRedundantWhiteSpace(funcName);
- DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data()));
+ DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",qPrint(locScope),qPrint(locFunc)));
int i=locFunc.findRev("::");
if (i>0)
{
locScope=locFunc.left(i);
locFunc=locFunc.right(locFunc.length()-i-2).stripWhiteSpace();
}
- //printf("generateFunctionLink(%s) classScope='%s'\n",locFunc.data(),locScope.data());
+ //printf("generateFunctionLink(%s) classScope='%s'\n",qPrint(locFunc),qPrint(locScope));
if (!locScope.isEmpty())
{
auto it = yyextra->codeClassMap.find(locScope.str());
if (it!=yyextra->codeClassMap.end())
{
ScopedTypeVariant ccd = it->second;
- //printf("using classScope %s\n",yyextra->classScope.data());
+ //printf("using classScope %s\n",qPrint(yyextra->classScope));
if (ccd.localDef() && !ccd.localDef()->baseClasses().empty())
{
for (const auto &bcName : ccd.localDef()->baseClasses())
@@ -1458,11 +1460,11 @@ static void generateFunctionLink(yyscan_t yyscanner,
static bool findMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
Definition *sym,
- const char *symName)
+ const QCString &symName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("sym %s outerScope=%s equal=%d\n",
- // sym->name().data(),sym->getOuterScope()->name().data(),
+ // qPrint(sym->name()),qPrint(sym->getOuterScope()->name()),
// sym->getOuterScope()==yyextra->currentDefinition);
if (sym->getOuterScope() &&
@@ -1479,7 +1481,7 @@ static bool findMemberLink(yyscan_t yyscanner,
addDocCrossReference(toMemberDefMutable(yyextra->currentMemberDef),toMemberDefMutable(toMemberDef(sym)));
}
}
- DBG_CTX((stderr,"cd=%s thisCd=%s\n",cd?cd->name().data():"<none>",thisCd?thisCd->name().data():"<none>"));
+ DBG_CTX((stderr,"cd=%s thisCd=%s\n",cd?qPrint(cd->name()):"<none>",thisCd?qPrint(thisCd->name()):"<none>"));
// TODO: find the nearest base class in case cd is a base class of
// thisCd
@@ -1496,13 +1498,13 @@ static bool findMemberLink(yyscan_t yyscanner,
static void findMemberLink(yyscan_t yyscanner,
CodeOutputInterface &ol,
- const char *symName)
+ const QCString &symName)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("Member reference: %s scope=%s member=%s\n",
// yytext,
- // yyextra->currentDefinition?yyextra->currentDefinition->name().data():"<none>",
- // yyextra->currentMemberDef?yyextra->currentMemberDef->name().data():"<none>"
+ // yyextra->currentDefinition?qPrint(yyextra->currentDefinition->name()):"<none>",
+ // yyextra->currentMemberDef?qPrint(yyextra->currentMemberDef->name()):"<none>"
// );
if (yyextra->currentDefinition)
{
@@ -1552,11 +1554,11 @@ void PythonCodeParser::resetCodeParserState()
}
void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt /*lang*/,
bool isExampleBlock,
- const char *exampleName,
+ const QCString &exampleName,
FileDef *fileDef,
int startLine,
int endLine,
@@ -1573,9 +1575,9 @@ void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
//printf("***parseCode()\n");
if (input.isEmpty()) return;
- printlex(yy_flex_debug, TRUE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, TRUE, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = FALSE;
@@ -1600,7 +1602,7 @@ void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (yyextra->exampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exampleName?exampleName:"generated"));
+ yyextra->sourceFileDef = createFileDef("",(!exampleName.isEmpty()?qPrint(exampleName):"generated"));
cleanupSourceDef = TRUE;
}
if (yyextra->sourceFileDef)
@@ -1633,7 +1635,7 @@ void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
}
// write the tooltips
TooltipManager::instance().writeTooltips(codeOutIntf);
- printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
#if USE_STATE2STRING
diff --git a/src/pyscanner.h b/src/pyscanner.h
index 4f0ae38..dc7ea1c 100644
--- a/src/pyscanner.h
+++ b/src/pyscanner.h
@@ -36,12 +36,12 @@ class PythonOutlineParser : public OutlineParserInterface
public:
PythonOutlineParser();
virtual ~PythonOutlineParser();
- void parseInput(const char * fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &extension) const;
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 1e6c7ab..b0ebd41 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -134,7 +134,7 @@ static void initTriSingleQuoteBlock(yyscan_t yyscanner);
static void initSpecialBlock(yyscan_t yyscanner);
static void searchFoundDef(yyscan_t yyscanner);
static void searchFoundClass(yyscan_t yyscanner);
-static QCString findPackageScope(yyscan_t yyscanner,const char *fileName);
+static QCString findPackageScope(yyscan_t yyscanner,const QCString &fileName);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -448,7 +448,7 @@ STARTDOCSYMS "##"
{IDENTIFIER}({B}"."{B}{IDENTIFIER})* {
yyextra->current->name=removeRedundantWhiteSpace(substitute(yytext,".","::"));
yyextra->current->fileName = yyextra->yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyextra->yyFileName.data(),yyextra->yyLineNr,yyextra->current->name.data());
+ //printf("Adding using declaration: found:%s:%d name=%s\n",qPrint(yyextra->yyFileName),yyextra->yyLineNr,qPrint(yyextra->current->name));
yyextra->current->section=Entry::USINGDECL_SEC;
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
initEntry(yyscanner);
@@ -468,7 +468,7 @@ STARTDOCSYMS "##"
<SearchMemVars>{
"self."{IDENTIFIER}/{B}"=" {
- DBG_CTX((stderr,"Found instance method variable %s in %s at %d\n",&yytext[5],yyextra->current_root->name.data(),yyextra->yyLineNr));
+ DBG_CTX((stderr,"Found instance method variable %s in %s at %d\n",&yytext[5],qPrint(yyextra->current_root->name.data(),yyextra->yyLineNr)));
yyextra->current->name=&yytext[5];
yyextra->current->section=Entry::VARIABLE_SEC;
yyextra->current->fileName = yyextra->yyFileName;
@@ -482,7 +482,7 @@ STARTDOCSYMS "##"
newEntry(yyscanner);
}
"cls."{IDENTIFIER}/{B}"=" {
- DBG_CTX((stderr,"Found class method variable %s in %s at %d\n",&yytext[4],yyextra->current_root->name.data(),yyextra->yyLineNr));
+ DBG_CTX((stderr,"Found class method variable %s in %s at %d\n",&yytext[4],qPrint(yyextra->current_root->name),yyextra->yyLineNr));
yyextra->current->name=&yytext[4];
yyextra->current->section=Entry::VARIABLE_SEC;
yyextra->current->fileName = yyextra->yyFileName;
@@ -954,7 +954,7 @@ STARTDOCSYMS "##"
// prepend scope in case of nested classes
if (yyextra->current_root->section&Entry::SCOPE_MASK)
{
- //printf("*** Prepending scope %s to class %s\n",yyextra->current_root->name.data(),yyextra->current->name.data());
+ //printf("*** Prepending scope %s to class %s\n",qPrint(yyextra->current_root->name),qPrint(yyextra->current->name));
yyextra->current->name.prepend(yyextra->current_root->name+"::");
}
@@ -1037,7 +1037,7 @@ STARTDOCSYMS "##"
yyextra->curIndent=computeIndent(yytext);
yyextra->bodyEntry = yyextra->current;
DBG_CTX((stderr,"setting indent %d\n",yyextra->curIndent));
- //printf("yyextra->current->program=[%s]\n",yyextra->current->program.data());
+ //printf("yyextra->current->program=[%s]\n",qPrint(yyextra->current->program));
//yyextra->hideClassDocs = TRUE;
BEGIN(ClassBody);
}
@@ -1526,7 +1526,7 @@ static QCString findPackageScopeFromPath(yyscan_t yyscanner,const QCString &path
auto it = yyextra->packageNameCache.find(path.str());
if (it!=yyextra->packageNameCache.end())
{
- return it->second;
+ return QCString(it->second);
}
FileInfo pf(path.str()+"/__init__.py"); // found package initialization file
if (pf.exists())
@@ -1546,11 +1546,11 @@ static QCString findPackageScopeFromPath(yyscan_t yyscanner,const QCString &path
}
return "";
}
-
-static QCString findPackageScope(yyscan_t yyscanner,const char *fileName)
+
+static QCString findPackageScope(yyscan_t yyscanner,const QCString &fileName)
{
- if (fileName==0) return "";
- FileInfo fi(fileName);
+ if (fileName.isEmpty()) return fileName;
+ FileInfo fi(fileName.str());
return findPackageScopeFromPath(yyscanner,fi.dirPath(true).c_str());
}
@@ -1560,7 +1560,7 @@ static void addFrom(yyscan_t yyscanner,bool all)
QCString item=all ? yyextra->packageName : yyextra->packageName+"."+yytext;
yyextra->current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
yyextra->current->fileName = yyextra->yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyextra->yyFileName.data(),yyextra->yyLineNr,yyextra->current->name.data());
+ //printf("Adding using declaration: found:%s:%d name=%s\n",qPrint(yyextra->yyFileName),yyextra->yyLineNr,qPrint(yyextra->current->name));
yyextra->current->section=all ? Entry::USINGDIR_SEC : Entry::USINGDECL_SEC;
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
initEntry(yyscanner);
@@ -1604,7 +1604,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("handleCommentBlock(doc=[%s] brief=%d yyextra->docBlockInBody=%d yyextra->docBlockJavaStyle=%d\n",
- // doc.data(),brief,yyextra->docBlockInBody,yyextra->docBlockJavaStyle);
+ // qPrint(doc),brief,yyextra->docBlockInBody,yyextra->docBlockJavaStyle);
// TODO: Fix me
yyextra->docBlockInBody=FALSE;
@@ -1744,17 +1744,17 @@ static void searchFoundClass(yyscan_t yyscanner)
static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("parseCompounds(%s)\n",rt->name.data());
+ //printf("parseCompounds(%s)\n",qPrint(rt->name));
for (size_t i=0; i<rt->children().size(); ++i)
{
std::shared_ptr<Entry> ce = rt->children()[i];
if (!ce->program.empty())
{
//fprintf(stderr,"parseCompounds: -- %s (line %d) ---------\n%s\n---------------\n",
- // ce->name.data(), ce->bodyLine, ce->program.data());
+ // qPrint(ce->name), ce->bodyLine, qPrint(ce->program));
// init scanner state
yyextra->programStr = ce->program.str();
- yyextra->inputString = yyextra->programStr;
+ yyextra->inputString = yyextra->programStr.data();
yyextra->inputPosition = 0;
pyscannerYYrestart( 0, yyscanner );
if (ce->section&Entry::COMPOUND_MASK)
@@ -1766,7 +1766,7 @@ static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
{
yyextra->current_root = rt;
//printf("Searching for member variables in %s parent=%s\n",
- // ce->name.data(),ce->parent->name.data());
+ // qPrint(ce->name),qPrint(ce->parent->name));
BEGIN( SearchMemVars );
}
yyextra->yyFileName = ce->fileName;
@@ -1793,11 +1793,13 @@ static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
//----------------------------------------------------------------------------
-static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileBuf,const std::shared_ptr<Entry> &rt)
+static void parseMain(yyscan_t yyscanner, const QCString &fileName,const char *fileBuf,const std::shared_ptr<Entry> &rt)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
initParser(yyscanner);
+ if (fileBuf==0 || fileBuf[0]=='\0') return;
+
yyextra->inputString = fileBuf;
yyextra->inputPosition = 0;
@@ -1808,13 +1810,12 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
yyextra->current_root = rt;
yyextra->specialBlock = FALSE;
-
yyextra->yyLineNr= 1 ;
yyextra->yyFileName = fileName;
//setContext();
- msg("Parsing file %s...\n",yyextra->yyFileName.data());
+ msg("Parsing file %s...\n",qPrint(yyextra->yyFileName));
- FileInfo fi(fileName);
+ FileInfo fi(fileName.str());
yyextra->moduleScope = findPackageScope(yyscanner,fileName);
QCString baseName=fi.baseName();
if (baseName!="__init__") // package initializer file is not a package itself
@@ -1863,7 +1864,7 @@ static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileB
static void parsePrototype(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("**** parsePrototype(%s) begin\n",text.data());
+ //printf("**** parsePrototype(%s) begin\n",qPrint(text));
if (text.isEmpty())
{
warn(yyextra->yyFileName,yyextra->yyLineNr,"Empty prototype found!");
@@ -1884,7 +1885,7 @@ static void parsePrototype(yyscan_t yyscanner,const QCString &text)
orgInputPosition = yyextra->inputPosition;
// set new string
- yyextra->inputString = text;
+ yyextra->inputString = text.data();
yyextra->inputPosition = 0;
pyscannerYYrestart( 0, yyscanner );
@@ -1931,16 +1932,16 @@ PythonOutlineParser::~PythonOutlineParser()
}
-void PythonOutlineParser::parseInput(const char *fileName,
- const char *fileBuf,
- const std::shared_ptr<Entry> &root,
- ClangTUParser * /*clangParser*/)
+void PythonOutlineParser::parseInput(const QCString &fileName,
+ const char *fileBuf,
+ const std::shared_ptr<Entry> &root,
+ ClangTUParser * /*clangParser*/)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->thisParser = this;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
::parseMain(p->yyscanner, fileName,fileBuf,root);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
// May print the AST for debugging purposes
// printAST(global_root);
@@ -1951,10 +1952,9 @@ bool PythonOutlineParser::needsPreprocessing(const QCString &) const
return FALSE;
}
-void PythonOutlineParser::parsePrototype(const char *text)
+void PythonOutlineParser::parsePrototype(const QCString &text)
{
::parsePrototype(p->yyscanner,text);
-
}
//----------------------------------------------------------------------------
diff --git a/src/qcstring.cpp b/src/qcstring.cpp
index ed35990..d95687d 100644
--- a/src/qcstring.cpp
+++ b/src/qcstring.cpp
@@ -472,7 +472,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst)
if (srcLen!=dstLen)
{
int count;
- for (count=0, p=s.data(); (q=strstr(p,src))!=0; p=q+srcLen) count++;
+ for (count=0, p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen) count++;
resLen = s.length()+count*(dstLen-srcLen);
}
else // result has same size as s
@@ -481,13 +481,13 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst)
}
QCString result(resLen+1);
char *r;
- for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen)
+ for (r=result.rawData(), p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen)
{
int l = (int)(q-p);
memcpy(r,p,l);
r+=l;
- if (dst) memcpy(r,dst,dstLen);
+ if (dstLen>0) memcpy(r,dst.data(),dstLen);
r+=dstLen;
}
if (r)
@@ -513,7 +513,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in
if (srcLen!=dstLen)
{
int count;
- for (count=0, p=s.data(); (q=strstr(p,src))!=0; p=q+srcLen) count++;
+ for (count=0, p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen) count++;
resLen = s.length()+count*(dstLen-srcLen);
}
else // result has same size as s
@@ -522,13 +522,13 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in
}
QCString result(resLen+1);
char *r;
- for (r=result.rawData(), p=s; (q=strstr(p,src))!=0; p=q+srcLen)
+ for (r=result.rawData(), p=s.data(); (q=strstr(p,src.data()))!=0; p=q+srcLen)
{
// search a consecutive sequence of src
int seq = 0, skip = 0;
if (skip_seq)
{
- for (const char *n=q+srcLen; qstrncmp(n,src,srcLen)==0; seq=1+skip, n+=srcLen)
+ for (const char *n=q+srcLen; qstrncmp(n,src.data(),srcLen)==0; seq=1+skip, n+=srcLen)
++skip; // number of consecutive src after the current one
// verify the allowed number of consecutive src to skip
@@ -549,7 +549,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in
continue;
}
- if (dst) memcpy(r,dst,dstLen);
+ if (dstLen>0) memcpy(r,dst.data(),dstLen);
r+=dstLen;
}
qstrcpy(r,p);
diff --git a/src/qcstring.h b/src/qcstring.h
index 3efda9a..1588d5c 100644
--- a/src/qcstring.h
+++ b/src/qcstring.h
@@ -27,6 +27,8 @@
#include <cstdint>
#include <ostream>
+#include "utf8.h"
+
#ifndef FALSE
#define FALSE false
#endif
@@ -75,14 +77,19 @@ inline int cstrcmp( const char *str1, const char *str2 )
{ return strcmp(str1,str2); }
inline int qstrcmp( const char *str1, const char *str2 )
-{ return (str1 && str2) ? strcmp(str1,str2) : (int)((intptr_t)str2 - (intptr_t)str1); }
+{ return (str1 && str2) ? strcmp(str1,str2) :
+ (!str1 && !str2) ? 0 : // both empty
+ str1 ? -1 : 1;
+}
inline int cstrncmp( const char *str1, const char *str2, uint len )
{ return strncmp(str1,str2,len); }
inline int qstrncmp( const char *str1, const char *str2, uint len )
{ return (str1 && str2) ? strncmp(str1,str2,len) :
- (int)((intptr_t)str2 - (intptr_t)str1); }
+ (!str1 && !str2) ? 0 : // both empty
+ str1 ? -1 : 1;
+}
inline bool qisspace(char c)
{ return c==' ' || c=='\t' || c=='\n' || c=='\r'; }
@@ -105,7 +112,9 @@ class QCString
QCString( QCString &&s ) = default;
QCString &operator=( QCString &&s ) = default;
- QCString( const std::string &s ) : m_rep(s) {}
+ explicit QCString( const std::string &s ) : m_rep(s) {}
+
+ QCString( std::string &&s) { m_rep = std::move(s); }
/** creates a string with room for size characters
* @param[in] size the number of character to allocate (also counting the 0-terminator!)
@@ -125,6 +134,8 @@ class QCString
/** replaces the contents by that of C string \a str. */
QCString &operator=( const char *str) { m_rep = str?str:""; return *this; }
+ QCString &operator=( const std::string &s) { m_rep = s; return *this; }
+
/** Returns TRUE iff the string is empty. Equivalent to isEmpty(). */
bool isNull() const { return m_rep.empty(); }
@@ -138,11 +149,9 @@ class QCString
uint size() const { return (uint)m_rep.size(); }
/** Returns a pointer to the contents of the string in the form of a 0-terminated C string */
- const char *data() const { return m_rep.empty() ? 0 : m_rep.c_str(); }
+ const char *data() const { return m_rep.c_str(); }
/** Returns a writable pointer to the data.
- * @warning if the string is shared it will modifying the string directly and
- * this will overwrite all copies as well!
*/
char *rawData() const { return m_rep.empty() ? 0 : const_cast<char*>(&m_rep[0]); }
@@ -169,9 +178,6 @@ class QCString
return TRUE;
}
- /** Returns a deep copy of the string. */
- QCString copy() const { return *this; }
-
QCString &sprintf( const char *format, ... );
int find( char c, int index=0, bool cs=TRUE ) const;
@@ -187,16 +193,20 @@ class QCString
int contains( const char *str, bool cs=TRUE ) const;
//int contains( const QRegExp &rx ) const;
- bool stripPrefix(const char *prefix)
+ bool stripPrefix(const QCString &prefix)
{
- if (prefix==0 || m_rep.empty()) return FALSE;
- if (m_rep.rfind(prefix,0)==0) // string starts with prefix
+ if (prefix.isEmpty() || m_rep.empty()) return FALSE;
+ if (m_rep.rfind(prefix.data(),0)==0) // string starts with prefix
{
- m_rep.erase(0,qstrlen(prefix));
+ m_rep.erase(0,prefix.length());
return TRUE;
}
return FALSE;
}
+ bool stripPrefix(const char *prefix)
+ {
+ return stripPrefix(QCString(prefix));
+ }
QCString left( uint len ) const
{
@@ -220,18 +230,12 @@ class QCString
QCString lower() const
{
- std::string s = m_rep;
- std::transform(s.begin(),s.end(),s.begin(),
- [](unsigned char c){ return (unsigned char)std::tolower(c); });
- return s;
+ return QCString(convertUTF8ToLower(m_rep));
}
QCString upper() const
{
- std::string s = m_rep;
- std::transform(s.begin(),s.end(),s.begin(),
- [](unsigned char c){ return (unsigned char)std::toupper(c); });
- return s;
+ return QCString(convertUTF8ToUpper(m_rep));
}
QCString stripWhiteSpace() const
@@ -247,6 +251,24 @@ class QCString
QCString simplifyWhiteSpace() const;
+ QCString &insert( uint index, const QCString &s )
+ {
+ if (s.length()>0)
+ {
+ uint ol = (uint)m_rep.size();
+ if (index>ol) // insert beyond end of string and fill gap with spaces
+ {
+ m_rep.resize(index+s.length());
+ std::memset(&m_rep[ol],' ',index-ol);
+ std::memcpy(&m_rep[index],s.data(),s.length()+1);
+ }
+ else // insert inside the string
+ {
+ m_rep.insert(index,s.str());
+ }
+ }
+ return *this;
+ }
QCString &insert( uint index, const char *s )
{
uint len = s ? qstrlen(s) : 0;
@@ -273,16 +295,42 @@ class QCString
return insert(index,s);
}
+ QCString &append( char c)
+ {
+ m_rep+=c;
+ return *this;
+ }
+
QCString &append( const char *s )
{
return operator+=(s);
}
+ QCString &append( const QCString &s )
+ {
+ return operator+=(s);
+ }
+
+ QCString &append( const std::string &s )
+ {
+ return operator+=(s);
+ }
+
QCString &prepend( const char *s )
{
return insert(0,s);
}
+ QCString &prepend( const QCString &s )
+ {
+ return insert(0,s.data());
+ }
+
+ QCString &prepend( const std::string &s )
+ {
+ return insert(0,s.c_str());
+ }
+
QCString &remove( uint index, uint len )
{
uint ol = (uint)m_rep.size();
@@ -343,11 +391,14 @@ class QCString
return m_rep.rfind(s,0)==0; // looking "backward" starting and ending at index 0
}
+#define HAS_IMPLICIT_CAST_TO_PLAIN_C_STRING 0
+#if HAS_IMPLICIT_CAST_TO_PLAIN_C_STRING
/** Converts the string to a plain C string */
operator const char *() const
{
return data();
}
+#endif
std::string str() const
{
@@ -373,12 +424,15 @@ class QCString
return *this;
}
+#define HAS_CHARACTER_APPEND_OPERATOR 1
+#if HAS_CHARACTER_APPEND_OPERATOR
/** Appends character \a c to this string and returns a reference to the result. */
QCString &operator+=( char c )
{
m_rep+=c;
return *this;
}
+#endif
/** Returns a reference to the character at index \a i. */
char &at( uint i) const
@@ -454,31 +508,34 @@ inline QCString operator+( const QCString &s1, const QCString &s2 )
inline QCString operator+( const QCString &s1, const char *s2 )
{
QCString tmp(s1);
- tmp += s2;
+ tmp.append(s2);
return tmp;
}
inline QCString operator+( const char *s1, const QCString &s2 )
{
QCString tmp(s1);
- tmp += s2;
+ tmp.append(s2);
return tmp;
}
+#define HAD_PLUS_OPERATOR_FOR_CHAR 0
+#if HAS_PLUS_OPERATOR_FOR_CHAR
inline QCString operator+( const QCString &s1, char c2 )
{
QCString tmp( s1.data() );
- tmp += c2;
+ tmp.append(c2);
return tmp;
}
inline QCString operator+( char c1, const QCString &s2 )
{
QCString tmp;
- tmp += c1;
- tmp += s2;
+ tmp.append(c1);
+ tmp.append(s2);
return tmp;
}
+#endif
inline const char *qPrint(const char *s)
{
@@ -500,15 +557,51 @@ inline std::string toStdString(const QCString &s)
return s.str();
}
+//---- overloads
+
+inline int qstricmp( const QCString &str1, const char *str2 )
+{
+ return qstricmp(str1.data(),str2);
+}
+
+inline int qstricmp( const char *str1, const QCString &str2 )
+{
+ return qstricmp(str1,str2.data());
+}
+
+inline int qstricmp( const QCString &str1, const QCString &str2 )
+{
+ return qstricmp(str1.data(),str2.data());
+}
+
+inline int qstrnicmp( const QCString &str1, const char *str2, uint len )
+{
+ return qstrnicmp(str1.data(),str2,len);
+}
+
+inline int qstrnicmp( const char *str1, const QCString &str2, uint len )
+{
+ return qstrnicmp(str1,str2.data(),len);
+}
+
+inline int qstrnicmp( const QCString &str1, const QCString &str2, uint len )
+{
+ return qstrnicmp(str1.data(),str2.data(),len);
+}
+
// helper functions
QCString substitute(const QCString &str,const QCString &find,const QCString &replace);
+inline QCString substitute(const QCString &str,const char *find,const char *replace)
+{
+ return substitute(str,QCString(find),QCString(replace));
+}
QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq);
inline QCString substitute(const QCString &s,char srcChar,char dstChar)
{
std::string ss = s.str();
std::replace(ss.begin(),ss.end(),srcChar,dstChar);
- return ss;
+ return QCString(ss);
}
inline std::ostream& operator<<(std::ostream& os, const QCString& s)
diff --git a/src/qhp.cpp b/src/qhp.cpp
index 47131be..fc2f215 100644
--- a/src/qhp.cpp
+++ b/src/qhp.cpp
@@ -27,7 +27,7 @@
#include <fstream>
#include <string.h>
-static QCString makeFileName(const char * withoutExtension)
+static QCString makeFileName(const QCString & withoutExtension)
{
QCString result=withoutExtension;
if (!result.isEmpty())
@@ -44,12 +44,12 @@ static QCString makeFileName(const char * withoutExtension)
return result;
}
-static QCString makeRef(const char * withoutExtension, const char * anchor)
+static QCString makeRef(const QCString & withoutExtension, const QCString & anchor)
{
//printf("QHP::makeRef(%s,%s)\n",withoutExtension,anchor);
- if (!withoutExtension) return QCString();
+ if (withoutExtension.isEmpty()) return QCString();
QCString result = makeFileName(withoutExtension);
- if (!anchor) return result;
+ if (anchor.isEmpty()) return result;
return result+"#"+anchor;
}
@@ -98,7 +98,7 @@ void Qhp::initialize()
if (!filterName.isEmpty())
{
const char * tagAttributes[] =
- { "name", filterName, 0 };
+ { "name", filterName.data(), 0 };
m_doc.open("customFilter", tagAttributes);
StringVector customFilterAttributes =
@@ -131,8 +131,8 @@ void Qhp::initialize()
QCString fullProjectname = getFullProjectName();
QCString indexFile = "index"+Doxygen::htmlFileExtension;
const char * const attributes[] =
- { "title", fullProjectname,
- "ref", indexFile,
+ { "title", fullProjectname.data(),
+ "ref", indexFile.data(),
NULL
};
m_toc.open("section", attributes);
@@ -191,9 +191,9 @@ void Qhp::decContentsDepth()
m_sectionLevel--;
}
-void Qhp::addContentsItem(bool /*isDir*/, const char * name,
- const char * /*ref*/, const char * file,
- const char *anchor, bool /* separateIndex */,
+void Qhp::addContentsItem(bool /*isDir*/, const QCString & name,
+ const QCString & /*ref*/, const QCString & file,
+ const QCString &anchor, bool /* separateIndex */,
bool /* addToNavIndex */,
const Definition * /*def*/)
{
@@ -217,7 +217,7 @@ void Qhp::addContentsItem(bool /*isDir*/, const char * name,
}
void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
- const char *sectionAnchor,const char *word)
+ const QCString &sectionAnchor,const QCString &word)
{
(void)word;
//printf("addIndexItem(%s %s %s\n",
@@ -239,9 +239,9 @@ void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
QCString cfname = md->getOutputFileBase();
QCString cfiname = context->getOutputFileBase();
QCString level1 = context->name();
- QCString level2 = word ? QCString(word) : md->name();
+ QCString level2 = !word.isEmpty() ? word : md->name();
QCString contRef = separateMemberPages ? cfname : cfiname;
- QCString anchor = sectionAnchor ? QCString(sectionAnchor) : md->anchor();
+ QCString anchor = !sectionAnchor.isEmpty() ? sectionAnchor : md->anchor();
QCString ref;
@@ -250,9 +250,9 @@ void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
QCString id = level1+"::"+level2;
const char * attributes[] =
{
- "name", level2,
- "id", id,
- "ref", ref,
+ "name", level2.data(),
+ "id", id.data(),
+ "ref", ref.data(),
0
};
m_index.openClose("keyword", attributes);
@@ -261,20 +261,20 @@ void Qhp::addIndexItem(const Definition *context,const MemberDef *md,
{
// <keyword name="Foo" id="Foo" ref="doc.html#Foo"/>
QCString contRef = context->getOutputFileBase();
- QCString level1 = word ? QCString(word) : context->name();
+ QCString level1 = !word.isEmpty() ? word : context->name();
QCString ref = makeRef(contRef,sectionAnchor);
const char * attributes[] =
{
- "name", level1,
- "id", level1,
- "ref", ref,
+ "name", level1.data(),
+ "id", level1.data(),
+ "ref", ref.data(),
0
};
m_index.openClose("keyword", attributes);
}
}
-void Qhp::addIndexFile(const char * name)
+void Qhp::addIndexFile(const QCString & name)
{
addFile(name);
}
@@ -317,8 +317,8 @@ void Qhp::handlePrevSection()
QCString finalRef = makeRef(m_prevSectionBaseName, m_prevSectionAnchor);
const char * const attributes[] =
- { "title", m_prevSectionTitle,
- "ref", finalRef,
+ { "title", m_prevSectionTitle.data(),
+ "ref", finalRef.data(),
NULL
};
@@ -341,7 +341,7 @@ void Qhp::handlePrevSection()
clearPrevSection();
}
-void Qhp::setPrevSection(const char * title, const char * basename, const char * anchor, int level)
+void Qhp::setPrevSection(const QCString & title, const QCString & basename, const QCString & anchor, int level)
{
m_prevSectionTitle = title;
m_prevSectionBaseName = basename;
@@ -356,17 +356,17 @@ void Qhp::clearPrevSection()
m_prevSectionAnchor.resize(0);
}
-void Qhp::addFile(const char * fileName)
+void Qhp::addFile(const QCString & fileName)
{
m_files.openCloseContent("file", fileName);
}
-void Qhp::addImageFile(const char *fileName)
+void Qhp::addImageFile(const QCString &fileName)
{
addFile(fileName);
}
-void Qhp::addStyleSheetFile(const char *fileName)
+void Qhp::addStyleSheetFile(const QCString &fileName)
{
addFile(fileName);
}
diff --git a/src/qhp.h b/src/qhp.h
index eba7db5..d1fc335 100644
--- a/src/qhp.h
+++ b/src/qhp.h
@@ -3,8 +3,8 @@
* Copyright (C) 2008 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.
*
@@ -31,15 +31,15 @@ class Qhp : public IndexIntf
void finalize();
void incContentsDepth();
void decContentsDepth();
- void addContentsItem(bool isDir, const char * name, const char * ref,
- const char * file, const char * anchor,
+ void addContentsItem(bool isDir, const QCString & name, const QCString & ref,
+ const QCString & file, const QCString & anchor,
bool separateIndex,bool addToNavIndex,
const Definition *def);
void addIndexItem(const Definition *context, const MemberDef *md,
- const char *sectionAnchor, const char *title);
- void addIndexFile(const char * name);
- void addImageFile(const char * name);
- void addStyleSheetFile(const char * name);
+ const QCString &sectionAnchor, const QCString &title);
+ void addIndexFile(const QCString & name);
+ void addImageFile(const QCString & name);
+ void addStyleSheetFile(const QCString & name);
// END IndexIntf
static QCString getQhpFileName();
@@ -47,8 +47,8 @@ class Qhp : public IndexIntf
private:
void handlePrevSection();
void clearPrevSection();
- void setPrevSection(const char * title, const char * basename, const char * anchor, int level);
- void addFile(const char * fileName);
+ void setPrevSection(const QCString & title, const QCString & basename, const QCString & anchor, int level);
+ void addFile(const QCString & fileName);
static QCString getFullProjectName();
diff --git a/src/qhpxmlwriter.cpp b/src/qhpxmlwriter.cpp
index 5915841..b3ab95a 100644
--- a/src/qhpxmlwriter.cpp
+++ b/src/qhpxmlwriter.cpp
@@ -16,6 +16,7 @@
#include "qhpxmlwriter.h"
#include "util.h"
+#include "qcstring.h"
QhpXmlWriter::QhpXmlWriter()
: m_indentLevel(0), m_curLineIndented(false), m_compress(false)
@@ -46,8 +47,8 @@ void QhpXmlWriter::dumpTo(TextStream & file)
file << m_backend.str();
}
-void QhpXmlWriter::open(char const * elementName,
- char const * const * attributes)
+void QhpXmlWriter::open(const QCString &elementName,
+ const char * const attributes[])
{
indent();
openPure(elementName, attributes);
@@ -55,16 +56,16 @@ void QhpXmlWriter::open(char const * elementName,
m_indentLevel++;
}
-void QhpXmlWriter::openClose(char const * elementName,
- char const * const * attributes)
+void QhpXmlWriter::openClose(const QCString &elementName,
+ const char * const attributes[])
{
indent();
openClosePure(elementName, attributes);
newLine();
}
-void QhpXmlWriter::openCloseContent(char const * elementName,
- char const * content)
+void QhpXmlWriter::openCloseContent(const QCString &elementName,
+ const QCString &content)
{
indent();
openPure(elementName);
@@ -73,7 +74,7 @@ void QhpXmlWriter::openCloseContent(char const * elementName,
newLine();
}
-void QhpXmlWriter::close(char const * elementName)
+void QhpXmlWriter::close(const QCString &elementName)
{
m_indentLevel--;
indent();
@@ -81,7 +82,7 @@ void QhpXmlWriter::close(char const * elementName)
newLine();
}
-void QhpXmlWriter::declaration(char const * version, char const * encoding)
+void QhpXmlWriter::declaration(const QCString &version, const QCString &encoding)
{
m_backend << "<?xml version=\"" << version << "\" encoding=\"" << encoding << "\"?>";
newLine();
@@ -109,17 +110,17 @@ void QhpXmlWriter::newLine()
}
}
-void QhpXmlWriter::openPureHelper(char const * elementName,
- char const * const * attributes, bool close)
+void QhpXmlWriter::openPureHelper(const QCString &elementName,
+ const char * const attributes[], bool close)
{
m_backend << "<" << elementName;
if (attributes)
{
- for (char const * const * walker = attributes;
+ for (const char * const * walker = attributes;
walker[0]; walker += 2)
{
- char const * const key = walker[0];
- char const * const value = walker[1];
+ const char *const key = walker[0];
+ const char *const value = walker[1];
if (!value)
{
continue;
@@ -135,19 +136,19 @@ void QhpXmlWriter::openPureHelper(char const * elementName,
m_backend << ">";
}
-void QhpXmlWriter::openPure(char const * elementName,
- char const * const * attributes)
+void QhpXmlWriter::openPure(const QCString &elementName,
+ const char * const attributes[])
{
openPureHelper(elementName, attributes, false);
}
-void QhpXmlWriter::openClosePure(char const * elementName,
- char const * const * attributes)
+void QhpXmlWriter::openClosePure(const QCString &elementName,
+ const char * const attributes[])
{
openPureHelper(elementName, attributes, true);
}
-void QhpXmlWriter::closePure(char const * elementName)
+void QhpXmlWriter::closePure(const QCString &elementName)
{
m_backend << "</" << elementName << ">";
}
diff --git a/src/qhpxmlwriter.h b/src/qhpxmlwriter.h
index 6b3ccb9..7b591eb 100644
--- a/src/qhpxmlwriter.h
+++ b/src/qhpxmlwriter.h
@@ -30,26 +30,24 @@ class QhpXmlWriter
void setCompressionEnabled(bool enabled);
void insert(QhpXmlWriter const & source);
void dumpTo(TextStream & file);
- void open(char const * elementName,
- char const * const * attributes = 0);
- void openClose(char const * elementName,
- char const * const * attributes = 0);
- void openCloseContent(char const * elementName, char const * content);
- void close(char const * elementName);
- void declaration(char const * version, char const * encoding);
-
- static char * dupEscaped(const char * source);
+ void open(const QCString &elementName,
+ const char * const attributes[] = 0);
+ void openClose(const QCString &elementName,
+ const char * const attributes[] = 0);
+ void openCloseContent(const QCString &elementName, const QCString &content);
+ void close(const QCString &elementName);
+ void declaration(const QCString &version, const QCString &encoding);
private:
void indent();
void newLine();
- void openPureHelper(char const * elementName,
- char const * const * attributes, bool close);
- void openPure(char const * elementName,
- char const * const * attributes = 0);
- void openClosePure(char const * elementName,
- char const * const * attributes = 0);
- void closePure(char const * elementName);
+ void openPureHelper(const QCString &elementName,
+ const char * const attributes[], bool close);
+ void openPure(const QCString &elementName,
+ const char * const attributes[] = 0);
+ void openClosePure(const QCString &elementName,
+ const char * const attributes[] = 0);
+ void closePure(const QCString &elementName);
TextStream m_backend;
int m_indentLevel;
diff --git a/src/reflist.cpp b/src/reflist.cpp
index 90bac91..9a32449 100644
--- a/src/reflist.cpp
+++ b/src/reflist.cpp
@@ -21,7 +21,7 @@
#include "definition.h"
#include "config.h"
-RefList::RefList(const char *listName, const char *pageTitle, const char *secTitle) :
+RefList::RefList(const QCString &listName, const QCString &pageTitle, const QCString &secTitle) :
m_listName(listName), m_fileName(convertNameToFile(listName,FALSE,TRUE)),
m_pageTitle(pageTitle), m_secTitle(secTitle)
{
@@ -67,7 +67,7 @@ void RefList::generatePage()
bool first=true;
for (const std::unique_ptr<RefItem> &item : m_entries)
{
- if (!item->name()) continue;
+ if (item->name().isEmpty()) continue;
cnt++;
bool startNewGroup = item->group()!=lastGroup;
if (startNewGroup)
diff --git a/src/reflist.h b/src/reflist.h
index f6444c5..6ab360b 100644
--- a/src/reflist.h
+++ b/src/reflist.h
@@ -32,13 +32,13 @@ class RefItem
public:
RefItem(int id,RefList *list) : m_id(id), m_list(list) {}
- void setText (const char *text) { m_text = text; }
- void setAnchor(const char *anchor) { m_anchor = anchor; }
- void setPrefix(const char *prefix) { m_prefix = prefix; }
- void setName (const char *name) { m_name = name; }
- void setTitle (const char *title) { m_title = title; }
- void setArgs (const char *args) { m_args = args; }
- void setGroup (const char *group) { m_group = group; }
+ void setText (const QCString &text) { m_text = text; }
+ void setAnchor(const QCString &anchor) { m_anchor = anchor; }
+ void setPrefix(const QCString &prefix) { m_prefix = prefix; }
+ void setName (const QCString &name) { m_name = name; }
+ void setTitle (const QCString &title) { m_title = title; }
+ void setArgs (const QCString &args) { m_args = args; }
+ void setGroup (const QCString &group) { m_group = group; }
void setScope (const Definition *scope) { m_scope = scope; }
QCString text() const { return m_text; }
@@ -83,7 +83,7 @@ class RefList
* @param pageTitle String representing the title of the list page.
* @param secTitle String representing the title of the section.
*/
- RefList(const char *listName, const char *pageTitle, const char *secTitle);
+ RefList(const QCString &listName, const QCString &pageTitle, const QCString &secTitle);
bool isEnabled() const;
/*! Adds a new item to the list.
diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp
index 01494d8..161e480 100644
--- a/src/resourcemgr.cpp
+++ b/src/resourcemgr.cpp
@@ -51,14 +51,14 @@ void ResourceMgr::registerResources(std::initializer_list<Resource> resources)
}
}
-bool ResourceMgr::writeCategory(const char *categoryName,const char *targetDir) const
+bool ResourceMgr::writeCategory(const QCString &categoryName,const QCString &targetDir) const
{
for (auto &kv : p->resources)
{
Resource &res = kv.second;
- if (qstrcmp(res.category,categoryName)==0)
+ if (res.category==categoryName)
{
- std::string pathName = std::string(targetDir)+"/"+res.name;
+ std::string pathName = targetDir.str()+"/"+res.name;
std::ofstream f(pathName,std::ofstream::out | std::ofstream::binary);
bool ok=false;
if (f.is_open())
@@ -68,7 +68,7 @@ bool ResourceMgr::writeCategory(const char *categoryName,const char *targetDir)
}
if (!ok)
{
- err("Failed to write resource '%s' to directory '%s'\n",res.name,targetDir);
+ err("Failed to write resource '%s' to directory '%s'\n",res.name,qPrint(targetDir));
return FALSE;
}
}
@@ -76,9 +76,9 @@ bool ResourceMgr::writeCategory(const char *categoryName,const char *targetDir)
return TRUE;
}
-bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const char *targetName) const
+bool ResourceMgr::copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName) const
{
- std::string pathName = std::string(targetDir)+"/"+targetName;
+ std::string pathName = targetDir.str()+"/"+targetName.str();
const Resource *res = get(name);
if (res)
{
@@ -107,7 +107,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
ushort width = (data[0]<<8)+data[1];
ushort height = (data[2]<<8)+data[3];
ColoredImgDataItem images[2];
- images[0].name = n;
+ images[0].name = n.data();
images[0].width = width;
images[0].height = height;
images[0].content = &data[4];
@@ -125,7 +125,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
ushort width = (data[0]<<8)+data[1];
ushort height = (data[2]<<8)+data[3];
ColoredImgDataItem images[2];
- images[0].name = n;
+ images[0].name = n.data();
images[0].width = width;
images[0].height = height;
images[0].content = &data[4];
@@ -143,7 +143,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
QCString buf(res->size+1);
memcpy(buf.rawData(),res->data,res->size);
buf = replaceColorMarkers(buf);
- if (qstrcmp(name,"navtree.css")==0)
+ if (name=="navtree.css")
{
t << substitute(buf,"$width",QCString().setNum(Config_getInt(TREEVIEW_WIDTH))+"px");
}
@@ -170,24 +170,24 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
}
else
{
- err("requested resource '%s' not compiled in!\n",name);
+ err("requested resource '%s' not compiled in!\n",qPrint(name));
}
return FALSE;
}
-bool ResourceMgr::copyResource(const char *name,const char *targetDir) const
+bool ResourceMgr::copyResource(const QCString &name,const QCString &targetDir) const
{
return copyResourceAs(name,targetDir,name);
}
-const Resource *ResourceMgr::get(const char *name) const
+const Resource *ResourceMgr::get(const QCString &name) const
{
- auto it = p->resources.find(name);
+ auto it = p->resources.find(name.str());
if (it!=p->resources.end()) return &it->second;
return 0;
}
-QCString ResourceMgr::getAsString(const char *name) const
+QCString ResourceMgr::getAsString(const QCString &name) const
{
const Resource *res = get(name);
if (res)
diff --git a/src/resourcemgr.h b/src/resourcemgr.h
index 851f8b0..7978e09 100644
--- a/src/resourcemgr.h
+++ b/src/resourcemgr.h
@@ -42,20 +42,20 @@ class ResourceMgr
void registerResources(std::initializer_list<Resource> resources);
/** Writes all resource belonging to a given category to a given target directory */
- bool writeCategory(const char *categoryName,const char *targetDir) const;
+ bool writeCategory(const QCString &categoryName,const QCString &targetDir) const;
/** Copies a registered resource to a given target directory */
- bool copyResource(const char *name,const char *targetDir) const;
+ bool copyResource(const QCString &name,const QCString &targetDir) const;
/** Copies a registered resource to a given target directory under a given target name */
- bool copyResourceAs(const char *name,const char *targetDir,const char *targetName) const;
+ bool copyResourceAs(const QCString &name,const QCString &targetDir,const QCString &targetName) const;
/** Gets the resource data as a C string */
- QCString getAsString(const char *name) const;
+ QCString getAsString(const QCString &name) const;
private:
/** Returns a pointer to the resource object with the given name. */
- const Resource *get(const char *name) const;
+ const Resource *get(const QCString &name) const;
ResourceMgr();
~ResourceMgr();
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index d0d4e06..0d571dc 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -56,16 +56,15 @@ static QCString align(DocHtmlCell *cell)
}
RTFDocVisitor::RTFDocVisitor(TextStream &t,CodeOutputInterface &ci,
- const char *langExt)
+ const QCString &langExt)
: DocVisitor(DocVisitor_RTF), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_hide(FALSE), m_indentLevel(0), m_lastIsPara(FALSE), m_langExt(langExt)
{
}
-QCString RTFDocVisitor::getStyle(const char *name)
+QCString RTFDocVisitor::getStyle(const QCString &name)
{
- QCString n;
- n.sprintf("%s%d",name,m_indentLevel);
+ QCString n = name + QCString().setNum(m_indentLevel);
StyleData &sd = rtf_Style[n.str()];
return sd.reference();
}
@@ -329,14 +328,14 @@ void RTFDocVisitor::visit(DocVerbatim *s)
QCString fileName(4096);
fileName.sprintf("%s%d%s",
- (Config_getString(RTF_OUTPUT)+"/inline_dotgraph_").data(),
+ qPrint(Config_getString(RTF_OUTPUT)+"/inline_dotgraph_"),
dotindex++,
".dot"
);
std::ofstream file(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!file.is_open())
{
- err("Could not open file %s for writing\n",fileName.data());
+ err("Could not open file %s for writing\n",qPrint(fileName));
}
else
{
@@ -358,14 +357,14 @@ void RTFDocVisitor::visit(DocVerbatim *s)
QCString baseName(4096);
baseName.sprintf("%s%d%s",
- (Config_getString(RTF_OUTPUT)+"/inline_mscgraph_").data(),
+ qPrint(Config_getString(RTF_OUTPUT)+"/inline_mscgraph_"),
mscindex++,
".msc"
);
std::ofstream file(baseName.str(),std::ofstream::out | std::ofstream::binary);
if (!file.is_open())
{
- err("Could not open file %s for writing\n",baseName.data());
+ err("Could not open file %s for writing\n",qPrint(baseName));
}
QCString text = "msc {";
text+=s->text();
@@ -532,7 +531,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
void RTFDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
DBG_RTF("{\\comment RTFDocVisitor::visit(DocIncOperator)}\n");
QCString locLangExt = getFileNameExtension(op->includeFileName());
if (locLangExt.isEmpty()) locLangExt = m_langExt;
@@ -1179,7 +1178,7 @@ void RTFDocVisitor::visitPre(DocImage *img)
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocImage)}\n");
includePicturePreRTF(img->name(), img->type()==DocImage::Rtf, img->hasCaption(), img->isInlineImage());
}
-void RTFDocVisitor::includePicturePreRTF(const QCString name, bool isTypeRTF, bool hasCaption, bool inlineImage)
+void RTFDocVisitor::includePicturePreRTF(const QCString &name, bool isTypeRTF, bool hasCaption, bool inlineImage)
{
if (isTypeRTF)
{
@@ -1307,7 +1306,7 @@ void RTFDocVisitor::visitPre(DocRef *ref)
// ref->anchor() for LaTeX/RTF
if (ref->isSubPage())
{
- startLink(ref->ref(),0,ref->anchor());
+ startLink(ref->ref(),QCString(),ref->anchor());
}
else
{
@@ -1710,11 +1709,11 @@ void RTFDocVisitor::visitPost(DocParBlock *)
// return s;
//}
-void RTFDocVisitor::filter(const char *str,bool verbatim)
+void RTFDocVisitor::filter(const QCString &str,bool verbatim)
{
- if (str)
+ if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str;
+ const unsigned char *p=(const unsigned char *)str.data();
unsigned char c;
//unsigned char pc='\0';
while (*p)
@@ -1765,11 +1764,11 @@ void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCS
{
refName+=file;
}
- if (!file.isEmpty() && anchor)
+ if (!file.isEmpty() && !anchor.isEmpty())
{
refName+='_';
}
- if (anchor)
+ if (!anchor.isEmpty())
{
refName+=anchor;
}
diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h
index bbad6c4..01be1aa 100644
--- a/src/rtfdocvisitor.h
+++ b/src/rtfdocvisitor.h
@@ -31,7 +31,7 @@ class TextStream;
class RTFDocVisitor : public DocVisitor
{
public:
- RTFDocVisitor(TextStream &t,CodeOutputInterface &ci,const char *langExt);
+ RTFDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -142,15 +142,15 @@ class RTFDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str,bool verbatim=FALSE);
+ void filter(const QCString &str,bool verbatim=FALSE);
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor);
void endLink(const QCString &ref);
- QCString getStyle(const char *name);
+ QCString getStyle(const QCString &name);
void incIndentLevel();
void decIndentLevel();
- void includePicturePreRTF(const QCString name, bool isTypeRTF, bool hasCaption, bool inlineImage = FALSE);
+ void includePicturePreRTF(const QCString &name, bool isTypeRTF, bool hasCaption, bool inlineImage = FALSE);
void includePicturePostRTF(bool isTypeRTF, bool hasCaption, bool inlineImage = FALSE);
void writeDotFile(const QCString &fileName, bool hasCaption);
void writeDotFile(DocDotFile *);
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 032d568..8e01a38 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -172,7 +172,7 @@ void RTFGenerator::init()
Dir d(dir.str());
if (!d.exists() && !d.mkdir(dir.str()))
{
- term("Could not create output directory %s\n",dir.data());
+ term("Could not create output directory %s\n",qPrint(dir));
}
// first duplicate strings of rtf_Style_Default
@@ -207,7 +207,7 @@ void RTFGenerator::init()
createSubDirs(d);
}
-static QCString makeIndexName(const char *s,int i)
+static QCString makeIndexName(const QCString &s,int i)
{
QCString result=s;
result+=(char)(i+'0');
@@ -368,7 +368,7 @@ void RTFGenerator::beginRTFSection()
m_t << rtf_Style["Heading2"].reference() << "\n";
}
-void RTFGenerator::startFile(const char *name,const char *,const char *,int)
+void RTFGenerator::startFile(const QCString &name,const QCString &,const QCString &,int)
{
//setEncoding(QCString().sprintf("CP%s",theTranslator->trRTFansicp()));
QCString fileName=name;
@@ -418,13 +418,13 @@ void RTFGenerator::startIndexSection(IndexSections is)
break;
case isTitlePageAuthor:
m_t << "}\n";
- if (rtf_subject) m_t << "{\\subject " << rtf_subject << "}\n";
- if (rtf_comments) m_t << "{\\comment " << rtf_comments << "}\n";
- if (rtf_company) m_t << "{\\company " << rtf_company << "}\n";
- if (rtf_author) m_t << "{\\author " << rtf_author << "}\n";
- if (rtf_manager) m_t << "{\\manager " << rtf_manager << "}\n";
- if (rtf_documentType) m_t << "{\\category " << rtf_documentType << "}\n";
- if (rtf_keywords) m_t << "{\\keywords " << rtf_keywords << "}\n";
+ if (!rtf_subject.isEmpty()) m_t << "{\\subject " << rtf_subject << "}\n";
+ if (!rtf_comments.isEmpty()) m_t << "{\\comment " << rtf_comments << "}\n";
+ if (!rtf_company.isEmpty()) m_t << "{\\company " << rtf_company << "}\n";
+ if (!rtf_author.isEmpty()) m_t << "{\\author " << rtf_author << "}\n";
+ if (!rtf_manager.isEmpty()) m_t << "{\\manager " << rtf_manager << "}\n";
+ if (!rtf_documentType.isEmpty()) m_t << "{\\category " << rtf_documentType << "}\n";
+ if (!rtf_keywords.isEmpty()) m_t << "{\\keywords " << rtf_keywords << "}\n";
m_t << "{\\comment ";
break;
case isMainPage:
@@ -594,7 +594,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
switch (is)
{
case isTitlePageStart:
- if (rtf_title)
+ if (!rtf_title.isEmpty())
// User has overridden document title in extensions file
m_t << "}" << rtf_title;
else
@@ -616,46 +616,51 @@ void RTFGenerator::endIndexSection(IndexSections is)
m_t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << "\n"; // set to title style
m_t << "\\vertalc\\qc\\par\\par\\par\\par\\par\\par\\par\n";
- if (rtf_logoFilename)
+ if (!rtf_logoFilename.isEmpty())
{
m_t << "{\\field\\flddirty {\\*\\fldinst INCLUDEPICTURE \"" << rtf_logoFilename;
m_t << "\" \\\\d \\\\*MERGEFORMAT} {\\fldrslt IMAGE }}\\par\\par\n";
}
- if (rtf_company)
+ if (!rtf_company.isEmpty())
{
m_t << rtf_company << "\\par\\par\n";
}
m_t << rtf_Style_Reset << rtf_Style["Title"].reference() << "\n"; // set to title style
- if (rtf_title)
+ if (!rtf_title.isEmpty())
+ {
// User has overridden document title in extensions file
m_t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt " << rtf_title << "}}\\par\n";
+ }
else
{
DocText *root = validatingParseText(projectName);
m_t << "{\\field\\fldedit {\\*\\fldinst TITLE \\\\*MERGEFORMAT}{\\fldrslt ";
writeDoc(root,0,0,0);
m_t << "}}\\par\n";
-
}
m_t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << "\n"; // set to title style
m_t << "\\par\n";
- if (rtf_documentType)
+ if (!rtf_documentType.isEmpty())
{
m_t << rtf_documentType << "\\par\n";
}
- if (rtf_documentId)
+ if (!rtf_documentId.isEmpty())
{
m_t << rtf_documentId << "\\par\n";
}
m_t << "\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\\par\n";
m_t << rtf_Style_Reset << rtf_Style["SubTitle"].reference() << "\n"; // set to subtitle style
- if (rtf_author)
+ if (!rtf_author.isEmpty())
+ {
m_t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt "<< rtf_author << " }}\\par\n";
+ }
else
+ {
m_t << "{\\field\\fldedit {\\*\\fldinst AUTHOR \\\\*MERGEFORMAT}{\\fldrslt AUTHOR}}\\par\n";
+ }
m_t << theTranslator->trVersion() << " " << Config_getString(PROJECT_NUMBER) << "\\par";
m_t << "{\\field\\fldedit {\\*\\fldinst CREATEDATE \\\\*MERGEFORMAT}"
@@ -953,7 +958,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
}
}
-void RTFGenerator::writePageLink(const char *name,bool first)
+void RTFGenerator::writePageLink(const QCString &name,bool first)
{
if (first) m_t << "\\par " << rtf_Style_Reset << "\n";
m_t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
@@ -977,14 +982,14 @@ void RTFGenerator::writeStyleInfo(int)
{
}
-void RTFGenerator::lineBreak(const char *)
+void RTFGenerator::lineBreak(const QCString &)
{
DBG_RTF(m_t << "{\\comment (lineBreak)}" << "\n")
m_t << "\\par\n";
m_omitParagraph = TRUE;
}
-void RTFGenerator::writeString(const char *text)
+void RTFGenerator::writeString(const QCString &text)
{
m_t << text;
}
@@ -1075,7 +1080,7 @@ void RTFGenerator::endItemListItem()
DBG_RTF(m_t << "{\\comment (endItemListItem)}\n")
}
-void RTFGenerator::startIndexItem(const char *,const char *)
+void RTFGenerator::startIndexItem(const QCString &,const QCString &)
{
DBG_RTF(m_t << "{\\comment (startIndexItem)}\n")
@@ -1086,10 +1091,10 @@ void RTFGenerator::startIndexItem(const char *,const char *)
}
}
-void RTFGenerator::endIndexItem(const char *ref,const char *fn)
+void RTFGenerator::endIndexItem(const QCString &ref,const QCString &fn)
{
DBG_RTF(m_t << "{\\comment (endIndexItem)}\n")
- if (!ref && fn)
+ if (ref.isEmpty() && !fn.isEmpty())
{
m_t << "\\tab ";
writeRTFReference(fn);
@@ -1102,14 +1107,14 @@ void RTFGenerator::endIndexItem(const char *ref,const char *fn)
m_omitParagraph = TRUE;
}
-//void RTFGenerator::writeIndexFileItem(const char *,const char *text)
+//void RTFGenerator::writeIndexFileItem(const QCString &,const QCString &text)
//{
// m_t << "\\item\\contentsline{section}{";
// docify(text);
// m_t << "}{\\pageref{" << texm_t << "}}\n";
//}
-void RTFGenerator::startHtmlLink(const char *url)
+void RTFGenerator::startHtmlLink(const QCString &url)
{
if (Config_getBool(RTF_HYPERLINKS))
@@ -1137,20 +1142,20 @@ void RTFGenerator::endHtmlLink()
}
}
-//void RTFGenerator::writeMailLink(const char *url)
+//void RTFGenerator::writeMailLink(const QCString &url)
//{
// startTypewriter();
// docify(url);
// endTypewriter();
//}
-void RTFGenerator::writeStartAnnoItem(const char *,const char *f,
- const char *path,const char *name)
+void RTFGenerator::writeStartAnnoItem(const QCString &,const QCString &f,
+ const QCString &path,const QCString &name)
{
DBG_RTF(m_t << "{\\comment (writeStartAnnoItem)}\n")
m_t << "{\\b ";
- if (path) docify(path);
- if (f && Config_getBool(RTF_HYPERLINKS))
+ if (!path.isEmpty()) docify(path);
+ if (!f.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
m_t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \"";
m_t << rtfFormatBmkStr(f);
@@ -1168,10 +1173,10 @@ void RTFGenerator::writeStartAnnoItem(const char *,const char *f,
m_t << "} ";
}
-void RTFGenerator::writeEndAnnoItem(const char *name)
+void RTFGenerator::writeEndAnnoItem(const QCString &name)
{
DBG_RTF(m_t << "{\\comment (writeEndAnnoItem)}\n")
- if (name)
+ if (!name.isEmpty())
{
m_t << "\\tab ";
writeRTFReference(name);
@@ -1202,12 +1207,12 @@ void RTFGenerator::startIndexValue(bool hasBrief)
if (hasBrief) m_t << "(";
}
-void RTFGenerator::endIndexValue(const char *name,bool hasBrief)
+void RTFGenerator::endIndexValue(const QCString &name,bool hasBrief)
{
DBG_RTF(m_t << "{\\comment (endIndexValue)}\n")
if (hasBrief) m_t << ")";
m_t << "} ";
- if (name)
+ if (!name.isEmpty())
{
m_t << "\\tab ";
writeRTFReference(name);
@@ -1252,8 +1257,8 @@ void RTFGenerator::endSubsubsection()
}
-//void RTFGenerator::writeClassLink(const char *,const char *,
-// const char *,const char *name)
+//void RTFGenerator::writeClassLink(const QCString &,const QCString &,
+// const QCString &,const QCString &name)
//{
// m_t << "{\\bf ";
// docify(name);
@@ -1327,16 +1332,16 @@ void RTFGenerator::endSubsubsection()
// m_t << " \\cell }";
//}
//
-void RTFGenerator::startTextLink(const char *f,const char *anchor)
+void RTFGenerator::startTextLink(const QCString &f,const QCString &anchor)
{
if (Config_getBool(RTF_HYPERLINKS))
{
QCString ref;
- if (f)
+ if (!f.isEmpty())
{
ref+=f;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
ref+='_';
ref+=anchor;
@@ -1357,17 +1362,17 @@ void RTFGenerator::endTextLink()
}
}
-void RTFGenerator::writeObjectLink(const char *ref, const char *f,
- const char *anchor, const char *text)
+void RTFGenerator::writeObjectLink(const QCString &ref, const QCString &f,
+ const QCString &anchor, const QCString &text)
{
- if (!ref && Config_getBool(RTF_HYPERLINKS))
+ if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
QCString refName;
- if (f)
+ if (!f.isEmpty())
{
refName+=f;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
refName+='_';
refName+=anchor;
@@ -1396,14 +1401,14 @@ void RTFGenerator::startPageRef()
startEmphasis();
}
-void RTFGenerator::endPageRef(const char *clname, const char *anchor)
+void RTFGenerator::endPageRef(const QCString &clname, const QCString &anchor)
{
QCString ref;
- if (clname)
+ if (!clname.isEmpty())
{
ref+=clname;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
ref+='_';
ref+=anchor;
@@ -1413,18 +1418,18 @@ void RTFGenerator::endPageRef(const char *clname, const char *anchor)
m_t << ")";
}
-void RTFGenerator::writeCodeLink(const char *ref,const char *f,
- const char *anchor,const char *name,
- const char *)
+void RTFGenerator::writeCodeLink(const QCString &ref,const QCString &f,
+ const QCString &anchor,const QCString &name,
+ const QCString &)
{
- if (!ref && Config_getBool(RTF_HYPERLINKS))
+ if (ref.isEmpty() && Config_getBool(RTF_HYPERLINKS))
{
QCString refName;
- if (f)
+ if (!f.isEmpty())
{
refName+=f;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
refName+='_';
refName+=anchor;
@@ -1445,7 +1450,7 @@ void RTFGenerator::writeCodeLink(const char *ref,const char *f,
}
}
-void RTFGenerator::startTitleHead(const char *)
+void RTFGenerator::startTitleHead(const QCString &)
{
DBG_RTF(m_t << "{\\comment startTitleHead}\n")
@@ -1453,11 +1458,11 @@ void RTFGenerator::startTitleHead(const char *)
m_t << rtf_Style_Reset << rtf_Style["Heading2"].reference() << "\n";
}
-void RTFGenerator::endTitleHead(const char *fileName,const char *name)
+void RTFGenerator::endTitleHead(const QCString &fileName,const QCString &name)
{
DBG_RTF(m_t << "{\\comment endTitleHead}\n")
m_t << "\\par " << rtf_Style_Reset << "\n";
- if (name)
+ if (!name.isEmpty())
{
// make table of contents entry
m_t << "{\\tc\\tcl2 \\v ";
@@ -1465,7 +1470,7 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
m_t << "}\n";
// make an index entry
- addIndexItem(name,0);
+ addIndexItem(name,QCString());
//if (name)
//{
@@ -1474,7 +1479,7 @@ void RTFGenerator::endTitleHead(const char *fileName,const char *name)
//
//if (Config_getBool(RTF_HYPERLINKS) && fileName)
//{
- writeAnchor(fileName,0);
+ writeAnchor(fileName,QCString());
//}
}
}
@@ -1515,16 +1520,16 @@ void RTFGenerator::endGroupHeader(int)
m_t << rtf_Style_Reset << "\n";
}
-void RTFGenerator::startMemberDoc(const char *clname,
- const char *memname,
- const char *,
- const char *,
+void RTFGenerator::startMemberDoc(const QCString &clname,
+ const QCString &memname,
+ const QCString &,
+ const QCString &,
int,
int,
bool showInline)
{
DBG_RTF(m_t << "{\\comment startMemberDoc}\n")
- if (memname && memname[0]!='@')
+ if (!memname.isEmpty() && memname[0]!='@')
{
addIndexItem(memname,clname);
addIndexItem(clname,memname);
@@ -1540,7 +1545,7 @@ void RTFGenerator::startMemberDoc(const char *clname,
void RTFGenerator::endMemberDoc(bool)
{
DBG_RTF(m_t << "{\\comment endMemberDoc}\n")
- //const char *style = styleStack.pop();
+ //const QCString &style = styleStack.pop();
//printf("RTFGenerator::endMemberDoc() '%s'\n",style);
//ASSERT(style==rtf_Style["Heading4"].reference());
endBold();
@@ -1548,22 +1553,22 @@ void RTFGenerator::endMemberDoc(bool)
newParagraph();
}
-void RTFGenerator::startDoxyAnchor(const char *,const char *,
- const char *,const char *,
- const char *
+void RTFGenerator::startDoxyAnchor(const QCString &,const QCString &,
+ const QCString &,const QCString &,
+ const QCString &
)
{
DBG_RTF(m_t << "{\\comment startDoxyAnchor}\n")
}
-void RTFGenerator::endDoxyAnchor(const char *fName,const char *anchor)
+void RTFGenerator::endDoxyAnchor(const QCString &fName,const QCString &anchor)
{
QCString ref;
- if (fName)
+ if (!fName.isEmpty())
{
ref+=fName;
}
- if (anchor)
+ if (!anchor.isEmpty())
{
ref+='_';
ref+=anchor;
@@ -1579,18 +1584,18 @@ void RTFGenerator::endDoxyAnchor(const char *fName,const char *anchor)
}
-//void RTFGenerator::writeLatexLabel(const char *clName,const char *anchor)
+//void RTFGenerator::writeLatexLabel(const QCString &clName,const QCString &anchor)
//{
// writeDoxyAnchor(0,clName,anchor,0);
//}
-void RTFGenerator::addIndexItem(const char *s1,const char *s2)
+void RTFGenerator::addIndexItem(const QCString &s1,const QCString &s2)
{
- if (s1)
+ if (!s1.isEmpty())
{
m_t << "{\\xe \\v ";
docify(s1);
- if (s2)
+ if (!s2.isEmpty())
{
m_t << "\\:";
docify(s2);
@@ -1642,7 +1647,7 @@ void RTFGenerator::endDescItem()
newParagraph();
}
-void RTFGenerator::startMemberDescription(const char *,const char *,bool)
+void RTFGenerator::startMemberDescription(const QCString &,const QCString &,bool)
{
DBG_RTF(m_t << "{\\comment (startMemberDescription)}\n")
m_t << "{\n";
@@ -1701,7 +1706,7 @@ void RTFGenerator::endDescForItem()
//}
-void RTFGenerator::startSection(const char *,const char *title,SectionType type)
+void RTFGenerator::startSection(const QCString &,const QCString &title,SectionType type)
{
DBG_RTF(m_t << "{\\comment (startSection)}\n")
m_t << "{";
@@ -1726,18 +1731,18 @@ void RTFGenerator::startSection(const char *,const char *title,SectionType type)
m_t << "}\n";
}
-void RTFGenerator::endSection(const char *lab,SectionType)
+void RTFGenerator::endSection(const QCString &lab,SectionType)
{
DBG_RTF(m_t << "{\\comment (endSection)}\n")
// make bookmark
m_omitParagraph=FALSE;
newParagraph();
- writeAnchor(0,lab);
+ writeAnchor(QCString(),lab);
m_t << "}";
}
-//void RTFGenerator::writeSectionRef(const char *ref,const char *,
-// const char *lab,const char *title)
+//void RTFGenerator::writeSectionRef(const QCString &ref,const QCString &,
+// const QCString &lab,const QCString &title)
//{
// if (ref)
// {
@@ -1755,8 +1760,8 @@ void RTFGenerator::endSection(const char *lab,SectionType)
// }
//}
//
-//void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
-// const char *title)
+//void RTFGenerator::writeSectionRefItem(const QCString &,const QCString &lab,
+// const QCString &title)
//{
// docify(title);
// m_t << "\\tab";
@@ -1764,8 +1769,8 @@ void RTFGenerator::endSection(const char *lab,SectionType)
// m_t << "\n";
//}
//
-//void RTFGenerator::writeSectionRefAnchor(const char *name,const char *lab,
-// const char *title)
+//void RTFGenerator::writeSectionRefAnchor(const QCString &name,const QCString &lab,
+// const QCString &title)
//{
// writeSectionRef(name,lab,title);
//}
@@ -1778,11 +1783,11 @@ void RTFGenerator::endSection(const char *lab,SectionType)
// return s;
//}
-void RTFGenerator::docify(const char *str)
+void RTFGenerator::docify(const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str;
+ const unsigned char *p=(const unsigned char *)str.data();
unsigned char c;
//unsigned char pc='\0';
while (*p)
@@ -1823,14 +1828,14 @@ void RTFGenerator::docify(const char *str)
}
}
-void RTFGenerator::codify(const char *str)
+void RTFGenerator::codify(const QCString &str)
{
// note that RTF does not have a "verbatim", so "\n" means
// nothing... add a "newParagraph()";
//static char spaces[]=" ";
- if (str)
+ if (!str.isEmpty())
{
- const unsigned char *p=(const unsigned char *)str;
+ const unsigned char *p=(const unsigned char *)str.data();
unsigned char c;
int spacesToNextTabStop;
@@ -1872,7 +1877,7 @@ void RTFGenerator::startClassDiagram()
}
void RTFGenerator::endClassDiagram(const ClassDiagram &d,
- const char *fileName,const char *)
+ const QCString &fileName,const QCString &)
{
newParagraph();
@@ -1888,12 +1893,12 @@ void RTFGenerator::endClassDiagram(const ClassDiagram &d,
m_t << "}\n";
}
-//void RTFGenerator::writeFormula(const char *,const char *text)
+//void RTFGenerator::writeFormula(const QCString &,const QCString &text)
//{
// m_t << text;
//}
-void RTFGenerator::startMemberItem(const char *,int,const char *)
+void RTFGenerator::startMemberItem(const QCString &,int,const QCString &)
{
DBG_RTF(m_t << "{\\comment startMemberItem }\n")
m_t << rtf_Style_Reset << rtf_BList_DepthStyle() << "\n"; // set style to appropriate depth
@@ -1905,18 +1910,18 @@ void RTFGenerator::endMemberItem()
newParagraph();
}
-void RTFGenerator::writeAnchor(const char *fileName,const char *name)
+void RTFGenerator::writeAnchor(const QCString &fileName,const QCString &name)
{
QCString anchor;
- if (fileName)
+ if (!fileName.isEmpty())
{
anchor+=fileName;
}
- if (fileName && name)
+ if (!fileName.isEmpty() && !name.isEmpty())
{
anchor+='_';
}
- if (name)
+ if (!name.isEmpty())
{
anchor+=name;
}
@@ -1926,21 +1931,21 @@ void RTFGenerator::writeAnchor(const char *fileName,const char *name)
m_t << "{\\bkmkend " << rtfFormatBmkStr(anchor) << "}\n";
}
-void RTFGenerator::writeRTFReference(const char *label)
+void RTFGenerator::writeRTFReference(const QCString &label)
{
m_t << "{\\field\\fldedit {\\*\\fldinst PAGEREF ";
m_t << rtfFormatBmkStr(label);
m_t << " \\\\*MERGEFORMAT}{\\fldrslt pagenum}}";
}
-void RTFGenerator::startCodeFragment(const char *)
+void RTFGenerator::startCodeFragment(const QCString &)
{
DBG_RTF(m_t << "{\\comment (startCodeFragment) }\n")
m_t << "{\n";
m_t << rtf_Style_Reset << rtf_Code_DepthStyle();
}
-void RTFGenerator::endCodeFragment(const char *)
+void RTFGenerator::endCodeFragment(const QCString &)
{
endCodeLine();
@@ -1976,7 +1981,7 @@ void RTFGenerator::endMemberList()
#endif
}
-//void RTFGenerator::startImage(const char *name,const char *,bool)
+//void RTFGenerator::startImage(const QCString &name,const QCString &,bool)
//{
// newParagraph();
// m_t << "{\n";
@@ -1992,7 +1997,7 @@ void RTFGenerator::endMemberList()
// // not yet implemented
//}
//
-//void RTFGenerator::startDotFile(const char *name,bool)
+//void RTFGenerator::startDotFile(const QCString &name,bool)
//{
// QCString baseName=name;
// int i;
@@ -2016,7 +2021,7 @@ void RTFGenerator::endMemberList()
// // not yet implemented
//}
//
-void RTFGenerator::startDescTable(const char *title)
+void RTFGenerator::startDescTable(const QCString &title)
{
DBG_RTF(m_t << "{\\comment (startDescTable) }\n")
m_t << "{\\par\n";
@@ -2105,40 +2110,40 @@ void RTFGenerator::decrementIndentLevel()
}
// a style for list formatted with "list continue" style
-const char * RTFGenerator::rtf_CList_DepthStyle()
+QCString RTFGenerator::rtf_CList_DepthStyle()
{
QCString n=makeIndexName("ListContinue",m_listLevel);
return rtf_Style[n.str()].reference();
}
// a style for list formatted as a "latext style" table of contents
-const char * RTFGenerator::rtf_LCList_DepthStyle()
+QCString RTFGenerator::rtf_LCList_DepthStyle()
{
QCString n=makeIndexName("LatexTOC",m_listLevel);
return rtf_Style[n.str()].reference();
}
// a style for list formatted as a "bullet" style
-const char * RTFGenerator::rtf_BList_DepthStyle()
+QCString RTFGenerator::rtf_BList_DepthStyle()
{
QCString n=makeIndexName("ListBullet",m_listLevel);
return rtf_Style[n.str()].reference();
}
// a style for list formatted as a "enumeration" style
-const char * RTFGenerator::rtf_EList_DepthStyle()
+QCString RTFGenerator::rtf_EList_DepthStyle()
{
QCString n=makeIndexName("ListEnum",m_listLevel);
return rtf_Style[n.str()].reference();
}
-const char * RTFGenerator::rtf_DList_DepthStyle()
+QCString RTFGenerator::rtf_DList_DepthStyle()
{
QCString n=makeIndexName("DescContinue",m_listLevel);
return rtf_Style[n.str()].reference();
}
-const char * RTFGenerator::rtf_Code_DepthStyle()
+QCString RTFGenerator::rtf_Code_DepthStyle()
{
QCString n=makeIndexName("CodeExample",m_listLevel);
return rtf_Style[n.str()].reference();
@@ -2177,7 +2182,7 @@ void RTFGenerator::newParagraph()
m_omitParagraph = FALSE;
}
-void RTFGenerator::startParagraph(const char *txt)
+void RTFGenerator::startParagraph(const QCString &txt)
{
DBG_RTF(m_t << "{\\comment startParagraph}\n")
newParagraph();
@@ -2349,24 +2354,24 @@ bool isLeadBytes(int c)
// note: function is not reentrant!
-static void encodeForOutput(TextStream &t,const char *s)
+static void encodeForOutput(TextStream &t,const QCString &s)
{
if (s==0) return;
QCString encoding;
bool converted=FALSE;
- int l = qstrlen(s);
+ int l = (int)s.length();
static std::vector<char> enc;
if (l*4>(int)enc.size()) enc.resize(l*4); // worst case
- encoding.sprintf("CP%s",theTranslator->trRTFansicp().data());
+ encoding.sprintf("CP%s",qPrint(theTranslator->trRTFansicp()));
if (!encoding.isEmpty())
{
// convert from UTF-8 back to the output encoding
- void *cd = portable_iconv_open(encoding,"UTF-8");
+ void *cd = portable_iconv_open(encoding.data(),"UTF-8");
if (cd!=(void *)(-1))
{
size_t iLeft=l;
size_t oLeft=enc.size();
- char *inputPtr = (char*)s;
+ char *inputPtr = (char*)s.data();
char *outputPtr = &enc[0];
if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
{
@@ -2378,7 +2383,7 @@ static void encodeForOutput(TextStream &t,const char *s)
}
if (!converted) // if we did not convert anything, copy as is.
{
- memcpy(enc.data(),s,l);
+ memcpy(enc.data(),s.data(),l);
enc.resize(l);
}
uint i;
@@ -2581,12 +2586,12 @@ void RTFGenerator::endDirDepGraph(DotDirDeps &g)
/** Tests the integrity of the result by counting brackets.
*
*/
-void testRTFOutput(const char *name)
+void testRTFOutput(const QCString &name)
{
int bcount=0;
int line=1;
int c;
- std::ifstream f(name,std::ifstream::in);
+ std::ifstream f(name.data(),std::ifstream::in);
if (f.is_open())
{
while ((c=f.get())!=-1)
@@ -2619,20 +2624,20 @@ void testRTFOutput(const char *name)
err:
err("RTF integrity test failed at line %d of %s due to a bracket mismatch.\n"
" Please try to create a small code example that produces this error \n"
- " and send that to doxygen@gmail.com.\n",line,name);
+ " and send that to doxygen@gmail.com.\n",line,qPrint(name));
}
/**
* This is an API to a VERY brittle RTF preprocessor that combines nested
* RTF files. This version replaces the infile with the new file
*/
-bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
+bool RTFGenerator::preProcessFileInplace(const QCString &path,const QCString &name)
{
- Dir d(path);
+ Dir d(path.str());
// store the original directory
if (!d.exists())
{
- err("Output dir %s does not exist!\n",path);
+ err("Output dir %s does not exist!\n",qPrint(path));
return FALSE;
}
std::string oldDir = Dir::currentDirPath();
@@ -2641,8 +2646,8 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
Dir::setCurrent(d.absPath());
Dir thisDir;
- QCString combinedName = (QCString)path+"/combined.rtf";
- QCString mainRTFName = (QCString)path+"/"+name;
+ QCString combinedName = path+"/combined.rtf";
+ QCString mainRTFName = path+"/"+name;
std::ofstream f(combinedName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
@@ -2741,7 +2746,7 @@ void RTFGenerator::endExamples()
m_t << "}";
}
-void RTFGenerator::startParamList(ParamListTypes,const char *title)
+void RTFGenerator::startParamList(ParamListTypes,const QCString &title)
{
DBG_RTF(m_t << "{\\comment (startParamList)}\n")
m_t << "{"; // ends at endParamList
@@ -2765,10 +2770,10 @@ void RTFGenerator::endParamList()
m_t << "}";
}
-void RTFGenerator::startParameterType(bool first,const char *key)
+void RTFGenerator::startParameterType(bool first,const QCString &key)
{
DBG_RTF(m_t << "{\\comment (startParameterType)}\n")
- if (!first && key)
+ if (!first && !key.isEmpty())
{
m_t << " " << key << " ";
}
@@ -2780,13 +2785,17 @@ void RTFGenerator::endParameterType()
m_t << " ";
}
-void RTFGenerator::exceptionEntry(const char* prefix,bool closeBracket)
+void RTFGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
{
DBG_RTF(m_t << "{\\comment (exceptionEntry)}\n")
- if (prefix)
- m_t << " " << prefix << "(";
+ if (!prefix.isEmpty())
+ {
+ m_t << " " << prefix << "(";
+ }
else if (closeBracket)
- m_t << ")";
+ {
+ m_t << ")";
+ }
m_t << " ";
}
@@ -2853,7 +2862,7 @@ void RTFGenerator::postProcess(QByteArray &a)
}
#endif
-void RTFGenerator::startConstraintList(const char *header)
+void RTFGenerator::startConstraintList(const QCString &header)
{
DBG_RTF(m_t << "{\\comment (startConstraintList)}\n")
m_t << "{"; // ends at endConstraintList
@@ -3024,7 +3033,7 @@ void RTFGenerator::endInlineMemberDoc()
m_t << "\\cell }{\\row }\n";
}
-void RTFGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
+void RTFGenerator::writeLineNumber(const QCString &ref,const QCString &fileName,const QCString &anchor,int l)
{
bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
@@ -3033,7 +3042,7 @@ void RTFGenerator::writeLineNumber(const char *ref,const char *fileName,const ch
lineNumber.sprintf("%05d",l);
if (m_prettyCode)
{
- if (fileName && !m_sourceFileName.isEmpty() && rtfHyperlinks)
+ if (!fileName.isEmpty() && !m_sourceFileName.isEmpty() && rtfHyperlinks)
{
QCString lineAnchor;
lineAnchor.sprintf("_l%05d",l);
@@ -3068,7 +3077,7 @@ void RTFGenerator::startLabels()
{
}
-void RTFGenerator::writeLabel(const char *l,bool isLast)
+void RTFGenerator::writeLabel(const QCString &l,bool isLast)
{
m_t << "{\\f2 [" << l << "]}";
if (!isLast) m_t << ", ";
@@ -3078,7 +3087,7 @@ void RTFGenerator::endLabels()
{
}
-void RTFGenerator::startFontClass(const char *name)
+void RTFGenerator::startFontClass(const QCString &name)
{
int cod = 2;
QCString qname(name);
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 344121c..c9a069e 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -41,28 +41,28 @@ class RTFGenerator : public OutputGenerator
void writeDoc(DocNode *,const Definition *,const MemberDef *,int);
- void startFile(const char *name,const char *manName,const char *title,int id);
+ void startFile(const QCString &name,const QCString &manName,const QCString &title,int id);
void writeSearchInfo() {}
- void writeFooter(const char *) {}
+ void writeFooter(const QCString &) {}
void endFile();
void clearBuffer();
//void postProcess(QByteArray &);
void startIndexSection(IndexSections);
void endIndexSection(IndexSections);
- void writePageLink(const char *,bool);
+ void writePageLink(const QCString &,bool);
void startProjectNumber();
void endProjectNumber();
void writeStyleInfo(int part);
- void startTitleHead(const char *);
+ void startTitleHead(const QCString &);
void startTitle();
- void endTitleHead(const char *,const char *name);
+ void endTitleHead(const QCString &,const QCString &name);
void endTitle() {}
void newParagraph();
- void startParagraph(const char *classDef);
+ void startParagraph(const QCString &classDef);
void endParagraph();
- void writeString(const char *text);
+ void writeString(const QCString &text);
void startIndexListItem();
void endIndexListItem();
void startIndexList();
@@ -70,24 +70,24 @@ class RTFGenerator : public OutputGenerator
void startIndexKey();
void endIndexKey();
void startIndexValue(bool);
- void endIndexValue(const char *,bool);
+ void endIndexValue(const QCString &,bool);
void startItemList();
void endItemList();
- void startIndexItem(const char *ref,const char *file);
- void endIndexItem(const char *ref,const char *file);
- void docify(const char *text);
- void codify(const char *text);
- void writeObjectLink(const char *ref,const char *file,
- const char *anchor,const char *name);
- void writeCodeLink(const char *ref, const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+ void startIndexItem(const QCString &ref,const QCString &file);
+ void endIndexItem(const QCString &ref,const QCString &file);
+ void docify(const QCString &text);
+ void codify(const QCString &text);
+ void writeObjectLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name);
+ void writeCodeLink(const QCString &ref, const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip);
+ void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
) {}
- void startTextLink(const char *f,const char *anchor);
+ void startTextLink(const QCString &f,const QCString &anchor);
void endTextLink();
- void startHtmlLink(const char *url);
+ void startHtmlLink(const QCString &url);
void endHtmlLink();
void startTypewriter() { m_t << "{\\f2 "; }
void endTypewriter() { m_t << "}"; }
@@ -101,7 +101,7 @@ class RTFGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection() {}
- void startMemberHeader(const char *,int) { startGroupHeader(FALSE); }
+ void startMemberHeader(const QCString &,int) { startGroupHeader(FALSE); }
void endMemberHeader() { endGroupHeader(FALSE); }
void startMemberSubtitle();
void endMemberSubtitle();
@@ -113,10 +113,10 @@ class RTFGenerator : public OutputGenerator
void endInlineHeader();
void startAnonTypeScope(int) {}
void endAnonTypeScope(int) {}
- void startMemberItem(const char *,int,const char *);
+ void startMemberItem(const QCString &,int,const QCString &);
void endMemberItem();
void startMemberTemplateParams() {}
- void endMemberTemplateParams(const char *,const char *) {}
+ void endMemberTemplateParams(const QCString &,const QCString &) {}
void startCompoundTemplateParams() { startSubsubsection(); }
void endCompoundTemplateParams() { endSubsubsection(); }
void insertMemberAlign(bool) {}
@@ -124,10 +124,10 @@ class RTFGenerator : public OutputGenerator
void writeRuler() { rtfwriteRuler_thin(); }
- void writeAnchor(const char *fileName,const char *name);
- void startCodeFragment(const char *style);
- void endCodeFragment(const char *style);
- void writeLineNumber(const char *,const char *,const char *,int l);
+ void writeAnchor(const QCString &fileName,const QCString &name);
+ void startCodeFragment(const QCString &style);
+ void endCodeFragment(const QCString &style);
+ void writeLineNumber(const QCString &,const QCString &,const QCString &,int l);
void startCodeLine(bool);
void endCodeLine();
void startEmphasis() { m_t << "{\\i "; }
@@ -138,16 +138,16 @@ class RTFGenerator : public OutputGenerator
void endDescription();
void startDescItem();
void endDescItem();
- void lineBreak(const char *style=0);
- void startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool);
+ void lineBreak(const QCString &style=QCString());
+ void startMemberDoc(const QCString &,const QCString &,const QCString &,const QCString &,int,int,bool);
void endMemberDoc(bool);
- void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *);
- void endDoxyAnchor(const char *,const char *);
+ void startDoxyAnchor(const QCString &,const QCString &,const QCString &,const QCString &,const QCString &);
+ void endDoxyAnchor(const QCString &,const QCString &);
void writeChar(char c);
void writeLatexSpacing() {};//{ m_t << "\\hspace{0.3cm}"; }
- void writeStartAnnoItem(const char *type,const char *file,
- const char *path,const char *name);
- void writeEndAnnoItem(const char *name);
+ void writeStartAnnoItem(const QCString &type,const QCString &file,
+ const QCString &path,const QCString &name);
+ void writeEndAnnoItem(const QCString &name);
void startSubsection();
void endSubsection();
void startSubsubsection();
@@ -157,42 +157,42 @@ class RTFGenerator : public OutputGenerator
void startSmall() { m_t << "{\\sub "; }
void endSmall() { m_t << "}"; }
- void startMemberDescription(const char *,const char *,bool);
+ void startMemberDescription(const QCString &,const QCString &,bool);
void endMemberDescription();
void startMemberDeclaration() {}
- void endMemberDeclaration(const char *,const char *) {}
- void writeInheritedSectionTitle(const char *,const char *,const char *,
- const char *,const char *,const char *) {}
+ void endMemberDeclaration(const QCString &,const QCString &) {}
+ void writeInheritedSectionTitle(const QCString &,const QCString &,const QCString &,
+ const QCString &,const QCString &,const QCString &) {}
void startDescList(SectionTypes);
void startExamples();
void endExamples();
- void startParamList(ParamListTypes,const char *);
+ void startParamList(ParamListTypes,const QCString &);
void endParamList();
//void writeDescItem();
void startDescForItem();
void endDescForItem();
- void startSection(const char *,const char *,SectionType);
- void endSection(const char *,SectionType);
- void addIndexItem(const char *,const char *);
+ void startSection(const QCString &,const QCString &,SectionType);
+ void endSection(const QCString &,SectionType);
+ void addIndexItem(const QCString &,const QCString &);
void startIndent();
void endIndent();
void writeSynopsis() {}
void startClassDiagram();
- void endClassDiagram(const ClassDiagram &,const char *filename,const char *name);
+ void endClassDiagram(const ClassDiagram &,const QCString &filename,const QCString &name);
void startPageRef();
- void endPageRef(const char *,const char *);
+ void endPageRef(const QCString &,const QCString &);
void startQuickIndices() {}
void endQuickIndices() {}
- void writeSplitBar(const char *) {}
- void writeNavigationPath(const char *) {}
+ void writeSplitBar(const QCString &) {}
+ void writeNavigationPath(const QCString &) {}
void writeLogo() {}
- void writeQuickLinks(bool,HighlightedItem,const char *) {}
- void writeSummaryLink(const char *,const char *,const char *,bool) {}
+ void writeQuickLinks(bool,HighlightedItem,const QCString &) {}
+ void writeSummaryLink(const QCString &,const QCString &,const QCString &,bool) {}
void startContents() {}
void endContents() {}
void writeNonBreakableSpace(int);
- void startDescTable(const char *title);
+ void startDescTable(const QCString &title);
void endDescTable();
void startDescTableRow();
void endDescTableRow();
@@ -228,15 +228,15 @@ class RTFGenerator : public OutputGenerator
void endMemberDocPrefixItem() {}
void startMemberDocName(bool) {}
void endMemberDocName() {}
- void startParameterType(bool,const char *);
+ void startParameterType(bool,const QCString &);
void endParameterType();
void startParameterName(bool) {}
void endParameterName(bool,bool,bool) {}
void startParameterList(bool) {}
void endParameterList() {}
- void exceptionEntry(const char*,bool);
+ void exceptionEntry(const QCString &,bool);
- void startConstraintList(const char *);
+ void startConstraintList(const QCString &);
void startConstraintParam();
void endConstraintParam();
void startConstraintType();
@@ -255,25 +255,25 @@ class RTFGenerator : public OutputGenerator
void endInlineMemberDoc();
void startLabels();
- void writeLabel(const char *l,bool isLast);
+ void writeLabel(const QCString &l,bool isLast);
void endLabels();
- void startFontClass(const char *);
+ void startFontClass(const QCString &);
void endFontClass();
- void writeCodeAnchor(const char *) {}
- void setCurrentDoc(const Definition *,const char *,bool) {}
- void addWord(const char *,bool) {}
+ void writeCodeAnchor(const QCString &) {}
+ void setCurrentDoc(const Definition *,const QCString &,bool) {}
+ void addWord(const QCString &,bool) {}
- static bool preProcessFileInplace(const char *path,const char *name);
+ static bool preProcessFileInplace(const QCString &path,const QCString &name);
private:
- const char *rtf_BList_DepthStyle();
- const char *rtf_CList_DepthStyle();
- const char *rtf_EList_DepthStyle();
- const char *rtf_LCList_DepthStyle();
- const char *rtf_DList_DepthStyle();
- const char *rtf_Code_DepthStyle();
+ QCString rtf_BList_DepthStyle();
+ QCString rtf_CList_DepthStyle();
+ QCString rtf_EList_DepthStyle();
+ QCString rtf_LCList_DepthStyle();
+ QCString rtf_DList_DepthStyle();
+ QCString rtf_Code_DepthStyle();
void incrementIndentLevel();
void decrementIndentLevel();
void beginRTFDocument();
@@ -283,7 +283,7 @@ class RTFGenerator : public OutputGenerator
void rtfwriteRuler_emboss();
void rtfwriteRuler_thick();
void rtfwriteRuler_thin();
- void writeRTFReference(const char *label);
+ void writeRTFReference(const QCString &label);
QCString m_sourceFileName;
int m_col = 0;
diff --git a/src/rtfstyle.cpp b/src/rtfstyle.cpp
index d279eab..07bc3dd 100644
--- a/src/rtfstyle.cpp
+++ b/src/rtfstyle.cpp
@@ -272,15 +272,15 @@ bool StyleData::setStyle(const std::string &command, const std::string &styleNam
}
-void loadStylesheet(const char *name, StyleDataMap& map)
+void loadStylesheet(const QCString &name, StyleDataMap& map)
{
- std::ifstream file(name);
+ std::ifstream file(name.str());
if (!file.is_open())
{
- err("Can't open RTF style sheet file %s. Using defaults.",name);
+ err("Can't open RTF style sheet file %s. Using defaults.",qPrint(name));
return;
}
- msg("Loading RTF style sheet %s...\n",name);
+ msg("Loading RTF style sheet %s...\n",qPrint(name));
uint lineNr=1;
@@ -314,15 +314,15 @@ void loadStylesheet(const char *name, StyleDataMap& map)
StyleDataMap rtf_Style;
-void loadExtensions(const char *name)
+void loadExtensions(const QCString &name)
{
- std::ifstream file(name);
+ std::ifstream file(name.str());
if (!file.is_open())
{
- err("Can't open RTF extensions file %s. Using defaults.",name);
+ err("Can't open RTF extensions file %s. Using defaults.",qPrint(name));
return;
}
- msg("Loading RTF extensions %s...\n",name);
+ msg("Loading RTF extensions %s...\n",qPrint(name));
uint lineNr=1;
diff --git a/src/rtfstyle.h b/src/rtfstyle.h
index 903f34f..8f7e3f3 100644
--- a/src/rtfstyle.h
+++ b/src/rtfstyle.h
@@ -80,7 +80,7 @@ using StyleDataMap = std::map<std::string,StyleData>;
extern StyleDataMap rtf_Style;
-void loadExtensions(const char *name);
-void loadStylesheet(const char *name, StyleDataMap& map);
+void loadExtensions(const QCString &name);
+void loadStylesheet(const QCString &name, StyleDataMap& map);
#endif
diff --git a/src/scanner.h b/src/scanner.h
index cefc934..57b54e6 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -31,12 +31,12 @@ class COutlineParser : public OutlineParserInterface
public:
COutlineParser();
virtual ~COutlineParser();
- void parseInput(const char *fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &extension) const;
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
private:
struct Private;
std::unique_ptr<Private> p;
diff --git a/src/scanner.l b/src/scanner.l
index a37ff09..f03304a 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -696,7 +696,7 @@ NONLopt [^\n]*
}
<CliPropertyType>"{" {
yyextra->curlyCount=0;
- //printf("event: '%s' '%s'\n",yyextra->current->type.data(),yyextra->current->name.data());
+ //printf("event: '%s' '%s'\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name));
BEGIN( CSAccessorDecl );
}
<CliPropertyType>";" {
@@ -882,14 +882,14 @@ NONLopt [^\n]*
yyextra->current->argList.setNoParameters(TRUE);
}
yyextra->current->args = argListToString(yyextra->current->argList);
- //printf("argList=%s\n",yyextra->current->args.data());
+ //printf("argList=%s\n",qPrint(yyextra->current->args));
unput(';');
BEGIN( Function );
}
<ObjCMethod,ObjCParams>(";"{BN}+)?"{" { // start of a method body
lineCount(yyscanner);
//printf("Type=%s Name=%s args=%s\n",
- // yyextra->current->type.data(),yyextra->current->name.data(),argListToString(yyextra->current->argList).data()
+ // qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(argListToString(yyextra->current->argList))
// );
if (!yyextra->current->argList.empty() && yyextra->current->argList.back().type.isEmpty())
{
@@ -1683,10 +1683,10 @@ NONLopt [^\n]*
BEGIN( NSAliasArg );
}
<NSAliasArg>({ID}"::")*{ID} {
- //printf("Inserting namespace alias %s::%s->%s\n",yyextra->current_root->name.data(),yyextra->aliasName.data(),yytext);
+ //printf("Inserting namespace alias %s::%s->%s\n",qPrint(yyextra->current_root->name),qPrint(yyextra->aliasName),yytext);
// TODO: namespace aliases are now treated as global entities
// while they should be aware of the scope they are in
- Doxygen::namespaceAliasMap.insert({yyextra->aliasName.data(),std::string(yytext)});
+ Doxygen::namespaceAliasMap.insert({yyextra->aliasName.str(),std::string(yytext)});
}
<NSAliasArg>";" {
BEGIN( FindMembers );
@@ -1699,7 +1699,7 @@ NONLopt [^\n]*
<PHPUse>({ID}{BN}*"\\"{BN}*)*{ID} {
lineCount(yyscanner);
yyextra->current->name=removeRedundantWhiteSpace(substitute(yytext,"\\","::"));
- //printf("PHP: adding use relation: %s\n",yyextra->current->name.data());
+ //printf("PHP: adding use relation: %s\n",qPrint(yyextra->current->name));
yyextra->current->fileName = yyextra->yyFileName;
// add a using declaration
yyextra->current->section=Entry::USINGDECL_SEC;
@@ -1716,12 +1716,12 @@ NONLopt [^\n]*
<PHPUseAs>{PHPUSEKW} {
}
<PHPUseAs>{ID} {
- //printf("PHP: adding use as relation: %s->%s\n",yytext,yyextra->aliasName.data());
+ //printf("PHP: adding use as relation: %s->%s\n",yytext,qPrint(yyextra->aliasName));
if (!yyextra->aliasName.isEmpty())
{
Doxygen::namespaceAliasMap.insert({yytext,
std::string(removeRedundantWhiteSpace(
- substitute(yyextra->aliasName,"\\","::")).data())});
+ substitute(yyextra->aliasName,"\\","::")).str())});
}
yyextra->aliasName.resize(0);
}
@@ -1756,7 +1756,7 @@ NONLopt [^\n]*
}
else
{
- //printf("import name = %s -> %s\n",yytext,yyextra->current->name.data());
+ //printf("import name = %s -> %s\n",yytext,qPrint(yyextra->current->name));
yyextra->current->section=Entry::USINGDECL_SEC;
}
yyextra->previous = yyextra->current;
@@ -1929,7 +1929,7 @@ NONLopt [^\n]*
// *yyextra->currentTemplateSpec+='>';
if (yyextra->roundCount==0 && --yyextra->sharpCount<=0)
{
- //printf("Found %s\n",yyextra->current->name.data());
+ //printf("Found %s\n",qPrint(yyextra->current->name));
BEGIN(FindMembers);
}
}
@@ -1944,9 +1944,9 @@ NONLopt [^\n]*
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->current->args = "(";
yyextra->currentArgumentContext = FuncQual;
- yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->fullArgString = yyextra->current->args;
yyextra->copyArgString = &yyextra->current->args;
- //printf("Found %s\n",yyextra->current->name.data());
+ //printf("Found %s\n",qPrint(yyextra->current->name));
BEGIN( ReadFuncArgType ) ;
}
else if (yyextra->sharpCount<=0)
@@ -2452,7 +2452,7 @@ NONLopt [^\n]*
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->currentArgumentContext = DefineEnd;
- yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->fullArgString=yyextra->current->args;
yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
@@ -2478,7 +2478,7 @@ NONLopt [^\n]*
BEGIN(DefineEnd);
}
<DefineEnd>\n {
- //printf("End define: doc=%s docFile=%s docLine=%d\n",yyextra->current->doc.data(),yyextra->current->docFile.data(),yyextra->current->docLine);
+ //printf("End define: doc=%s docFile=%s docLine=%d\n",qPrint(yyextra->current->doc),qPrint(yyextra->current->docFile),yyextra->current->docLine);
yyextra->current->fileName = yyextra->yyFileName;
yyextra->current->startLine = yyextra->yyLineNr;
yyextra->current->startColumn = yyextra->yyColNr;
@@ -2753,7 +2753,7 @@ NONLopt [^\n]*
BEGIN(GCopyCurly);
}
<ReadInitializer,ReadInitializerPtr>[;,] {
- //printf(">> initializer '%s' <<\n",yyextra->current->initializer.data());
+ //printf(">> initializer '%s' <<\n",qPrint(yyextra->current->initializer));
if (*yytext==';' && (yyextra->current_root->spec&Entry::Enum))
{
yyextra->current->fileName = yyextra->yyFileName;
@@ -2798,7 +2798,7 @@ NONLopt [^\n]*
yyextra->lastRawStringContext = YY_START;
yyextra->pCopyRawGString = &yyextra->current->initializer;
BEGIN(RawGString);
- //printf("RawGString delimiter='%s'\n",delimiter.data());
+ //printf("RawGString delimiter='%s'\n",qPrint(delimiter));
}
}
<RawGString>{RAWEND} {
@@ -3583,7 +3583,7 @@ NONLopt [^\n]*
yyextra->idlProp = yytext;
}
<IDLProp>{BN}*{ID}{BN}*"," { // Rare: Another parameter ([propput] HRESULT Item(int index, [in] Type theRealProperty);)
- if (!yyextra->current->args)
+ if (yyextra->current->args.isEmpty())
yyextra->current->args = "(";
else
yyextra->current->args += ", ";
@@ -3604,7 +3604,7 @@ NONLopt [^\n]*
yyextra->current->fileName = yyextra->yyFileName;
yyextra->current->type = yyextra->idlProp;
yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
- if (yyextra->current->args)
+ if (!yyextra->current->args.isEmpty())
yyextra->current->args += ")";
yyextra->current->name = yyextra->current->name.stripWhiteSpace();
yyextra->current->section = Entry::VARIABLE_SEC;
@@ -3708,8 +3708,8 @@ NONLopt [^\n]*
<SkipRemainder>[^\n]*
<FindFields>"," {
//printf("adding '%s' '%s' '%s' to enum '%s' (mGrpId=%d)\n",
- // yyextra->current->type.data(), yyextra->current->name.data(),
- // yyextra->current->args.data(), yyextra->current_root->name.data(),yyextra->current->mGrpId);
+ // qPrint(yyextra->current->type), qPrint(yyextra->current->name),
+ // qPrint(yyextra->current->args), qPrint(yyextra->current_root->name),yyextra->current->mGrpId);
if (!yyextra->current->name.isEmpty())
{
yyextra->current->fileName = yyextra->yyFileName;
@@ -3730,7 +3730,7 @@ NONLopt [^\n]*
{
// add to the scope surrounding the enum (copy!)
// we cannot during it directly as that would invalidate the iterator in parseCompounds.
- //printf("*** adding outer scope entry for %s\n",yyextra->current->name.data());
+ //printf("*** adding outer scope entry for %s\n",qPrint(yyextra->current->name));
yyextra->outerScopeEntries.emplace_back(yyextra->current_root->parent(), std::make_shared<Entry>(*yyextra->current));
}
yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
@@ -3867,8 +3867,8 @@ NONLopt [^\n]*
yyextra->current->briefFile = briefFile;
}
QCString &cn = yyextra->current->name;
- QCString rn = yyextra->current_root->name.copy();
- //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",cn.data(),rn.data(),yyextra->isTypedef);
+ QCString rn = yyextra->current_root->name;
+ //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",qPrint(cn),qPrint(rn),yyextra->isTypedef);
if (!cn.isEmpty() && !rn.isEmpty())
{
prependScope(yyscanner);
@@ -3889,7 +3889,7 @@ NONLopt [^\n]*
// was: yyextra->current->args.simplifyWhiteSpace();
yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
yyextra->current->name = yyextra->current->name.stripWhiteSpace();
- //printf("adding '%s' '%s' '%s' brief=%s yyextra->insideObjC=%d %x\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data(),yyextra->current->brief.data(),yyextra->insideObjC,yyextra->current->section);
+ //printf("adding '%s' '%s' '%s' brief=%s yyextra->insideObjC=%d %x\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args),qPrint(yyextra->current->brief),yyextra->insideObjC,yyextra->current->section);
if (yyextra->insideObjC &&
((yyextra->current->spec&Entry::Interface) || (yyextra->current->spec==Entry::Category))
) // method definition follows
@@ -3941,7 +3941,7 @@ NONLopt [^\n]*
yyextra->isTypedef = TRUE;
yyextra->current->endBodyLine = yyextra->yyLineNr;
QCString &cn = yyextra->current->name;
- QCString rn = yyextra->current_root->name.copy();
+ QCString rn = yyextra->current_root->name;
if (!cn.isEmpty() && !rn.isEmpty())
{
prependScope(yyscanner);
@@ -3962,7 +3962,7 @@ NONLopt [^\n]*
prependScope(yyscanner);
yyextra->current->args = yyextra->current->args.simplifyWhiteSpace();
yyextra->current->type = yyextra->current->type.simplifyWhiteSpace();
- //printf("Adding compound %s %s %s\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ //printf("Adding compound %s %s %s\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args));
if (!yyextra->firstTypedefEntry)
{
yyextra->firstTypedefEntry = yyextra->current;
@@ -4041,13 +4041,13 @@ NONLopt [^\n]*
// only look for class scopes, not namespace scopes
if ((p->section & Entry::COMPOUND_MASK) && !p->name.isEmpty())
{
- //printf("Trying scope '%s'\n",p->name.data());
+ //printf("Trying scope '%s'\n",qPrint(p->name));
int i=p->name.findRev("::");
int pi = (i==-1) ? 0 : i+2;
if (p->name.at(pi)=='@')
{
// anonymous compound yyextra->inside -> insert dummy variable name
- //printf("Adding anonymous variable for scope %s\n",p->name.data());
+ //printf("Adding anonymous variable for scope %s\n",qPrint(p->name));
yyextra->msName.sprintf("@%d",anonCount++);
break;
}
@@ -4056,7 +4056,7 @@ NONLopt [^\n]*
if (p==yyextra->current.get()) p=yyextra->current_root.get(); else p=p->parent();
}
}
- //printf("yyextra->msName=%s yyextra->current->name=%s\n",yyextra->msName.data(),yyextra->current->name.data());
+ //printf("yyextra->msName=%s yyextra->current->name=%s\n",qPrint(yyextra->msName),qPrint(yyextra->current->name));
if (!yyextra->msName.isEmpty()
/*&& yyextra->msName!=yyextra->current->name*/) // skip typedef T {} T;, removed due to bug608493
{
@@ -4087,7 +4087,7 @@ NONLopt [^\n]*
if (yyextra->isTypedef)
{
varEntry->type.prepend("typedef ");
- // //printf("yyextra->current->name = %s %s\n",yyextra->current->name.data(),yyextra->msName.data());
+ // //printf("yyextra->current->name = %s %s\n",qPrint(yyextra->current->name),qPrint(yyextra->msName));
}
if (typedefHidesStruct &&
yyextra->isTypedef &&
@@ -4104,16 +4104,16 @@ NONLopt [^\n]*
varEntry->fileName = yyextra->yyFileName;
varEntry->startLine = yyextra->yyLineNr;
varEntry->startColumn = yyextra->yyColNr;
- varEntry->doc = yyextra->current->doc.copy();
- varEntry->brief = yyextra->current->brief.copy();
+ varEntry->doc = yyextra->current->doc;
+ varEntry->brief = yyextra->current->brief;
varEntry->mGrpId = yyextra->current->mGrpId;
varEntry->initializer.str(yyextra->current->initializer.str());
varEntry->groups = yyextra->current->groups;
varEntry->sli = yyextra->current->sli;
//printf("Add: type='%s',name='%s',args='%s' brief=%s doc=%s\n",
- // varEntry->type.data(),varEntry->name.data(),
- // varEntry->args.data(),varEntry->brief.data(),varEntry->doc.data());
+ // qPrint(varEntry->type),qPrint(varEntry->name),
+ // qPrint(varEntry->args),qPrint(varEntry->brief),qPrint(varEntry->doc));
yyextra->current_root->moveToSubEntryAndKeep(varEntry);
}
}
@@ -4233,7 +4233,7 @@ NONLopt [^\n]*
}
<EndFuncPtr>")"{BNopt}/";" { // a variable with extra braces
lineCount(yyscanner);
- yyextra->current->type+=yyextra->funcPtrType.data()+1;
+ yyextra->current->type+=yyextra->funcPtrType.mid(1);
BEGIN(FindMembers);
}
<EndFuncPtr>")"{BNopt}/"(" { // a function pointer
@@ -4243,7 +4243,7 @@ NONLopt [^\n]*
}
<EndFuncPtr>")"{BNopt}/"[" { // an array of variables
lineCount(yyscanner);
- yyextra->current->type+=yyextra->funcPtrType.data();
+ yyextra->current->type+=yyextra->funcPtrType;
yyextra->current->args += ")";
BEGIN(FindMembers);
}
@@ -4255,7 +4255,7 @@ NONLopt [^\n]*
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->currentArgumentContext = FuncFuncEnd;
- yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->fullArgString=yyextra->current->args;
yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
@@ -4285,7 +4285,7 @@ NONLopt [^\n]*
}
<FuncFuncEnd>")"{BNopt}/[;{] {
lineCount(yyscanner);
- yyextra->current->type+=yyextra->funcPtrType.data()+1;
+ yyextra->current->type+=yyextra->funcPtrType.mid(1);
BEGIN(Function);
}
<FuncFuncEnd>")"{BNopt}/"[" { // function returning a pointer to an array
@@ -4327,7 +4327,7 @@ NONLopt [^\n]*
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->currentArgumentContext = FuncQual;
- yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->fullArgString=yyextra->current->args;
yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
//printf(">>> Read function arguments!\n");
@@ -4348,7 +4348,7 @@ NONLopt [^\n]*
yyextra->current->bodyLine = yyextra->yyLineNr;
yyextra->current->bodyColumn = yyextra->yyColNr;
yyextra->currentArgumentContext = FuncQual;
- yyextra->fullArgString=yyextra->current->args.copy();
+ yyextra->fullArgString=yyextra->current->args;
yyextra->copyArgString=&yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
//printf(">>> Read function arguments yyextra->current->argList.size()=%d\n",yyextra->current->argList.size());
@@ -4564,7 +4564,7 @@ NONLopt [^\n]*
<ReadTempArgs>">" {
*yyextra->copyArgString+=*yytext;
yyextra->fullArgString+=*yytext;
- //printf("end template list '%s'\n",yyextra->copyArgString->data());
+ //printf("end template list '%s'\n",qPrint(*yyextra->copyArgString));
*yyextra->currentArgumentList = *stringToArgumentList(yyextra->language, yyextra->fullArgString);
BEGIN( yyextra->currentArgumentContext );
}
@@ -4798,7 +4798,7 @@ NONLopt [^\n]*
{
warn(yyextra->yyFileName,yyextra->yyLineNr,
"Found ')' without opening '(' for trailing return type '%s)...'",
- yyextra->current->argList.trailingReturnType().data());
+ qPrint(yyextra->current->argList.trailingReturnType()));
}
yyextra->current->argList.setTrailingReturnType(yyextra->current->argList.trailingReturnType()+yytext);
yyextra->current->args+=yytext;
@@ -4925,12 +4925,12 @@ NONLopt [^\n]*
QCString doc,brief;
if (yyextra->current->doc!=yyextra->docBackup)
{
- doc=yyextra->current->doc.copy();
+ doc=yyextra->current->doc;
yyextra->current->doc=yyextra->docBackup;
}
if (yyextra->current->brief!=yyextra->briefBackup)
{
- brief=yyextra->current->brief.copy();
+ brief=yyextra->current->brief;
yyextra->current->brief=yyextra->briefBackup;
}
addKnRArgInfo(yyscanner,yyextra->oldStyleArgType+oldStyleArgPtr,
@@ -5037,7 +5037,7 @@ NONLopt [^\n]*
(!isFunction || yyextra->current->type.left(8)=="typedef "));
//printf("type=%s ts=%d te=%d ti=%d isFunction=%d\n",
- // yyextra->current->type.data(),ts,te,ti,isFunction);
+ // qPrint(yyextra->current->type),ts,te,ti,isFunction);
if (*yytext!=';' || (yyextra->current_root->section&Entry::COMPOUND_MASK) )
{
@@ -5046,7 +5046,7 @@ NONLopt [^\n]*
if (tempArg==-1) tempName=yyextra->current->name; else tempName=yyextra->current->name.left(tempArg);
if (isVariable)
{
- //printf("Scanner.l: found in class variable: '%s' '%s' '%s'\n", yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ //printf("Scanner.l: found in class variable: '%s' '%s' '%s'\n", qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args));
if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
{
yyextra->current->type.prepend("typedef ");
@@ -5055,14 +5055,14 @@ NONLopt [^\n]*
}
else
{
- //printf("Scanner.l: found in class function: '%s' '%s' '%s'\n", yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ //printf("Scanner.l: found in class function: '%s' '%s' '%s'\n", qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args));
yyextra->current->section = Entry::FUNCTION_SEC ;
yyextra->current->proto = *yytext==';';
}
}
else // a global function prototype or function variable
{
- //printf("Scanner.l: prototype? type='%s' name='%s' args='%s'\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
+ //printf("Scanner.l: prototype? type='%s' name='%s' args='%s'\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(yyextra->current->args));
if (isVariable)
{
if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
@@ -5079,7 +5079,7 @@ NONLopt [^\n]*
yyextra->current->proto = TRUE;
}
}
- //printf("Adding entry '%s'\n",yyextra->current->name.data());
+ //printf("Adding entry '%s'\n",qPrint(yyextra->current->name));
if ( yyextra->insidePHP)
{
if (findAndRemoveWord(yyextra->current->type,"final"))
@@ -5280,7 +5280,7 @@ NONLopt [^\n]*
}
<SkipCurly,SkipCurlyCpp>{B}*{RAWBEGIN} {
QCString raw=QCString(yytext).stripWhiteSpace();
- yyextra->delimiter = raw.data()+2;
+ yyextra->delimiter = raw.mid(2);
yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
yyextra->lastRawStringContext = YY_START;
yyextra->dummyRawString.resize(0);
@@ -5481,9 +5481,9 @@ NONLopt [^\n]*
// a purpose of its own
yyextra->current->name = yytext;
yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-1).stripWhiteSpace();
- //printf("template class declaration for %s!\n",yyextra->current->name.data());
- QCString rn = yyextra->current_root->name.copy();
- //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",cn.data(),rn.data(),yyextra->isTypedef);
+ //printf("template class declaration for %s!\n",qPrint(yyextra->current->name));
+ QCString rn = yyextra->current_root->name;
+ //printf("cn='%s' rn='%s' yyextra->isTypedef=%d\n",qPrint(cn),qPrint(rn),yyextra->isTypedef);
if (!yyextra->current->name.isEmpty() && !rn.isEmpty())
{
prependScope(yyscanner);
@@ -6725,7 +6725,7 @@ NONLopt [^\n]*
warn(yyextra->yyFileName,yyextra->yyLineNr,
"reached end of file while inside a '%s' block!\n"
"The command that should end the block seems to be missing!\n",
- yyextra->docBlockName.data());
+ qPrint(yyextra->docBlockName));
yyterminate();
}
@@ -6738,7 +6738,7 @@ NONLopt [^\n]*
<Prototype>"(" {
yyextra->current->args+=*yytext;
yyextra->currentArgumentContext = PrototypeQual;
- yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->fullArgString = yyextra->current->args;
yyextra->copyArgString = &yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
@@ -6760,7 +6760,7 @@ NONLopt [^\n]*
<PrototypePtr>"(" {
yyextra->current->args+=*yytext;
yyextra->currentArgumentContext = PrototypeQual;
- yyextra->fullArgString = yyextra->current->args.copy();
+ yyextra->fullArgString = yyextra->current->args;
yyextra->copyArgString = &yyextra->current->args;
BEGIN( ReadFuncArgType ) ;
}
@@ -7048,7 +7048,7 @@ static void setContext(yyscan_t yyscanner)
yyextra->language==SrcLangExt_Lex);
//printf("setContext(%s) yyextra->insideIDL=%d yyextra->insideJava=%d yyextra->insideCS=%d "
// "yyextra->insideD=%d yyextra->insidePHP=%d yyextra->insideObjC=%d\n",
- // yyextra->yyFileName.data(),yyextra->insideIDL,yyextra->insideJava,yyextra->insideCS,yyextra->insideD,yyextra->insidePHP,yyextra->insideObjC
+ // qPrint(yyextra->yyFileName),yyextra->insideIDL,yyextra->insideJava,yyextra->insideCS,yyextra->insideD,yyextra->insidePHP,yyextra->insideObjC
// );
}
@@ -7059,7 +7059,7 @@ static void prependScope(yyscan_t yyscanner)
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (yyextra->current_root->section & Entry::SCOPE_MASK)
{
- //printf("--- prependScope %s to %s\n",yyextra->current_root->name.data(),yyextra->current->name.data());
+ //printf("--- prependScope %s to %s\n",qPrint(yyextra->current_root->name),qPrint(yyextra->current->name));
yyextra->current->name.prepend(yyextra->current_root->name+"::");
//printf("prependScope #=%d #yyextra->current=%d\n",yyextra->current_root->tArgLists->count(),yyextra->current->tArgLists->count());
for (const ArgumentList &srcAl : yyextra->current_root->tArgLists)
@@ -7150,7 +7150,7 @@ static void splitKnRArg(yyscan_t yyscanner,QCString &oldStyleArgPtr,QCString &ol
}
else
{
- oldStyleArgName=yyextra->current->args.copy().stripWhiteSpace();
+ oldStyleArgName=yyextra->current->args.stripWhiteSpace();
}
}
}
@@ -7166,7 +7166,7 @@ static void splitKnRArg(yyscan_t yyscanner,QCString &oldStyleArgPtr,QCString &ol
}
else
{
- oldStyleArgName=yyextra->current->args.copy().stripWhiteSpace();
+ oldStyleArgName=yyextra->current->args.stripWhiteSpace();
}
}
}
@@ -7265,7 +7265,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS);
if (yyextra->docBlockInBody && hideInBodyDocs) return;
- //printf("parseCommentBlock [%s] brief=%d\n",doc.data(),brief);
+ //printf("parseCommentBlock [%s] brief=%d\n",qPrint(doc),brief);
int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine; // line of block start
// fill in inbodyFile && inbodyLine the first time, see bug 633891
@@ -7297,7 +7297,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
)
)
{
- //printf("parseCommentBlock position=%d [%s]\n",position,doc.data()+position);
+ //printf("parseCommentBlock position=%d [%s]\n",position,qPrint(doc)+position);
if (needsEntry)
{
QCString docFile = yyextra->current->docFile;
@@ -7324,10 +7324,10 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
//printf(">>>>>>> handleParametersCommentBlocks()\n");
for (Argument &a : al)
{
- //printf(" Param %s docs=%s\n",a->name.data(),a->docs.data());
+ //printf(" Param %s docs=%s\n",qPrint(a->name),qPrint(a->docs));
if (!a.docs.isEmpty())
{
- if (!a.name && a.type == "...") a.name= "...";
+ if (a.name.isEmpty() && a.type == "...") a.name= "...";
int position=0;
bool needsEntry;
@@ -7340,7 +7340,7 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
yyextra->current->doc.resize(0);
yyextra->current->brief.resize(0);
- //printf("handleParametersCommentBlock [%s]\n",doc.data());
+ //printf("handleParametersCommentBlock [%s]\n",qPrint(doc));
while (yyextra->commentScanner.parseCommentBlock(
yyextra->thisParser,
yyextra->current.get(),
@@ -7357,7 +7357,7 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
)
)
{
- //printf("handleParametersCommentBlock position=%d [%s]\n",position,doc.data()+position);
+ //printf("handleParametersCommentBlock position=%d [%s]\n",position,qPrint(doc)+position);
if (needsEntry) newEntry(yyscanner);
}
if (needsEntry)
@@ -7381,19 +7381,19 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("parseCompounds(%s)\n",rt->name.data());
+ //printf("parseCompounds(%s)\n",qPrint(rt->name));
for (const auto &ce : rt->children())
{
if (!ce->program.empty())
{
//printf("-- %s ---------\n%s\n---------------\n",
- // ce->name.data(),ce->program.data());
+ // qPrint(ce->name),qPrint(ce->program));
// init scanner state
yyextra->padCount=0;
//depthIf = 0;
yyextra->column=0;
yyextra->programStr = ce->program.str();
- yyextra->inputString = yyextra->programStr;
+ yyextra->inputString = yyextra->programStr.data();
yyextra->inputPosition = 0;
if (ce->section==Entry::ENUM_SEC || (ce->spec&Entry::Enum))
BEGIN( FindFields ) ;
@@ -7463,7 +7463,7 @@ static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
}
yyextra->mtype = Method;
yyextra->virt = Normal;
- //printf("name=%s yyextra->current->stat=%d yyextra->stat=%d\n",ce->name.data(),yyextra->current->stat,yyextra->stat);
+ //printf("name=%s yyextra->current->stat=%d yyextra->stat=%d\n",qPrint(ce->name),yyextra->current->stat,yyextra->stat);
//memberGroupId = DOX_NOGROUP;
//memberGroupRelates.resize(0);
@@ -7493,7 +7493,7 @@ static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
//----------------------------------------------------------------------------
static void parseMain(yyscan_t yyscanner,
- const char *fileName,
+ const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &rt,
ClangTUParser *clangParser)
@@ -7519,7 +7519,7 @@ static void parseMain(yyscan_t yyscanner,
yyextra->clangParser = clangParser;
setContext(yyscanner);
rt->lang = yyextra->language;
- msg("Parsing file %s...\n",yyextra->yyFileName.data());
+ msg("Parsing file %s...\n",qPrint(yyextra->yyFileName));
yyextra->current_root = rt;
initParser(yyscanner);
@@ -7565,7 +7565,7 @@ static void parseMain(yyscan_t yyscanner,
// add additional entries that were created during processing
for (auto &kv: yyextra->outerScopeEntries)
{
- //printf(">>> adding '%s' to scope '%s'\n",kv.second->name.data(),kv.first->name.data());
+ //printf(">>> adding '%s' to scope '%s'\n",qPrint(kv.second->name),qPrint(kv.first->name));
kv.first->moveToSubEntryAndKeep(kv.second);
}
yyextra->outerScopeEntries.clear();
@@ -7577,7 +7577,7 @@ static void parseMain(yyscan_t yyscanner,
static void parsePrototype(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- //printf("**** parsePrototype(%s) begin\n",text.data());
+ //printf("**** parsePrototype(%s) begin\n",qPrint(text));
if (text.isEmpty())
{
warn(yyextra->yyFileName,yyextra->yyLineNr,"Empty prototype found!");
@@ -7599,7 +7599,7 @@ static void parsePrototype(yyscan_t yyscanner,const QCString &text)
orgInputPosition = yyextra->inputPosition;
// set new string
- yyextra->inputString = text;
+ yyextra->inputString = text.data();
yyextra->inputPosition = 0;
yyextra->column = 0;
scannerYYrestart(0, yyscanner);
@@ -7655,19 +7655,19 @@ COutlineParser::~COutlineParser()
scannerYYlex_destroy(p->yyscanner);
}
-void COutlineParser::parseInput(const char *fileName,
- const char *fileBuf,
- const std::shared_ptr<Entry> &root,
- ClangTUParser *clangParser)
+void COutlineParser::parseInput(const QCString &fileName,
+ const char *fileBuf,
+ const std::shared_ptr<Entry> &root,
+ ClangTUParser *clangParser)
{
struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
yyextra->thisParser = this;
- printlex(yy_flex_debug, TRUE, __FILE__, fileName);
+ printlex(yy_flex_debug, TRUE, __FILE__, qPrint(fileName));
::parseMain(p->yyscanner,fileName,fileBuf,root,clangParser);
- printlex(yy_flex_debug, FALSE, __FILE__, fileName);
+ printlex(yy_flex_debug, FALSE, __FILE__, qPrint(fileName));
}
@@ -7681,7 +7681,7 @@ bool COutlineParser::needsPreprocessing(const QCString &extension) const
);
}
-void COutlineParser::parsePrototype(const char *text)
+void COutlineParser::parsePrototype(const QCString &text)
{
::parsePrototype(p->yyscanner,text);
}
diff --git a/src/scopedtypevariant.h b/src/scopedtypevariant.h
index 16de7f6..a1bece7 100644
--- a/src/scopedtypevariant.h
+++ b/src/scopedtypevariant.h
@@ -278,7 +278,7 @@ class CallContext
void clear()
{
m_stvList.clear();
- m_stvList.push_back(Ctx("",""));
+ m_stvList.push_back(Ctx(QCString(),QCString()));
}
const ScopedTypeVariant getScope() const
{
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 2b8df67..cf09e67 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -82,7 +82,7 @@ SearchIndex::SearchIndex() : SearchIndexIntf(Internal)
m_index.resize(numIndexEntries);
}
-void SearchIndex::setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile)
+void SearchIndex::setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile)
{
if (ctx==0) return;
assert(!isSourceFile || ctx->definitionType()==Definition::TypeFile);
@@ -90,7 +90,7 @@ void SearchIndex::setCurrentDoc(const Definition *ctx,const char *anchor,bool is
QCString url=isSourceFile ? (toFileDef(ctx))->getSourceFileBase() : ctx->getOutputFileBase();
url+=Config_getString(HTML_FILE_EXTENSION);
QCString baseUrl = url;
- if (anchor) url+=QCString("#")+anchor;
+ if (!anchor.isEmpty()) url+=QCString("#")+anchor;
if (!isSourceFile) baseUrl=url;
QCString name=ctx->qualifiedName();
if (ctx->definitionType()==Definition::TypeMember)
@@ -148,7 +148,7 @@ void SearchIndex::setCurrentDoc(const Definition *ctx,const char *anchor,bool is
case Definition::TypeGroup:
{
const GroupDef *gd = toGroupDef(ctx);
- if (gd->groupTitle())
+ if (!gd->groupTitle().isEmpty())
{
name = theTranslator->trGroup(TRUE,TRUE)+" "+gd->groupTitle();
}
@@ -176,9 +176,9 @@ void SearchIndex::setCurrentDoc(const Definition *ctx,const char *anchor,bool is
}
}
-static int charsToIndex(const char *word)
+static int charsToIndex(const QCString &word)
{
- if (word==0) return -1;
+ if (word.length()<2) return -1;
// Fast string hashing algorithm
//register ushort h=0;
@@ -191,18 +191,16 @@ static int charsToIndex(const char *word)
//return h;
// Simple hashing that allows for substring searching
- uint c1=((uchar *)word)[0];
- if (c1==0) return -1;
- uint c2=((uchar *)word)[1];
- if (c2==0) return -1;
+ uint c1=(uchar)word[0];
+ uint c2=(uchar)word[1];
return c1*256+c2;
}
-void SearchIndex::addWord(const char *word,bool hiPriority,bool recurse)
+void SearchIndex::addWord(const QCString &word,bool hiPriority,bool recurse)
{
- if (word==0 || word[0]=='\0') return;
+ if (word.isEmpty()) return;
QCString wStr = QCString(word).lower();
- //printf("SearchIndex::addWord(%s,%d) wStr=%s\n",word,hiPriority,wStr.data());
+ //printf("SearchIndex::addWord(%s,%d) wStr=%s\n",word,hiPriority,qPrint(wStr));
int idx=charsToIndex(wStr);
if (idx<0 || idx>=static_cast<int>(m_index.size())) return;
auto it = m_words.find(wStr.str());
@@ -220,7 +218,7 @@ void SearchIndex::addWord(const char *word,bool hiPriority,bool recurse)
i=getPrefixIndex(word);
if (i>0)
{
- addWord(word+i,hiPriority,TRUE);
+ addWord(word.data()+i,hiPriority,TRUE);
found=TRUE;
}
}
@@ -235,12 +233,12 @@ void SearchIndex::addWord(const char *word,bool hiPriority,bool recurse)
}
if (word[i]!=0 && i>=1)
{
- addWord(word+i+1,hiPriority,TRUE);
+ addWord(word.data()+i+1,hiPriority,TRUE);
}
}
}
-void SearchIndex::addWord(const char *word,bool hiPriority)
+void SearchIndex::addWord(const QCString &word,bool hiPriority)
{
addWord(word,hiPriority,FALSE);
}
@@ -253,14 +251,14 @@ static void writeInt(std::ostream &f,size_t index)
f.put(static_cast<int>(index&0xff));
}
-static void writeString(std::ostream &f,const char *s)
+static void writeString(std::ostream &f,const QCString &s)
{
- const char *p = s;
- while (*p) f.put(*p++);
+ uint l = s.length();
+ for (uint i=0;i<l;i++) f.put(s[i]);
f.put(0);
}
-void SearchIndex::write(const char *fileName)
+void SearchIndex::write(const QCString &fileName)
{
size_t i;
size_t size=4; // for the header
@@ -333,7 +331,7 @@ void SearchIndex::write(const char *fileName)
}
//printf("Total size %x bytes (word=%x stats=%x urls=%x)\n",size,wordsOffset,statsOffset,urlsOffset);
- std::ofstream f(fileName,std::ofstream::out | std::ofstream::binary);
+ std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (f.is_open())
{
// write header
@@ -470,12 +468,12 @@ static QCString definitionToName(const Definition *ctx)
return "unknown";
}
-void SearchIndexExternal::setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile)
+void SearchIndexExternal::setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile)
{
static QCString extId = stripPath(Config_getString(EXTERNAL_SEARCH_ID));
QCString baseName = isSourceFile ? (toFileDef(ctx))->getSourceFileBase() : ctx->getOutputFileBase();
QCString url = baseName + Doxygen::htmlFileExtension;
- if (anchor) url+=QCString("#")+anchor;
+ if (!anchor.isEmpty()) url+=QCString("#")+anchor;
QCString key = extId+";"+url;
auto it = p->docEntries.find(key.str());
@@ -491,23 +489,23 @@ void SearchIndexExternal::setCurrentDoc(const Definition *ctx,const char *anchor
e.extId = extId;
e.url = url;
it = p->docEntries.insert({key.str(),e}).first;
- //printf("searchIndexExt %s : %s\n",e->name.data(),e->url.data());
+ //printf("searchIndexExt %s : %s\n",qPrint(e->name),qPrint(e->url));
}
p->current = &it->second;
}
-void SearchIndexExternal::addWord(const char *word,bool hiPriority)
+void SearchIndexExternal::addWord(const QCString &word,bool hiPriority)
{
- if (word==0 || !isId(*word) || p->current==0) return;
+ if (word.isEmpty() || !isId(word[0]) || p->current==0) return;
GrowBuf *pText = hiPriority ? &p->current->importantText : &p->current->normalText;
if (pText->getPos()>0) pText->addChar(' ');
pText->addStr(word);
//printf("addWord %s\n",word);
}
-void SearchIndexExternal::write(const char *fileName)
+void SearchIndexExternal::write(const QCString &fileName)
{
- std::ofstream t(fileName,std::ofstream::out | std::ofstream::binary);
+ std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (t.is_open())
{
t << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
@@ -537,7 +535,7 @@ void SearchIndexExternal::write(const char *fileName)
}
else
{
- err("Failed to open file %s for writing!\n",fileName);
+ err("Failed to open file %s for writing!\n",qPrint(fileName));
}
}
@@ -852,7 +850,7 @@ void createJavaScriptSearchIndex()
{
if (gd->isLinkable())
{
- std::string title = gd->groupTitle();
+ std::string title = gd->groupTitle().str();
if (!title.empty()) // TODO: able searching for all word in the title
{
std::string letter = convertUTF8ToLower(getUTF8CharAt(title,0));
@@ -1130,7 +1128,7 @@ void writeJavaScriptSearchIndex()
}
else
{
- err("Failed to open file '%s' for writing...\n",fileName.data());
+ err("Failed to open file '%s' for writing...\n",qPrint(fileName));
}
p++;
}
@@ -1221,7 +1219,7 @@ void writeJavaScriptSearchIndex()
void SearchIndexInfo::add(const std::string &letter,const Definition *def)
{
- //printf("%p: %s->%s (full=%s)\n",this,letter.data(),searchName(def).data(),def->name().data());
+ //printf("%p: %s->%s (full=%s)\n",this,qPrint(letter),qPrint(searchName(def)),qPrint(def->name()));
auto it = symbolMap.find(letter);
if (it!=symbolMap.end())
{
diff --git a/src/searchindex.h b/src/searchindex.h
index 0da7828..893440e 100644
--- a/src/searchindex.h
+++ b/src/searchindex.h
@@ -70,9 +70,9 @@ class SearchIndexIntf
enum Kind { Internal, External };
SearchIndexIntf(Kind k) : m_kind(k) {}
virtual ~SearchIndexIntf() {}
- virtual void setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile) = 0;
- virtual void addWord(const char *word,bool hiPriority) = 0;
- virtual void write(const char *file) = 0;
+ virtual void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) = 0;
+ virtual void addWord(const QCString &word,bool hiPriority) = 0;
+ virtual void write(const QCString &file) = 0;
Kind kind() const { return m_kind; }
private:
Kind m_kind;
@@ -82,11 +82,11 @@ class SearchIndex : public SearchIndexIntf
{
public:
SearchIndex();
- void setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile) override;
- void addWord(const char *word,bool hiPriority) override;
- void write(const char *file) override;
+ void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) override;
+ void addWord(const QCString &word,bool hiPriority) override;
+ void write(const QCString &file) override;
private:
- void addWord(const char *word,bool hiPrio,bool recurse);
+ void addWord(const QCString &word,bool hiPrio,bool recurse);
std::unordered_map<std::string,int> m_words;
std::vector< std::vector< IndexWord> > m_index;
std::unordered_map<std::string,int> m_url2IdMap;
@@ -100,9 +100,9 @@ class SearchIndexExternal : public SearchIndexIntf
struct Private;
public:
SearchIndexExternal();
- void setCurrentDoc(const Definition *ctx,const char *anchor,bool isSourceFile);
- void addWord(const char *word,bool hiPriority);
- void write(const char *file);
+ void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile);
+ void addWord(const QCString &word,bool hiPriority);
+ void write(const QCString &file);
private:
std::unique_ptr<Private> p;
};
diff --git a/src/section.h b/src/section.h
index 562f54a..e5bbfc5 100644
--- a/src/section.h
+++ b/src/section.h
@@ -49,8 +49,8 @@ inline constexpr bool isSection(SectionType type)
class SectionInfo
{
public:
- SectionInfo(const char *label, const char *fileName, int lineNr,
- const char *title, SectionType type, int level,const char *ref) :
+ SectionInfo(const QCString &label, const QCString &fileName, int lineNr,
+ const QCString &title, SectionType type, int level,const QCString &ref) :
m_label(label), m_title(title), m_type(type), m_ref(ref),
m_lineNr(lineNr), m_fileName(fileName), m_level(level)
{
@@ -73,10 +73,10 @@ class SectionInfo
Definition *definition() const { return m_definition; }
// setters
- void setFileName(const char *fn) { m_fileName = fn; }
- void setType(SectionType t) { m_type = t; }
- void setGenerated(bool b) { m_generated = b; }
- void setDefinition(Definition *d) { m_definition = d; }
+ void setFileName(const QCString &fn) { m_fileName = fn; }
+ void setType(SectionType t) { m_type = t; }
+ void setGenerated(bool b) { m_generated = b; }
+ void setDefinition(Definition *d) { m_definition = d; }
private:
QCString m_label;
@@ -99,9 +99,9 @@ class SectionRefs
//! Returns a constant pointer to the section info given a section label or nullptr
//! if no section with the given label can be found.
- const SectionInfo *find(const char *label) const
+ const SectionInfo *find(const QCString &label) const
{
- auto it = m_lookup.find(label);
+ auto it = m_lookup.find(label.str());
return it!=m_lookup.end() ? it->second : nullptr;
}
@@ -130,15 +130,16 @@ class SectionManager : public LinkedMap<SectionInfo>
//! Returns a non-owning pointer to the newly added section.
SectionInfo *add(const SectionInfo &si)
{
- return LinkedMap<SectionInfo>::add(si.label(),si.fileName(),si.lineNr(),si.title(),si.type(),si.level(),si.ref());
+ return LinkedMap<SectionInfo>::add(si.label(),si.fileName(),
+ si.lineNr(),si.title(),si.type(),si.level(),si.ref());
}
//! Add a new section
//! Return a non-owning pointer to the newly added section
- SectionInfo *add(const char *label, const char *fileName, int lineNr,
- const char *title, SectionType type, int level,const char *ref=0)
+ SectionInfo *add(const QCString &label, const QCString &fileName, int lineNr,
+ const QCString &title, SectionType type, int level,const QCString &ref=QCString())
{
- return LinkedMap<SectionInfo>::add(label,fileName,lineNr,title,type,level,ref);
+ return LinkedMap<SectionInfo>::add(label.data(),fileName,lineNr,title,type,level,ref);
}
//! returns a reference to the singleton
diff --git a/src/sqlcode.h b/src/sqlcode.h
index aa465d7..64d7d06 100644
--- a/src/sqlcode.h
+++ b/src/sqlcode.h
@@ -33,11 +33,11 @@ class SQLCodeParser : public CodeParserInterface
SQLCodeParser();
virtual ~SQLCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/sqlcode.l b/src/sqlcode.l
index b3a71d9..ffa8eaa 100644
--- a/src/sqlcode.l
+++ b/src/sqlcode.l
@@ -231,7 +231,7 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->currentDefinition = d;
yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
- yyextra->classScope = d->name().copy();
+ yyextra->classScope = d->name();
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
if (yyextra->currentMemberDef)
@@ -245,13 +245,13 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
@@ -396,11 +396,11 @@ void SQLCodeParser::resetCodeParserState()
}
void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName,
+ const QCString &exampleName,
FileDef *fileDef,
int startLine,
int endLine,
@@ -416,10 +416,10 @@ void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (input.isEmpty()) return;
- printlex(yy_flex_debug, true, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, true, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = false;
@@ -444,7 +444,7 @@ void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (isExampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exampleName?exampleName:"generated"));
+ yyextra->sourceFileDef = createFileDef(QCString(),!exampleName.isEmpty() ? exampleName : QCString("generated"));
cleanupSourceDef = true;
}
@@ -472,7 +472,7 @@ void SQLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
yyextra->sourceFileDef=0;
}
- printlex(yy_flex_debug, false, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, false, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
//---------------------------------------------------------------------------------
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp
index 855f703..7824fca 100644
--- a/src/sqlite3gen.cpp
+++ b/src/sqlite3gen.cpp
@@ -829,22 +829,22 @@ class TextGeneratorSqlite3Impl : public TextGeneratorIntf
{
public:
TextGeneratorSqlite3Impl(StringVector &l) : m_list(l) { }
- void writeString(const char * /*s*/,bool /*keepSpaces*/) const
+ void writeString(const QCString & /*s*/,bool /*keepSpaces*/) const
{
}
void writeBreak(int) const
{
DBG_CTX(("writeBreak\n"));
}
- void writeLink(const char * /*extRef*/,const char *file,
- const char *anchor,const char * /*text*/
+ void writeLink(const QCString & /*extRef*/,const QCString &file,
+ const QCString &anchor,const QCString & /*text*/
) const
{
- std::string rs = file;
- if (anchor)
+ std::string rs = file.str();
+ if (!anchor.isEmpty())
{
rs+="_1";
- rs+=anchor;
+ rs+=anchor.str();
}
m_list.push_back(rs);
}
@@ -854,14 +854,14 @@ class TextGeneratorSqlite3Impl : public TextGeneratorIntf
};
-static bool bindTextParameter(SqlStmt &s,const char *name,const char *value, bool _static=FALSE)
+static bool bindTextParameter(SqlStmt &s,const char *name,const QCString &value, bool _static=FALSE)
{
int idx = sqlite3_bind_parameter_index(s.stmt, name);
if (idx==0) {
err("sqlite3_bind_parameter_index(%s)[%s] failed: %s\n", name, s.query, sqlite3_errmsg(s.db));
return false;
}
- int rv = sqlite3_bind_text(s.stmt, idx, value, -1, _static==TRUE?SQLITE_STATIC:SQLITE_TRANSIENT);
+ int rv = sqlite3_bind_text(s.stmt, idx, value.data(), -1, _static==TRUE?SQLITE_STATIC:SQLITE_TRANSIENT);
if (rv!=SQLITE_OK) {
err("sqlite3_bind_text(%s)[%s] failed: %s\n", name, s.query, sqlite3_errmsg(s.db));
return false;
@@ -936,17 +936,17 @@ static void recordMetadata()
struct Refid {
int rowid;
- const char *refid;
+ QCString refid;
bool created;
};
-struct Refid insertRefid(const char *refid)
+struct Refid insertRefid(const QCString &refid)
{
- struct Refid ret;
+ Refid ret;
ret.rowid=-1;
ret.refid=refid;
ret.created = FALSE;
- if (refid==0) return ret;
+ if (refid.isEmpty()) return ret;
bindTextParameter(refid_select,":refid",refid);
ret.rowid=step(refid_select,TRUE,TRUE);
@@ -1407,14 +1407,15 @@ QCString getSQLDocBlock(const Definition *scope,
);
XMLCodeGenerator codeGen(t);
// create a parse tree visitor for XML
- XmlDocVisitor *visitor = new XmlDocVisitor(t,codeGen,scope?scope->getDefFileExtension():QCString(""));
+ XmlDocVisitor *visitor = new XmlDocVisitor(t,codeGen,
+ scope ? scope->getDefFileExtension() : QCString(""));
root->accept(visitor);
delete visitor;
delete root;
return convertCharEntitiesToUTF8(t.str().c_str());
}
-static void getSQLDesc(SqlStmt &s,const char *col,const char *value,const Definition *def)
+static void getSQLDesc(SqlStmt &s,const char *col,const QCString &value,const Definition *def)
{
bindTextParameter(
s,
@@ -1657,7 +1658,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
bindIntParameter(memberdef_insert,":maybevoid",md->isMaybeVoid());
bindIntParameter(memberdef_insert,":maybedefault",md->isMaybeDefault());
bindIntParameter(memberdef_insert,":maybeambiguous",md->isMaybeAmbiguous());
- if (md->bitfieldString())
+ if (!md->bitfieldString().isEmpty())
{
QCString bitfield = md->bitfieldString();
if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
@@ -1722,17 +1723,17 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
stripQualifiers(typeStr);
StringVector list;
linkifyText(TextGeneratorSqlite3Impl(list), def, md->getBodyDef(),md,typeStr);
- if (typeStr)
+ if (!typeStr.isEmpty())
{
bindTextParameter(memberdef_insert,":type",typeStr);
}
- if (md->definition())
+ if (!md->definition().isEmpty())
{
bindTextParameter(memberdef_insert,":definition",md->definition());
}
- if (md->argsString())
+ if (!md->argsString().isEmpty())
{
bindTextParameter(memberdef_insert,":argsstring",md->argsString());
}
@@ -1752,9 +1753,9 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
if (md->getBodyDef())
{
DBG_CTX(("initializer:%s %s %s %d\n",
- md->anchor().data(),
+ qPrint(md->anchor()),
s.c_str(),
- md->getBodyDef()->getDefFileName().data(),
+ qPrint(md->getBodyDef()->getDefFileName()),
md->getStartBodyLine()));
QCString qsrc_refid = md->getOutputFileBase() + "_1" + md->anchor();
struct Refid src_refid = insertRefid(qsrc_refid);
@@ -1764,7 +1765,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
}
}
- if ( md->getScopeString() )
+ if ( !md->getScopeString().isEmpty() )
{
bindTextParameter(memberdef_insert,":scope",md->getScopeString());
}
@@ -1809,7 +1810,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref
insertMemberFunctionParams(memberdef_id,md,def);
}
else if (md->memberType()==MemberType_Define &&
- md->argsString())
+ !md->argsString().isEmpty())
{
insertMemberDefineParams(memberdef_id,md,def);
}
@@ -1832,8 +1833,8 @@ static void generateSqlite3Section( const Definition *d,
const MemberList *ml,
struct Refid scope_refid,
const char * /*kind*/,
- const char * /*header*/=0,
- const char * /*documentation*/=0)
+ const QCString & /*header*/=QCString(),
+ const QCString & /*documentation*/=QCString())
{
if (ml==0) return;
for (const auto &md : *ml)
@@ -1940,10 +1941,10 @@ static void generateSqlite3ForClass(const ClassDef *cd)
{
insertPath(ii->fileDef->absFilePath(),!ii->fileDef->isReference());
}
- DBG_CTX(("-----> ClassDef includeInfo for %s\n", nm.data()));
+ DBG_CTX(("-----> ClassDef includeInfo for %s\n", qPrint(nm)));
DBG_CTX((" local : %d\n", ii->local));
DBG_CTX((" imported : %d\n", ii->imported));
- DBG_CTX(("header: %s\n", ii->fileDef->absFilePath().data()));
+ DBG_CTX(("header: %s\n", qPrint(ii->fileDef->absFilePath())));
DBG_CTX((" file_id : %d\n", file_id));
DBG_CTX((" header_id: %d\n", header_id));
@@ -2137,7 +2138,7 @@ static void generateSqlite3ForFile(const FileDef *fd)
{
// strip tagfile from path
QCString tagfile = ii.fileDef->getReference();
- dst_path = ii.fileDef->absFilePath().copy();
+ dst_path = ii.fileDef->absFilePath();
dst_path.stripPrefix(tagfile+":");
}
else
@@ -2151,12 +2152,12 @@ static void generateSqlite3ForFile(const FileDef *fd)
dst_id = insertPath(ii.includeName,ii.local,FALSE);
}
- DBG_CTX(("-----> FileDef includeInfo for %s\n", ii.includeName.data()));
+ DBG_CTX(("-----> FileDef includeInfo for %s\n", qPrint(ii.includeName)));
DBG_CTX((" local: %d\n", ii.local));
DBG_CTX((" imported: %d\n", ii.imported));
if(ii.fileDef)
{
- DBG_CTX(("include: %s\n", ii.fileDef->absFilePath().data()));
+ DBG_CTX(("include: %s\n", qPrint(ii.fileDef->absFilePath())));
}
DBG_CTX((" src_id : %d\n", src_id));
DBG_CTX((" dst_id: %d\n", dst_id));
@@ -2185,7 +2186,7 @@ static void generateSqlite3ForFile(const FileDef *fd)
{
// strip tagfile from path
QCString tagfile = ii.fileDef->getReference();
- src_path = ii.fileDef->absFilePath().copy();
+ src_path = ii.fileDef->absFilePath();
src_path.stripPrefix(tagfile+":");
}
else
@@ -2379,7 +2380,7 @@ static void generateSqlite3ForPage(const PageDef *pd,bool isExample)
{
if (mainPageHasTitle())
{
- title = filterTitle(convertCharEntitiesToUTF8(Doxygen::mainPage->title()).str());
+ title = filterTitle(convertCharEntitiesToUTF8(Doxygen::mainPage->title()));
}
else
{
@@ -2393,8 +2394,10 @@ static void generateSqlite3ForPage(const PageDef *pd,bool isExample)
{
title = si->title();
}
-
- if(!title){title = pd->title();}
+ if (title.isEmpty())
+ {
+ title = pd->title();
+ }
}
// + title
@@ -2503,21 +2506,21 @@ void generateSqlite3()
// + classes
for (const auto &cd : *Doxygen::classLinkedMap)
{
- msg("Generating Sqlite3 output for class %s\n",cd->name().data());
+ msg("Generating Sqlite3 output for class %s\n",qPrint(cd->name()));
generateSqlite3ForClass(cd.get());
}
// + concepts
for (const auto &cd : *Doxygen::conceptLinkedMap)
{
- msg("Generating Sqlite3 output for concept %s\n",cd->name().data());
+ msg("Generating Sqlite3 output for concept %s\n",qPrint(cd->name()));
generateSqlite3ForConcept(cd.get());
}
// + namespaces
for (const auto &nd : *Doxygen::namespaceLinkedMap)
{
- msg("Generating Sqlite3 output for namespace %s\n",nd->name().data());
+ msg("Generating Sqlite3 output for namespace %s\n",qPrint(nd->name()));
generateSqlite3ForNamespace(nd.get());
}
@@ -2526,7 +2529,7 @@ void generateSqlite3()
{
for (const auto &fd : *fn)
{
- msg("Generating Sqlite3 output for file %s\n",fd->name().data());
+ msg("Generating Sqlite3 output for file %s\n",qPrint(fd->name()));
generateSqlite3ForFile(fd.get());
}
}
@@ -2534,28 +2537,28 @@ void generateSqlite3()
// + groups
for (const auto &gd : *Doxygen::groupLinkedMap)
{
- msg("Generating Sqlite3 output for group %s\n",gd->name().data());
+ msg("Generating Sqlite3 output for group %s\n",qPrint(gd->name()));
generateSqlite3ForGroup(gd.get());
}
// + page
for (const auto &pd : *Doxygen::pageLinkedMap)
{
- msg("Generating Sqlite3 output for page %s\n",pd->name().data());
+ msg("Generating Sqlite3 output for page %s\n",qPrint(pd->name()));
generateSqlite3ForPage(pd.get(),FALSE);
}
// + dirs
for (const auto &dd : *Doxygen::dirLinkedMap)
{
- msg("Generating Sqlite3 output for dir %s\n",dd->name().data());
+ msg("Generating Sqlite3 output for dir %s\n",qPrint(dd->name()));
generateSqlite3ForDir(dd.get());
}
// + examples
for (const auto &pd : *Doxygen::exampleLinkedMap)
{
- msg("Generating Sqlite3 output for example %s\n",pd->name().data());
+ msg("Generating Sqlite3 output for example %s\n",qPrint(pd->name()));
generateSqlite3ForPage(pd.get(),TRUE);
}
diff --git a/src/stlsupport.cpp b/src/stlsupport.cpp
index 096291a..569314a 100644
--- a/src/stlsupport.cpp
+++ b/src/stlsupport.cpp
@@ -149,7 +149,7 @@ static void addSTLMember(const std::shared_ptr<Entry> &root,const char *type,con
root->moveToSubEntryAndKeep(memEntry);
}
-static void addSTLIterator(const std::shared_ptr<Entry> &classEntry,const char *name)
+static void addSTLIterator(const std::shared_ptr<Entry> &classEntry,const QCString &name)
{
std::shared_ptr<Entry> iteratorClassEntry = std::make_shared<Entry>();
iteratorClassEntry->fileName = "[STL]";
diff --git a/src/symbolmap.h b/src/symbolmap.h
index 0f837d4..a277846 100644
--- a/src/symbolmap.h
+++ b/src/symbolmap.h
@@ -36,15 +36,15 @@ class SymbolMap
using const_iterator = typename Map::const_iterator;
//! Add a symbol \a def into the map under key \a name
- void add(const char *name,Ptr def)
+ void add(const QCString &name,Ptr def)
{
- m_map.insert({std::string(name),def});
+ m_map.insert({name.str(),def});
}
//! Remove a symbol \a def from the map that was stored under key \a name
- void remove(const char *name,Ptr def)
+ void remove(const QCString &name,Ptr def)
{
- auto range = find(name);
+ auto range = find(name.str());
for (auto it=range.first; it!=range.second; )
{
if (it->second==def) it = m_map.erase(it); else ++it;
@@ -53,16 +53,16 @@ class SymbolMap
//! Find the list of symbols stored under key \a name
//! Returns a pair of iterators pointing to the start and end of the range of matching symbols
- std::pair<const_iterator,const_iterator> find(const char *name) const
+ std::pair<const_iterator,const_iterator> find(const QCString &name) const
{
- return m_map.equal_range(name ? name : "");
+ return m_map.equal_range(name.str());
}
//! Find the list of symbols stored under key \a name
//! Returns a pair of iterators pointing to the start and end of the range of matching symbols
- std::pair<iterator,iterator> find(const char *name)
+ std::pair<iterator,iterator> find(const QCString &name)
{
- return m_map.equal_range(name ? name : "");
+ return m_map.equal_range(name.str());
}
iterator begin() { return m_map.begin(); }
diff --git a/src/symbolresolver.cpp b/src/symbolresolver.cpp
index dd9e0f7..f509c7d 100644
--- a/src/symbolresolver.cpp
+++ b/src/symbolresolver.cpp
@@ -104,7 +104,7 @@ struct SymbolResolver::Private
const ClassDef *getResolvedClassRec(
const Definition *scope, // in
- const char *n, // in
+ const QCString &n, // in
const MemberDef **pTypeDef, // out
QCString *pTemplSpec, // out
QCString *pResolvedType); // out
@@ -164,14 +164,14 @@ struct SymbolResolver::Private
const ClassDef *SymbolResolver::Private::getResolvedClassRec(
const Definition *scope,
- const char *n,
+ const QCString &n,
const MemberDef **pTypeDef,
QCString *pTemplSpec,
QCString *pResolvedType)
{
- if (n==0 || *n=='\0') return 0;
+ if (n.isEmpty()) return 0;
//static int level=0;
- //fprintf(stderr,"%d [getResolvedClassRec(%s,%s)\n",level++,scope?scope->name().data():"<global>",n);
+ //fprintf(stderr,"%d [getResolvedClassRec(%s,%s)\n",level++,scope?qPrint(scope->name()):"<global>",n);
QCString name;
QCString explicitScopePart;
QCString strippedTemplateParams;
@@ -185,7 +185,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
}
int qualifierIndex = computeQualifiedIndex(name);
- //printf("name=%s qualifierIndex=%d\n",name.data(),qualifierIndex);
+ //printf("name=%s qualifierIndex=%d\n",qPrint(name),qualifierIndex);
if (qualifierIndex!=-1) // qualified name
{
// split off the explicit scope part
@@ -201,7 +201,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
return 0; // empty name
}
- //printf("Looking for symbol %s\n",name.data());
+ //printf("Looking for symbol %s\n",qPrint(name));
auto range = Doxygen::symbolMap.find(name);
// the -g (for C# generics) and -p (for ObjC protocols) are now already
// stripped from the key used in the symbolMap, so that is not needed here.
@@ -236,11 +236,11 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
// QCString key=scope->name()+"+"+name+"+"+explicitScopePart;
QCString key(scopeNameLen+nameLen+explicitPartLen+fileScopeLen+1);
char *pk=key.rawData();
- qstrcpy(pk,scope->name()); *(pk+scopeNameLen-1)='+';
+ qstrcpy(pk,scope->name().data()); *(pk+scopeNameLen-1)='+';
pk+=scopeNameLen;
- qstrcpy(pk,name); *(pk+nameLen-1)='+';
+ qstrcpy(pk,name.data()); *(pk+nameLen-1)='+';
pk+=nameLen;
- qstrcpy(pk,explicitScopePart);
+ qstrcpy(pk,explicitScopePart.data());
pk+=explicitPartLen;
// if a file scope is given and it contains using statements we should
@@ -252,7 +252,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
// below is a more efficient coding of
// key+="+"+m_fileScope->name();
*pk++='+';
- qstrcpy(pk,m_fileScope->absFilePath());
+ qstrcpy(pk,m_fileScope->absFilePath().data());
pk+=fileScopeLen-1;
}
*pk='\0';
@@ -261,17 +261,17 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
{
std::lock_guard<std::mutex> lock(g_cacheMutex);
pval=Doxygen::lookupCache->find(key.str());
- //printf("Searching for %s result=%p\n",key.data(),pval);
+ //printf("Searching for %s result=%p\n",qPrint(key),pval);
if (pval)
{
//printf("LookupInfo %p %p '%s' %p\n",
- // pval->classDef, pval->typeDef, pval->templSpec.data(),
- // pval->resolvedType.data());
+ // pval->classDef, pval->typeDef, qPrint(pval->templSpec),
+ // qPrint(pval->resolvedType));
if (pTemplSpec) *pTemplSpec=pval->templSpec;
if (pTypeDef) *pTypeDef=pval->typeDef;
if (pResolvedType) *pResolvedType=pval->resolvedType;
//fprintf(stderr,"%d ] cachedMatch=%s\n",--level,
- // pval->classDef?pval->classDef->name().data():"<none>");
+ // pval->classDef?qPrint(pval->classDef->name()):"<none>");
//if (pTemplSpec)
// printf("templSpec=%s\n",pTemplSpec->data());
return pval->classDef;
@@ -310,7 +310,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
}
//printf("getResolvedClassRec: bestMatch=%p pval->resolvedType=%s\n",
- // bestMatch,bestResolvedType.data());
+ // bestMatch,qPrint(bestResolvedType));
if (pval)
{
@@ -321,7 +321,7 @@ const ClassDef *SymbolResolver::Private::getResolvedClassRec(
pval->resolvedType = bestResolvedType;
}
//fprintf(stderr,"%d ] bestMatch=%s distance=%d\n",--level,
- // bestMatch?bestMatch->name().data():"<none>",minDistance);
+ // bestMatch?qPrint(bestMatch->name()):"<none>",minDistance);
//if (pTemplSpec)
// printf("templSpec=%s\n",pTemplSpec->data());
return bestMatch;
@@ -339,7 +339,7 @@ void SymbolResolver::Private::getResolvedSymbol(
QCString &bestResolvedType // out
)
{
- //fprintf(stderr,"getResolvedSymbol(%s,%s)\n",scope->name().data(),d->qualifiedName().data());
+ //fprintf(stderr,"getResolvedSymbol(%s,%s)\n",qPrint(scope->name()),qPrint(d->qualifiedName()));
// only look at classes and members that are enums or typedefs
if (d->definitionType()==Definition::TypeClass ||
(d->definitionType()==Definition::TypeMember &&
@@ -352,14 +352,14 @@ void SymbolResolver::Private::getResolvedSymbol(
AccessStack accessStack;
// test accessibility of definition within scope.
int distance = isAccessibleFromWithExpScope(visitedNamespaces,accessStack,scope,d,explicitScopePart);
- //fprintf(stderr," %s; distance %s (%p) is %d\n",scope->name().data(),d->name().data(),d,distance);
+ //fprintf(stderr," %s; distance %s (%p) is %d\n",qPrint(scope->name()),qPrint(d->name()),d,distance);
if (distance!=-1) // definition is accessible
{
// see if we are dealing with a class or a typedef
if (d->definitionType()==Definition::TypeClass) // d is a class
{
const ClassDef *cd = toClassDef(d);
- //printf("cd=%s\n",cd->name().data());
+ //printf("cd=%s\n",qPrint(cd->name()));
if (!cd->isTemplateArgument()) // skip classes that
// are only there to
// represent a template
@@ -425,7 +425,7 @@ void SymbolResolver::Private::getResolvedSymbol(
const ClassDef *cd = newResolveTypedef(scope,md,&enumType,&spec,&type,actTemplParams);
if (cd) // type resolves to a class
{
- //printf(" bestTypeDef=%p spec=%s type=%s\n",md,spec.data(),type.data());
+ //printf(" bestTypeDef=%p spec=%s type=%s\n",md,qPrint(spec),qPrint(type));
bestMatch = cd;
bestTypedef = md;
bestTemplSpec = spec;
@@ -483,7 +483,7 @@ void SymbolResolver::Private::getResolvedSymbol(
//printf(" Not accessible!\n");
}
} // if definition is a class or member
- //printf(" bestMatch=%p bestResolvedType=%s\n",bestMatch,bestResolvedType.data());
+ //printf(" bestMatch=%p bestResolvedType=%s\n",bestMatch,qPrint(bestResolvedType));
}
const ClassDef *SymbolResolver::Private::newResolveTypedef(
@@ -499,9 +499,9 @@ const ClassDef *SymbolResolver::Private::newResolveTypedef(
if (isCached)
{
//printf("Already cached %s->%s [%s]\n",
- // md->name().data(),
- // md->getCachedTypedefVal()?md->getCachedTypedefVal()->name().data():"<none>",
- // md->getCachedResolvedTypedef()?md->getCachedResolvedTypedef().data():"<none>");
+ // qPrint(md->name()),
+ // md->getCachedTypedefVal()?qPrint(md->getCachedTypedefVal()->name()):"<none>",
+ // md->getCachedResolvedTypedef()?qPrint(md->getCachedResolvedTypedef()):"<none>");
if (pTemplSpec) *pTemplSpec = md->getCachedTypedefTemplSpec();
if (pResolvedType) *pResolvedType = md->getCachedResolvedTypedef();
@@ -521,7 +521,7 @@ const ClassDef *SymbolResolver::Private::newResolveTypedef(
if (typeClass && typeClass->isTemplate() &&
actTemplParams && !actTemplParams->empty())
{
- type = substituteTemplateArgumentsInString(type.str(),
+ type = substituteTemplateArgumentsInString(type,
typeClass->templateArguments(),actTemplParams);
}
QCString typedefValue = type;
@@ -552,7 +552,7 @@ const ClassDef *SymbolResolver::Private::newResolveTypedef(
*pMemType = memTypeDef;
}
- //printf("type=%s result=%p\n",type.data(),result);
+ //printf("type=%s result=%p\n",qPrint(type),result);
if (result==0)
{
// try unspecialized version if type is template
@@ -605,7 +605,7 @@ done:
// introduced while parsing code fragments are being cached here.
{
//printf("setting cached typedef %p in result %p\n",md,result);
- //printf("==> %s (%s,%d)\n",result->name().data(),result->getDefFileName().data(),result->getDefLine());
+ //printf("==> %s (%s,%d)\n",qPrint(result->name()),qPrint(result->getDefFileName()),result->getDefLine());
//printf("*pResolvedType=%s\n",pResolvedType?pResolvedType->data():"<none>");
MemberDefMutable *mdm = toMemberDefMutable(md);
if (mdm)
@@ -642,19 +642,19 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
accessStack.push(scope,m_fileScope,item,explicitScopePart);
- //printf(" <isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?scope->name().data():"<global>",
- // item?item->name().data():"<none>",
- // explicitScopePart.data());
+ //printf(" <isAccessibleFromWithExpScope(%s,%s,%s)\n",scope?qPrint(scope->name()):"<global>",
+ // item?qPrint(item->name()):"<none>",
+ // qPrint(explicitScopePart));
int result=0; // assume we found it
const Definition *newScope = followPath(scope,explicitScopePart);
if (newScope) // explicitScope is inside scope => newScope is the result
{
Definition *itemScope = item->getOuterScope();
- //printf(" scope traversal successful %s<->%s!\n",itemScope->name().data(),newScope->name().data());
+ //printf(" scope traversal successful %s<->%s!\n",qPrint(itemScope->name()),qPrint(newScope->name()));
//if (newScope && newScope->definitionType()==Definition::TypeClass)
//{
// ClassDef *cd = (ClassDef *)newScope;
- // printf("---> Class %s: bases=%p\n",cd->name().data(),cd->baseClasses());
+ // printf("---> Class %s: bases=%p\n",qPrint(cd->name()),cd->baseClasses());
//}
if (itemScope==newScope) // exact match of scopes => distance==0
{
@@ -676,7 +676,7 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
result=1;
//printf("scope(%s) is base class of newScope(%s)\n",
- // scope->name().data(),newScope->name().data());
+ // qPrint(scope->name()),qPrint(newScope->name()));
}
else
{
@@ -687,11 +687,11 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
// this part deals with the case where item is a class
// A::B::C but is explicit referenced as A::C, where B is imported
// in A via a using directive.
- //printf("newScope is a namespace: %s!\n",newScope->name().data());
+ //printf("newScope is a namespace: %s!\n",qPrint(newScope->name()));
const NamespaceDef *nscope = toNamespaceDef(newScope);
for (const auto &cd : nscope->getUsedClasses())
{
- //printf("Trying for class %s\n",cd->name().data());
+ //printf("Trying for class %s\n",qPrint(cd->name()));
if (cd==item)
{
goto done;
@@ -701,7 +701,7 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
{
if (visitedNamespaces.find(nd->name().str())==visitedNamespaces.end())
{
- //printf("Trying for namespace %s\n",nd->name().data());
+ //printf("Trying for namespace %s\n",qPrint(nd->name()));
i = isAccessibleFromWithExpScope(visitedNamespaces,accessStack,scope,item,nd->name());
if (i!=-1)
{
@@ -722,7 +722,7 @@ int SymbolResolver::Private::isAccessibleFromWithExpScope(
}
else // failed to resolve explicitScope
{
- //printf(" failed to resolve: scope=%s\n",scope->name().data());
+ //printf(" failed to resolve: scope=%s\n",qPrint(scope->name()));
if (scope->definitionType()==Definition::TypeNamespace)
{
const NamespaceDef *nscope = toNamespaceDef(scope);
@@ -767,28 +767,28 @@ const Definition *SymbolResolver::Private::followPath(const Definition *start,co
int l;
const Definition *current=start;
ps=0;
- //printf("followPath: start='%s' path='%s'\n",start?start->name().data():"<none>",path.data());
+ //printf("followPath: start='%s' path='%s'\n",start?qPrint(start->name()):"<none>",qPrint(path));
// for each part of the explicit scope
while ((is=getScopeFragment(path,ps,&l))!=-1)
{
// try to resolve the part if it is a typedef
const MemberDef *memTypeDef=0;
QCString qualScopePart = substTypedef(current,path.mid(is,l),&memTypeDef);
- //printf(" qualScopePart=%s\n",qualScopePart.data());
+ //printf(" qualScopePart=%s\n",qPrint(qualScopePart));
if (memTypeDef)
{
const ClassDef *type = newResolveTypedef(m_fileScope,memTypeDef,0,0,0);
if (type)
{
- //printf("Found type %s\n",type->name().data());
+ //printf("Found type %s\n",qPrint(type->name()));
return type;
}
}
const Definition *next = current->findInnerCompound(qualScopePart);
//printf("++ Looking for %s inside %s result %s\n",
- // qualScopePart.data(),
- // current->name().data(),
- // next?next->name().data():"<null>");
+ // qPrint(qualScopePart),
+ // qPrint(current->name()),
+ // next?qPrint(next->name()):"<null>");
if (next==0) // failed to follow the path
{
//printf("==> next==0!\n");
@@ -813,7 +813,7 @@ const Definition *SymbolResolver::Private::followPath(const Definition *start,co
ps=is+l;
}
//printf("followPath(start=%s,path=%s) result=%s\n",
- // start->name().data(),path.data(),current?current->name().data():"<null>");
+ // qPrint(start->name()),qPrint(path),current?qPrint(current->name()):"<null>");
return current; // path could be followed
}
@@ -836,7 +836,7 @@ bool SymbolResolver::Private::accessibleViaUsingNamespace(StringUnorderedSet &vi
{
for (const auto &und : nl) // check used namespaces for the class
{
- //printf("[Trying via used namespace %s: count=%d/%d\n",und->name().data(),
+ //printf("[Trying via used namespace %s: count=%d/%d\n",qPrint(und->name()),
// count,nl->count());
const Definition *sc = explicitScopePart.isEmpty() ? und : followPath(und,explicitScopePart);
if (sc && item->getOuterScope()==sc)
@@ -872,7 +872,7 @@ bool SymbolResolver::Private::accessibleViaUsingClass(const LinkedRefMap<const C
{
for (const auto &ucd : cl)
{
- //printf("Trying via used class %s\n",ucd->name().data());
+ //printf("Trying via used class %s\n",qPrint(ucd->name()));
const Definition *sc = explicitScopePart.isEmpty() ? ucd : followPath(ucd,explicitScopePart);
if (sc && sc==item) return true;
//printf("Try via used class done\n");
@@ -885,7 +885,7 @@ int SymbolResolver::Private::isAccessibleFrom(AccessStack &accessStack,
const Definition *item)
{
//printf("<isAccessibleFrom(scope=%s,item=%s itemScope=%s)\n",
- // scope->name().data(),item->name().data(),item->getOuterScope()->name().data());
+ // qPrint(scope->name()),qPrint(item->name()),qPrint(item->getOuterScope()->name()));
if (accessStack.find(scope,m_fileScope,item))
{
@@ -942,7 +942,7 @@ int SymbolResolver::Private::isAccessibleFrom(AccessStack &accessStack,
if (scope->definitionType()==Definition::TypeNamespace)
{
const NamespaceDef *nscope = toNamespaceDef(scope);
- //printf(" %s is namespace with %d used classes\n",nscope->name().data(),nscope->getUsedClasses());
+ //printf(" %s is namespace with %d used classes\n",qPrint(nscope->name()),nscope->getUsedClasses());
if (accessibleViaUsingClass(nscope->getUsedClasses(),item))
{
//printf("> found via used class\n");
@@ -1009,8 +1009,8 @@ QCString SymbolResolver::Private::substTypedef(
if (pTypeDef) *pTypeDef=bestMatch;
}
- //printf("substTypedef(%s,%s)=%s\n",scope?scope->name().data():"<global>",
- // name.data(),result.data());
+ //printf("substTypedef(%s,%s)=%s\n",scope?qPrint(scope->name()):"<global>",
+ // qPrint(name),qPrint(result));
return result;
}
@@ -1028,7 +1028,7 @@ SymbolResolver::~SymbolResolver()
const ClassDef *SymbolResolver::resolveClass(const Definition *scope,
- const char *name,
+ const QCString &name,
bool mayBeUnlinkable,
bool mayBeHidden)
{
@@ -1044,7 +1044,7 @@ const ClassDef *SymbolResolver::resolveClass(const Definition *scope,
scope=Doxygen::globalScope;
}
//fprintf(stderr,"------------ resolveClass(scope=%s,name=%s,mayUnlinkable=%d)\n",
- // scope?scope->name().data():"<global>",
+ // scope?qPrint(scope->name()):"<global>",
// name,
// mayBeUnlinkable
// );
@@ -1067,12 +1067,12 @@ const ClassDef *SymbolResolver::resolveClass(const Definition *scope,
{
if (!mayBeHidden || !result->isHidden())
{
- //printf("result was %s\n",result?result->name().data():"<none>");
+ //printf("result was %s\n",result?qPrint(result->name()):"<none>");
result=0; // don't link to artificial/hidden classes unless explicitly allowed
}
}
- //fprintf(stderr,"ResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
- // name,result?result->name().data():"<none>");
+ //fprintf(stderr,"ResolvedClass(%s,%s)=%s\n",scope?qPrint(scope->name()):"<global>",
+ // name,result?qPrint(result->name()):"<none>");
return result;
}
diff --git a/src/symbolresolver.h b/src/symbolresolver.h
index 6122e82..89c3e6d 100644
--- a/src/symbolresolver.h
+++ b/src/symbolresolver.h
@@ -45,7 +45,7 @@ class SymbolResolver
* getTemplateSpec(), and getResolvedType() are set as well.
*/
const ClassDef *resolveClass(const Definition *scope,
- const char *name,
+ const QCString &name,
bool maybeUnlinkable=false,
bool mayBeHidden=false);
@@ -53,7 +53,7 @@ class SymbolResolver
* the class object or a nullptr if the symbol is immutable.
*/
ClassDefMutable *resolveClassMutable(const Definition *scope,
- const char *name,
+ const QCString &name,
bool mayBeUnlinkable=false,
bool mayBeHidden=false)
{
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index cb9b537..4aa59d8 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -44,32 +44,32 @@
class TagAnchorInfo
{
public:
- TagAnchorInfo(const std::string &f,
- const std::string &l,
- const std::string &t=std::string())
+ TagAnchorInfo(const QCString &f,
+ const QCString &l,
+ const QCString &t=QCString())
: label(l), fileName(f), title(t) {}
- std::string label;
- std::string fileName;
- std::string title;
+ QCString label;
+ QCString fileName;
+ QCString title;
};
/** Container for enum values that are scoped within an enum */
class TagEnumValueInfo
{
public:
- std::string name;
- std::string file;
- std::string anchor;
- std::string clangid;
+ QCString name;
+ QCString file;
+ QCString anchor;
+ QCString clangid;
};
/** Container for include info that can be read from a tagfile */
class TagIncludeInfo
{
public:
- std::string id;
- std::string name;
- std::string text;
+ QCString id;
+ QCString name;
+ QCString text;
bool isLocal;
bool isImported;
};
@@ -78,13 +78,13 @@ class TagIncludeInfo
class TagMemberInfo
{
public:
- std::string type;
- std::string name;
- std::string anchorFile;
- std::string anchor;
- std::string arglist;
- std::string kind;
- std::string clangId;
+ QCString type;
+ QCString name;
+ QCString anchorFile;
+ QCString anchor;
+ QCString arglist;
+ QCString kind;
+ QCString clangId;
std::vector<TagAnchorInfo> docAnchors;
Protection prot = Public;
Specifier virt = Normal;
@@ -101,8 +101,8 @@ class TagCompoundInfo
virtual ~TagCompoundInfo() {}
CompoundType compoundType() const { return m_type; }
std::vector<TagMemberInfo> members;
- std::string name;
- std::string filename;
+ QCString name;
+ QCString filename;
std::vector<TagAnchorInfo> docAnchors;
private:
CompoundType m_type;
@@ -114,8 +114,8 @@ class TagClassInfo : public TagCompoundInfo
public:
enum class Kind { None=-1, Class, Struct, Union, Interface, Exception, Protocol, Category, Enum, Service, Singleton };
TagClassInfo(Kind k) : TagCompoundInfo(CompoundType::Class), kind(k) {}
- std::string clangId;
- std::string anchor;
+ QCString clangId;
+ QCString anchor;
std::vector<BaseInfo> bases;
StringVector templateArguments;
StringVector classList;
@@ -136,7 +136,7 @@ class TagConceptInfo : public TagCompoundInfo
{
public:
TagConceptInfo() :TagCompoundInfo(CompoundType::Concept) {}
- std::string clangId;
+ QCString clangId;
static TagConceptInfo *get(std::unique_ptr<TagCompoundInfo> &t)
{
return dynamic_cast<TagConceptInfo*>(t.get());
@@ -152,7 +152,7 @@ class TagNamespaceInfo : public TagCompoundInfo
{
public:
TagNamespaceInfo() :TagCompoundInfo(CompoundType::Namespace) {}
- std::string clangId;
+ QCString clangId;
StringVector classList;
StringVector conceptList;
StringVector namespaceList;
@@ -187,7 +187,7 @@ class TagFileInfo : public TagCompoundInfo
{
public:
TagFileInfo() : TagCompoundInfo(CompoundType::File) { }
- std::string path;
+ QCString path;
StringVector classList;
StringVector conceptList;
StringVector namespaceList;
@@ -207,7 +207,7 @@ class TagGroupInfo : public TagCompoundInfo
{
public:
TagGroupInfo() : TagCompoundInfo(CompoundType::Group) { }
- std::string title;
+ QCString title;
StringVector subgroupList;
StringVector classList;
StringVector conceptList;
@@ -230,7 +230,7 @@ class TagPageInfo : public TagCompoundInfo
{
public:
TagPageInfo() : TagCompoundInfo(CompoundType::Page) {}
- std::string title;
+ QCString title;
static TagPageInfo *get(std::unique_ptr<TagCompoundInfo> &t)
{
return dynamic_cast<TagPageInfo*>(t.get());
@@ -246,7 +246,7 @@ class TagDirInfo : public TagCompoundInfo
{
public:
TagDirInfo() : TagCompoundInfo(CompoundType::Dir) {}
- std::string path;
+ QCString path;
StringVector subdirList;
StringVector fileList;
static TagDirInfo *get(std::unique_ptr<TagCompoundInfo> &t)
@@ -280,12 +280,12 @@ class TagFileParser
m_state = Invalid;
}
- void startElement( const std::string &name, const XMLHandlers::Attributes& attrib );
- void endElement( const std::string &name );
- void characters ( const std::string & ch ) { m_curString+=ch; }
- void error( const std::string &fileName,int lineNr,const std::string &msg)
+ void startElement( const QCString &name, const XMLHandlers::Attributes& attrib );
+ void endElement( const QCString &name );
+ void characters ( const QCString & ch ) { m_curString+=ch; }
+ void error( const QCString &fileName,int lineNr,const QCString &msg)
{
- ::warn(fileName.c_str(),lineNr,"%s",msg.c_str());
+ ::warn(fileName,lineNr,"%s",qPrint(msg));
}
void dump();
@@ -317,9 +317,9 @@ class TagFileParser
{
m_curMember = TagMemberInfo();
m_curMember.kind = XMLHandlers::value(attrib,"kind");
- std::string protStr = XMLHandlers::value(attrib,"protection");
- std::string virtStr = XMLHandlers::value(attrib,"virtualness");
- std::string staticStr = XMLHandlers::value(attrib,"static");
+ QCString protStr = XMLHandlers::value(attrib,"protection");
+ QCString virtStr = XMLHandlers::value(attrib,"virtualness");
+ QCString staticStr = XMLHandlers::value(attrib,"static");
if (protStr=="protected")
{
m_curMember.prot = Protected;
@@ -383,7 +383,7 @@ class TagFileParser
void endEnumValue()
{
- m_curEnumValue.name = QCString(m_curString).stripWhiteSpace();
+ m_curEnumValue.name = QCString(m_curString).stripWhiteSpace().str();
m_state = m_stateStack.top();
m_stateStack.pop();
if (m_state==InMember)
@@ -407,7 +407,7 @@ class TagFileParser
case InMember:
case InPackage:
case InDir:
- if (m_curString.rfind("autotoc_md",0)==0) return;
+ if (m_curString.right(10)=="autotoc_md") return;
break;
default:
warn("Unexpected tag 'docanchor' found");
@@ -437,19 +437,19 @@ class TagFileParser
switch(m_state)
{
case InClass:
- TagClassInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagClassInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
case InFile:
- TagFileInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagFileInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
case InNamespace:
- TagNamespaceInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagNamespaceInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
case InGroup:
- TagGroupInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
case InPackage:
- TagPackageInfo::get(m_curCompound)->classList.push_back(m_curString);
+ TagPackageInfo::get(m_curCompound)->classList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'class' found");
@@ -462,13 +462,13 @@ class TagFileParser
switch(m_state)
{
case InNamespace:
- TagNamespaceInfo::get(m_curCompound)->conceptList.push_back(m_curString);
+ TagNamespaceInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
break;
case InFile:
- TagFileInfo::get(m_curCompound)->conceptList.push_back(m_curString);
+ TagFileInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
break;
case InGroup:
- TagGroupInfo::get(m_curCompound)->conceptList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->conceptList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'concept' found");
@@ -481,13 +481,13 @@ class TagFileParser
switch(m_state)
{
case InNamespace:
- TagNamespaceInfo::get(m_curCompound)->namespaceList.push_back(m_curString);
+ TagNamespaceInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
break;
case InFile:
- TagFileInfo::get(m_curCompound)->namespaceList.push_back(m_curString);
+ TagFileInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
break;
case InGroup:
- TagGroupInfo::get(m_curCompound)->namespaceList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->namespaceList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'namespace' found");
@@ -500,10 +500,10 @@ class TagFileParser
switch(m_state)
{
case InGroup:
- TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
break;
case InDir:
- TagDirInfo::get(m_curCompound)->fileList.push_back(m_curString);
+ TagDirInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'file' found");
@@ -516,7 +516,7 @@ class TagFileParser
switch(m_state)
{
case InGroup:
- TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->fileList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'page' found");
@@ -529,7 +529,7 @@ class TagFileParser
switch(m_state)
{
case InDir:
- TagDirInfo::get(m_curCompound)->subdirList.push_back(m_curString);
+ TagDirInfo::get(m_curCompound)->subdirList.push_back(m_curString.str());
break;
default:
warn("Unexpected tag 'dir' found");
@@ -589,8 +589,8 @@ class TagFileParser
m_curString="";
if (m_state==InClass && m_curCompound)
{
- std::string protStr = XMLHandlers::value(attrib,"protection");
- std::string virtStr = XMLHandlers::value(attrib,"virtualness");
+ QCString protStr = XMLHandlers::value(attrib,"protection");
+ QCString virtStr = XMLHandlers::value(attrib,"virtualness");
Protection prot = Public;
Specifier virt = Normal;
if (protStr=="protected")
@@ -605,7 +605,7 @@ class TagFileParser
{
virt = Virtual;
}
- TagClassInfo::get(m_curCompound)->bases.push_back(BaseInfo(m_curString.c_str(),prot,virt));
+ TagClassInfo::get(m_curCompound)->bases.push_back(BaseInfo(m_curString,prot,virt));
}
else
{
@@ -652,7 +652,7 @@ class TagFileParser
{
if (m_state==InClass && m_curCompound)
{
- TagClassInfo::get(m_curCompound)->templateArguments.push_back(m_curString);
+ TagClassInfo::get(m_curCompound)->templateArguments.push_back(m_curString.str());
}
else
{
@@ -778,7 +778,7 @@ class TagFileParser
{
if (m_state==InGroup)
{
- TagGroupInfo::get(m_curCompound)->subgroupList.push_back(m_curString);
+ TagGroupInfo::get(m_curCompound)->subgroupList.push_back(m_curString.str());
}
else
{
@@ -815,14 +815,14 @@ class TagFileParser
void warn(const char *fmt)
{
- std::string fileName = m_locator->fileName();
- ::warn(fileName.c_str(),m_locator->lineNr(),"%s", fmt);
+ QCString fileName = m_locator->fileName();
+ ::warn(fileName,m_locator->lineNr(),"%s", fmt);
}
void warn(const char *fmt,const char *s)
{
- std::string fileName = m_locator->fileName();
- ::warn(fileName.c_str(),m_locator->lineNr(),fmt,s);
+ QCString fileName = m_locator->fileName();
+ ::warn(fileName,m_locator->lineNr(),fmt,s);
}
@@ -835,10 +835,10 @@ class TagFileParser
TagEnumValueInfo m_curEnumValue;
TagIncludeInfo m_curIncludes;
- std::string m_curString;
- std::string m_tagName;
- std::string m_fileName;
- std::string m_title;
+ QCString m_curString;
+ QCString m_tagName;
+ QCString m_fileName;
+ QCString m_title;
State m_state = Invalid;
std::stack<State> m_stateStack;
const XMLLocator *m_locator = nullptr;
@@ -928,31 +928,31 @@ static const std::map< std::string, CompoundFactory > g_compoundFactory =
//---------------------------------------------------------------------------------------------------------------
-void TagFileParser::startElement( const std::string &name, const XMLHandlers::Attributes& attrib )
+void TagFileParser::startElement( const QCString &name, const XMLHandlers::Attributes& attrib )
{
- //printf("startElement '%s'\n",name.data());
- auto it = g_elementHandlers.find(name);
+ //printf("startElement '%s'\n",qPrint(name));
+ auto it = g_elementHandlers.find(name.str());
if (it!=std::end(g_elementHandlers))
{
it->second.startCb(*this,attrib);
}
else
{
- warn("Unknown start tag '%s' found!",name.data());
+ warn("Unknown start tag '%s' found!",qPrint(name));
}
}
-void TagFileParser::endElement( const std::string &name )
+void TagFileParser::endElement( const QCString &name )
{
- //printf("endElement '%s'\n",name.data());
- auto it = g_elementHandlers.find(name);
+ //printf("endElement '%s'\n",qPrint(name));
+ auto it = g_elementHandlers.find(name.str());
if (it!=std::end(g_elementHandlers))
{
it->second.endCb(*this);
}
else
{
- warn("Unknown end tag '%s' found!",name.data());
+ warn("Unknown end tag '%s' found!",qPrint(name));
}
}
@@ -991,20 +991,20 @@ void TagFileParser::dump()
if (comp->compoundType()==TagCompoundInfo::CompoundType::Class)
{
const TagClassInfo *cd = TagClassInfo::get(comp);
- msg("class '%s'\n",cd->name.data());
- msg(" filename '%s'\n",cd->filename.data());
+ msg("class '%s'\n",qPrint(cd->name));
+ msg(" filename '%s'\n",qPrint(cd->filename));
for (const BaseInfo &bi : cd->bases)
{
- msg( " base: %s \n", bi.name.isEmpty() ? "" : bi.name.data() );
+ msg( " base: %s \n", bi.name.isEmpty() ? "" : qPrint(bi.name) );
}
for (const auto &md : cd->members)
{
msg(" member:\n");
- msg(" kind: '%s'\n",md.kind.c_str());
- msg(" name: '%s'\n",md.name.c_str());
- msg(" anchor: '%s'\n",md.anchor.c_str());
- msg(" arglist: '%s'\n",md.arglist.c_str());
+ msg(" kind: '%s'\n",qPrint(md.kind));
+ msg(" name: '%s'\n",qPrint(md.name));
+ msg(" anchor: '%s'\n",qPrint(md.anchor));
+ msg(" arglist: '%s'\n",qPrint(md.arglist));
}
}
}
@@ -1015,8 +1015,8 @@ void TagFileParser::dump()
{
const TagConceptInfo *cd = TagConceptInfo::get(comp);
- msg("concept '%s'\n",cd->name.data());
- msg(" filename '%s'\n",cd->filename.data());
+ msg("concept '%s'\n",qPrint(cd->name));
+ msg(" filename '%s'\n",qPrint(cd->filename));
}
}
//============== NAMESPACES
@@ -1026,8 +1026,8 @@ void TagFileParser::dump()
{
const TagNamespaceInfo *nd = TagNamespaceInfo::get(comp);
- msg("namespace '%s'\n",nd->name.data());
- msg(" filename '%s'\n",nd->filename.data());
+ msg("namespace '%s'\n",qPrint(nd->name));
+ msg(" filename '%s'\n",qPrint(nd->filename));
for (const auto &cls : nd->classList)
{
msg( " class: %s \n", cls.c_str() );
@@ -1036,10 +1036,10 @@ void TagFileParser::dump()
for (const auto &md : nd->members)
{
msg(" member:\n");
- msg(" kind: '%s'\n",md.kind.data());
- msg(" name: '%s'\n",md.name.data());
- msg(" anchor: '%s'\n",md.anchor.data());
- msg(" arglist: '%s'\n",md.arglist.data());
+ msg(" kind: '%s'\n",qPrint(md.kind));
+ msg(" name: '%s'\n",qPrint(md.name));
+ msg(" anchor: '%s'\n",qPrint(md.anchor));
+ msg(" arglist: '%s'\n",qPrint(md.arglist));
}
}
}
@@ -1051,8 +1051,8 @@ void TagFileParser::dump()
{
const TagFileInfo *fd = TagFileInfo::get(comp);
- msg("file '%s'\n",fd->name.data());
- msg(" filename '%s'\n",fd->filename.data());
+ msg("file '%s'\n",qPrint(fd->name));
+ msg(" filename '%s'\n",qPrint(fd->filename));
for (const auto &ns : fd->namespaceList)
{
msg( " namespace: %s \n", ns.c_str() );
@@ -1065,15 +1065,15 @@ void TagFileParser::dump()
for (const auto &md : fd->members)
{
msg(" member:\n");
- msg(" kind: '%s'\n",md.kind.data());
- msg(" name: '%s'\n",md.name.data());
- msg(" anchor: '%s'\n",md.anchor.data());
- msg(" arglist: '%s'\n",md.arglist.data());
+ msg(" kind: '%s'\n",qPrint(md.kind));
+ msg(" name: '%s'\n",qPrint(md.name));
+ msg(" anchor: '%s'\n",qPrint(md.anchor));
+ msg(" arglist: '%s'\n",qPrint(md.arglist));
}
for (const auto &ii : fd->includes)
{
- msg(" includes id: %s name: %s\n",ii.id.data(),ii.name.data());
+ msg(" includes id: %s name: %s\n",qPrint(ii.id),qPrint(ii.name));
}
}
}
@@ -1084,8 +1084,8 @@ void TagFileParser::dump()
if (comp->compoundType()==TagCompoundInfo::CompoundType::Group)
{
const TagGroupInfo *gd = TagGroupInfo::get(comp);
- msg("group '%s'\n",gd->name.data());
- msg(" filename '%s'\n",gd->filename.data());
+ msg("group '%s'\n",qPrint(gd->name));
+ msg(" filename '%s'\n",qPrint(gd->filename));
for (const auto &ns : gd->namespaceList)
{
@@ -1111,10 +1111,10 @@ void TagFileParser::dump()
for (const auto &md : gd->members)
{
msg(" member:\n");
- msg(" kind: '%s'\n",md.kind.data());
- msg(" name: '%s'\n",md.name.data());
- msg(" anchor: '%s'\n",md.anchor.data());
- msg(" arglist: '%s'\n",md.arglist.data());
+ msg(" kind: '%s'\n",qPrint(md.kind));
+ msg(" name: '%s'\n",qPrint(md.name));
+ msg(" anchor: '%s'\n",qPrint(md.anchor));
+ msg(" arglist: '%s'\n",qPrint(md.arglist));
}
}
}
@@ -1125,9 +1125,9 @@ void TagFileParser::dump()
if (comp->compoundType()==TagCompoundInfo::CompoundType::Page)
{
const TagPageInfo *pd = TagPageInfo::get(comp);
- msg("page '%s'\n",pd->name.data());
- msg(" title '%s'\n",pd->title.data());
- msg(" filename '%s'\n",pd->filename.data());
+ msg("page '%s'\n",qPrint(pd->name));
+ msg(" title '%s'\n",qPrint(pd->title));
+ msg(" filename '%s'\n",qPrint(pd->filename));
}
}
@@ -1138,8 +1138,8 @@ void TagFileParser::dump()
{
const TagDirInfo *dd = TagDirInfo::get(comp);
{
- msg("dir '%s'\n",dd->name.data());
- msg(" path '%s'\n",dd->path.data());
+ msg("dir '%s'\n",qPrint(dd->name));
+ msg(" path '%s'\n",qPrint(dd->path));
for (const auto &fi : dd->fileList)
{
msg( " file: %s \n", fi.c_str() );
@@ -1157,18 +1157,18 @@ void TagFileParser::addDocAnchors(const std::shared_ptr<Entry> &e,const std::vec
{
for (const auto &ta : l)
{
- if (SectionManager::instance().find(ta.label.c_str())==0)
+ if (SectionManager::instance().find(QCString(ta.label))==0)
{
//printf("New sectionInfo file=%s anchor=%s\n",
- // ta->fileName.data(),ta->label.data());
+ // qPrint(ta->fileName),qPrint(ta->label));
SectionInfo *si=SectionManager::instance().add(
- ta.label.c_str(),ta.fileName.c_str(),-1,ta.title.c_str(),
- SectionType::Anchor,0,m_tagName.c_str());
+ ta.label,ta.fileName,-1,ta.title,
+ SectionType::Anchor,0,m_tagName);
e->anchors.push_back(si);
}
else
{
- warn("Duplicate anchor %s found",ta.label.data());
+ warn("Duplicate anchor %s found",qPrint(ta.label));
}
}
}
@@ -1287,19 +1287,6 @@ void TagFileParser::buildMemberList(const std::shared_ptr<Entry> &ce,const std::
}
}
-static QCString stripPath(const QCString &s)
-{
- int i=s.findRev('/');
- if (i!=-1)
- {
- return s.right(s.length()-i-1);
- }
- else
- {
- return s;
- }
-}
-
/*! Injects the info gathered by the XML parser into the Entry tree.
* This tree contains the information extracted from the input in a
* "unrelated" form.
@@ -1370,28 +1357,28 @@ void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
const TagFileInfo *tfi = TagFileInfo::get(comp);
std::shared_ptr<Entry> fe = std::make_shared<Entry>();
- fe->section = guessSection(tfi->name.c_str());
- fe->name = tfi->name.c_str();
+ fe->section = guessSection(tfi->name);
+ fe->name = tfi->name;
addDocAnchors(fe,tfi->docAnchors);
fe->tagInfoData.tagName = m_tagName;
fe->tagInfoData.fileName = tfi->filename;
fe->hasTagInfo = TRUE;
- std::string fullName = m_tagName+":"+tfi->path+stripPath(tfi->name).str();
+ QCString fullName = m_tagName+":"+tfi->path+stripPath(tfi->name);
fe->fileName = fullName;
- //printf("createFileDef() filename=%s\n",tfi->filename.data());
- std::string tagid = m_tagName+":"+tfi->path;
- std::unique_ptr<FileDef> fd { createFileDef(tagid.c_str(),
- tfi->name.c_str(),m_tagName.c_str(),
- tfi->filename.c_str()) };
+ //printf("createFileDef() filename=%s\n",qPrint(tfi->filename));
+ QCString tagid = m_tagName+":"+tfi->path;
+ std::unique_ptr<FileDef> fd { createFileDef(tagid,
+ tfi->name,m_tagName,
+ tfi->filename) };
FileName *mn;
- if ((mn=Doxygen::inputNameLinkedMap->find(tfi->name.c_str())))
+ if ((mn=Doxygen::inputNameLinkedMap->find(tfi->name)))
{
mn->push_back(std::move(fd));
}
else
{
- mn = Doxygen::inputNameLinkedMap->add(tfi->name.c_str(),fullName.c_str());
+ mn = Doxygen::inputNameLinkedMap->add(tfi->name,fullName);
mn->push_back(std::move(fd));
}
buildMemberList(fe,tfi->members);
@@ -1495,7 +1482,7 @@ void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
[&](const std::shared_ptr<Entry> &e) { return e->name == sg.c_str(); });
if (i!=children.end())
{
- (*i)->groups.push_back(Grouping(tgi->name.c_str(),Grouping::GROUPING_INGROUP));
+ (*i)->groups.push_back(Grouping(tgi->name,Grouping::GROUPING_INGROUP));
}
}
}
@@ -1509,7 +1496,7 @@ void TagFileParser::buildLists(const std::shared_ptr<Entry> &root)
const TagPageInfo *tpi = TagPageInfo::get(comp);
std::shared_ptr<Entry> pe = std::make_shared<Entry>();
- bool isIndex = (stripExtensionGeneral(tpi->filename.c_str(),getFileNameExtension(tpi->filename.c_str()))=="index");
+ bool isIndex = (stripExtensionGeneral(tpi->filename,getFileNameExtension(tpi->filename))=="index");
pe->section = isIndex ? Entry::MAINPAGEDOC_SEC : Entry::PAGEDOC_SEC;
pe->name = tpi->name;
pe->args = tpi->title;
@@ -1529,30 +1516,30 @@ void TagFileParser::addIncludes()
if (comp->compoundType()==TagCompoundInfo::CompoundType::File)
{
const TagFileInfo *tfi = TagFileInfo::get(comp);
- //printf("tag file tagName=%s path=%s name=%s\n",m_tagName.data(),tfi->path.data(),tfi->name.data());
- FileName *fn = Doxygen::inputNameLinkedMap->find(tfi->name.c_str());
+ //printf("tag file tagName=%s path=%s name=%s\n",qPrint(m_tagName),qPrint(tfi->path),qPrint(tfi->name));
+ FileName *fn = Doxygen::inputNameLinkedMap->find(tfi->name);
if (fn)
{
for (const auto &fd : *fn)
{
- //printf("input file path=%s name=%s\n",fd->getPath().data(),fd->name().data());
+ //printf("input file path=%s name=%s\n",qPrint(fd->getPath()),qPrint(fd->name()));
if (fd->getPath()==QCString(m_tagName+":"+tfi->path))
{
//printf("found\n");
for (const auto &ii : tfi->includes)
{
- //printf("ii->name='%s'\n",ii->name.data());
- FileName *ifn = Doxygen::inputNameLinkedMap->find(ii.name.c_str());
+ //printf("ii->name='%s'\n",qPrint(ii->name));
+ FileName *ifn = Doxygen::inputNameLinkedMap->find(ii.name);
ASSERT(ifn!=0);
if (ifn)
{
for (const auto &ifd : *ifn)
{
//printf("ifd->getOutputFileBase()=%s ii->id=%s\n",
- // ifd->getOutputFileBase().data(),ii->id.data());
+ // qPrint(ifd->getOutputFileBase()),qPrint(ii->id));
if (ifd->getOutputFileBase()==QCString(ii.id))
{
- fd->addIncludeDependency(ifd.get(),ii.text.c_str(),ii.isLocal,ii.isImported);
+ fd->addIncludeDependency(ifd.get(),ii.text,ii.isLocal,ii.isImported);
}
}
}
@@ -1571,13 +1558,13 @@ void parseTagFile(const std::shared_ptr<Entry> &root,const char *fullName)
XMLHandlers handlers;
// connect the generic events handlers of the XML parser to the specific handlers of the tagFileParser object
handlers.startDocument = [&tagFileParser]() { tagFileParser.startDocument(); };
- handlers.startElement = [&tagFileParser](const std::string &name,const XMLHandlers::Attributes &attrs) { tagFileParser.startElement(name,attrs); };
- handlers.endElement = [&tagFileParser](const std::string &name) { tagFileParser.endElement(name); };
- handlers.characters = [&tagFileParser](const std::string &chars) { tagFileParser.characters(chars); };
- handlers.error = [&tagFileParser](const std::string &fileName,int lineNr,const std::string &msg) { tagFileParser.error(fileName,lineNr,msg); };
+ handlers.startElement = [&tagFileParser](const std::string &name,const XMLHandlers::Attributes &attrs) { tagFileParser.startElement(QCString(name),attrs); };
+ handlers.endElement = [&tagFileParser](const std::string &name) { tagFileParser.endElement(QCString(name)); };
+ handlers.characters = [&tagFileParser](const std::string &chars) { tagFileParser.characters(QCString(chars)); };
+ handlers.error = [&tagFileParser](const std::string &fileName,int lineNr,const std::string &msg) { tagFileParser.error(QCString(fileName),lineNr,QCString(msg)); };
XMLParser parser(handlers);
tagFileParser.setDocumentLocator(&parser);
- parser.parse(fullName,inputStr,Debug::isFlagSet(Debug::Lex));
+ parser.parse(fullName,inputStr.data(),Debug::isFlagSet(Debug::Lex));
tagFileParser.buildLists(root);
tagFileParser.addIncludes();
//tagFileParser.dump();
diff --git a/src/template.cpp b/src/template.cpp
index 2e8dc4f..9ae2c11 100755
--- a/src/template.cpp
+++ b/src/template.cpp
@@ -98,10 +98,11 @@ static std::vector<QCString> split(const QCString &str,const QCString &sep,
/** Strips spaces surrounding `=` from string \a in, so
* `foo = 10 bar=5 baz= 'hello'` will become `foo=10 bar=5 baz='hello'`
*/
-static QCString removeSpacesAroundEquals(const char *s)
+static QCString removeSpacesAroundEquals(const QCString &s)
{
+ if (s.isEmpty()) return s;
QCString result(s);
- const char *p=result.data();
+ const char *p=s.data();
char *q = result.rawData();
char c;
while ((c=*p++))
@@ -126,7 +127,7 @@ static QCString removeSpacesAroundEquals(const char *s)
//----------------------------------------------------------------------------
#if ENABLE_TRACING
-static QCString replace(const char *s,char csrc,char cdst)
+static QCString replace(const QCString &s,char csrc,char cdst)
{
QCString result = s;
for (char *p=result.data();*p;p++)
@@ -268,22 +269,22 @@ int TemplateStruct::release()
return count;
}
-void TemplateStruct::set(const char *name,const TemplateVariant &v)
+void TemplateStruct::set(const QCString &name,const TemplateVariant &v)
{
- auto it = p->fields.find(name);
+ auto it = p->fields.find(name.str());
if (it!=p->fields.end()) // change existing field
{
it->second = v;
}
else // insert new field
{
- p->fields.insert(std::make_pair(name,v));
+ p->fields.insert(std::make_pair(name.str(),v));
}
}
-TemplateVariant TemplateStruct::get(const char *name) const
+TemplateVariant TemplateStruct::get(const QCString &name) const
{
- auto it = p->fields.find(name);
+ auto it = p->fields.find(name.str());
return it!=p->fields.end() ? it->second : TemplateVariant();
}
@@ -512,7 +513,7 @@ class TemplateContextImpl : public TemplateContext
// TemplateContext methods
void push();
void pop();
- void set(const char *name,const TemplateVariant &v);
+ void set(const QCString &name,const TemplateVariant &v);
TemplateVariant get(const QCString &name) const;
const TemplateVariant *getRef(const QCString &name) const;
void setOutputDirectory(const QCString &dir)
@@ -552,7 +553,7 @@ class TemplateContextImpl : public TemplateContext
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;
+ void warn(const QCString &fileName,int line,const char *fmt,...) const;
// index related functions
void openSubIndex(const QCString &indexName);
@@ -628,12 +629,12 @@ class FilterGet
if (v.isValid() && v.type()==TemplateVariant::Struct && arg.type()==TemplateVariant::String)
{
TemplateVariant result = v.toStruct()->get(arg.toString());
- //printf("\nok[%s]=%d\n",arg.toString().data(),result.type());
+ //printf("\nok[%s]=%d\n",qPrint(arg.toString()),result.type());
return result;
}
else
{
- //printf("\nnok[%s]\n",arg.toString().data());
+ //printf("\nnok[%s]\n",qPrint(arg.toString()));
return FALSE;
}
}
@@ -874,7 +875,7 @@ class FilterListSort
{
if (v.type()==TemplateVariant::List && args.type()==TemplateVariant::String)
{
- //printf("FilterListSort::apply: v=%s args=%s\n",v.toString().data(),args.toString().data());
+ //printf("FilterListSort::apply: v=%s args=%s\n",qPrint(v.toString()),qPrint(args.toString()));
TemplateListIntf::ConstIterator *it = v.toList()->createIterator();
TemplateVariant item;
@@ -891,7 +892,7 @@ class FilterListSort
{
QCString sortKey = determineSortKey(s,args.toString());
sortList.emplace_back(sortKey,item);
- //printf("sortKey=%s\n",sortKey.data());
+ //printf("sortKey=%s\n",qPrint(sortKey));
}
}
delete it;
@@ -899,7 +900,7 @@ class FilterListSort
// sort the list
std::sort(sortList.begin(),
sortList.end(),
- [](const auto &lhs,const auto &rhs) { return qstrcmp(lhs.key,rhs.key)<0; });
+ [](const auto &lhs,const auto &rhs) { return lhs.key < rhs.key; });
// add sorted items to the result list
for (const auto &elem : sortList)
@@ -924,7 +925,7 @@ class FilterListSort
{
QCString var = arg.mid(i+2,j-i-2);
TemplateVariant val=s->get(var);
- //printf("found argument %s value=%s\n",var.data(),val.toString().data());
+ //printf("found argument %s value=%s\n",qPrint(var),qPrint(val.toString()));
result+=val.toString();
p=j+2;
}
@@ -954,7 +955,7 @@ class FilterGroupBy
{
if (v.type()==TemplateVariant::List && args.type()==TemplateVariant::String)
{
- //printf("FilterListSort::apply: v=%s args=%s\n",v.toString().data(),args.toString().data());
+ //printf("FilterListSort::apply: v=%s args=%s\n",qPrint(v.toString()),qPrint(args.toString()));
TemplateListIntf::ConstIterator *it = v.toList()->createIterator();
TemplateVariant item;
@@ -971,7 +972,7 @@ class FilterGroupBy
{
QCString sortKey = determineSortKey(s,args.toString());
sortList.emplace_back(sortKey,item);
- //printf("sortKey=%s\n",sortKey.data());
+ //printf("sortKey=%s\n",qPrint(sortKey));
}
}
delete it;
@@ -979,7 +980,7 @@ class FilterGroupBy
// sort the list
std::sort(sortList.begin(),
sortList.end(),
- [](const auto &lhs,const auto &rhs) { return qstrcmp(lhs.key,rhs.key)<0; });
+ [](const auto &lhs,const auto &rhs) { return lhs.key < rhs.key; });
// add sorted items to the result list
TemplateList *groupList=0;
@@ -1081,10 +1082,10 @@ class FilterAlphaIndex
QCString key;
TemplateVariant value;
};
- static QCString keyToLabel(const char *startLetter)
+ static QCString keyToLabel(const QCString &startLetter)
{
- const char *p = startLetter;
- if (startLetter==0 || *startLetter==0) return "";
+ if (startLetter.isEmpty()) return startLetter;
+ const char *p = startLetter.data();
char c = *p;
QCString result;
if (c<127 && c>31) // printable ASCII character
@@ -1118,7 +1119,7 @@ class FilterAlphaIndex
{
if (v.type()==TemplateVariant::List && args.type()==TemplateVariant::String)
{
- //printf("FilterListSort::apply: v=%s args=%s\n",v.toString().data(),args.toString().data());
+ //printf("FilterListSort::apply: v=%s args=%s\n",qPrint(v.toString()),qPrint(args.toString()));
TemplateListIntf::ConstIterator *it = v.toList()->createIterator();
TemplateVariant item;
@@ -1135,7 +1136,7 @@ class FilterAlphaIndex
{
uint sortKey = determineSortKey(s,args.toString());
sortList.emplace_back(sortKey,item);
- //printf("sortKey=%s\n",sortKey.data());
+ //printf("sortKey=%s\n",qPrint(sortKey));
}
}
delete it;
@@ -1143,7 +1144,7 @@ class FilterAlphaIndex
// sort the list
std::sort(sortList.begin(),
sortList.end(),
- [](const auto &lhs,const auto &rhs) { return qstrcmp(lhs.key,rhs.key)<0; });
+ [](const auto &lhs,const auto &rhs) { return lhs.key < rhs.key; });
// create an index from the sorted list
QCString letter;
@@ -1407,7 +1408,7 @@ class ExprAstNumber : public ExprAst
class ExprAstVariable : public ExprAst
{
public:
- ExprAstVariable(const char *name) : m_name(name)
+ ExprAstVariable(const QCString &name) : m_name(name)
{ TRACE(("ExprAstVariable(%s)\n",name)); }
const QCString &name() const { return m_name; }
virtual TemplateVariant resolve(TemplateContext *c)
@@ -1416,7 +1417,7 @@ class ExprAstVariable : public ExprAst
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (!v.isValid())
{
- if (ci) ci->warn(ci->templateName(),ci->line(),"undefined variable '%s' in expression",m_name.data());
+ if (ci) ci->warn(ci->templateName(),ci->line(),"undefined variable '%s' in expression",qPrint(m_name));
}
return v;
}
@@ -1459,7 +1460,7 @@ class ExprAstFunctionVariable : public ExprAst
class ExprAstFilter : public ExprAst
{
public:
- ExprAstFilter(const char *name,ExprAst *arg) : m_name(name), m_arg(arg)
+ ExprAstFilter(const QCString &name,ExprAst *arg) : m_name(name), m_arg(arg)
{ TRACE(("ExprAstFilter(%s)\n",name)); }
~ExprAstFilter() { delete m_arg; }
const QCString &name() const { return m_name; }
@@ -1467,14 +1468,14 @@ class ExprAstFilter : public ExprAst
{
TemplateContextImpl *ci = dynamic_cast<TemplateContextImpl*>(c);
if (ci==0) return v; // should not happen
- TRACE(("Applying filter '%s' to '%s' (type=%d)\n",m_name.data(),v.toString().data(),v.type()));
+ TRACE(("Applying filter '%s' to '%s' (type=%d)\n",qPrint(m_name),qPrint(v.toString()),v.type()));
TemplateVariant arg;
if (m_arg) arg = m_arg->resolve(c);
bool ok;
TemplateVariant result = TemplateFilterFactory::instance()->apply(m_name,v,arg,ok);
if (!ok)
{
- ci->warn(ci->templateName(),ci->line(),"unknown filter '%s'",m_name.data());
+ ci->warn(ci->templateName(),ci->line(),"unknown filter '%s'",qPrint(m_name));
}
return result;
}
@@ -1504,7 +1505,7 @@ class ExprAstFilterAppl : public ExprAst
class ExprAstLiteral : public ExprAst
{
public:
- ExprAstLiteral(const char *lit) : m_literal(lit)
+ ExprAstLiteral(const QCString &lit) : m_literal(lit)
{ TRACE(("ExprAstLiteral(%s)\n",lit)); }
const QCString &literal() const { return m_literal; }
virtual TemplateVariant resolve(TemplateContext *) { return TemplateVariant(m_literal); }
@@ -1679,7 +1680,7 @@ class TemplateToken
{
public:
enum Type { Text, Variable, Block };
- TemplateToken(Type t,const char *d,int l) : type(t), data(d), line(l) {}
+ TemplateToken(Type t,const QCString &d,int l) : type(t), data(d), line(l) {}
Type type = Text;
QCString data;
int line = 0;
@@ -1722,7 +1723,7 @@ class TemplateParser
void prependToken(TemplateTokenPtr &&token);
const TemplateToken *currentToken() const;
QCString templateName() const { return m_templateName; }
- void warn(const char *fileName,int line,const char *fmt,...) const;
+ void warn(const QCString &fileName,int line,const char *fmt,...) const;
private:
const TemplateEngine *m_engine = 0;
QCString m_templateName;
@@ -1744,10 +1745,10 @@ class ExpressionParser
{
}
- ExprAst *parse(const char *expr)
+ ExprAst *parse(const QCString &expr)
{
- if (expr==0) return 0;
- m_tokenStream = expr;
+ if (expr.isEmpty()) return 0;
+ m_tokenStream = expr.data();
getNextToken();
return parseExpression();
}
@@ -1988,7 +1989,7 @@ class ExpressionParser
ExprAst *parseIdentifier()
{
- TRACE(("{parseIdentifier(%s)\n",m_curToken.id.data()));
+ TRACE(("{parseIdentifier(%s)\n",qPrint(m_curToken.id)));
ExprAst *id = new ExprAstVariable(m_curToken.id);
getNextToken();
TRACE(("}parseIdentifier()\n"));
@@ -1997,7 +1998,7 @@ class ExpressionParser
ExprAst *parseLiteral()
{
- TRACE(("{parseLiteral(%s)\n",m_curToken.id.data()));
+ TRACE(("{parseLiteral(%s)\n",qPrint(m_curToken.id)));
ExprAst *expr = new ExprAstLiteral(m_curToken.id);
getNextToken();
TRACE(("}parseLiteral()\n"));
@@ -2006,7 +2007,7 @@ class ExpressionParser
ExprAst *parseIdentifierOptionalArgs()
{
- TRACE(("{parseIdentifierOptionalArgs(%s)\n",m_curToken.id.data()));
+ TRACE(("{parseIdentifierOptionalArgs(%s)\n",qPrint(m_curToken.id)));
ExprAst *expr = parseIdentifier();
if (expr)
{
@@ -2050,7 +2051,7 @@ class ExpressionParser
ExprAstFilter *parseFilter()
{
- TRACE(("{parseFilter(%s)\n",m_curToken.id.data()));
+ TRACE(("{parseFilter(%s)\n",qPrint(m_curToken.id)));
QCString filterName = m_curToken.id;
getNextToken();
ExprAst *argExpr=0;
@@ -2261,7 +2262,7 @@ class ExpressionParser
p++;
}
//TRACE(("token type=%d op=%d num=%d id=%s\n",
- // m_curToken.type,m_curToken.op,m_curToken.num,m_curToken.id.data()));
+ // m_curToken.type,m_curToken.op,m_curToken.num,qPrint(m_curToken.id)));
m_tokenStream = p;
return TRUE;
@@ -2303,7 +2304,7 @@ class TemplateStructWeakRef : public TemplateStructIntf
{
public:
TemplateStructWeakRef(TemplateStructIntf *ref) : m_ref(ref), m_refCount(0) {}
- virtual TemplateVariant get(const char *name) const { return m_ref->get(name); }
+ virtual TemplateVariant get(const QCString &name) const { return m_ref->get(name); }
virtual int addRef() { return ++m_refCount; }
virtual int release() { int count=--m_refCount; if (count<=0) { delete this; } return count; }
private:
@@ -2338,18 +2339,18 @@ void TemplateContextImpl::setEncoding(const QCString &templateName,int line,cons
m_encoding=enc;
if (!enc.isEmpty())
{
- m_fromUtf8 = portable_iconv_open(enc,"UTF-8");
+ m_fromUtf8 = portable_iconv_open(enc.data(),"UTF-8");
if (m_fromUtf8==(void*)(-1))
{
- warn(templateName,line,"unsupported character conversion: '%s'->'UTF-8'\n", enc.data());
+ warn(templateName,line,"unsupported character conversion: '%s'->'UTF-8'\n", qPrint(enc));
}
}
- //printf("TemplateContextImpl::setEncoding(%s)\n",enc.data());
+ //printf("TemplateContextImpl::setEncoding(%s)\n",qPrint(enc));
}
QCString TemplateContextImpl::recode(const QCString &s)
{
- //printf("TemplateContextImpl::recode(%s)\n",s.data());
+ //printf("TemplateContextImpl::recode(%s)\n",qPrint(s));
int iSize = s.length();
int oSize = iSize*4+1;
QCString output(oSize);
@@ -2370,15 +2371,15 @@ QCString TemplateContextImpl::recode(const QCString &s)
}
}
-void TemplateContextImpl::set(const char *name,const TemplateVariant &v)
+void TemplateContextImpl::set(const QCString &name,const TemplateVariant &v)
{
auto &ctx = m_contextStack.front();
- auto it = ctx.find(name);
+ auto it = ctx.find(name.str());
if (it!=ctx.end())
{
ctx.erase(it);
}
- ctx.insert(std::make_pair(name,v));
+ ctx.insert(std::make_pair(name.str(),v));
}
TemplateVariant TemplateContextImpl::get(const QCString &name) const
@@ -2395,7 +2396,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const
QCString propName = name.mid(i+1);
while (!propName.isEmpty())
{
- //printf("getPrimary(%s) type=%d:%s\n",objName.data(),v.type(),v.toString().data());
+ //printf("getPrimary(%s) type=%d:%s\n",qPrint(objName),v.type(),qPrint(v.toString()));
if (v.type()==TemplateVariant::Struct)
{
i = propName.find(".");
@@ -2403,7 +2404,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const
v = v.toStruct()->get(propName.left(l));
if (!v.isValid())
{
- warn(m_templateName,m_line,"requesting non-existing property '%s' for object '%s'",propName.left(l).data(),objName.data());
+ warn(m_templateName,m_line,"requesting non-existing property '%s' for object '%s'",qPrint(propName.left(l)),qPrint(objName));
}
if (i!=-1)
{
@@ -2427,7 +2428,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const
}
else
{
- warn(m_templateName,m_line,"list index '%s' is not valid",propName.data());
+ warn(m_templateName,m_line,"list index '%s' is not valid",qPrint(propName));
break;
}
if (i!=-1)
@@ -2441,7 +2442,7 @@ TemplateVariant TemplateContextImpl::get(const QCString &name) const
}
else
{
- warn(m_templateName,m_line,"using . on an object '%s' is not an struct or list",objName.data());
+ warn(m_templateName,m_line,"using . on an object '%s' is not an struct or list",qPrint(objName));
return TemplateVariant();
}
}
@@ -2490,7 +2491,7 @@ TemplateBlockContext *TemplateContextImpl::blockContext()
return &m_blockContext;
}
-void TemplateContextImpl::warn(const char *fileName,int line,const char *fmt,...) const
+void TemplateContextImpl::warn(const QCString &fileName,int line,const char *fmt,...) const
{
va_list args;
va_start(args,fmt);
@@ -2501,11 +2502,11 @@ 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",qPrint(indexName));
auto kv = m_indexStacks.find(indexName.str());
if (kv==m_indexStacks.end() || kv->second.empty() || kv->second.top().type()==TemplateVariant::List) // error: no stack yet or no entry
{
- warn(m_templateName,m_line,"opensubindex for index %s without preceding indexentry",indexName.data());
+ warn(m_templateName,m_line,"opensubindex for index %s without preceding indexentry",qPrint(indexName));
return;
}
// get the parent entry to add the list to
@@ -2523,11 +2524,11 @@ void TemplateContextImpl::openSubIndex(const QCString &indexName)
void TemplateContextImpl::closeSubIndex(const QCString &indexName)
{
- //printf("TemplateContextImpl::closeSubIndex(%s)\n",indexName.data());
+ //printf("TemplateContextImpl::closeSubIndex(%s)\n",qPrint(indexName));
auto kv = m_indexStacks.find(indexName.str());
if (kv==m_indexStacks.end() || kv->second.size()<3)
{
- warn(m_templateName,m_line,"closesubindex for index %s without matching open",indexName.data());
+ warn(m_templateName,m_line,"closesubindex for index %s without matching open",qPrint(indexName));
}
else
{
@@ -2547,7 +2548,7 @@ void TemplateContextImpl::closeSubIndex(const QCString &indexName)
}
}
}
- //fprintf(stderr,"TemplateContextImpl::closeSubIndex(%s) end g_count=%d\n\n",indexName.data(),g_count);
+ //fprintf(stderr,"TemplateContextImpl::closeSubIndex(%s) end g_count=%d\n\n",qPrint(indexName),g_count);
}
static void getPathListFunc(TemplateStructIntf *entry,TemplateList *list)
@@ -2571,7 +2572,7 @@ static TemplateVariant getPathFunc(const void *ctx, const std::vector<TemplateVa
void TemplateContextImpl::addIndexEntry(const QCString &indexName,const std::vector<TemplateKeyValue> &arguments)
{
auto it = arguments.begin();
- //printf("TemplateContextImpl::addIndexEntry(%s)\n",indexName.data());
+ //printf("TemplateContextImpl::addIndexEntry(%s)\n",qPrint(indexName));
//while (it!=arguments.end())
//{
// printf(" key=%s value=%s\n",(*it).key.data(),(*it).value.toString().data());
@@ -2655,7 +2656,7 @@ class TemplateNodeText : public TemplateNode
{
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);
+ //printf("TemplateNodeText::render(%s) needsRecoding=%d ci=%p\n",qPrint(m_data),ci->needsRecoding(),ci);
if (ci->spacelessEnabled())
{
if (ci->needsRecoding())
@@ -2692,12 +2693,12 @@ class TemplateNodeVariable : public TemplateNode
TemplateNodeVariable(TemplateParser *parser,TemplateNode *parent,int line,const QCString &var)
: TemplateNode(parent), m_templateName(parser->templateName()), m_line(line)
{
- TRACE(("TemplateNodeVariable(%s)\n",var.data()));
+ TRACE(("TemplateNodeVariable(%s)\n",qPrint(var)));
ExpressionParser expParser(parser,line);
m_var = expParser.parse(var);
if (m_var==0)
{
- parser->warn(m_templateName,line,"invalid expression '%s' for variable",var.data());
+ parser->warn(m_templateName,line,"invalid expression '%s' for variable",qPrint(var));
}
}
~TemplateNodeVariable()
@@ -2822,7 +2823,7 @@ class TemplateNodeIf : public TemplateNodeCreator<TemplateNodeIf>
TemplateNodeIf(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) :
TemplateNodeCreator<TemplateNodeIf>(parser,parent,line)
{
- TRACE(("{TemplateNodeIf(%s)\n",data.data()));
+ TRACE(("{TemplateNodeIf(%s)\n",qPrint(data)));
if (data.isEmpty())
{
parser->warn(m_templateName,line,"missing argument for if tag");
@@ -2861,7 +2862,7 @@ class TemplateNodeIf : public TemplateNodeCreator<TemplateNodeIf>
parser->parse(this,line,stopAt,m_falseNodes);
parser->removeNextToken(); // skip over endif
}
- TRACE(("}TemplateNodeIf(%s)\n",data.data()));
+ TRACE(("}TemplateNodeIf(%s)\n",qPrint(data)));
}
~TemplateNodeIf()
{
@@ -2918,13 +2919,13 @@ class TemplateNodeRepeat : public TemplateNodeCreator<TemplateNodeRepeat>
TemplateNodeRepeat(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeRepeat>(parser,parent,line)
{
- TRACE(("{TemplateNodeRepeat(%s)\n",data.data()));
+ TRACE(("{TemplateNodeRepeat(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
m_expr = expParser.parse(data);
StringVector stopAt = { "endrepeat" };
parser->parse(this,line,stopAt,m_repeatNodes);
parser->removeNextToken(); // skip over endrepeat
- TRACE(("}TemplateNodeRepeat(%s)\n",data.data()));
+ TRACE(("}TemplateNodeRepeat(%s)\n",qPrint(data)));
}
~TemplateNodeRepeat()
{
@@ -2972,7 +2973,7 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange>
TemplateNodeRange(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeRange>(parser,parent,line), m_down(FALSE)
{
- TRACE(("{TemplateNodeRange(%s)\n",data.data()));
+ TRACE(("{TemplateNodeRange(%s)\n",qPrint(data)));
QCString start,end;
int i1 = data.find(" from ");
int i2 = data.find(" to ");
@@ -3033,7 +3034,7 @@ class TemplateNodeRange : public TemplateNodeCreator<TemplateNodeRange>
StringVector stopAt = { "endrange" };
parser->parse(this,line,stopAt,m_loopNodes);
parser->removeNextToken(); // skip over endrange
- TRACE(("}TemplateNodeRange(%s)\n",data.data()));
+ TRACE(("}TemplateNodeRange(%s)\n",qPrint(data)));
}
~TemplateNodeRange()
@@ -3141,7 +3142,7 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor>
TemplateNodeFor(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeFor>(parser,parent,line), m_reversed(FALSE)
{
- TRACE(("{TemplateNodeFor(%s)\n",data.data()));
+ TRACE(("{TemplateNodeFor(%s)\n",qPrint(data)));
QCString exprStr;
int i = data.find(" in ");
if (i==-1)
@@ -3192,7 +3193,7 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor>
parser->parse(this,line,stopAt,m_emptyNodes);
parser->removeNextToken(); // skip over endfor
}
- TRACE(("}TemplateNodeFor(%s)\n",data.data()));
+ TRACE(("}TemplateNodeFor(%s)\n",qPrint(data)));
}
~TemplateNodeFor()
@@ -3274,7 +3275,7 @@ class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor>
}
else // simple type...
{
- ci->warn(m_templateName,m_line,"for requires a variable of list type, got type '%s'!",v.typeAsString().data());
+ ci->warn(m_templateName,m_line,"for requires a variable of list type, got type '%s'!",qPrint(v.typeAsString()));
}
}
}
@@ -3332,7 +3333,7 @@ class TemplateNodeBlock : public TemplateNodeCreator<TemplateNodeBlock>
TemplateNodeBlock(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeBlock>(parser,parent,line)
{
- TRACE(("{TemplateNodeBlock(%s)\n",data.data()));
+ TRACE(("{TemplateNodeBlock(%s)\n",qPrint(data)));
m_blockName = data;
if (m_blockName.isEmpty())
{
@@ -3341,7 +3342,7 @@ class TemplateNodeBlock : public TemplateNodeCreator<TemplateNodeBlock>
StringVector stopAt = { "endblock" };
parser->parse(this,line,stopAt,m_nodes);
parser->removeNextToken(); // skip over endblock
- TRACE(("}TemplateNodeBlock(%s)\n",data.data()));
+ TRACE(("}TemplateNodeBlock(%s)\n",qPrint(data)));
}
void render(TextStream &ts, TemplateContext *c)
@@ -3409,7 +3410,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend>
TemplateNodeExtend(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeExtend>(parser,parent,line)
{
- TRACE(("{TemplateNodeExtend(%s)\n",data.data()));
+ TRACE(("{TemplateNodeExtend(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
if (data.isEmpty())
{
@@ -3418,7 +3419,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend>
m_extendExpr = ep.parse(data);
StringVector stopAt;
parser->parse(this,line,stopAt,m_nodes);
- TRACE(("}TemplateNodeExtend(%s)\n",data.data()));
+ TRACE(("}TemplateNodeExtend(%s)\n",qPrint(data)));
}
~TemplateNodeExtend()
{
@@ -3473,7 +3474,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend>
}
else
{
- ci->warn(m_templateName,m_line,"failed to load template %s for extend",extendFile.data());
+ ci->warn(m_templateName,m_line,"failed to load template %s for extend",qPrint(extendFile));
}
}
}
@@ -3490,7 +3491,7 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
TemplateNodeInclude(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeInclude>(parser,parent,line)
{
- TRACE(("TemplateNodeInclude(%s)\n",data.data()));
+ TRACE(("TemplateNodeInclude(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
if (data.isEmpty())
{
@@ -3528,7 +3529,7 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude>
}
else
{
- ci->warn(m_templateName,m_line,"failed to load template '%s' for include",includeFile.data()?includeFile.data():"");
+ ci->warn(m_templateName,m_line,"failed to load template '%s' for include",qPrint(includeFile));
}
}
}
@@ -3566,7 +3567,7 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate>
TemplateNodeCreate(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeCreate>(parser,parent,line), m_templateExpr(0), m_fileExpr(0)
{
- TRACE(("TemplateNodeCreate(%s)\n",data.data()));
+ TRACE(("TemplateNodeCreate(%s)\n",qPrint(data)));
if (data.isEmpty())
{
parser->warn(m_templateName,line,"create tag is missing arguments");
@@ -3637,7 +3638,7 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate>
{
outputFile.prepend(ci->outputDirectory()+"/");
}
- //printf("NoteCreate(%s)\n",outputFile.data());
+ //printf("NoteCreate(%s)\n",qPrint(outputFile));
std::ofstream f(outputFile.str(),std::ofstream::out | std::ofstream::binary);
if (f.is_open())
{
@@ -3654,12 +3655,12 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate>
}
else
{
- ci->warn(m_templateName,m_line,"failed to open output file '%s' for create command",outputFile.data());
+ ci->warn(m_templateName,m_line,"failed to open output file '%s' for create command",qPrint(outputFile));
}
}
else
{
- ci->warn(m_templateName,m_line,"failed to load template '%s' for include",templateFile.data());
+ ci->warn(m_templateName,m_line,"failed to load template '%s' for include",qPrint(templateFile));
}
t->engine()->setOutputExtension("");
}
@@ -3689,7 +3690,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
TemplateNodeTree(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeTree>(parser,parent,line)
{
- TRACE(("{TemplateNodeTree(%s)\n",data.data()));
+ TRACE(("{TemplateNodeTree(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
if (data.isEmpty())
{
@@ -3699,7 +3700,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
StringVector stopAt = { "endrecursetree" };
parser->parse(this,line,stopAt,m_treeNodes);
parser->removeNextToken(); // skip over endrecursetree
- TRACE(("}TemplateNodeTree(%s)\n",data.data()));
+ TRACE(("}TemplateNodeTree(%s)\n",qPrint(data)));
}
~TemplateNodeTree()
{
@@ -3743,7 +3744,7 @@ class TemplateNodeTree : public TemplateNodeCreator<TemplateNodeTree>
}
else if (list==0)
{
- ci->warn(m_templateName,m_line,"recursetree: children attribute has type '%s' instead of list\n",v.typeAsString().data());
+ ci->warn(m_templateName,m_line,"recursetree: children attribute has type '%s' instead of list\n",qPrint(v.typeAsString()));
}
}
//else
@@ -3800,7 +3801,7 @@ class TemplateNodeIndexEntry : public TemplateNodeCreator<TemplateNodeIndexEntry
TemplateNodeIndexEntry(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeIndexEntry>(parser,parent,line)
{
- TRACE(("{TemplateNodeIndexEntry(%s)\n",data.data()));
+ TRACE(("{TemplateNodeIndexEntry(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
std::vector<QCString> args = split(data," ");
auto it = args.begin();
@@ -3826,12 +3827,12 @@ class TemplateNodeIndexEntry : public TemplateNodeCreator<TemplateNodeIndexEntry
}
else
{
- parser->warn(parser->templateName(),line,"invalid argument '%s' for indexentry tag",arg.data());
+ parser->warn(parser->templateName(),line,"invalid argument '%s' for indexentry tag",qPrint(arg));
}
++it;
}
}
- TRACE(("}TemplateNodeIndexEntry(%s)\n",data.data()));
+ TRACE(("}TemplateNodeIndexEntry(%s)\n",qPrint(data)));
}
void render(TextStream &, TemplateContext *c)
{
@@ -3862,7 +3863,7 @@ class TemplateNodeOpenSubIndex : public TemplateNodeCreator<TemplateNodeOpenSubI
TemplateNodeOpenSubIndex(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeOpenSubIndex>(parser,parent,line)
{
- TRACE(("{TemplateNodeOpenSubIndex(%s)\n",data.data()));
+ TRACE(("{TemplateNodeOpenSubIndex(%s)\n",qPrint(data)));
m_name = data.stripWhiteSpace();
if (m_name.isEmpty())
{
@@ -3870,10 +3871,10 @@ class TemplateNodeOpenSubIndex : public TemplateNodeCreator<TemplateNodeOpenSubI
}
else if (m_name.find(' ')!=-1)
{
- parser->warn(parser->templateName(),line,"Expected single argument for opensubindex tag got '%s'",data.data());
+ parser->warn(parser->templateName(),line,"Expected single argument for opensubindex tag got '%s'",qPrint(data));
m_name="";
}
- TRACE(("}TemplateNodeOpenSubIndex(%s)\n",data.data()));
+ TRACE(("}TemplateNodeOpenSubIndex(%s)\n",qPrint(data)));
}
void render(TextStream &, TemplateContext *c)
{
@@ -3898,7 +3899,7 @@ class TemplateNodeCloseSubIndex : public TemplateNodeCreator<TemplateNodeCloseSu
TemplateNodeCloseSubIndex(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeCloseSubIndex>(parser,parent,line)
{
- TRACE(("{TemplateNodeCloseSubIndex(%s)\n",data.data()));
+ TRACE(("{TemplateNodeCloseSubIndex(%s)\n",qPrint(data)));
m_name = data.stripWhiteSpace();
if (m_name.isEmpty())
{
@@ -3906,10 +3907,10 @@ class TemplateNodeCloseSubIndex : public TemplateNodeCreator<TemplateNodeCloseSu
}
else if (m_name.find(' ')!=-1 || m_name.isEmpty())
{
- parser->warn(parser->templateName(),line,"Expected single argument for closesubindex tag got '%s'",data.data());
+ parser->warn(parser->templateName(),line,"Expected single argument for closesubindex tag got '%s'",qPrint(data));
m_name="";
}
- TRACE(("}TemplateNodeCloseSubIndex(%s)\n",data.data()));
+ TRACE(("}TemplateNodeCloseSubIndex(%s)\n",qPrint(data)));
}
void render(TextStream &, TemplateContext *c)
{
@@ -3941,7 +3942,7 @@ class TemplateNodeWith : public TemplateNodeCreator<TemplateNodeWith>
TemplateNodeWith(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeWith>(parser,parent,line)
{
- TRACE(("{TemplateNodeWith(%s)\n",data.data()));
+ TRACE(("{TemplateNodeWith(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
QCString filteredData = removeSpacesAroundEquals(data);
std::vector<QCString> args = split(filteredData," ");
@@ -3960,14 +3961,14 @@ class TemplateNodeWith : public TemplateNodeCreator<TemplateNodeWith>
}
else
{
- parser->warn(parser->templateName(),line,"invalid argument '%s' for 'with' tag",arg.data());
+ parser->warn(parser->templateName(),line,"invalid argument '%s' for 'with' tag",qPrint(arg));
}
++it;
}
StringVector stopAt = { "endwith" };
parser->parse(this,line,stopAt,m_nodes);
parser->removeNextToken(); // skip over endwith
- TRACE(("}TemplateNodeWith(%s)\n",data.data()));
+ TRACE(("}TemplateNodeWith(%s)\n",qPrint(data)));
}
~TemplateNodeWith()
{
@@ -4000,7 +4001,7 @@ class TemplateNodeCycle : public TemplateNodeCreator<TemplateNodeCycle>
TemplateNodeCycle(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeCycle>(parser,parent,line)
{
- TRACE(("{TemplateNodeCycle(%s)\n",data.data()));
+ TRACE(("{TemplateNodeCycle(%s)\n",qPrint(data)));
m_index=0;
ExpressionParser expParser(parser,line);
std::vector<QCString> args = split(data," ");
@@ -4018,7 +4019,7 @@ class TemplateNodeCycle : public TemplateNodeCreator<TemplateNodeCycle>
{
parser->warn(parser->templateName(),line,"expected at least two arguments for cycle command, got %zu",m_args.size());
}
- TRACE(("}TemplateNodeCycle(%s)\n",data.data()));
+ TRACE(("}TemplateNodeCycle(%s)\n",qPrint(data)));
}
void render(TextStream &ts, TemplateContext *c)
{
@@ -4081,7 +4082,7 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet>
TemplateNodeSet(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeSet>(parser,parent,line)
{
- TRACE(("{TemplateNodeSet(%s)\n",data.data()));
+ TRACE(("{TemplateNodeSet(%s)\n",qPrint(data)));
ExpressionParser expParser(parser,line);
// data format: name=expression
int j=data.find('=');
@@ -4090,7 +4091,7 @@ class TemplateNodeSet : public TemplateNodeCreator<TemplateNodeSet>
{
m_mapping = std::make_unique<Mapping>(data.left(j),expr);
}
- TRACE(("}TemplateNodeSet(%s)\n",data.data()));
+ TRACE(("}TemplateNodeSet(%s)\n",qPrint(data)));
}
~TemplateNodeSet()
{
@@ -4148,7 +4149,7 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
TemplateNodeMarkers(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeMarkers>(parser,parent,line), m_listExpr(0), m_patternExpr(0)
{
- TRACE(("{TemplateNodeMarkers(%s)\n",data.data()));
+ TRACE(("{TemplateNodeMarkers(%s)\n",qPrint(data)));
int i = data.find(" in ");
int w = data.find(" with ");
if (i==-1 || w==-1 || w<i)
@@ -4165,7 +4166,7 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
StringVector stopAt = { "endmarkers" };
parser->parse(this,line,stopAt,m_nodes);
parser->removeNextToken(); // skip over endmarkers
- TRACE(("}TemplateNodeMarkers(%s)\n",data.data()));
+ TRACE(("}TemplateNodeMarkers(%s)\n",qPrint(data)));
}
~TemplateNodeMarkers()
{
@@ -4202,7 +4203,7 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers>
std::string part = str.substr(index,newIndex-index);
if (ci->needsRecoding())
{
- ts << ci->recode(part); // write text before marker
+ ts << ci->recode(QCString(part)); // write text before marker
}
else
{
@@ -4297,7 +4298,7 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
TemplateNodeResource(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeResource>(parser,parent,line)
{
- TRACE(("{TemplateNodeResource(%s)\n",data.data()));
+ TRACE(("{TemplateNodeResource(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
int i;
if (data.isEmpty())
@@ -4316,7 +4317,7 @@ class TemplateNodeResource : public TemplateNodeCreator<TemplateNodeResource>
m_resExpr = ep.parse(data);
m_asExpr = 0;
}
- TRACE(("}TemplateNodeResource(%s)\n",data.data()));
+ TRACE(("}TemplateNodeResource(%s)\n",qPrint(data)));
}
~TemplateNodeResource()
{
@@ -4371,7 +4372,7 @@ class TemplateNodeEncoding : public TemplateNodeCreator<TemplateNodeEncoding>
TemplateNodeEncoding(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data)
: TemplateNodeCreator<TemplateNodeEncoding>(parser,parent,line)
{
- TRACE(("{TemplateNodeEncoding(%s)\n",data.data()));
+ TRACE(("{TemplateNodeEncoding(%s)\n",qPrint(data)));
ExpressionParser ep(parser,line);
if (data.isEmpty())
{
@@ -4385,7 +4386,7 @@ class TemplateNodeEncoding : public TemplateNodeCreator<TemplateNodeEncoding>
StringVector stopAt = { "endencoding" };
parser->parse(this,line,stopAt,m_nodes);
parser->removeNextToken(); // skip over endencoding
- TRACE(("}TemplateNodeEncoding(%s)\n",data.data()));
+ TRACE(("}TemplateNodeEncoding(%s)\n",qPrint(data)));
}
~TemplateNodeEncoding()
{
@@ -4568,7 +4569,7 @@ class TemplateLexer
{ m_openChar=openChar; m_closeChar=closeChar; }
private:
void addToken(TemplateTokenStream &tokens,
- const char *data,int line,int startPos,int endPos,
+ const QCString &data,int line,int startPos,int endPos,
TemplateToken::Type type);
void reset();
const TemplateEngine *m_engine = 0;
@@ -4600,8 +4601,8 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
StateEndVariable
};
+ if (m_data.isEmpty()) return;
const char *p=m_data.data();
- if (p==0) return;
int state=StateText;
int pos=0;
int lastTokenPos=0;
@@ -4668,10 +4669,10 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
{
// found tag!
state=StateText;
- addToken(tokens,m_data.data(),line,lastTokenPos,
+ addToken(tokens,m_data,line,lastTokenPos,
emptyOutputLine ? startLinePos : markStartPos,
TemplateToken::Text);
- addToken(tokens,m_data.data(),line,markStartPos+2,
+ addToken(tokens,m_data,line,markStartPos+2,
pos-1,TemplateToken::Block);
lastTokenPos = pos+1;
}
@@ -4701,7 +4702,7 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
{
// found comment tag!
state=StateText;
- addToken(tokens,m_data.data(),line,lastTokenPos,
+ addToken(tokens,m_data,line,lastTokenPos,
emptyOutputLine ? startLinePos : markStartPos,
TemplateToken::Text);
lastTokenPos = pos+1;
@@ -4749,10 +4750,10 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
{
// found variable tag!
state=StateText;
- addToken(tokens,m_data.data(),line,lastTokenPos,
+ addToken(tokens,m_data,line,lastTokenPos,
emptyOutputLine ? startLinePos : markStartPos,
TemplateToken::Text);
- addToken(tokens,m_data.data(),line,markStartPos+2,
+ addToken(tokens,m_data,line,markStartPos+2,
pos-1,TemplateToken::Variable);
lastTokenPos = pos+1;
}
@@ -4782,22 +4783,21 @@ void TemplateLexer::tokenize(TemplateTokenStream &tokens)
}
if (lastTokenPos<pos)
{
- addToken(tokens,m_data.data(),line,
+ addToken(tokens,m_data,line,
lastTokenPos,pos,
TemplateToken::Text);
}
}
void TemplateLexer::addToken(TemplateTokenStream &tokens,
- const char *data,int line,
+ const QCString &data,int line,
int startPos,int endPos,
TemplateToken::Type type)
{
if (startPos<endPos)
{
int len = endPos-startPos+1;
- QCString text(len);
- qstrncpy(text.rawData(),data+startPos,len);
+ QCString text = data.mid(startPos,len);
if (type!=TemplateToken::Text) text = text.stripWhiteSpace();
tokens.push_back(std::make_unique<TemplateToken>(type,text,line));
}
@@ -4822,7 +4822,7 @@ void TemplateParser::parse(
{
auto tok = takeNextToken();
//printf("%p:Token type=%d data='%s' line=%d\n",
- // parent,tok->type,tok->data.data(),tok->line);
+ // parent,tok->type,qPrint(tok->data),tok->line);
switch(tok->type)
{
case TemplateToken::Text:
@@ -4840,7 +4840,7 @@ void TemplateParser::parse(
command=command.left(sep);
}
TemplateToken *tok_ptr = tok.get();
- if (std::find(stopAt.begin(),stopAt.end(),command)!=stopAt.end())
+ if (std::find(stopAt.begin(),stopAt.end(),command.str())!=stopAt.end())
{
prependToken(std::move(tok));
TRACE(("}TemplateParser::parse: stop\n"));
@@ -4866,11 +4866,11 @@ void TemplateParser::parse(
command=="endrange" || command=="endtabbing" ||
command=="endencoding")
{
- warn(m_templateName,tok_ptr->line,"Found tag '%s' without matching start tag",command.data());
+ warn(m_templateName,tok_ptr->line,"Found tag '%s' without matching start tag",qPrint(command));
}
else
{
- warn(m_templateName,tok_ptr->line,"Unknown tag '%s'",command.data());
+ warn(m_templateName,tok_ptr->line,"Unknown tag '%s'",qPrint(command));
}
}
break;
@@ -4885,7 +4885,7 @@ void TemplateParser::parse(
options+=s.c_str();
}
warn(m_templateName,line,"Unclosed tag in template, expected one of: %s",
- options.data());
+ qPrint(options));
}
TRACE(("}TemplateParser::parse: last token\n"));
}
@@ -4918,7 +4918,7 @@ void TemplateParser::prependToken(TemplateTokenPtr &&token)
m_tokens.push_front(std::move(token));
}
-void TemplateParser::warn(const char *fileName,int line,const char *fmt,...) const
+void TemplateParser::warn(const QCString &fileName,int line,const char *fmt,...) const
{
va_list args;
va_start(args,fmt);
@@ -4951,7 +4951,7 @@ TemplateImpl::TemplateImpl(TemplateEngine *engine,const QCString &name,const QCS
TemplateImpl::~TemplateImpl()
{
- //printf("deleting template %s\n",m_name.data());
+ //printf("deleting template %s\n",qPrint(m_name));
}
void TemplateImpl::render(TextStream &ts, TemplateContext *c)
@@ -5007,7 +5007,7 @@ class TemplateEngine::Private
{
//for (int i=0;i<m_indent;i++) printf(" ");
//m_indent++;
- //printf("loadByName(%s,%d) {\n",fileName.data(),line);
+ //printf("loadByName(%s,%d) {\n",qPrint(fileName),line);
m_includeStack.emplace_back(IncludeEntry::Template,fileName,QCString(),line);
auto kv = m_templateCache.find(fileName.str());
if (kv==m_templateCache.end()) // first time template is referenced
@@ -5038,7 +5038,7 @@ class TemplateEngine::Private
}
else
{
- err("Could not open template file %s\n",fileName.data());
+ err("Could not open template file %s\n",qPrint(fileName));
}
}
}
@@ -5058,7 +5058,7 @@ class TemplateEngine::Private
{
//for (int i=0;i<m_indent;i++) printf(" ");
//m_indent++;
- //printf("enterBlock(%s,%s,%d) {\n",fileName.data(),blockName.data(),line);
+ //printf("enterBlock(%s,%s,%d) {\n",qPrint(fileName),qPrint(blockName),line);
m_includeStack.emplace_back(IncludeEntry::Block,fileName,blockName,line);
}
@@ -5070,7 +5070,7 @@ class TemplateEngine::Private
m_includeStack.pop_back();
}
- void printIncludeContext(const char *fileName,int line) const
+ void printIncludeContext(const QCString &fileName,int line) const
{
auto it = m_includeStack.rbegin();
while (it!=m_includeStack.rend())
@@ -5082,18 +5082,18 @@ class TemplateEngine::Private
{
if (next)
{
- warn(fileName,line," inside template '%s' included from template '%s' at line %d",ie.fileName().data(),next->fileName().data(),ie.line());
+ warn(fileName,line," inside template '%s' included from template '%s' at line %d",qPrint(ie.fileName()),qPrint(next->fileName()),ie.line());
}
}
else // ie.type()==IncludeEntry::Block
{
- warn(fileName,line," included by block '%s' inside template '%s' at line %d",ie.blockName().data(),
- ie.fileName().data(),ie.line());
+ warn(fileName,line," included by block '%s' inside template '%s' at line %d",qPrint(ie.blockName()),
+ qPrint(ie.fileName()),ie.line());
}
}
}
- void setOutputExtension(const char *extension)
+ void setOutputExtension(const QCString &extension)
{
m_extension = extension;
}
@@ -5103,7 +5103,7 @@ class TemplateEngine::Private
return m_extension;
}
- void setTemplateDir(const char *dirName)
+ void setTemplateDir(const QCString &dirName)
{
m_templateDirName = dirName;
}
@@ -5157,12 +5157,12 @@ void TemplateEngine::leaveBlock()
p->leaveBlock();
}
-void TemplateEngine::printIncludeContext(const char *fileName,int line) const
+void TemplateEngine::printIncludeContext(const QCString &fileName,int line) const
{
p->printIncludeContext(fileName,line);
}
-void TemplateEngine::setOutputExtension(const char *extension)
+void TemplateEngine::setOutputExtension(const QCString &extension)
{
p->setOutputExtension(extension);
}
@@ -5172,7 +5172,7 @@ QCString TemplateEngine::outputExtension() const
return p->outputExtension();
}
-void TemplateEngine::setTemplateDir(const char *dirName)
+void TemplateEngine::setTemplateDir(const QCString &dirName)
{
p->setTemplateDir(dirName);
}
diff --git a/src/template.h b/src/template.h
index 879231e..dee063d 100644
--- a/src/template.h
+++ b/src/template.h
@@ -412,7 +412,7 @@ class TemplateStructIntf
/** Gets the value for a field name.
* @param[in] name The name of the field.
*/
- virtual TemplateVariant get(const char *name) const = 0;
+ virtual TemplateVariant get(const QCString &name) const = 0;
/** Increase object's reference count */
virtual int addRef() = 0;
@@ -427,7 +427,7 @@ class TemplateStruct : public TemplateStructIntf
{
public:
// TemplateStructIntf methods
- virtual TemplateVariant get(const char *name) const;
+ virtual TemplateVariant get(const QCString &name) const;
virtual int addRef();
virtual int release();
@@ -438,7 +438,7 @@ class TemplateStruct : public TemplateStructIntf
* @param[in] name The name of the field.
* @param[in] v The value to set.
*/
- virtual void set(const char *name,const TemplateVariant &v);
+ virtual void set(const QCString &name,const TemplateVariant &v);
private:
@@ -505,7 +505,7 @@ class TemplateContext
* @note When a given key is already present,
* its value will be replaced by \a v
*/
- virtual void set(const char *name,const TemplateVariant &v) = 0;
+ virtual void set(const QCString &name,const TemplateVariant &v) = 0;
/** Gets the value for a given key
* @param[in] name The name of key.
@@ -590,10 +590,10 @@ class TemplateEngine
void unload(Template *t);
/** Prints the current template file include stack */
- void printIncludeContext(const char *fileName,int line) const;
+ void printIncludeContext(const QCString &fileName,int line) const;
/** Sets the search directory where to look for template files */
- void setTemplateDir(const char *dirName);
+ void setTemplateDir(const QCString &dirName);
private:
friend class TemplateNodeBlock;
@@ -605,7 +605,7 @@ class TemplateEngine
/** Sets the extension of the output file. This is used to control the
* format of 'special' tags in the template
*/
- void setOutputExtension(const char *extension);
+ void setOutputExtension(const QCString &extension);
/** Returns the output extension, set via setOutputExtension() */
QCString outputExtension() const;
diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp
index c40cbd9..47cd56e 100644
--- a/src/textdocvisitor.cpp
+++ b/src/textdocvisitor.cpp
@@ -50,11 +50,11 @@ void TextDocVisitor::visit(DocEmoji *s)
}
}
-void TextDocVisitor::filter(const char *str)
+void TextDocVisitor::filter(const QCString &str)
{
- if (str==0) return;
+ if (str.isEmpty()) return;
//printf("TextDocVisitor::filter(%s)\n",str);
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h
index ef08721..7439b6b 100644
--- a/src/textdocvisitor.h
+++ b/src/textdocvisitor.h
@@ -134,7 +134,7 @@ class TextDocVisitor : public DocVisitor
private:
- void filter(const char *str);
+ void filter(const QCString &str);
TextStream &m_t;
};
diff --git a/src/tooltip.cpp b/src/tooltip.cpp
index f8222d7..5768b0a 100644
--- a/src/tooltip.cpp
+++ b/src/tooltip.cpp
@@ -56,15 +56,10 @@ TooltipManager::~TooltipManager()
{
}
-static QCString escapeId(const char *s)
+static QCString escapeId(const QCString &s)
{
QCString res=s;
- char *p=res.rawData();
- while (*p)
- {
- if (!isId(*p)) *p='_';
- p++;
- }
+ for (uint i=0;i<res.length();i++) if (!isId(res[i])) res[i]='_';
return res;
}
diff --git a/src/translator.h b/src/translator.h
index 89e4216..02f2ccf 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -31,7 +31,7 @@ class Translator
* if the user chooses a language whose translation is not up to date.
* It is implemented by the adapter classes.
*/
- virtual QCString updateNeededMessage() { return ""; }
+ virtual QCString updateNeededMessage() { return QCString(); }
virtual ~Translator() {}
// Please, have a look at comments inside the translator_en.h file
@@ -49,22 +49,22 @@ class Translator
* this routine. In case no font encoding is required the empty string
* can be returned.
*/
- virtual QCString latexFontenc() { return "T1"; }
+ virtual QCString latexFontenc() { return QCString("T1"); }
virtual QCString latexFont() {
- return "\\usepackage[scaled=.90]{helvet}\n"
+ return QCString("\\usepackage[scaled=.90]{helvet}\n"
"\\usepackage{courier}\n"
- "\\renewcommand{\\familydefault}{\\sfdefault}\n";
+ "\\renewcommand{\\familydefault}{\\sfdefault}\n");
}
/*!
* Sets the commands to be inserted directly after the `\\begin{document}`
* in the LaTeX document.
*/
- virtual QCString latexDocumentPre() { return ""; }
+ virtual QCString latexDocumentPre() { return QCString(""); }
/*!
* Sets the commands to be inserted directly before the `\\end{document}`
* in the LaTeX document.
*/
- virtual QCString latexDocumentPost() { return ""; }
+ virtual QCString latexDocumentPost() { return QCString(""); }
/*!
* Set the name to be used as latex command.
*/
@@ -94,7 +94,7 @@ class Translator
virtual QCString trMemberList() = 0;
virtual QCString trThisIsTheListOfAllMembers() = 0;
virtual QCString trIncludingInheritedMembers() = 0;
- virtual QCString trGeneratedAutomatically(const char *s) = 0;
+ virtual QCString trGeneratedAutomatically(const QCString &s) = 0;
virtual QCString trEnumName() = 0;
virtual QCString trEnumValue() = 0;
virtual QCString trDefinedIn() = 0;
@@ -149,9 +149,9 @@ class Translator
virtual QCString trFunctionDocumentation() = 0;
virtual QCString trVariableDocumentation() = 0;
virtual QCString trCompounds() = 0;
- virtual QCString trGeneratedAt(const char *date,const char *projName) = 0;
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName) = 0;
//virtual QCString trWrittenBy() = 0;
- virtual QCString trClassDiagram(const char *clName) = 0;
+ virtual QCString trClassDiagram(const QCString &clName) = 0;
virtual QCString trForInternalUseOnly() = 0;
//virtual QCString trReimplementedForInternalReasons() = 0;
virtual QCString trWarning() = 0;
@@ -182,12 +182,12 @@ class Translator
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate) = 0;
- virtual QCString trFileReference(const char *fileName) = 0;
- virtual QCString trNamespaceReference(const char *namespaceName) = 0;
+ virtual QCString trFileReference(const QCString &fileName) = 0;
+ virtual QCString trNamespaceReference(const QCString &namespaceName) = 0;
virtual QCString trPublicMembers() = 0;
virtual QCString trPublicSlots() = 0;
@@ -249,8 +249,8 @@ class Translator
// new since 1.0.0
//////////////////////////////////////////////////////////////////////////
- virtual QCString trCollaborationDiagram(const char *clName) = 0;
- virtual QCString trInclDepGraph(const char *fName) = 0;
+ virtual QCString trCollaborationDiagram(const QCString &clName) = 0;
+ virtual QCString trInclDepGraph(const QCString &fName) = 0;
virtual QCString trConstructorDocumentation() = 0;
virtual QCString trGotoSourceCode() = 0;
virtual QCString trGotoDocumentation() = 0;
@@ -331,7 +331,7 @@ class Translator
//virtual QCString trInterfaces() = 0;
virtual QCString trClasses() = 0;
- virtual QCString trPackage(const char *name) = 0;
+ virtual QCString trPackage(const QCString &name) = 0;
virtual QCString trPackageList() = 0;
virtual QCString trPackageListDescription() = 0;
virtual QCString trPackages() = 0;
@@ -497,7 +497,7 @@ class Translator
virtual QCString trDirDocumentation() = 0;
virtual QCString trDirectories() = 0;
virtual QCString trDirDescription() = 0;
- virtual QCString trDirReference(const char *dirName) = 0;
+ virtual QCString trDirReference(const QCString &dirName) = 0;
virtual QCString trDir(bool first_capital, bool singular) = 0;
//////////////////////////////////////////////////////////////////////////
@@ -529,10 +529,10 @@ class Translator
virtual QCString trDataTypes() = 0;
virtual QCString trModulesList() = 0;
virtual QCString trModulesListDescription(bool extractAll) = 0;
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate) = 0;
- virtual QCString trModuleReference(const char *namespaceName) = 0;
+ virtual QCString trModuleReference(const QCString &namespaceName) = 0;
virtual QCString trModulesMembers() = 0;
virtual QCString trModulesMemberDescription(bool extractAll) = 0;
virtual QCString trModulesIndex() = 0;
@@ -547,7 +547,7 @@ class Translator
// new since 1.6.0
//////////////////////////////////////////////////////////////////////////
- virtual QCString trDirRelation(const char *name) = 0;
+ virtual QCString trDirRelation(const QCString &name) = 0;
virtual QCString trLoading() = 0;
virtual QCString trGlobalNamespace() = 0;
virtual QCString trSearching() = 0;
@@ -557,9 +557,9 @@ class Translator
// new since 1.6.3
//////////////////////////////////////////////////////////////////////////
- //virtual QCString trDirDependency(const char *name) = 0;
- virtual QCString trFileIn(const char *name) = 0;
- virtual QCString trIncludesFileIn(const char *name) = 0;
+ //virtual QCString trDirDependency(const QCString &name) = 0;
+ virtual QCString trFileIn(const QCString &name) = 0;
+ virtual QCString trIncludesFileIn(const QCString &name) = 0;
virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
int hour,int minutes,int seconds,
bool includeTime) = 0;
@@ -570,7 +570,7 @@ class Translator
virtual QCString trCiteReferences() = 0;
virtual QCString trCopyright() = 0;
- virtual QCString trDirDepGraph(const char *name) = 0;
+ virtual QCString trDirDepGraph(const QCString &name) = 0;
//////////////////////////////////////////////////////////////////////////
// new since 1.8.0
@@ -580,8 +580,8 @@ class Translator
virtual QCString trTemplateParameters() = 0;
virtual QCString trAndMore(const QCString &number) = 0;
virtual QCString trEnumGeneratedFromFiles(bool single) = 0;
- virtual QCString trEnumReference(const char *name) = 0;
- virtual QCString trInheritedFrom(const char *members,const char *what) = 0;
+ virtual QCString trEnumReference(const QCString &name) = 0;
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what) = 0;
virtual QCString trAdditionalInheritedMembers() = 0;
//////////////////////////////////////////////////////////////////////////
@@ -602,9 +602,9 @@ class Translator
virtual QCString trInterfaces() = 0;
virtual QCString trServices() = 0;
virtual QCString trConstantGroups() = 0;
- virtual QCString trConstantGroupReference(const char *namespaceName) = 0;
- virtual QCString trServiceReference(const char *sName) = 0;
- virtual QCString trSingletonReference(const char *sName) = 0;
+ virtual QCString trConstantGroupReference(const QCString &namespaceName) = 0;
+ virtual QCString trServiceReference(const QCString &sName) = 0;
+ virtual QCString trSingletonReference(const QCString &sName) = 0;
virtual QCString trServiceGeneratedFromFiles(bool single) = 0;
virtual QCString trSingletonGeneratedFromFiles(bool single) = 0;
@@ -620,7 +620,7 @@ class Translator
virtual QCString trDesignUnits() = 0;
virtual QCString trFunctionAndProc() = 0;
virtual QCString trVhdlType(uint64 type,bool single) = 0;
- virtual QCString trCustomReference(const char *name) = 0;
+ virtual QCString trCustomReference(const QCString &name) = 0;
virtual QCString trConstants() = 0;
virtual QCString trConstantDocumentation() = 0;
@@ -646,7 +646,7 @@ class Translator
virtual QCString trExceptionHierarchy() = 0;
virtual QCString trExceptionHierarchyDescription() = 0;
virtual QCString trExceptionDocumentation() = 0;
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal) = 0;
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal) = 0;
virtual QCString trOperations() = 0;
virtual QCString trOperationDocumentation() = 0;
virtual QCString trDataMembers() = 0;
@@ -663,7 +663,7 @@ class Translator
//////////////////////////////////////////////////////////////////////////
virtual QCString trConcept(bool first_capital, bool singular) = 0;
- virtual QCString trConceptReference(const char *conceptName) = 0;
+ virtual QCString trConceptReference(const QCString &conceptName) = 0;
virtual QCString trConceptList() = 0;
virtual QCString trConceptIndex() = 0;
virtual QCString trConceptDocumentation() = 0;
diff --git a/src/translator_adapter.h b/src/translator_adapter.h
index ad08910..54a0a35 100644
--- a/src/translator_adapter.h
+++ b/src/translator_adapter.h
@@ -50,7 +50,7 @@ class TranslatorAdapter_1_9_2 : public TranslatorAdapterBase
virtual QCString trConcept(bool first_capital,bool singular)
{ return english.trConcept(first_capital,singular); }
- virtual QCString trConceptReference(const char *conceptName)
+ virtual QCString trConceptReference(const QCString &conceptName)
{ return english.trConceptReference(conceptName); }
virtual QCString trConceptList()
@@ -109,7 +109,7 @@ class TranslatorAdapter_1_8_15 : public TranslatorAdapter_1_8_19
virtual QCString trVhdlType(uint64 type,bool single)
{ return english.trVhdlType(type,single); }
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return english.trCustomReference(name); }
virtual QCString trConstants()
@@ -184,7 +184,7 @@ class TranslatorAdapter_1_8_15 : public TranslatorAdapter_1_8_19
virtual QCString trExceptionDocumentation()
{ return english.trExceptionDocumentation(); }
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{ return english.trCompoundReferenceSlice(clName,compType,isLocal); }
virtual QCString trOperations()
@@ -215,13 +215,13 @@ class TranslatorAdapter_1_8_4 : public TranslatorAdapter_1_8_15
virtual QCString trConstantGroups()
{ return english.trConstantGroups(); }
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{ return english.trConstantGroupReference(namespaceName); }
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{ return english.trServiceReference(sName); }
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{ return english.trSingletonReference(sName); }
virtual QCString trServiceGeneratedFromFiles(bool single)
@@ -278,10 +278,10 @@ class TranslatorAdapter_1_8_0 : public TranslatorAdapter_1_8_2
virtual QCString trEnumGeneratedFromFiles(bool single)
{ return english.trEnumGeneratedFromFiles(single); }
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return english.trEnumReference(name); }
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return english.trInheritedFrom(members,what); }
virtual QCString trAdditionalInheritedMembers()
@@ -304,12 +304,12 @@ class TranslatorAdapter_1_7_5 : public TranslatorAdapter_1_8_0
virtual QCString trCopyright()
{ return english.trCopyright(); }
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return english.trDirDepGraph(name); }
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{ return english.trFileIn(name); }
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{ return english.trIncludesFileIn(name); }
virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
int hour,int minutes,int seconds,
@@ -326,7 +326,7 @@ class TranslatorAdapter_1_6_0 : public TranslatorAdapter_1_7_5
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.6.0"); }
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{ return english.trDirRelation(name); }
virtual QCString trLoading()
@@ -377,12 +377,12 @@ class TranslatorAdapter_1_6_0 : public TranslatorAdapter_1_7_5
virtual QCString trModulesListDescription(bool extractAll)
{ return english.trModulesListDescription(extractAll); }
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{ return english.trCompoundReferenceFortran(clName,compType,isTemplate); }
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{ return english.trModuleReference(namespaceName); }
virtual QCString trModulesMembers()
diff --git a/src/translator_am.h b/src/translator_am.h
index 812d8fb..6e7a9a8 100644
--- a/src/translator_am.h
+++ b/src/translator_am.h
@@ -108,9 +108,9 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Ավտոմատ ստեղծված է ելքային կոդից, Doxygen-ի միջոցով, ";
- if (s) result+=s+(QCString)" համար:";
+ if (!s.isEmpty()) result+=s+(QCString)" համար:";
return result;
}
@@ -457,16 +457,16 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Ստեղծվել է "+date;
- if (projName) result+=projName+QCString(" -ի համար,");
+ if (!projName.isEmpty()) result+=projName+QCString(" -ի համար,");
result+=(QCString)" հետևյալ համակարգով.";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return clName+QCString(" -ի ժառանգման գծագիրը.");
}
@@ -545,7 +545,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -583,13 +583,13 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
return fileName+QCString(" ֆայլեր");
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" անունների տարածություններ";
@@ -787,12 +787,12 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)clName+"-ի համագործակցությունների գծագիր.";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)fName+"-ի ներառումների կախվածությունների գծագիր.";
}
@@ -1074,7 +1074,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Փաթեթ "+name;
}
@@ -1446,7 +1446,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Ֆայլադարան"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1572,7 +1572,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1609,7 +1609,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
return QCString("Մոդուլ ") + namespaceName;
}
@@ -1705,7 +1705,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Կապ";
}
@@ -1742,7 +1742,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Ֆայլը " + name + " ում";
}
@@ -1751,7 +1751,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Ներառում է ֆայլը " + name + " ում";
}
@@ -1798,7 +1798,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
{ return "Հեղինակային իրավունք"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return name + QCString("-ի ֆայլադարանների կախվածությունների գծագիր:"); }
};
diff --git a/src/translator_ar.h b/src/translator_ar.h
index 0989249..f847f5b 100644
--- a/src/translator_ar.h
+++ b/src/translator_ar.h
@@ -133,9 +133,9 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="تم تكوينها آليا بواسطة Doxygen";
- if (s) result+=(QCString)" لـ "+s;
+ if (!s.isEmpty()) result+=(QCString)" لـ "+s;
result+=" من ملفات المصدر.";
return result;
}
@@ -513,16 +513,16 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generated on "+date;
- if (projName) result+=(QCString)" for "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" for "+projName;
result+=(QCString)" by";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Inheritance diagram for "+clName+":";
}
@@ -609,7 +609,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -631,7 +631,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" File Reference";
@@ -639,7 +639,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Reference";
@@ -840,12 +840,12 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"رسم التعاون لـ "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"رسم اعتمادية التضمين لـ "+fName+":";
}
@@ -1131,7 +1131,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"حزمة "+name;
}
@@ -1541,7 +1541,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=" مرجع الدليل"; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
diff --git a/src/translator_br.h b/src/translator_br.h
index 533e6cd..baa4710 100644
--- a/src/translator_br.h
+++ b/src/translator_br.h
@@ -164,9 +164,9 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Gerado automaticamente por Doxygen";
- if (s) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=(QCString)" para "+s;
result+=" a partir do código-fonte.";
return result;
}
@@ -530,16 +530,16 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Gerado em "+date;
- if (projName) result+=(QCString)" para "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" para "+projName;
result+=(QCString)" por";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama de hierarquia para "+clName+":";
}
@@ -618,7 +618,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -648,7 +648,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result = "Referência do Arquivo ";
result += fileName;
@@ -656,7 +656,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result ="Refência do Namespace ";
result += namespaceName;
@@ -882,12 +882,12 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de colaboração para "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Gráfico de dependência de inclusões para "+fName+":";
}
@@ -1170,7 +1170,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pacote "+name;
}
@@ -1566,7 +1566,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result = "Referência do diretório ";
result += dirName;
@@ -1695,7 +1695,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1719,7 +1719,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result = "Referência do Módulo ";
result += namespaceName;
@@ -1826,7 +1826,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relação " + QCString(name);
}
@@ -1863,7 +1863,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Arquivo em "+name;
}
@@ -1872,7 +1872,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inclui arquivo em "+name;
}
@@ -1921,7 +1921,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
}
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Grafo de dependências do diretório ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1952,14 +1952,14 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{
QCString result = "Referência da enumeração ";
return result + name;
}
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" herdados de "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2040,21 +2040,21 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
{ return "Grupos de Constantes"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result = "Referência do grupo de constantes ";
result += namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result = "Referência do serviço ";
result += sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
// TODO: Emerson Ferreira proposes to add emphasis around the word
// Singleton but I'm not sure if this will work for non HTML generators.
@@ -2203,7 +2203,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
return "Classe";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return "Referência de " + QCString(name); }
/* Slice */
@@ -2303,7 +2303,7 @@ class TranslatorBrazilian : public TranslatorAdapter_1_9_2
{
return "Exceções";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)"Referência ";
switch(compType)
diff --git a/src/translator_ca.h b/src/translator_ca.h
index 7a7e79a..98f2ece 100644
--- a/src/translator_ca.h
+++ b/src/translator_ca.h
@@ -142,9 +142,9 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generat automàticament per Doxygen";
- if (s) result+=(QCString)" per a "+s;
+ if (!s.isEmpty()) result+=(QCString)" per a "+s;
result+=" a partir del codi font.";
return result;
}
@@ -504,16 +504,16 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generat a "+date;
- if (projName) result+=(QCString)" per a "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" per a "+projName;
result+=(QCString)" per";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama d'Herència per a "+clName+":";
}
@@ -592,7 +592,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -614,7 +614,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Referència del Fitxer ";
result+=fileName;
@@ -622,7 +622,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Referència de l'Espai de Noms ";
result+=namespaceName;
@@ -823,12 +823,12 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de col·laboració per a "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Inclou el graf de dependències per a "+fName+":";
}
@@ -1102,7 +1102,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paquet "+name;
}
@@ -1496,7 +1496,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Referència del Directori "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1623,7 +1623,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1645,7 +1645,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Referència del Mòdul ";
result+=namespaceName;
@@ -1753,7 +1753,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relació";
}
@@ -1790,7 +1790,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fitxer a "+name;
}
@@ -1799,7 +1799,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inclou fitxer a "+name;
}
@@ -1844,7 +1844,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Graf de dependència de directoris per a ")+name+":"; }
diff --git a/src/translator_cn.h b/src/translator_cn.h
index a3b5803..8d3aa5e 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -135,10 +135,10 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result;
result = "由" CN_SPC "Doyxgen" CN_SPC "通过分析" CN_SPC;
- if (s) result += ((QCString)s+CN_SPC "的" CN_SPC);
+ if (!s.isEmpty()) result += ((QCString)s+CN_SPC "的" CN_SPC);
result+= "源代码自动生成.";
return result;
}
@@ -391,14 +391,14 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
}
- virtual QCString trGeneratedAt(const char *date,const char *projName)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{ QCString result=(QCString)"生成于" CN_SPC+date;
- if (projName) result+=(QCString)CN_SPC ", 为" CN_SPC+projName;
+ if (!projName.isEmpty()) result+=(QCString)CN_SPC ", 为" CN_SPC+projName;
result+=(QCString)"使用" CN_SPC;
return result;
}
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"类" CN_SPC+clName+CN_SPC "继承关系图:";
}
@@ -459,7 +459,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
// used as the title of the HTML page of a class/struct/union
@@ -482,7 +482,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=CN_SPC "文件参考";
@@ -490,7 +490,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{ QCString result=namespaceName;
result+=CN_SPC "命名空间参考";
return result;
@@ -697,13 +697,13 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)clName+CN_SPC "的协作图:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)fName+CN_SPC "的引用(Include)关系图:";
}
@@ -1005,7 +1005,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"包" CN_SPC+name;
}
@@ -1441,7 +1441,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result=dirName;
result+=CN_SPC "目录参考";
@@ -1574,7 +1574,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1596,7 +1596,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result += CN_SPC "模块参考手册";
@@ -1696,7 +1696,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
// new since 1.6.0
//////////////////////////////////////////////////////////////////////////
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
// return QCString(name)+" Relation";
// unsure
@@ -1727,12 +1727,12 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
// new since 1.6.3
//////////////////////////////////////////////////////////////////////////
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"文件在"+CN_SPC+name;
}
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"在" CN_SPC+name+CN_SPC "中引用";
}
@@ -1770,7 +1770,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
{ return "版权所有"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{
return QCString(name)+CN_SPC "的目录依赖关系图";
}
@@ -1796,11 +1796,11 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
{ return "枚举说明文档从下列文件生成:"; }
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+CN_SPC "枚举类型参考"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+CN_SPC "继承自" CN_SPC+what; }
/*! Header of the sections with inherited members specific for the
@@ -1883,21 +1883,21 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
{ return "常量组"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+= CN_SPC "常量组参考";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+= CN_SPC "服务参考";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+= CN_SPC "单例参考";
diff --git a/src/translator_cz.h b/src/translator_cz.h
index 4fb3bc2..1ce249e 100644
--- a/src/translator_cz.h
+++ b/src/translator_cz.h
@@ -172,10 +172,10 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result("Generováno automaticky programem Doxygen "
"ze zdrojových textů");
- if (s) result += QCString(" projektu ") + s;
+ if (!s.isEmpty()) result += QCString(" projektu ") + s;
result += ".";
return result;
}
@@ -542,18 +542,17 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result("Generováno ");
result += date;
- if (projName)
- result += QCString(" pro projekt ") + projName;
+ if (!projName.isEmpty()) result += QCString(" pro projekt ") + projName;
result += " programem";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return QCString("Diagram dědičnosti pro třídu ") + clName;
}
@@ -630,7 +629,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -652,7 +651,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result("Dokumentace souboru ");
result+=fileName;
@@ -660,7 +659,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result("Dokumentace prostoru jmen ");
result+=namespaceName;
@@ -872,12 +871,12 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagram tříd pro "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf závislostí na vkládaných souborech "
"pro "+fName+":";
@@ -1162,7 +1161,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
return "Třídy";
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return QCString("Balík ") + name;
}
@@ -1535,7 +1534,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result = "Reference k adresáři ";
result += dirName;
@@ -1671,7 +1670,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1693,7 +1692,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Dokumentace modulu ";
result += namespaceName;
@@ -1793,7 +1792,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relace " + QCString(name);
}
@@ -1830,7 +1829,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Soubor v "+name;
}
@@ -1839,7 +1838,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Vkládá (include) soubor z "+name;
}
@@ -1884,7 +1883,7 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Graf závislosti na adresářích pro ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1914,11 +1913,11 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return "Reference k výčtu "+QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" dědí se z "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1999,21 +1998,21 @@ class TranslatorCzech : public TranslatorAdapter_1_8_15
{ return "Konstantní skupiny"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result="Konstantní skupiny z ";
result += namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result="Popis služby ";
result += sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result="Popis singletonu ";
result += sName;
diff --git a/src/translator_de.h b/src/translator_de.h
index be51653..ff7b704 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -233,9 +233,9 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisch erzeugt von Doxygen";
- if (s) result+=(QCString)" für "+s;
+ if (!s.isEmpty()) result+=(QCString)" für "+s;
result+=" aus dem Quellcode.";
return result;
}
@@ -603,16 +603,16 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Erzeugt am "+date;
- if (projName) result+=(QCString)" für "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" für "+projName;
result+=(QCString)" von";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Klassendiagramm für "+clName+":";
}
@@ -691,7 +691,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -713,7 +713,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+="-Dateireferenz";
@@ -721,7 +721,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="-Namensbereichsreferenz";
@@ -928,13 +928,13 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Zusammengehörigkeiten von "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include-Abhängigkeitsdiagramm für "+fName+":";
}
@@ -1253,7 +1253,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1637,7 +1637,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+="-Verzeichnisreferenz"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1765,7 +1765,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1787,7 +1787,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="-Modul-Referenz";
@@ -1891,7 +1891,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Bezug " + QCString(name);
}
@@ -1928,7 +1928,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Datei in "+name;
}
@@ -1937,7 +1937,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Include-Dateien in "+name;
}
@@ -1982,7 +1982,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Diagramm der Verzeichnisabhängigkeiten für ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -2013,11 +2013,11 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum-Referenz"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" geerbt von "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2098,7 +2098,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
{ return "Konstante Gruppen"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Konstantengruppen-Referenz";
@@ -2106,7 +2106,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Dienstreferenz";
@@ -2114,7 +2114,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton-Referenz";
@@ -2252,7 +2252,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
return "Klasse";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString(name)+"-Referenz"; }
//////////////////////////////////////////////////////////////////////////
diff --git a/src/translator_dk.h b/src/translator_dk.h
index fa1db9a..1d01f32 100644
--- a/src/translator_dk.h
+++ b/src/translator_dk.h
@@ -185,9 +185,9 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisk genereret af Doxygen";
- if (s) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=(QCString)" for "+s;
result+=" ud fra kildekoden.";
return result;
}
@@ -514,16 +514,16 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Genereret "+date;
- if (projName) result+=(QCString)" for "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" for "+projName;
result+=(QCString)" af";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Stamtræ for "+clName+":";
}
@@ -602,7 +602,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -624,7 +624,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" filreference";
@@ -632,7 +632,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" namespace-reference";
@@ -829,12 +829,12 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Samarbejdsdiagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Inklusions-afhængighedsgraf for "+fName+":";
}
@@ -1080,7 +1080,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakke "+name;
}
@@ -1418,7 +1418,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Indhold af kataloget "; result+=dirName; return result;}
/*! This returns the word directory with or without starting capital
@@ -1551,7 +1551,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1573,7 +1573,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Modulreference"; // " Module Reference"
@@ -1675,7 +1675,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relation"; // " Relation"
}
@@ -1712,7 +1712,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File i "+name; // "File in "
}
@@ -1721,7 +1721,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inkluderer file i "+name; // "Includes file in "
}
@@ -1767,7 +1767,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
return "Copyright";
}
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{
return QCString("Afhængighedsgraf for katalog ")+name+":";
}
diff --git a/src/translator_en.h b/src/translator_en.h
index 8f7676e..3e456cc 100644
--- a/src/translator_en.h
+++ b/src/translator_en.h
@@ -141,9 +141,9 @@ class TranslatorEnglish : public Translator
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generated automatically by Doxygen";
- if (s) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=(QCString)" for "+s;
result+=" from the source code.";
return result;
}
@@ -515,16 +515,16 @@ class TranslatorEnglish : public Translator
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generated on "+date;
- if (projName) result+=(QCString)" for "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" for "+projName;
result+=(QCString)" by";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Inheritance diagram for "+clName+":";
}
@@ -603,7 +603,7 @@ class TranslatorEnglish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -625,7 +625,7 @@ class TranslatorEnglish : public Translator
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" File Reference";
@@ -633,7 +633,7 @@ class TranslatorEnglish : public Translator
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Reference";
@@ -829,12 +829,12 @@ class TranslatorEnglish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Collaboration diagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include dependency graph for "+fName+":";
}
@@ -1117,7 +1117,7 @@ class TranslatorEnglish : public Translator
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1511,7 +1511,7 @@ class TranslatorEnglish : public Translator
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Directory Reference"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1639,7 +1639,7 @@ class TranslatorEnglish : public Translator
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1660,7 +1660,7 @@ class TranslatorEnglish : public Translator
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Module Reference";
@@ -1762,7 +1762,7 @@ class TranslatorEnglish : public Translator
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relation";
}
@@ -1799,7 +1799,7 @@ class TranslatorEnglish : public Translator
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File in "+name;
}
@@ -1808,7 +1808,7 @@ class TranslatorEnglish : public Translator
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Includes file in "+name;
}
@@ -1853,7 +1853,7 @@ class TranslatorEnglish : public Translator
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Directory dependency graph for ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1881,11 +1881,11 @@ class TranslatorEnglish : public Translator
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum Reference"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" inherited from "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1966,21 +1966,21 @@ class TranslatorEnglish : public Translator
{ return "Constant Groups"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Constant Group Reference";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Service Reference";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton Reference";
@@ -2119,7 +2119,7 @@ class TranslatorEnglish : public Translator
return "Class";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString(name)+" Reference"; }
/* Slice */
@@ -2219,7 +2219,7 @@ class TranslatorEnglish : public Translator
{
return "Exception Documentation";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)clName;
if (isLocal) result+=" Local";
@@ -2274,7 +2274,7 @@ class TranslatorEnglish : public Translator
return result;
}
/*! used as the title of the HTML page of a C++20 concept page */
- virtual QCString trConceptReference(const char *conceptName)
+ virtual QCString trConceptReference(const QCString &conceptName)
{
QCString result=conceptName;
result+=" Concept Reference";
diff --git a/src/translator_eo.h b/src/translator_eo.h
index 4ae6ee9..8482b39 100644
--- a/src/translator_eo.h
+++ b/src/translator_eo.h
@@ -143,9 +143,9 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generita aŭtomate de Doxygen";
- if (s) result+=(QCString)" por "+s;
+ if (!s.isEmpty()) result+=(QCString)" por "+s;
result+=" el la fontkodo.";
return result;
}
@@ -505,16 +505,16 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generita la "+date;
- if (projName) result+=(QCString)" por "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" por "+projName;
result+=(QCString)" de";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Heredada diagramo por "+clName+":";
}
@@ -593,7 +593,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -615,7 +615,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Dosiera referenco";
@@ -623,7 +623,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Nomspaca referenco";
@@ -820,12 +820,12 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Kunlaborada diagramo por "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Inkluzivaĵa dependeca diagramo por "+fName+":";
}
@@ -1105,7 +1105,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakaĵo "+name;
}
@@ -1499,7 +1499,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Dosieruja Referenco"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1627,7 +1627,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1648,7 +1648,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Modula Referenco";
@@ -1747,7 +1747,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Rilato";
}
@@ -1784,7 +1784,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Dosiero en "+name;
}
@@ -1793,7 +1793,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inkluzivas dosieron en "+name;
}
@@ -1846,7 +1846,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
{ return "Kopirajto"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Dosieruja dependa diagramo por ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1874,11 +1874,11 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum Referenco"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" heredita el "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_es.h b/src/translator_es.h
index 554c487..41dbd8f 100644
--- a/src/translator_es.h
+++ b/src/translator_es.h
@@ -135,9 +135,9 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generado automáticamente por Doxygen";
- if (s) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=(QCString)" para "+s;
result+=" del código fuente.";
return result;
}
@@ -495,16 +495,16 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generado el "+date;
- if (projName) result+=(QCString)" para "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" para "+projName;
result+=(QCString)" por";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama de herencias de "+clName;
}
@@ -583,7 +583,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -605,7 +605,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Referencia del Archivo ";
result+=fileName;
@@ -613,7 +613,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Referencia del Namespace ";
result+=namespaceName;
@@ -820,13 +820,13 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de colaboración para "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Dependencia gráfica adjunta para "+fName+":";
}
@@ -1139,7 +1139,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paquetes "+name;
}
@@ -1546,7 +1546,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result="Referencia del directorio ";
result+=dirName;
@@ -1684,7 +1684,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1706,7 +1706,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Referencia módulo ";
result+=namespaceName;
@@ -1809,7 +1809,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" relación";
}
@@ -1846,7 +1846,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fichero en "+name;
}
@@ -1855,7 +1855,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Incluye ficheros en "+name;
}
@@ -1903,7 +1903,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Gráfico de dependencias de directorios para ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1933,11 +1933,11 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString("Referencia del enum ") + QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" heredados desde "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2018,21 +2018,21 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
{ return "Grupos constantes"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" referencia de grupos constantes";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Referencia servicio";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" referencia Singleton";
@@ -2171,7 +2171,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
return "Clase";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return "Referencia"+QCString(name); }
virtual QCString trConstants()
@@ -2270,7 +2270,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_8_15
{
return "Documentación de excepción";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result="Referencia de";
switch(compType)
diff --git a/src/translator_fa.h b/src/translator_fa.h
index 56ba3da..cec2da1 100644
--- a/src/translator_fa.h
+++ b/src/translator_fa.h
@@ -158,9 +158,9 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="تولید شده توسط نرم افزار دی اکسیژن ";
- if (s) result+=(QCString)" برای "+s;
+ if (!s.isEmpty()) result+=(QCString)" برای "+s;
result+=" از کد برنامه ";
return result;
}
@@ -502,16 +502,16 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result = HtmlDivEnd + HtmlRightToLeft + QCString("توليد شده در ") +date ;
- if (projName) result+=(QCString)" برای "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" برای "+projName;
result+=(QCString)" توسط";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)""+clName+" نمودار وراثت برای :";
}
@@ -590,7 +590,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -612,7 +612,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" مرجع پرونده";
@@ -620,7 +620,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" مرجع فضای نام";
@@ -814,12 +814,12 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Collaboration diagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"نمودار شامل شدن ها برای "+fName+":";
}
@@ -1099,7 +1099,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1492,7 +1492,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" مرجع شاخه ی"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1596,7 +1596,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1617,7 +1617,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Module Reference";
@@ -1706,7 +1706,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name) + " Relation";
}
@@ -1743,7 +1743,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"پرونده ای در "+name;
}
@@ -1752,7 +1752,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Includes file in "+name;
}
diff --git a/src/translator_fi.h b/src/translator_fi.h
index dd2d38c..1db2372 100644
--- a/src/translator_fi.h
+++ b/src/translator_fi.h
@@ -197,7 +197,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result=(QCString)"Automaattisesti luotu Doxygenilla "
"lähdekoodista projektille "+s; // "Generated automatically by Doxygen" ... "for" ... "from the sourcecode"
//if (s) result+=(QCString)" voor "+s;
@@ -565,20 +565,20 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
// funktio on hiukan vaikea kääntää prepositioihin sidotun rakenteen vuoksi.
// Muutetaan siis lauserakennetta suomalaisemmaksi
// Generated on $date for $project by:
// -> Generated for $project on $date by:
QCString result=(QCString)"Generoinut ";
- if (projName) result+=(QCString)"projektille "+projName+" ";
+ if (!projName.isEmpty()) result+=(QCString)"projektille "+projName+" ";
result+=(QCString)date+" ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return "Luokan "+(QCString)clName+" luokkakaavio"; // "Inheritance diagram for "
}
@@ -657,7 +657,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -679,7 +679,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" tiedostoreferenssi"; // " File Reference"
@@ -687,7 +687,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" nimiavaruusreferenssi"; // " Namespace Reference"
@@ -884,12 +884,12 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Yhteistyökaavio luokalle "+clName+":"; // "Collaboration diagram for "+clName+":"
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Sisällytysriippuvuuskaavio tiedostolle "+fName+":"; // "Include dependency graph for "+fName+":"
}
@@ -1221,7 +1221,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paketti "+name; // "Package "
}
@@ -1616,7 +1616,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" hakemistoreferenssi"; return result; }
// " Directory Reference"
@@ -1748,7 +1748,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1769,7 +1769,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" moduulin referenssi"; // " Module Reference"
diff --git a/src/translator_fr.h b/src/translator_fr.h
index a4eafc2..9bbcf2c 100644
--- a/src/translator_fr.h
+++ b/src/translator_fr.h
@@ -202,9 +202,9 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Généré automatiquement par Doxygen";
- if (s) result+=(QCString)" pour "+s;
+ if (!s.isEmpty()) result+=(QCString)" pour "+s;
result+=" à partir du code source.";
return result;
}
@@ -569,16 +569,16 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Généré le "+date;
- if (projName) result+=(QCString)" pour "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" pour "+projName;
result+=(QCString)" par";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Graphe d'héritage de "+clName+":";
}
@@ -657,7 +657,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -680,7 +680,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result= "Référence du fichier ";
result+=fileName;
@@ -688,7 +688,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result= "Référence de l'espace de nommage ";
result+=namespaceName;
@@ -888,12 +888,12 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Graphe de collaboration de "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graphe des dépendances par inclusion de "+fName+":";
}
@@ -1173,7 +1173,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paquetage "+name;
}
@@ -1568,7 +1568,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Répertoire de référence de "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1695,7 +1695,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1716,7 +1716,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Référence du module ";
result+= namespaceName;
@@ -1818,7 +1818,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relation " + QCString(name);
}
@@ -1855,7 +1855,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fichier dans "+name;
}
@@ -1864,7 +1864,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inclut le fichier dans "+name;
}
@@ -1909,7 +1909,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Graphe des dépendances de répertoires pour ")+name+":"; }
@@ -1938,11 +1938,11 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Référence de l'énumération"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" hérités de "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2023,21 +2023,21 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
{ return "Groupes constants"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result="Référence du groupe constant ";
result+=namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result="Référence du service ";
result+=(QCString)sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result="Référence du singleton ";
result+=(QCString)sName;
@@ -2176,7 +2176,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
return "Classe";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString("Référence ") + QCString(name); }
virtual QCString trConstants()
@@ -2275,7 +2275,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
{
return "Documentation des exceptions";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result = "Référence ";
bool feminine = true;
diff --git a/src/translator_gr.h b/src/translator_gr.h
index a0511b7..b40b2ec 100644
--- a/src/translator_gr.h
+++ b/src/translator_gr.h
@@ -140,9 +140,9 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Δημιουργήθηκε αυτόματα από το Doxygen";
- if (s) result+=(QCString)" για "+s;
+ if (!s.isEmpty()) result+=(QCString)" για "+s;
result+=" από τον πηγαίο κώδικα.";
return result;
}
@@ -501,16 +501,16 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Δημιουργήθηκε στις "+date;
- if (projName) result+=(QCString)" για "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" για "+projName;
result+=(QCString)" από";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Διάγραμμα κληρονομικότητας για την "+clName+":";
}
@@ -589,7 +589,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -611,7 +611,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Τεκμηρίωση Αρχείου ";
result+=fileName;
@@ -619,7 +619,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Τεκμηρίωση Χώρου Ονομάτων ";
result+=namespaceName;
@@ -816,12 +816,12 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Διάγραμμα Συνεργασίας για την κλάση "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Διάγραμμα εξάρτησης αρχείου συμπερίληψης για το "+fName+":";
}
@@ -1104,7 +1104,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Πακέτο "+name;
}
@@ -1508,7 +1508,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=QCString("Αναφορά του Καταλόγου ") + dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1636,7 +1636,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1657,7 +1657,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Δηλώσεις Υπομονάδων";
@@ -1757,7 +1757,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Σχέση του "+QCString(name);
}
@@ -1794,7 +1794,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Αρχείο σε "+name;
}
@@ -1803,7 +1803,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Εσωκλείει το αρχείο στο "+name;
}
@@ -1848,7 +1848,7 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Διάγραμμα εξάρτησης φακέλων για ")+name+":"; }
@@ -1877,11 +1877,11 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString("Αναφορά Απαρίθμησης ") + QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" κληρονόμησαν από "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1962,21 +1962,21 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
{ return "Ομάδες Σταθερών"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Τεκμηρίωση Ομάδας Σταθερών";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Τεκμηρίωση Υπηρεσίας";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Τεκμηρίωση Μονοσύνολου";
diff --git a/src/translator_hr.h b/src/translator_hr.h
index 3f9f492..9f9f841 100644
--- a/src/translator_hr.h
+++ b/src/translator_hr.h
@@ -118,9 +118,9 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Ovo je popis svih članova"; }
QCString trIncludingInheritedMembers()
{ return ", uključujući naslijeđene članove."; }
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="napravljeno automatski Doxygen-om";
- if (s) result+=(QCString)" za "+s;
+ if (!s.isEmpty()) result+=(QCString)" za "+s;
result+=" iz programskog koda.";
return result;
}
@@ -285,14 +285,14 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Dokumentacija varijable"; }
QCString trCompounds()
{ return "Strukture"; }
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Napravljeno "+date;
- if (projName) result+=(QCString)" projekt: "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" projekt: "+projName;
result+=" generator: ";
return result;
}
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return QCString("Dijagram klasa za ")+clName;
}
@@ -342,7 +342,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool /*isTemplate*/)
// used as the title of the HTML page of a class/struct/union
@@ -362,14 +362,14 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
result += clName;
return result;
}
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
// used as the title of the HTML page of a file
{
QCString result="Opis datoteke ";
result+=fileName;
return result;
}
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
// used as the title of the HTML page of a namespace
{
QCString result ="Opis imenika ";
@@ -559,12 +559,12 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Kolaboracijski dijagram za "+clName+ ":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf include međuovisnosti za "+fName+":";
}
@@ -824,7 +824,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
return "Klase";
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1194,7 +1194,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result= "Opis direktorija "; result += dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1320,7 +1320,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1341,7 +1341,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" - Sadržaj modula";
@@ -1438,7 +1438,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString("Relacije ") + QCString(name);
}
@@ -1475,7 +1475,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Datoteka u "+name;
}
@@ -1484,7 +1484,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Uključuje datotake u "+name;
}
@@ -1528,7 +1528,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Direktoriji o kojima ovisi ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1556,11 +1556,11 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return "Opis enumeracije " + QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" naslijeđeni od "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_hu.h b/src/translator_hu.h
index ae2e169..67f3570 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -167,9 +167,9 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Ezt a dokumentációt a Doxygen készítette ";
- if (s) result+=(QCString)" a" + zed(s[0])+s+(QCString)" projekthez";
+ if (!s.isEmpty()) result+=(QCString)" a" + zed(s[0])+s+(QCString)" projekthez";
result+=" a forráskódból.";
return result;
}
@@ -530,16 +530,16 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"";
- if (projName) result+=(QCString)"Projekt: "+projName;
+ if (!projName.isEmpty()) result+=(QCString)"Projekt: "+projName;
result+=(QCString)" Készült: "+date+" Készítette: ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"A"+zed(clName[0])+clName+" osztály származási diagramja:";
}
@@ -618,7 +618,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -640,7 +640,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" fájlreferencia";
@@ -648,7 +648,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" névtér-referencia";
@@ -845,12 +845,12 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"A"+zed(clName[0])+clName+" osztály együttműködési diagramja:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"A"+zed(fName[0])+fName+" definíciós fájl függési gráfja:";
}
@@ -1131,7 +1131,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return name+(QCString)" csomag";
}
@@ -1526,7 +1526,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" könyvtárreferencia"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1653,7 +1653,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1674,7 +1674,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" modul hivatkozás";
@@ -1777,7 +1777,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" kapcsolat";
}
@@ -1814,7 +1814,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fájl a(z) "+name+" könyvtárban";
}
@@ -1823,7 +1823,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Tartalmazott fájl a(z) "+name+" könyvtárban";
}
@@ -1868,7 +1868,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
{ return "Szerzői jog"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Könyvtár függőségi gráf a(z) ")+name+"-könyvtárhoz:"; }
//////////////////////////////////////////////////////////////////////////
@@ -1896,11 +1896,11 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" felsoroló referencia"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" a(z) "+what+" osztályból származnak"; }
/*! Header of the sections with inherited members specific for the
@@ -1981,21 +1981,21 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15
{ return "Konstans csoportok"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" konstans csoport referencia";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" szolgáltatás referencia";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" egyke példány referencia";
diff --git a/src/translator_id.h b/src/translator_id.h
index 4b5626a..cb7ae2e 100644
--- a/src/translator_id.h
+++ b/src/translator_id.h
@@ -125,9 +125,9 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Dibangkitkan secara otomatis oleh Doxygen";
- if (s) result+=(QCString)" untuk "+s;
+ if (!s.isEmpty()) result+=(QCString)" untuk "+s;
result+=" dari kode sumber.";
return result;
}
@@ -486,16 +486,16 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Dibangkitkan pada tanggal "+date;
- if (projName) result+=(QCString)" untuk "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" untuk "+projName;
result+=(QCString)" oleh";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagram hierarki kelas untuk "+clName+":";
}
@@ -574,7 +574,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -596,7 +596,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Referensi File ";
result+=fileName;
@@ -604,7 +604,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Referensi Namespace ";
result+=namespaceName;
@@ -802,12 +802,12 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagram kolaborasi untuk "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Bagan kebergantungan pemuatan untuk "+fName+":";
}
@@ -1086,7 +1086,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1479,7 +1479,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Referensi Direktori "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1606,7 +1606,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1627,7 +1627,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Referensi Modul ";
result+=namespaceName;
@@ -1727,7 +1727,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relasi "+QCString(name);
}
@@ -1764,7 +1764,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File dimuat dalam "+name;
}
@@ -1773,7 +1773,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Memuat file dalam "+name;
}
@@ -1818,7 +1818,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
{ return "Hak Cipta"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Bagan dependensi directori untuk ")+name+":"; }
};
diff --git a/src/translator_it.h b/src/translator_it.h
index 4b12dae..87361d3 100644
--- a/src/translator_it.h
+++ b/src/translator_it.h
@@ -179,10 +179,10 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{
QCString result="Generato automaticamente da Doxygen";
- if (s) result+=(QCString)" per "+s;
+ if (!s.isEmpty()) result+=(QCString)" per "+s;
result+=" a partire dal codice sorgente.";
return result;
}
@@ -518,16 +518,16 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generato "+date;
- if (projName) result+=(QCString)" per "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" per "+projName;
result+=(QCString)" da";
return result;
}
/*! this text is put before a class diagram */
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagramma delle classi per "+clName;
}
@@ -607,7 +607,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -630,7 +630,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
{
QCString result="Riferimenti per il file ";
result+=(QCString)fileName;
@@ -638,7 +638,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Riferimenti per il namespace ";
result+=(QCString)namespaceName;
@@ -838,12 +838,12 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagramma di collaborazione per "+clName+":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Grafo delle dipendenze di inclusione per "+fName+":";
}
@@ -1117,7 +1117,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1483,7 +1483,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Riferimenti per la directory "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1609,7 +1609,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1631,7 +1631,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Riferimenti per il modulo ";
result+=namespaceName;
@@ -1733,7 +1733,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relazione per "+QCString(name);
}
@@ -1770,7 +1770,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File in "+name;
}
@@ -1779,7 +1779,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Include il file in "+name;
}
@@ -1824,7 +1824,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Grafo di dipendenza delle directory per ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1853,11 +1853,11 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString("Riferimenti per il tipo enumerato ") + QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" ereditati da "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1938,21 +1938,21 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
{ return "Gruppi di costanti"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result="Riferimenti per il gruppo di costanti ";
result+=namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)"Riferimenti per il servizio ";
result+=sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)"Riferimenti per il singleton ";
result+=sName;
diff --git a/src/translator_jp.h b/src/translator_jp.h
index 7985823..0f9cdf7 100644
--- a/src/translator_jp.h
+++ b/src/translator_jp.h
@@ -167,9 +167,9 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result = "Doxygen により";
- if (s) result=(QCString)" "+s+"の";
+ if (!s.isEmpty()) result=(QCString)" "+s+"の";
result+="ソースコードから抽出しました。";
return result;
}
@@ -534,16 +534,16 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result = (QCString)date+"作成";
- if (projName) result+=(QCString)" - " + projName;
+ if (!projName.isEmpty()) result+=(QCString)" - " + projName;
result+=" / 構成: ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)clName+" の継承関係図";
}
@@ -623,7 +623,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -644,14 +644,14 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=(QCString)fileName+" ファイル";
return result;
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=(QCString)namespaceName+" 名前空間";
return result;
@@ -850,12 +850,12 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)clName+" 連携図";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)fName+" の依存先関係図:";
}
@@ -1128,7 +1128,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)name+" パッケージ";
}
@@ -1507,7 +1507,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" ディレクトリリファレンス"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1634,7 +1634,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1655,7 +1655,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="モジュール";
@@ -1744,7 +1744,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" 関係";
}
@@ -1781,7 +1781,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)name+"にあるファイル";
}
@@ -1790,7 +1790,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)name+"にあるファイルを include している";
}
@@ -1834,7 +1834,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
{ return "著作権所有"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString(name)+" のディレクトリ依存関係図"; }
//////////////////////////////////////////////////////////////////////////
@@ -1860,11 +1860,11 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString("列挙 ")+name+" 詳解"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString("基底クラス ")+what+" に属する継承"+members; }
/*! Header of the sections with inherited members specific for the
@@ -1946,21 +1946,21 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
{ return "定数グループ"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 定数グループ詳解";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" サービス詳解";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton 詳解";
diff --git a/src/translator_kr.h b/src/translator_kr.h
index dda8f6e..c0ae658 100644
--- a/src/translator_kr.h
+++ b/src/translator_kr.h
@@ -165,9 +165,9 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="소스 코드로부터 ";
- if (s) result+=s+(QCString)"를 위해 ";
+ if (!s.isEmpty()) result+=s+(QCString)"를 위해 ";
result+="Doxygen에 의해 자동으로 생성됨.";
return result;
}
@@ -529,16 +529,16 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"생성시간 : "+date;
- if (projName) result+=(QCString)", 프로젝트명 : "+projName;
+ if (!projName.isEmpty()) result+=(QCString)", 프로젝트명 : "+projName;
result+=(QCString)", 생성자 : ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)clName+"에 대한 상속 다이어그램 : ";
}
@@ -617,7 +617,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -639,7 +639,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" 파일 참조";
@@ -647,7 +647,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 네임스페이스 참조";
@@ -845,12 +845,12 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)clName+"에 대한 협력 다이어그램:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)fName+"에 대한 include 의존 그래프";
}
@@ -1124,7 +1124,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return name+(QCString)" 패키지";
}
@@ -1517,7 +1517,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" 디렉토리 참조"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1645,7 +1645,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1666,7 +1666,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 모듈 참조";
@@ -1767,7 +1767,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" 관계";
}
@@ -1804,7 +1804,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return QCString(name) + "의 파일";
}
@@ -1813,7 +1813,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return QCString(name) + "의 파일 포함";
}
@@ -1858,7 +1858,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString(name) + QCString("에 대한 디렉토리 의존성 그래프:"); }
//////////////////////////////////////////////////////////////////////////
@@ -1884,11 +1884,11 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum Reference"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(what) + QCString("(으)로부터 상속된 ") + QCString(members); }
/*! Header of the sections with inherited members specific for the
@@ -1969,21 +1969,21 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
{ return "상수 그룹들"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 상수 그룹 레퍼런스";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" 서비스 레퍼런스";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" 싱글톤 레퍼런스";
diff --git a/src/translator_lt.h b/src/translator_lt.h
index 1be20d2..ad88331 100644
--- a/src/translator_lt.h
+++ b/src/translator_lt.h
@@ -132,9 +132,9 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatiškai sugeneruota Doxygen įrankiu";
- if (s) result+=(QCString)" "+s;
+ if (!s.isEmpty()) result+=(QCString)" "+s;
result+=" iš programos kodo.";
return result;
}
@@ -494,16 +494,16 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Sugeneruota "+date;/*FIXME*/
- if (projName) result+=(QCString)" "+projName;/*FIXME*/
+ if (!projName.isEmpty()) result+=(QCString)" "+projName;/*FIXME*/
result+=(QCString)" ";/*FIXME*/
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Paveldimumo diagrama "+clName+":"; /*FIXME*/
}
@@ -582,7 +582,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -603,7 +603,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Failo Nuoroda";
@@ -611,7 +611,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Vardų Srities Nuoroda";
@@ -808,12 +808,12 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Bendradarbiavimo diagrama "+clName+":";/*FIXME*/
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Įtraukimo priklausomybių diagrama "+fName+":";/*FIXME*/
}
@@ -1094,7 +1094,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paketas "+name;
}
@@ -1492,7 +1492,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Directorijos aprašas"; return result; }
/*! This returns the word directory with or without starting capital
diff --git a/src/translator_lv.h b/src/translator_lv.h
index 8dcc45b..7367502 100644
--- a/src/translator_lv.h
+++ b/src/translator_lv.h
@@ -147,9 +147,9 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automātiski ģenerēts izmantojot Doxygen";
- if (s) result+=(QCString)" priekš "+s;
+ if (!s.isEmpty()) result+=(QCString)" priekš "+s;
result+=" no pirmkoda.";
return result;
}
@@ -509,16 +509,16 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Ģenerēts "+date;
- if (projName) result+=(QCString)" projektam "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" projektam "+projName;
result+=(QCString)" ar";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Mantojamības diagramma klasei "+clName+":";
}
@@ -597,7 +597,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -619,7 +619,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" faila apraksts";
@@ -627,7 +627,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" nosaukumvietas apraksts";
@@ -823,12 +823,12 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Sadarbības diagramma klasei "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include dependency graph for "+fName+":";
}
@@ -1111,7 +1111,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakotne "+name;
}
@@ -1505,7 +1505,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Direktorijas "; result+=dirName; result+=" atsauce"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1633,7 +1633,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1654,7 +1654,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" moduļu atsauce";
@@ -1756,7 +1756,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" relācija";
}
@@ -1793,7 +1793,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"File in "+name;
}
@@ -1802,7 +1802,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Includes file in "+name;
}
@@ -1847,7 +1847,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
{ return "Autortiesības"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Atkarību grafs direktorijai ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1877,11 +1877,11 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" uzskaitījumliterāļa atsauce"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" manto no "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_mk.h b/src/translator_mk.h
index 97a55dc..6db452e 100644
--- a/src/translator_mk.h
+++ b/src/translator_mk.h
@@ -128,9 +128,9 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Автоматски создадено од Doxygen";
- if (s) result+=(QCString)" за "+s;
+ if (!s.isEmpty()) result+=(QCString)" за "+s;
result+=" изворниот код.";
return result;
}
@@ -489,16 +489,16 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Создадено на "+date;
- if (projName) result+=(QCString)" за "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" за "+projName;
result+=(QCString)" од";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Диаграм на наследување за "+clName+":";
}
@@ -577,7 +577,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -599,7 +599,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result = "Опис на Датотекaта ";
result += fileName;
@@ -607,7 +607,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result = "Опис на Имeто на Простор ";
result += namespaceName;
@@ -804,12 +804,12 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Диаграм на соработка за "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Вклучен дијаграм на зависност за "+fName+":";
}
@@ -1089,7 +1089,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Пакет "+name;
}
@@ -1481,7 +1481,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result= "Опис на Именикот "; result += dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1608,7 +1608,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1628,7 +1628,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" - Содржина на Модул";
diff --git a/src/translator_nl.h b/src/translator_nl.h
index 13b5ce1..7bf8db3 100644
--- a/src/translator_nl.h
+++ b/src/translator_nl.h
@@ -62,9 +62,9 @@ class TranslatorDutch : public Translator
{ return "Dit is de complete lijst van alle members voor"; }
QCString trIncludingInheritedMembers()
{ return ", inclusief alle overge&euml;rfde members."; }
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatisch gegenereerd door Doxygen";
- if (s) result+=(QCString)" voor "+s;
+ if (!s.isEmpty()) result+=(QCString)" voor "+s;
result+=" uit de programmatekst.";
return result;
}
@@ -202,14 +202,14 @@ class TranslatorDutch : public Translator
{ return "Documentatie van variabelen"; }
QCString trCompounds()
{ return "Klassen"; }
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Gegenereerd op "+date;
- if (projName) result+=(QCString)" voor "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" voor "+projName;
result+=(QCString)" door";
return result;
}
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Klasse diagram voor "+clName;
}
@@ -259,7 +259,7 @@ class TranslatorDutch : public Translator
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
// used as the title of the HTML page of a class/struct/union
@@ -280,14 +280,14 @@ class TranslatorDutch : public Translator
result+=" Referentie";
return result;
}
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
// used as the title of the HTML page of a file
{
QCString result=fileName;
result+=" Bestand Referentie";
return result;
}
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
// used as the title of the HTML page of a namespace
{
QCString result=namespaceName;
@@ -479,12 +479,12 @@ class TranslatorDutch : public Translator
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Collaboratie diagram voor "+clName+":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include afhankelijkheidsgraaf voor "+fName+":";
}
@@ -749,7 +749,7 @@ class TranslatorDutch : public Translator
return "Klassen";
}
/*! Used as the title of a Java package */
- QCString trPackage(const char *name)
+ QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1137,7 +1137,7 @@ class TranslatorDutch : public Translator
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Folder Referentie"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1249,7 +1249,7 @@ class TranslatorDutch : public Translator
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1270,7 +1270,7 @@ class TranslatorDutch : public Translator
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Module Referentie";
@@ -1367,7 +1367,7 @@ class TranslatorDutch : public Translator
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relatie";
}
@@ -1404,7 +1404,7 @@ class TranslatorDutch : public Translator
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Bestand in "+name;
}
@@ -1413,7 +1413,7 @@ class TranslatorDutch : public Translator
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Includeert bestand in "+name;
}
@@ -1447,7 +1447,7 @@ class TranslatorDutch : public Translator
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Folder afhankelijkheidsgraaf voor ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1476,11 +1476,11 @@ class TranslatorDutch : public Translator
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum Referentie"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" overge&euml;rfd van "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1561,21 +1561,21 @@ class TranslatorDutch : public Translator
{ return "Konstanten Groepen"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Konstanten Groepen Referentie";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Service Referentie";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton Referentie";
@@ -1712,7 +1712,7 @@ class TranslatorDutch : public Translator
return "Klasse";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString(name)+" Referentie"; }
/* Slice */
@@ -1764,7 +1764,7 @@ class TranslatorDutch : public Translator
{ return "Deze inheritance lijst is min of meer alfabetisch gesorteerd:"; }
virtual QCString trExceptionDocumentation()
{ return "Documentatie van exceptions"; }
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)clName;
if (isLocal) result+=" Lokale";
@@ -1807,7 +1807,7 @@ class TranslatorDutch : public Translator
return result;
}
- virtual QCString trConceptReference(const char *conceptName)
+ virtual QCString trConceptReference(const QCString &conceptName)
{
QCString result=conceptName;
result+=" Concept Referentie";
diff --git a/src/translator_no.h b/src/translator_no.h
index dee96d0..0444047 100755
--- a/src/translator_no.h
+++ b/src/translator_no.h
@@ -142,9 +142,9 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generert automatisk av Doxygen";
- if (s) result+=(QCString)" for "+s;
+ if (!s.isEmpty()) result+=(QCString)" for "+s;
result+=" fra kildekoden.";
return result;
}
@@ -524,16 +524,16 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generert "+date;
- if (projName) result+=(QCString)" for "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" for "+projName;
result+=(QCString)" av";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Arvediagram for "+clName+":";
}
@@ -620,7 +620,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -642,7 +642,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" filreferanse";
@@ -650,7 +650,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" navneromsreferanse";
@@ -851,12 +851,12 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Samarbeidsdiagram for "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Avhengighetsgraf for "+fName+":";
}
@@ -1136,7 +1136,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1546,7 +1546,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Katalog referanse"; return result; }
/*! This returns the word directory with or without starting capital
diff --git a/src/translator_pl.h b/src/translator_pl.h
index 86bc72b..1a094d6 100644
--- a/src/translator_pl.h
+++ b/src/translator_pl.h
@@ -121,9 +121,9 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Wygenerowano automatycznie z kodu źródłowego programem Doxygen";
- if (s) result+=(QCString)" dla "+s;
+ if (!s.isEmpty()) result+=(QCString)" dla "+s;
result+=".";
return result;
}
@@ -497,16 +497,16 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Wygenerowano "+date;
- if (projName) result+=(QCString)" dla "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" dla "+projName;
result+=(QCString)" programem";
return result;
}
/*! this text is put before a class diagram */
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagram dziedziczenia dla "+clName;
}
@@ -591,7 +591,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -613,7 +613,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
/*! used as the title of the HTML page of a file */
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
{
QCString result="Dokumentacja pliku ";
result+=fileName;
@@ -621,7 +621,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
/*! used as the title of the HTML page of a namespace */
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Dokumentacja przestrzeni nazw ";
result+=namespaceName;
@@ -823,12 +823,12 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagram współpracy dla "+clName+":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Wykres zależności załączania dla "+fName+":";
}
@@ -1110,7 +1110,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakiet "+name;
}
@@ -1497,7 +1497,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Dokumentacja katalogu "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1624,7 +1624,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1645,7 +1645,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Dokumentacja modułu ";
result+=namespaceName;
@@ -1744,7 +1744,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relacja "+ QCString(name);
}
@@ -1781,7 +1781,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Plik w "+name;
}
@@ -1790,7 +1790,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Zawiera plik w "+name;
}
@@ -1835,7 +1835,7 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Wykres zależności katalogu dla ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1862,11 +1862,11 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ QCString result="Dokumentacja wyliczenia "; result+=name; return result; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" dziedziczone z "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_pt.h b/src/translator_pt.h
index c092e2e..223ca53 100644
--- a/src/translator_pt.h
+++ b/src/translator_pt.h
@@ -165,9 +165,9 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Gerado automaticamente por Doxygen";
- if (s) result+=(QCString)" para "+s;
+ if (!s.isEmpty()) result+=(QCString)" para "+s;
result+=" a partir do código fonte.";
return result;
}
@@ -515,16 +515,16 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Gerado em "+date;
- if (projName) result+=(QCString)" para "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" para "+projName;
result+=(QCString)" por";
return result;
}
/*! this text is put before a class diagram */
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama de heranças da classe "+clName;
}
@@ -603,7 +603,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -625,7 +625,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result= "Referência ao ficheiro ";
result += fileName;
@@ -633,7 +633,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result= "Referência ao namespace ";
result += namespaceName;
@@ -834,12 +834,12 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de colaboração para "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Diagrama de dependências de inclusão para "+fName+":";
}
@@ -1112,7 +1112,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pacote "+name;
}
@@ -1504,7 +1504,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result = "Referência do diretório ";
result += dirName;
@@ -1632,7 +1632,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1656,7 +1656,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result = "Referência do Módulo ";
result += namespaceName;
@@ -1761,7 +1761,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
/*! directory relation for \a name
*/
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relação " + QCString(name);
}
@@ -1798,7 +1798,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Ficheiro em "+name;
}
@@ -1807,7 +1807,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inclui ficheiro em "+name;
}
@@ -1856,7 +1856,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
}
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Grafo de dependências do directório ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1887,14 +1887,14 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{
QCString result = "Referência da enumeração ";
return result + name;
}
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" herdados de "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1975,7 +1975,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
{ return "Grupos de Constantes"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result = "Referência do grupo de constantes ";
result += namespaceName;
@@ -1983,7 +1983,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result = "Referência do serviço ";
result += sName;
@@ -1991,7 +1991,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result = "Referência do Singleton ";
result += sName;
@@ -2141,7 +2141,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
return "Classe";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return "Referência de " + QCString(name); }
/* Slice */
@@ -2241,7 +2241,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_9_2
{
return "Exceções";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)"Referência ";
switch(compType)
diff --git a/src/translator_ro.h b/src/translator_ro.h
index 01765a6..6536009 100644
--- a/src/translator_ro.h
+++ b/src/translator_ro.h
@@ -142,9 +142,9 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Generat automat de Doxygen";
- if (s) result+=(QCString)" pentru "+s;
+ if (!s.isEmpty()) result+=(QCString)" pentru "+s;
result+=" din codul sursă.";
return result;
}
@@ -516,16 +516,16 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generat "+date;
- if (projName) result+=(QCString)" pentru "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" pentru "+projName;
result+=(QCString)" de către";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagrama de relaţii pentru "+clName;
}
@@ -603,7 +603,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -626,7 +626,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result="Referinţă la fişierul ";
result+=fileName;
@@ -634,7 +634,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Referinţă la Namespace-ul ";
result+=namespaceName;
@@ -833,12 +833,12 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagrama de relaţii pentru "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graful dependenţelor prin incluziune pentru "+fName+":";
}
@@ -1115,7 +1115,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pachet "+name;
}
@@ -1509,7 +1509,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result="Director-referinţă "; result+=dirName;
return result;
@@ -1639,7 +1639,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1660,7 +1660,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Referinţă la Modulul ";
result += namespaceName;
@@ -1762,7 +1762,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relație";
}
@@ -1799,7 +1799,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fișierul din "+name;
}
@@ -1808,7 +1808,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Include fișierul din "+name;
}
@@ -1853,7 +1853,7 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Grafic de dependență a directoarelor pentru ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1883,11 +1883,11 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Referință Enum"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" moștenit(e) din "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1968,21 +1968,21 @@ class TranslatorRomanian : public TranslatorAdapter_1_8_15
{ return "Grupuri Constante"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Referință Grup Constant";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Referință Serviciu";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Referință Singleton";
diff --git a/src/translator_ru.h b/src/translator_ru.h
index 3e3f7dc..6a699d4 100644
--- a/src/translator_ru.h
+++ b/src/translator_ru.h
@@ -110,9 +110,9 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Автоматически создано Doxygen";
- if (s) result+=QCString(" для ")+s;
+ if (!s.isEmpty()) result+=QCString(" для ")+s;
result+=" из исходного текста.";
return result;
}
@@ -455,17 +455,17 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result="Документация ";
- if (projName) result+=QCString("по ")+projName;
+ if (!projName.isEmpty()) result+=QCString("по ")+projName;
result+=QCString(". Последние изменения: ")+date;
result+=". Создано системой";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return QCString("Граф наследования:")+clName+":";
}
@@ -545,7 +545,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -584,13 +584,13 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
return QCString("Файл ")+fileName;
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
return QCString("Пространство имен ")+namespaceName;
}
@@ -802,12 +802,12 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Граф связей класса "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Граф включаемых заголовочных файлов для "+fName+":";
}
@@ -1089,7 +1089,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return QCString("Пакет ")+name;
}
@@ -1459,7 +1459,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=QCString("Содержание директории ")+ dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1589,7 +1589,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1626,7 +1626,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
return QCString("Модуль ") + namespaceName;
}
@@ -1722,7 +1722,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Связь";
}
@@ -1759,7 +1759,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Файл в "+name;
}
@@ -1768,7 +1768,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Включает файл в "+name;
}
@@ -1813,7 +1813,7 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
{ return "Авторство"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Директория графа зависимостей ")+name+":"; }
///////////////////////////////////////////////////////////////////////
@@ -1841,11 +1841,11 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Ссылки на перечисление"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" унаследованные от "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1926,21 +1926,21 @@ class TranslatorRussian : public TranslatorAdapter_1_8_15
{ return "Постоянные группы"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Ссылка на постоянную группу";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Ссылка на сервис";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Ссылка на одиночку";
diff --git a/src/translator_sc.h b/src/translator_sc.h
index b8b5b42..c5924b8 100644
--- a/src/translator_sc.h
+++ b/src/translator_sc.h
@@ -145,9 +145,9 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Аутоматски направљено помоћу Doxygen-а";
- if (s) result+=(QCString)" за "+s;
+ if (!s.isEmpty()) result+=(QCString)" за "+s;
result+=" из изворног кода.";
return result;
}
@@ -507,16 +507,16 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Направљено "+date;
- if (projName) result+=(QCString)" за "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" за "+projName;
result+=(QCString)" помоћу";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Дијаграм наслеђивања за "+clName+":";
}
@@ -595,7 +595,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -634,7 +634,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Референца датотеке";
@@ -642,7 +642,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Референца простора имена";
@@ -839,12 +839,12 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Дијаграм сарадње за "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Дијаграм зависности укључивања за "+fName+":";
}
@@ -1125,7 +1125,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Пакет "+name;
}
@@ -1531,7 +1531,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Референца директоријума"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1658,7 +1658,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1679,7 +1679,7 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Референца модула";
diff --git a/src/translator_si.h b/src/translator_si.h
index 5a03a71..c199ef6 100644
--- a/src/translator_si.h
+++ b/src/translator_si.h
@@ -64,9 +64,9 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
{ return "Seznam metod razreda "; }
QCString trIncludingInheritedMembers()
{ return ", vključujoč dedovane metode in atribute."; }
- QCString trGeneratedAutomatically(const char *s)
+ QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="zgenerirano z Doxygen-om";
- if (s) result+=(QCString)" za "+s;
+ if (!s.isEmpty()) result+=(QCString)" za "+s;
result+=" iz izvorne kode.";
return result;
}
@@ -186,14 +186,14 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
{ return "Opis spremenljivke"; }
QCString trCompounds()
{ return "Strukture"; }
- QCString trGeneratedAt(const char *date,const char *projName)
+ QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generirano "+date;
- if (projName) result+=(QCString)" projekt: "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" projekt: "+projName;
result+=(QCString)" generator: ";
return result;
}
- QCString trClassDiagram(const char *clName)
+ QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagram razredov za "+clName;
}
@@ -249,7 +249,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- QCString trCompoundReference(const char *clName,
+ QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool /*isTemplate*/)
// used as the title of the HTML page of a class/struct/union
@@ -270,14 +270,14 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
return result;
}
- QCString trFileReference(const char *fileName)
+ QCString trFileReference(const QCString &fileName)
// used as the title of the HTML page of a file
{
QCString result="Datoteka ";
result+=fileName;
return result;
}
- QCString trNamespaceReference(const char *namespaceName)
+ QCString trNamespaceReference(const QCString &namespaceName)
// used as the title of the HTML page of a namespace
{
QCString result ="Imenski prostor ";
@@ -472,12 +472,12 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- QCString trCollaborationDiagram(const char *clName)
+ QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Kolaboracijski diagram razreda "+clName+":";
}
/*! this text is put before an include dependency graph */
- QCString trInclDepGraph(const char *fName)
+ QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf prikazuje seznam datotek, "
"ki jih datoteka \""+fName+"\" "
@@ -765,7 +765,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"JAVA paket "+name;
}
@@ -1178,7 +1178,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName;
result+=" imeniške reference"; /* not sure for context */
return result;
diff --git a/src/translator_sk.h b/src/translator_sk.h
index 1e5d258..1691ff5 100644
--- a/src/translator_sk.h
+++ b/src/translator_sk.h
@@ -115,10 +115,10 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result("Generované automaticky programom Doxygen "
"zo zdrojových textov");
- if (s)
+ if (!s.isEmpty())
result+=(QCString)" projektu "+s;
result+=".";
return result;
@@ -478,16 +478,16 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Generované "+date;
- if (projName) result+=(QCString)" pre projekt "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" pre projekt "+projName;
result+=(QCString)" programom";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Diagram dedičnosti pre triedu "+clName;
}
@@ -564,7 +564,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -586,7 +586,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result("Dokumentácia súboru ");
result+=fileName;
@@ -594,7 +594,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result("Dokumentácia priestoru mien ");
result+=namespaceName;
@@ -806,12 +806,12 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Diagram tried pre "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf závislostí na vkladaných súboroch "
"pre "+fName+":";
@@ -1090,7 +1090,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
return "Triedy";
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Balík "+name;
}
@@ -1462,7 +1462,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{
QCString result = "Referencia k adresáru ";
result += dirName;
@@ -1595,7 +1595,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1617,7 +1617,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result="Dokumentácia modulu ";
result += namespaceName;
@@ -1717,7 +1717,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Relácia " + QCString(name);
}
@@ -1754,7 +1754,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Súbor v "+name;
}
@@ -1763,7 +1763,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Vkladá (include) súbor z "+name;
}
@@ -1808,7 +1808,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Graf závislosti na priečinkoch pre ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1827,7 +1827,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
virtual QCString trAndMore(const QCString &number)
{
QCString result("a " + number + " ďaľší");
- if (atoi(number) >= 5)
+ if (number.toInt() >= 5)
result += "ch";
return result + "...";
}
@@ -1843,11 +1843,11 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return "Referencia k enumerácii "+QCString(name); }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" dedí sa z "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1928,21 +1928,21 @@ class TranslatorSlovak : public TranslatorAdapter_1_8_15
{ return "Konštantné skupiny"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result="Konštantné skupiny z ";
result += namespaceName;
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result="Popis služby ";
result += sName;
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result="Popis singletonu ";
result += sName;
diff --git a/src/translator_sr.h b/src/translator_sr.h
index cb080ea..e5a6cf7 100644
--- a/src/translator_sr.h
+++ b/src/translator_sr.h
@@ -128,9 +128,9 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Napravljeno automatski korišćenjem alata Doxygen";
- if( s ) result+=(QCString)" za projekat " + s;
+ if (!s.isEmpty()) result+=(QCString)" za projekat " + s;
result+=" od izvornog koda.";
return result;
}
@@ -487,16 +487,16 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"[" + date + "] Napravljeno automatski ";
- if ( projName ) result+=(QCString)" za projekat " + projName;
+ if (!projName.isEmpty()) result+=(QCString)" za projekat " + projName;
result+=(QCString)" upotrebom ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return QCString("Dijagram nasleđivanja za klasu ") + clName + ":";
}
@@ -575,7 +575,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -597,7 +597,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result = "Opis datoteke ";
result += fileName;
@@ -605,7 +605,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result="Opis prostora imena ";
result += namespaceName;
@@ -802,12 +802,12 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Klasni dijagram za "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Graf zavisnosti datoteka za "+fName+":";
}
@@ -1087,7 +1087,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1480,7 +1480,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+="Opis direktorijuma"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1608,7 +1608,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1629,7 +1629,7 @@ class TranslatorSerbian : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" - sažet pregled modula";
diff --git a/src/translator_sv.h b/src/translator_sv.h
index b3c48dc..4916694 100644
--- a/src/translator_sv.h
+++ b/src/translator_sv.h
@@ -244,9 +244,9 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automatiskt skapad av Doxygen";
- if (s) result+=(QCString)" för "+s;
+ if (!s.isEmpty()) result+=(QCString)" för "+s;
result+=" från källkoden.";
return result;
}
@@ -607,16 +607,16 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Skapad "+date;
- if (projName) result+=(QCString)" för "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" för "+projName;
result+=(QCString)" av";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Klassdiagram för "+clName;
}
@@ -692,7 +692,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -714,7 +714,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" filreferens";
@@ -722,7 +722,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" namnrymdreferens";
@@ -929,12 +929,12 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Samarbetsdiagram för "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Include-beroendediagram för "+fName+":";
}
@@ -1217,7 +1217,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1599,7 +1599,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Katalogreferens"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1728,7 +1728,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1749,7 +1749,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Modulreferens";
@@ -1850,7 +1850,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" Relation";
}
@@ -1887,7 +1887,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Fil i "+name;
}
@@ -1896,7 +1896,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Inkluderar fil i "+name;
}
@@ -1941,7 +1941,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
{ return "Copyright"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Katalogberoendegraf för ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1969,11 +1969,11 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Enum-referens"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" ärvd ifrån "+what; }
/*! Header of the sections with inherited members specific for the
@@ -2054,21 +2054,21 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
{ return "Konstantgrupper"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Referens till konstantgrupp";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Tjänstereferens";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+=" Singleton-referens";
@@ -2206,7 +2206,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
return "Klass";
}
}
- virtual QCString trCustomReference(const char *name)
+ virtual QCString trCustomReference(const QCString &name)
{ return QCString(name)+"referens"; }
/* Slice */
@@ -2311,7 +2311,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_9_2
{
return "Undantagsdokumentation";
}
- virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)
{
QCString result=(QCString)clName;
if (isLocal) result+=" Lokal";
diff --git a/src/translator_tr.h b/src/translator_tr.h
index 4a68184..ef8c5a3 100644
--- a/src/translator_tr.h
+++ b/src/translator_tr.h
@@ -140,9 +140,9 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Doxygen tarafından";
- if (s) result+=s+(QCString)" için ";
+ if (!s.isEmpty()) result+=s+(QCString)" için ";
result+=" kaynak koddan otomatik üretilmiştir.";
return result;
}
@@ -498,16 +498,16 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=projName+(QCString)" için "+date;
- if (projName) result+=(QCString)" tarihinde ";
+ if (!projName.isEmpty()) result+=(QCString)" tarihinde ";
result+=(QCString)" üreten: ";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return clName+(QCString)" için kalıtım şeması:";
}
@@ -586,7 +586,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -608,7 +608,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Dosya Referansı";
@@ -616,7 +616,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Referansı";
@@ -814,12 +814,12 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return clName+(QCString)" için işbirliği (collaboration) şeması:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return fName+(QCString)" için içerme bağımlılık grafiği:";
}
@@ -1099,7 +1099,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Paket "+name;
}
@@ -1493,7 +1493,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Dizin Referansı"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1620,7 +1620,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1641,7 +1641,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Modül Referansı";
@@ -1742,7 +1742,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" İlişkisi";
}
@@ -1779,7 +1779,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)(name) + (QCString)" dizinindeki dosya";
}
@@ -1788,7 +1788,7 @@ class TranslatorTurkish : public TranslatorAdapter_1_7_5
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)(name) + (QCString)" dizinindeki dosyayı kapsıyor";
}
diff --git a/src/translator_tw.h b/src/translator_tw.h
index 8d9658b..24ad7ed 100644
--- a/src/translator_tw.h
+++ b/src/translator_tw.h
@@ -153,9 +153,9 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="本文件由Doxygen";
- if (s) result+=(QCString)" 自 "+s;
+ if (!s.isEmpty()) result+=(QCString)" 自 "+s;
result+=" 的原始碼中自動產生.";
return result;
}
@@ -517,16 +517,16 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"產生日期:"+date;
- if (projName) result+=(QCString)", 專案:"+projName;
+ if (!projName.isEmpty()) result+=(QCString)", 專案:"+projName;
result+=(QCString)", 產生器:";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"類別"+clName+"的繼承圖:";
}
@@ -605,7 +605,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -627,7 +627,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" 檔案參考文件";
@@ -635,7 +635,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" 命名空間(Namespace)參考文件";
@@ -831,12 +831,12 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)""+clName+"的合作圖:";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)""+fName+"的包含相依圖:";
}
@@ -1117,7 +1117,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Package "+name;
}
@@ -1495,7 +1495,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" 目錄參考文件"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1614,7 +1614,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1635,7 +1635,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="模組參考文件";
@@ -1730,7 +1730,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return QCString(name)+" 關連";
}
@@ -1767,7 +1767,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"檔案在"+name;
}
@@ -1776,7 +1776,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"含入檔案在"+name;
}
@@ -1821,7 +1821,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
{ return "版權聲明"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString(name)+"的目錄關連圖"+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1849,11 +1849,11 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" 列舉型態參考"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" 繼承自 "+what; }
/*! Header of the sections with inherited members specific for the
@@ -1934,21 +1934,21 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
{ return "常數群組"; }
/** UNO IDL constant groups */
- virtual QCString trConstantGroupReference(const char *namespaceName)
+ virtual QCString trConstantGroupReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+="常數群組參考";
return result;
}
/** UNO IDL service page title */
- virtual QCString trServiceReference(const char *sName)
+ virtual QCString trServiceReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+="服務參考";
return result;
}
/** UNO IDL singleton page title */
- virtual QCString trSingletonReference(const char *sName)
+ virtual QCString trSingletonReference(const QCString &sName)
{
QCString result=(QCString)sName;
result+="Singleton參考";
diff --git a/src/translator_ua.h b/src/translator_ua.h
index e24136c..02f9eab 100644
--- a/src/translator_ua.h
+++ b/src/translator_ua.h
@@ -106,9 +106,9 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Автоматично створено за допомогою Doxygen";
- if (s) result+=QCString(" для ")+s;
+ if (!s.isEmpty()) result+=QCString(" для ")+s;
result+=" з тексту програми.";
return result;
}
@@ -450,17 +450,17 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result="Документація ";
- if (projName) result+=QCString("до ")+projName;
+ if (!projName.isEmpty()) result+=QCString("до ")+projName;
result+=QCString(" створена ")+date;
result+=" системою";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return QCString("Схема успадкувань для ")+clName;
}
@@ -539,7 +539,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -578,13 +578,13 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
return QCString("Файл ")+fileName;
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
return QCString("Простір імен ")+namespaceName;
}
@@ -795,12 +795,12 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Діаграма зв'язків класу "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return QCString("Діаграма включених заголовочних файлів для ")+fName+":";
}
@@ -1078,7 +1078,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return QCString("Пакет ")+name;
}
@@ -1455,7 +1455,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result="Довідник каталогу "; result+=dirName; return result; }
/*! This returns the word directory with or without starting capital
@@ -1583,7 +1583,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1620,7 +1620,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Модуль";
@@ -1722,7 +1722,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
//////////////////////////////////////////////////////////////////////////
/*! directory relation for \a name */
- virtual QCString trDirRelation(const char *name)
+ virtual QCString trDirRelation(const QCString &name)
{
return "Зв'язок з "+QCString(name);
}
@@ -1759,7 +1759,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
* table is shown. The heading for the first column mentions the
* source file that has a relation to another file.
*/
- virtual QCString trFileIn(const char *name)
+ virtual QCString trFileIn(const QCString &name)
{
return (QCString)"Файл у "+name;
}
@@ -1768,7 +1768,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
* table is shown. The heading for the second column mentions the
* destination file that is included.
*/
- virtual QCString trIncludesFileIn(const char *name)
+ virtual QCString trIncludesFileIn(const QCString &name)
{
return (QCString)"Включає файли в "+name;
}
@@ -1813,7 +1813,7 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
{ return "Копірайт"; }
/*! Header for the graph showing the directory dependencies */
- virtual QCString trDirDepGraph(const char *name)
+ virtual QCString trDirDepGraph(const QCString &name)
{ return QCString("Граф залежностей каталогу для ")+name+":"; }
//////////////////////////////////////////////////////////////////////////
@@ -1841,11 +1841,11 @@ class TranslatorUkrainian : public TranslatorAdapter_1_8_4
}
/*! Header of a Java enum page (Java enums are represented as classes). */
- virtual QCString trEnumReference(const char *name)
+ virtual QCString trEnumReference(const QCString &name)
{ return QCString(name)+" Перелік"; }
/*! Used for a section containing inherited members */
- virtual QCString trInheritedFrom(const char *members,const char *what)
+ virtual QCString trInheritedFrom(const QCString &members,const QCString &what)
{ return QCString(members)+" успадковано з "+what; }
/*! Header of the sections with inherited members specific for the
diff --git a/src/translator_vi.h b/src/translator_vi.h
index 272dedd..a36dee4 100644
--- a/src/translator_vi.h
+++ b/src/translator_vi.h
@@ -161,9 +161,9 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Được tạo ra bởi Doxygen";
- if (s) result+=(QCString)" cho "+s;
+ if (!s.isEmpty()) result+=(QCString)" cho "+s;
result+=" từ mã nguồn.";
return result;
}
@@ -523,16 +523,16 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Được biên soạn vào "+date;
- if (projName) result+=(QCString)" cho mã nguồn dự án "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" cho mã nguồn dự án "+projName;
result+=(QCString)" bởi";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Sơ đồ kế thừa cho "+clName+":";
}
@@ -611,7 +611,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -633,7 +633,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" File Tham chiếu";
@@ -641,7 +641,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Tham chiếu";
@@ -837,12 +837,12 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Sơ đồ liên kết cho "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Kèm theo graph phụ thuộc cho "+fName+":";
}
@@ -1122,7 +1122,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Gói "+name;
}
@@ -1516,7 +1516,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Tham chiếu thư mục"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1643,7 +1643,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1664,7 +1664,7 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Tham chiếu Module";
diff --git a/src/translator_za.h b/src/translator_za.h
index 8fc847e..362adfb 100644
--- a/src/translator_za.h
+++ b/src/translator_za.h
@@ -126,9 +126,9 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAutomatically(const QCString &s)
{ QCString result="Automaties gegenereer deur Doxygen";
- if (s) result+=(QCString)" vir "+s;
+ if (!s.isEmpty()) result+=(QCString)" vir "+s;
result+=" van die bron kode af.";
return result;
}
@@ -486,16 +486,16 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! 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)
+ virtual QCString trGeneratedAt(const QCString &date,const QCString &projName)
{
QCString result=(QCString)"Gegenereer op "+date;
- if (projName) result+=(QCString)" vir "+projName;
+ if (!projName.isEmpty()) result+=(QCString)" vir "+projName;
result+=(QCString)" deur";
return result;
}
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
+ virtual QCString trClassDiagram(const QCString &clName)
{
return (QCString)"Afleidings diagram vir "+clName+":";
}
@@ -574,7 +574,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -596,7 +596,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
+ virtual QCString trFileReference(const QCString &fileName)
{
QCString result=fileName;
result+=" Leër Verwysing";
@@ -604,7 +604,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
+ virtual QCString trNamespaceReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Namespace Verwysing";
@@ -801,12 +801,12 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
+ virtual QCString trCollaborationDiagram(const QCString &clName)
{
return (QCString)"Samewerkings diagram vir "+clName+":";
}
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
+ virtual QCString trInclDepGraph(const QCString &fName)
{
return (QCString)"Insluitings afhanklikheid diagram vir "+fName+":";
}
@@ -1087,7 +1087,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
}
/*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ virtual QCString trPackage(const QCString &name)
{
return (QCString)"Pakket "+name;
}
@@ -1481,7 +1481,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
/*! This returns the title of a directory page. The name of the
* directory is passed via \a dirName.
*/
- virtual QCString trDirReference(const char *dirName)
+ virtual QCString trDirReference(const QCString &dirName)
{ QCString result=dirName; result+=" Directory Verwysing"; return result; }
/*! This returns the word directory with or without starting capital
@@ -1609,7 +1609,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
}
/*! used as the title of the HTML page of a module/type (Fortran) */
- virtual QCString trCompoundReferenceFortran(const char *clName,
+ virtual QCString trCompoundReferenceFortran(const QCString &clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
@@ -1630,7 +1630,7 @@ class TranslatorAfrikaans : public TranslatorAdapter_1_6_0
return result;
}
/*! used as the title of the HTML page of a module (Fortran) */
- virtual QCString trModuleReference(const char *namespaceName)
+ virtual QCString trModuleReference(const QCString &namespaceName)
{
QCString result=namespaceName;
result+=" Module Bron";
diff --git a/src/types.h b/src/types.h
index b629501..a3b7de1 100644
--- a/src/types.h
+++ b/src/types.h
@@ -91,7 +91,7 @@ struct Grouping
return "???";
}
- Grouping( const char *gn, GroupPri_t p ) : groupname(gn), pri(p) {}
+ Grouping( const QCString &gn, GroupPri_t p ) : groupname(gn), pri(p) {}
QCString groupname; //!< name of the group
GroupPri_t pri; //!< priority of this definition
diff --git a/src/util.cpp b/src/util.cpp
index f356b7b..d45144c 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -100,13 +100,13 @@ TextGeneratorOLImpl::TextGeneratorOLImpl(OutputDocInterface &od) : m_od(od)
{
}
-void TextGeneratorOLImpl::writeString(const char *s,bool keepSpaces) const
+void TextGeneratorOLImpl::writeString(const QCString &s,bool keepSpaces) const
{
- if (s==0) return;
+ if (s.isEmpty()) return;
//printf("TextGeneratorOlImpl::writeString('%s',%d)\n",s,keepSpaces);
if (keepSpaces)
{
- const char *p=s;
+ const char *p=s.data();
if (p)
{
char cs[2];
@@ -135,8 +135,8 @@ void TextGeneratorOLImpl::writeBreak(int indent) const
}
}
-void TextGeneratorOLImpl::writeLink(const char *extRef,const char *file,
- const char *anchor,const char *text
+void TextGeneratorOLImpl::writeLink(const QCString &extRef,const QCString &file,
+ const QCString &anchor,const QCString &text
) const
{
//printf("TextGeneratorOlImpl::writeLink('%s')\n",text);
@@ -163,10 +163,10 @@ const int maxInheritanceDepth = 100000;
"bla @1" => "bla"
\endverbatim
*/
-QCString removeAnonymousScopes(const char *str)
+QCString removeAnonymousScopes(const QCString &str)
{
std::string result;
- if (str==0) return result;
+ if (str.isEmpty()) return result;
// helper to check if the found delimiter starts with a colon
auto startsWithColon = [](const std::string &del)
@@ -191,7 +191,7 @@ QCString removeAnonymousScopes(const char *str)
};
static const reg::Ex re(R"([\s:]*@\d+[\s:]*)");
- std::string s = str;
+ std::string s = str.str();
reg::Iterator iter(s,re);
reg::Iterator end;
size_t p=0;
@@ -220,12 +220,13 @@ QCString removeAnonymousScopes(const char *str)
}
// replace anonymous scopes with __anonymous__ or replacement if provided
-QCString replaceAnonymousScopes(const char *s,const char *replacement)
+QCString replaceAnonymousScopes(const QCString &s,const QCString &replacement)
{
- if (s==0) return QCString();
+ if (s.isEmpty()) return s;
static const reg::Ex marker(R"(@\d+)");
- std::string result = reg::replace(s,marker,replacement?replacement:"__anonymous__");
- //printf("replaceAnonymousScopes('%s')='%s'\n",s.data(),result.data());
+ std::string result = reg::replace(s.str(),marker,
+ replacement.isEmpty() ? replacement.data() : "__anonymous__");
+ //printf("replaceAnonymousScopes('%s')='%s'\n",qPrint(s),qPrint(result));
return result;
}
@@ -238,7 +239,7 @@ QCString stripAnonymousNamespaceScope(const QCString &s)
int sl = s.length();
while ((i=getScopeFragment(s,p,&l))!=-1)
{
- //printf("Scope fragment %s\n",s.mid(i,l).data());
+ //printf("Scope fragment %s\n",qPrint(s.mid(i,l)));
if (Doxygen::namespaceLinkedMap->find(s.left(i+l))!=0)
{
if (s.at(i)!='@')
@@ -256,11 +257,11 @@ QCString stripAnonymousNamespaceScope(const QCString &s)
p=i+l;
}
done:
- //printf("stripAnonymousNamespaceScope('%s')='%s'\n",s.data(),newScope.data());
+ //printf("stripAnonymousNamespaceScope('%s')='%s'\n",qPrint(s),qPrint(newScope));
return newScope;
}
-void writePageRef(OutputDocInterface &od,const char *cn,const char *mn)
+void writePageRef(OutputDocInterface &od,const QCString &cn,const QCString &mn)
{
od.pushGeneratorState();
@@ -327,9 +328,9 @@ QCString stripFromIncludePath(const QCString &path)
* at the extension. A number of variations is allowed in both upper and
* lower case) If anyone knows or uses another extension please let me know :-)
*/
-int guessSection(const char *name)
+int guessSection(const QCString &name)
{
- QCString n=((QCString)name).lower();
+ QCString n=name.lower();
if (n.right(2)==".c" || // source
n.right(3)==".cc" ||
n.right(4)==".cxx" ||
@@ -364,7 +365,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
const Definition **typedefContext)
{
//printf("<<resolveTypeDef(%s,%s)\n",
- // context ? context->name().data() : "<none>",qualifiedName.data());
+ // context ? qPrint(context->name()) : "<none>",qPrint(qualifiedName));
QCString result;
if (qualifiedName.isEmpty())
{
@@ -397,7 +398,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
{
// split-off scope part
QCString resScopeName = qualifiedName.left(scopeIndex);
- //printf("resScopeName='%s'\n",resScopeName.data());
+ //printf("resScopeName='%s'\n",qPrint(resScopeName));
// look-up scope in context
int is,ps=0;
@@ -408,18 +409,18 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
QCString tmp = resolveTypeDef(mContext,qualScopePart);
if (!tmp.isEmpty()) qualScopePart=tmp;
resScope = resScope->findInnerCompound(qualScopePart);
- //printf("qualScopePart='%s' resScope=%p\n",qualScopePart.data(),resScope);
+ //printf("qualScopePart='%s' resScope=%p\n",qPrint(qualScopePart),resScope);
if (resScope==0) break;
ps=is+l;
}
}
- //printf("resScope=%s\n",resScope?resScope->name().data():"<none>");
+ //printf("resScope=%s\n",resScope? qPrint(resScope->name()) : "<none>");
// step 2: get the member
if (resScope) // no scope or scope found in the current context
{
//printf("scope found: %s, look for typedef %s\n",
- // resScope->qualifiedName().data(),resName.data());
+ // qPrint(resScope->qualifiedName()),qPrint(resName));
MemberNameLinkedMap *mnd=0;
if (resScope->definitionType()==Definition::TypeClass)
{
@@ -437,8 +438,8 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
{
const MemberDef *tmd = tmd_p.get();
//printf("Found member %s resScope=%s outerScope=%s mContext=%p\n",
- // tmd->name().data(), resScope->name().data(),
- // tmd->getOuterScope()->name().data(), mContext);
+ // qPrint(tmd->name()),qPrint( resScope->name()),
+ // qPrint(tmd->getOuterScope()->name()), mContext);
if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
{
SymbolResolver resolver;
@@ -459,7 +460,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
if (md)
{
//printf(">>resolveTypeDef: Found typedef name '%s' in scope '%s' value='%s' args='%s'\n",
- // qualifiedName.data(),context->name().data(),md->typeString(),md->argsString()
+ // qPrint(qualifiedName),qPrint(context->name()),md->typeString(),md->argsString()
// );
result=md->typeString();
QCString args = md->argsString();
@@ -476,7 +477,7 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
else
{
//printf(">>resolveTypeDef: Typedef '%s' not found in scope '%s'!\n",
- // qualifiedName.data(),context ? context->name().data() : "<global>");
+ // qPrint(qualifiedName),context ? qPrint(context->name()) : "<global>");
}
return result;
@@ -486,20 +487,20 @@ QCString resolveTypeDef(const Definition *context,const QCString &qualifiedName,
/*! Get a class definition given its name.
* Returns 0 if the class is not found.
*/
-ClassDef *getClass(const char *n)
+ClassDef *getClass(const QCString &n)
{
- if (n==0 || n[0]=='\0') return 0;
+ if (n.isEmpty()) return 0;
return Doxygen::classLinkedMap->find(n);
}
-ConceptDef *getConcept(const char *n)
+ConceptDef *getConcept(const QCString &n)
{
- if (n==0 || n[0]=='\0') return 0;
+ if (n.isEmpty()) return 0;
return Doxygen::conceptLinkedMap->find(n);
}
-ConceptDef *getResolvedConcept(const Definition *d,const char *name)
+ConceptDef *getResolvedConcept(const Definition *d,const QCString &name)
{
ConceptDef *cd=0;
while (d && d!=Doxygen::globalScope)
@@ -512,10 +513,10 @@ ConceptDef *getResolvedConcept(const Definition *d,const char *name)
return cd;
}
-NamespaceDef *getResolvedNamespace(const char *name)
+NamespaceDef *getResolvedNamespace(const QCString &name)
{
- if (name==0 || name[0]=='\0') return 0;
- auto it = Doxygen::namespaceAliasMap.find(name);
+ if (name.isEmpty()) return 0;
+ auto it = Doxygen::namespaceAliasMap.find(name.str());
if (it!=Doxygen::namespaceAliasMap.end())
{
int count=0; // recursion detection guard
@@ -528,9 +529,9 @@ NamespaceDef *getResolvedNamespace(const char *name)
}
if (count==10)
{
- warn_uncond("possible recursive namespace alias detected for %s!\n",name);
+ warn_uncond("possible recursive namespace alias detected for %s!\n",qPrint(name));
}
- return Doxygen::namespaceLinkedMap->find(it->second.data());
+ return Doxygen::namespaceLinkedMap->find(it->second);
}
else
{
@@ -831,7 +832,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
pc=c;
}
*dst++='\0';
- //printf("removeRedundantWhitespace(%s)->%s\n",s.data(),growBuf);
+ //printf("removeRedundantWhitespace(%s)->%s\n",qPrint(s),growBuf);
return growBuf;
}
@@ -909,12 +910,12 @@ bool leftScopeMatch(const QCString &scope, const QCString &name)
void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
const FileDef *fileScope,const Definition *self,
- const char *text, bool autoBreak,bool external,
+ const QCString &text, bool autoBreak,bool external,
bool keepSpaces,int indentLevel)
{
- if (text==0) return;
+ if (text.isEmpty()) return;
//printf("linkify='%s'\n",text);
- std::string txtStr=text;
+ std::string txtStr=text.str();
size_t strLen = txtStr.length();
if (strLen==0) return;
@@ -923,9 +924,9 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
reg::Iterator end;
//printf("linkifyText scope=%s fileScope=%s strtxt=%s strlen=%d external=%d\n",
- // scope?scope->name().data():"<none>",
- // fileScope?fileScope->name().data():"<none>",
- // txtStr.data(),strLen,external);
+ // scope ? qPrint(scope->name()):"<none>",
+ // fileScope ? qPrint(fileScope->name()) : "<none>",
+ // qPrint(txtStr),strLen,external);
size_t index=0;
size_t skipIndex=0;
size_t floatingIndex=0;
@@ -960,7 +961,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
if (i==std::string::npos) { i=splitText.find('<'); if (i!=std::string::npos) offset=0; }
if (i==std::string::npos) i=splitText.find('>');
if (i==std::string::npos) i=splitText.find(' ');
- //printf("splitText=[%s] len=%d i=%d offset=%d\n",splitText.data(),splitLength,i,offset);
+ //printf("splitText=[%s] len=%d i=%d offset=%d\n",qPrint(splitText),splitLength,i,offset);
if (i!=std::string::npos) // add a link-break at i in case of Html output
{
std::string part1 = splitText.substr(0,i+offset);
@@ -983,9 +984,9 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
}
// get word from string
std::string word=txtStr.substr(newIndex,matchLen);
- QCString matchWord = substitute(substitute(word,"\\","::"),".","::");
+ QCString matchWord = substitute(substitute(QCString(word),"\\","::"),".","::");
//printf("linkifyText word=%s matchWord=%s scope=%s\n",
- // word.data(),matchWord.data(),scope?scope->name().data():"<none>");
+ // qPrint(word),qPrint(matchWord),scope ? qPrint(scope->name()) : "<none>");
bool found=FALSE;
if (!insideString)
{
@@ -995,14 +996,14 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
const NamespaceDef *nd=0;
const GroupDef *gd=0;
const ConceptDef *cnd=0;
- //printf("** Match word '%s'\n",matchWord.data());
+ //printf("** Match word '%s'\n",qPrint(matchWord));
SymbolResolver resolver(fileScope);
cd=resolver.resolveClass(scope,matchWord);
const MemberDef *typeDef = resolver.getTypedef();
if (typeDef) // First look at typedef then class, see bug 584184.
{
- //printf("Found typedef %s\n",typeDef->name().data());
+ //printf("Found typedef %s\n",qPrint(typeDef->name()));
if (external ? typeDef->isLinkable() : typeDef->isLinkableInProject())
{
if (typeDef->getOuterScope()!=self)
@@ -1017,7 +1018,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
}
if (!found && (cd || (cd=getClass(matchWord))))
{
- //printf("Found class %s\n",cd->name().data());
+ //printf("Found class %s\n",qPrint(cd->name()));
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
{
@@ -1073,17 +1074,17 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
matchWord = matchWord.mid(m+2);
}
- //printf("ScopeName=%s\n",scopeName.data());
- //if (!found) printf("Trying to link %s in %s\n",word.data(),scopeName.data());
+ //printf("ScopeName=%s\n",qPrint(scopeName));
+ //if (!found) printf("Trying to link %s in %s\n",qPrint(word),qPrint(scopeName));
if (!found &&
- getDefs(scopeName,matchWord,0,md,cd,fd,nd,gd) &&
+ getDefs(scopeName,matchWord,QCString(),md,cd,fd,nd,gd) &&
//(md->isTypedef() || md->isEnumerate() ||
// md->isReference() || md->isVariable()
//) &&
(external ? md->isLinkable() : md->isLinkableInProject())
)
{
- //printf("Found ref scope=%s\n",d?d->name().data():"<global>");
+ //printf("Found ref scope=%s\n",d ? qPrint(d->name()) : "<global>");
//ol.writeObjectLink(d->getReference(),d->getOutputFileBase(),
// md->anchor(),word);
if (md!=self && (self==0 || md->name()!=self->name()))
@@ -1096,7 +1097,7 @@ void linkifyText(const TextGeneratorIntf &out, const Definition *scope,
{
out.writeLink(md->getReference(),md->getOutputFileBase(),
md->anchor(),word.c_str());
- //printf("found symbol %s\n",matchWord.data());
+ //printf("found symbol %s\n",qPrint(matchWord));
found=TRUE;
}
}
@@ -1151,8 +1152,8 @@ void writeExamples(OutputList &ol,const ExampleList &list)
ol.disable(OutputGenerator::RTF);
ol.disable(OutputGenerator::Docbook);
// link for Html / man
- //printf("writeObjectLink(file=%s)\n",e->file.data());
- ol.writeObjectLink(0,e.file,e.anchor,e.name);
+ //printf("writeObjectLink(file=%s)\n",qPrint(e->file));
+ ol.writeObjectLink(QCString(),e.file,e.anchor,e.name);
ol.popGeneratorState();
ol.pushGeneratorState();
@@ -1160,7 +1161,7 @@ void writeExamples(OutputList &ol,const ExampleList &list)
ol.disable(OutputGenerator::Html);
// link for Latex / pdf with anchor because the sources
// are not hyperlinked (not possible with a verbatim environment).
- ol.writeObjectLink(0,e.file,0,e.name);
+ ol.writeObjectLink(QCString(),e.file,QCString(),e.name);
ol.popGeneratorState();
};
@@ -1303,7 +1304,7 @@ int filterCRLF(char *buf,int len)
return dest; // length of the valid part of the buf
}
-static QCString getFilterFromList(const char *name,const StringVector &filterList,bool &found)
+static QCString getFilterFromList(const QCString &name,const StringVector &filterList,bool &found)
{
found=FALSE;
// compare the file name to the filter pattern list
@@ -1344,10 +1345,10 @@ static QCString getFilterFromList(const char *name,const StringVector &filterLis
* In case \a inSourceCode is TRUE then first the source filter list is
* considered.
*/
-QCString getFileFilter(const char* name,bool isSourceCode)
+QCString getFileFilter(const QCString &name,bool isSourceCode)
{
// sanity check
- if (name==0) return "";
+ if (name.isEmpty()) return "";
const StringVector& filterSrcList = Config_getList(FILTER_SOURCE_PATTERNS);
const StringVector& filterList = Config_getList(FILTER_PATTERNS);
@@ -1392,7 +1393,7 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
if (cd==(void *)(-1))
{
err("unsupported character conversion: '%s'->'%s'\n",
- inputEncoding.data(),outputEncoding);
+ qPrint(inputEncoding),outputEncoding);
error=TRUE;
}
if (!error)
@@ -1406,12 +1407,12 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
outputSize-=(int)oLeft;
output.resize(outputSize+1);
output.at(outputSize)='\0';
- //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
+ //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
}
else
{
err("failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n",
- inputEncoding.data(),outputEncoding,input.data());
+ qPrint(inputEncoding),outputEncoding,qPrint(input));
error=TRUE;
}
}
@@ -1423,9 +1424,9 @@ QCString transcodeCharacterStringToUTF8(const QCString &input)
* is TRUE the file will be filtered by any user specified input filter.
* If \a name is "-" the string will be read from standard input.
*/
-QCString fileToString(const char *name,bool filter,bool isSourceCode)
+QCString fileToString(const QCString &name,bool filter,bool isSourceCode)
{
- if (name==0 || name[0]==0) return 0;
+ if (name.isEmpty()) return QCString();
bool fileOpened=false;
if (name[0]=='-' && name[1]==0) // read from stdin
{
@@ -1440,10 +1441,10 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
}
else // read from file
{
- FileInfo fi(name);
+ FileInfo fi(name.str());
if (!fi.exists() || !fi.isFile())
{
- err("file '%s' not found\n",name);
+ err("file '%s' not found\n",qPrint(name));
return "";
}
BufStr buf((uint)fi.size());
@@ -1461,7 +1462,7 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode)
}
if (!fileOpened)
{
- err("cannot open file '%s' for reading\n",name);
+ err("cannot open file '%s' for reading\n",qPrint(name));
}
return "";
}
@@ -1479,7 +1480,7 @@ static std::tm getCurrentDateTime()
if (!warnedOnce)
{
warn_uncond("Environment variable SOURCE_DATE_EPOCH does not contain a valid number; value is '%s'\n",
- sourceDateEpoch.data());
+ qPrint(sourceDateEpoch));
warnedOnce=TRUE;
}
}
@@ -1533,7 +1534,7 @@ int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level)
if (level==256)
{
warn_uncond("class %s seem to have a recursive "
- "inheritance relation!\n",cd->name().data());
+ "inheritance relation!\n",qPrint(cd->name()));
return -1;
}
int m=maxInheritanceDepth;
@@ -1560,7 +1561,7 @@ Protection classInheritedProtectionLevel(const ClassDef *cd,const ClassDef *bcd,
if (level==256)
{
err("Internal inconsistency: found class %s seem to have a recursive "
- "inheritance relation! Please send a bug report to doxygen@gmail.com\n",cd->name().data());
+ "inheritance relation! Please send a bug report to doxygen@gmail.com\n",qPrint(cd->name()));
}
else if (prot!=Private)
{
@@ -1572,17 +1573,17 @@ Protection classInheritedProtectionLevel(const ClassDef *cd,const ClassDef *bcd,
}
}
exit:
- //printf("classInheritedProtectionLevel(%s,%s)=%d\n",cd->name().data(),bcd->name().data(),prot);
+ //printf("classInheritedProtectionLevel(%s,%s)=%d\n",qPrint(cd->name()),qPrint(bcd->name()),prot);
return prot;
}
void trimBaseClassScope(const BaseClassList &bcl,QCString &s,int level=0)
{
- //printf("trimBaseClassScope level=%d '%s'\n",level,s.data());
+ //printf("trimBaseClassScope level=%d '%s'\n",level,qPrint(s));
for (const auto &bcd : bcl)
{
ClassDef *cd=bcd.classDef;
- //printf("Trying class %s\n",cd->name().data());
+ //printf("Trying class %s\n",qPrint(cd->name()));
int spos=s.find(cd->name()+"::");
if (spos!=-1)
{
@@ -1590,7 +1591,7 @@ void trimBaseClassScope(const BaseClassList &bcl,QCString &s,int level=0)
s.length()-spos-cd->name().length()-2
);
}
- //printf("base class '%s'\n",cd->name().data());
+ //printf("base class '%s'\n",qPrint(cd->name()));
if (!cd->baseClasses().empty())
{
trimBaseClassScope(cd->baseClasses(),s,level+1);
@@ -1651,11 +1652,11 @@ static void stripIrrelevantString(QCString &target,const QCString &str)
*/
void stripIrrelevantConstVolatile(QCString &s)
{
- //printf("stripIrrelevantConstVolatile(%s)=",s.data());
+ //printf("stripIrrelevantConstVolatile(%s)=",qPrint(s));
stripIrrelevantString(s,"const");
stripIrrelevantString(s,"volatile");
stripIrrelevantString(s,"final");
- //printf("%s\n",s.data());
+ //printf("%s\n",qPrint(s));
}
@@ -1696,7 +1697,7 @@ QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QC
{
templSpec = resolvedType;
}
- //printf("getCanonicalTemplateSpec(%s)=%s\n",spec.data(),templSpec.data());
+ //printf("getCanonicalTemplateSpec(%s)=%s\n",qPrint(spec),qPrint(templSpec));
return templSpec;
}
@@ -1720,9 +1721,9 @@ static QCString getCanonicalTypeForIdentifier(
symName=word;
}
//printf("getCanonicalTypeForIdentifier(%s d=%s fs=%s ,[%s->%s]) start\n",
- // word.data(),
- // d ? d->name().data() : "<null>",fs ? fs->name().data() : "<null>",
- // tSpec?tSpec->data():"<none>",templSpec.data());
+ // qPrint(word),
+ // d ? qPrint(d->name()) : "<null>", fs ? qPrint(fs->name()) : "<null>",
+ // tSpec ? qPrint(tSpec) : "<none>", qPrint(templSpec));
// lookup class / class template instance
SymbolResolver resolver(fs);
@@ -1744,23 +1745,23 @@ static QCString getCanonicalTypeForIdentifier(
//printf("cd=%p mtype=%p\n",cd,mType);
//printf(" getCanonicalTypeForIdentifier: symbol=%s word=%s cd=%s d=%s fs=%s cd->isTemplate=%d\n",
- // symName.data(),
- // word.data(),
- // cd?cd->name().data():"<none>",
- // d?d->name().data():"<none>",
- // fs?fs->name().data():"<none>",
- // cd?cd->isTemplate():-1
+ // qPrint(symName),
+ // qPrint(word),
+ // cd ? qPrint(cd->name()) : "<none>",
+ // d ? qPrint( d->name()) : "<none>",
+ // fs ? qPrint(fs->name()) : "<none>",
+ // cd ? cd->isTemplate():-1
// );
//printf(" >>>> word '%s' => '%s' templSpec=%s ts=%s tSpec=%s isTemplate=%d resolvedType=%s\n",
- // (word+templSpec).data(),
- // cd?cd->qualifiedName().data():"<none>",
- // templSpec.data(),ts.data(),
- // tSpec?tSpec->data():"<null>",
- // cd?cd->isTemplate():FALSE,
- // resolvedType.data());
+ // qPrint((word+templSpec)),
+ // cd ? qPrint(cd->qualifiedName()) : "<none>",
+ // qPrint(templSpec), qPrint(ts),
+ // tSpec ? qPrint(tSpec) : "<null>",
+ // cd ? cd->isTemplate():FALSE,
+ // qPrint(resolvedType));
- //printf(" mtype=%s\n",mType?mType->name().data():"<none>");
+ //printf(" mtype=%s\n",mType ? qPrint(mType->name()) : "<none>");
if (cd) // resolves to a known class type
{
@@ -1815,7 +1816,7 @@ static QCString getCanonicalTypeForIdentifier(
{
//result = mType->qualifiedName(); // changed after 1.7.2
//result = mType->typeString();
- //printf("word=%s typeString=%s\n",word.data(),mType->typeString());
+ //printf("word=%s typeString=%s\n",qPrint(word),mType->typeString());
if (word!=mType->typeString())
{
QCString type = mType->typeString();
@@ -1834,7 +1835,7 @@ static QCString getCanonicalTypeForIdentifier(
else // fallback
{
resolvedType = resolveTypeDef(d,word);
- //printf("typedef [%s]->[%s]\n",word.data(),resolvedType.data());
+ //printf("typedef [%s]->[%s]\n",qPrint(word),qPrint(resolvedType));
if (resolvedType.isEmpty()) // not known as a typedef either
{
result = word;
@@ -1844,7 +1845,7 @@ static QCString getCanonicalTypeForIdentifier(
result = resolvedType;
}
}
- //printf("getCanonicalTypeForIdentifier [%s]->[%s]\n",word.data(),result.data());
+ //printf("getCanonicalTypeForIdentifier [%s]->[%s]\n",qPrint(word),qPrint(result));
return result;
}
@@ -1863,8 +1864,8 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
type.stripPrefix("typename ");
type = removeRedundantWhiteSpace(type);
- //printf("extractCanonicalType(type=%s) start: def=%s file=%s\n",type.data(),
- // d ? d->name().data() : "<null>",fs ? fs->name().data() : "<null>");
+ //printf("extractCanonicalType(type=%s) start: def=%s file=%s\n",qPrint(type),
+ // d ? qPrint(d->name()) : "<null>", fs ? qPrint(fs->name()) : "<null>");
QCString canType;
QCString templSpec,word;
@@ -1889,7 +1890,7 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
canType += ct;
}
//printf(" word=%s templSpec=%s canType=%s ct=%s\n",
- // word.data(),templSpec.data(),canType.data(),ct.data());
+ // qPrint(word), qPrint(templSpec), qPrint(canType), qPrint(ct));
if (!templSpec.isEmpty()) // if we didn't use up the templSpec already
// (i.e. type is not a template specialization)
// then resolve any identifiers inside.
@@ -1901,7 +1902,7 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
size_t tp=0;
// for each identifier template specifier
- //printf("adding resolved %s to %s\n",templSpec.data(),canType.data());
+ //printf("adding resolved %s to %s\n",qPrint(templSpec),qPrint(canType));
for (; it!=end ; ++it)
{
const auto &match = *it;
@@ -1918,7 +1919,7 @@ static QCString extractCanonicalType(const Definition *d,const FileDef *fs,QCStr
pp=p;
}
canType += type.right(type.length()-pp);
- //printf("extractCanonicalType = '%s'->'%s'\n",type.data(),canType.data());
+ //printf("extractCanonicalType = '%s'->'%s'\n",qPrint(type),qPrint(canType));
return removeRedundantWhiteSpace(canType);
}
@@ -1927,7 +1928,7 @@ static QCString extractCanonicalArgType(const Definition *d,const FileDef *fs,co
{
QCString type = arg.type.stripWhiteSpace();
QCString name = arg.name;
- //printf("----- extractCanonicalArgType(type=%s,name=%s)\n",type.data(),name.data());
+ //printf("----- extractCanonicalArgType(type=%s,name=%s)\n",qPrint(type),qPrint(name));
if ((type=="const" || type=="volatile") && !name.isEmpty())
{ // name is part of type => correct
type+=" ";
@@ -1952,10 +1953,10 @@ static bool matchArgument2(
)
{
//printf(">> match argument: %s::'%s|%s' (%s) <-> %s::'%s|%s' (%s)\n",
- // srcScope ? srcScope->name().data() : "",
- // srcA.type.data(),srcA.name.data(),srcA.canType.data(),
- // dstScope ? dstScope->name().data() : "",
- // dstA.type.data(),dstA.name.data(),dstA.canType.data());
+ // srcScope ? qPrint(srcScope->name()) : "",
+ // qPrint(srcA.type), qPrint(srcA.name), qPrint(srcA.canType),
+ // dstScope ? qPrint(dstScope->name()) : "",
+ // qPrint(dstA.type), qPrint(dstA.name), qPrint(dstA.canType));
//if (srcA->array!=dstA->array) // nomatch for char[] against char
//{
@@ -1968,8 +1969,8 @@ static bool matchArgument2(
QCString dstType = dstA.type;
stripIrrelevantConstVolatile(srcType);
stripIrrelevantConstVolatile(dstType);
- //printf("'%s'<->'%s'\n",sSrcName.data(),dstType.right(sSrcName.length()).data());
- //printf("'%s'<->'%s'\n",sDstName.data(),srcType.right(sDstName.length()).data());
+ //printf("'%s'<->'%s'\n",qPrint(sSrcName),qPrint(dstType.right(sSrcName.length())));
+ //printf("'%s'<->'%s'\n",qPrint(sDstName),qPrint(srcType.right(sDstName.length())));
if (sSrcName==dstType.right(sSrcName.length()))
{ // case "unsigned int" <-> "unsigned int i"
srcA.type+=sSrcName;
@@ -1998,7 +1999,7 @@ static bool matchArgument2(
else
{
//printf(" Canonical types do not match [%s]<->[%s]\n",
- // srcA->canType.data(),dstA->canType.data());
+ // qPrint(srcA->canType),qPrint(dstA->canType));
NOMATCH
return FALSE;
}
@@ -2098,7 +2099,7 @@ bool matchArguments2(const Definition *srcScope,const FileDef *srcFileScope,cons
void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwrite)
{
//printf("mergeArguments '%s', '%s'\n",
- // argListToString(srcAl).data(),argListToString(dstAl).data());
+ // qPrint(argListToString(srcAl)),qPrint(argListToString(dstAl)));
if (srcAl.size()!=dstAl.size())
{
@@ -2114,12 +2115,12 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
if (srcA.defval.isEmpty() && !dstA.defval.isEmpty())
{
- //printf("Defval changing '%s'->'%s'\n",srcA.defval.data(),dstA.defval.data());
+ //printf("Defval changing '%s'->'%s'\n",qPrint(srcA.defval),qPrint(dstA.defval));
srcA.defval=dstA.defval;
}
else if (!srcA.defval.isEmpty() && dstA.defval.isEmpty())
{
- //printf("Defval changing '%s'->'%s'\n",dstA.defval.data(),srcA.defval.data());
+ //printf("Defval changing '%s'->'%s'\n",qPrint(dstA.defval),qPrint(srcA.defval));
dstA.defval=srcA.defval;
}
@@ -2138,24 +2139,24 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
if (srcA.type==dstA.type)
{
- //printf("1. merging %s:%s <-> %s:%s\n",srcA.type.data(),srcA.name.data(),dstA.type.data(),dstA.name.data());
+ //printf("1. merging %s:%s <-> %s:%s\n",qPrint(srcA.type),qPrint(srcA.name),qPrint(dstA.type),qPrint(dstA.name));
if (srcA.name.isEmpty() && !dstA.name.isEmpty())
{
- //printf("type: '%s':='%s'\n",srcA.type.data(),dstA.type.data());
- //printf("name: '%s':='%s'\n",srcA.name.data(),dstA.name.data());
+ //printf("type: '%s':='%s'\n",qPrint(srcA.type),qPrint(dstA.type));
+ //printf("name: '%s':='%s'\n",qPrint(srcA.name),qPrint(dstA.name));
srcA.type = dstA.type;
srcA.name = dstA.name;
}
else if (!srcA.name.isEmpty() && dstA.name.isEmpty())
{
- //printf("type: '%s':='%s'\n",dstA.type.data(),srcA.type.data());
- //printf("name: '%s':='%s'\n",dstA.name.data(),srcA.name.data());
+ //printf("type: '%s':='%s'\n",qPrint(dstA.type),qPrint(srcA.type));
+ //printf("name: '%s':='%s'\n",qPrint(dstA.name),qPrint(srcA.name));
dstA.type = srcA.type;
dstA.name = dstA.name;
}
else if (!srcA.name.isEmpty() && !dstA.name.isEmpty())
{
- //printf("srcA.name=%s dstA.name=%s\n",srcA.name.data(),dstA.name.data());
+ //printf("srcA.name=%s dstA.name=%s\n",qPrint(srcA.name),qPrint(dstA.name));
if (forceNameOverwrite)
{
srcA.name = dstA.name;
@@ -2175,7 +2176,7 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
}
else
{
- //printf("2. merging '%s':'%s' <-> '%s':'%s'\n",srcA.type.data(),srcA.name.data(),dstA.type.data(),dstA.name.data());
+ //printf("2. merging '%s':'%s' <-> '%s':'%s'\n",qPrint(srcA.type),qPrint(srcA.name),qPrint(dstA.type),qPrint(dstA.name));
srcA.type=srcA.type.stripWhiteSpace();
dstA.type=dstA.type.stripWhiteSpace();
if (srcA.type+" "+srcA.name==dstA.type) // "unsigned long:int" <-> "unsigned long int:bla"
@@ -2203,15 +2204,15 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
j2=dstA.type.length()-i2-2;
if (i1!=-1 && i2==-1 && srcA.type.right(j1)==dstA.type)
{
- //printf("type: '%s':='%s'\n",dstA.type.data(),srcA.type.data());
- //printf("name: '%s':='%s'\n",dstA.name.data(),srcA.name.data());
+ //printf("type: '%s':='%s'\n",qPrint(dstA.type),qPrint(srcA.type));
+ //printf("name: '%s':='%s'\n",qPrint(dstA.name),qPrint(srcA.name));
dstA.type = srcA.type.left(i1+2)+dstA.type;
dstA.name = dstA.name;
}
else if (i1==-1 && i2!=-1 && dstA.type.right(j2)==srcA.type)
{
- //printf("type: '%s':='%s'\n",srcA.type.data(),dstA.type.data());
- //printf("name: '%s':='%s'\n",dstA.name.data(),srcA.name.data());
+ //printf("type: '%s':='%s'\n",qPrint(srcA.type),qPrint(dstA.type));
+ //printf("name: '%s':='%s'\n",qPrint(dstA.name),qPrint(srcA.name));
srcA.type = dstA.type.left(i2+2)+srcA.type;
srcA.name = dstA.name;
}
@@ -2224,15 +2225,15 @@ void mergeArguments(ArgumentList &srcAl,ArgumentList &dstAl,bool forceNameOverwr
dstA.docs = srcA.docs;
}
//printf("Merge argument '%s|%s' '%s|%s'\n",
- // srcA.type.data(),srcA.name.data(),
- // dstA.type.data(),dstA.name.data());
+ // qPrint(srcA.type), qPrint(srcA.name),
+ // qPrint(dstA.type), qPrint(dstA.name));
++srcIt;
++dstIt;
}
}
static void findMembersWithSpecificName(const MemberName *mn,
- const char *args,
+ const QCString &args,
bool checkStatics,
const FileDef *currentFile,
bool checkCV,
@@ -2246,7 +2247,7 @@ static void findMembersWithSpecificName(const MemberName *mn,
const FileDef *fd=md->getFileDef();
const GroupDef *gd=md->getGroupDef();
//printf(" md->name()='%s' md->args='%s' fd=%p gd=%p current=%p ref=%s\n",
- // md->name().data(),args,fd,gd,currentFile,md->getReference().data());
+ // qPrint(md->name()),args,fd,gd,currentFile,qPrint(md->getReference()));
if (
((gd && gd->isLinkable()) || (fd && fd->isLinkable()) || md->isReference()) &&
md->getNamespaceDef()==0 && md->isLinkable() &&
@@ -2255,7 +2256,7 @@ static void findMembersWithSpecificName(const MemberName *mn,
)
{
bool match=TRUE;
- if (args && !md->isDefine() && qstrcmp(args,"()")!=0)
+ if (!args.isEmpty() && !md->isDefine() && args!="()")
{
const ArgumentList &mdAl = md->argumentList();
auto argList_p = stringToArgumentList(md->getLanguage(),args);
@@ -2297,7 +2298,7 @@ static void findMembersWithSpecificName(const MemberName *mn,
*/
bool getDefs(const QCString &scName,
const QCString &mbName,
- const char *args,
+ const QCString &args,
const MemberDef *&md,
const ClassDef *&cd,
const FileDef *&fd,
@@ -2316,7 +2317,7 @@ bool getDefs(const QCString &scName,
scopeName = substitute(scopeName,"\\","::"); // for PHP
memberName = substitute(memberName,"\\","::"); // for PHP
//printf("Search for name=%s args=%s in scope=%s forceEmpty=%d\n",
- // memberName.data(),args,scopeName.data(),forceEmptyScope);
+ // qPrint(memberName),qPrint(args),qPrint(scopeName),forceEmptyScope);
int is,im=0,pm=0;
// strip common part of the scope from the scopeName
@@ -2329,7 +2330,7 @@ bool getDefs(const QCString &scName,
pm=im+2;
}
//printf("result after scope corrections scope=%s name=%s\n",
- // scopeName.data(),memberName.data());
+ // qPrint(scopeName), qPrint(memberName));
QCString mName=memberName;
QCString mScope;
@@ -2346,15 +2347,15 @@ bool getDefs(const QCString &scName,
// handle special the case where both scope name and member scope are equal
if (mScope==scopeName) scopeName.resize(0);
- //printf("mScope='%s' mName='%s'\n",mScope.data(),mName.data());
+ //printf("mScope='%s' mName='%s'\n",qPrint(mScope),qPrint(mName));
MemberName *mn = Doxygen::memberNameLinkedMap->find(mName);
- //printf("mName=%s mn=%p\n",mName.data(),mn);
+ //printf("mName=%s mn=%p\n",qPrint(mName),mn);
if ((!forceEmptyScope || scopeName.isEmpty()) && // this was changed for bug638856, forceEmptyScope => empty scopeName
mn && !(scopeName.isEmpty() && mScope.isEmpty()))
{
- //printf(" >member name '%s' found\n",mName.data());
+ //printf(" >member name '%s' found\n",qPrint(mName));
int scopeOffset=scopeName.length();
do
{
@@ -2378,7 +2379,7 @@ bool getDefs(const QCString &scName,
fcd=resolver.resolveClass(Doxygen::globalScope,nameWithoutTemplates);
tmd=resolver.getTypedef();
}
- //printf("Trying class scope %s: fcd=%p tmd=%p\n",className.data(),fcd,tmd);
+ //printf("Trying class scope %s: fcd=%p tmd=%p\n",qPrint(className),fcd,tmd);
// todo: fill in correct fileScope!
if (fcd && // is it a documented class
fcd->isLinkable()
@@ -2387,7 +2388,7 @@ bool getDefs(const QCString &scName,
//printf(" Found fcd=%p\n",fcd);
int mdist=maxInheritanceDepth;
std::unique_ptr<ArgumentList> argList;
- if (args)
+ if (!args.isEmpty())
{
argList = stringToArgumentList(fcd->getLanguage(),args);
}
@@ -2397,7 +2398,7 @@ bool getDefs(const QCString &scName,
if (!mmd->isStrongEnumValue())
{
const ArgumentList &mmdAl = mmd->argumentList();
- bool match=args==0 ||
+ bool match = args.isEmpty() ||
matchArguments2(mmd->getOuterScope(),mmd->getFileDef(),&mmdAl,
fcd, fcd->getFileDef(),argList.get(),
checkCV);
@@ -2418,7 +2419,7 @@ bool getDefs(const QCString &scName,
}
}
}
- if (mdist==maxInheritanceDepth && args && qstrcmp(args,"()")==0)
+ if (mdist==maxInheritanceDepth && args=="()")
// no exact match found, but if args="()" an arbitrary member will do
{
//printf(" >Searching for arbitrary member\n");
@@ -2428,7 +2429,7 @@ bool getDefs(const QCString &scName,
//if (mmd->isLinkable())
//{
const ClassDef *mcd=mmd->getClassDef();
- //printf(" >Class %s found\n",mcd->name().data());
+ //printf(" >Class %s found\n",qPrint(mcd->name()));
if (mcd)
{
int m=minClassDistance(fcd,mcd);
@@ -2499,9 +2500,9 @@ bool getDefs(const QCString &scName,
//printf("Global symbol\n");
const MemberDef *fuzzy_mmd = 0;
std::unique_ptr<ArgumentList> argList;
- bool hasEmptyArgs = args && qstrcmp(args, "()") == 0;
+ bool hasEmptyArgs = args=="()";
- if (args)
+ if (!args.isEmpty())
{
argList = stringToArgumentList(SrcLangExt_Cpp, args);
}
@@ -2515,7 +2516,7 @@ bool getDefs(const QCString &scName,
continue;
}
- if (!args)
+ if (args.isEmpty())
{
fuzzy_mmd = mmd;
break;
@@ -2549,7 +2550,7 @@ bool getDefs(const QCString &scName,
// maybe an namespace, file or group member ?
//printf("Testing for global symbol scopeName='%s' mScope='%s' :: mName='%s'\n",
- // scopeName.data(),mScope.data(),mName.data());
+ // qPrint(scopeName), qPrint(mScope), qPrint(mName));
if ((mn=Doxygen::functionNameLinkedMap->find(mName))) // name is known
{
//printf(" >symbol name found\n");
@@ -2564,16 +2565,16 @@ bool getDefs(const QCString &scName,
}
else if (!mScope.isEmpty())
{
- namespaceName=mScope.copy();
+ namespaceName=mScope;
}
- //printf("Trying namespace %s\n",namespaceName.data());
+ //printf("Trying namespace %s\n",qPrint(namespaceName));
if (!namespaceName.isEmpty() &&
(fnd=Doxygen::namespaceLinkedMap->find(namespaceName)) &&
fnd->isLinkable()
)
{
//printf("Symbol inside existing namespace '%s' count=%d\n",
- // namespaceName.data(),mn->count());
+ // qPrint(namespaceName),mn->count());
bool found=FALSE;
for (const auto &mmd_p : *mn)
{
@@ -2583,7 +2584,7 @@ bool getDefs(const QCString &scName,
const MemberDef *emd = mmd->getEnumScope();
if (emd && emd->isStrong())
{
- //printf("yes match %s<->%s!\n",mScope.data(),emd->localName().data());
+ //printf("yes match %s<->%s!\n",qPrint(mScope),qPrint(emd->localName()));
if (emd->getNamespaceDef()==fnd &&
rightScopeMatch(mScope,emd->localName()))
{
@@ -2603,7 +2604,7 @@ bool getDefs(const QCString &scName,
else if (mmd->getOuterScope()==fnd /* && mmd->isLinkable() */ )
{ // namespace is found
bool match=TRUE;
- if (args && qstrcmp(args,"()")!=0)
+ if (!args.isEmpty() && args!="()")
{
const ArgumentList &mmdAl = mmd->argumentList();
auto argList_p = stringToArgumentList(mmd->getLanguage(),args);
@@ -2621,7 +2622,7 @@ bool getDefs(const QCString &scName,
}
}
}
- if (!found && args && !qstrcmp(args,"()"))
+ if (!found && args=="()")
// no exact match found, but if args="()" an arbitrary
// member will do
{
@@ -2660,9 +2661,9 @@ bool getDefs(const QCString &scName,
{
const MemberDef *mmd = mmd_p.get();
const MemberDef *tmd = mmd->getEnumScope();
- //printf("try member %s tmd=%s\n",mmd->name().data(),tmd?tmd->name().data():"<none>");
+ //printf("try member %s tmd=%s\n",qPrint(mmd->name()),tmd ? qPrint(tmd->name()) : "<none>");
int ni=namespaceName.findRev("::");
- //printf("namespaceName=%s ni=%d\n",namespaceName.data(),ni);
+ //printf("namespaceName=%s ni=%d\n",qPrint(namespaceName),ni);
bool notInNS = tmd && ni==-1 && tmd->getNamespaceDef()==0 && (mScope.isEmpty() || mScope==tmd->name());
bool sameNS = tmd && tmd->getNamespaceDef() && namespaceName.left(ni)==tmd->getNamespaceDef()->name() && namespaceName.mid(ni+2)==tmd->name();
//printf("notInNS=%d sameNS=%d\n",notInNS,sameNS);
@@ -2676,7 +2677,7 @@ bool getDefs(const QCString &scName,
gd=mmd->getGroupDef();
if (gd && gd->isLinkable()) fd=0; else gd=0;
//printf("Found scoped enum %s fd=%p gd=%p\n",
- // mmd->name().data(),fd,gd);
+ // qPrint(mmd->name()),fd,gd);
return TRUE;
}
}
@@ -2702,7 +2703,7 @@ bool getDefs(const QCString &scName,
findMembersWithSpecificName(mn,args,FALSE,currentFile,checkCV,members);
}
//printf("found %d members\n",members.count());
- if (members.size()!=1 && args && !qstrcmp(args,"()"))
+ if (members.size()!=1 && args=="()")
{
// no exact match found, but if args="()" an arbitrary
// member will do
@@ -2712,8 +2713,8 @@ bool getDefs(const QCString &scName,
{
const auto &mmd_p = *it;
const MemberDef *mmd = mmd_p.get();
- //printf("Found member '%s'\n",mmd->name().data());
- //printf("member is linkable mmd->name()='%s'\n",mmd->name().data());
+ //printf("Found member '%s'\n",qPrint(mmd->name()));
+ //printf("member is linkable mmd->name()='%s'\n",qPrint(mmd->name()));
fd=mmd->getFileDef();
gd=mmd->getGroupDef();
const MemberDef *tmd = mmd->getEnumScope();
@@ -2731,7 +2732,7 @@ bool getDefs(const QCString &scName,
{
if (currentFile)
{
- //printf("multiple results; pick one from file:%s\n", currentFile->name().data());
+ //printf("multiple results; pick one from file:%s\n",qPrint( currentFile->name()));
for (const auto &rmd : members)
{
if (rmd->getFileDef() && rmd->getFileDef()->name() == currentFile->name())
@@ -2780,7 +2781,7 @@ bool getDefs(const QCString &scName,
* - if `cd` is non zero, the scope was a class pointed to by cd.
* - if `nd` is non zero, the scope was a namespace pointed to by nd.
*/
-static bool getScopeDefs(const char *docScope,const char *scope,
+static bool getScopeDefs(const QCString &docScope,const QCString &scope,
ClassDef *&cd, NamespaceDef *&nd)
{
cd=0;nd=0;
@@ -2805,7 +2806,7 @@ static bool getScopeDefs(const char *docScope,const char *scope,
do // for each possible docScope (from largest to and including empty)
{
- QCString fullName=scopeName.copy();
+ QCString fullName=scopeName;
if (scopeOffset>0) fullName.prepend(docScopeName.left(scopeOffset)+"::");
if (((cd=getClass(fullName)) || // normal class
@@ -2834,18 +2835,18 @@ static bool getScopeDefs(const char *docScope,const char *scope,
static bool isLowerCase(QCString &s)
{
+ if (s.isEmpty()) return true;
uchar *p=(uchar*)s.data();
- if (p==0) return TRUE;
int c;
- while ((c=*p++)) if (!islower(c)) return FALSE;
- return TRUE;
+ while ((c=*p++)) if (!islower(c)) return false;
+ return true;
}
/*! Returns an object to reference to given its name and context
* @post return value TRUE implies *resContext!=0 or *resMember!=0
*/
-bool resolveRef(/* in */ const char *scName,
- /* in */ const char *name,
+bool resolveRef(/* in */ const QCString &scName,
+ /* in */ const QCString &name,
/* in */ bool inSeeBlock,
/* out */ const Definition **resContext,
/* out */ const MemberDef **resMember,
@@ -2854,7 +2855,7 @@ bool resolveRef(/* in */ const char *scName,
bool checkScope
)
{
- //printf("resolveRef(scope=%s,name=%s,inSeeBlock=%d)\n",scName,name,inSeeBlock);
+ //printf("resolveRef(scope=%s,name=%s,inSeeBlock=%d)\n",qPrint(scName),qPrint(name),inSeeBlock);
QCString tsName = name;
//bool memberScopeFirst = tsName.find('#')!=-1;
QCString fullName = substitute(tsName,"#","::");
@@ -2892,7 +2893,7 @@ bool resolveRef(/* in */ const char *scName,
return FALSE;
}
- //printf("scName=%s fullName=%s\n",scName,fullName.data());
+ //printf("scName=%s fullName=%s\n",scName,qPrint(fullName));
// check if this is a class or namespace reference
if (scName!=fullName && getScopeDefs(scName,fullName,cd,nd))
@@ -2913,7 +2914,7 @@ bool resolveRef(/* in */ const char *scName,
{
//printf("found scName=%s fullName=%s scName==fullName=%d "
// "inSeeBlock=%d scopePos=%d!\n",
- // scName,fullName.data(),scName==fullName,inSeeBlock,scopePos);
+ // scName,qPrint(fullName),scName==fullName,inSeeBlock,scopePos);
return FALSE;
}
// continue search...
@@ -2958,7 +2959,7 @@ bool resolveRef(/* in */ const char *scName,
// check if nameStr is a member or global.
//printf("getDefs(scope=%s,name=%s,args=%s checkScope=%d)\n",
- // scopeStr.data(),nameStr.data(),argsStr.data(),checkScope);
+ // qPrint(scopeStr), qPrint(nameStr), qPrint(argsStr),checkScope);
if (getDefs(scopeStr,nameStr,argsStr,
md,cd,fd,nd,gd,
//scopePos==0 && !memberScopeFirst, // forceEmptyScope
@@ -2968,7 +2969,7 @@ bool resolveRef(/* in */ const char *scName,
)
)
{
- //printf("after getDefs checkScope=%d nameStr=%s cd=%p nd=%p\n",checkScope,nameStr.data(),cd,nd);
+ //printf("after getDefs checkScope=%d nameStr=%s cd=%p nd=%p\n",checkScope,qPrint(nameStr),cd,nd);
if (checkScope && md && md->getOuterScope()==Doxygen::globalScope &&
!md->isStrongEnumValue() &&
(!scopeStr.isEmpty() || nameStr.find("::")>0))
@@ -2989,7 +2990,7 @@ bool resolveRef(/* in */ const char *scName,
else if (gd) *resContext=gd;
else { *resContext=0; *resMember=0; return FALSE; }
//printf("member=%s (md=%p) anchor=%s linkable()=%d context=%s\n",
- // md->name().data(),md,md->anchor().data(),md->isLinkable(),(*resContext)->name().data());
+ // qPrint(md->name()), md, qPrint(md->anchor()), md->isLinkable(), qPrint((*resContext)->name()));
return TRUE;
}
else if (inSeeBlock && !nameStr.isEmpty() && (gd=Doxygen::groupLinkedMap->find(nameStr)))
@@ -3030,7 +3031,7 @@ bool resolveRef(/* in */ const char *scName,
return FALSE;
}
-QCString linkToText(SrcLangExt lang,const char *link,bool isFileName)
+QCString linkToText(SrcLangExt lang,const QCString &link,bool isFileName)
{
//static bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
QCString result=link;
@@ -3124,8 +3125,8 @@ bool generateRef(OutputDocInterface &od,const char *scName,
}
#endif
-bool resolveLink(/* in */ const char *scName,
- /* in */ const char *lr,
+bool resolveLink(/* in */ const QCString &scName,
+ /* in */ const QCString &lr,
/* in */ bool /*inSeeBlock*/,
/* out */ const Definition **resContext,
/* out */ QCString &resAnchor
@@ -3135,7 +3136,7 @@ bool resolveLink(/* in */ const char *scName,
QCString linkRef=lr;
QCString linkRefWithoutTemplates = stripTemplateSpecifiersFromScope(linkRef,FALSE);
- //printf("ResolveLink linkRef=%s\n",lr);
+ //printf("ResolveLink linkRef=%s\n",qPrint(lr));
const FileDef *fd;
const GroupDef *gd;
const PageDef *pd;
@@ -3238,19 +3239,19 @@ bool resolveLink(/* in */ const char *scName,
// basis for the link's text.
// returns TRUE if a link could be generated.
-bool generateLink(OutputDocInterface &od,const char *clName,
- const char *lr,bool inSeeBlock,const char *lt)
+bool generateLink(OutputDocInterface &od,const QCString &clName,
+ const QCString &lr,bool inSeeBlock,const QCString &lt)
{
//printf("generateLink(clName=%s,lr=%s,lr=%s)\n",clName,lr,lt);
const Definition *compound = 0;
//PageDef *pageDef=0;
QCString anchor,linkText=linkToText(SrcLangExt_Unknown,lt,FALSE);
- //printf("generateLink linkText=%s\n",linkText.data());
+ //printf("generateLink linkText=%s\n",qPrint(linkText));
if (resolveLink(clName,lr,inSeeBlock,&compound,anchor))
{
if (compound) // link to compound
{
- if (lt==0 && anchor.isEmpty() && /* compound link */
+ if (lt.isEmpty() && anchor.isEmpty() && /* compound link */
compound->definitionType()==Definition::TypeGroup /* is group */
)
{
@@ -3280,17 +3281,17 @@ bool generateLink(OutputDocInterface &od,const char *clName,
}
}
-void generateFileRef(OutputDocInterface &od,const char *name,const char *text)
+void generateFileRef(OutputDocInterface &od,const QCString &name,const QCString &text)
{
//printf("generateFileRef(%s,%s)\n",name,text);
- QCString linkText = text ? text : name;
+ QCString linkText = text.isEmpty() ? text : name;
//FileInfo *fi;
FileDef *fd;
bool ambig;
if ((fd=findFileDef(Doxygen::inputNameLinkedMap,name,ambig)) &&
fd->isLinkable())
// link to documented input file
- od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),0,linkText);
+ od.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),linkText);
else
od.docify(linkText);
}
@@ -3309,10 +3310,10 @@ static Cache<std::string,FindFileCacheElem> g_findFileDefCache(5000);
static std::mutex g_findFileDefMutex;
-FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,bool &ambig)
+FileDef *findFileDef(const FileNameLinkedMap *fnMap,const QCString &n,bool &ambig)
{
ambig=FALSE;
- if (n==0) return 0;
+ if (n.isEmpty()) return 0;
std::lock_guard<std::mutex> lock(g_findFileDefMutex);
@@ -3323,7 +3324,7 @@ FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,bool &ambig)
key+=n;
FindFileCacheElem *cachedResult = g_findFileDefCache.find(key.str());
- //printf("key=%s cachedResult=%p\n",key.data(),cachedResult);
+ //printf("key=%s cachedResult=%p\n",qPrint(key),cachedResult);
if (cachedResult)
{
ambig = cachedResult->isAmbig;
@@ -3335,7 +3336,7 @@ FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,bool &ambig)
cachedResult = g_findFileDefCache.insert(key.str(),FindFileCacheElem(0,FALSE));
}
- QCString name=Dir::cleanDirPath(n);
+ QCString name=Dir::cleanDirPath(n.str());
QCString path;
int slashPos;
const FileName *fn;
@@ -3395,7 +3396,7 @@ exit:
//----------------------------------------------------------------------
-QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const char *n)
+QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const QCString &n)
{
QCString result;
QCString name=n;
@@ -3422,11 +3423,11 @@ QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const char *n)
//----------------------------------------------------------------------
-QCString substituteKeywords(const QCString &s,const char *title,
- const char *projName,const char *projNum,const char *projBrief)
+QCString substituteKeywords(const QCString &s,const QCString &title,
+ const QCString &projName,const QCString &projNum,const QCString &projBrief)
{
QCString result = s;
- if (title) result = substitute(result,"$title",title);
+ if (!title.isEmpty()) result = substitute(result,"$title",title);
result = substitute(result,"$datetime",dateToString(TRUE));
result = substitute(result,"$date",dateToString(FALSE));
result = substitute(result,"$year",yearToString());
@@ -3567,14 +3568,14 @@ int getUtf8Char(const char *input,char ids[MAX_UTF8_CHAR_SIZE],CaseModifier modi
#endif
// note that this function is not reentrant due to the use of static growBuf!
-QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore)
+QCString escapeCharsInString(const QCString &name,bool allowDots,bool allowUnderscore)
{
+ if (name.isEmpty()) return name;
bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
bool allowUnicodeNames = Config_getBool(ALLOW_UNICODE_NAMES);
- if (name==0) return "";
GrowBuf growBuf;
signed char c;
- const char *p=name;
+ const char *p=name.data();
while ((c=*p++)!=0)
{
switch(c)
@@ -3649,11 +3650,12 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor
return growBuf.get();
}
-QCString unescapeCharsInString(const char *s)
+QCString unescapeCharsInString(const QCString &s)
{
- static bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
+ if (s.isEmpty()) return s;
+ bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
QCString result;
- const char *p = s;
+ const char *p = s.data();
if (p)
{
char c;
@@ -3728,16 +3730,16 @@ static int g_usedNamesCount=1;
* given its name, which could be a class name with template
* arguments, so special characters need to be escaped.
*/
-QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
+QCString convertNameToFile(const QCString &name,bool allowDots,bool allowUnderscore)
{
- if (name==0 || name[0]=='\0') return "";
+ if (name.isEmpty()) return name;
static bool shortNames = Config_getBool(SHORT_NAMES);
static bool createSubdirs = Config_getBool(CREATE_SUBDIRS);
QCString result;
if (shortNames) // use short names only
{
std::lock_guard<std::mutex> lock(g_usedNamesMutex);
- auto kv = g_usedNames.find(name);
+ auto kv = g_usedNames.find(name.str());
uint num=0;
if (kv!=g_usedNames.end())
{
@@ -3746,7 +3748,7 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
else
{
num = g_usedNamesCount;
- g_usedNames.insert(std::make_pair(name,g_usedNamesCount++));
+ g_usedNames.insert(std::make_pair(name.str(),g_usedNamesCount++));
}
result.sprintf("a%05d",num);
}
@@ -3776,23 +3778,22 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir));
}
- //printf("*** convertNameToFile(%s)->%s\n",name,result.data());
+ //printf("*** convertNameToFile(%s)->%s\n",name,qPrint(result));
return result;
}
-QCString relativePathToRoot(const char *name)
+QCString relativePathToRoot(const QCString &name)
{
QCString result;
if (Config_getBool(CREATE_SUBDIRS))
{
- if (name==0)
+ if (name.isEmpty())
{
return REL_PATH_TO_ROOT;
}
else
{
- QCString n = name;
- int i = n.findRev('/');
+ int i = name.findRev('/');
if (i!=-1)
{
result=REL_PATH_TO_ROOT;
@@ -3814,7 +3815,7 @@ void createSubDirs(const Dir &d)
subdir.sprintf("d%x",l1);
if (!d.exists(subdir.str()) && !d.mkdir(subdir.str()))
{
- term("Failed to create output directory '%s'\n",subdir.data());
+ term("Failed to create output directory '%s'\n",qPrint(subdir));
}
for (l2=0;l2<256;l2++)
{
@@ -3822,7 +3823,7 @@ void createSubDirs(const Dir &d)
subsubdir.sprintf("d%x/d%02x",l1,l2);
if (!d.exists(subsubdir.str()) && !d.mkdir(subsubdir.str()))
{
- term("Failed to create output directory '%s'\n",subsubdir.data());
+ term("Failed to create output directory '%s'\n",qPrint(subsubdir));
}
}
}
@@ -3841,7 +3842,7 @@ void extractNamespaceName(const QCString &scopeName,
NamespaceDef *nd = 0;
if (!clName.isEmpty() && (nd=getResolvedNamespace(clName)) && getClass(clName)==0)
{ // the whole name is a namespace (and not a class)
- namespaceName=nd->name().copy();
+ namespaceName=nd->name();
className.resize(0);
goto done;
}
@@ -3849,11 +3850,11 @@ void extractNamespaceName(const QCString &scopeName,
while (p>=0 && (i=clName.findRev("::",p))!=-1)
// see if the first part is a namespace (and not a class)
{
- //printf("Trying %s\n",clName.left(i).data());
+ //printf("Trying %s\n",qPrint(clName.left(i)));
if (i>0 && (nd=getResolvedNamespace(clName.left(i))) && getClass(clName.left(i))==0)
{
//printf("found!\n");
- namespaceName=nd->name().copy();
+ namespaceName=nd->name();
className=clName.right(clName.length()-i-2);
goto done;
}
@@ -3862,18 +3863,18 @@ void extractNamespaceName(const QCString &scopeName,
//printf("not found!\n");
// not found, so we just have to guess.
- className=scopeName.copy();
+ className=scopeName;
namespaceName.resize(0);
done:
if (className.isEmpty() && !namespaceName.isEmpty() && !allowEmptyClass)
{
// class and namespace with the same name, correct to return the class.
- className=namespaceName.copy();
+ className=namespaceName;
namespaceName.resize(0);
}
- //printf("extractNamespace '%s' => '%s|%s'\n",scopeName.data(),
- // className.data(),namespaceName.data());
+ //printf("extractNamespace '%s' => '%s|%s'\n",qPrint(scopeName),
+ // qPrint(className),qPrint(namespaceName));
if (/*className.right(2)=="-g" ||*/ className.right(2)=="-p")
{
className = className.left(className.length()-2);
@@ -3883,7 +3884,7 @@ done:
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ)
{
- QCString result=scope.copy();
+ QCString result=scope;
if (!templ.isEmpty() && scope.find('<')==-1)
{
int si,pi=0;
@@ -3893,7 +3894,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
((cd=getClass(scope.left(si)))==0 || cd->templateArguments().empty())
)
{
- //printf("Tried '%s'\n",(scope.left(si)+templ).data());
+ //printf("Tried '%s'\n",qPrint((scope.left(si)+templ)));
pi=si+2;
}
if (si==-1) // not nested => append template specifier
@@ -3906,7 +3907,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
}
}
//printf("insertTemplateSpecifierInScope('%s','%s')=%s\n",
- // scope.data(),templ.data(),result.data());
+ // qPrint(scope),qPrint(templ),qPrint(result));
return result;
}
@@ -3914,7 +3915,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te
/*! Strips the scope from a name. Examples: A::B will return A
* and A<T>::B<N::C<D> > will return A<T>.
*/
-QCString stripScope(const char *name)
+QCString stripScope(const QCString &name)
{
QCString result = name;
int l=result.length();
@@ -3934,7 +3935,7 @@ QCString stripScope(const char *name)
{
case ':':
// only exit in the case of ::
- //printf("stripScope(%s)=%s\n",name,result.right(l-p-1).data());
+ //printf("stripScope(%s)=%s\n",name,qPrint(result.right(l-p-1)));
if (p>0 && result.at(p-1)==':' && (count==0 || skipBracket))
{
return result.right(l-p-1);
@@ -4007,11 +4008,11 @@ QCString stripScope(const char *name)
}
/*! Converts a string to a HTML id string */
-QCString convertToId(const char *s)
+QCString convertToId(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
bool first=TRUE;
while ((c=*p++))
@@ -4040,18 +4041,18 @@ QCString convertToId(const char *s)
* that an id cannot have a digit at the first position. To overcome problems
* with double labels we always place an "a" in front
*/
-QCString correctId(QCString s)
+QCString correctId(const QCString &s)
{
if (s.isEmpty()) return s;
return "a" + s;
}
/*! Converts a string to an XML-encoded string */
-QCString convertToXML(const char *s, bool keepEntities)
+QCString convertToXML(const QCString &s, bool keepEntities)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -4098,13 +4099,13 @@ QCString convertToXML(const char *s, bool keepEntities)
}
/*! Converts a string to an DocBook-encoded string */
-QCString convertToDocBook(const char *s)
+QCString convertToDocBook(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
const unsigned char *q;
int cnt;
- const unsigned char *p=(const unsigned char *)s;
+ const unsigned char *p=(const unsigned char *)s.data();
char c;
while ((c=*p++))
{
@@ -4162,11 +4163,11 @@ QCString convertToDocBook(const char *s)
}
/*! Converts a string to a HTML-encoded string */
-QCString convertToHtml(const char *s,bool keepEntities)
+QCString convertToHtml(const QCString &s,bool keepEntities)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -4222,11 +4223,11 @@ QCString convertToHtml(const char *s,bool keepEntities)
return growBuf.get();
}
-QCString convertToJSString(const char *s)
+QCString convertToJSString(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -4241,11 +4242,11 @@ QCString convertToJSString(const char *s)
return convertCharEntitiesToUTF8(growBuf.get());
}
-QCString convertToPSString(const char *s)
+QCString convertToPSString(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
GrowBuf growBuf;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -4269,11 +4270,11 @@ QCString convertToLaTeX(const QCString &s,bool insideTabbing,bool keepSpaces)
-QCString convertCharEntitiesToUTF8(const char *str)
+QCString convertCharEntitiesToUTF8(const QCString &str)
{
- if (str==0) return QCString();
+ if (str.isEmpty()) return QCString();
- std::string s = str;
+ std::string s = str.data();
static const reg::Ex re(R"(&\a\w*;)");
reg::Iterator it(s,re);
reg::Iterator end;
@@ -4289,7 +4290,7 @@ QCString convertCharEntitiesToUTF8(const char *str)
{
growBuf.addStr(s.substr(i,p-i));
}
- std::string entity = match.str();
+ QCString entity(match.str());
DocSymbol::SymType symType = HtmlEntityMapper::instance()->name2sym(entity);
const char *code=0;
if (symType!=DocSymbol::Sym_Unknown && (code=HtmlEntityMapper::instance()->utf8(symType)))
@@ -4304,7 +4305,7 @@ QCString convertCharEntitiesToUTF8(const char *str)
}
growBuf.addStr(s.substr(i));
growBuf.addChar(0);
- //printf("convertCharEntitiesToUTF8(%s)->%s\n",s.data(),growBuf.get());
+ //printf("convertCharEntitiesToUTF8(%s)->%s\n",qPrint(s),growBuf.get());
return growBuf.get();
}
@@ -4324,7 +4325,7 @@ void addMembersToMemberGroup(MemberList *ml,
const Definition *context)
{
ASSERT(context!=0);
- //printf("addMemberToMemberGroup() context=%s\n",context->name().data());
+ //printf("addMemberToMemberGroup() context=%s\n",qPrint(context->name()));
if (ml==0) return;
struct MoveMemberInfo
@@ -4435,7 +4436,7 @@ void addMembersToMemberGroup(MemberList *ml,
* class \a name and a template argument list \a templSpec. If -1 is returned
* there are no more matches.
*/
-int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &templSpec,SrcLangExt lang)
+int extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCString &templSpec,SrcLangExt lang)
{
static reg::Ex re_norm(R"(\a[\w:]*)");
static reg::Ex re_fortran(R"(\a[\w:()=]*)");
@@ -4443,8 +4444,8 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
name.resize(0);
templSpec.resize(0);
- if (type==0) return -1;
- int typeLen=qstrlen(type);
+ if (type.isEmpty()) return -1;
+ int typeLen=(int)type.length();
if (typeLen>0)
{
if (lang == SrcLangExt_Fortran)
@@ -4455,7 +4456,7 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
re = &re_fortran;
}
}
- std::string s = type;
+ std::string s = type.str();
reg::Iterator it(s,*re,(int)pos);
reg::Iterator end;
@@ -4499,13 +4500,13 @@ int extractClassNameFromType(const char *type,int &pos,QCString &name,QCString &
pos=i+l;
}
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=TRUE i=%d\n",
- // type,pos,name.data(),templSpec.data(),i);
+ // type,pos,qPrint(name),qPrint(templSpec),i);
return i;
}
}
pos = typeLen;
//printf("extractClassNameFromType([in] type=%s,[out] pos=%d,[out] name=%s,[out] templ=%s)=FALSE\n",
- // type,pos,name.data(),templSpec.data());
+ // type,pos,qPrint(name),qPrint(templSpec));
return -1;
}
@@ -4532,7 +4533,7 @@ QCString normalizeNonTemplateArgumentsInString(
size_t i = match.position();
size_t l = match.length();
result += s.substr(pi,i-pi);
- std::string n = match.str();
+ QCString n(match.str());
bool found=FALSE;
for (const Argument &formArg : formalArgs)
{
@@ -4546,7 +4547,7 @@ QCString normalizeNonTemplateArgumentsInString(
{
// try to resolve the type
SymbolResolver resolver;
- const ClassDef *cd = resolver.resolveClass(context,n.c_str());
+ const ClassDef *cd = resolver.resolveClass(context,n);
if (cd)
{
result+=cd->name();
@@ -4563,7 +4564,7 @@ QCString normalizeNonTemplateArgumentsInString(
pi=i+l;
}
result+=s.substr(pi);
- //printf("normalizeNonTemplateArgumentInString(%s)=%s\n",name.data(),result.data());
+ //printf("normalizeNonTemplateArgumentInString(%s)=%s\n",qPrint(name),qPrint(result));
return removeRedundantWhiteSpace(result);
}
@@ -4575,16 +4576,17 @@ QCString normalizeNonTemplateArgumentsInString(
* prevent recursive substitution.
*/
QCString substituteTemplateArgumentsInString(
- const std::string &name,
+ const QCString &nm,
const ArgumentList &formalArgs,
const std::unique_ptr<ArgumentList> &actualArgs)
{
//printf("substituteTemplateArgumentsInString(name=%s formal=%s actualArg=%s)\n",
- // name.data(),argListToString(formalArgs).data(),argListToString(actualArgs).data());
- if (formalArgs.empty()) return name;
- std::string result;
+ // qPrint(name),qPrint(argListToString(formalArgs)),qPrint(argListToString(actualArgs)));
+ if (formalArgs.empty()) return nm;
+ QCString result;
static const reg::Ex re(R"(\a[\w:]*)");
+ std::string name = nm.str();
reg::Iterator it(name,re);
reg::Iterator end;
size_t p=0;
@@ -4595,7 +4597,7 @@ QCString substituteTemplateArgumentsInString(
size_t i = match.position();
size_t l = match.length();
if (i>p) result += name.substr(p,i-p);
- std::string n = match.str();
+ QCString n(match.str());
ArgumentList::iterator actIt;
if (actualArgs)
{
@@ -4629,9 +4631,9 @@ QCString substituteTemplateArgumentsInString(
if (formArg.type=="class" || formArg.type=="typename" || formArg.type.left(8)=="template")
{
//printf("n=%s formArg->type='%s' formArg->name='%s' formArg->defval='%s'\n",
- // n.data(),formArg->type.data(),formArg->name.data(),formArg->defval.data());
+ // qPrint(n),qPrint(formArg->type),qPrint(formArg->name),qPrint(formArg->defval));
//printf(">> n='%s' formArg->name='%s' actArg->type='%s' actArg->name='%s'\n",
- // n.data(),formArg.name.data(),actIt!=actualArgs.end() ? actIt->type.data() : "",actIt!=actualArgs.end() ? actIt->name.data() : ""
+ // qPrint(n),qPrint(formArg.name),actIt!=actualArgs.end() ? qPrint(actIt->type) : "",actIt!=actualArgs.end() ? qPrint(actIt->name) : ""
// );
if (formArg.name==n && actualArgs && actIt!=actualArgs->end() && !actArg.type.isEmpty()) // base class is a template argument
{
@@ -4660,20 +4662,20 @@ QCString substituteTemplateArgumentsInString(
else if (formArg.name==n &&
(actualArgs==nullptr || actIt==actualArgs->end()) &&
!formArg.defval.isEmpty() &&
- formArg.defval!=name /* to prevent recursion */
+ formArg.defval!=nm /* to prevent recursion */
)
{
- result += substituteTemplateArgumentsInString(formArg.defval.str(),formalArgs,actualArgs)+" ";
+ result += substituteTemplateArgumentsInString(formArg.defval,formalArgs,actualArgs)+" ";
found=TRUE;
}
}
else if (formArg.name==n &&
(actualArgs==nullptr || actIt==actualArgs->end()) &&
!formArg.defval.isEmpty() &&
- formArg.defval!=name /* to prevent recursion */
+ formArg.defval!=nm /* to prevent recursion */
)
{
- result += substituteTemplateArgumentsInString(formArg.defval.str(),formalArgs,actualArgs)+" ";
+ result += substituteTemplateArgumentsInString(formArg.defval,formalArgs,actualArgs)+" ";
found=TRUE;
}
if (actualArgs && actIt!=actualArgs->end())
@@ -4689,8 +4691,8 @@ QCString substituteTemplateArgumentsInString(
}
result+=name.substr(p);
//printf(" Inheritance relation %s -> %s\n",
- // name.data(),result.data());
- return QCString(result).stripWhiteSpace();
+ // qPrint(name),qPrint(result));
+ return result.stripWhiteSpace();
}
@@ -4712,7 +4714,7 @@ QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
int l=fullName.length();
while (i!=-1)
{
- //printf("1:result+=%s\n",fullName.mid(p,i-p).data());
+ //printf("1:result+=%s\n",qPrint(fullName.mid(p,i-p)));
int e=i+1;
int count=1;
int round=0;
@@ -4735,22 +4737,22 @@ QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
// we only do the parent scope, so we stop here if needed
result+=fullName.mid(p,i-p);
- //printf(" trying %s\n",(result+fullName.mid(i,e-i)).data());
+ //printf(" trying %s\n",qPrint(result+fullName.mid(i,e-i)));
if (getClass(result+fullName.mid(i,e-i))!=0)
{
result+=fullName.mid(i,e-i);
- //printf(" 2:result+=%s\n",fullName.mid(i,e-i-1).data());
+ //printf(" 2:result+=%s\n",qPrint(fullName.mid(i,e-i-1)));
}
else if (pLastScopeStripped)
{
- //printf(" last stripped scope '%s'\n",fullName.mid(i,e-i).data());
+ //printf(" last stripped scope '%s'\n",qPrint(fullName.mid(i,e-i)));
*pLastScopeStripped=fullName.mid(i,e-i);
}
p=e;
i=fullName.find('<',p);
}
result+=fullName.right(l-p);
- //printf("3:result+=%s\n",fullName.right(l-p).data());
+ //printf("3:result+=%s\n",qPrint(fullName.right(l-p)));
return result;
}
@@ -4785,7 +4787,7 @@ QCString mergeScopes(const QCString &leftScope,const QCString &rightScope)
if (found) return result;
// case leftScope=="A" rightScope=="B" => result = "A::B"
- result=leftScope.copy();
+ result=leftScope;
if (!result.isEmpty() && !rightScope.isEmpty()) result+="::";
result+=rightScope;
return result;
@@ -4839,15 +4841,15 @@ int getScopeFragment(const QCString &s,int p,int *l)
}
found:
*l=sp-p;
- //printf("getScopeFragment(%s,%d)=%s\n",s.data(),p,s.mid(p,*l).data());
+ //printf("getScopeFragment(%s,%d)=%s\n",qPrint(s),p,qPrint(s.mid(p,*l)));
return p;
}
//----------------------------------------------------------------------------
-PageDef *addRelatedPage(const char *name,const QCString &ptitle,
+PageDef *addRelatedPage(const QCString &name,const QCString &ptitle,
const QCString &doc,
- const char *fileName,
+ const QCString &fileName,
int docLine,
int startLine,
const RefItemVector &sli,
@@ -4865,11 +4867,11 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
if (!xref && !title.isEmpty() && pd->title()!=title)
{
warn(fileName,startLine,"multiple use of page label '%s', (other occurrence: %s, line: %d)",
- name,pd->docFile().data(),pd->getStartBodyLine());
+ qPrint(name),qPrint(pd->docFile()),pd->getStartBodyLine());
}
// append documentation block to the page.
pd->setDocumentation(doc,fileName,docLine);
- //printf("Adding page docs '%s' pi=%p name=%s\n",doc.data(),pd,name);
+ //printf("Adding page docs '%s' pi=%p name=%s\n",qPrint(doc),pd,name);
// append (x)refitems to the page.
pd->setRefItems(sli);
}
@@ -4881,7 +4883,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
else if (baseName.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension)
baseName=baseName.left(baseName.length()-Doxygen::htmlFileExtension.length());
- //printf("Appending page '%s'\n",baseName.data());
+ //printf("Appending page '%s'\n",qPrint(baseName));
pd = Doxygen::pageLinkedMap->add(baseName,
std::unique_ptr<PageDef>(
createPageDef(fileName,docLine,baseName,doc,title)));
@@ -4923,11 +4925,11 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
{
if (si->lineNr() != -1)
{
- warn(orgFile,line,"multiple use of section label '%s', (first occurrence: %s, line %d)",pd->name().data(),si->fileName().data(),si->lineNr());
+ warn(orgFile,line,"multiple use of section label '%s', (first occurrence: %s, line %d)",qPrint(pd->name()),qPrint(si->fileName()),si->lineNr());
}
else
{
- warn(orgFile,line,"multiple use of section label '%s', (first occurrence: %s)",pd->name().data(),si->fileName().data());
+ warn(orgFile,line,"multiple use of section label '%s', (first occurrence: %s)",qPrint(pd->name()),qPrint(si->fileName()));
}
}
else
@@ -4935,10 +4937,10 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
SectionManager::instance().add(pd->name(),
file,-1,pd->title(),SectionType::Page,0,pd->getReference());
//printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
- // si->label.data(),si->definition?si->definition->name().data():"<none>",
- // si->fileName.data());
- //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data());
- //printf("Adding section key=%s si->fileName=%s\n",pageName.data(),si->fileName.data());
+ // qPrint(si->label),si->definition?si->definition->name().data():"<none>",
+ // qPrint(si->fileName));
+ //printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,qPrint(si->fileName));
+ //printf("Adding section key=%s si->fileName=%s\n",qPrint(pageName),qPrint(si->fileName));
}
}
}
@@ -4948,11 +4950,11 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
//----------------------------------------------------------------------------
void addRefItem(const RefItemVector &sli,
- const char *key,
- const char *prefix, const char *name,const char *title,const char *args,const Definition *scope)
+ const QCString &key, const QCString &prefix, const QCString &name,
+ const QCString &title, const QCString &args, const Definition *scope)
{
//printf("addRefItem(sli=%d,key=%s,prefix=%s,name=%s,title=%s,args=%s)\n",(int)sli.size(),key,prefix,name,title,args);
- if (key && key[0]!='@') // check for @ to skip anonymous stuff (see bug427012)
+ if (!key.isEmpty() && key[0]!='@') // check for @ to skip anonymous stuff (see bug427012)
{
for (RefItem *item : sli)
{
@@ -4984,7 +4986,7 @@ bool recursivelyAddGroupListToTitle(OutputList &ol,const Definition *d,bool root
{
ol.writeString(" &raquo; ");
}
- ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
+ ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),QCString(),gd->groupTitle());
}
if (root)
{
@@ -5001,12 +5003,12 @@ void addGroupListToTitle(OutputList &ol,const Definition *d)
recursivelyAddGroupListToTitle(ol,d,TRUE);
}
-void filterLatexString(TextStream &t,const char *str,
+void filterLatexString(TextStream &t,const QCString &str,
bool insideTabbing,bool insidePre,bool insideItem,bool insideTable,bool keepSpaces)
{
- if (str==0) return;
+ if (str.isEmpty()) return;
//if (strlen(str)<2) stackTrace();
- const unsigned char *p=(const unsigned char *)str;
+ const unsigned char *p=(const unsigned char *)str.data();
const unsigned char *q;
int cnt;
unsigned char c;
@@ -5153,12 +5155,12 @@ void filterLatexString(TextStream &t,const char *str,
}
}
-QCString latexEscapeLabelName(const char *s)
+QCString latexEscapeLabelName(const QCString &s)
{
- if (s==0) return "";
- QCString tmp(qstrlen(s)+1);
+ if (s.isEmpty()) return s;
+ QCString tmp(s.length()+1);
TextStream t;
- const char *p=s;
+ const char *p=s.data();
char c;
int i;
while ((c=*p++))
@@ -5196,12 +5198,12 @@ QCString latexEscapeLabelName(const char *s)
return t.str();
}
-QCString latexEscapeIndexChars(const char *s)
+QCString latexEscapeIndexChars(const QCString &s)
{
- if (s==0) return "";
- QCString tmp(qstrlen(s)+1);
+ if (s.isEmpty()) return s;
+ QCString tmp(s.length()+1);
TextStream t;
- const char *p=s;
+ const char *p=s.data();
char c;
int i;
while ((c=*p++))
@@ -5227,7 +5229,7 @@ QCString latexEscapeIndexChars(const char *s)
p++;
}
tmp[i]=0;
- filterLatexString(t,tmp.data(),
+ filterLatexString(t,tmp,
true, // insideTabbing
false, // insidePre
false, // insideItem
@@ -5240,11 +5242,11 @@ QCString latexEscapeIndexChars(const char *s)
return t.str();
}
-QCString latexEscapePDFString(const char *s)
+QCString latexEscapePDFString(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
TextStream t;
- const char *p=s;
+ const char *p=s.data();
char c;
while ((c=*p++))
{
@@ -5264,11 +5266,11 @@ QCString latexEscapePDFString(const char *s)
return t.str();
}
-QCString latexFilterURL(const char *s)
+QCString latexFilterURL(const QCString &s)
{
- if (s==0) return "";
+ if (s.isEmpty()) return s;
TextStream t;
- const signed char *p=(const signed char*)s;
+ const signed char *p=(const signed char*)s.data();
char c;
while ((c=*p++))
{
@@ -5297,7 +5299,7 @@ static std::mutex g_rtfFormatMutex;
static std::unordered_map<std::string,std::string> g_tagMap;
static QCString g_nextTag( "AAAAAAAAAA" );
-QCString rtfFormatBmkStr(const char *name)
+QCString rtfFormatBmkStr(const QCString &name)
{
std::lock_guard<std::mutex> lock(g_rtfFormatMutex);
@@ -5306,7 +5308,7 @@ QCString rtfFormatBmkStr(const char *name)
// supplied, and keep track of the correspondence
// between names and strings.
QCString tag = g_nextTag;
- auto result = g_tagMap.insert( std::make_pair(name, g_nextTag) );
+ auto result = g_tagMap.insert( std::make_pair(name.str(), g_nextTag.str()) );
if (result.second) // new item was added
{
@@ -5327,7 +5329,7 @@ QCString rtfFormatBmkStr(const char *name)
}
}
- //printf("Name = %s RTF_tag = %s\n",name,(*tag).data());
+ //printf("Name = %s RTF_tag = %s\n",name,qPrint(*tag)));
return tag;
}
@@ -5336,28 +5338,27 @@ bool checkExtension(const char *fName, const char *ext)
return (QCString(fName).right(QCString(ext).length())==ext);
}
-QCString addHtmlExtensionIfMissing(const char *fName)
+QCString addHtmlExtensionIfMissing(const QCString &fName)
{
- if (fName==0) return fName;
- const char *p = strchr(fName,'.');
- if (p==nullptr) // no extension
+ if (fName.isEmpty()) return fName;
+ if (fName.find('.')==-1) // no extension
{
return QCString(fName)+Doxygen::htmlFileExtension;
}
return fName;
}
-QCString stripExtensionGeneral(const char *fName, const char *ext)
+QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
{
QCString result=fName;
- if (result.right(QCString(ext).length())==QCString(ext))
+ if (result.right(ext.length())==ext)
{
- result=result.left(result.length()-QCString(ext).length());
+ result=result.left(result.length()-ext.length());
}
return result;
}
-QCString stripExtension(const char *fName)
+QCString stripExtension(const QCString &fName)
{
return stripExtensionGeneral(fName, Doxygen::htmlFileExtension);
}
@@ -5369,10 +5370,10 @@ void replaceNamespaceAliases(QCString &scope,int i)
QCString ns = scope.left(i);
if (!ns.isEmpty())
{
- auto it = Doxygen::namespaceAliasMap.find(ns.data());
+ auto it = Doxygen::namespaceAliasMap.find(ns.str());
if (it!=Doxygen::namespaceAliasMap.end())
{
- scope=it->second.data()+scope.right(scope.length()-i);
+ scope=QCString(it->second)+scope.right(scope.length()-i);
i=static_cast<int>(it->second.length());
}
}
@@ -5380,7 +5381,7 @@ void replaceNamespaceAliases(QCString &scope,int i)
}
}
-QCString stripPath(const char *s)
+QCString stripPath(const QCString &s)
{
QCString result=s;
int i=result.findRev('/');
@@ -5397,11 +5398,11 @@ QCString stripPath(const char *s)
}
/** returns \c TRUE iff string \a s contains word \a w */
-bool containsWord(const char *str,const char *word)
+bool containsWord(const QCString &str,const char *word)
{
- if (str==0 || word==0) return false;
+ if (str.isEmpty() || word==0) return false;
static const reg::Ex re(R"(\a+)");
- std::string s = str;
+ std::string s = str.str();
for (reg::Iterator it(s,re) ; it!=reg::Iterator() ; ++it)
{
if (it->str()==word) return true;
@@ -5458,8 +5459,8 @@ bool findAndRemoveWord(QCString &sentence,const char *word)
*/
QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine)
{
+ if (s.isEmpty()) return QCString();
const char *p = s.data();
- if (p==0) return 0;
// search for leading empty lines
int i=0,li=-1,l=s.length();
@@ -5490,8 +5491,8 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine)
// return substring
if (bi==-1) bi=l;
if (li==-1) li=0;
- if (bi<=li) return 0; // only empty lines
- //printf("docLine='%s' len=%d li=%d bi=%d\n",s.data(),s.length(),li,bi);
+ if (bi<=li) return QCString(); // only empty lines
+ //printf("docLine='%s' len=%d li=%d bi=%d\n",qPrint(s),s.length(),li,bi);
return s.mid(li,bi-li);
}
@@ -5551,17 +5552,17 @@ bool updateLanguageMapping(const QCString &extension,const QCString &language)
{
g_extLookup.erase(it); // language was already register for this ext
}
- //printf("registering extension %s\n",extName.data());
- g_extLookup.insert(std::make_pair(extName,parserId));
+ //printf("registering extension %s\n",qPrint(extName));
+ g_extLookup.insert(std::make_pair(extName.str(),parserId));
if (!Doxygen::parserManager->registerExtension(extName,p->parserName))
{
err("Failed to assign extension %s to parser %s for language %s\n",
- extName.data(),p->parserName,language.data());
+ extName.data(),p->parserName,qPrint(language));
}
else
{
//msg("Registered extension %s to language parser %s...\n",
- // extName.data(),language.data());
+ // extName.data(),qPrint(language));
}
return TRUE;
}
@@ -5645,10 +5646,10 @@ SrcLangExt getLanguageFromFileName(const QCString& fileName)
auto it = g_extLookup.find(extName.str());
if (it!=g_extLookup.end()) // listed extension
{
- //printf("getLanguageFromFileName(%s)=%x\n",fi.extension().data(),*pVal);
+ //printf("getLanguageFromFileName(%s)=%x\n",qPrint(fi.extension()),*pVal);
return (SrcLangExt)it->second;
}
- //printf("getLanguageFromFileName(%s) not found!\n",fileName.data());
+ //printf("getLanguageFromFileName(%s) not found!\n",qPrint(fileName));
return SrcLangExt_Cpp; // not listed => assume C-ish language.
}
@@ -5663,7 +5664,7 @@ QCString getFileNameExtension(QCString fn)
//--------------------------------------------------------------------------
static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fileScope,
- const char *n)
+ const QCString &n)
{
if (scope==0 ||
(scope->definitionType()!=Definition::TypeClass &&
@@ -5691,7 +5692,7 @@ static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fil
replaceNamespaceAliases(explicitScopePart,explicitScopePart.length());
name = name.mid(qualifierIndex+2);
}
- //printf("explicitScopePart=%s\n",explicitScopePart.data());
+ //printf("explicitScopePart=%s\n",qPrint(explicitScopePart));
int minDistance = 10000;
MemberDef *bestMatch = 0;
@@ -5707,7 +5708,7 @@ static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fil
{
minDistance = distance;
bestMatch = toMemberDef(d);
- //printf("new best match %s distance=%d\n",bestMatch->qualifiedName().data(),distance);
+ //printf("new best match %s distance=%d\n",qPrint(bestMatch->qualifiedName()),distance);
}
}
}
@@ -5715,7 +5716,7 @@ static MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fil
}
/*! Returns true iff the given name string appears to be a typedef in scope. */
-bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const char *n)
+bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const QCString &n)
{
MemberDef *bestMatch = getMemberFromSymbol(scope,fileScope,n);
@@ -5773,11 +5774,11 @@ QCString parseCommentAsText(const Definition *scope,const MemberDef *md,
const QCString &doc,const QCString &fileName,int lineNr)
{
if (doc.isEmpty()) return "";
- //printf("parseCommentAsText(%s)\n",doc.data());
+ //printf("parseCommentAsText(%s)\n",qPrint(doc));
TextStream t;
DocNode *root = validatingParseDoc(fileName,lineNr,
(Definition*)scope,(MemberDef*)md,doc,FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
TextDocVisitor *visitor = new TextDocVisitor(t);
root->accept(visitor);
delete visitor;
@@ -5858,7 +5859,7 @@ static int findEndOfCommand(const char *s)
static QCString replaceAliasArguments(StringUnorderedSet &aliasesProcessed,
const QCString &aliasValue,const QCString &argList)
{
- //printf("----- replaceAliasArguments(val=[%s],args=[%s])\n",aliasValue.data(),argList.data());
+ //printf("----- replaceAliasArguments(val=[%s],args=[%s])\n",qPrint(aliasValue),qPrint(argList));
// first make a list of arguments from the comma separated argument list
std::vector<QCString> args;
@@ -5896,7 +5897,7 @@ static QCString replaceAliasArguments(StringUnorderedSet &aliasesProcessed,
insideMarkerId = false;
int markerLen = i-markerStart;
markerList.push_back(Marker(markerStart-1,
- atoi(aliasValue.mid(markerStart,markerLen)),
+ aliasValue.mid(markerStart,markerLen).toInt(),
markerLen+1));
}
if (c=='\\' && (pc=='@' || pc=='\\')) // found escaped backslash
@@ -5922,17 +5923,17 @@ static QCString replaceAliasArguments(StringUnorderedSet &aliasesProcessed,
{
const Marker &m = markerList.at(i);
result+=aliasValue.mid(p,m.pos-p);
- //printf("part before marker %d: '%s'\n",i,aliasValue.mid(p,m->pos-p).data());
+ //printf("part before marker %d: '%s'\n",i,qPrint(aliasValue.mid(p,m->pos-p)));
if (m.number>0 && m.number<=(int)args.size()) // valid number
{
result+=expandAliasRec(aliasesProcessed,args.at(m.number-1).str(),TRUE);
//printf("marker index=%d pos=%d number=%d size=%d replacement %s\n",i,m->pos,m->number,m->size,
- // args.at(m->number-1)->data());
+ // qPrint(args.at(m->number-1)));
}
p=m.pos+m.size; // continue after the marker
}
result+=aliasValue.right(l-p); // append remainder
- //printf("string after replacement of markers: '%s'\n",result.data());
+ //printf("string after replacement of markers: '%s'\n",qPrint(result));
// expand the result again
result = substitute(result,"\\{","{");
@@ -5944,6 +5945,7 @@ static QCString replaceAliasArguments(StringUnorderedSet &aliasesProcessed,
static QCString escapeCommas(const QCString &s)
{
+ if (s.isEmpty()) return s;
TextStream result;
const char *p = s.data();
char c,pc=0;
@@ -5959,7 +5961,7 @@ static QCString escapeCommas(const QCString &s)
}
pc=c;
}
- //printf("escapeCommas: '%s'->'%s'\n",s.data(),result.data());
+ //printf("escapeCommas: '%s'->'%s'\n",qPrint(s),qPrint(result));
return result.str();
}
@@ -5977,7 +5979,7 @@ static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const std::s
int i = (int)match.position();
int l = (int)match.length();
if (i>p) result+=s.substr(p,i-p);
- QCString args = extractAliasArgs(s,i+l);
+ QCString args = extractAliasArgs(QCString(s),i+l);
bool hasArgs = !args.isEmpty(); // found directly after command
int argsLen = args.length();
QCString cmd = match[1].str();
@@ -6001,18 +6003,18 @@ static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const std::s
}
}
//printf("Found command s='%s' cmd='%s' numArgs=%d args='%s' aliasText=%s\n",
- // s.data(),cmd.data(),numArgs,args.data(),it!=Doxygen::aliasMap.end()?it->second.c_str():"<none>");
+ // qPrint(s),qPrint(cmd),numArgs,qPrint(args),it!=Doxygen::aliasMap.end()?it->second.c_str():"<none>");
if ((allowRecursion || aliasesProcessed.find(cmd.str())==aliasesProcessed.end()) &&
it!=Doxygen::aliasMap.end()) // expand the alias
{
//printf("is an alias!\n");
if (!allowRecursion) aliasesProcessed.insert(cmd.str());
- QCString val = it->second;
+ QCString val(it->second);
if (hasArgs)
{
val = replaceAliasArguments(aliasesProcessed,val,args);
//printf("replace '%s'->'%s' args='%s'\n",
- // aliasText->data(),val.data(),args.data());
+ // qPrint(aliasText),qPrint(val),qPrint(args));
}
result+=expandAliasRec(aliasesProcessed,val.str()).str();
if (!allowRecursion) aliasesProcessed.erase(cmd.str());
@@ -6028,12 +6030,12 @@ static QCString expandAliasRec(StringUnorderedSet &aliasesProcessed,const std::s
}
result+=s.substr(p);
- //printf("expandAliases '%s'->'%s'\n",s.data(),result.data());
+ //printf("expandAliases '%s'->'%s'\n",qPrint(s),qPrint(result));
return result;
}
-int countAliasArguments(const QCString argList)
+int countAliasArguments(const QCString &argList)
{
int count=1;
int l = argList.length();
@@ -6074,7 +6076,7 @@ QCString extractAliasArgs(const QCString &args,int pos)
if (bc==0)
{
- //printf("extractAliasArgs('%s')->'%s'\n",args.data(),args.mid(pos+1,i-pos-1).data());
+ //printf("extractAliasArgs('%s')->'%s'\n",qPrint(args),qPrint(args.mid(pos+1,i-pos-1)));
return args.mid(pos+1,i-pos-1);
}
}
@@ -6082,13 +6084,13 @@ QCString extractAliasArgs(const QCString &args,int pos)
return "";
}
-QCString resolveAliasCmd(const QCString aliasCmd)
+QCString resolveAliasCmd(const QCString &aliasCmd)
{
QCString result;
StringUnorderedSet aliasesProcessed;
- //printf("Expanding: '%s'\n",aliasCmd.data());
+ //printf("Expanding: '%s'\n",qPrint(aliasCmd));
result = expandAliasRec(aliasesProcessed,aliasCmd.str());
- //printf("Expanding result: '%s'->'%s'\n",aliasCmd.data(),result.data());
+ //printf("Expanding result: '%s'->'%s'\n",qPrint(aliasCmd),qPrint(result));
return result;
}
@@ -6099,9 +6101,9 @@ std::string expandAlias(const std::string &aliasName,const std::string &aliasVal
// avoid expanding this command recursively
aliasesProcessed.insert(aliasName);
// expand embedded commands
- //printf("Expanding: '%s'->'%s'\n",aliasName.data(),aliasValue.data());
+ //printf("Expanding: '%s'->'%s'\n",qPrint(aliasName),qPrint(aliasValue));
result = expandAliasRec(aliasesProcessed,aliasValue.c_str());
- //printf("Expanding result: '%s'->'%s'\n",aliasName.data(),result.data());
+ //printf("Expanding result: '%s'->'%s'\n",qPrint(aliasName),qPrint(result));
return result.str();
}
@@ -6119,7 +6121,7 @@ void writeTypeConstraints(OutputList &ol,const Definition *d,const ArgumentList
ol.endConstraintType();
ol.startConstraintDocs();
ol.generateDoc(d->docFile(),d->docLine(),d,0,a.docs,TRUE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endConstraintDocs();
}
ol.endConstraintList();
@@ -6154,17 +6156,17 @@ void stackTrace()
#endif
}
-static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size,
- const char *inputEncoding,const char *outputEncoding)
+static int transcodeCharacterBuffer(const QCString &fileName,BufStr &srcBuf,int size,
+ const QCString &inputEncoding,const QCString &outputEncoding)
{
- if (inputEncoding==0 || outputEncoding==0) return size;
+ if (inputEncoding.isEmpty() || outputEncoding.isEmpty()) return size;
if (qstricmp(inputEncoding,outputEncoding)==0) return size;
void *cd = portable_iconv_open(outputEncoding,inputEncoding);
if (cd==(void *)(-1))
{
term("unsupported character conversion: '%s'->'%s': %s\n"
"Check the INPUT_ENCODING setting in the config file!\n",
- inputEncoding,outputEncoding,strerror(errno));
+ qPrint(inputEncoding),qPrint(outputEncoding),strerror(errno));
}
int tmpBufSize=size*4+1;
BufStr tmpBuf(tmpBufSize);
@@ -6178,32 +6180,32 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size
newSize = tmpBufSize-(int)oLeft;
srcBuf.shrink(newSize);
strncpy(srcBuf.data(),tmpBuf.data(),newSize);
- //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,srcBuf.data());
+ //printf("iconv: input size=%d output size=%d\n[%s]\n",size,newSize,qPrint(srcBuf));
}
else
{
term("%s: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
- fileName,inputEncoding,outputEncoding);
+ qPrint(fileName),qPrint(inputEncoding),qPrint(outputEncoding));
}
portable_iconv_close(cd);
return newSize;
}
//! read a file name \a fileName and optionally filter and transcode it
-bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceCode)
+bool readInputFile(const QCString &fileName,BufStr &inBuf,bool filter,bool isSourceCode)
{
// try to open file
int size=0;
- FileInfo fi(fileName);
+ FileInfo fi(fileName.str());
if (!fi.exists()) return FALSE;
QCString filterName = getFileFilter(fileName,isSourceCode);
if (filterName.isEmpty() || !filter)
{
- std::ifstream f(fileName,std::ifstream::in | std::ifstream::binary);
+ std::ifstream f(fileName.str(),std::ifstream::in | std::ifstream::binary);
if (!f.is_open())
{
- err("could not open file %s\n",fileName);
+ err("could not open file %s\n",qPrint(fileName));
return FALSE;
}
size=(int)fi.size();
@@ -6212,7 +6214,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
f.read(inBuf.data(),size);
if (f.fail())
{
- err("problems while reading file %s\n",fileName);
+ err("problems while reading file %s\n",qPrint(fileName));
return FALSE;
}
}
@@ -6223,7 +6225,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
FILE *f=Portable::popen(cmd,"r");
if (!f)
{
- err("could not execute filter %s\n",filterName.data());
+ err("could not execute filter %s\n",qPrint(filterName));
return FALSE;
}
const int bufSize=1024;
@@ -6275,22 +6277,23 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
// and translate CR's
size=inBuf.curPos()-start;
int newSize=filterCRLF(inBuf.data()+start,size);
- //printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize);
+ //printf("filter char at %p size=%d newSize=%d\n",qPrint(dest)+oldPos,size,newSize);
if (newSize!=size) // we removed chars
{
inBuf.shrink(newSize); // resize the array
- //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,dest.data());
+ //printf(".......resizing from %d to %d result=[%s]\n",oldPos+size,oldPos+newSize,qPrint(dest));
}
inBuf.addChar(0);
return TRUE;
}
// Replace %word by word in title
-QCString filterTitle(const std::string &title)
+QCString filterTitle(const QCString &title)
{
std::string tf;
+ std::string t = title.str();
static const reg::Ex re(R"(%[a-z_A-Z]+)");
- reg::Iterator it(title,re);
+ reg::Iterator it(t,re);
reg::Iterator end;
size_t p = 0;
for (; it!=end ; ++it)
@@ -6298,11 +6301,11 @@ QCString filterTitle(const std::string &title)
const auto &match = *it;
size_t i = match.position();
size_t l = match.length();
- if (i>p) tf+=title.substr(p,i-p);
+ if (i>p) tf+=t.substr(p,i-p);
tf+=match.str().substr(1); // skip %
p=i+l;
}
- tf+=title.substr(p);
+ tf+=t.substr(p);
return tf;
}
@@ -6347,7 +6350,7 @@ bool patternMatch(const FileInfo &fi,const StringVector &patList)
(fn!=afp && fp!=afp && reg::match(afp,re)));
if (found) break;
//printf("Matching '%s' against pattern '%s' found=%d\n",
- // fi->fileName().data(),pattern.data(),found);
+ // qPrint(fi->fileName()),qPrint(pattern),found);
}
}
}
@@ -6394,15 +6397,14 @@ QCString externalRef(const QCString &relPath,const QCString &ref,bool href)
/** Writes the intensity only bitmap represented by \a data as an image to
* directory \a dir using the colors defined by HTML_COLORSTYLE_*.
*/
-void writeColoredImgData(const char *dir,ColoredImgDataItem data[])
+void writeColoredImgData(const QCString &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);
while (data->name)
{
- QCString fileName;
- fileName=(QCString)dir+"/"+data->name;
+ QCString fileName = dir+"/"+data->name;
ColoredImage img(data->width,data->height,data->content,data->alpha,
sat,hue,gamma);
if (!img.save(fileName))
@@ -6419,11 +6421,11 @@ void writeColoredImgData(const char *dir,ColoredImgDataItem data[])
* valid color, based on the intensity represented by hex number AA
* and the current HTML_COLORSTYLE_* settings.
*/
-QCString replaceColorMarkers(const char *str)
+QCString replaceColorMarkers(const QCString &str)
{
- if (str==0) return QCString();
+ if (str.isEmpty()) return QCString();
std::string result;
- std::string s=str;
+ std::string s=str.str();
static const reg::Ex re(R"(##[0-9A-Fa-f][0-9A-Fa-f])");
reg::Iterator it(s,re);
reg::Iterator end;
@@ -6460,7 +6462,7 @@ QCString replaceColorMarkers(const char *str)
colStr[5]=hex[blue>>4];
colStr[6]=hex[blue&0xf];
colStr[7]=0;
- //printf("replacing %s->%s (level=%d)\n",lumStr.data(),colStr,level);
+ //printf("replacing %s->%s (level=%d)\n",qPrint(lumStr),colStr,level);
result+=colStr;
p=i+l;
}
@@ -6475,7 +6477,7 @@ bool copyFile(const QCString &src,const QCString &dest)
{
if (!Dir().copy(src.str(),dest.str()))
{
- err("could not copy file %s to %s\n",src.data(),dest.data());
+ err("could not copy file %s to %s\n",qPrint(src),qPrint(dest));
return false;
}
return true;
@@ -6485,7 +6487,7 @@ bool copyFile(const QCString &src,const QCString &dest)
* Full lines are returned, excluding the lines on which the markers appear.
* \sa routine lineBlock
*/
-QCString extractBlock(const QCString text,const QCString marker)
+QCString extractBlock(const QCString &text,const QCString &marker)
{
QCString result;
int p=0,i;
@@ -6523,14 +6525,14 @@ QCString extractBlock(const QCString text,const QCString marker)
{
l2=lp;
}
- //printf("text=[%s]\n",text.mid(l1,l2-l1).data());
+ //printf("text=[%s]\n",qPrint(text.mid(l1,l2-l1)));
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 lineBlock(const QCString &text,const QCString &marker)
{
int result = 1;
int p=0,i;
@@ -6633,7 +6635,7 @@ QCString stripIndentation(const QCString &s)
{
if (s.isEmpty()) return s; // empty string -> we're done
- //printf("stripIndentation:\n%s\n------\n",s.data());
+ //printf("stripIndentation:\n%s\n------\n",qPrint(s));
// compute minimum indentation over all lines
const char *p=s.data();
char c;
@@ -6847,7 +6849,7 @@ bool namespaceHasNestedConcept(const NamespaceDef *nd)
{
if (namespaceHasNestedConcept(cnd))
{
- //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",nd->name().data(),includeClasses);
+ //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",qPrint(nd->name()),includeClasses);
return true;
}
}
@@ -6863,12 +6865,12 @@ bool namespaceHasNestedConcept(const NamespaceDef *nd)
bool namespaceHasNestedClass(const NamespaceDef *nd,bool filterClasses,ClassDef::CompoundType ct)
{
- //printf(">namespaceHasVisibleChild(%s,includeClasses=%d)\n",nd->name().data(),includeClasses);
+ //printf(">namespaceHasVisibleChild(%s,includeClasses=%d)\n",qPrint(nd->name()),includeClasses);
for (const auto &cnd : nd->getNamespaces())
{
if (namespaceHasNestedClass(cnd,filterClasses,ct))
{
- //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",nd->name().data(),includeClasses);
+ //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",qPrint(nd->name()),includeClasses);
return TRUE;
}
}
@@ -6894,7 +6896,7 @@ bool namespaceHasNestedClass(const NamespaceDef *nd,bool filterClasses,ClassDef:
{
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
- //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case3\n",nd->name().data(),includeClasses);
+ //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case3\n",qPrint(nd->name()),includeClasses);
return TRUE;
}
}
@@ -7153,11 +7155,11 @@ QCString getDotImageExtension()
return i==-1 ? imgExt : imgExt.left(i);
}
-bool openOutputFile(const char *outFile,std::ofstream &f)
+bool openOutputFile(const QCString &outFile,std::ofstream &f)
{
assert(!f.is_open());
bool fileOpened=FALSE;
- bool writeToStdout=(outFile[0]=='-' && outFile[1]=='\0');
+ bool writeToStdout=outFile=="-";
if (writeToStdout) // write to stdout
{
f.basic_ios<char>::rdbuf(std::cout.rdbuf());
@@ -7165,7 +7167,7 @@ bool openOutputFile(const char *outFile,std::ofstream &f)
}
else // write to file
{
- FileInfo fi(outFile);
+ FileInfo fi(outFile.str());
if (fi.exists()) // create a backup
{
Dir dir;
@@ -7174,7 +7176,7 @@ bool openOutputFile(const char *outFile,std::ofstream &f)
dir.remove(backup.fileName());
dir.rename(fi.fileName(),fi.fileName()+".bak");
}
- f.open(outFile,std::ofstream::out | std::ofstream::binary);
+ f.open(outFile.str(),std::ofstream::out | std::ofstream::binary);
fileOpened = f.is_open();
}
return fileOpened;
@@ -7226,7 +7228,7 @@ void writeLatexSpecialFormulaChars(TextStream &t)
//------------------------------------------------------
// simplified way to know if this is fixed form
-bool recognizeFixedForm(const char* contents, FortranFormat format)
+bool recognizeFixedForm(const QCString &contents, FortranFormat format)
{
int column=0;
bool skipLine=FALSE;
@@ -7234,10 +7236,12 @@ bool recognizeFixedForm(const char* contents, FortranFormat format)
if (format == FortranFormat_Fixed) return TRUE;
if (format == FortranFormat_Free) return FALSE;
- for(int i=0;;i++) {
+ for (int i=0;;i++)
+ {
column++;
- switch(contents[i]) {
+ switch(contents[i])
+ {
case '\n':
column=0;
skipLine=FALSE;
@@ -7271,7 +7275,7 @@ bool recognizeFixedForm(const char* contents, FortranFormat format)
FortranFormat convertFileNameFortranParserCode(QCString fn)
{
QCString ext = getFileNameExtension(fn);
- QCString parserName = Doxygen::parserManager->getParserName(ext.data());
+ QCString parserName = Doxygen::parserManager->getParserName(ext);
if (parserName == "fortranfixed") return FortranFormat_Fixed;
else if (parserName == "fortranfree") return FortranFormat_Free;
@@ -7281,18 +7285,18 @@ FortranFormat convertFileNameFortranParserCode(QCString fn)
//------------------------------------------------------------------------
/// Clear a text block \a s from \a begin to \a end markers
-QCString clearBlock(const char *s,const char *begin,const char *end)
+QCString clearBlock(const QCString &s,const QCString &begin,const QCString &end)
{
- if (s==0 || begin==0 || end==0) return s;
+ if (s.isEmpty() || begin.isEmpty() || end.isEmpty()) return s;
const char *p, *q;
- int beginLen = qstrlen(begin);
- int endLen = qstrlen(end);
+ int beginLen = (int)begin.length();
+ int endLen = (int)end.length();
int resLen = 0;
- for (p=s; (q=strstr(p,begin))!=0; p=q+endLen)
+ for (p=s.data(); (q=strstr(p,begin.data()))!=0; p=q+endLen)
{
resLen+=(int)(q-p);
p=q+beginLen;
- if ((q=strstr(p,end))==0)
+ if ((q=strstr(p,end.data()))==0)
{
resLen+=beginLen;
break;
@@ -7303,15 +7307,15 @@ QCString clearBlock(const char *s,const char *begin,const char *end)
QCString result(resLen+1);
char *r;
- for (r=result.rawData(), p=s; (q=strstr(p,begin))!=0; p=q+endLen)
+ for (r=result.rawData(), p=s.data(); (q=strstr(p,begin.data()))!=0; p=q+endLen)
{
int l = (int)(q-p);
memcpy(r,p,l);
r+=l;
p=q+beginLen;
- if ((q=strstr(p,end))==0)
+ if ((q=strstr(p,end.data()))==0)
{
- memcpy(r,begin,beginLen);
+ memcpy(r,begin.data(),beginLen);
r+=beginLen;
break;
}
@@ -7389,7 +7393,7 @@ QCString removeEmptyLines(const QCString &s)
}
}
out.addChar('\0');
- //printf("removeEmptyLines(%s)=%s\n",s.data(),out.data());
+ //printf("removeEmptyLines(%s)=%s\n",qPrint(s),qPrint(out));
return out.data();
}
diff --git a/src/util.h b/src/util.h
index 8fe5ea1..67a2cbf 100644
--- a/src/util.h
+++ b/src/util.h
@@ -64,10 +64,10 @@ class TextGeneratorIntf
{
public:
virtual ~TextGeneratorIntf() {}
- virtual void writeString(const char *,bool) const = 0;
+ virtual void writeString(const QCString &,bool) const = 0;
virtual void writeBreak(int indent) const = 0;
- virtual void writeLink(const char *extRef,const char *file,
- const char *anchor,const char *text
+ virtual void writeLink(const QCString &extRef,const QCString &file,
+ const QCString &anchor,const QCString &text
) const = 0;
};
@@ -77,10 +77,10 @@ class TextGeneratorOLImpl : public TextGeneratorIntf
public:
virtual ~TextGeneratorOLImpl() {}
TextGeneratorOLImpl(OutputDocInterface &od);
- void writeString(const char *s,bool keepSpaces) const;
+ void writeString(const QCString &s,bool keepSpaces) const;
void writeBreak(int indent) const;
- void writeLink(const char *extRef,const char *file,
- const char *anchor,const char *text
+ void writeLink(const QCString &extRef,const QCString &file,
+ const QCString &anchor,const QCString &text
) const;
private:
OutputDocInterface &m_od;
@@ -97,20 +97,20 @@ void linkifyText(const TextGeneratorIntf &ol,
const Definition *scope,
const FileDef *fileScope,
const Definition *self,
- const char *text,
+ const QCString &text,
bool autoBreak=FALSE,
bool external=TRUE,
bool keepSpaces=FALSE,
int indentLevel=0
);
-QCString fileToString(const char *name,bool filter=FALSE,bool isSourceCode=FALSE);
+QCString fileToString(const QCString &name,bool filter=FALSE,bool isSourceCode=FALSE);
QCString dateToString(bool);
bool getDefs(const QCString &scopeName,
const QCString &memberName,
- const char *,
+ const QCString &args,
const MemberDef *&md,
const ClassDef *&cd,
const FileDef *&fd,
@@ -121,10 +121,10 @@ bool getDefs(const QCString &scopeName,
bool checkCV=FALSE
);
-QCString getFileFilter(const char* name,bool isSourceCode);
+QCString getFileFilter(const QCString &name,bool isSourceCode);
-bool resolveRef(/* in */ const char *scName,
- /* in */ const char *name,
+bool resolveRef(/* in */ const QCString &scName,
+ /* in */ const QCString &name,
/* in */ bool inSeeBlock,
/* out */ const Definition **resContext,
/* out */ const MemberDef **resMember,
@@ -133,8 +133,8 @@ bool resolveRef(/* in */ const char *scName,
/* in */ bool checkScope = FALSE
);
-bool resolveLink(/* in */ const char *scName,
- /* in */ const char *lr,
+bool resolveLink(/* in */ const QCString &scName,
+ /* in */ const QCString &lr,
/* in */ bool inSeeBlock,
/* out */ const Definition **resContext,
/* out */ QCString &resAnchor
@@ -143,13 +143,13 @@ bool resolveLink(/* in */ const char *scName,
//bool generateRef(OutputDocInterface &od,const char *,
// const char *,bool inSeeBlock,const char * =0);
-bool generateLink(OutputDocInterface &od,const char *,
- const char *,bool inSeeBlock,const char *);
+bool generateLink(OutputDocInterface &od,const QCString &,
+ const QCString &,bool inSeeBlock,const QCString &);
-void generateFileRef(OutputDocInterface &od,const char *,
- const char *linkTxt=0);
+void generateFileRef(OutputDocInterface &od,const QCString &,
+ const QCString &linkTxt=QCString());
-void writePageRef(OutputDocInterface &od,const char *cn,const char *mn);
+void writePageRef(OutputDocInterface &od,const QCString &cn,const QCString &mn);
QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QCString& spec);
@@ -167,32 +167,30 @@ QCString clearBlock(const char *s,const char *begin,const char *end);
QCString selectBlock(const QCString& s,const QCString &name,bool enable, OutputGenerator::OutputType o);
QCString removeEmptyLines(const QCString &s);
-QCString resolveDefines(const char *n);
-
-ClassDef *getClass(const char *key);
-inline ClassDefMutable *getClassMutable(const char *key)
+ClassDef *getClass(const QCString &key);
+inline ClassDefMutable *getClassMutable(const QCString &key)
{
return toClassDefMutable(getClass(key));
}
-ConceptDef *getConcept(const char *key);
-inline ConceptDefMutable *getConceptMutable(const char *key)
+ConceptDef *getConcept(const QCString &key);
+inline ConceptDefMutable *getConceptMutable(const QCString &key)
{
return toConceptDefMutable(getConcept(key));
}
-ConceptDef *getResolvedConcept(const Definition *scope,const char *name);
+ConceptDef *getResolvedConcept(const Definition *scope,const QCString &name);
-NamespaceDef *getResolvedNamespace(const char *key);
-inline NamespaceDefMutable *getResolvedNamespaceMutable(const char *key)
+NamespaceDef *getResolvedNamespace(const QCString &key);
+inline NamespaceDefMutable *getResolvedNamespaceMutable(const QCString &key)
{
return toNamespaceDefMutable(getResolvedNamespace(key));
}
-FileDef *findFileDef(const FileNameLinkedMap *fnMap,const char *n,
+FileDef *findFileDef(const FileNameLinkedMap *fnMap,const QCString &n,
bool &ambig);
-QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const char *n);
+QCString showFileDefMatches(const FileNameLinkedMap *fnMap,const QCString &n);
-int guessSection(const char *name);
+int guessSection(const QCString &name);
inline bool isId(int c)
{
@@ -223,14 +221,14 @@ bool rightScopeMatch(const QCString &scope, const QCString &name);
bool leftScopeMatch(const QCString &scope, const QCString &name);
-QCString substituteKeywords(const QCString &s,const char *title,
- const char *projName,const char *projNum,const char *projBrief);
+QCString substituteKeywords(const QCString &s,const QCString &title,
+ const QCString &projName,const QCString &projNum,const QCString &projBrief);
int getPrefixIndex(const QCString &name);
-QCString removeAnonymousScopes(const char *s);
+QCString removeAnonymousScopes(const QCString &s);
-QCString replaceAnonymousScopes(const char *s,const char *replacement=0);
+QCString replaceAnonymousScopes(const QCString &s,const QCString &replacement=QCString());
bool hasVisibleRoot(const BaseClassList &bcl);
bool classHasVisibleChildren(const ClassDef *cd);
@@ -242,7 +240,7 @@ bool classVisibleInIndex(const ClassDef *cd);
int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level=0);
Protection classInheritedProtectionLevel(const ClassDef *cd,const ClassDef *bcd,Protection prot=Public,int level=0);
-QCString convertNameToFile(const char *name,bool allowDots=FALSE,bool allowUnderscore=FALSE);
+QCString convertNameToFile(const QCString &name,bool allowDots=FALSE,bool allowUnderscore=FALSE);
void extractNamespaceName(const QCString &scopeName,
QCString &className,QCString &namespaceName,
@@ -250,22 +248,22 @@ void extractNamespaceName(const QCString &scopeName,
QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
-QCString stripScope(const char *name);
+QCString stripScope(const QCString &name);
-QCString convertToId(const char *s);
-QCString correctId(QCString s);
+QCString convertToId(const QCString &s);
+QCString correctId(const QCString &s);
-QCString convertToHtml(const char *s,bool keepEntities=TRUE);
+QCString convertToHtml(const QCString &s,bool keepEntities=TRUE);
QCString convertToLaTeX(const QCString &s,bool insideTabbing=FALSE,bool keepSpaces=FALSE);
-QCString convertToXML(const char *s, bool keepEntities=FALSE);
+QCString convertToXML(const QCString &s, bool keepEntities=FALSE);
-QCString convertToDocBook(const char *s);
+QCString convertToDocBook(const QCString &s);
-QCString convertToJSString(const char *s);
+QCString convertToJSString(const QCString &s);
-QCString convertToPSString(const char *s);
+QCString convertToPSString(const QCString &s);
QCString getOverloadDocs();
@@ -273,7 +271,7 @@ void addMembersToMemberGroup(/* in,out */ MemberList *ml,
/* in,out */ MemberGroupList *pMemberGroups,
/* in */ const Definition *context);
-int extractClassNameFromType(const char *type,int &pos,
+int extractClassNameFromType(const QCString &type,int &pos,
QCString &name,QCString &templSpec,SrcLangExt=SrcLangExt_Unknown);
QCString normalizeNonTemplateArgumentsInString(
@@ -282,7 +280,7 @@ QCString normalizeNonTemplateArgumentsInString(
const ArgumentList &formalArgs);
QCString substituteTemplateArgumentsInString(
- const std::string &name,
+ const QCString &name,
const ArgumentList &formalArgs,
const std::unique_ptr<ArgumentList> &actualArgs);
@@ -300,17 +298,17 @@ int getScopeFragment(const QCString &s,int p,int *l);
int filterCRLF(char *buf,int len);
void addRefItem(const RefItemVector &sli,
- const char *key,
- const char *prefix,
- const char *name,
- const char *title,
- const char *args,
+ const QCString &key,
+ const QCString &prefix,
+ const QCString &name,
+ const QCString &title,
+ const QCString &args,
const Definition *scope);
-PageDef *addRelatedPage(const char *name,
+PageDef *addRelatedPage(const QCString &name,
const QCString &ptitle,
const QCString &doc,
- const char *fileName,
+ const QCString &fileName,
int docLine,
int startLine,
const RefItemVector &sli = RefItemVector(),
@@ -320,34 +318,34 @@ PageDef *addRelatedPage(const char *name,
SrcLangExt lang=SrcLangExt_Unknown
);
-QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore=FALSE);
-QCString unescapeCharsInString(const char *s);
+QCString escapeCharsInString(const QCString &name,bool allowDots,bool allowUnderscore=FALSE);
+QCString unescapeCharsInString(const QCString &s);
void addGroupListToTitle(OutputList &ol,const Definition *d);
-void filterLatexString(TextStream &t,const char *str,
+void filterLatexString(TextStream &t,const QCString &str,
bool insideTabbing,
bool insidePre,
bool insideItem,
bool insideTable,
bool keepSpaces);
-QCString latexEscapeLabelName(const char *s);
-QCString latexEscapeIndexChars(const char *s);
-QCString latexEscapePDFString(const char *s);
-QCString latexFilterURL(const char *s);
+QCString latexEscapeLabelName(const QCString &s);
+QCString latexEscapeIndexChars(const QCString &s);
+QCString latexEscapePDFString(const QCString &s);
+QCString latexFilterURL(const QCString &s);
-QCString rtfFormatBmkStr(const char *name);
+QCString rtfFormatBmkStr(const QCString &name);
-QCString linkToText(SrcLangExt lang,const char *link,bool isFileName);
+QCString linkToText(SrcLangExt lang,const QCString &link,bool isFileName);
bool checkExtension(const char *fName, const char *ext);
-QCString addHtmlExtensionIfMissing(const char *fName);
+QCString addHtmlExtensionIfMissing(const QCString &fName);
-QCString stripExtensionGeneral(const char *fName, const char *ext);
+QCString stripExtensionGeneral(const QCString &fName, const QCString &ext);
-QCString stripExtension(const char *fName);
+QCString stripExtension(const QCString &fName);
void replaceNamespaceAliases(QCString &scope,int i);
@@ -355,13 +353,13 @@ int computeQualifiedIndex(const QCString &name);
void addDirPrefix(QCString &fileName);
-QCString relativePathToRoot(const char *name);
+QCString relativePathToRoot(const QCString &name);
void createSubDirs(const Dir &d);
-QCString stripPath(const char *s);
+QCString stripPath(const QCString &s);
-bool containsWord(const char *s,const char *word);
+bool containsWord(const QCString &s,const char *word);
bool findAndRemoveWord(QCString &s,const char *word);
@@ -373,7 +371,7 @@ QCString getFileNameExtension(QCString fn);
void initDefaultExtensionMapping();
void addCodeOnlyMappings();
-bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const char *n);
+bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const QCString &n);
QCString parseCommentAsText(const Definition *scope,const MemberDef *member,const QCString &doc,const QCString &fileName,int lineNr);
@@ -383,20 +381,20 @@ QCString recodeString(const QCString &str,const char *fromEncoding,const char *t
QCString extractAliasArgs(const QCString &args,int pos);
-int countAliasArguments(const QCString argList);
+int countAliasArguments(const QCString &argList);
-QCString resolveAliasCmd(const QCString aliasCmd);
+QCString resolveAliasCmd(const QCString &aliasCmd);
std::string expandAlias(const std::string &aliasName,const std::string &aliasValue);
void writeTypeConstraints(OutputList &ol,const Definition *d,const ArgumentList &al);
-QCString convertCharEntitiesToUTF8(const char *s);
+QCString convertCharEntitiesToUTF8(const QCString &s);
void stackTrace();
-bool readInputFile(const char *fileName,BufStr &inBuf,
+bool readInputFile(const QCString &fileName,BufStr &inBuf,
bool filter=TRUE,bool isSourceCode=FALSE);
-QCString filterTitle(const std::string &title);
+QCString filterTitle(const QCString &title);
bool patternMatch(const FileInfo &fi,const StringVector &patList);
@@ -417,12 +415,12 @@ struct ColoredImgDataItem
unsigned char *alpha;
};
-void writeColoredImgData(const char *dir,ColoredImgDataItem data[]);
-QCString replaceColorMarkers(const char *str);
+void writeColoredImgData(const QCString &dir,ColoredImgDataItem data[]);
+QCString replaceColorMarkers(const QCString &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 extractBlock(const QCString &text,const QCString &marker);
+int lineBlock(const QCString &text,const QCString &marker);
bool isURL(const QCString &url);
@@ -449,7 +447,7 @@ void convertProtectionLevel(
);
bool mainPageHasTitle();
-bool openOutputFile(const char *outFile,std::ofstream &f);
+bool openOutputFile(const QCString &outFile,std::ofstream &f);
void writeExtraLatexPackages(TextStream &t);
void writeLatexSpecialFormulaChars(TextStream &t);
@@ -459,7 +457,7 @@ int findIndex(const StringVector &sv,const std::string &s);
int findIndex(const std::string &s,const reg::Ex &re);
std::string join(const StringVector &s,const std::string &delimiter);
-bool recognizeFixedForm(const char* contents, FortranFormat format);
+bool recognizeFixedForm(const QCString &contents, FortranFormat format);
FortranFormat convertFileNameFortranParserCode(QCString fn);
#endif
diff --git a/src/vhdlcode.h b/src/vhdlcode.h
index 48c15bb..c563a8f 100644
--- a/src/vhdlcode.h
+++ b/src/vhdlcode.h
@@ -29,11 +29,11 @@ class VHDLCodeParser : public CodeParserInterface
VHDLCodeParser();
virtual ~VHDLCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt lang,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index 36b7e6d..1fc1858 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -110,27 +110,27 @@ struct vhdlcodeYY_state
};
-static void writeFont(yyscan_t yyscanner,const char *s,const char* text);
+static void writeFont(yyscan_t yyscanner,const char *s,const QCString &text);
static void generateMemLink(yyscan_t yyscanner,CodeOutputInterface &ol,QCString &clName,QCString& memberName);
static bool writeColoredWord(yyscan_t yyscanner,QCString& word );
-static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName, bool typeOnly=false, const char *curr_class=0);
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const QCString &clName, bool typeOnly=false, const QCString &curr_class=QCString());
static void setCurrentDoc(yyscan_t yyscanner,const QCString &anchor);
static bool checkVhdlString(yyscan_t yyscanner,QCString &name);
-static void addToSearchIndex(yyscan_t yyscanner,const char *text);
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text);
static void startCodeLine(yyscan_t yyscanner);
static void endCodeLine(yyscan_t yyscanner);
static void nextCodeLine(yyscan_t yyscanner);
-static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class=0,bool classLink=false);
-static void codifyLines(yyscan_t yyscanner,const char *text,const char *cl=0,bool classlink=false,bool comment=false);
+static void writeWord(yyscan_t yyscanner,const QCString &word,const QCString &curr_class=QCString(),bool classLink=false);
+static void codifyLines(yyscan_t yyscanner,const QCString &text,const QCString &cl=QCString(),bool classlink=false,bool comment=false);
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
- const char *text);
+ const QCString &text);
static void generateFuncLink(yyscan_t yyscanner,CodeOutputInterface &ol,const MemberDef* mdef);
static int countLines(yyscan_t yyscanner);
static void endFontClass(yyscan_t yyscanner);
static void startFontClass(yyscan_t yyscanner,const char *s);
static void appStringLower(QCString& qcs,const char* text);
-static void codifyMapLines(yyscan_t yyscanner,const char *text);
+static void codifyMapLines(yyscan_t yyscanner,const QCString &text);
static void writeFuncProto(yyscan_t yyscanner);
static void writeProcessProto(yyscan_t yyscanner);
static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size);
@@ -228,7 +228,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
if (ql.size()>=2)
{
unsigned int index=0;
- QCString t1=ql[0];
+ QCString t1(ql[0]);
char cc=t1.at(index);
while (cc==' ' || cc=='\t')
{
@@ -259,7 +259,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
codifyLines(yyscanner,"=>");
index=0;
- QCString s2=ql[1];
+ QCString s2(ql[1]);
t1=s2;
cc=t1.at(index);
while (cc==' ' || cc=='\t')
@@ -287,7 +287,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
else
{
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
}
BEGIN(Map);
}
@@ -353,7 +353,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
<ParseType>{ENDEFUNC} {
QCString tt(yytext);
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
tt=tt.lower();
VhdlDocGen::deleteAllChars(tt,';');
tt.stripWhiteSpace();
@@ -374,12 +374,12 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
<ParseType>{END1} {
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
yyextra->vhdlKeyDict.clear();
}
<ParseType>^{B}*("begin "|"begin") {
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
yyextra->isFuncProto=false;
}
@@ -387,7 +387,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
yyextra->funcProto.append(yytext);
if (yyextra->isProto)
{
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
}
}
@@ -412,7 +412,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
if (VhdlDocGen::isNumber(val.str()))
{
startFontClass(yyscanner,"vhdllogic");
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
endFontClass(yyscanner);
}
else
@@ -422,7 +422,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
else
{
- codifyLines(yyscanner,yytext,yyextra->currClass.data());
+ codifyLines(yyscanner,yytext,yyextra->currClass);
}
}
}
@@ -580,7 +580,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
std::string s3=strl[2];
s1.append(".");
s3.insert(0,".");
- codifyLines(yyscanner,s1.c_str(),yyextra->currClass.data());
+ codifyLines(yyscanner,s1.c_str(),yyextra->currClass);
ClassDef *cd=VhdlDocGen::getPackageName(s2.c_str());
if (cd)
{
@@ -606,27 +606,27 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
if (j>0)
{
QCString left=tt.left(j+1);
- codifyLines(yyscanner,left.data());
+ codifyLines(yyscanner,left);
tt=tt.right(tt.length()-j-1);
- left=VhdlDocGen::getIndexWord(tt.data(),0);
+ left=VhdlDocGen::getIndexWord(tt,0);
if (!left.isEmpty())
{
if (left.contains('('))
{
j=left.find('(',false);
QCString name=left.left(j);
- generateClassOrGlobalLink(yyscanner,*yyextra->code,name.data());
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,name);
yyextra->PortMapComp=name;
name=tt.right(tt.length()-name.length());
- codifyLines(yyscanner,name.data());
+ codifyLines(yyscanner,name);
}
else
{
- generateClassOrGlobalLink(yyscanner,*yyextra->code,left.data());
- tt.stripPrefix(left.data()); //=tt.right(tt.length()-left.length()-1);
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,left);
+ tt.stripPrefix(left); //=tt.right(tt.length()-left.length()-1);
yyextra->PortMapComp=left;
- codifyLines(yyscanner,tt.data());
+ codifyLines(yyscanner,tt);
}
}
}
@@ -634,11 +634,11 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
{
if (tt.contains(':',false))
{
- codifyMapLines(yyscanner,tt.data());
+ codifyMapLines(yyscanner,tt);
}
else
{
- codifyLines(yyscanner,tt.data());
+ codifyLines(yyscanner,tt);
}
}
yyextra->braceCount=1;
@@ -651,7 +651,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
temp=temp.stripWhiteSpace();
VhdlDocGen::deleteAllChars(temp,'\n');
yyextra->tempComp=temp;
- codifyLines(yyscanner,yytext,temp.data(),true);
+ codifyLines(yyscanner,yytext,temp,true);
yyextra->braceCount=0;
yyextra->isComponent=true;
BEGIN(ParseComponent);
@@ -667,7 +667,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
temp+=VhdlDocGen::getIndexWord(yytext,1);
yyextra->currClass=temp;
VhdlDocGen::deleteAllChars(temp,'\n');
- codifyLines(yyscanner,yytext,temp.data(),true);
+ codifyLines(yyscanner,yytext,temp,true);
yyextra->isPackageBody=false;
}
@@ -677,10 +677,10 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
QCString temp=VhdlDocGen::getIndexWord(yytext,2);
StringVector ql=split(yytext,temp.str());
std::string ll=ql[0];
- codifyLines(yyscanner,ll.c_str(),yyextra->currClass.data());
+ codifyLines(yyscanner,ll.c_str(),yyextra->currClass);
temp=temp.stripWhiteSpace();
temp.prepend("_");
- generateClassOrGlobalLink(yyscanner,*yyextra->code,temp.data());
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,temp);
yyextra->currClass.resize(0);
yyextra->currClass=temp;
yyextra->isProto=false;
@@ -743,13 +743,13 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
<Bases>"end"{BN}+"architecture"{BN}+{FUNCNAME} {
- codifyLines(yyscanner,yytext,yyextra->currClass.data(),true);
+ codifyLines(yyscanner,yytext,yyextra->currClass,true);
yyextra->currArch = false;
}
<Bases>"end"{BN}+{FUNCNAME} {
if (yyextra->currArch)
{
- codifyLines(yyscanner,yytext,yyextra->currClass.data(),true);
+ codifyLines(yyscanner,yytext,yyextra->currClass,true);
yyextra->currArch = false;
}
else
@@ -772,7 +772,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
if (!writeColoredWord(yyscanner,temp))
{
- generateClassOrGlobalLink(yyscanner,*yyextra->code,temp.data());
+ generateClassOrGlobalLink(yyscanner,*yyextra->code,temp);
}
}
<End>";" {
@@ -810,7 +810,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
<Bases>^{B}*("use"){BN}+("entity"|"component")[^\n]* {
- codifyLines(yyscanner,yytext,yyextra->currClass.data(),true);
+ codifyLines(yyscanner,yytext,yyextra->currClass,true);
}
@@ -859,7 +859,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
<Bases>^{B}*{XILINX}/[^a-zA-Z0-9_] {
writeWord(yyscanner,yytext);
- //codifyLines(yyscanner,yytext,yyextra->currClass.data(),true);
+ //codifyLines(yyscanner,yytext,yyextra->currClass,true);
}
<Bases>^{B}*"set_"[^\n]* {
@@ -969,7 +969,7 @@ static bool checkVhdlString(yyscan_t yyscanner,QCString &name)
else
{
startFontClass(yyscanner,"keyword");
- yyextra->code->codify(name.data());
+ yyextra->code->codify(name);
endFontClass(yyscanner);
}
return true;
@@ -978,14 +978,14 @@ static bool checkVhdlString(yyscan_t yyscanner,QCString &name)
if (VhdlDocGen::isNumber(name.str()))
{
startFontClass(yyscanner,"vhdllogic");
- yyextra->code->codify(name.data());
+ yyextra->code->codify(name);
endFontClass(yyscanner);
return true;
}
return false;
}
-static void addToSearchIndex(yyscan_t yyscanner,const char *text)
+static void addToSearchIndex(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (Doxygen::searchIndex)
@@ -1011,14 +1011,14 @@ static void startCodeLine(yyscan_t yyscanner)
// if ((yyextra->yyLineNr % 500) == 0)
// fprintf(stderr,"\n starting Line %d:",yyextra->yyLineNr);
const Definition *d = yyextra->sourceFileDef->getSourceDefinition(yyextra->yyLineNr);
- //printf("startCodeLine %d d=%s\n", yyextra->yyLineNr,d ? d->name().data() : "<null>");
+ //printf("startCodeLine %d d=%s\n", yyextra->yyLineNr,qPrint(d ? d->name()) : "<null>");
if (!yyextra->includeCodeFragment && d)
{
yyextra->currentDefinition = d;
yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
if (!yyextra->tempComp.isEmpty() && yyextra->currentMemberDef )
{
- //ClassDef *cf=VhdlDocGen::getClass(yyextra->tempComp.data());
+ //ClassDef *cf=VhdlDocGen::getClass(yyextra->tempComp);
QCString nn=yyextra->currentMemberDef->name();
const MemberDef* mdeff=VhdlDocGen::findMember(yyextra->tempComp,nn);
if (mdeff)
@@ -1040,13 +1040,13 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
yyextra->code->startCodeLine(yyextra->sourceFileDef);
@@ -1084,7 +1084,7 @@ static void nextCodeLine(yyscan_t yyscanner)
* and will be linked.
*/
-static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class,bool classLink)
+static void writeWord(yyscan_t yyscanner,const QCString &word,const QCString &curr_class,bool classLink)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool found=false;
@@ -1102,8 +1102,8 @@ static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class
if (!writeColoredWord(yyscanner,temp)) // is it a keyword ?
{
//if (VhdlDocGen::findKeyWord(temp))
- // writeFont(yyscanner,"vhdlkeyword",temp.data());
- //printf("writeWord: %s\n",temp.data());
+ // writeFont(yyscanner,"vhdlkeyword",temp);
+ //printf("writeWord: %s\n",qPrint(temp));
if (!tclass.isEmpty())
{
if (!classLink)
@@ -1119,7 +1119,7 @@ static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class
{
if (!checkVhdlString(yyscanner,temp))
{
- yyextra->code->codify(temp.data());
+ yyextra->code->codify(temp);
}
}
}
@@ -1156,16 +1156,16 @@ static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class
}
else
{
- QCString qc(temp.data());
+ QCString qc(temp);
if (VhdlDocGen::isNumber(qc.str()))
{
startFontClass(yyscanner,"vhdllogic");
- yyextra->code->codify(temp.data());
+ yyextra->code->codify(temp);
endFontClass(yyscanner);
}
else
{
- yyextra->code->codify(temp.data());
+ yyextra->code->codify(temp);
}
}
}
@@ -1176,12 +1176,12 @@ static void writeWord(yyscan_t yyscanner,const char *word,const char* curr_class
/*! write a code fragment 'text' that may span multiple lines, inserting
* line numbers for each line.
*/
-static void codifyLines(yyscan_t yyscanner,const char *text,const char *cl,bool classlink,bool comment)
+static void codifyLines(yyscan_t yyscanner,const QCString &text,const QCString &cl,bool classlink,bool comment)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (text==0) return;
+ if (text.isEmpty()) return;
//printf("codifyLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
- const char *p=text,*sp=p;
+ const char *p=text.data(),*sp=p;
char c;
bool done=false;
while (!done)
@@ -1195,7 +1195,7 @@ static void codifyLines(yyscan_t yyscanner,const char *text,const char *cl,bool
line = line.left((int)(p-sp)-1);
if (comment)
{
- writeFont(yyscanner,"comment",line.data());
+ writeFont(yyscanner,"comment",line);
}
else
{
@@ -1224,9 +1224,10 @@ static void codifyLines(yyscan_t yyscanner,const char *text,const char *cl,bool
*/
static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
const Definition *d,
- const char *text)
+ const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (text.isEmpty()) return;
static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance().addTooltip(ol,d);
QCString ref = d->getReference();
@@ -1238,7 +1239,7 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
tooltip = d->briefDescriptionAsTooltip();
}
bool done=false;
- char *p=(char *)text;
+ char *p=(char *)text.rawData();
while (!done)
{
char *sp=p;
@@ -1264,7 +1265,7 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,CodeOutputInterface &ol,
*/
static void generateFuncLink(yyscan_t yyscanner,CodeOutputInterface &ol,const MemberDef* mdef)
{
- //printf("generateFuncLink(FuncName=%s)\n",mdef->name().data());
+ //printf("generateFuncLink(FuncName=%s)\n",qPrint(mdef->name()));
QCString memberName=mdef->name();
if (mdef->isLinkable()) // is it a linkable class
@@ -1273,7 +1274,7 @@ static void generateFuncLink(yyscan_t yyscanner,CodeOutputInterface &ol,const Me
addToSearchIndex(yyscanner,memberName);
return;
}
- codifyLines(yyscanner,memberName.data());
+ codifyLines(yyscanner,memberName);
addToSearchIndex(yyscanner,memberName);
} // generateFuncLink
@@ -1283,7 +1284,7 @@ static void generateMemLink(yyscan_t yyscanner,CodeOutputInterface &ol,QCString
if (memberName.isEmpty()) return;
if (clName.isEmpty())
{
- codifyLines(yyscanner,memberName.data());
+ codifyLines(yyscanner,memberName);
return;
}
@@ -1294,7 +1295,7 @@ static void generateMemLink(yyscan_t yyscanner,CodeOutputInterface &ol,QCString
//bool isLocal=false;
const MemberDef *md=VhdlDocGen::findMember(className,memberName);
- ClassDef *po=VhdlDocGen::getClass(className.data());
+ ClassDef *po=VhdlDocGen::getClass(className);
if (md==0 && po && (VhdlDocGen::VhdlClasses)po->protection()==VhdlDocGen::PACKBODYCLASS)
{
@@ -1310,12 +1311,13 @@ static void generateMemLink(yyscan_t yyscanner,CodeOutputInterface &ol,QCString
return;
}
// nothing found, just write out the word
- codifyLines(yyscanner,memberName.data());
+ codifyLines(yyscanner,memberName);
addToSearchIndex(yyscanner,memberName);
}// generateMemLink
-static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/, const char *curr_class)
+static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol,
+ const QCString &clName, bool /*typeOnly*/, const QCString &curr_class)
{
QCString className=clName;
@@ -1325,8 +1327,8 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,CodeOutputInterface &ol
//MemberDef *md=0;
//bool isLocal=false;
className.stripPrefix("_");
- cd = getClass(className.data());
- if (!cd && curr_class)
+ cd = getClass(className);
+ if (!cd && !curr_class.isEmpty())
{
QCString cls = curr_class;
QCString suffix = "::";
@@ -1409,10 +1411,10 @@ static void startFontClass(yyscan_t yyscanner,const char *s)
yyextra->currentFontClass=s;
}
-static void writeFont(yyscan_t yyscanner,const char *s,const char* text)
+static void writeFont(yyscan_t yyscanner,const char *s,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (s==0 || text==0) return;
+ if (s==0 || text.isEmpty()) return;
//printf("writeFont(yyscanner,%d,\"%s\")\n",yyextra->yyLineNr,text);
yyextra->code->startFontClass(s);
yyextra->code->codify(text);
@@ -1429,16 +1431,16 @@ static void appStringLower(QCString& qcs,const char* text)
}
/* writes and links a port map statement */
-static void codifyMapLines(yyscan_t yyscanner,const char *text)
+static void codifyMapLines(yyscan_t yyscanner,const QCString &text)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- if (text==0) return;
+ if (text.isEmpty()) return;
QCString temp;
//bool dot=false;
int wordCounter=0;
QCString ctemp;
- //printf("codifyMapLines(%d,\"%s\")\n",yyextra->yyLineNr,text);
- const char *p=text; //,*sp=p;
+ //printf("codifyMapLines(%d,\"%s\")\n",yyextra->yyLineNr,qPrint(text));
+ const char *p=text.data();
char c;
bool done=false;
while (!done)
@@ -1477,7 +1479,7 @@ static void codifyMapLines(yyscan_t yyscanner,const char *text)
}
}
ctemp.fill(c,1);
- codifyLines(yyscanner,ctemp.data());
+ codifyLines(yyscanner,ctemp);
ctemp.resize(0);
temp.resize(0);
}//while
@@ -1495,13 +1497,13 @@ static void writeFuncProto(yyscan_t yyscanner)
if (name.isEmpty())
{
- codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data());
+ codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
return;
}
StringVector qlist=split(yyextra->funcProto.str(),name.str());
- QCString temp=qlist[0];
- codifyLines(yyscanner,temp.data(),yyextra->currClass.data());
- yyextra->funcProto.stripPrefix(temp.data());
+ QCString temp(qlist[0]);
+ codifyLines(yyscanner,temp,yyextra->currClass);
+ yyextra->funcProto.stripPrefix(temp);
temp.resize(0);
temp=yyextra->currClass;
if (yyextra->isPackageBody)
@@ -1513,12 +1515,12 @@ static void writeFuncProto(yyscan_t yyscanner)
if (mdef)
{
generateFuncLink(yyscanner,*yyextra->code,mdef);
- yyextra->funcProto.stripPrefix(name.data());
- codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data());
+ yyextra->funcProto.stripPrefix(name);
+ codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
}
else
{
- codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data());
+ codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
}
}// writeFuncProto
@@ -1527,7 +1529,7 @@ static void writeFuncProto(yyscan_t yyscanner)
static void writeProcessProto(yyscan_t yyscanner)
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
- codifyLines(yyscanner,yyextra->funcProto.data(),yyextra->currClass.data());
+ codifyLines(yyscanner,yyextra->funcProto,yyextra->currClass);
yyextra->vhdlKeyDict.clear();
}// writeProcessProto
@@ -1539,7 +1541,7 @@ static bool writeColoredWord(yyscan_t yyscanner,QCString& word )
const char *ss=VhdlDocGen::findKeyWord(qcs);
if (ss)
{
- writeFont(yyscanner,ss,word.data());
+ writeFont(yyscanner,ss,word);
return true;
}
return false;
@@ -1573,11 +1575,11 @@ void VHDLCodeParser::resetCodeParserState()
}
void VHDLCodeParser::parseCode(CodeOutputInterface &od,
- const char *className,
+ const QCString &className,
const QCString &s,
SrcLangExt,
bool exBlock,
- const char *exName,
+ const QCString &exName,
FileDef *fd,
int startLine,
int endLine,
@@ -1591,7 +1593,7 @@ void VHDLCodeParser::parseCode(CodeOutputInterface &od,
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd);
if (s.isEmpty()) return;
- printlex(yy_flex_debug, true, __FILE__, fd ? fd->fileName().data(): NULL);
+ printlex(yy_flex_debug, true, __FILE__, fd ? qPrint(fd->fileName()): NULL);
if (memberDef)
{
const ClassDef *dd=memberDef->getClassDef();
@@ -1599,7 +1601,7 @@ void VHDLCodeParser::parseCode(CodeOutputInterface &od,
}
resetCodeParserState();
yyextra->code = &od;
- yyextra->inputString = s;
+ yyextra->inputString = s.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = false;
@@ -1664,7 +1666,7 @@ void VHDLCodeParser::parseCode(CodeOutputInterface &od,
// write the tooltips
TooltipManager::instance().writeTooltips(od);
- printlex(yy_flex_debug, false, __FILE__, fd ? fd->fileName().data(): NULL);
+ printlex(yy_flex_debug, false, __FILE__, fd ? qPrint(fd->fileName()): NULL);
}
#if USE_STATE2STRING
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 78fef92..f0763db 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -65,7 +65,7 @@
//#define DEBUGFLOW
#define theTranslator_vhdlType theTranslator->trVhdlType
-static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCString & fileName,QCString & brief);
+static void initUCF(Entry* root,const QCString &type,QCString &qcs,int line,const QCString & fileName,QCString & brief);
static void writeUCFLink(const MemberDef* mdef,OutputList &ol);
static void addInstance(ClassDefMutable* entity, ClassDefMutable* arch, ClassDefMutable *inst,
const std::shared_ptr<Entry> &cur);
@@ -96,11 +96,11 @@ void VhdlDocGen::setFlowMember( const MemberDef* mem)
//--------------------------------------------------------------------------------------------------
-static void codify(TextStream &t,const char *str)
+static void codify(TextStream &t,const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -135,7 +135,7 @@ static void writeLink(const MemberDef* mdef,OutputList &ol)
static void startFonts(const QCString& q, const char *keyword,OutputList& ol)
{
ol.startFontClass(keyword);
- ol.docify(q.data());
+ ol.docify(q);
ol.endFontClass();
}
@@ -191,7 +191,7 @@ void VhdlDocGen::writeOverview()
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Warning: Cannot open file %s for writing\n",fileName.data());
+ err("Warning: Cannot open file %s for writing\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -225,8 +225,8 @@ void VhdlDocGen::writeOverview()
dotn+=cd->name();
QCString csc=bClass->name()+":";
csc+=bClass->name();
- // fprintf(stderr,"\n <%s| %s>",dotn.data(),csc.data());
- writeVhdlDotLink(t,dotn,csc,0);
+ // fprintf(stderr,"\n <%s| %s>",qPrint(dotn),qPrint(csc));
+ writeVhdlDotLink(t,dotn,csc,QCString());
}
}// for
@@ -342,7 +342,7 @@ static void writeColumn(TextStream &t,const MemberDef *md,bool start)
t<<" TOOLTIP=\"";
if (!toolTip.isEmpty())
{
- codify(t,toolTip.data());
+ codify(t,toolTip);
}
else
{
@@ -350,7 +350,7 @@ static void writeColumn(TextStream &t,const MemberDef *md,bool start)
if (!largs.isEmpty())
{
largs=substitute(largs,"%"," ");
- codify(t,largs.data());
+ codify(t,largs);
}
}
t << "\" ";
@@ -579,9 +579,9 @@ const char* VhdlDocGen::findKeyWord(const QCString& kw)
return 0;
}
-ClassDef *VhdlDocGen::getClass(const char *name)
+ClassDef *VhdlDocGen::getClass(const QCString &name)
{
- if (name==0 || name[0]=='\0') return 0;
+ if (name.isEmpty()) return 0;
return Doxygen::classLinkedMap->find(QCString(name).stripWhiteSpace());
}
@@ -600,7 +600,7 @@ const MemberDef* VhdlDocGen::findMember(const QCString& className, const QCStrin
const MemberDef *mdef=0;
cd=getClass(className);
- //printf("VhdlDocGen::findMember(%s,%s)=%p\n",className.data(),memName.data(),cd);
+ //printf("VhdlDocGen::findMember(%s,%s)=%p\n",qPrint(className),qPrint(memName),cd);
if (cd==0) return 0;
mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType_variableMembers);
@@ -697,7 +697,7 @@ const MemberDef* VhdlDocGen::findMember(const QCString& className, const QCStrin
const MemberDef* VhdlDocGen::findMemberDef(ClassDef* cd,const QCString& key,MemberListType type)
{
QCString keyType=cd->symbolName()+"@"+key;
- //printf("\n %s | %s | %s",cd->symbolName().data(),key.data(,),keyType.data());
+ //printf("\n %s | %s | %s",qPrint(cd->symbolName()),key.data(,),qPrint(keyType));
auto it = g_varMap.find(keyType.str());
if (it!=g_varMap.end())
@@ -715,7 +715,7 @@ const MemberDef* VhdlDocGen::findMemberDef(ClassDef* cd,const QCString& key,Memb
return 0;
}
//int l=ml->count();
- // fprintf(stderr,"\n loading entity %s %s: %d",cd->symbolName().data(),keyType.data(),l);
+ // fprintf(stderr,"\n loading entity %s %s: %d",qPrint(cd->symbolName()),qPrint(keyType),l);
for (const auto &md : *ml)
{
@@ -768,7 +768,7 @@ void VhdlDocGen::findAllPackages( ClassDef *cdef)
const MemberDef* VhdlDocGen::findFunction(const QCString& funcname, const QCString& package)
{
- ClassDef *cdef=getClass(package.data());
+ ClassDef *cdef=getClass(package);
if (cdef==0) return 0;
MemberList *mem=cdef->getMemberList(MemberListType_pubMethods);
@@ -851,12 +851,12 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol)
if (ii==VhdlDocGen::PACKAGE_BODY)
{
nn.stripPrefix("_");
- cd=getClass(nn.data());
+ cd=getClass(nn);
}
else if (ii==VhdlDocGen::PACKAGE)
{
nn.prepend("_");
- cd=getClass(nn.data());
+ cd=getClass(nn);
}
else if (ii==VhdlDocGen::ARCHITECTURE)
{
@@ -864,7 +864,7 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol)
if (qlist.size()>1)
{
nn=qlist[1];
- cd=VhdlDocGen::getClass(nn.data());
+ cd=VhdlDocGen::getClass(nn);
}
}
@@ -877,8 +877,8 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol)
StringVector qlist=split(s.str(),"-");
if (qlist.size()>2)
{
- QCString s1=qlist[0];
- QCString s2=qlist[1];
+ QCString s1(qlist[0]);
+ QCString s2(qlist[1]);
s1.stripPrefix("_");
if (ql.size()==1) s1.resize(0);
ClassDef *cc = getClass(s);
@@ -928,7 +928,7 @@ const ClassDef* VhdlDocGen::findArchitecture(const ClassDef *cd)
StringVector ql=split(jj.str(),":");
if (ql.size()>1)
{
- if (ql[0]==nn)
+ if (QCString(ql[0])==nn)
{
return citer.get();
}
@@ -944,16 +944,16 @@ void VhdlDocGen::writeVhdlLink(const ClassDef* ccd ,OutputList& ol,QCString& typ
{
if (ccd==0) return;
ol.startBold();
- ol.docify(type.data());
+ ol.docify(type);
ol.endBold();
nn.stripPrefix("_");
- ol.writeObjectLink(ccd->getReference(),ccd->getOutputFileBase(),0,nn.data());
+ ol.writeObjectLink(ccd->getReference(),ccd->getOutputFileBase(),QCString(),nn);
if (!behav.isEmpty())
{
behav.prepend(" ");
ol.startBold();
- ol.docify(behav.data());
+ ol.docify(behav);
ol.endBold();
}
@@ -986,7 +986,7 @@ void VhdlDocGen::prepareComment(QCString& qcs)
* @param ret Stores the return type
* @param doc ???
*/
-void VhdlDocGen::parseFuncProto(const char* text,QCString& name,QCString& ret,bool doc)
+void VhdlDocGen::parseFuncProto(const QCString &text,QCString& name,QCString& ret,bool doc)
{
int index,end;
QCString s1(text);
@@ -1017,7 +1017,7 @@ void VhdlDocGen::parseFuncProto(const char* text,QCString& name,QCString& ret,bo
int s=s1.find(' ');
if (s==-1) s=s1.find('\t');
if (i==-1 || i<s)
- s1=VhdlDocGen::getIndexWord(s1.data(),1);
+ s1=VhdlDocGen::getIndexWord(s1,1);
else // s<i, s=start of name, i=end of name
s1=s1.mid(s,(i-s));
@@ -1036,14 +1036,14 @@ void VhdlDocGen::parseFuncProto(const char* text,QCString& name,QCString& ret,bo
* returns the n'th word of a string
*/
-QCString VhdlDocGen::getIndexWord(const char* c,int index)
+QCString VhdlDocGen::getIndexWord(const QCString &c,int index)
{
static const reg::Ex reg(R"([\s|])");
- auto ql=split(c,reg);
+ auto ql=split(c.str(),reg);
if ((size_t)index < ql.size())
{
- return ql[index];
+ return QCString(ql[index]);
}
return "";
@@ -1256,7 +1256,7 @@ void VhdlDocGen::formatString(const QCString &s, OutputList& ol,const MemberDef*
index=temp.length();
}// for
temp=temp.stripWhiteSpace();
- // printf("\n [%s]",qcs.data());
+ // printf("\n [%s]",qPrint(qcs));
VhdlDocGen::writeFormatString(temp,ol,mdef);
}
@@ -1368,7 +1368,7 @@ void VhdlDocGen::writeFunctionProto(OutputList& ol,const ArgumentList &al,const
else
startFonts(w,"vhdlchar",ol);
- if (arg.attrib)
+ if (!arg.attrib.isEmpty())
startFonts(arg.attrib,"vhdlchar",ol);
sem=TRUE;
@@ -1380,8 +1380,8 @@ void VhdlDocGen::writeFunctionProto(OutputList& ol,const ArgumentList &al,const
}
ol.startBold();
ol.docify(" )");
- const char *exp=mdef->excpString();
- if (exp)
+ QCString exp=mdef->excpString();
+ if (!exp.isEmpty())
{
ol.insertMemberAlign();
ol.startBold();
@@ -1537,57 +1537,57 @@ QCString VhdlDocGen::convertArgumentListToString(const ArgumentList &al,bool fun
void VhdlDocGen::writeVhdlDeclarations(const MemberList* ml,
OutputList& ol,const GroupDef* gd,const ClassDef* cd,const FileDef *fd,const NamespaceDef* nd)
{
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::LIBRARY,FALSE),0,FALSE,VhdlDocGen::LIBRARY);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::USE,FALSE),0,FALSE,VhdlDocGen::USE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::FUNCTION,FALSE),0,FALSE,VhdlDocGen::FUNCTION);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::COMPONENT,FALSE),0,FALSE,VhdlDocGen::COMPONENT);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONSTANT,FALSE),0,FALSE,VhdlDocGen::CONSTANT);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::TYPE,FALSE),0,FALSE,VhdlDocGen::TYPE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SUBTYPE,FALSE),0,FALSE,VhdlDocGen::SUBTYPE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GENERIC,FALSE),0,FALSE,VhdlDocGen::GENERIC);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PORT,FALSE),0,FALSE,VhdlDocGen::PORT);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PROCESS,FALSE),0,FALSE,VhdlDocGen::PROCESS);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SIGNAL,FALSE),0,FALSE,VhdlDocGen::SIGNAL);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ATTRIBUTE,FALSE),0,FALSE,VhdlDocGen::ATTRIBUTE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PROCEDURE,FALSE),0,FALSE,VhdlDocGen::PROCEDURE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::RECORD,FALSE),0,FALSE,VhdlDocGen::RECORD);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::UNITS,FALSE),0,FALSE,VhdlDocGen::UNITS);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SHAREDVARIABLE,FALSE),0,FALSE,VhdlDocGen::SHAREDVARIABLE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::VFILE,FALSE),0,FALSE,VhdlDocGen::VFILE);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GROUP,FALSE),0,FALSE,VhdlDocGen::GROUP);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::INSTANTIATION,FALSE),0,FALSE,VhdlDocGen::INSTANTIATION);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ALIAS,FALSE),0,FALSE,VhdlDocGen::ALIAS);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::MISCELLANEOUS,TRUE),0,FALSE,VhdlDocGen::MISCELLANEOUS);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::LIBRARY,FALSE),QCString(),FALSE,VhdlDocGen::LIBRARY);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::USE,FALSE),QCString(),FALSE,VhdlDocGen::USE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::FUNCTION,FALSE),QCString(),FALSE,VhdlDocGen::FUNCTION);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::COMPONENT,FALSE),QCString(),FALSE,VhdlDocGen::COMPONENT);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONSTANT,FALSE),QCString(),FALSE,VhdlDocGen::CONSTANT);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::TYPE,FALSE),QCString(),FALSE,VhdlDocGen::TYPE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SUBTYPE,FALSE),QCString(),FALSE,VhdlDocGen::SUBTYPE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GENERIC,FALSE),QCString(),FALSE,VhdlDocGen::GENERIC);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PORT,FALSE),QCString(),FALSE,VhdlDocGen::PORT);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PROCESS,FALSE),QCString(),FALSE,VhdlDocGen::PROCESS);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SIGNAL,FALSE),QCString(),FALSE,VhdlDocGen::SIGNAL);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ATTRIBUTE,FALSE),QCString(),FALSE,VhdlDocGen::ATTRIBUTE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::PROCEDURE,FALSE),QCString(),FALSE,VhdlDocGen::PROCEDURE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::RECORD,FALSE),QCString(),FALSE,VhdlDocGen::RECORD);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::UNITS,FALSE),QCString(),FALSE,VhdlDocGen::UNITS);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::SHAREDVARIABLE,FALSE),QCString(),FALSE,VhdlDocGen::SHAREDVARIABLE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::VFILE,FALSE),QCString(),FALSE,VhdlDocGen::VFILE);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::GROUP,FALSE),QCString(),FALSE,VhdlDocGen::GROUP);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::INSTANTIATION,FALSE),QCString(),FALSE,VhdlDocGen::INSTANTIATION);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::ALIAS,FALSE),QCString(),FALSE,VhdlDocGen::ALIAS);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::MISCELLANEOUS,TRUE),QCString(),FALSE,VhdlDocGen::MISCELLANEOUS);
// configurations must be added to global file definitions.
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONFIG,FALSE),0,FALSE,VhdlDocGen::CONFIG);
- VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::UCF_CONST,FALSE),0,FALSE,VhdlDocGen::UCF_CONST);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::CONFIG,FALSE),QCString(),FALSE,VhdlDocGen::CONFIG);
+ VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,theTranslator_vhdlType(VhdlDocGen::UCF_CONST,FALSE),QCString(),FALSE,VhdlDocGen::UCF_CONST);
}
void VhdlDocGen::correctMemberProperties(MemberDefMutable *md)
{
- if (qstrcmp(md->argsString(),"package")==0)
+ if (md->argsString()=="package")
{
md->setMemberSpecifiers(VhdlDocGen::INSTANTIATION);
}
- else if (qstrcmp(md->argsString(),"configuration")==0)
+ else if (md->argsString()=="configuration")
{
md->setMemberSpecifiers(VhdlDocGen::CONFIG);
}
- else if (qstrcmp(md->typeString(),"library")==0)
+ else if (md->typeString()=="library")
{
md->setMemberSpecifiers(VhdlDocGen::LIBRARY);
}
- else if (qstrcmp(md->typeString(),"use")==0)
+ else if (md->typeString()=="use")
{
md->setMemberSpecifiers(VhdlDocGen::USE);
}
- else if (qstricmp(md->typeString(),"misc")==0)
+ else if (md->typeString().lower()=="misc")
{
md->setMemberSpecifiers(VhdlDocGen::MISCELLANEOUS);
}
- else if (qstricmp(md->typeString(),"ucf_const")==0)
+ else if (md->typeString().lower()=="ucf_const")
{
md->setMemberSpecifiers(VhdlDocGen::UCF_CONST);
}
@@ -1777,7 +1777,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
// start a new member declaration
uint isAnonymous = (bool)(annoClassDef); // || m_impl->annMemb || m_impl->annEnumType;
- ///printf("startMemberItem for %s\n",name().data());
+ ///printf("startMemberItem for %s\n",qPrint(name()));
uint64_t mm=mdef->getMemberSpecifiers();
if (mm==VhdlDocGen::MISCELLANEOUS)
isAnonymous=3;
@@ -1788,7 +1788,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
bool detailsVisible = mdef->isDetailedSectionLinkable();
if (!detailsVisible) // && !m_impl->annMemb)
{
- QCString doxyName=mdef->name().copy();
+ QCString doxyName=mdef->name();
if (!cname.isEmpty()) doxyName.prepend(cname+"::");
QCString doxyArgs=mdef->argsString();
ol.startDoxyAnchor(cfname,cname,mdef->anchor(),doxyName,doxyArgs);
@@ -1847,12 +1847,12 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
ol.docify(" ");
QCString name=theTranslator_vhdlType(VhdlDocGen::PACKAGE,TRUE);
ol.startBold();
- ol.docify(name.data());
+ ol.docify(name);
name.resize(0);
ol.endBold();
name+=" <"+mdef->name()+">";
ol.startEmphasis();
- ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,name.data());
+ ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),QCString(),name);
ol.popGeneratorState();
}
break;
@@ -1915,7 +1915,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
}
largs.prepend("::");
- largs.prepend(mdef->name().data());
+ largs.prepend(mdef->name());
ol.writeObjectLink(mdef->getReference(),
cfname,
mdef->anchor(),
@@ -1942,7 +1942,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
{
nn=mdef->name();
}
- kl=getClass(nn.data());
+ kl=getClass(nn);
if (kl)
{
nn=kl->getOutputFileBase();
@@ -1958,7 +1958,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
{
name+=mdef->name()+"> ";
}
- ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,name.data());
+ ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),QCString(),name);
ol.endEmphasis();
ol.popGeneratorState();
}
@@ -2005,17 +2005,15 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
ol.endDoxyAnchor(cfname,mdef->anchor());
}
- // name().data(),annoClassDef,annEnumType);
- // if(mm!=VhdlDocGen::MISCELLANEOUS)
ol.endMemberItem();
if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */)
{
QCString s=mdef->briefDescription();
- ol.startMemberDescription(mdef->anchor(), NULL, mm == VhdlDocGen::PORT);
+ ol.startMemberDescription(mdef->anchor(), QCString(), mm == VhdlDocGen::PORT);
ol.generateDoc(mdef->briefFile(),mdef->briefLine(),
mdef->getOuterScope()?mdef->getOuterScope():d,
- mdef,s.data(),TRUE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ mdef,s,TRUE,FALSE,
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
if (detailsVisible)
{
ol.pushGeneratorState();
@@ -2028,7 +2026,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDefMutable* mdef,OutputList &o
}
else // local link
{
- ol.startTextLink(0,mdef->anchor());
+ ol.startTextLink(QCString(),mdef->anchor());
}
ol.endTextLink();
//ol.startEmphasis();
@@ -2097,22 +2095,22 @@ static bool membersHaveSpecificType(const MemberList *ml,uint64 type)
void VhdlDocGen::writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const char *title,const char *subtitle,bool /*showEnumValues*/,int type)
+ const QCString &title,const QCString &subtitle,bool /*showEnumValues*/,int type)
{
if (!membersHaveSpecificType(ml,type)) return;
- if (title)
+ if (!title.isEmpty())
{
ol.startMemberHeader(convertToId(title),type == VhdlDocGen::PORT ? 3 : 2);
ol.parseText(title);
ol.endMemberHeader();
ol.docify(" ");
}
- if (subtitle && subtitle[0]!=0)
+ if (!subtitle.isEmpty())
{
ol.startMemberSubtitle();
ol.generateDoc("[generated]",-1,0,0,subtitle,FALSE,FALSE,
- 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberSubtitle();
} //printf("memberGroupList=%p\n",memberGroupList);
@@ -2122,7 +2120,7 @@ void VhdlDocGen::writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
{
if (membersHaveSpecificType(&mg->members(),type))
{
- //printf("mg->header=%s\n",mg->header().data());
+ //printf("mg->header=%s\n",qPrint(mg->header()));
bool hasHeader=mg->header()!="[NOHEADER]";
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
@@ -2135,7 +2133,7 @@ void VhdlDocGen::writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
//printf("Member group has docs!\n");
ol.startMemberGroupDocs();
ol.generateDoc("[generated]",-1,0,0,mg->documentation()+"\n",FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
ol.endMemberGroupDocs();
}
ol.startMemberGroup();
@@ -2154,7 +2152,7 @@ bool VhdlDocGen::writeClassType( const ClassDef * cd,
QCString qcs = theTranslator->trVhdlType(id+2,TRUE);
cname=VhdlDocGen::getClassName(cd);
ol.startBold();
- ol.writeString(qcs.data());
+ ol.writeString(qcs);
ol.writeString(" ");
ol.endBold();
//ol.insertMemberAlign();
@@ -2217,11 +2215,11 @@ void VhdlDocGen::writeSource(const MemberDefMutable *mdef,OutputList& ol,const Q
ol.pushGeneratorState();
ol.startCodeFragment("DoxyCode");
intf->parseCode( ol, // codeOutIntf
- 0, // scope
+ QCString(), // scope
codeFragment, // input
SrcLangExt_VHDL, // lang
FALSE, // isExample
- 0, // exampleName
+ QCString(), // exampleName
const_cast<FileDef*>(mdef->getFileDef()), // fileDef
mdef->getStartBodyLine(), // startLine
mdef->getEndBodyLine(), // endLine
@@ -2263,7 +2261,7 @@ QCString VhdlDocGen::convertFileNameToClassName(QCString name)
return n;
}
-void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,bool altera)
+void VhdlDocGen::parseUCF(const char* input, Entry* entity,const QCString &fileName,bool altera)
{
QCString ucFile(input);
int lineNo=0;
@@ -2298,18 +2296,18 @@ void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,b
temp.stripPrefix("set_location_assignment");
- initUCF(entity,0,temp,lineNo,fileName,brief);
+ initUCF(entity,QCString(),temp,lineNo,fileName,brief);
}
else
{
static const reg::Ex ee(R"([\s=])");
int in=findIndex(temp.str(),ee);
QCString ff=temp.left(in);
- temp.stripPrefix(ff.data());
+ temp.stripPrefix(ff);
ff.append("#");
if (!temp.isEmpty())
{
- initUCF(entity,ff.data(),temp,lineNo,fileName,brief);
+ initUCF(entity,ff,temp,lineNo,fileName,brief);
}
}
}
@@ -2319,11 +2317,11 @@ void VhdlDocGen::parseUCF(const char* input, Entry* entity,QCString fileName,b
}// while
}
-static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCString & fileName,QCString & brief)
+static void initUCF(Entry* root,const QCString &type,QCString &qcs,
+ int line,const QCString &fileName,QCString & brief)
{
if (qcs.isEmpty())return;
QCString n;
- // bool bo=(qstricmp(type,qcs.data())==0);
VhdlDocGen::deleteAllChars(qcs,';');
qcs=qcs.stripWhiteSpace();
@@ -2335,7 +2333,6 @@ static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCStr
{
n=type;
VhdlDocGen::deleteAllChars(n,'#');
- type="";
}
else
{
@@ -2363,7 +2360,7 @@ static void initUCF(Entry* root,const char* type,QCString & qcs,int line,QCStr
}
current->name= n+"_";
- current->name.append(VhdlDocGen::getRecordNumber().data());
+ current->name.append(VhdlDocGen::getRecordNumber());
if (!brief.isEmpty())
{
@@ -2387,7 +2384,7 @@ static void writeUCFLink(const MemberDef* mdef,OutputList &ol)
if (!equ)
{
- ol.writeString(n.data());
+ ol.writeString(n);
ol.docify(" ");
ol.insertMemberAlign();
}
@@ -2472,11 +2469,11 @@ QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch)
// find class with upper/lower letters
-ClassDef* VhdlDocGen::findVhdlClass(const char *className )
+ClassDef* VhdlDocGen::findVhdlClass(const QCString &className )
{
for (const auto &cd : *Doxygen::classLinkedMap)
{
- if (qstricmp(className,cd->name().data())==0)
+ if (qstricmp(className.data(),qPrint(cd->name()))==0)
{
return cd.get();
}
@@ -2520,8 +2517,8 @@ void VhdlDocGen::computeVhdlComponentRelations()
entity=cur->type;
}
- ClassDefMutable *classEntity= toClassDefMutable(VhdlDocGen::findVhdlClass(entity.data()));
- inst=VhdlDocGen::getIndexWord(cur->args.data(),0);
+ ClassDefMutable *classEntity= toClassDefMutable(VhdlDocGen::findVhdlClass(entity));
+ inst=VhdlDocGen::getIndexWord(cur->args,0);
ClassDefMutable *cd=toClassDefMutable(Doxygen::classLinkedMap->find(inst));
ClassDefMutable *ar=toClassDefMutable(Doxygen::classLinkedMap->find(cur->args));
@@ -2531,7 +2528,7 @@ void VhdlDocGen::computeVhdlComponentRelations()
}
// if (classEntity==0)
- // err("%s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found");
+ // err("%s:%d:Entity:%s%s",qPrint(cur->fileName),cur->startLine,qPrint(entity)," could not be found");
addInstance(classEntity,ar,cd,cur);
}
@@ -2555,12 +2552,12 @@ static void addInstance(ClassDefMutable* classEntity, ClassDefMutable* ar,
if (classEntity==cd) return;
bName=classEntity->name();
- // fprintf(stderr,"\naddInstance %s to %s %s %s\n", classEntity->name().data(),cd->name().data(),ar->name().data(),cur->name);
- n1=classEntity->name().data();
+ // fprintf(stderr,"\naddInstance %s to %s %s %s\n",qPrint( classEntity->name()),qPrint(cd->name()),qPrint(ar->name()),cur->name);
+ n1=classEntity->name();
if (!cd->isBaseClass(classEntity, true, 0))
{
- cd->insertBaseClass(classEntity,n1,Public,Normal,0);
+ cd->insertBaseClass(classEntity,n1,Public,Normal,QCString());
}
else
{
@@ -2569,7 +2566,7 @@ static void addInstance(ClassDefMutable* classEntity, ClassDefMutable* ar,
if (!VhdlDocGen::isSubClass(classEntity,cd,true,0))
{
- classEntity->insertSubClass(cd,Public,Normal,0);
+ classEntity->insertSubClass(cd,Public,Normal,QCString());
classEntity->setLanguage(SrcLangExt_VHDL);
}
@@ -2577,14 +2574,14 @@ ferr:
QCString uu=cur->name;
std::unique_ptr<MemberDefMutable> md { createMemberDef(
ar->getDefFileName(), cur->startLine,cur->startColumn,
- n1,uu,uu, 0,
+ n1,uu,uu, QCString(),
Public, Normal, cur->stat,Member,
MemberType_Variable,
ArgumentList(),
ArgumentList(),
"") };
- if (ar->getOutputFileBase())
+ if (!ar->getOutputFileBase().isEmpty())
{
TagInfo tg;
tg.anchor = 0;
@@ -2593,13 +2590,13 @@ ferr:
md->setTagInfo(&tg);
}
- //fprintf(stderr,"\n%s%s%s\n",md->name().data(),cur->brief.data(),cur->doc.data());
+ //fprintf(stderr,"\n%s%s%s\n",qPrint(md->name()),qPrint(cur->brief),qPrint(cur->doc));
md->setLanguage(SrcLangExt_VHDL);
md->setMemberSpecifiers(VhdlDocGen::INSTANTIATION);
md->setBriefDescription(cur->brief,cur->briefFile,cur->briefLine);
md->setBodySegment(cur->startLine,cur->startLine,-1) ;
- md->setDocumentation(cur->doc.data(),cur->docFile.data(),cur->docLine);
+ md->setDocumentation(cur->doc,cur->docFile,cur->docLine);
FileDef *fd=ar->getFileDef();
md->setBodyDef(fd);
ar->insertMember(md.get());
@@ -2615,7 +2612,7 @@ void VhdlDocGen::writeRecordUnit(QCString & largs,QCString & ltype,OutputList&
if (i>0)
{
//sets the real record member name
- const_cast<MemberDefMutable*>(mdef)->setName(mdef->name().left(i).data());
+ const_cast<MemberDefMutable*>(mdef)->setName(mdef->name().left(i));
}
writeLink(mdef,ol);
@@ -2641,7 +2638,7 @@ void VhdlDocGen::writeRecUnitDocu(
for(size_t i=0;i<len;i++)
{
- QCString n=ql[i];
+ QCString n=QCString(ql[i]);
ol.startParameterType(first,"");
ol.endParameterType();
ol.startParameterName(TRUE);
@@ -2665,7 +2662,7 @@ void VhdlDocGen::writeRecUnitDocu(
bool VhdlDocGen::isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int level)
{
bool found=FALSE;
- //printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
+ //printf("isBaseClass(cd=%s) looking for %s\n",qPrint(name()),qPrint(bcd->name()));
if (level>255)
{
err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(cd->name()),qPrint(scd->name()));
@@ -2677,7 +2674,7 @@ bool VhdlDocGen::isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int
{
const ClassDef *ccd=bcd.classDef;
if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster();
- //printf("isSubClass() subclass %s\n",ccd->name().data());
+ //printf("isSubClass() subclass %s\n",qPrint(ccd->name()));
if (ccd==scd)
{
found=TRUE;
@@ -2756,12 +2753,12 @@ void VhdlDocGen::createFlowChart(const MemberDef *mdef)
mdList.push_back(mdef);
}
- //fprintf(stderr,"\n create flow mem %s %p\n",mdef->name().data(),mdef);
+ //fprintf(stderr,"\n create flow mem %s %p\n",qPrint(mdef->name()),mdef);
int actualStart= mdef->getStartBodyLine();
int actualEnd=mdef->getEndBodyLine();
const FileDef* fd=mdef->getFileDef();
- bool b=readCodeFragment( fd->absFilePath().data(), actualStart,actualEnd,codeFragment);
+ bool b=readCodeFragment( fd->absFilePath(), actualStart,actualEnd,codeFragment);
if (!b) return;
auto parser { Doxygen::parserManager->getOutlineParser(".vhd") };
@@ -2900,7 +2897,7 @@ void alignText(QCString & q)
q.append(" ...");
- QCString str(q.data());
+ QCString str(q);
QCString temp;
while (str.length()>80)
@@ -2944,7 +2941,7 @@ void FlowChart::printNode(const FlowChart& flo)
q=" ";
}
QCString nn=flo.exp.stripWhiteSpace();
- printf("\nYES: %s%s[%d,%d]",q.data(),nn.data(),flo.stamp,flo.id);
+ printf("\nYES: %s%s[%d,%d]",qPrint(q),qPrint(nn),flo.stamp,flo.id);
}
else
{
@@ -3033,7 +3030,7 @@ void FlowChart::colTextNodes()
const FlowChart &ftemp = flowList[j+1];
if (ftemp.type & EMPTY)
{
- FlowChart fc(TEXT_NO,"empty ",0);
+ FlowChart fc(TEXT_NO,"empty ",QCString());
fc.stamp = flo.stamp;
flowList.insert(flowList.begin()+j+1,fc);
}
@@ -3088,7 +3085,7 @@ void FlowChart::alignCommentNode(TextStream &t,QCString com)
{
s+="\n";
}
- FlowChart::codify(t,s.data());
+ FlowChart::codify(t,s);
}
}
@@ -3178,11 +3175,11 @@ void FlowChart::buildCommentNodes(TextStream & t)
}// for;
}
-void FlowChart::codify(TextStream &t,const char *str)
+void FlowChart::codify(TextStream &t,const QCString &str)
{
- if (str)
+ if (!str.isEmpty())
{
- const char *p=str;
+ const char *p=str.data();
char c;
while (*p)
{
@@ -3205,7 +3202,7 @@ FlowChart::~FlowChart()
{
}
-FlowChart::FlowChart(int typ,const char * t,const char* ex,const char* lab)
+FlowChart::FlowChart(int typ,const QCString &t,const QCString &ex,const QCString &lab)
{
stamp=ifcounter;
@@ -3232,7 +3229,7 @@ FlowChart::FlowChart(int typ,const char * t,const char* ex,const char* lab)
id=nodeCounter++;
}
-void FlowChart::addFlowChart(int type,const char* text,const char* exp, const char *label)
+void FlowChart::addFlowChart(int type,const QCString &text,const QCString &exp, const QCString &label)
{
if (!VhdlDocGen::getFlowMember()) return;
@@ -3240,12 +3237,12 @@ void FlowChart::addFlowChart(int type,const char* text,const char* exp, const ch
QCString expression(exp);
- if (text)
+ if (!text.isEmpty())
{
typeString=substitute(typeString,";","\n");
}
- if (exp)
+ if (!exp.isEmpty())
{
expression=substitute(expression,"\"","\\\"");
}
@@ -3391,7 +3388,7 @@ void FlowChart::createSVG()
//const MemberDef *m=VhdlDocGen::getFlowMember();
//if (m)
- // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",theTranslator->trVhdlType(m->getMemberSpecifiers(),TRUE),m->name().data(),m->getFileDef()->name().data());
+ // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",theTranslator->trVhdlType(m->getMemberSpecifiers(),TRUE),qPrint(m->name()),qPrint(m->getFileDef()->name()));
QCString dir=" -o \""+ov+qcs+"\"";
ov+="/flow_design.dot";
@@ -3426,7 +3423,7 @@ void FlowChart::writeFlowChart()
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing\n",fileName.data());
+ err("Cannot open file %s for writing\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -3503,7 +3500,7 @@ void FlowChart::writeShape(TextStream &t,const FlowChart &fl)
QCString kl;
if (exit) kl=fl.text+" ";
- if (fl.label)
+ if (!fl.label.isEmpty())
{
kl+=fl.label+":"+exp+var;
}
@@ -3570,8 +3567,8 @@ void FlowChart::writeEdge(TextStream &t,const FlowChart &fl_from,const FlowChart
bool c=fl_to.type & STARTL;
#ifdef DEBUGFLOW
- QCString s1(getNodeName(fl_from.id).data());
- QCString s2(getNodeName(fl_to.id).data());
+ QCString s1(getNodeName(fl_from.id));
+ QCString s2(getNodeName(fl_to.id));
auto it = g_keyMap.find(s1.str());
auto it1 = g_keyMap.find(s2.str());
// checks if the link is connected to a valid node
@@ -3603,10 +3600,10 @@ void FlowChart::writeEdge(TextStream &t,int fl_from,int fl_to,int i,bool bFrom,b
}
t << "edge [color=\""+col+"\",label=\""+label+"\"]\n";
- t << getNodeName(fl_from).data();
+ t << getNodeName(fl_from);
if (bFrom) t << ":s";
t << "->";
- t << getNodeName(fl_to).data();
+ t << getNodeName(fl_to);
if (bTo) t << ":n";
t << "\n";
}
@@ -3637,7 +3634,7 @@ void FlowChart::alignFuncProc( QCString & q,const ArgumentList &al,bool isFunc)
attl+=arg.type;
if (--index) attl+=",\n"; else attl+="\n";
- attl.prepend(prev.data());
+ attl.prepend(prev);
temp+=attl;
}
@@ -3694,7 +3691,7 @@ size_t FlowChart::findLabel(size_t index,const QCString &label)
return j;
}
}
- err("could not find label: %s",label.data());
+ err("could not find label: %s",qPrint(label));
return 0;
}
@@ -3870,7 +3867,7 @@ void FlowChart::writeFlowLinks(TextStream &t)
{
size_t z;
bool b = kind==NEXT_NO;
- if (fll.exp)
+ if (!fll.exp.isEmpty())
{
writeEdge(t,fll,flowList[j+1],1);
}
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index 0fe6b96..207e449 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -41,7 +41,7 @@ struct Argument;
struct VhdlConfNode
{
- VhdlConfNode(const char* a,const char* b,const char* config,const char* cs,bool leaf)
+ VhdlConfNode(const QCString &a,const QCString &b,const QCString &config,const QCString &cs,bool leaf)
{
arch=a; // architecture e.g. for iobuffer
arch=arch.lower();
@@ -116,10 +116,10 @@ class VhdlDocGen
static bool isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int level);
- static QCString getIndexWord(const char* ,int index);
+ static QCString getIndexWord(const QCString &,int index);
static bool deleteCharRev(QCString &s,char c);
static void deleteAllChars(QCString &s,char c);
- static void parseFuncProto(const char* text,
+ static void parseFuncProto(const QCString &text,
QCString& name,
QCString& ret,
bool doc=false);
@@ -136,7 +136,7 @@ class VhdlDocGen
static const MemberDef* findMemberDef(ClassDef* cd,
const QCString& key,
MemberListType type);
- static ClassDef *getClass(const char *name);
+ static ClassDef *getClass(const QCString &name);
static const MemberDef* findFunction(const QCString& name,
const QCString& package);
static QCString getClassTitle(const ClassDef*);
@@ -198,7 +198,7 @@ class VhdlDocGen
static void writeVHDLDeclarations(const MemberList* ml,OutputList &ol,
const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,
- const char *title,const char *subtitle,bool showEnumValues,int type);
+ const QCString &title,const QCString &subtitle,bool showEnumValues,int type);
static bool writeClassType(const ClassDef *,OutputList &ol ,QCString & cname);
@@ -210,10 +210,9 @@ class VhdlDocGen
static bool isNumber(const std::string& s);
static QCString getProtectionName(int prot);
- static void parseUCF(const char* input,Entry* entity,QCString f,bool vendor);
+ static void parseUCF(const char* input,Entry* entity,const QCString &f,bool vendor);
static const ClassDef* findArchitecture(const ClassDef *cd);
- //static const ClassDef* findArchitecture(QCString identifier, QCString entity_name);
static void correctMemberProperties(MemberDefMutable *md);
@@ -222,7 +221,7 @@ class VhdlDocGen
static QCString parseForConfig(QCString & entity,QCString & arch);
static QCString parseForBinding(QCString & entity,QCString & arch);
static void addBaseClass(ClassDef* cd,ClassDef *ent);
- static ClassDef* findVhdlClass(const char *className );
+ static ClassDef* findVhdlClass(const QCString &className );
static void writeOverview(OutputList &ol);
static void writeOverview();
@@ -291,7 +290,7 @@ class FlowChart
static void createSVG();
static void startDot(TextStream &t);
static void endDot(TextStream &t);
- static void codify(TextStream &t,const char *str);
+ static void codify(TextStream &t,const QCString &str);
static void writeShape(TextStream &t,const FlowChart &fl);
static void writeEdge(TextStream &t,int fl_from,int fl_to,int i,bool bFrom=FALSE,bool bTo=FALSE);
static void writeEdge(TextStream &t,const FlowChart &fl_from,const FlowChart &fl_to,int i);
@@ -310,7 +309,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=0);
+ static void addFlowChart(int type,const QCString &text,const QCString &exp,const QCString &label=QCString());
static void moveToPrevLevel();
static int getTimeStamp();
static void writeFlowChart();
@@ -324,7 +323,7 @@ class FlowChart
static void printUmlTree();
static QCString printPlantUmlNode(const FlowChart &flo,bool,bool);
- FlowChart(int typ,const char* t,const char* ex,const char* label=0);
+ FlowChart(int typ,const QCString &t,const QCString &ex,const QCString &label=QCString());
~FlowChart();
private:
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index f060c30..963f3ec 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -57,7 +57,7 @@ static EntryList g_instFiles;
struct VHDLOutlineParser::Private
{
- void parseVhdlfile(const char *fileName,const char* inputBuffer,bool inLine);
+ void parseVhdlfile(const QCString &fileName,const char* inputBuffer,bool inLine);
VHDLOutlineParser *thisParser = 0;
VhdlParser *vhdlParser = 0;
@@ -86,20 +86,20 @@ struct VHDLOutlineParser::Private
};
-void VHDLOutlineParser::Private::parseVhdlfile(const char *fileName,
+void VHDLOutlineParser::Private::parseVhdlfile(const QCString &fileName,
const char* inputBuffer,bool inLine)
{
JAVACC_STRING_TYPE s =inputBuffer;
CharStream *stream = new CharStream(s.c_str(), (int)s.size(), 1, 1);
VhdlParserTokenManager *tokenManager = new VhdlParserTokenManager(stream);
- VhdlTokenManagerErrorHandler *tokErrHandler=new VhdlTokenManagerErrorHandler(fileName);
+ VhdlTokenManagerErrorHandler *tokErrHandler=new VhdlTokenManagerErrorHandler(fileName.data());
vhdlParser=new VhdlParser(tokenManager);
vhdlParser->setOutlineParser(thisParser);
vhdlParser->setSharedState(&shared);
tokenManager->setLexParser(vhdlParser);
tokenManager->ReInit(stream,0);
tokenManager->setErrorHandler(tokErrHandler);
- VhdlErrorHandler *parserErrHandler=new VhdlErrorHandler(fileName);
+ VhdlErrorHandler *parserErrHandler=new VhdlErrorHandler(fileName.data());
vhdlParser->setErrorHandler(parserErrHandler);
try
{
@@ -129,7 +129,7 @@ VHDLOutlineParser::~VHDLOutlineParser()
{
}
-void VHDLOutlineParser::parseInput(const char *fileName,const char *fileBuf,
+void VHDLOutlineParser::parseInput(const QCString &fileName,const char *fileBuf,
const std::shared_ptr<Entry> &root, ClangTUParser *)
{
VhdlParser::SharedState *s = &p->shared;
@@ -138,7 +138,7 @@ void VHDLOutlineParser::parseInput(const char *fileName,const char *fileBuf,
// fprintf(stderr,"\n ============= %s\n ==========\n",fileBuf);
- bool inLine = (fileName==0 || strlen(fileName)==0);
+ bool inLine = fileName.isEmpty();
p->yyFileName=fileName;
@@ -266,7 +266,7 @@ void VHDLOutlineParser::handleFlowComment(const char* doc)
QCString qcs(doc);
qcs=qcs.stripWhiteSpace();
qcs.stripPrefix("--#");
- FlowChart::addFlowChart(FlowChart::COMMENT_NO,0,0,qcs.data());
+ FlowChart::addFlowChart(FlowChart::COMMENT_NO,QCString(),QCString(),qcs);
}
}
@@ -324,7 +324,7 @@ int VHDLOutlineParser::checkInlineCode(QCString &doc)
QCString na;
for (const auto &qcs_ : ql)
{
- QCString qcs = qcs_;
+ QCString qcs(qcs_);
qcs = qcs.simplifyWhiteSpace();
if (findRe(qcs,csRe)!=-1)
{
@@ -380,7 +380,7 @@ int VHDLOutlineParser::checkInlineCode(QCString &doc)
return 1;
}
-void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief)
+void VHDLOutlineParser::handleCommentBlock(const QCString &doc1, bool brief)
{
int position = 0;
bool needsEntry = FALSE;
@@ -462,7 +462,7 @@ void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief)
p->strComment.resize(0);
}
-void VHDLOutlineParser::parsePrototype(const char *text)
+void VHDLOutlineParser::parsePrototype(const QCString &text)
{
p->varName=text;
p->varr=TRUE;
@@ -618,7 +618,7 @@ void VHDLOutlineParser::pushLabel( QCString &label,QCString & val)
QCString VHDLOutlineParser::popLabel(QCString & q)
{
int i=q.findRev("|");
- if (i<0) return "";
+ if (i<0) return QCString();
q = q.left(i);
return q;
}
@@ -764,9 +764,9 @@ void VHDLOutlineParser::createFlow()
q+=")";
}
- q.prepend(VhdlDocGen::getFlowMember()->name().data());
+ q.prepend(VhdlDocGen::getFlowMember()->name());
- FlowChart::addFlowChart(FlowChart::START_NO,q,0);
+ FlowChart::addFlowChart(FlowChart::START_NO,q,QCString());
if (s->currP==VhdlDocGen::FUNCTION)
{
@@ -781,7 +781,7 @@ void VHDLOutlineParser::createFlow()
ret="end process ";
}
- FlowChart::addFlowChart(FlowChart::END_NO,ret,0);
+ FlowChart::addFlowChart(FlowChart::END_NO,ret,QCString());
// FlowChart::printFlowList();
FlowChart::writeFlowChart();
s->currP=0;
@@ -849,7 +849,7 @@ void VHDLOutlineParser::error_skipto(int kind)
p->vhdlParser->getNextToken(); // step to next token
op=p->vhdlParser->getToken(1); // get first token
if (op==0) break;
- //fprintf(stderr,"\n %s",t->image.data());
+ //fprintf(stderr,"\n %s",qPrint(t->image));
} while (op->kind != kind);
p->vhdlParser->clearError();
// The above loop consumes tokens all the way up to a token of
diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h
index 01316a7..542f48d 100755
--- a/src/vhdljjparser.h
+++ b/src/vhdljjparser.h
@@ -29,13 +29,13 @@ class VHDLOutlineParser : public OutlineParserInterface
public:
VHDLOutlineParser();
virtual ~VHDLOutlineParser();
- void parseInput(const char * fileName,
+ void parseInput(const QCString &fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
ClangTUParser *clangParser);
bool needsPreprocessing(const QCString &) const { return TRUE; }
- void parsePrototype(const char *text);
+ void parsePrototype(const QCString &text);
// interface for generated parser code
@@ -50,7 +50,7 @@ class VHDLOutlineParser : public OutlineParserInterface
void createFunction(const char *impure,uint64 spec,const char *fname);
void addVhdlType(const char *n,int startLine,int section, uint64 spec,const char* args,const char* type,Protection prot);
void addCompInst(const char *n, const char* instName, const char* comp,int iLine);
- void handleCommentBlock(const char* doc,bool brief);
+ void handleCommentBlock(const QCString &doc,bool brief);
void handleFlowComment(const char*);
void initEntry(Entry *e);
void newEntry();
diff --git a/src/xmlcode.h b/src/xmlcode.h
index 5a35506..93b05b7 100644
--- a/src/xmlcode.h
+++ b/src/xmlcode.h
@@ -33,11 +33,11 @@ class XMLCodeParser : public CodeParserInterface
XMLCodeParser();
virtual ~XMLCodeParser();
void parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName=0,
+ const QCString &exampleName=QCString(),
FileDef *fileDef=0,
int startLine=-1,
int endLine=-1,
diff --git a/src/xmlcode.l b/src/xmlcode.l
index 65406d4..ff3d247 100644
--- a/src/xmlcode.l
+++ b/src/xmlcode.l
@@ -246,7 +246,7 @@ static void startCodeLine(yyscan_t yyscanner)
yyextra->currentDefinition = d;
yyextra->currentMemberDef = yyextra->sourceFileDef->getSourceMember(yyextra->yyLineNr);
//yyextra->insideBody = false;
- yyextra->classScope = d->name().copy();
+ yyextra->classScope = d->name();
QCString lineAnchor;
lineAnchor.sprintf("l%05d",yyextra->yyLineNr);
if (yyextra->currentMemberDef)
@@ -260,13 +260,13 @@ static void startCodeLine(yyscan_t yyscanner)
{
yyextra->code->writeLineNumber(d->getReference(),
d->getOutputFileBase(),
- 0,yyextra->yyLineNr);
+ QCString(),yyextra->yyLineNr);
setCurrentDoc(yyscanner,lineAnchor);
}
}
else
{
- yyextra->code->writeLineNumber(0,0,0,yyextra->yyLineNr);
+ yyextra->code->writeLineNumber(QCString(),QCString(),QCString(),yyextra->yyLineNr);
}
}
@@ -395,11 +395,11 @@ void XMLCodeParser::resetCodeParserState()
}
void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
- const char *scopeName,
+ const QCString &scopeName,
const QCString &input,
SrcLangExt,
bool isExampleBlock,
- const char *exampleName,
+ const QCString &exampleName,
FileDef *fileDef,
int startLine,
int endLine,
@@ -415,10 +415,10 @@ void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (input.isEmpty()) return;
- printlex(yy_flex_debug, true, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, true, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
yyextra->code = &codeOutIntf;
- yyextra->inputString = input;
+ yyextra->inputString = input.data();
yyextra->inputPosition = 0;
yyextra->currentFontClass = 0;
yyextra->needsTermination = false;
@@ -443,7 +443,7 @@ void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
if (isExampleBlock && fileDef==0)
{
// create a dummy filedef for the example
- yyextra->sourceFileDef = createFileDef("",(exampleName?exampleName:"generated"));
+ yyextra->sourceFileDef = createFileDef("",(!exampleName.isEmpty()?exampleName:QCString("generated")));
cleanupSourceDef = true;
}
@@ -471,7 +471,7 @@ void XMLCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
yyextra->sourceFileDef=0;
}
- printlex(yy_flex_debug, false, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
+ printlex(yy_flex_debug, false, __FILE__, fileDef ? qPrint(fileDef->fileName()): NULL);
}
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 9f65feb..eb6269a 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -87,7 +87,7 @@ static void visitPostEnd(TextStream &t, const char *cmd)
t << "</" << cmd << ">\n";
}
-XmlDocVisitor::XmlDocVisitor(TextStream &t,CodeOutputInterface &ci,const char *langExt)
+XmlDocVisitor::XmlDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt)
: DocVisitor(DocVisitor_XML), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE),
m_langExt(langExt)
{
@@ -452,7 +452,7 @@ void XmlDocVisitor::visit(DocInclude *inc)
void XmlDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
- // op->type(),op->isFirst(),op->isLast(),op->text().data());
+ // op->type(),op->isFirst(),op->isLast(),qPrint(op->text()));
if (op->isFirst())
{
if (!m_hide)
@@ -937,7 +937,7 @@ void XmlDocVisitor::visitPre(DocImage *img)
bool ambig;
if (url.isEmpty() && (fd=findFileDef(Doxygen::imageNameLinkedMap,img->name(),ambig)))
{
- copyFile(fd->absFilePath(),Config_getString(XML_OUTPUT)+"/"+baseName.data());
+ copyFile(fd->absFilePath(),Config_getString(XML_OUTPUT)+"/"+baseName);
}
}
@@ -1166,7 +1166,7 @@ void XmlDocVisitor::visitPost(DocXRefItem *x)
void XmlDocVisitor::visitPre(DocInternalRef *ref)
{
if (m_hide) return;
- startLink(0,ref->file(),ref->anchor());
+ startLink(QCString(),ref->file(),ref->anchor());
}
void XmlDocVisitor::visitPost(DocInternalRef *)
@@ -1217,14 +1217,14 @@ void XmlDocVisitor::visitPost(DocParBlock *)
}
-void XmlDocVisitor::filter(const char *str)
+void XmlDocVisitor::filter(const QCString &str)
{
m_t << convertToXML(str);
}
void XmlDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
- //printf("XmlDocVisitor: file=%s anchor=%s\n",file.data(),anchor.data());
+ //printf("XmlDocVisitor: file=%s anchor=%s\n",qPrint(file),qPrint(anchor));
m_t << "<ref refid=\"" << file;
if (!anchor.isEmpty()) m_t << "_1" << anchor;
m_t << "\" kindref=\"";
diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h
index 835819d..f4b2a71 100644
--- a/src/xmldocvisitor.h
+++ b/src/xmldocvisitor.h
@@ -32,7 +32,7 @@ class QCString;
class XmlDocVisitor : public DocVisitor
{
public:
- XmlDocVisitor(TextStream &t,CodeOutputInterface &ci,const char *langExt);
+ XmlDocVisitor(TextStream &t,CodeOutputInterface &ci,const QCString &langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -146,7 +146,7 @@ class XmlDocVisitor : public DocVisitor
// helper functions
//--------------------------------------
- void filter(const char *str);
+ void filter(const QCString &str);
void startLink(const QCString &ref,const QCString &file,
const QCString &anchor);
void endLink();
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 3eca727..4e931cd 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -107,13 +107,15 @@ static const char *xmlSectionMapper(MemberListType ml)
}
-inline void writeXMLString(TextStream &t,const char *s)
+inline void writeXMLString(TextStream &t,const QCString &s)
{
t << convertToXML(s);
}
-inline void writeXMLCodeString(TextStream &t,const char *s, int &col)
+inline void writeXMLCodeString(TextStream &t,const QCString &str, int &col)
{
+ if (str.isEmpty()) return;
+ const char *s = str.data();
char c;
while ((c=*s++))
{
@@ -163,7 +165,7 @@ static void writeCombineScript()
std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!t.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
@@ -186,16 +188,16 @@ static void writeCombineScript()
}
-void writeXMLLink(TextStream &t,const char *extRef,const char *compoundId,
- const char *anchorId,const char *text,const char *tooltip)
+void writeXMLLink(TextStream &t,const QCString &extRef,const QCString &compoundId,
+ const QCString &anchorId,const QCString &text,const QCString &tooltip)
{
t << "<ref refid=\"" << compoundId;
- if (anchorId) t << "_1" << anchorId;
+ if (!anchorId.isEmpty()) t << "_1" << anchorId;
t << "\" kindref=\"";
- if (anchorId) t << "member"; else t << "compound";
+ if (!anchorId.isEmpty()) t << "member"; else t << "compound";
t << "\"";
- if (extRef) t << " external=\"" << extRef << "\"";
- if (tooltip) t << " tooltip=\"" << convertToXML(tooltip) << "\"";
+ if (!extRef.isEmpty()) t << " external=\"" << extRef << "\"";
+ if (!tooltip.isEmpty()) t << " tooltip=\"" << convertToXML(tooltip) << "\"";
t << ">";
writeXMLString(t,text);
t << "</ref>";
@@ -206,16 +208,16 @@ class TextGeneratorXMLImpl : public TextGeneratorIntf
{
public:
TextGeneratorXMLImpl(TextStream &t): m_t(t) {}
- void writeString(const char *s,bool /*keepSpaces*/) const
+ void writeString(const QCString &s,bool /*keepSpaces*/) const
{
writeXMLString(m_t,s);
}
void writeBreak(int) const {}
- void writeLink(const char *extRef,const char *file,
- const char *anchor,const char *text
+ void writeLink(const QCString &extRef,const QCString &file,
+ const QCString &anchor,const QCString &text
) const
{
- writeXMLLink(m_t,extRef,file,anchor,text,0);
+ writeXMLLink(m_t,extRef,file,anchor,text,QCString());
}
private:
TextStream &m_t;
@@ -224,7 +226,7 @@ class TextGeneratorXMLImpl : public TextGeneratorIntf
//-------------------------------------------------------------------------------------------
/** Generator for producing XML formatted source code. */
-void XMLCodeGenerator::codify(const char *text)
+void XMLCodeGenerator::codify(const QCString &text)
{
XML_DB(("(codify \"%s\")\n",text));
if (m_insideCodeLine && !m_insideSpecialHL && m_normalHLNeedStartTag)
@@ -234,9 +236,9 @@ void XMLCodeGenerator::codify(const char *text)
}
writeXMLCodeString(m_t,text,m_col);
}
-void XMLCodeGenerator::writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip)
+void XMLCodeGenerator::writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip)
{
XML_DB(("(writeCodeLink)\n"));
if (m_insideCodeLine && !m_insideSpecialHL && m_normalHLNeedStartTag)
@@ -245,10 +247,10 @@ void XMLCodeGenerator::writeCodeLink(const char *ref,const char *file,
m_normalHLNeedStartTag=FALSE;
}
writeXMLLink(m_t,ref,file,anchor,name,tooltip);
- m_col+=qstrlen(name);
+ m_col+=name.length();
}
-void XMLCodeGenerator::writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
+void XMLCodeGenerator::writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
)
{
XML_DB(("(writeToolTip)\n"));
@@ -295,7 +297,7 @@ void XMLCodeGenerator::endCodeLine()
m_external.resize(0);
m_insideCodeLine=FALSE;
}
-void XMLCodeGenerator::startFontClass(const char *colorClass)
+void XMLCodeGenerator::startFontClass(const QCString &colorClass)
{
XML_DB(("(startFontClass)\n"));
if (m_insideCodeLine && !m_insideSpecialHL && !m_normalHLNeedStartTag)
@@ -312,23 +314,23 @@ void XMLCodeGenerator::endFontClass()
m_t << "</highlight>"; // non DocBook
m_insideSpecialHL=FALSE;
}
-void XMLCodeGenerator::writeCodeAnchor(const char *)
+void XMLCodeGenerator::writeCodeAnchor(const QCString &)
{
XML_DB(("(writeCodeAnchor)\n"));
}
-void XMLCodeGenerator::writeLineNumber(const char *extRef,const char *compId,
- const char *anchorId,int l)
+void XMLCodeGenerator::writeLineNumber(const QCString &extRef,const QCString &compId,
+ const QCString &anchorId,int l)
{
XML_DB(("(writeLineNumber)\n"));
// we remember the information provided here to use it
// at the <codeline> start tag.
m_lineNumber = l;
- if (compId)
+ if (!compId.isEmpty())
{
m_refId=compId;
- if (anchorId) m_refId+=(QCString)"_1"+anchorId;
+ if (!anchorId.isEmpty()) m_refId+=(QCString)"_1"+anchorId;
m_isMemberRef = anchorId!=0;
- if (extRef) m_external=extRef;
+ if (!extRef.isEmpty()) m_external=extRef;
}
}
void XMLCodeGenerator::finish()
@@ -336,12 +338,12 @@ void XMLCodeGenerator::finish()
if (m_insideCodeLine) endCodeLine();
}
-void XMLCodeGenerator::startCodeFragment(const char *)
+void XMLCodeGenerator::startCodeFragment(const QCString &)
{
m_t << " <programlisting>\n";
}
-void XMLCodeGenerator::endCodeFragment(const char *)
+void XMLCodeGenerator::endCodeFragment(const QCString &)
{
m_t << " </programlisting>\n";
}
@@ -417,7 +419,7 @@ static void writeXMLDocBlock(TextStream &t,
if (stext.isEmpty()) return;
// convert the documentation string into an abstract syntax tree
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,text,FALSE,FALSE,
- 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
+ QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
// create a code generator
XMLCodeGenerator *xmlCodeGen = new XMLCodeGenerator(t);
// create a parse tree visitor for XML
@@ -439,11 +441,11 @@ void writeXMLCodeBlock(TextStream &t,FileDef *fd)
XMLCodeGenerator *xmlGen = new XMLCodeGenerator(t);
xmlGen->startCodeFragment("DoxyCode");
intf->parseCode(*xmlGen, // codeOutIntf
- 0, // scopeName
+ QCString(), // scopeName
fileToString(fd->absFilePath(),Config_getBool(FILTER_SOURCE_FILES)),
langExt, // lang
FALSE, // isExampleBlock
- 0, // exampleName
+ QCString(), // exampleName
fd, // fileDef
-1, // startLine
-1, // endLine
@@ -456,7 +458,7 @@ void writeXMLCodeBlock(TextStream &t,FileDef *fd)
delete xmlGen;
}
-static void writeMemberReference(TextStream &t,const Definition *def,const MemberDef *rmd,const char *tagName)
+static void writeMemberReference(TextStream &t,const Definition *def,const MemberDef *rmd,const QCString &tagName)
{
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
@@ -824,7 +826,7 @@ static void generateXMLForMember(const MemberDef *md,TextStream &ti,TextStream &
t << " <write>" << convertToXML(md->getWriteAccessor()) << "</write>\n";
}
- if (md->memberType()==MemberType_Variable && md->bitfieldString())
+ if (md->memberType()==MemberType_Variable && !md->bitfieldString().isEmpty())
{
QCString bitfield = md->bitfieldString();
if (bitfield.at(0)==':') bitfield=bitfield.mid(1);
@@ -918,7 +920,7 @@ static void generateXMLForMember(const MemberDef *md,TextStream &ti,TextStream &
}
}
else if (md->memberType()==MemberType_Define &&
- md->argsString()) // define
+ !md->argsString().isEmpty()) // define
{
if (md->argumentList().empty()) // special case for "foo()" to
// distinguish it from "foo".
@@ -947,7 +949,7 @@ static void generateXMLForMember(const MemberDef *md,TextStream &ti,TextStream &
t << "</initializer>\n";
}
- if (md->excpString())
+ if (!md->excpString().isEmpty())
{
t << " <exceptions>";
linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->excpString());
@@ -1049,8 +1051,8 @@ static bool memberVisible(const Definition *d,const MemberDef *md)
}
static void generateXMLSection(const Definition *d,TextStream &ti,TextStream &t,
- const MemberList *ml,const char *kind,const char *header=0,
- const char *documentation=0)
+ const MemberList *ml,const QCString &kind,const QCString &header=QCString(),
+ const QCString &documentation=QCString())
{
if (ml==0) return;
int count=0;
@@ -1065,11 +1067,11 @@ static void generateXMLSection(const Definition *d,TextStream &ti,TextStream &t,
if (count==0) return; // empty list
t << " <sectiondef kind=\"" << kind << "\">\n";
- if (header)
+ if (!header.isEmpty())
{
t << " <header>" << convertToXML(header) << "</header>\n";
}
- if (documentation)
+ if (!documentation.isEmpty())
{
t << " <description>";
writeXMLDocBlock(t,d->docFile(),d->docLine(),d,0,documentation);
@@ -1247,7 +1249,7 @@ static void generateXMLForClass(const ClassDef *cd,TextStream &ti)
if (cd->templateMaster()!=0) return; // skip generated template instances.
if (cd->isArtificial()) return; // skip artificially created classes
- msg("Generating XML output for class %s\n",cd->name().data());
+ msg("Generating XML output for class %s\n",qPrint(cd->name()));
ti << " <compound refid=\"" << classOutputFileBase(cd)
<< "\" kind=\"" << cd->compoundTypeString()
@@ -1258,7 +1260,7 @@ static void generateXMLForClass(const ClassDef *cd,TextStream &ti)
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -1422,7 +1424,7 @@ static void generateXMLForConcept(const ConceptDef *cd,TextStream &ti)
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -1475,7 +1477,7 @@ static void generateXMLForNamespace(const NamespaceDef *nd,TextStream &ti)
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -1550,7 +1552,7 @@ static void generateXMLForFile(FileDef *fd,TextStream &ti)
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -1661,7 +1663,7 @@ static void generateXMLForGroup(const GroupDef *gd,TextStream &ti)
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -1716,7 +1718,7 @@ static void generateXMLForDir(DirDef *dd,TextStream &ti)
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -1769,7 +1771,7 @@ static void generateXMLForPage(PageDef *pd,TextStream &ti,bool isExample)
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
TextStream t(&f);
@@ -1815,7 +1817,7 @@ static void generateXMLForPage(PageDef *pd,TextStream &ti,bool isExample)
{
if (isSection(si->type()))
{
- //printf(" level=%d title=%s\n",level,si->title.data());
+ //printf(" level=%d title=%s\n",level,qPrint(si->title));
int nextLevel = (int)si->type();
if (nextLevel>level)
{
@@ -1901,7 +1903,7 @@ void generateXML()
std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
{
@@ -1939,7 +1941,7 @@ void generateXML()
f.open(fileName.str(),std::ofstream::out | std::ofstream::binary);
if (!f.is_open())
{
- err("Cannot open file %s for writing!\n",fileName.data());
+ err("Cannot open file %s for writing!\n",qPrint(fileName));
return;
}
else
@@ -1960,40 +1962,40 @@ void generateXML()
}
for (const auto &cd : *Doxygen::conceptLinkedMap)
{
- msg("Generating XML output for concept %s\n",cd->name().data());
+ msg("Generating XML output for concept %s\n",qPrint(cd->name()));
generateXMLForConcept(cd.get(),t);
}
for (const auto &nd : *Doxygen::namespaceLinkedMap)
{
- msg("Generating XML output for namespace %s\n",nd->name().data());
+ msg("Generating XML output for namespace %s\n",qPrint(nd->name()));
generateXMLForNamespace(nd.get(),t);
}
for (const auto &fn : *Doxygen::inputNameLinkedMap)
{
for (const auto &fd : *fn)
{
- msg("Generating XML output for file %s\n",fd->name().data());
+ msg("Generating XML output for file %s\n",qPrint(fd->name()));
generateXMLForFile(fd.get(),t);
}
}
for (const auto &gd : *Doxygen::groupLinkedMap)
{
- msg("Generating XML output for group %s\n",gd->name().data());
+ msg("Generating XML output for group %s\n",qPrint(gd->name()));
generateXMLForGroup(gd.get(),t);
}
for (const auto &pd : *Doxygen::pageLinkedMap)
{
- msg("Generating XML output for page %s\n",pd->name().data());
+ msg("Generating XML output for page %s\n",qPrint(pd->name()));
generateXMLForPage(pd.get(),t,FALSE);
}
for (const auto &dd : *Doxygen::dirLinkedMap)
{
- msg("Generate XML output for dir %s\n",dd->name().data());
+ msg("Generate XML output for dir %s\n",qPrint(dd->name()));
generateXMLForDir(dd.get(),t);
}
for (const auto &pd : *Doxygen::exampleLinkedMap)
{
- msg("Generating XML output for example %s\n",pd->name().data());
+ msg("Generating XML output for example %s\n",qPrint(pd->name()));
generateXMLForPage(pd.get(),t,TRUE);
}
if (Doxygen::mainPage)
diff --git a/src/xmlgen.h b/src/xmlgen.h
index 01914a6..ec67906 100644
--- a/src/xmlgen.h
+++ b/src/xmlgen.h
@@ -25,24 +25,24 @@ class XMLCodeGenerator : public CodeOutputInterface
m_insideCodeLine(FALSE), m_normalHLNeedStartTag(TRUE), m_insideSpecialHL(FALSE) {}
virtual ~XMLCodeGenerator() { }
- void codify(const char *text);
- void writeCodeLink(const char *ref,const char *file,
- const char *anchor,const char *name,
- const char *tooltip);
- void writeTooltip(const char *, const DocLinkInfo &, const char *,
- const char *, const SourceLinkInfo &, const SourceLinkInfo &
- );
- void startCodeLine(bool);
- void endCodeLine();
- void startFontClass(const char *colorClass);
- void endFontClass();
- void writeCodeAnchor(const char *);
- void writeLineNumber(const char *extRef,const char *compId,
- const char *anchorId,int l);
- void setCurrentDoc(const Definition *,const char *,bool){}
- void addWord(const char *,bool){}
- void startCodeFragment(const char *);
- void endCodeFragment(const char *);
+ void codify(const QCString &text) override;
+ void writeCodeLink(const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &name,
+ const QCString &tooltip) override;
+ void writeTooltip(const QCString &, const DocLinkInfo &, const QCString &,
+ const QCString &, const SourceLinkInfo &, const SourceLinkInfo &
+ ) override;
+ void startCodeLine(bool) override;
+ void endCodeLine() override;
+ void startFontClass(const QCString &colorClass) override;
+ void endFontClass() override;
+ void writeCodeAnchor(const QCString &) override;
+ void writeLineNumber(const QCString &extRef,const QCString &compId,
+ const QCString &anchorId,int l) override;
+ void setCurrentDoc(const Definition *,const QCString &,bool) override {}
+ void addWord(const QCString &,bool) override {}
+ void startCodeFragment(const QCString &) override;
+ void endCodeFragment(const QCString &) override;
void finish();
diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc
index 0a57c6f..16753ea 100644
--- a/vhdlparser/VhdlParser.cc
+++ b/vhdlparser/VhdlParser.cc
@@ -28,7 +28,7 @@ QCString VhdlParser::abstract_literal() {Token *tok;
tok = jj_consume_token(DECIMAL_LITERAL);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -37,7 +37,7 @@ return tok->image.c_str();
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -46,7 +46,7 @@ return tok->image.c_str();
tok = jj_consume_token(BASED_LITERAL);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -66,7 +66,7 @@ QCString VhdlParser::access_type_definition() {Token *tok=0;QCString str,str1;
if (!hasError) {
str1 = subtype_indication();
}
-str=tok->image.c_str(); return str+str1;
+str=tok->image; return str+str1;
assert(false);
}
@@ -78,7 +78,7 @@ QCString VhdlParser::actual_designator() {QCString str;Token *t=0;
t = jj_consume_token(OPEN_T);
}
if (!hasError) {
-return t->image.c_str();
+return QCString(t->image);
}
break;
}
@@ -241,7 +241,7 @@ s+=","+s1;
if (!hasError) {
jj_consume_token(RPAREN_T);
}
-return "("+s+")";
+return QCString("("+s+")");
assert(false);
}
@@ -330,7 +330,7 @@ return s;
tok = jj_consume_token(CHARACTER_LITERAL);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -401,7 +401,7 @@ QCString t=s1+"::"+s;
m_sharedState->genLabels.resize(0);
outlineParser()->pushLabel(m_sharedState->genLabels,s1);
m_sharedState->lastCompound=m_sharedState->current;
- outlineParser()->addVhdlType(t,outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
+ outlineParser()->addVhdlType(t.data(),outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
}
if (!hasError) {
try {
@@ -724,7 +724,7 @@ return s;
tok = jj_consume_token(RANGE_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -830,7 +830,7 @@ QCString VhdlParser::base() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(INTEGER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -839,7 +839,7 @@ QCString VhdlParser::base_specifier() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -857,7 +857,7 @@ QCString VhdlParser::based_integer() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -866,7 +866,7 @@ QCString VhdlParser::based_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASED_LITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -875,7 +875,7 @@ QCString VhdlParser::basic_identifier() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -930,7 +930,7 @@ QCString VhdlParser::bit_string_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BIT_STRING_LITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -939,7 +939,7 @@ QCString VhdlParser::bit_value() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -1391,7 +1391,7 @@ void VhdlParser::case_statement() {QCString s;
}
if (!hasError) {
QCString ca="case "+s;
- FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca);
+ FlowChart::addFlowChart(FlowChart::CASE_NO,QCString(),ca);
}
if (!hasError) {
jj_consume_token(IS_T);
@@ -1440,7 +1440,7 @@ QCString ca="case "+s;
jj_consume_token(SEMI_T);
}
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0);
+ FlowChart::addFlowChart(FlowChart::END_CASE,"end case",QCString());
}
@@ -1455,9 +1455,9 @@ void VhdlParser::case_statement_alternative() {QCString s;
jj_consume_token(ARROW_T);
}
if (!hasError) {
-QCString t="when ";
+QCString t("when ");
t+=s+"=> ";
- FlowChart::addFlowChart(FlowChart::WHEN_NO,s.data(),t);
+ FlowChart::addFlowChart(FlowChart::WHEN_NO,s,t);
}
if (!hasError) {
sequence_of_statement();
@@ -1470,7 +1470,7 @@ QCString VhdlParser::character_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(CHARACTER_LITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -1703,8 +1703,8 @@ void VhdlParser::component_instantiation_statement() {QCString s,s1;
if (!hasError) {
QCString s3;
if (s1.contains("|")) {
- s3=VhdlDocGen::getIndexWord(s1.data(),0);
- s1=VhdlDocGen::getIndexWord(s1.data(),1);
+ s3=VhdlDocGen::getIndexWord(s1,0);
+ s1=VhdlDocGen::getIndexWord(s1,1);
}
outlineParser()->addCompInst(s.lower().data(),s1.lower().data(),s3.data(),outlineParser()->getLine());
@@ -2337,7 +2337,7 @@ QCString VhdlParser::decimal_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(DECIMAL_LITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -2489,7 +2489,7 @@ QCString VhdlParser::direction() {Token *tok=0;
tok = jj_consume_token(TO_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -2498,7 +2498,7 @@ return tok->image.c_str();
tok = jj_consume_token(DOWNTO_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -2664,7 +2664,7 @@ return s;
s = name();
}
if (!hasError) {
-return tok->image.c_str()+s;
+return QCString(tok->image)+s;
}
break;
}
@@ -2673,7 +2673,7 @@ return tok->image.c_str()+s;
tok = jj_consume_token(OPEN_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -3508,7 +3508,7 @@ QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
m_sharedState->lab.resize(0);
if(t) s+=":";
if(t1) s2.prepend(" when ");
- FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2.data(),s1.data());
+ FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2,s1);
return s+s1+s2+";";
assert(false);
@@ -3621,7 +3621,7 @@ QCString VhdlParser::extended_identifier() {Token *t;
if (!hasError) {
t = jj_consume_token(EXTENDED_CHARACTER);
}
-return t->image.c_str();
+return QCString(t->image);
assert(false);
}
@@ -3860,7 +3860,7 @@ return s;
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4258,7 +4258,7 @@ QCString VhdlParser::identifier() {Token *tok=0;
tok = jj_consume_token(EXTENDED_CHARACTER);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4267,7 +4267,7 @@ return tok->image.c_str();
tok = jj_consume_token(BASIC_IDENTIFIER);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4341,7 +4341,7 @@ void VhdlParser::if_statement() {QCString s,s1;
}
if (!hasError) {
s.prepend("if ");
- FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
+ FlowChart::addFlowChart(FlowChart::IF_NO,QCString(),s);
}
if (!hasError) {
sequence_of_statement();
@@ -4368,7 +4368,7 @@ s.prepend("if ");
}
if (!hasError) {
s1.prepend("elsif ");
- FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
+ FlowChart::addFlowChart(FlowChart::ELSIF_NO,QCString(),s1);
}
if (!hasError) {
sequence_of_statement();
@@ -4383,7 +4383,7 @@ s1.prepend("elsif ");
jj_consume_token(ELSE_T);
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
+FlowChart::addFlowChart(FlowChart::ELSE_NO,QCString(),QCString());
}
if (!hasError) {
sequence_of_statement();
@@ -4419,7 +4419,7 @@ FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
jj_consume_token(SEMI_T);
}
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
+ FlowChart::addFlowChart(FlowChart::ENDIF_NO,QCString(),QCString());
}
@@ -4438,7 +4438,7 @@ assert(false);
}
-QCString VhdlParser::index_constraint() {QCString s="("; QCString s1,s2;
+QCString VhdlParser::index_constraint() {QCString s("("); QCString s1,s2;
if (!hasError) {
jj_consume_token(LPAREN_T);
}
@@ -4660,7 +4660,7 @@ return s;
tok = jj_consume_token(OTHER_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4669,7 +4669,7 @@ return tok->image.c_str();
tok = jj_consume_token(ALL_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -4686,7 +4686,7 @@ QCString VhdlParser::integer() {Token *t;
if (!hasError) {
t = jj_consume_token(INTEGER);
}
-return t->image.c_str();
+return QCString(t->image);
assert(false);
}
@@ -4790,7 +4790,7 @@ QCString VhdlParser::interface_file_declaration() {QCString s,s1;
s1 = subtype_indication();
}
outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
- return " file "+s+":"+s1;
+ return QCString(" file "+s+":"+s1);
assert(false);
}
@@ -4929,7 +4929,7 @@ QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=
}
}
if(tok)
- s5=tok->image.c_str();
+ s5=QCString(tok->image);
if(tok1)
s3=tok1->image.data();
@@ -4970,7 +4970,7 @@ QCString VhdlParser::iteration_scheme() {QCString s;
}
if (!hasError) {
s.prepend("while ");
- FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),m_sharedState->lab.data());
+ FlowChart::addFlowChart(FlowChart::WHILE_NO,QCString(),s,m_sharedState->lab);
m_sharedState->lab="";
return s;
}
@@ -4985,7 +4985,7 @@ s.prepend("while ");
}
if (!hasError) {
QCString q=m_sharedState->lab+" for "+s;
- FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),m_sharedState->lab.data());
+ FlowChart::addFlowChart(FlowChart::FOR_NO,QCString(),q,m_sharedState->lab);
m_sharedState->lab="";
return q;
}
@@ -5159,7 +5159,7 @@ s+=":";
}
if (!hasError) {
if(s1.isEmpty())
- FlowChart::addFlowChart(FlowChart::LOOP_NO,0,"infinite");
+ FlowChart::addFlowChart(FlowChart::LOOP_NO,QCString(),"infinite");
}
if (!hasError) {
jj_consume_token(LOOP_T);
@@ -5193,7 +5193,7 @@ if(s1.isEmpty())
QCString q = s+" loop "+s2+" end loop" +s3;
QCString endLoop="end loop" + s3;
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop.data(),0);
+ FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop,QCString());
return q;
assert(false);
}
@@ -5300,7 +5300,7 @@ QCString VhdlParser::multiplying_operation() {Token *tok=0;
tok = jj_consume_token(MULT_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -5309,7 +5309,7 @@ return tok->image.c_str();
tok = jj_consume_token(SLASH_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -5318,7 +5318,7 @@ return tok->image.c_str();
tok = jj_consume_token(MOD_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -5327,7 +5327,7 @@ return tok->image.c_str();
tok = jj_consume_token(REM_T);
}
if (!hasError) {
-return tok->image.c_str();
+return QCString(tok->image);
}
break;
}
@@ -5680,7 +5680,7 @@ QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
jj_consume_token(SEMI_T);
}
if(t) s+=":";
- FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2.data(),s1.data());
+ FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2,s1);
m_sharedState->lab.resize(0);
if(t1) s2.prepend("when ");
return s+s1+s2+";";
@@ -5823,7 +5823,7 @@ QCString VhdlParser::operator_symbol() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(STRINGLITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -5876,7 +5876,7 @@ void VhdlParser::package_body() {QCString s;
if (!hasError) {
m_sharedState->lastCompound=m_sharedState->current;
s.prepend("_");
- outlineParser()->addVhdlType(s,outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
}
if (!hasError) {
package_body_declarative_part();
@@ -6087,7 +6087,7 @@ m_sharedState->lastCompound=m_sharedState->current;
clone->bodyLine=outlineParser()->getLine(PACKAGE_T);
clone->protection=Package;
m_sharedState->current_root->moveToSubEntryAndKeep(clone);
- outlineParser()->addVhdlType(s,outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
}
if (!hasError) {
package_header();
@@ -6529,7 +6529,7 @@ return s;
allocator();
}
if (!hasError) {
-return "";
+return QCString();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
@@ -6668,7 +6668,7 @@ QCString VhdlParser::process_declarative_item() {QCString s;
subprogram_declaration();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -6906,8 +6906,8 @@ m_sharedState->currP=VhdlDocGen::PROCESS;
}
if (!hasError) {
if (s2.data())
- FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2.data(),0);
- FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2,QCString());
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",QCString());
}
if (!hasError) {
jj_consume_token(BEGIN_T);
@@ -6961,8 +6961,8 @@ if(s.isEmpty())
m_sharedState->current->endBodyLine=outlineParser()->getLine();
m_sharedState->currP=0;
if(tok)
- s1=tok->image.data();
- outlineParser()->createFunction(m_sharedState->currName,VhdlDocGen::PROCESS,s1.data());
+ s1=tok->image;
+ outlineParser()->createFunction(m_sharedState->currName.data(),VhdlDocGen::PROCESS,s1.data());
outlineParser()->createFlow();
m_sharedState->currName="";
outlineParser()->newEntry();
@@ -7286,7 +7286,7 @@ return "?=";
jj_consume_token(QNEQU_T);
}
if (!hasError) {
-return "?/=";
+return "?/=";
}
break;
}
@@ -7678,42 +7678,42 @@ QCString VhdlParser::sequential_statement() {QCString s;
s = signal_assignment_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_85(3)) {
if (!hasError) {
s = assertion_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_86(3)) {
if (!hasError) {
s = report_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_87(3)) {
if (!hasError) {
s = wait_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_88(2147483647)) {
if (!hasError) {
s = variable_assignment_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_89(3)) {
if (!hasError) {
s = procedure_call_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
} else if (jj_2_90(3)) {
if (!hasError) {
@@ -7755,7 +7755,7 @@ return s;
s = return_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::RETURN_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::RETURN_NO,s,QCString());return s;
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
@@ -7766,7 +7766,7 @@ FlowChart::addFlowChart(FlowChart::RETURN_NO,s.data(),0);return s;
s = null_statement();
}
if (!hasError) {
-FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
+FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;
}
break;
}
@@ -7910,14 +7910,14 @@ QCString VhdlParser::signal_assignment_statement() {QCString s,s1,s2,s3;
conditional_signal_assignment_wave();
}
if (!hasError) {
-return "";
+return QCString();
}
} else if (jj_2_98(2147483647)) {
if (!hasError) {
selected_signal_assignment_wave();
}
if (!hasError) {
-return "";
+return QCString();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
@@ -8277,7 +8277,7 @@ QCString VhdlParser::string_literal() {Token *tok=0;
if (!hasError) {
tok = jj_consume_token(STRINGLITERAL);
}
-return tok->image.c_str();
+return QCString(tok->image);
assert(false);
}
@@ -8293,9 +8293,9 @@ void VhdlParser::subprogram_body() {QCString s;
if (!hasError) {
if (s.data())
{
- FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,0);
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,QCString());
}
- FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",QCString());
}
if (!hasError) {
jj_consume_token(BEGIN_T);
@@ -8407,7 +8407,7 @@ QCString VhdlParser::subprogram_declarative_item() {QCString s;
subprogram_declaration();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -8425,7 +8425,7 @@ return s;
subprogram_body();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -9052,7 +9052,6 @@ QCString VhdlParser::type_definition() {QCString s;
case RANGE_T:
case LPAREN_T:{
if (!hasError) {
- //try{
s = scalar_type_definition();
}
if (!hasError) {
@@ -9095,7 +9094,7 @@ return s;
protected_type_body();
}
if (!hasError) {
-return "";
+return QCString();
}
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
@@ -9104,7 +9103,7 @@ return "";
protected_type_declaration();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -9276,7 +9275,7 @@ return s+s1+":="+s2+";";
selected_variable_assignment();
}
if (!hasError) {
-return "";
+return QCString();
}
break;
}
@@ -9563,7 +9562,7 @@ QCString VhdlParser::protected_type_body() {
;
}
}
-return "";
+return QCString();
assert(false);
}
@@ -9736,7 +9735,7 @@ outlineParser()->error_skipto(END_T);
;
}
}
-return "";
+return QCString();
assert(false);
}
@@ -10415,7 +10414,7 @@ QCString VhdlParser::sig_stat() {Token *t;
t = jj_consume_token(CONSTANT_T);
}
if (!hasError) {
-return t->image.data();
+return QCString(t->image);
}
break;
}
@@ -10424,7 +10423,7 @@ return t->image.data();
t = jj_consume_token(SIGNAL_T);
}
if (!hasError) {
-return t->image.data();
+return QCString(t->image);
}
break;
}
@@ -10433,7 +10432,7 @@ return t->image.data();
t = jj_consume_token(VARIABLE_T);
}
if (!hasError) {
-return t->image.data();
+return QCString(t->image);
}
break;
}
@@ -11326,7 +11325,7 @@ QCString q;
if (a>b) b=a;
outlineParser()->addVhdlType(m_sharedState->current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,ss.data(),0,Public);
}
- m_sharedState->currP=0;return "";
+ m_sharedState->currP=0;return QCString();
assert(false);
}
diff --git a/vhdlparser/VhdlParser.h b/vhdlparser/VhdlParser.h
index 4eea915..c2f2cb2 100644
--- a/vhdlparser/VhdlParser.h
+++ b/vhdlparser/VhdlParser.h
@@ -1303,6 +1303,14 @@ void parseInline();
{ jj_save(124, xla); }
}
+ inline bool jj_3R_207()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_61()) return true;
+ return false;
+ }
+
inline bool jj_3R_461()
{
if (jj_done) return true;
@@ -1520,24 +1528,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_427()
+ inline bool jj_3R_631()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3R_426()
+ inline bool jj_3R_427()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_631()
+ inline bool jj_3R_426()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_scan_token(OTHER_T)) return true;
return false;
}
@@ -1630,6 +1638,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_628()
+ {
+ if (jj_done) return true;
+ if (jj_3R_61()) return true;
+ return false;
+ }
+
inline bool jj_3_125()
{
if (jj_done) return true;
@@ -1649,13 +1664,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_628()
- {
- if (jj_done) return true;
- if (jj_3R_61()) return true;
- return false;
- }
-
inline bool jj_3R_627()
{
if (jj_done) return true;
@@ -1734,6 +1742,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_630()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ if (jj_3R_268()) return true;
+ return false;
+ }
+
inline bool jj_3R_443()
{
if (jj_done) return true;
@@ -1761,14 +1777,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_630()
- {
- if (jj_done) return true;
- if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_268()) return true;
- return false;
- }
-
inline bool jj_3R_629()
{
if (jj_done) return true;
@@ -1779,20 +1787,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_360()
+ inline bool jj_3R_362()
{
if (jj_done) return true;
- if (jj_scan_token(PROCEDURE_T)) return true;
- if (jj_3R_74()) return true;
- if (jj_3R_442()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_63()) return true;
return false;
}
- inline bool jj_3R_362()
+ inline bool jj_3R_360()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_scan_token(PROCEDURE_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_3R_442()) return true;
return false;
}
@@ -1853,6 +1861,18 @@ void parseInline();
return false;
}
+ inline bool jj_3R_205()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_362()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
inline bool jj_3R_493()
{
if (jj_done) return true;
@@ -1876,29 +1896,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_205()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_362()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- inline bool jj_3R_399()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_scan_token(53)) return false;
- jj_scanpos = xsp;
- if (jj_scan_token(75)) return true;
- return false;
- }
-
inline bool jj_3R_171()
{
if (jj_done) return true;
@@ -1932,6 +1929,17 @@ void parseInline();
return false;
}
+ inline bool jj_3R_399()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_scan_token(53)) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(75)) return true;
+ return false;
+ }
+
inline bool jj_3R_466()
{
if (jj_done) return true;
@@ -2003,13 +2011,6 @@ void parseInline();
return false;
}
- inline bool jj_3_124()
- {
- if (jj_done) return true;
- if (jj_3R_114()) return true;
- return false;
- }
-
inline bool jj_3R_398()
{
if (jj_done) return true;
@@ -2024,6 +2025,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_124()
+ {
+ if (jj_done) return true;
+ if (jj_3R_114()) return true;
+ return false;
+ }
+
inline bool jj_3R_385()
{
if (jj_done) return true;
@@ -2041,13 +2049,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_687()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
inline bool jj_3R_492()
{
if (jj_done) return true;
@@ -2060,6 +2061,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_687()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_620()
+ {
+ if (jj_done) return true;
+ if (jj_3R_369()) return true;
+ return false;
+ }
+
inline bool jj_3R_686()
{
if (jj_done) return true;
@@ -2086,28 +2101,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_620()
- {
- if (jj_done) return true;
- if (jj_3R_369()) return true;
- return false;
- }
-
- inline bool jj_3R_587()
- {
- if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_61()) return true;
- return false;
- }
-
- inline bool jj_3_123()
- {
- if (jj_done) return true;
- if (jj_3R_150()) return true;
- return false;
- }
-
inline bool jj_3R_619()
{
if (jj_done) return true;
@@ -2137,6 +2130,21 @@ void parseInline();
return false;
}
+ inline bool jj_3R_587()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_61()) return true;
+ return false;
+ }
+
+ inline bool jj_3_123()
+ {
+ if (jj_done) return true;
+ if (jj_3R_150()) return true;
+ return false;
+ }
+
inline bool jj_3R_542()
{
if (jj_done) return true;
@@ -2175,6 +2183,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_162()
+ {
+ if (jj_done) return true;
+ if (jj_3R_327()) return true;
+ return false;
+ }
+
inline bool jj_3R_464()
{
if (jj_done) return true;
@@ -2182,6 +2197,14 @@ void parseInline();
return false;
}
+ inline bool jj_3_39()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_280()
{
if (jj_done) return true;
@@ -2207,21 +2230,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_162()
- {
- if (jj_done) return true;
- if (jj_3R_327()) return true;
- return false;
- }
-
- inline bool jj_3_39()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
inline bool jj_3R_69()
{
if (jj_done) return true;
@@ -2233,34 +2241,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_462()
- {
- if (jj_done) return true;
- if (jj_3R_420()) return true;
- return false;
- }
-
- inline bool jj_3R_149()
+ inline bool jj_3R_336()
{
if (jj_done) return true;
- if (jj_3R_119()) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
- if (jj_scan_token(FORCE_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_314()) jj_scanpos = xsp;
- if (jj_3R_61()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- xsp = jj_scanpos;
- if (jj_3R_315()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(IF_T)) return true;
return false;
}
- inline bool jj_3R_336()
+ inline bool jj_3R_462()
{
if (jj_done) return true;
- if (jj_scan_token(IF_T)) return true;
+ if (jj_3R_420()) return true;
return false;
}
@@ -2282,6 +2273,23 @@ void parseInline();
return false;
}
+ inline bool jj_3R_149()
+ {
+ if (jj_done) return true;
+ if (jj_3R_119()) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_scan_token(FORCE_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_314()) jj_scanpos = xsp;
+ if (jj_3R_61()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_315()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_545()
{
if (jj_done) return true;
@@ -2300,6 +2308,15 @@ void parseInline();
return false;
}
+ inline bool jj_3R_78()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_174()) return true;
+ return false;
+ }
+
inline bool jj_3R_384()
{
if (jj_done) return true;
@@ -2317,12 +2334,13 @@ void parseInline();
return false;
}
- inline bool jj_3R_78()
+ inline bool jj_3R_110()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_174()) return true;
+ if (jj_3R_63()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_236()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
@@ -2351,16 +2369,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_110()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_236()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
inline bool jj_3R_570()
{
if (jj_done) return true;
@@ -2385,6 +2393,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_481()
+ {
+ if (jj_done) return true;
+ if (jj_3R_549()) return true;
+ return false;
+ }
+
inline bool jj_3R_147()
{
if (jj_done) return true;
@@ -2398,13 +2413,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_481()
- {
- if (jj_done) return true;
- if (jj_3R_549()) return true;
- return false;
- }
-
inline bool jj_3R_624()
{
if (jj_done) return true;
@@ -2422,26 +2430,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_647()
- {
- if (jj_done) return true;
- if (jj_scan_token(NEG_T)) return true;
- if (jj_scan_token(DOT_T)) return true;
- return false;
- }
-
- inline bool jj_3R_623()
- {
- if (jj_done) return true;
- Token * xsp;
- if (jj_3R_647()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_647()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
inline bool jj_3R_592()
{
if (jj_done) return true;
@@ -2458,11 +2446,11 @@ void parseInline();
return false;
}
- inline bool jj_3_119()
+ inline bool jj_3R_647()
{
if (jj_done) return true;
+ if (jj_scan_token(NEG_T)) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_147()) return true;
return false;
}
@@ -2477,6 +2465,26 @@ void parseInline();
return false;
}
+ inline bool jj_3R_623()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ if (jj_3R_647()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_647()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
+ inline bool jj_3_119()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_147()) return true;
+ return false;
+ }
+
inline bool jj_3R_569()
{
if (jj_done) return true;
@@ -2488,6 +2496,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_66()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_160()) jj_scanpos = xsp;
+ return false;
+ }
+
inline bool jj_3R_622()
{
if (jj_done) return true;
@@ -2496,13 +2514,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_66()
+ inline bool jj_3R_582()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_160()) jj_scanpos = xsp;
+ if (jj_3R_327()) return true;
return false;
}
@@ -2526,31 +2541,42 @@ void parseInline();
return false;
}
- inline bool jj_3R_582()
+ inline bool jj_3R_413()
{
if (jj_done) return true;
- if (jj_3R_327()) return true;
+ if (jj_scan_token(INTEGER)) return true;
return false;
}
- inline bool jj_3R_512()
+ inline bool jj_3R_326()
{
if (jj_done) return true;
- if (jj_3R_570()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_412()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_413()) return true;
return false;
}
- inline bool jj_3R_511()
+ inline bool jj_3R_412()
{
if (jj_done) return true;
- if (jj_3R_569()) return true;
+ if (jj_3R_63()) return true;
return false;
}
- inline bool jj_3R_413()
+ inline bool jj_3R_512()
{
if (jj_done) return true;
- if (jj_scan_token(INTEGER)) return true;
+ if (jj_3R_570()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_511()
+ {
+ if (jj_done) return true;
+ if (jj_3R_569()) return true;
return false;
}
@@ -2574,24 +2600,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_326()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_412()) return false;
- jj_scanpos = xsp;
- if (jj_3R_413()) return true;
- return false;
- }
-
- inline bool jj_3R_412()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
inline bool jj_3R_189()
{
if (jj_done) return true;
@@ -2650,6 +2658,19 @@ void parseInline();
return false;
}
+ inline bool jj_3R_549()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_591()) jj_scanpos = xsp;
+ if (jj_scan_token(IS_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_592()) jj_scanpos = xsp;
+ if (jj_3R_593()) return true;
+ return false;
+ }
+
inline bool jj_3_114()
{
if (jj_done) return true;
@@ -2665,16 +2686,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_549()
+ inline bool jj_3R_593()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_591()) jj_scanpos = xsp;
- if (jj_scan_token(IS_T)) return true;
- xsp = jj_scanpos;
- if (jj_3R_592()) jj_scanpos = xsp;
- if (jj_3R_593()) return true;
+ if (jj_3R_61()) return true;
return false;
}
@@ -2698,13 +2713,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_593()
- {
- if (jj_done) return true;
- if (jj_3R_61()) return true;
- return false;
- }
-
inline bool jj_3R_284()
{
if (jj_done) return true;
@@ -2712,13 +2720,6 @@ void parseInline();
return false;
}
- inline bool jj_3_116()
- {
- if (jj_done) return true;
- if (jj_3R_146()) return true;
- return false;
- }
-
inline bool jj_3R_467()
{
if (jj_done) return true;
@@ -2741,6 +2742,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_116()
+ {
+ if (jj_done) return true;
+ if (jj_3R_146()) return true;
+ return false;
+ }
+
inline bool jj_3R_273()
{
if (jj_done) return true;
@@ -2780,13 +2788,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_296()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- return false;
- }
-
inline bool jj_3R_141()
{
if (jj_done) return true;
@@ -2814,26 +2815,25 @@ void parseInline();
return false;
}
- inline bool jj_3R_246()
+ inline bool jj_3R_296()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3_115()
+ inline bool jj_3R_251()
{
if (jj_done) return true;
- if (jj_3R_145()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_102()) return true;
return false;
}
- inline bool jj_3R_251()
+ inline bool jj_3R_246()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_102()) return true;
+ if (jj_3R_137()) return true;
return false;
}
@@ -2845,6 +2845,14 @@ void parseInline();
return false;
}
+ inline bool jj_3_115()
+ {
+ if (jj_done) return true;
+ if (jj_3R_145()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_409()
{
if (jj_done) return true;
@@ -2852,56 +2860,56 @@ void parseInline();
return false;
}
- inline bool jj_3R_144()
+ inline bool jj_3R_408()
{
if (jj_done) return true;
- if (jj_scan_token(END_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_296()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(XOR_T)) return true;
return false;
}
- inline bool jj_3R_648()
+ inline bool jj_3R_407()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_scan_token(XNOR_T)) return true;
return false;
}
- inline bool jj_3R_408()
+ inline bool jj_3R_406()
{
if (jj_done) return true;
- if (jj_scan_token(XOR_T)) return true;
+ if (jj_scan_token(NOR_T)) return true;
return false;
}
- inline bool jj_3R_188()
+ inline bool jj_3R_405()
{
if (jj_done) return true;
- if (jj_3R_349()) return true;
+ if (jj_scan_token(NAND_T)) return true;
return false;
}
- inline bool jj_3R_407()
+ inline bool jj_3R_144()
{
if (jj_done) return true;
- if (jj_scan_token(XNOR_T)) return true;
+ if (jj_scan_token(END_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_296()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_406()
+ inline bool jj_3R_648()
{
if (jj_done) return true;
- if (jj_scan_token(NOR_T)) return true;
+ if (jj_3R_137()) return true;
return false;
}
- inline bool jj_3R_405()
+ inline bool jj_3R_188()
{
if (jj_done) return true;
- if (jj_scan_token(NAND_T)) return true;
+ if (jj_3R_349()) return true;
return false;
}
@@ -2959,16 +2967,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_136()
- {
- if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_327()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
inline bool jj_3R_129()
{
if (jj_done) return true;
@@ -2984,6 +2982,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_136()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_327()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_116()
{
if (jj_done) return true;
@@ -2998,6 +3006,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_218()
+ {
+ if (jj_done) return true;
+ if (jj_3R_369()) return true;
+ return false;
+ }
+
inline bool jj_3R_137()
{
if (jj_done) return true;
@@ -3009,13 +3024,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_218()
- {
- if (jj_done) return true;
- if (jj_3R_369()) return true;
- return false;
- }
-
inline bool jj_3R_217()
{
if (jj_done) return true;
@@ -3041,22 +3049,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_135()
- {
- if (jj_done) return true;
- if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_63()) return true;
- if (jj_3R_245()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_284()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
inline bool jj_3R_684()
{
if (jj_done) return true;
@@ -3075,6 +3067,22 @@ void parseInline();
return false;
}
+ inline bool jj_3R_135()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(FUNCTION_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_63()) return true;
+ if (jj_3R_245()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_284()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_645()
{
if (jj_done) return true;
@@ -3135,6 +3143,15 @@ void parseInline();
return false;
}
+ inline bool jj_3R_488()
+ {
+ if (jj_done) return true;
+ if (jj_3R_554()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_555()) return true;
+ return false;
+ }
+
inline bool jj_3R_438()
{
if (jj_done) return true;
@@ -3149,12 +3166,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_488()
+ inline bool jj_3R_662()
{
if (jj_done) return true;
- if (jj_3R_554()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_555()) return true;
+ if (jj_3R_245()) return true;
return false;
}
@@ -3178,13 +3193,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_662()
- {
- if (jj_done) return true;
- if (jj_3R_245()) return true;
- return false;
- }
-
inline bool jj_3R_597()
{
if (jj_done) return true;
@@ -3258,6 +3266,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_644()
+ {
+ if (jj_done) return true;
+ if (jj_3R_661()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_662()) jj_scanpos = xsp;
+ return false;
+ }
+
inline bool jj_3R_348()
{
if (jj_done) return true;
@@ -3272,16 +3290,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_644()
- {
- if (jj_done) return true;
- if (jj_3R_661()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_662()) jj_scanpos = xsp;
- return false;
- }
-
inline bool jj_3R_692()
{
if (jj_done) return true;
@@ -3315,37 +3323,37 @@ void parseInline();
return false;
}
- inline bool jj_3R_718()
+ inline bool jj_3_36()
{
if (jj_done) return true;
- if (jj_3R_364()) return true;
+ if (jj_3R_91()) return true;
return false;
}
- inline bool jj_3R_700()
+ inline bool jj_3_34()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_718()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_719()) return false;
- jj_scanpos = xsp;
- if (jj_3R_720()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3_36()
+ inline bool jj_3R_718()
{
if (jj_done) return true;
- if (jj_3R_91()) return true;
+ if (jj_3R_364()) return true;
return false;
}
- inline bool jj_3_34()
+ inline bool jj_3R_700()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_718()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_719()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_720()) return true;
return false;
}
@@ -3444,6 +3452,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_618()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(BOX_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_714()
{
if (jj_done) return true;
@@ -3465,17 +3480,18 @@ void parseInline();
return false;
}
- inline bool jj_3R_618()
+ inline bool jj_3R_711()
{
if (jj_done) return true;
- if (jj_scan_token(BOX_T)) return true;
+ if (jj_3R_391()) return true;
return false;
}
- inline bool jj_3R_711()
+ inline bool jj_3R_366()
{
if (jj_done) return true;
- if (jj_3R_391()) return true;
+ if (jj_scan_token(ENTITY_T)) return true;
+ if (jj_3R_74()) return true;
return false;
}
@@ -3507,14 +3523,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_366()
- {
- if (jj_done) return true;
- if (jj_scan_token(ENTITY_T)) return true;
- if (jj_3R_74()) return true;
- return false;
- }
-
inline bool jj_3R_706()
{
if (jj_done) return true;
@@ -3574,6 +3582,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_557()
+ {
+ if (jj_done) return true;
+ if (jj_3R_555()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_618()) jj_scanpos = xsp;
+ return false;
+ }
+
inline bool jj_3R_544()
{
if (jj_done) return true;
@@ -3582,6 +3600,15 @@ void parseInline();
return false;
}
+ inline bool jj_3R_626()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_143()
{
if (jj_done) return true;
@@ -3597,13 +3624,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_557()
+ inline bool jj_3R_614()
{
if (jj_done) return true;
- if (jj_3R_555()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_618()) jj_scanpos = xsp;
+ if (jj_scan_token(FILE_T)) return true;
return false;
}
@@ -3615,22 +3639,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_626()
- {
- if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
- inline bool jj_3R_614()
- {
- if (jj_done) return true;
- if (jj_scan_token(FILE_T)) return true;
- return false;
- }
-
inline bool jj_3R_613()
{
if (jj_done) return true;
@@ -3694,16 +3702,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_463()
- {
- if (jj_done) return true;
- if (jj_3R_61()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_544()) jj_scanpos = xsp;
- return false;
- }
-
inline bool jj_3R_604()
{
if (jj_done) return true;
@@ -3732,24 +3730,27 @@ void parseInline();
return false;
}
- inline bool jj_3R_600()
+ inline bool jj_3R_463()
{
if (jj_done) return true;
- if (jj_scan_token(CONFIGURATION_T)) return true;
+ if (jj_3R_61()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_544()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_599()
+ inline bool jj_3R_600()
{
if (jj_done) return true;
- if (jj_scan_token(ARCHITECTURE_T)) return true;
+ if (jj_scan_token(CONFIGURATION_T)) return true;
return false;
}
- inline bool jj_3R_422()
+ inline bool jj_3R_599()
{
if (jj_done) return true;
- if (jj_scan_token(UNAFFECTED_T)) return true;
+ if (jj_scan_token(ARCHITECTURE_T)) return true;
return false;
}
@@ -3801,6 +3802,28 @@ void parseInline();
return false;
}
+ inline bool jj_3R_422()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(UNAFFECTED_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_576()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(OPEN_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_575()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(CONFIGURATION_T)) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
inline bool jj_3R_332()
{
if (jj_done) return true;
@@ -3824,21 +3847,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_576()
- {
- if (jj_done) return true;
- if (jj_scan_token(OPEN_T)) return true;
- return false;
- }
-
- inline bool jj_3R_575()
- {
- if (jj_done) return true;
- if (jj_scan_token(CONFIGURATION_T)) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
inline bool jj_3R_574()
{
if (jj_done) return true;
@@ -3906,14 +3914,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_723()
- {
- if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_722()) return true;
- return false;
- }
-
inline bool jj_3_32()
{
if (jj_done) return true;
@@ -3921,18 +3921,18 @@ void parseInline();
return false;
}
- inline bool jj_3_31()
+ inline bool jj_3R_723()
{
if (jj_done) return true;
- if (jj_3R_88()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_722()) return true;
return false;
}
- inline bool jj_3R_480()
+ inline bool jj_3_31()
{
if (jj_done) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_88()) return true;
return false;
}
@@ -3954,6 +3954,21 @@ void parseInline();
return false;
}
+ inline bool jj_3R_480()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_61()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_168()
+ {
+ if (jj_done) return true;
+ if (jj_3R_89()) return true;
+ return false;
+ }
+
inline bool jj_3R_391()
{
if (jj_done) return true;
@@ -3970,35 +3985,37 @@ void parseInline();
return false;
}
- inline bool jj_3R_168()
+ inline bool jj_3R_167()
{
if (jj_done) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_88()) return true;
return false;
}
- inline bool jj_3R_458()
+ inline bool jj_3R_72()
{
if (jj_done) return true;
- if (jj_3R_542()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_167()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_168()) return true;
return false;
}
- inline bool jj_3R_167()
+ inline bool jj_3R_458()
{
if (jj_done) return true;
- if (jj_3R_88()) return true;
+ if (jj_3R_542()) return true;
return false;
}
- inline bool jj_3R_72()
+ inline bool jj_3R_489()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_167()) return false;
- jj_scanpos = xsp;
- if (jj_3R_168()) return true;
+ if (jj_3R_556()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_63()) return true;
return false;
}
@@ -4042,15 +4059,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_489()
- {
- if (jj_done) return true;
- if (jj_3R_556()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
inline bool jj_3R_397()
{
if (jj_done) return true;
@@ -4141,23 +4149,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_704()
- {
- if (jj_done) return true;
- if (jj_scan_token(ARRAY_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_722()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_723()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(RPAREN_T)) return true;
- if (jj_scan_token(OF_T)) return true;
- if (jj_3R_89()) return true;
- return false;
- }
-
inline bool jj_3R_573()
{
if (jj_done) return true;
@@ -4176,10 +4167,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_161()
+ inline bool jj_3R_704()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_scan_token(ARRAY_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_722()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_723()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_89()) return true;
return false;
}
@@ -4208,6 +4209,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_161()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
inline bool jj_3R_193()
{
if (jj_done) return true;
@@ -4229,6 +4237,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_187()
+ {
+ if (jj_done) return true;
+ if (jj_3R_348()) return true;
+ return false;
+ }
+
+ inline bool jj_3_28()
+ {
+ if (jj_done) return true;
+ if (jj_3R_86()) return true;
+ return false;
+ }
+
inline bool jj_3_110()
{
if (jj_done) return true;
@@ -4243,45 +4265,53 @@ void parseInline();
return false;
}
- inline bool jj_3R_641()
+ inline bool jj_3R_186()
{
if (jj_done) return true;
- if (jj_3R_658()) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3R_640()
+ inline bool jj_3R_641()
{
if (jj_done) return true;
- if (jj_3R_657()) return true;
+ if (jj_3R_658()) return true;
return false;
}
- inline bool jj_3R_187()
+ inline bool jj_3R_185()
{
if (jj_done) return true;
- if (jj_3R_348()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3_28()
+ inline bool jj_3R_640()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_657()) return true;
return false;
}
- inline bool jj_3R_186()
+ inline bool jj_3R_184()
{
if (jj_done) return true;
- if (jj_3R_87()) return true;
+ if (jj_3R_346()) return true;
return false;
}
- inline bool jj_3R_185()
+ inline bool jj_3R_85()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_184()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_185()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_186()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_187()) return true;
return false;
}
@@ -4311,25 +4341,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_184()
- {
- if (jj_done) return true;
- if (jj_3R_346()) return true;
- return false;
- }
-
- inline bool jj_3R_85()
+ inline bool jj_3R_286()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_184()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_185()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_186()) return false;
- jj_scanpos = xsp;
- if (jj_3R_187()) return true;
+ if (jj_3R_65()) return true;
return false;
}
@@ -4340,13 +4355,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_286()
- {
- if (jj_done) return true;
- if (jj_3R_65()) return true;
- return false;
- }
-
inline bool jj_3R_476()
{
if (jj_done) return true;
@@ -4390,6 +4398,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_27()
+ {
+ if (jj_done) return true;
+ if (jj_3R_85()) return true;
+ return false;
+ }
+
inline bool jj_3R_111()
{
if (jj_done) return true;
@@ -4408,10 +4423,13 @@ void parseInline();
return false;
}
- inline bool jj_3_27()
+ inline bool jj_3R_703()
{
if (jj_done) return true;
- if (jj_3R_85()) return true;
+ if (jj_scan_token(ARRAY_T)) return true;
+ if (jj_3R_65()) return true;
+ if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_89()) return true;
return false;
}
@@ -4423,16 +4441,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_703()
- {
- if (jj_done) return true;
- if (jj_scan_token(ARRAY_T)) return true;
- if (jj_3R_65()) return true;
- if (jj_scan_token(OF_T)) return true;
- if (jj_3R_89()) return true;
- return false;
- }
-
inline bool jj_3R_134()
{
if (jj_done) return true;
@@ -4452,6 +4460,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_389()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(CONSTANT_T)) return true;
+ if (jj_3R_205()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_89()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_477()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_119()
{
if (jj_done) return true;
@@ -4477,17 +4499,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_389()
+ inline bool jj_3_26()
{
if (jj_done) return true;
- if (jj_scan_token(CONSTANT_T)) return true;
- if (jj_3R_205()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_477()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_84()) return true;
return false;
}
@@ -4505,13 +4520,6 @@ void parseInline();
return false;
}
- inline bool jj_3_26()
- {
- if (jj_done) return true;
- if (jj_3R_84()) return true;
- return false;
- }
-
inline bool jj_3R_226()
{
if (jj_done) return true;
@@ -4529,6 +4537,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_579()
+ {
+ if (jj_done) return true;
+ if (jj_3R_345()) return true;
+ return false;
+ }
+
inline bool jj_3R_105()
{
if (jj_done) return true;
@@ -4551,17 +4566,28 @@ void parseInline();
return false;
}
- inline bool jj_3R_579()
+ inline bool jj_3_105()
{
if (jj_done) return true;
- if (jj_3R_345()) return true;
+ if (jj_3R_138()) return true;
return false;
}
- inline bool jj_3_105()
+ inline bool jj_3R_578()
{
if (jj_done) return true;
- if (jj_3R_138()) return true;
+ if (jj_3R_84()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_523()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_578()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_579()) return true;
return false;
}
@@ -4581,24 +4607,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_578()
- {
- if (jj_done) return true;
- if (jj_3R_84()) return true;
- return false;
- }
-
- inline bool jj_3R_523()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_578()) return false;
- jj_scanpos = xsp;
- if (jj_3R_579()) return true;
- return false;
- }
-
inline bool jj_3R_138()
{
if (jj_done) return true;
@@ -4626,6 +4634,15 @@ void parseInline();
return false;
}
+ inline bool jj_3_25()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_83()) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_584()
{
if (jj_done) return true;
@@ -4637,15 +4654,6 @@ void parseInline();
return false;
}
- inline bool jj_3_25()
- {
- if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_83()) return true;
- if (jj_scan_token(ELSE_T)) return true;
- return false;
- }
-
inline bool jj_3R_367()
{
if (jj_done) return true;
@@ -4662,15 +4670,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_539()
- {
- if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_582()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- return false;
- }
-
inline bool jj_3R_333()
{
if (jj_done) return true;
@@ -4681,6 +4680,15 @@ void parseInline();
return false;
}
+ inline bool jj_3R_539()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_582()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_173()
{
if (jj_done) return true;
@@ -4695,17 +4703,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_538()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_scan_token(84)) return false;
- jj_scanpos = xsp;
- if (jj_scan_token(52)) return true;
- return false;
- }
-
inline bool jj_3R_75()
{
if (jj_done) return true;
@@ -4717,6 +4714,17 @@ void parseInline();
return false;
}
+ inline bool jj_3R_538()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_scan_token(84)) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(52)) return true;
+ return false;
+ }
+
inline bool jj_3_104()
{
if (jj_done) return true;
@@ -4777,6 +4785,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_23()
+ {
+ if (jj_done) return true;
+ if (jj_3R_81()) return true;
+ return false;
+ }
+
inline bool jj_3R_364()
{
if (jj_done) return true;
@@ -4804,13 +4819,6 @@ void parseInline();
return false;
}
- inline bool jj_3_23()
- {
- if (jj_done) return true;
- if (jj_3R_81()) return true;
- return false;
- }
-
inline bool jj_3_22()
{
if (jj_done) return true;
@@ -4818,17 +4826,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_638()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_scan_token(46)) return false;
- jj_scanpos = xsp;
- if (jj_scan_token(80)) return true;
- return false;
- }
-
inline bool jj_3R_79()
{
if (jj_done) return true;
@@ -4849,6 +4846,17 @@ void parseInline();
return false;
}
+ inline bool jj_3R_638()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_scan_token(46)) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(80)) return true;
+ return false;
+ }
+
inline bool jj_3R_636()
{
if (jj_done) return true;
@@ -4875,29 +4883,29 @@ void parseInline();
return false;
}
- inline bool jj_3_101()
+ inline bool jj_3_19()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_77()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ if (jj_scan_token(PROCESS_T)) return true;
return false;
}
- inline bool jj_3R_675()
+ inline bool jj_3_101()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3_19()
+ inline bool jj_3R_675()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_77()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_scan_token(PROCESS_T)) return true;
+ if (jj_3R_398()) return true;
return false;
}
@@ -4989,24 +4997,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_667()
+ inline bool jj_3_17()
{
if (jj_done) return true;
- if (jj_3R_388()) return true;
+ if (jj_3R_75()) return true;
return false;
}
- inline bool jj_3R_666()
+ inline bool jj_3R_667()
{
if (jj_done) return true;
- if (jj_3R_540()) return true;
+ if (jj_3R_388()) return true;
return false;
}
- inline bool jj_3_17()
+ inline bool jj_3R_666()
{
if (jj_done) return true;
- if (jj_3R_75()) return true;
+ if (jj_3R_540()) return true;
return false;
}
@@ -5072,43 +5080,43 @@ void parseInline();
return false;
}
- inline bool jj_3_100()
+ inline bool jj_3R_175()
{
if (jj_done) return true;
- if (jj_3R_135()) return true;
+ if (jj_3R_75()) return true;
return false;
}
- inline bool jj_3R_365()
+ inline bool jj_3_16()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_452()) return false;
- jj_scanpos = xsp;
- if (jj_scan_token(137)) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_452()
+ inline bool jj_3_100()
{
if (jj_done) return true;
- if (jj_3R_540()) return true;
+ if (jj_3R_135()) return true;
return false;
}
- inline bool jj_3R_175()
+ inline bool jj_3R_365()
{
if (jj_done) return true;
- if (jj_3R_75()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_452()) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(137)) return true;
return false;
}
- inline bool jj_3_16()
+ inline bool jj_3R_452()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_540()) return true;
return false;
}
@@ -5135,14 +5143,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_209()
- {
- if (jj_done) return true;
- if (jj_3R_364()) return true;
- if (jj_3R_365()) return true;
- return false;
- }
-
inline bool jj_3R_82()
{
if (jj_done) return true;
@@ -5156,10 +5156,11 @@ void parseInline();
return false;
}
- inline bool jj_3R_585()
+ inline bool jj_3R_209()
{
if (jj_done) return true;
- if (jj_3R_638()) return true;
+ if (jj_3R_364()) return true;
+ if (jj_3R_365()) return true;
return false;
}
@@ -5178,6 +5179,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_585()
+ {
+ if (jj_done) return true;
+ if (jj_3R_638()) return true;
+ return false;
+ }
+
inline bool jj_3R_208()
{
if (jj_done) return true;
@@ -5249,32 +5257,32 @@ void parseInline();
return false;
}
- inline bool jj_3R_478()
+ inline bool jj_3R_178()
{
if (jj_done) return true;
- if (jj_3R_548()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_178()
+ inline bool jj_3R_478()
{
if (jj_done) return true;
- if (jj_3R_73()) return true;
+ if (jj_3R_548()) return true;
return false;
}
- inline bool jj_3R_164()
+ inline bool jj_3R_487()
{
if (jj_done) return true;
- if (jj_3R_133()) return true;
- if (jj_3R_134()) return true;
+ if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3R_487()
+ inline bool jj_3R_164()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_133()) return true;
+ if (jj_3R_134()) return true;
return false;
}
@@ -5304,13 +5312,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_373()
- {
- if (jj_done) return true;
- if (jj_scan_token(STRINGLITERAL)) return true;
- return false;
- }
-
inline bool jj_3R_81()
{
if (jj_done) return true;
@@ -5326,11 +5327,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_453()
+ inline bool jj_3R_373()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_63()) return true;
+ if (jj_scan_token(STRINGLITERAL)) return true;
return false;
}
@@ -5348,25 +5348,26 @@ void parseInline();
return false;
}
- inline bool jj_3R_183()
+ inline bool jj_3R_453()
{
if (jj_done) return true;
- if (jj_3R_345()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_63()) return true;
return false;
}
- inline bool jj_3R_182()
+ inline bool jj_3R_183()
{
if (jj_done) return true;
- if (jj_3R_344()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_345()) return true;
return false;
}
- inline bool jj_3R_163()
+ inline bool jj_3R_182()
{
if (jj_done) return true;
- if (jj_3R_328()) return true;
+ if (jj_3R_344()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -5378,17 +5379,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_70()
+ inline bool jj_3R_163()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_163()) jj_scanpos = xsp;
- if (jj_3R_134()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_164()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_328()) return true;
return false;
}
@@ -5412,19 +5406,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_375()
- {
- if (jj_done) return true;
- if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
- inline bool jj_3R_646()
+ inline bool jj_3R_70()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_63()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_163()) jj_scanpos = xsp;
+ if (jj_3R_134()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_164()) { jj_scanpos = xsp; break; }
+ }
return false;
}
@@ -5444,6 +5436,22 @@ void parseInline();
return false;
}
+ inline bool jj_3R_375()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(RETURN_T)) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_646()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
inline bool jj_3R_374()
{
if (jj_done) return true;
@@ -5456,6 +5464,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_12()
+ {
+ if (jj_done) return true;
+ if (jj_3R_72()) return true;
+ return false;
+ }
+
inline bool jj_3R_245()
{
if (jj_done) return true;
@@ -5469,10 +5484,15 @@ void parseInline();
return false;
}
- inline bool jj_3_12()
+ inline bool jj_3R_90()
{
if (jj_done) return true;
- if (jj_3R_72()) return true;
+ if (jj_3R_194()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_195()) { jj_scanpos = xsp; break; }
+ }
return false;
}
@@ -5483,15 +5503,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_90()
+ inline bool jj_3_11()
{
if (jj_done) return true;
- if (jj_3R_194()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_195()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_70()) return true;
return false;
}
@@ -5502,10 +5517,10 @@ void parseInline();
return false;
}
- inline bool jj_3_11()
+ inline bool jj_3R_354()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ if (jj_scan_token(OTHER_T)) return true;
return false;
}
@@ -5534,32 +5549,32 @@ void parseInline();
return false;
}
- inline bool jj_3R_354()
+ inline bool jj_3_10()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ if (jj_3R_70()) return true;
+ if (jj_3R_71()) return true;
return false;
}
- inline bool jj_3R_590()
+ inline bool jj_3R_353()
{
if (jj_done) return true;
- if (jj_scan_token(BUS_T)) return true;
+ if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3_10()
+ inline bool jj_3R_590()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
- if (jj_3R_71()) return true;
+ if (jj_scan_token(BUS_T)) return true;
return false;
}
- inline bool jj_3R_353()
+ inline bool jj_3R_352()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_72()) return true;
return false;
}
@@ -5581,13 +5596,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_352()
- {
- if (jj_done) return true;
- if (jj_3R_72()) return true;
- return false;
- }
-
inline bool jj_3R_351()
{
if (jj_done) return true;
@@ -5626,6 +5634,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_369()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(CHARACTER_LITERAL)) return true;
+ return false;
+ }
+
inline bool jj_3R_390()
{
if (jj_done) return true;
@@ -5642,13 +5657,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_369()
- {
- if (jj_done) return true;
- if (jj_scan_token(CHARACTER_LITERAL)) return true;
- return false;
- }
-
inline bool jj_3_98()
{
if (jj_done) return true;
@@ -5656,13 +5664,6 @@ void parseInline();
return false;
}
- inline bool jj_3_97()
- {
- if (jj_done) return true;
- if (jj_3R_131()) return true;
- return false;
- }
-
inline bool jj_3R_632()
{
if (jj_done) return true;
@@ -5673,10 +5674,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_541()
+ inline bool jj_3_97()
{
if (jj_done) return true;
- if (jj_3R_420()) return true;
+ if (jj_3R_131()) return true;
return false;
}
@@ -5687,6 +5688,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_541()
+ {
+ if (jj_done) return true;
+ if (jj_3R_420()) return true;
+ return false;
+ }
+
inline bool jj_3_96()
{
if (jj_done) return true;
@@ -5752,24 +5760,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_328()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_416()) return false;
- jj_scanpos = xsp;
- if (jj_3R_417()) return true;
- return false;
- }
-
- inline bool jj_3R_416()
- {
- if (jj_done) return true;
- if (jj_scan_token(PLUS_T)) return true;
- return false;
- }
-
inline bool jj_3R_265()
{
if (jj_done) return true;
@@ -5781,17 +5771,21 @@ void parseInline();
return false;
}
- inline bool jj_3R_567()
+ inline bool jj_3R_328()
{
if (jj_done) return true;
- if (jj_scan_token(ROR_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_416()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_417()) return true;
return false;
}
- inline bool jj_3R_566()
+ inline bool jj_3R_416()
{
if (jj_done) return true;
- if (jj_scan_token(ROL_T)) return true;
+ if (jj_scan_token(PLUS_T)) return true;
return false;
}
@@ -5817,6 +5811,20 @@ void parseInline();
return false;
}
+ inline bool jj_3R_567()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ROR_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_566()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ROL_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_565()
{
if (jj_done) return true;
@@ -5864,22 +5872,22 @@ void parseInline();
return false;
}
- inline bool jj_3R_318()
+ inline bool jj_3R_522()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_402()) jj_scanpos = xsp;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_577()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_522()
+ inline bool jj_3R_318()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_577()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_70()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_402()) jj_scanpos = xsp;
return false;
}
@@ -5983,28 +5991,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_253()
- {
- if (jj_done) return true;
- if (jj_3R_378()) return true;
- return false;
- }
-
- inline bool jj_3_84()
+ inline bool jj_3R_311()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_118()) jj_scanpos = xsp;
- if (jj_3R_119()) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_3R_398()) return true;
return false;
}
- inline bool jj_3R_311()
+ inline bool jj_3R_253()
{
if (jj_done) return true;
- if (jj_3R_398()) return true;
+ if (jj_3R_378()) return true;
return false;
}
@@ -6015,17 +6012,21 @@ void parseInline();
return false;
}
- inline bool jj_3_87()
+ inline bool jj_3_84()
{
if (jj_done) return true;
- if (jj_3R_122()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_118()) jj_scanpos = xsp;
+ if (jj_3R_119()) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
return false;
}
- inline bool jj_3_86()
+ inline bool jj_3_87()
{
if (jj_done) return true;
- if (jj_3R_121()) return true;
+ if (jj_3R_122()) return true;
return false;
}
@@ -6050,6 +6051,13 @@ void parseInline();
return false;
}
+ inline bool jj_3_86()
+ {
+ if (jj_done) return true;
+ if (jj_3R_121()) return true;
+ return false;
+ }
+
inline bool jj_3R_308()
{
if (jj_done) return true;
@@ -6081,6 +6089,27 @@ void parseInline();
return false;
}
+ inline bool jj_3R_305()
+ {
+ if (jj_done) return true;
+ if (jj_3R_394()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_306()
+ {
+ if (jj_done) return true;
+ if (jj_3R_67()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_304()
+ {
+ if (jj_done) return true;
+ if (jj_3R_393()) return true;
+ return false;
+ }
+
inline bool jj_3R_117()
{
if (jj_done) return true;
@@ -6121,24 +6150,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_305()
- {
- if (jj_done) return true;
- if (jj_3R_394()) return true;
- return false;
- }
-
- inline bool jj_3R_306()
+ inline bool jj_3R_303()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_392()) return true;
return false;
}
- inline bool jj_3R_304()
+ inline bool jj_3R_302()
{
if (jj_done) return true;
- if (jj_3R_393()) return true;
+ if (jj_3R_391()) return true;
return false;
}
@@ -6150,20 +6172,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_303()
- {
- if (jj_done) return true;
- if (jj_3R_392()) return true;
- return false;
- }
-
- inline bool jj_3R_302()
- {
- if (jj_done) return true;
- if (jj_3R_391()) return true;
- return false;
- }
-
inline bool jj_3R_301()
{
if (jj_done) return true;
@@ -6178,13 +6186,6 @@ void parseInline();
return false;
}
- inline bool jj_3_83()
- {
- if (jj_done) return true;
- if (jj_3R_117()) return true;
- return false;
- }
-
inline bool jj_3R_299()
{
if (jj_done) return true;
@@ -6213,14 +6214,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_268()
+ inline bool jj_3_83()
{
if (jj_done) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3_83()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_117()) return true;
return false;
}
@@ -6270,36 +6267,17 @@ void parseInline();
return false;
}
- inline bool jj_3R_440()
+ inline bool jj_3R_268()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_524()) { jj_scanpos = xsp; break; }
+ if (jj_3_83()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_357()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_439()) return false;
- jj_scanpos = xsp;
- if (jj_3R_440()) return true;
- return false;
- }
-
- inline bool jj_3R_439()
- {
- if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
- return false;
- }
-
inline bool jj_3R_345()
{
if (jj_done) return true;
@@ -6320,6 +6298,18 @@ void parseInline();
return false;
}
+ inline bool jj_3R_440()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_524()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
inline bool jj_3R_250()
{
if (jj_done) return true;
@@ -6329,6 +6319,24 @@ void parseInline();
return false;
}
+ inline bool jj_3R_357()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_439()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_440()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_439()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ALL_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_276()
{
if (jj_done) return true;
@@ -6387,6 +6395,19 @@ void parseInline();
return false;
}
+ inline bool jj_3R_344()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_428()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_429()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_430()) jj_scanpos = xsp;
+ return false;
+ }
+
inline bool jj_3R_337()
{
if (jj_done) return true;
@@ -6408,19 +6429,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_344()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_428()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_429()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_430()) jj_scanpos = xsp;
- return false;
- }
-
inline bool jj_3R_249()
{
if (jj_done) return true;
@@ -6540,14 +6548,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_258()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
inline bool jj_3R_115()
{
if (jj_done) return true;
@@ -6563,6 +6563,14 @@ void parseInline();
return false;
}
+ inline bool jj_3R_258()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_319()
{
if (jj_done) return true;
@@ -6592,13 +6600,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_506()
- {
- if (jj_done) return true;
- if (jj_scan_token(QNEQU_T)) return true;
- return false;
- }
-
inline bool jj_3R_230()
{
if (jj_done) return true;
@@ -6617,6 +6618,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_506()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(QNEQU_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_505()
{
if (jj_done) return true;
@@ -6680,20 +6688,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_497()
- {
- if (jj_done) return true;
- if (jj_scan_token(EQU_T)) return true;
- return false;
- }
-
- inline bool jj_3R_496()
- {
- if (jj_done) return true;
- if (jj_scan_token(GT_T)) return true;
- return false;
- }
-
inline bool jj_3_6()
{
if (jj_done) return true;
@@ -6713,6 +6707,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_497()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(EQU_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_355()
{
if (jj_done) return true;
@@ -6721,6 +6722,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_496()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(GT_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_403()
{
if (jj_done) return true;
@@ -6759,16 +6767,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_151()
- {
- if (jj_done) return true;
- if (jj_3R_318()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_319()) jj_scanpos = xsp;
- return false;
- }
-
inline bool jj_3R_169()
{
if (jj_done) return true;
@@ -6781,6 +6779,16 @@ void parseInline();
return false;
}
+ inline bool jj_3R_151()
+ {
+ if (jj_done) return true;
+ if (jj_3R_318()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_319()) jj_scanpos = xsp;
+ return false;
+ }
+
inline bool jj_3R_697()
{
if (jj_done) return true;
@@ -6831,6 +6839,17 @@ void parseInline();
return false;
}
+ inline bool jj_3R_120()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_257()) jj_scanpos = xsp;
+ if (jj_3R_196()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
inline bool jj_3_80()
{
if (jj_done) return true;
@@ -6847,22 +6866,24 @@ void parseInline();
return false;
}
- inline bool jj_3R_120()
+ inline bool jj_3R_86()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_257()) jj_scanpos = xsp;
- if (jj_3R_196()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(RANGE_T)) return true;
+ if (jj_3R_88()) return true;
return false;
}
- inline bool jj_3R_86()
+ inline bool jj_3R_196()
{
if (jj_done) return true;
- if (jj_scan_token(RANGE_T)) return true;
- if (jj_3R_88()) return true;
+ if (jj_scan_token(ASSERT_T)) return true;
+ if (jj_3R_83()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_355()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_356()) jj_scanpos = xsp;
return false;
}
@@ -6873,23 +6894,19 @@ void parseInline();
return false;
}
- inline bool jj_3R_191()
+ inline bool jj_3_5()
{
if (jj_done) return true;
- if (jj_3R_115()) return true;
+ if (jj_scan_token(ARRAY_T)) return true;
+ if (jj_3R_65()) return true;
+ if (jj_scan_token(OF_T)) return true;
return false;
}
- inline bool jj_3R_196()
+ inline bool jj_3R_191()
{
if (jj_done) return true;
- if (jj_scan_token(ASSERT_T)) return true;
- if (jj_3R_83()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_355()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_356()) jj_scanpos = xsp;
+ if (jj_3R_115()) return true;
return false;
}
@@ -6913,12 +6930,10 @@ void parseInline();
return false;
}
- inline bool jj_3_5()
+ inline bool jj_3R_696()
{
if (jj_done) return true;
- if (jj_scan_token(ARRAY_T)) return true;
- if (jj_3R_65()) return true;
- if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_704()) return true;
return false;
}
@@ -6931,13 +6946,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_696()
- {
- if (jj_done) return true;
- if (jj_3R_704()) return true;
- return false;
- }
-
inline bool jj_3R_237()
{
if (jj_done) return true;
@@ -7016,20 +7024,20 @@ void parseInline();
return false;
}
- inline bool jj_3R_198()
+ inline bool jj_3R_244()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_357()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_89()) return true;
return false;
}
- inline bool jj_3R_244()
+ inline bool jj_3R_198()
{
if (jj_done) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_357()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
@@ -7052,6 +7060,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_552()
+ {
+ if (jj_done) return true;
+ if (jj_3R_321()) return true;
+ return false;
+ }
+
inline bool jj_3R_197()
{
if (jj_done) return true;
@@ -7060,10 +7075,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_552()
+ inline bool jj_3R_551()
{
if (jj_done) return true;
- if (jj_3R_321()) return true;
+ if (jj_scan_token(CHARACTER_LITERAL)) return true;
return false;
}
@@ -7093,20 +7108,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_551()
- {
- if (jj_done) return true;
- if (jj_scan_token(CHARACTER_LITERAL)) return true;
- return false;
- }
-
- inline bool jj_3R_358()
- {
- if (jj_done) return true;
- if (jj_3R_441()) return true;
- return false;
- }
-
inline bool jj_3R_550()
{
if (jj_done) return true;
@@ -7127,6 +7128,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_358()
+ {
+ if (jj_done) return true;
+ if (jj_3R_441()) return true;
+ return false;
+ }
+
inline bool jj_3R_199()
{
if (jj_done) return true;
@@ -7152,32 +7160,25 @@ void parseInline();
return false;
}
- inline bool jj_3_78()
- {
- if (jj_done) return true;
- if (jj_3R_68()) return true;
- return false;
- }
-
- inline bool jj_3R_532()
+ inline bool jj_3R_483()
{
if (jj_done) return true;
- if (jj_3R_395()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_89()) return true;
return false;
}
- inline bool jj_3R_483()
+ inline bool jj_3_78()
{
if (jj_done) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_68()) return true;
return false;
}
- inline bool jj_3R_531()
+ inline bool jj_3R_532()
{
if (jj_done) return true;
- if (jj_3R_393()) return true;
+ if (jj_3R_395()) return true;
return false;
}
@@ -7197,6 +7198,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_531()
+ {
+ if (jj_done) return true;
+ if (jj_3R_393()) return true;
+ return false;
+ }
+
inline bool jj_3_77()
{
if (jj_done) return true;
@@ -7218,31 +7226,31 @@ void parseInline();
return false;
}
- inline bool jj_3R_528()
+ inline bool jj_3R_114()
{
if (jj_done) return true;
- if (jj_3R_389()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_247()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_248()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_527()
+ inline bool jj_3R_528()
{
if (jj_done) return true;
- if (jj_3R_388()) return true;
+ if (jj_3R_389()) return true;
return false;
}
- inline bool jj_3R_114()
+ inline bool jj_3R_527()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_247()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_248()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_388()) return true;
return false;
}
@@ -7267,6 +7275,14 @@ void parseInline();
return false;
}
+ inline bool jj_3_3()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_525()
{
if (jj_done) return true;
@@ -7274,6 +7290,26 @@ void parseInline();
return false;
}
+ inline bool jj_3R_133()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_281()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_282()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_283()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_281()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(PLUS_T)) return true;
+ return false;
+ }
+
inline bool jj_3R_441()
{
if (jj_done) return true;
@@ -7305,14 +7341,6 @@ void parseInline();
return false;
}
- inline bool jj_3_3()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- return false;
- }
-
inline bool jj_3R_342()
{
if (jj_done) return true;
@@ -7322,26 +7350,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_133()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (!jj_3R_281()) return false;
- jj_scanpos = xsp;
- if (!jj_3R_282()) return false;
- jj_scanpos = xsp;
- if (jj_3R_283()) return true;
- return false;
- }
-
- inline bool jj_3R_281()
- {
- if (jj_done) return true;
- if (jj_scan_token(PLUS_T)) return true;
- return false;
- }
-
inline bool jj_3_2()
{
if (jj_done) return true;
@@ -7429,31 +7437,31 @@ void parseInline();
return false;
}
- inline bool jj_3R_213()
+ inline bool jj_3R_236()
{
if (jj_done) return true;
- if (jj_3R_368()) return true;
+ if (jj_3R_169()) return true;
return false;
}
- inline bool jj_3R_236()
+ inline bool jj_3R_213()
{
if (jj_done) return true;
- if (jj_3R_169()) return true;
+ if (jj_3R_368()) return true;
return false;
}
- inline bool jj_3_75()
+ inline bool jj_3_1()
{
if (jj_done) return true;
- if (jj_3R_95()) return true;
+ if (jj_3R_61()) return true;
return false;
}
- inline bool jj_3_1()
+ inline bool jj_3_75()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_95()) return true;
return false;
}
@@ -7471,6 +7479,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_155()
+ {
+ if (jj_done) return true;
+ if (jj_3R_74()) return true;
+ return false;
+ }
+
inline bool jj_3_73()
{
if (jj_done) return true;
@@ -7504,13 +7519,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_155()
- {
- if (jj_done) return true;
- if (jj_3R_74()) return true;
- return false;
- }
-
inline bool jj_3_72()
{
if (jj_done) return true;
@@ -7518,13 +7526,6 @@ void parseInline();
return false;
}
- inline bool jj_3_71()
- {
- if (jj_done) return true;
- if (jj_3R_112()) return true;
- return false;
- }
-
inline bool jj_3R_154()
{
if (jj_done) return true;
@@ -7532,10 +7533,10 @@ void parseInline();
return false;
}
- inline bool jj_3R_475()
+ inline bool jj_3_71()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
+ if (jj_3R_112()) return true;
return false;
}
@@ -7559,6 +7560,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_475()
+ {
+ if (jj_done) return true;
+ if (jj_3R_114()) return true;
+ return false;
+ }
+
inline bool jj_3_70()
{
if (jj_done) return true;
@@ -7573,25 +7581,25 @@ void parseInline();
return false;
}
- inline bool jj_3_69()
+ inline bool jj_3R_658()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_scan_token(ACCESS_T)) return true;
+ if (jj_3R_89()) return true;
return false;
}
- inline bool jj_3R_473()
+ inline bool jj_3_69()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
+ if (jj_3R_64()) return true;
return false;
}
- inline bool jj_3R_658()
+ inline bool jj_3R_473()
{
if (jj_done) return true;
- if (jj_scan_token(ACCESS_T)) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_63()) return true;
return false;
}
@@ -7611,38 +7619,31 @@ void parseInline();
return false;
}
- inline bool jj_3R_702()
- {
- if (jj_done) return true;
- if (jj_3R_63()) return true;
- return false;
- }
-
- inline bool jj_3_67()
+ inline bool jj_3R_235()
{
if (jj_done) return true;
- if (jj_3R_110()) return true;
+ if (jj_scan_token(BASED_LITERAL)) return true;
return false;
}
- inline bool jj_3R_235()
+ inline bool jj_3R_702()
{
if (jj_done) return true;
- if (jj_scan_token(BASED_LITERAL)) return true;
+ if (jj_3R_63()) return true;
return false;
}
- inline bool jj_3R_471()
+ inline bool jj_3R_234()
{
if (jj_done) return true;
- if (jj_3R_111()) return true;
+ if (jj_scan_token(INTEGER)) return true;
return false;
}
- inline bool jj_3R_234()
+ inline bool jj_3_67()
{
if (jj_done) return true;
- if (jj_scan_token(INTEGER)) return true;
+ if (jj_3R_110()) return true;
return false;
}
@@ -7666,6 +7667,13 @@ void parseInline();
return false;
}
+ inline bool jj_3R_471()
+ {
+ if (jj_done) return true;
+ if (jj_3R_111()) return true;
+ return false;
+ }
+
inline bool jj_3R_470()
{
if (jj_done) return true;
@@ -8514,14 +8522,6 @@ void parseInline();
return false;
}
- inline bool jj_3R_207()
- {
- if (jj_done) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_61()) return true;
- return false;
- }
-
public:
void setErrorHandler(ErrorHandler *eh) {
diff --git a/vhdlparser/VhdlParserTokenManager.cc b/vhdlparser/VhdlParserTokenManager.cc
index 341469f..3b7b396 100644
--- a/vhdlparser/VhdlParserTokenManager.cc
+++ b/vhdlparser/VhdlParserTokenManager.cc
@@ -3503,7 +3503,7 @@ void VhdlParserTokenManager::SkipLexicalActions(Token *matchedToken){
if (count == 1)
parser->outlineParser()->oneLineComment(doc);
else
- parser->outlineParser()->handleCommentBlock(image.data(),FALSE); ;
+ parser->outlineParser()->handleCommentBlock(QCString(image),FALSE); ;
}
break;
}
@@ -3521,7 +3521,7 @@ void VhdlParserTokenManager::SkipLexicalActions(Token *matchedToken){
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
{
QCString q = filter2008VhdlComment(image.data());
- parser->outlineParser()->handleCommentBlock(q.data(),TRUE);image.clear();
+ parser->outlineParser()->handleCommentBlock(QCString(q),TRUE);image.clear();
}
break;
}
diff --git a/vhdlparser/vhdl_adj.py b/vhdlparser/vhdl_adj.py
index a431970..388864a 100644
--- a/vhdlparser/vhdl_adj.py
+++ b/vhdlparser/vhdl_adj.py
@@ -18,7 +18,7 @@ def main():
inputFile = open(sys.argv[1], 'r')
outputFile = open(sys.argv[2], 'w')
for line in inputFile:
- outputFile.write(line.replace("assert(false);","assert(false);return \"\";"))
+ outputFile.write(line.replace("assert(false);","assert(false);return QCString();"))
if __name__ == '__main__':
main()
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj
index ed4500a..3ef732e 100755
--- a/vhdlparser/vhdlparser.jj
+++ b/vhdlparser/vhdlparser.jj
@@ -110,7 +110,7 @@ SKIP:
if (count == 1)
parser->outlineParser()->oneLineComment(doc);
else
- parser->outlineParser()->handleCommentBlock(image.data(),FALSE); ;
+ parser->outlineParser()->handleCommentBlock(QCString(image),FALSE); ;
}
}
@@ -128,7 +128,7 @@ SKIP :
{
{
QCString q = filter2008VhdlComment(image.data());
- parser->outlineParser()->handleCommentBlock(q.data(),TRUE);image.clear();
+ parser->outlineParser()->handleCommentBlock(QCString(q),TRUE);image.clear();
}
}
| <MULT_VHDL_2008_COMMENT : "/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
@@ -337,22 +337,22 @@ TOKEN:
QCString abstract_literal() :
{Token *tok;}
{
- tok=<DECIMAL_LITERAL> { return tok->image.c_str(); }
- | tok=<INTEGER> { return tok->image.c_str(); }
- | tok=<BASED_LITERAL> { return tok->image.c_str(); }
+ tok=<DECIMAL_LITERAL> { return QCString(tok->image); }
+ | tok=<INTEGER> { return QCString(tok->image); }
+ | tok=<BASED_LITERAL> { return QCString(tok->image); }
}
QCString access_type_definition() :
{Token *tok=0;QCString str,str1;}
{
- tok=<ACCESS_T> str1=subtype_indication() { str=tok->image.c_str(); return str+str1; }
+ tok=<ACCESS_T> str1=subtype_indication() { str=tok->image; return str+str1; }
}
QCString actual_designator() :
{QCString str;Token *t=0;}
{
-t=<OPEN_T> { return t->image.c_str(); }
+t=<OPEN_T> { return QCString(t->image); }
|
LOOKAHEAD(expression())
str=expression() { return str; }
@@ -392,7 +392,7 @@ QCString adding_operator () :
QCString aggregate() : {QCString s,s1,s2;}
{
- <LPAREN_T> s=element_association() (<COMMA_T> s1=element_association(){s+=","+s1;})* <RPAREN_T> { return "("+s+")";}
+ <LPAREN_T> s=element_association() (<COMMA_T> s1=element_association(){s+=","+s1;})* <RPAREN_T> { return QCString("("+s+")");}
}
QCString alias_declaration() : {QCString s,s1,s2;}
@@ -411,7 +411,7 @@ QCString alias_declaration() : {QCString s,s1,s2;}
QCString alias_designator() : {Token *tok=0;QCString s;}
{
s=identifier() { return s;}
- | tok=<CHARACTER_LITERAL> { return tok->image.c_str(); }
+ | tok=<CHARACTER_LITERAL> { return QCString(tok->image); }
| s=operator_symbol() { return s; }
}
@@ -431,7 +431,7 @@ void architecture_body() : {QCString s,s1;}
m_sharedState->genLabels.resize(0);
outlineParser()->pushLabel(m_sharedState->genLabels,s1);
m_sharedState->lastCompound=m_sharedState->current;
- outlineParser()->addVhdlType(t,outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
+ outlineParser()->addVhdlType(t.data(),outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
}
try
{
@@ -511,7 +511,7 @@ QCString attribute_declaration() : {QCString s,s1;}
QCString attribute_designator (): {QCString s;Token *tok=0;}
{
s=identifier() { return s;}
- | tok=<RANGE_T> { return tok->image.c_str(); }
+ | tok=<RANGE_T> { return QCString(tok->image); }
}
@@ -532,12 +532,12 @@ QCString attribute_specification(): {QCString s,s1,s2;}
QCString base() : {Token *tok=0;}
{
- tok=<INTEGER> { return tok->image.c_str();}
+ tok=<INTEGER> { return QCString(tok->image);}
}
QCString base_specifier (): {Token *tok=0;}
{
- tok=<BASIC_IDENTIFIER> { return tok->image.c_str();}
+ tok=<BASIC_IDENTIFIER> { return QCString(tok->image);}
}
QCString base_unit_declaration() :
@@ -548,17 +548,17 @@ QCString base_unit_declaration() :
QCString based_integer() : {Token *tok=0;}
{
- tok=<BASIC_IDENTIFIER> { return tok->image.c_str();}
+ tok=<BASIC_IDENTIFIER> { return QCString(tok->image);}
}
QCString based_literal(): {Token *tok=0;}
{
- tok=<BASED_LITERAL> { return tok->image.c_str();}
+ tok=<BASED_LITERAL> { return QCString(tok->image);}
}
QCString basic_identifier() : {Token *tok=0;}
{
- tok=<BASIC_IDENTIFIER> { return tok->image.c_str();}
+ tok=<BASIC_IDENTIFIER> { return QCString(tok->image);}
}
void binding_indication() : {}
@@ -570,13 +570,13 @@ void binding_indication() : {}
QCString bit_string_literal (): {Token *tok=0;}
{
- tok=<BIT_STRING_LITERAL> { return tok->image.c_str();}
+ tok=<BIT_STRING_LITERAL> { return QCString(tok->image);}
}
QCString bit_value() : {Token *tok=0;}
{
- tok=<BASIC_IDENTIFIER> { return tok->image.c_str();}
+ tok=<BASIC_IDENTIFIER> { return QCString(tok->image);}
}
void block_configuration() : {}
@@ -653,7 +653,7 @@ void case_statement() : {QCString s;}
<CASE_T> s=expression()
{
QCString ca="case "+s;
- FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca);
+ FlowChart::addFlowChart(FlowChart::CASE_NO,QCString(),ca);
}
<IS_T>
case_statement_alternative()
@@ -661,7 +661,7 @@ void case_statement() : {QCString s;}
<END_T> <CASE_T> [ identifier() ] <SEMI_T>
{
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0);
+ FlowChart::addFlowChart(FlowChart::END_CASE,"end case",QCString());
}
}
@@ -669,16 +669,16 @@ void case_statement_alternative() : {QCString s;}
{
<WHEN_T> s=choices() <ARROW_T>
{
- QCString t="when ";
+ QCString t("when ");
t+=s+"=> ";
- FlowChart::addFlowChart(FlowChart::WHEN_NO,s.data(),t);
+ FlowChart::addFlowChart(FlowChart::WHEN_NO,s,t);
}
sequence_of_statement(){FlowChart::moveToPrevLevel(); }
}
QCString character_literal() : {Token *tok=0;}
{
- tok=<CHARACTER_LITERAL>{ return tok->image.c_str();}
+ tok=<CHARACTER_LITERAL>{ return QCString(tok->image);}
}
QCString choice() : {QCString s;}
@@ -731,8 +731,8 @@ void component_instantiation_statement() : {QCString s,s1;}
{
QCString s3;
if (s1.contains("|")) {
- s3=VhdlDocGen::getIndexWord(s1.data(),0);
- s1=VhdlDocGen::getIndexWord(s1.data(),1);
+ s3=VhdlDocGen::getIndexWord(s1,0);
+ s1=VhdlDocGen::getIndexWord(s1,1);
}
outlineParser()->addCompInst(s.lower().data(),s1.lower().data(),s3.data(),outlineParser()->getLine());
@@ -914,7 +914,7 @@ void context_item() : {}
QCString decimal_literal() : {Token *tok=0;}
{
- tok=<DECIMAL_LITERAL> { return tok->image.c_str(); }
+ tok=<DECIMAL_LITERAL> { return QCString(tok->image); }
}
@@ -944,8 +944,8 @@ QCString designator() : {QCString s;}
QCString direction (): {Token *tok=0;}
{
-tok=<TO_T> { return tok->image.c_str();}
-| tok=<DOWNTO_T> { return tok->image.c_str();}
+tok=<TO_T> { return QCString(tok->image);}
+| tok=<DOWNTO_T> { return QCString(tok->image);}
}
void disconnection_specification() : {}
@@ -1002,8 +1002,8 @@ QCString element_declaration() : {QCString rec_name,s1,s2;}
QCString entity_aspect() : {Token *tok=0;QCString s,s1;}
{
tok=<ENTITY_T> s=name() [ LOOKAHEAD(1)<LPAREN_T> s1=identifier() <RPAREN_T> {s+="("+s1+")";} ] { return s;}
-| tok=<CONFIGURATION_T> s=name() { return tok->image.c_str()+s;}
-| tok=<OPEN_T> { return tok->image.c_str(); }
+| tok=<CONFIGURATION_T> s=name() { return QCString(tok->image)+s;}
+| tok=<OPEN_T> { return QCString(tok->image); }
}
QCString entity_class() : {}
@@ -1156,7 +1156,7 @@ QCString exit_statement() : {QCString s,s1,s2;Token *t=0;Token *t1=0;}
m_sharedState->lab.resize(0);
if(t) s+=":";
if(t1) s2.prepend(" when ");
- FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2.data(),s1.data());
+ FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2,s1);
return s+s1+s2+";";
}
@@ -1180,7 +1180,7 @@ QCString logop() : {}
QCString extended_identifier (): {Token *t;}
{
- t=<EXTENDED_CHARACTER> { return t->image.c_str(); }
+ t=<EXTENDED_CHARACTER> { return QCString(t->image); }
}
QCString factor(): {QCString s,s1;}
@@ -1226,7 +1226,7 @@ QCString floating_type_definition() : {QCString s;}
QCString formal_designator() : {QCString s;Token *tok=0;}
{
s=name() { return s; }
- |tok=<INTEGER> { return tok->image.c_str();}
+ |tok=<INTEGER> { return QCString(tok->image);}
}
@@ -1344,8 +1344,8 @@ void guarded_signal_specification() : {}
QCString identifier() : {Token *tok=0;}
{
- tok=<EXTENDED_CHARACTER>{ return tok->image.c_str(); }
- |tok=<BASIC_IDENTIFIER> { return tok->image.c_str(); }
+ tok=<EXTENDED_CHARACTER>{ return QCString(tok->image); }
+ |tok=<BASIC_IDENTIFIER> { return QCString(tok->image); }
}
QCString identifier_list() : {QCString str,str1;}
@@ -1359,25 +1359,25 @@ void if_statement() : {QCString s,s1;}
<IF_T> s=condition() <THEN_T>
{
s.prepend("if ");
- FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
+ FlowChart::addFlowChart(FlowChart::IF_NO,QCString(),s);
}
sequence_of_statement()
(
<ELSIF_T> s1=condition() <THEN_T>
{
s1.prepend("elsif ");
- FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
+ FlowChart::addFlowChart(FlowChart::ELSIF_NO,QCString(),s1);
}
sequence_of_statement()
)*
[LOOKAHEAD(1) <ELSE_T>
{
- FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
+ FlowChart::addFlowChart(FlowChart::ELSE_NO,QCString(),QCString());
}
sequence_of_statement() ] <END_T> <IF_T> [ identifier() ] <SEMI_T>
{
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
+ FlowChart::addFlowChart(FlowChart::ENDIF_NO,QCString(),QCString());
}
}
@@ -1389,11 +1389,9 @@ QCString incomplete_type_declaration() : {QCString s;}
}
}
-QCString index_constraint() : {QCString s="("; QCString s1,s2;}
+QCString index_constraint() : {QCString s("("); QCString s1,s2;}
{
- //try{
<LPAREN_T> s2=discrete_range(){s+=s2;}(LOOKAHEAD(1)<COMMA_T> s1=discrete_range(){s+=",";s+=s1;})* <RPAREN_T> {return s+")";}
-//}catch(...){ outlineParser()->error_skipto(SEMI_T);hasError=false;return "";}
}
QCString index_specification() : {QCString s;}
@@ -1418,13 +1416,13 @@ QCString instantiation_unit() : {QCString s,s1,s2;}
QCString instantiation_list() : {QCString s;Token *tok=0;}
{
s=identifier_list() { return s;}
-| tok=<OTHER_T> {return tok->image.c_str();}
-| tok=<ALL_T> {return tok->image.c_str();}
+| tok=<OTHER_T> {return QCString(tok->image);}
+| tok=<ALL_T> {return QCString(tok->image);}
}
QCString integer() : {Token *t;}
{
- t=<INTEGER> {return t->image.c_str();}
+ t=<INTEGER> {return QCString(t->image);}
}
QCString integer_type_definition() : {QCString s;}
@@ -1468,7 +1466,7 @@ QCString interface_file_declaration() : {QCString s,s1;}
<FILE_T> s=identifier_list() <COLON_T> s1=subtype_indication()
{
outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
- return " file "+s+":"+s1;
+ return QCString(" file "+s+":"+s1);
}
}
@@ -1486,7 +1484,7 @@ QCString interface_variable_declaration() : {Token *tok=0;Token *tok1=0;Token *
s2=subtype_indication() [ tok1=<BUS_T> ] [ tok2=<VARASSIGN_T> s4=expression() ]
{
if(tok)
- s5=tok->image.c_str();
+ s5=QCString(tok->image);
if(tok1)
s3=tok1->image.data();
@@ -1520,14 +1518,14 @@ QCString iteration_scheme() : {QCString s;}
<WHILE_T> s=condition()
{
s.prepend("while ");
- FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),m_sharedState->lab.data());
+ FlowChart::addFlowChart(FlowChart::WHILE_NO,QCString(),s,m_sharedState->lab);
m_sharedState->lab="";
return s;
}
| <FOR_T> s=parameter_specification()
{
QCString q=m_sharedState->lab+" for "+s;
- FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),m_sharedState->lab.data());
+ FlowChart::addFlowChart(FlowChart::FOR_NO,QCString(),q,m_sharedState->lab);
m_sharedState->lab="";
return q;
}
@@ -1588,7 +1586,7 @@ QCString loop_statement() : {QCString s,s1,s2,s3;}
[ s1=iteration_scheme() ]
{
if(s1.isEmpty())
- FlowChart::addFlowChart(FlowChart::LOOP_NO,0,"infinite");
+ FlowChart::addFlowChart(FlowChart::LOOP_NO,QCString(),"infinite");
}
<LOOP_T>
s2=sequence_of_statement()
@@ -1597,7 +1595,7 @@ QCString loop_statement() : {QCString s,s1,s2,s3;}
QCString q = s+" loop "+s2+" end loop" +s3;
QCString endLoop="end loop" + s3;
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop.data(),0);
+ FlowChart::addFlowChart(FlowChart::END_LOOP,endLoop,QCString());
return q;
}
@@ -1606,9 +1604,9 @@ QCString loop_statement() : {QCString s,s1,s2,s3;}
QCString miscellaneous_operator():{Token *t=0;}
{
- <DOUBLEMULT_T> {return "**";}
- | <ABS_T> {return "abs";}
- | <NOT_T> {return "not";}
+ <DOUBLEMULT_T> { return "**"; }
+ | <ABS_T> { return "abs"; }
+ | <NOT_T> { return "not"; }
}
QCString mode() : {Token *tok=0;}
@@ -1622,10 +1620,10 @@ tok=<IN_T> { return "in"; }
QCString multiplying_operation() : {Token *tok=0;}
{
-tok=<MULT_T> { return tok->image.c_str(); }
-| tok=<SLASH_T> { return tok->image.c_str(); }
-| tok=<MOD_T> { return tok->image.c_str(); }
-| tok=<REM_T> { return tok->image.c_str(); }
+tok=<MULT_T> { return QCString(tok->image); }
+| tok=<SLASH_T> { return QCString(tok->image); }
+| tok=<MOD_T> { return QCString(tok->image); }
+| tok=<REM_T> { return QCString(tok->image); }
}
@@ -1687,7 +1685,7 @@ QCString next_statement() : {QCString s,s1,s2;Token *t=0;Token *t1=0;}
[ t1=<WHEN_T> s2=condition() ] <SEMI_T>
{
if(t) s+=":";
- FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2.data(),s1.data());
+ FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2,s1);
m_sharedState->lab.resize(0);
if(t1) s2.prepend("when ");
return s+s1+s2+";";
@@ -1719,7 +1717,7 @@ QCString object_class() : {}
QCString operator_symbol() : {Token *tok=0;}
{
-tok=<STRINGLITERAL> {return tok->image.c_str();}
+tok=<STRINGLITERAL> {return QCString(tok->image);}
}
void options() : {}
@@ -1733,7 +1731,7 @@ void package_body() : {QCString s;}
{
m_sharedState->lastCompound=m_sharedState->current;
s.prepend("_");
- outlineParser()->addVhdlType(s,outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
}
package_body_declarative_part()
@@ -1782,7 +1780,7 @@ void package_declaration(): {QCString s;}
clone->bodyLine=outlineParser()->getLine(PACKAGE_T);
clone->protection=Package;
m_sharedState->current_root->moveToSubEntryAndKeep(clone);
- outlineParser()->addVhdlType(s,outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
}
package_header()
package_declarative_part()
@@ -1887,7 +1885,7 @@ LOOKAHEAD(name())
s=name() { return s;}
|
LOOKAHEAD(allocator())
-allocator() { return "";}
+allocator() { return QCString();}
|
s=aggregate() { return s; }
}
@@ -1924,7 +1922,7 @@ QCString procedure_call_statement() : {QCString s,s1;}
QCString process_declarative_item() : {QCString s;}
{
-subprogram_declaration() { return "";}
+subprogram_declaration() { return QCString();}
//| subprogram_body()
| s=type_declaration() { return s;}
| s=subtype_declaration() { return s;}
@@ -1962,8 +1960,8 @@ void process_statement() : {QCString s,s1,s2;Token *tok=0;Token *tok1=0;}
s2=process_declarative_part()
{
if (s2.data())
- FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2.data(),0);
- FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2,QCString());
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",QCString());
}
<BEGIN_T>
process_statement_part()
@@ -1980,8 +1978,8 @@ void process_statement() : {QCString s,s1,s2;Token *tok=0;Token *tok1=0;}
m_sharedState->current->endBodyLine=outlineParser()->getLine();
m_sharedState->currP=0;
if(tok)
- s1=tok->image.data();
- outlineParser()->createFunction(m_sharedState->currName,VhdlDocGen::PROCESS,s1.data());
+ s1=tok->image;
+ outlineParser()->createFunction(m_sharedState->currName.data(),VhdlDocGen::PROCESS,s1.data());
outlineParser()->createFlow();
m_sharedState->currName="";
outlineParser()->newEntry();
@@ -2046,7 +2044,7 @@ QCString relation_operator() : {}
|<QG_T> { return "?>";}
|<QL_T> { return "?<";}
|<QEQU_T> { return "?=";}
- |<QNEQU_T> {return "?/="; }
+ |<QNEQU_T> {return "?/="; }
}
@@ -2132,22 +2130,22 @@ QCString sequence_of_statement() : {QCString s,s1;}
QCString sequential_statement() :{QCString s;}
{
LOOKAHEAD( [ identifier() ":" ] target() "<=")
- s=signal_assignment_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=signal_assignment_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD(3)
- s=assertion_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=assertion_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD(3)
- s=report_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=report_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD(3)
- s=wait_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=wait_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD( [ identifier() ":" ] target() ":=" )
- s=variable_assignment_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=variable_assignment_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
|
LOOKAHEAD(3)
- s=procedure_call_statement(){ FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s; }
+ s=procedure_call_statement(){ FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s; }
|
LOOKAHEAD(3)
if_statement(){return s;}
@@ -2165,9 +2163,9 @@ QCString sequential_statement() :{QCString s;}
s=exit_statement(){return s;}
|
LOOKAHEAD(3)
- s=return_statement(){FlowChart::addFlowChart(FlowChart::RETURN_NO,s.data(),0);return s;}
+ s=return_statement(){FlowChart::addFlowChart(FlowChart::RETURN_NO,s,QCString());return s;}
|
- s=null_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;}
+ s=null_statement(){FlowChart::addFlowChart(FlowChart::TEXT_NO,s,QCString());return s;}
}
QCString shift_expression() : {QCString s,s1,s2;}
@@ -2194,10 +2192,10 @@ QCString signal_assignment_statement() : {QCString s,s1,s2,s3;}
{
LOOKAHEAD(conditional_signal_assignment_wave())
- conditional_signal_assignment_wave(){ return ""; }
+ conditional_signal_assignment_wave(){ return QCString(); }
|
LOOKAHEAD(selected_signal_assignment_wave())
- selected_signal_assignment_wave() { return ""; }
+ selected_signal_assignment_wave() { return QCString(); }
|
[LOOKAHEAD(2) s=identifier() <COLON_T> {s+=":";} ]
s1=target() <LESSTHAN_T>
@@ -2263,7 +2261,7 @@ QCString slice_name() : {QCString s,s1;}
QCString string_literal() : {Token *tok=0;}
{
-tok=<STRINGLITERAL> {return tok->image.c_str();}
+tok=<STRINGLITERAL> {return QCString(tok->image);}
}
void subprogram_body() : {QCString s;}
@@ -2275,9 +2273,9 @@ tok=<STRINGLITERAL> {return tok->image.c_str();}
{
if (s.data())
{
- FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,0);
+ FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,QCString());
}
- FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
+ FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",QCString());
}
// }catch(...){outlineParser()->error_skipto(BEGIN_T);}
<BEGIN_T>
@@ -2307,9 +2305,9 @@ void subprogram_1() : {}
QCString subprogram_declarative_item() : {QCString s;}
{
-subprogram_declaration(){ return "";}
+subprogram_declaration(){ return QCString();}
|s=type_declaration(){ return s;}
- | subprogram_body(){ return "";}
+ | subprogram_body(){ return QCString();}
| s=subtype_declaration(){ return s;}
| s=constant_declaration(){ return s;}
| s=variable_declaration(){ return s;}
@@ -2442,16 +2440,14 @@ s=full_type_declaration(){ return s;}
QCString type_definition() : {QCString s;}
{
-//try{
s=scalar_type_definition(){ return s;}
| s=composite_type_definition(){ return s;}
| s=access_type_definition(){ return s;}
| s=file_type_definition(){ return s;}
|
LOOKAHEAD(2)
- protected_type_body() { return ""; }
-| protected_type_declaration() { return ""; }
-//}catch(...){outlineParser()->error_skipto(SEMI_T); return "";}
+ protected_type_body() { return QCString(); }
+| protected_type_declaration() { return QCString(); }
}
QCString type_mark() : {QCString s; }
@@ -2498,7 +2494,7 @@ QCString variable_assignment_statement() : {QCString s,s1,s2;}
s1=target() <VARASSIGN_T> s2=expression() <SEMI_T>
{return s+s1+":="+s2+";";}
|
- selected_variable_assignment() { return ""; }
+ selected_variable_assignment() { return QCString(); }
}
QCString variable_declaration() : {Token *tok=0;Token *t1=0;QCString s,s1,s2;}
@@ -2567,7 +2563,7 @@ QCString protected_type_body() :{ }
protected_type_body_declarative_part()
//}catch(...){outlineParser()->error_skipto(END_T);}
- <END_T><PROTECTED_T> <BODY_T> [identifier()] {return "";}
+ <END_T><PROTECTED_T> <BODY_T> [identifier()] {return QCString();}
}
void protected_type_body_declarative_item() : { }
@@ -2603,7 +2599,7 @@ QCString protected_type_declaration() : { }
try{
protected_type_declarative_part()
}catch(...){outlineParser()->error_skipto(END_T);}
- <END_T><PROTECTED_T> [ identifier() ] { return "";}
+ <END_T><PROTECTED_T> [ identifier() ] { return QCString();}
}
@@ -2754,9 +2750,9 @@ QCString external_name(): {QCString s,s1,s2;}
QCString sig_stat(): {Token *t;}
{
- t=<CONSTANT_T> { return t->image.data(); }
- | t=<SIGNAL_T> { return t->image.data(); }
- | t=<VARIABLE_T> { return t->image.data(); }
+ t=<CONSTANT_T> { return QCString(t->image); }
+ | t=<SIGNAL_T> { return QCString(t->image); }
+ | t=<VARIABLE_T> { return QCString(t->image); }
}
@@ -2929,7 +2925,7 @@ QCString ifunc():{QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *t2=0;}
if (a>b) b=a;
outlineParser()->addVhdlType(m_sharedState->current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,ss.data(),0,Public);
}
- m_sharedState->currP=0;return "";
+ m_sharedState->currP=0;return QCString();
}
}