Commit 41d44386 authored by mk's avatar mk

update source files for dox1812

parent 83748826
...@@ -36,6 +36,21 @@ file(GENERATE OUTPUT ${GENERATED_SRC}/version.cpp ...@@ -36,6 +36,21 @@ file(GENERATE OUTPUT ${GENERATED_SRC}/version.cpp
) )
set_source_files_properties(${GENERATED_SRC}/version.cpp PROPERTIES GENERATED 1) set_source_files_properties(${GENERATED_SRC}/version.cpp PROPERTIES GENERATED 1)
# configvalues.h
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h
DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py
OUTPUT ${GENERATED_SRC}/configvalues.h
)
set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1)
# configvalues.cpp
add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maps ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.cpp
DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py
OUTPUT ${GENERATED_SRC}/configvalues.cpp
)
set_source_files_properties(${GENERATED_SRC}/configvalues.cpp PROPERTIES GENERATED 1)
# configoptions.cpp # configoptions.cpp
add_custom_command( add_custom_command(
...@@ -102,29 +117,34 @@ FLEX_TARGET(commentcnv commentcnv.l ${GENERATED_SRC}/commentcnv.cpp ...@@ -102,29 +117,34 @@ FLEX_TARGET(commentcnv commentcnv.l ${GENERATED_SRC}/commentcnv.cpp
FLEX_TARGET(commentscan commentscan.l ${GENERATED_SRC}/commentscan.cpp COMPILE_FLAGS "-PcommentscanYY") FLEX_TARGET(commentscan commentscan.l ${GENERATED_SRC}/commentscan.cpp COMPILE_FLAGS "-PcommentscanYY")
FLEX_TARGET(constexp constexp.l ${GENERATED_SRC}/constexp.cpp COMPILE_FLAGS "-PconstexpYY") FLEX_TARGET(constexp constexp.l ${GENERATED_SRC}/constexp.cpp COMPILE_FLAGS "-PconstexpYY")
FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp COMPILE_FLAGS "-PxmlcodeYY") FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp COMPILE_FLAGS "-PxmlcodeYY")
FLEX_TARGET(config config.l ${GENERATED_SRC}/config.cpp COMPILE_FLAGS "-PconfigYY") FLEX_TARGET(configimpl configimpl.l ${GENERATED_SRC}/configimpl.cpp COMPILE_FLAGS "-PconfigimplYY")
FLEX_TARGET(VPreLex VPreLex.l ${GENERATED_SRC}/VPreLex.cpp COMPILE_FLAGS "-PVPreLex") FLEX_TARGET(VPreLex VPreLex.l ${GENERATED_SRC}/VPreLex.cpp COMPILE_FLAGS "-PVPreLex")
#BISON_TARGET(vhdlparser vhdlparser.y ${GENERATED_SRC}/vhdlparser.cpp COMPILE_FLAGS "${YACC_FLAGS} -l -p vhdlscannerYY")
#BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS} -l -p constexpYY")
BISON_TARGET(vhdlparser vhdlparser.y ${GENERATED_SRC}/vhdlparser.cpp COMPILE_FLAGS "-l -p vhdlscannerYY") BISON_TARGET(vhdlparser vhdlparser.y ${GENERATED_SRC}/vhdlparser.cpp COMPILE_FLAGS "-l -p vhdlscannerYY")
BISON_TARGET(verilogparser verilogparser.y ${GENERATED_SRC}/verilogparser.cpp COMPILE_FLAGS "-l ") BISON_TARGET(verilogparser verilogparser.y ${GENERATED_SRC}/verilogparser.cpp COMPILE_FLAGS "-l ")
BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "-l -p constexpYY") BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "-l -p constexpYY")
add_library(doxycfg add_library(doxycfg STATIC
${GENERATED_SRC}/lang_cfg.h ${GENERATED_SRC}/lang_cfg.h
${GENERATED_SRC}/config.cpp ${GENERATED_SRC}/configvalues.h
${GENERATED_SRC}/configimpl.cpp
${GENERATED_SRC}/configoptions.cpp ${GENERATED_SRC}/configoptions.cpp
${GENERATED_SRC}/configvalues.cpp
portable.cpp portable.cpp
portable_c.c portable_c.c
) )
add_library(_doxygen add_library(_doxygen STATIC
# custom generated files # custom generated files
${GENERATED_SRC}/lang_cfg.h ${GENERATED_SRC}/lang_cfg.h
${GENERATED_SRC}/settings.h ${GENERATED_SRC}/settings.h
${GENERATED_SRC}/layout_default.xml.h ${GENERATED_SRC}/layout_default.xml.h
${GENERATED_SRC}/version.cpp ${GENERATED_SRC}/version.cpp
${GENERATED_SRC}/ce_parse.h ${GENERATED_SRC}/ce_parse.h
${GENERATED_SRC}/configvalues.h
${GENERATED_SRC}/resources.cpp ${GENERATED_SRC}/resources.cpp
# generated by flex/bison # generated by flex/bison
${GENERATED_SRC}/scanner.cpp ${GENERATED_SRC}/scanner.cpp
......
...@@ -122,9 +122,13 @@ public: ...@@ -122,9 +122,13 @@ public:
//************************************************************************* //*************************************************************************
/// Data for a preprocessor instantiation. /// Data for a preprocessor instantiation.
struct VPreProcImp : public VPreProcOpaque { struct VPreProcImp : public VPreProcOpaque {
typedef list<string> StrList; public:
int getNextStateToken(string & buf); typedef list<string> StrList;
int getNextStateToken(string & buf);
VPreProc* m_preprocp; ///< Object we're holding data for VPreProc* m_preprocp; ///< Object we're holding data for
int m_debug; ///< Debugging level int m_debug; ///< Debugging level
VPreLex* m_lexp; ///< Current lexer state (NULL = closed) VPreLex* m_lexp; ///< Current lexer state (NULL = closed)
...@@ -168,7 +172,8 @@ struct VPreProcImp : public VPreProcOpaque { ...@@ -168,7 +172,8 @@ struct VPreProcImp : public VPreProcOpaque {
// For defines // For defines
stack<VPreDefRef> m_defRefs; // Pending definine substitution stack<VPreDefRef> m_defRefs; // Pending definine substitution
stack<VPreIfEntry> m_ifdefStack; ///< Stack of true/false emitting evaluations stack<VPreIfEntry> m_ifdefStack; ///< Stack of true/false emitting evaluations
unsigned m_defDepth; ///< How many `defines deep
unsigned m_defDepth; ///< How many `defines deep
bool m_defPutJoin; ///< Insert `` after substitution bool m_defPutJoin; ///< Insert `` after substitution
// For `` join // For `` join
...@@ -177,7 +182,7 @@ struct VPreProcImp : public VPreProcOpaque { ...@@ -177,7 +182,7 @@ struct VPreProcImp : public VPreProcOpaque {
// For getline() // For getline()
string m_lineChars; ///< Characters left for next line string m_lineChars; ///< Characters left for next line
QCString m_QC; string m_QC;
string relString; string relString;
...@@ -1095,9 +1100,23 @@ int VPreProcImp::getStateToken(string& buf) { ...@@ -1095,9 +1100,23 @@ int VPreProcImp::getStateToken(string& buf) {
// printf("\n###################22###################################"); // printf("\n###################22###################################");
// printf("\n %s %s",sbuffer.data(),yyourtext()) ; // printf("\n %s %s",sbuffer.data(),yyourtext()) ;
// printf("\n###################77###################################"); // printf("\n###################77###################################");
sbuffer.insert(0,"`include "); sbuffer.insert(0,"`include ");
this->m_QC.append(sbuffer.data()); this->m_QC.append(sbuffer.data());
m_preprocp->include(m_lastSym); string val=m_preprocp->include(m_lastSym);
int ll=this->m_finFilelinep->lineno();
//fprintf(stderr,"\n found include in line %d",ll);
// string klk= m_finFilelinep->filename();
string ff= m_finFilelinep->filebasename();
struct IncDef vInc;
vInc.ss=m_lastSym;
vInc.incLine=ll;
vInc.incText=val;
vInc.incFile=ff;
m_preprocp->m_include.push(vInc);
sbuffer.clear(); sbuffer.clear();
goto next_tok; goto next_tok;
} }
...@@ -1637,12 +1656,12 @@ string VerilogPreProc::performPreprocessing(const QFileInfo & fi,bool include) ...@@ -1637,12 +1656,12 @@ string VerilogPreProc::performPreprocessing(const QFileInfo & fi,bool include)
// printf("\n FILE SIZE: %d \n",fi.size()); // printf("\n FILE SIZE: %d \n",fi.size());
string res = getall(fi.size()); string res = getall(fi.size());
// cout<<"----------------------"<<endl<<res.data()<<endl<<"------.........------------ "<<endl; // cout<<"----------------------"<<endl<<res.data()<<endl<<"------.........------------ "<<endl;
return res; return res;
} }
//------------------------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------------------------
void VerilogPreProc::include(string filename) string VerilogPreProc::include(string filename)
{ {
QCString qcs; QCString qcs;
QCString fn=filename.data(); QCString fn=filename.data();
...@@ -1655,7 +1674,7 @@ string VerilogPreProc::performPreprocessing(const QFileInfo & fi,bool include) ...@@ -1655,7 +1674,7 @@ string VerilogPreProc::performPreprocessing(const QFileInfo & fi,bool include)
if(file.isEmpty()) if(file.isEmpty())
{ {
cerr<<"could not open file: "<<filename.data()<<endl; cerr<<"could not open file: "<<filename.data()<<endl;
return; return "";
} }
else else
{ {
...@@ -1668,14 +1687,16 @@ string VerilogPreProc::performPreprocessing(const QFileInfo & fi,bool include) ...@@ -1668,14 +1687,16 @@ string VerilogPreProc::performPreprocessing(const QFileInfo & fi,bool include)
VPreLex* pre=idatap->m_lexp; VPreLex* pre=idatap->m_lexp;
struct yy_buffer_state * buz = pre->currentBuffer(); struct yy_buffer_state * buz = pre->currentBuffer();
VerilogPreProc defProc; VerilogPreProc defProc;
defProc.performPreprocessing(fi,false); string result = defProc.performPreprocessing(fi,false);
yy_switch_to_buffer(buz); yy_switch_to_buffer(buz);
// cerr << result;
return result;
} ///< Request a include file be processed } ///< Request a include file be processed
string VerilogPreProc::defSubstitute(string substitute) string VerilogPreProc::defSubstitute(string substitute)
{ {
// cout<<"SUBSTITUDE:"<<substitute<<endl; cout<<"SUBSTITUDE:"<<substitute<<endl;
sbuffer.clear(); sbuffer.clear();
return substitute; return substitute;
} ///< Return value to substitute for given post-parameter value } ///< Return value to substitute for given post-parameter value
...@@ -1785,6 +1806,7 @@ void VerilogPreProc::printDict() ...@@ -1785,6 +1806,7 @@ void VerilogPreProc::printDict()
} }
////// //////
void VerilogPreProc::getPredefs() void VerilogPreProc::getPredefs()
{ {
static bool firstTime=TRUE; static bool firstTime=TRUE;
...@@ -1794,7 +1816,7 @@ void VerilogPreProc::getPredefs() ...@@ -1794,7 +1816,7 @@ void VerilogPreProc::getPredefs()
// add predefined macros // add predefined macros
DefineDict* preDict=VerilogPreProc::getPreDefineDict(); DefineDict* preDict=VerilogPreProc::getPreDefineDict();
char *defStr; char *defStr;
QStrList &predefList = Config_getList("PREDEFINED"); QStrList &predefList = Config_getList(PREDEFINED);
QStrListIterator sli(predefList); QStrListIterator sli(predefList);
for (sli.toFirst();(defStr=sli.current());++sli) for (sli.toFirst();(defStr=sli.current());++sli)
{ {
...@@ -1907,4 +1929,44 @@ void VerilogPreProc::getPredefs() ...@@ -1907,4 +1929,44 @@ void VerilogPreProc::getPredefs()
} }
} }
//////
\ No newline at end of file
void VerilogPreProc:: insertIncludeText( string & s){
stack<IncDef> inc = this->m_include;
while(!inc.empty()){
IncDef iDef=inc.top();
inc.pop();
const char * ch=s.data();
int count=0;
int index=0;
int nextIndex;
char cc;
while(count!=iDef.incLine)
{
cc=*ch;
if(cc=='\n')
{
count++;
if(count==(iDef.incLine-1))
break;
}
*ch++;
index++;
}
*ch++;
cc=*ch;
nextIndex=index+1;
while(cc!='\n')
{
*ch++;
cc=*ch;
nextIndex++;
}
s.erase(index,nextIndex-index);
s.insert(index,iDef.incText);
}
}
//////
...@@ -47,12 +47,22 @@ class VDefine; ...@@ -47,12 +47,22 @@ class VDefine;
/// This defines a preprocessor. Functions are virtual so users can override them. /// This defines a preprocessor. Functions are virtual so users can override them.
/// After creating, call openFile(), then getline() in a loop. The class will to the rest... /// After creating, call openFile(), then getline() in a loop. The class will to the rest...
struct IncDef {
string ss;
string incFile;
string incText;
int incLine;
};
class VPreProc { class VPreProc {
public: public:
VPreProc(); VPreProc();
void configure(VFileLine* filelinep); void configure(VFileLine* filelinep);
virtual ~VPreProc(); virtual ~VPreProc();
stack<IncDef> m_include;
// STATE // STATE
private: private:
int m_keepComments; int m_keepComments;
...@@ -102,7 +112,7 @@ public: ...@@ -102,7 +112,7 @@ public:
// CALLBACK METHODS // CALLBACK METHODS
// This probably will want to be overridden for given child users of this class. // This probably will want to be overridden for given child users of this class.
virtual void comment(string cmt) = 0; ///< Comment detected (if keepComments==2) virtual void comment(string cmt) = 0; ///< Comment detected (if keepComments==2)
virtual void include(string filename) = 0; ///< Request a include file be processed virtual string include(string filename) = 0; ///< Request a include file be processed
virtual void define(string name, string value, string params) = 0; ///< `define without any parameters virtual void define(string name, string value, string params) = 0; ///< `define without any parameters
virtual void undef(string name) = 0; ///< Remove a definition virtual void undef(string name) = 0; ///< Remove a definition
virtual void undefineall() = 0; ///< Remove all non-command-line definitions virtual void undefineall() = 0; ///< Remove all non-command-line definitions
...@@ -121,22 +131,22 @@ private: ...@@ -121,22 +131,22 @@ private:
#include "qfileinfo.h" #include "qfileinfo.h"
struct VPreProcImp;
class VerilogPreProc: public VPreProc class VerilogPreProc: public VPreProc
{ {
private: private:
string getIndexString(const string& x,bool upper); string getIndexString(const string& x,bool upper);
static DefineDict *g_fileDefineDict; static DefineDict *g_fileDefineDict;
static DefineDict *g_preDefineDict; static DefineDict *g_preDefineDict;
public: public:
VerilogPreProc():VPreProc(){} VerilogPreProc():VPreProc(){}
~VerilogPreProc(){} ~VerilogPreProc(){}
static DefineDict *getFileDefineDict() static DefineDict *getFileDefineDict()
{ {
if(g_fileDefineDict==0) if(g_fileDefineDict==0)
{ {
...@@ -147,24 +157,28 @@ class VerilogPreProc: public VPreProc ...@@ -147,24 +157,28 @@ class VerilogPreProc: public VPreProc
return g_fileDefineDict; return g_fileDefineDict;
} }
static DefineDict *getPreDefineDict() static DefineDict *getPreDefineDict()
{ {
if(g_preDefineDict==0) if(g_preDefineDict==0)
{ {
g_preDefineDict=new DefineDict(); g_preDefineDict=new DefineDict();
g_preDefineDict->setAutoDelete(true); g_preDefineDict->setAutoDelete(true);
} }
return g_preDefineDict; return g_preDefineDict;
} }
VPreProcImp* getImpll() {
VPreProcImp* idatap = (VPreProcImp*)(this->getImp());
return idatap;
}
void getPredefs(); void getPredefs();
string performPreprocessing(const QFileInfo & qf,bool include=false); string performPreprocessing(const QFileInfo & qf,bool include=false);
void comment(string cmt) {} ///< Comment detected (if keepComments==2) void comment(string cmt) {} ///< Comment detected (if keepComments==2)
void include(string filename) ; string include(string filename) ;
void define(string name, string value, string params) ; void define(string name, string value, string params) ;
...@@ -182,6 +196,9 @@ class VerilogPreProc: public VPreProc ...@@ -182,6 +196,9 @@ class VerilogPreProc: public VPreProc
string defSubstitute(string substitute); string defSubstitute(string substitute);
void printDict(); void printDict();
void insertIncludeText( string & text );
}; };
#endif // Guard #endif // Guard
...@@ -43,18 +43,18 @@ void CiteDict::writeLatexBibliography(FTextStream &t) ...@@ -43,18 +43,18 @@ void CiteDict::writeLatexBibliography(FTextStream &t)
if (m_entries.isEmpty()) if (m_entries.isEmpty())
return; return;
QCString style = Config_getString("LATEX_BIB_STYLE"); QCString style = Config_getString(LATEX_BIB_STYLE);
if (style.isEmpty()) if (style.isEmpty())
style="plain"; style="plain";
QCString unit; QCString unit;
if (Config_getBool("COMPACT_LATEX")) if (Config_getBool(COMPACT_LATEX))
unit = "section"; unit = "section";
else else
unit = "chapter"; unit = "chapter";
t << "% Bibliography\n" t << "% Bibliography\n"
"\\newpage\n" "\\newpage\n"
"\\phantomsection\n"; "\\phantomsection\n";
bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (!pdfHyperlinks) if (!pdfHyperlinks)
{ {
t << "\\clearemptydoublepage\n"; t << "\\clearemptydoublepage\n";
...@@ -62,7 +62,7 @@ void CiteDict::writeLatexBibliography(FTextStream &t) ...@@ -62,7 +62,7 @@ void CiteDict::writeLatexBibliography(FTextStream &t)
} }
t << "\\bibliographystyle{" << style << "}\n" t << "\\bibliographystyle{" << style << "}\n"
"\\bibliography{"; "\\bibliography{";
QStrList &citeDataList = Config_getList("CITE_BIB_FILES"); QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
int i = 0; int i = 0;
const char *bibdata = citeDataList.first(); const char *bibdata = citeDataList.first();
while (bibdata) while (bibdata)
...@@ -107,7 +107,7 @@ void CiteDict::clear() ...@@ -107,7 +107,7 @@ void CiteDict::clear()
bool CiteDict::isEmpty() const bool CiteDict::isEmpty() const
{ {
QStrList &citeBibFiles = Config_getList("CITE_BIB_FILES"); QStrList &citeBibFiles = Config_getList(CITE_BIB_FILES);
return (citeBibFiles.count()==0 || m_entries.isEmpty()); return (citeBibFiles.count()==0 || m_entries.isEmpty());
} }
...@@ -120,7 +120,7 @@ void CiteDict::generatePage() const ...@@ -120,7 +120,7 @@ void CiteDict::generatePage() const
// 1. generate file with markers and citations to OUTPUT_DIRECTORY // 1. generate file with markers and citations to OUTPUT_DIRECTORY
QFile f; QFile f;
QCString outputDir = Config_getString("OUTPUT_DIRECTORY"); QCString outputDir = Config_getString(OUTPUT_DIRECTORY);
QCString citeListFile = outputDir+"/citelist.doc"; QCString citeListFile = outputDir+"/citelist.doc";
f.setName(citeListFile); f.setName(citeListFile);
if (!f.open(IO_WriteOnly)) if (!f.open(IO_WriteOnly))
...@@ -154,7 +154,7 @@ void CiteDict::generatePage() const ...@@ -154,7 +154,7 @@ void CiteDict::generatePage() const
// so bibtex can find them without path (bibtex doesn't support paths or // so bibtex can find them without path (bibtex doesn't support paths or
// filenames with spaces!) // filenames with spaces!)
// Strictly not required when only latex is generated // Strictly not required when only latex is generated
QStrList &citeDataList = Config_getList("CITE_BIB_FILES"); QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
QCString bibOutputDir = outputDir+"/"+bibTmpDir; QCString bibOutputDir = outputDir+"/"+bibTmpDir;
QCString bibOutputFiles = ""; QCString bibOutputFiles = "";
QDir thisDir; QDir thisDir;
...@@ -226,13 +226,13 @@ void CiteDict::generatePage() const ...@@ -226,13 +226,13 @@ void CiteDict::generatePage() const
else if (insideBib) doc+=line+"\n"; else if (insideBib) doc+=line+"\n";
int i; int i;
// determine text to use at the location of the @cite command // determine text to use at the location of the @cite command
if (insideBib && (i=line.find("<a name=\"CITEREF_"))!=-1) if (insideBib && (i=line.find("name=\"CITEREF_"))!=-1)
{ {
int j=line.find("\">["); int j=line.find("\">[");
int k=line.find("]</a>"); int k=line.find("]</a>");
if (j!=-1 && k!=-1) if (j!=-1 && k!=-1)
{ {
QCString label = line.mid(i+17,j-i-17); QCString label = line.mid(i+14,j-i-14);
QCString number = line.mid(j+2,k-j-1); QCString number = line.mid(j+2,k-j-1);
CiteInfo *ci = m_entries.find(label); CiteInfo *ci = m_entries.find(label);
//printf("label='%s' number='%s' => %p\n",label.data(),number.data(),ci); //printf("label='%s' number='%s' => %p\n",label.data(),number.data(),ci);
...@@ -251,11 +251,11 @@ void CiteDict::generatePage() const ...@@ -251,11 +251,11 @@ void CiteDict::generatePage() const
// 8. for latex we just copy the bib files to the output and let // 8. for latex we just copy the bib files to the output and let
// latex do this work. // latex do this work.
if (Config_getBool("GENERATE_LATEX")) if (Config_getBool(GENERATE_LATEX))
{ {
// copy bib files to the latex output dir // copy bib files to the latex output dir
QStrList &citeDataList = Config_getList("CITE_BIB_FILES"); QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
QCString latexOutputDir = Config_getString("LATEX_OUTPUT")+"/"; QCString latexOutputDir = Config_getString(LATEX_OUTPUT)+"/";
int i = 0; int i = 0;
const char *bibdata = citeDataList.first(); const char *bibdata = citeDataList.first();
while (bibdata) while (bibdata)
......
...@@ -64,7 +64,7 @@ class ClangParser::Private ...@@ -64,7 +64,7 @@ class ClangParser::Private
static QCString detab(const QCString &s) static QCString detab(const QCString &s)
{ {
static int tabSize = Config_getInt("TAB_SIZE"); static int tabSize = Config_getInt(TAB_SIZE);
GrowBuf out; GrowBuf out;
int size = s.length(); int size = s.length();
const char *data = s.data(); const char *data = s.data();
...@@ -157,9 +157,9 @@ void ClangParser::determineInputFilesInSameTu(QStrList &files) ...@@ -157,9 +157,9 @@ void ClangParser::determineInputFilesInSameTu(QStrList &files)
void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit) void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
{ {
static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING"); static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
static QStrList &includePath = Config_getList("INCLUDE_PATH"); static QStrList &includePath = Config_getList(INCLUDE_PATH);
static QStrList clangOptions = Config_getList("CLANG_OPTIONS"); static QStrList clangOptions = Config_getList(CLANG_OPTIONS);
if (!clangAssistedParsing) return; if (!clangAssistedParsing) return;
//printf("ClangParser::start(%s)\n",fileName); //printf("ClangParser::start(%s)\n",fileName);
p->fileName = fileName; p->fileName = fileName;
...@@ -230,7 +230,7 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit) ...@@ -230,7 +230,7 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
// provide the input and and its dependencies as unsaved files so we can // provide the input and and its dependencies as unsaved files so we can
// pass the filtered versions // pass the filtered versions
argv[argc++]=strdup(fileName); argv[argc++]=strdup(fileName);
static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES"); static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
//printf("source %s ----------\n%s\n-------------\n\n", //printf("source %s ----------\n%s\n-------------\n\n",
// fileName,p->source.data()); // fileName,p->source.data());
uint numUnsavedFiles = filesInTranslationUnit.count()+1; uint numUnsavedFiles = filesInTranslationUnit.count()+1;
...@@ -339,7 +339,7 @@ void ClangParser::switchToFile(const char *fileName) ...@@ -339,7 +339,7 @@ void ClangParser::switchToFile(const char *fileName)
void ClangParser::finish() void ClangParser::finish()
{ {
static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING"); static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return; if (!clangAssistedParsing) return;
if (p->tu) if (p->tu)
{ {
...@@ -381,7 +381,7 @@ QCString ClangParser::lookup(uint line,const char *symbol) ...@@ -381,7 +381,7 @@ QCString ClangParser::lookup(uint line,const char *symbol)
//printf("ClangParser::lookup(%d,%s)\n",line,symbol); //printf("ClangParser::lookup(%d,%s)\n",line,symbol);
QCString result; QCString result;
if (symbol==0) return result; if (symbol==0) return result;
static bool clangAssistedParsing = Config_getBool("CLANG_ASSISTED_PARSING"); static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING);
if (!clangAssistedParsing) return result; if (!clangAssistedParsing) return result;
int sl = strlen(symbol); int sl = strlen(symbol);
...@@ -615,7 +615,7 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol, ...@@ -615,7 +615,7 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol,
Definition *d, Definition *d,
const char *text) const char *text)
{ {
static bool sourceTooltips = Config_getBool("SOURCE_TOOLTIPS"); static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
TooltipManager::instance()->addTooltip(d); TooltipManager::instance()->addTooltip(d);
QCString ref = d->getReference(); QCString ref = d->getReference();
QCString file = d->getOutputFileBase(); QCString file = d->getOutputFileBase();
......
This diff is collapsed.
...@@ -109,7 +109,6 @@ class ClassDef : public Definition ...@@ -109,7 +109,6 @@ class ClassDef : public Definition
/** Returns the unique base name (without extension) of the class's file on disk */ /** Returns the unique base name (without extension) of the class's file on disk */
QCString getOutputFileBase() const; QCString getOutputFileBase() const;
QCString getInstanceOutputFileBase() const; QCString getInstanceOutputFileBase() const;
QCString getFileBase() const;
/** Returns the base name for the source code file */ /** Returns the base name for the source code file */
QCString getSourceFileBase() const; QCString getSourceFileBase() const;
...@@ -131,6 +130,12 @@ class ClassDef : public Definition ...@@ -131,6 +130,12 @@ class ClassDef : public Definition
/** returns TRUE if this class has a non-empty detailed description */ /** returns TRUE if this class has a non-empty detailed description */
bool hasDetailedDescription() const; bool hasDetailedDescription() const;
/** returns the file name to use for the collaboration graph */
QCString collaborationGraphFileName() const;
/** returns the file name to use for the inheritance graph */
QCString inheritanceGraphFileName() const;
/** Returns the name as it is appears in the documentation */ /** Returns the name as it is appears in the documentation */
QCString displayName(bool includeScope=TRUE) const; QCString displayName(bool includeScope=TRUE) const;
......
...@@ -36,7 +36,7 @@ ClassList::~ClassList() ...@@ -36,7 +36,7 @@ ClassList::~ClassList()
static int compItems(const ClassDef *c1,const ClassDef *c2) static int compItems(const ClassDef *c1,const ClassDef *c2)
{ {
static bool b = Config_getBool("SORT_BY_SCOPE_NAME"); static bool b = Config_getBool(SORT_BY_SCOPE_NAME);
if (b) if (b)
{ {
return qstricmp(c1->name(), c2->name()); return qstricmp(c1->name(), c2->name());
...@@ -64,8 +64,8 @@ ClassListIterator::ClassListIterator(const ClassList &cllist) : ...@@ -64,8 +64,8 @@ ClassListIterator::ClassListIterator(const ClassList &cllist) :
bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const
{ {
static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES"); static bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
static bool extractLocalClasses = Config_getBool("EXTRACT_LOCAL_CLASSES"); static bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
if (count()>0) if (count()>0)
{ {
ClassSDict::Iterator sdi(*this); ClassSDict::Iterator sdi(*this);
...@@ -94,7 +94,7 @@ bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const ...@@ -94,7 +94,7 @@ bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const
void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter, void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
const char *header,bool localNames) const char *header,bool localNames)
{ {
static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (count()>0) if (count()>0)
{ {
ClassSDict::Iterator sdi(*this); ClassSDict::Iterator sdi(*this);
...@@ -118,10 +118,10 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f ...@@ -118,10 +118,10 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
void ClassSDict::writeDocumentation(OutputList &ol,Definition * container) void ClassSDict::writeDocumentation(OutputList &ol,Definition * container)
{ {
static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES"); static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS"); static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
if (!inlineGroupedClasses && !inlineSimpleClasses) return; if (!inlineGroupedClasses && !inlineSimpleClasses) return;
if (count()>0) if (count()>0)
......
...@@ -115,6 +115,9 @@ CommandMap cmdMap[] = ...@@ -115,6 +115,9 @@ CommandMap cmdMap[] =
{ "#", CMD_HASH }, { "#", CMD_HASH },
{ "%", CMD_PERCENT }, { "%", CMD_PERCENT },
{ "|", CMD_PIPE }, { "|", CMD_PIPE },
{ ".", CMD_PUNT },
{ "+", CMD_PLUS },
{ "-", CMD_MINUS },
{ "::", CMD_DCOLON }, { "::", CMD_DCOLON },
{ "\"", CMD_QUOTE }, { "\"", CMD_QUOTE },
{ "_internalref", CMD_INTERNALREF }, { "_internalref", CMD_INTERNALREF },
......
...@@ -130,7 +130,10 @@ enum CommandType ...@@ -130,7 +130,10 @@ enum CommandType
CMD_MDASH = 100, CMD_MDASH = 100,
CMD_STARTUML = 101, CMD_STARTUML = 101,
CMD_ENDUML = 102, CMD_ENDUML = 102,
CMD_SETSCOPE = 103 CMD_SETSCOPE = 103,
CMD_PUNT = 104,
CMD_PLUS = 105,
CMD_MINUS = 106
}; };
enum HtmlTagType enum HtmlTagType
......
This diff is collapsed.
...@@ -134,7 +134,7 @@ static void replaceCommentMarker(const char *s,int len) ...@@ -134,7 +134,7 @@ static void replaceCommentMarker(const char *s,int len)
static inline int computeIndent(const char *s) static inline int computeIndent(const char *s)
{ {
int col=0; int col=0;
static int tabSize=Config_getInt("TAB_SIZE"); static int tabSize=Config_getInt(TAB_SIZE);
const char *p=s; const char *p=s;
char c; char c;
while ((c=*p++)) while ((c=*p++))
...@@ -164,7 +164,7 @@ static inline void copyToOutput(const char *s,int len) ...@@ -164,7 +164,7 @@ static inline void copyToOutput(const char *s,int len)
else if (len>0) else if (len>0)
{ {
ADDARRAY(s,len); ADDARRAY(s,len);
static int tabSize=Config_getInt("TAB_SIZE"); static int tabSize=Config_getInt(TAB_SIZE);
for (i=0;i<len;i++) for (i=0;i<len;i++)
{ {
switch (s[i]) switch (s[i])
...@@ -379,6 +379,12 @@ void replaceComment(int offset); ...@@ -379,6 +379,12 @@ void replaceComment(int offset);
g_inRoseComment=TRUE; g_inRoseComment=TRUE;
BEGIN(SComment); BEGIN(SComment);
} }
<Scan>"//"[!\/]/.*\n[ \t]*"//"[|\/][ \t]*[@\\]"}" { // next line contains an end marker, see bug 752712
g_inSpecialComment=yytext[2]=='/' || yytext[2]=='!';
copyToOutput(yytext,(int)yyleng);
g_readLineCtx=YY_START;
BEGIN(ReadLine);
}
<Scan>"//"/.*\n { /* one line C++ comment */ <Scan>"//"/.*\n { /* one line C++ comment */
g_inSpecialComment=yytext[2]=='/' || yytext[2]=='!'; g_inSpecialComment=yytext[2]=='/' || yytext[2]=='!';
copyToOutput(yytext,(int)yyleng); copyToOutput(yytext,(int)yyleng);
...@@ -704,6 +710,14 @@ void replaceComment(int offset); ...@@ -704,6 +710,14 @@ void replaceComment(int offset);
g_readLineCtx=YY_START; g_readLineCtx=YY_START;
BEGIN(ReadLine); BEGIN(ReadLine);
} }
<SComment>\n[ \t]*"//"[\/!]("<")?[ \t]*[\\@]"}".*\n {
/* See Bug 752712: end the multiline comment when finding a @} or \} command */
copyToOutput(" */",3);
copyToOutput(yytext,(int)yyleng);
g_inSpecialComment=FALSE;
g_inRoseComment=FALSE;
BEGIN(Scan);
}
<SComment>\n[ \t]*"///"[^\/\n]/.*\n { <SComment>\n[ \t]*"///"[^\/\n]/.*\n {
replaceComment(1); replaceComment(1);
g_readLineCtx=YY_START; g_readLineCtx=YY_START;
...@@ -773,6 +787,7 @@ void replaceComment(int offset); ...@@ -773,6 +787,7 @@ void replaceComment(int offset);
//printf("** Adding start of comment!\n"); //printf("** Adding start of comment!\n");
if (g_lang!=SrcLangExt_Python && if (g_lang!=SrcLangExt_Python &&
g_lang!=SrcLangExt_VHDL && g_lang!=SrcLangExt_VHDL &&
g_lang!=SrcLangExt_Markdown &&
g_lang!=SrcLangExt_Fortran) g_lang!=SrcLangExt_Fortran)
{ {
ADDCHAR('/'); ADDCHAR('/');
...@@ -792,6 +807,7 @@ void replaceComment(int offset); ...@@ -792,6 +807,7 @@ void replaceComment(int offset);
{ {
if (g_lang!=SrcLangExt_Python && if (g_lang!=SrcLangExt_Python &&
g_lang!=SrcLangExt_VHDL && g_lang!=SrcLangExt_VHDL &&
g_lang!=SrcLangExt_Markdown &&
g_lang!=SrcLangExt_Fortran) g_lang!=SrcLangExt_Fortran)
{ {
ADDCHAR('*'); ADDCHAR('*');
...@@ -973,7 +989,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName) ...@@ -973,7 +989,7 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
g_outBuf = outBuf; g_outBuf = outBuf;
g_inBufPos = 0; g_inBufPos = 0;
g_col = 0; g_col = 0;
g_mlBrief = Config_getBool("MULTILINE_CPP_IS_BRIEF"); g_mlBrief = Config_getBool(MULTILINE_CPP_IS_BRIEF);
g_skip = FALSE; g_skip = FALSE;
g_fileName = fileName; g_fileName = fileName;
g_lang = getLanguageFromFileName(fileName); g_lang = getLanguageFromFileName(fileName);
......
This diff is collapsed.
...@@ -303,7 +303,7 @@ bool CondParser::evalOperator(int opId, bool lhs, bool rhs) ...@@ -303,7 +303,7 @@ bool CondParser::evalOperator(int opId, bool lhs, bool rhs)
*/ */
bool CondParser::evalVariable(const char *varName) bool CondParser::evalVariable(const char *varName)
{ {
if (Config_getList("ENABLED_SECTIONS").find(varName)==-1) return FALSE; if (Config_getList(ENABLED_SECTIONS).find(varName)==-1) return FALSE;
return TRUE; return TRUE;
} }
This diff is collapsed.
...@@ -626,6 +626,16 @@ Go to the <a href="commands.html">next</a> section or return to the ...@@ -626,6 +626,16 @@ Go to the <a href="commands.html">next</a> section or return to the
The output of markdown processing is further processed by doxygen, so you The output of markdown processing is further processed by doxygen, so you
can mix doxygen, HTML, and XML commands with Markdown formatting. can mix doxygen, HTML, and XML commands with Markdown formatting.
Disable only in case of backward compatibilities issues. Disable only in case of backward compatibilities issues.
]]>
</docs>
</option>
<option type='int' id='TOC_INCLUDE_HEADINGS' minval='0' maxval='99' defval='0' depends='MARKDOWN_SUPPORT'>
<docs>
<![CDATA[
When the \c TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings
up to that level are automatically included in the table of contents, even if
they do not have an id attribute.
\note This feature currently applies only to Markdown headings.
]]> ]]>
</docs> </docs>
</option> </option>
...@@ -1230,6 +1240,14 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -1230,6 +1240,14 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
or return value. If set to \c NO, doxygen will only warn about or return value. If set to \c NO, doxygen will only warn about
wrong or incomplete parameter documentation, but not about the absence of wrong or incomplete parameter documentation, but not about the absence of
documentation. documentation.
]]>
</docs>
</option>
<option type='bool' id='WARN_AS_ERROR' defval='0'>
<docs>
<![CDATA[
If the \c WARN_AS_ERROR tag is set to \c YES then doxygen will immediately stop
when a warning is encountered.
]]> ]]>
</docs> </docs>
</option> </option>
...@@ -1329,6 +1347,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -1329,6 +1347,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
<value name='*.mm'/> <value name='*.mm'/>
<value name='*.dox'/> <value name='*.dox'/>
<value name='*.py'/> <value name='*.py'/>
<value name='*.pyw'/>
<value name='*.f90'/> <value name='*.f90'/>
<value name='*.f'/> <value name='*.f'/>
<value name='*.for'/> <value name='*.for'/>
...@@ -1337,8 +1356,6 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -1337,8 +1356,6 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
<value name='*.vhdl'/> <value name='*.vhdl'/>
<value name='*.ucf'/> <value name='*.ucf'/>
<value name='*.qsf'/> <value name='*.qsf'/>
<value name='*.as'/>
<value name='*.js'/>
</option> </option>
<option type='bool' id='RECURSIVE' defval='0'> <option type='bool' id='RECURSIVE' defval='0'>
<docs> <docs>
...@@ -1448,6 +1465,10 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -1448,6 +1465,10 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
<br>Note that the filter must not add or remove lines; it is applied before the <br>Note that the filter must not add or remove lines; it is applied before the
code is scanned, but not when the output code is generated. If lines are added code is scanned, but not when the output code is generated. If lines are added
or removed, the anchors will not be placed correctly. or removed, the anchors will not be placed correctly.
<br>Note that for custom extensions or not directly supported extensions you also
need to set \ref cfg_extension_mapping "EXTENSION_MAPPING" for the extension
otherwise the files are not properly processed by doxygen.<br>
]]> ]]>
</docs> </docs>
</option> </option>
...@@ -1461,6 +1482,9 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" ...@@ -1461,6 +1482,9 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
information on how filters are used. If the \c FILTER_PATTERNS tag is empty or if information on how filters are used. If the \c FILTER_PATTERNS tag is empty or if
none of the patterns match the file name, \ref cfg_input_filter "INPUT_FILTER" is none of the patterns match the file name, \ref cfg_input_filter "INPUT_FILTER" is
applied. applied.
<br>Note that for custom extensions or not directly supported extensions you also
need to set \ref cfg_extension_mapping "EXTENSION_MAPPING" for the extension
otherwise the files are not properly processed by doxygen.<br>
]]> ]]>
</docs> </docs>
</option> </option>
...@@ -1608,7 +1632,7 @@ to disable this feature. ...@@ -1608,7 +1632,7 @@ to disable this feature.
necessary type information. necessary type information.
@note The availability of this option depends on whether or not doxygen @note The availability of this option depends on whether or not doxygen
was compiled with the `--with-libclang` option. was generated with the `-Duse-libclang=ON` option for CMake.
]]> ]]>
</docs> </docs>
</option> </option>
...@@ -2656,6 +2680,16 @@ or ...@@ -2656,6 +2680,16 @@ or
bibliography, e.g. \c plainnat, or \c ieeetr. bibliography, e.g. \c plainnat, or \c ieeetr.
See http://en.wikipedia.org/wiki/BibTeX and \ref cmdcite "\\cite" See http://en.wikipedia.org/wiki/BibTeX and \ref cmdcite "\\cite"
for more info. for more info.
]]>
</docs>
</option>
<option type='bool' id='LATEX_TIMESTAMP' defval='0' depends='GENERATE_LATEX'>
<docs>
<![CDATA[
If the \c LATEX_TIMESTAMP tag is set to \c YES then the footer of
each generated page will contain the date and time when the page
was generated. Setting this to \c NO can help when comparing the output of
multiple runs.
]]> ]]>
</docs> </docs>
</option> </option>
......
...@@ -353,6 +353,48 @@ def parseGroups(node): ...@@ -353,6 +353,48 @@ def parseGroups(node):
if n.nodeType == Node.ELEMENT_NODE: if n.nodeType == Node.ELEMENT_NODE:
parseOption(n) parseOption(n)
def parseGroupMap(node):
map = { 'bool':'bool', 'string':'QCString', 'enum':'QCString', 'int':'int', 'list':'QStrList' }
for n in node.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
setting = n.getAttribute('setting')
if len(setting) > 0:
print("#if %s" % (setting))
type = n.getAttribute('type')
name = n.getAttribute('id')
if type in map:
print(" %-8s %s;" % (map[type],name))
if len(setting) > 0:
print("#endif")
def parseGroupInit(node):
map = { 'bool':'Bool', 'string':'String', 'enum':'Enum', 'int':'Int', 'list':'List' }
for n in node.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
setting = n.getAttribute('setting')
if len(setting) > 0:
print("#if %s" % (setting))
type = n.getAttribute('type')
name = n.getAttribute('id')
if type in map:
print(" %-25s = ConfigImpl::instance()->get%s(__FILE__,__LINE__,\"%s\");" % (name,map[type],name))
if len(setting) > 0:
print("#endif")
def parseGroupMapInit(node):
map = { 'bool':'Bool', 'string':'String', 'enum':'String', 'int':'Int', 'list':'List' }
for n in node.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
setting = n.getAttribute('setting')
if len(setting) > 0:
print("#if %s" % (setting))
type = n.getAttribute('type')
name = n.getAttribute('id')
if type in map:
print(" m_map.insert(\"%s\",new Info%s(&ConfigValues::%s));" % (name,map[type],name))
if len(setting) > 0:
print("#endif")
def parseGroupCDocs(node): def parseGroupCDocs(node):
for n in node.childNodes: for n in node.childNodes:
if n.nodeType == Node.ELEMENT_NODE: if n.nodeType == Node.ELEMENT_NODE:
...@@ -556,8 +598,8 @@ def parseFooterDoc(node): ...@@ -556,8 +598,8 @@ def parseFooterDoc(node):
def main(): def main():
if len(sys.argv)<3 or (not sys.argv[1] in ['-doc','-cpp','-wiz']): if len(sys.argv)<3 or (not sys.argv[1] in ['-doc','-cpp','-wiz','-maph','-maps']):
sys.exit('Usage: %s -doc|-cpp|-wiz config.xml' % sys.argv[0]) sys.exit('Usage: %s -doc|-cpp|-wiz|-maph|-maps config.xml' % sys.argv[0])
try: try:
doc = xml.dom.minidom.parse(sys.argv[2]) doc = xml.dom.minidom.parse(sys.argv[2])
except Exception as inst: except Exception as inst:
...@@ -597,6 +639,89 @@ def main(): ...@@ -597,6 +639,89 @@ def main():
if n.nodeType == Node.ELEMENT_NODE: if n.nodeType == Node.ELEMENT_NODE:
if (n.nodeName == "footer"): if (n.nodeName == "footer"):
parseFooterDoc(n) parseFooterDoc(n)
elif (sys.argv[1] == "-maph"):
print("/* WARNING: This file is generated!")
print(" * Do not edit this file, but edit config.xml instead and run")
print(" * python configgen.py -map config.xml to regenerate this file!")
print(" */")
print("#ifndef CONFIGVALUES_H")
print("#define CONFIGVALUES_H")
print("")
print("#include <qdict.h>")
print("#include <qstrlist.h>")
print("#include <qcstring.h>")
print("#include \"settings.h\"")
print("")
print("class ConfigValues")
print("{")
print(" public:")
print(" static ConfigValues &instance() { static ConfigValues theInstance; return theInstance; }")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
if (n.nodeName == "group"):
parseGroupMap(n)
print(" void init();")
print(" struct Info")
print(" {")
print(" enum Type { Bool, Int, String, List, Unknown };")
print(" Info(Type t) : type(t) {}")
print(" virtual ~Info() {}")
print(" Type type;")
print(" };")
print(" struct InfoBool : public Info")
print(" {")
print(" InfoBool(bool ConfigValues::*ptm) : Info(Info::Bool), item(ptm) {}")
print(" bool ConfigValues::*item;")
print(" };")
print(" struct InfoInt : public Info")
print(" {")
print(" InfoInt(int ConfigValues::*ptm) : Info(Info::Int), item(ptm) {}")
print(" int ConfigValues::*item;")
print(" };")
print(" struct InfoString : public Info")
print(" {")
print(" InfoString(QCString ConfigValues::*ptm) : Info(Info::String), item(ptm) {}")
print(" QCString ConfigValues::*item;")
print(" };")
print(" struct InfoList : public Info")
print(" {")
print(" InfoList(QStrList ConfigValues::*ptm) : Info(Info::List), item(ptm) {}")
print(" QStrList ConfigValues::*item;")
print(" };")
print(" const Info *get(const char *tag) const")
print(" {")
print(" return m_map.find(tag);")
print(" }")
print(" private:")
print(" ConfigValues();")
print(" QDict<Info> m_map;")
print("};")
print("")
print("#endif")
elif (sys.argv[1] == "-maps"):
print("/* WARNING: This file is generated!")
print(" * Do not edit this file, but edit config.xml instead and run")
print(" * python configgen.py -maps config.xml to regenerate this file!")
print(" */")
print("#include \"configvalues.h\"")
print("#include \"configimpl.h\"")
print("")
print("ConfigValues::ConfigValues() : m_map(257)")
print("{")
print(" m_map.setAutoDelete(TRUE);")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
if (n.nodeName == "group"):
parseGroupMapInit(n)
print("}")
print("")
print("void ConfigValues::init()")
print("{")
for n in elem.childNodes:
if n.nodeType == Node.ELEMENT_NODE:
if (n.nodeName == "group"):
parseGroupInit(n)
print("}")
elif (sys.argv[1] == "-cpp"): elif (sys.argv[1] == "-cpp"):
print("/* WARNING: This file is generated!") print("/* WARNING: This file is generated!")
print(" * Do not edit this file, but edit config.xml instead and run") print(" * Do not edit this file, but edit config.xml instead and run")
...@@ -604,11 +729,11 @@ def main(): ...@@ -604,11 +729,11 @@ def main():
print(" */") print(" */")
print("") print("")
print("#include \"configoptions.h\"") print("#include \"configoptions.h\"")
print("#include \"config.h\"") print("#include \"configimpl.h\"")
print("#include \"portable.h\"") print("#include \"portable.h\"")
print("#include \"settings.h\"") print("#include \"settings.h\"")
print("") print("")
print("void addConfigOptions(Config *cfg)") print("void addConfigOptions(ConfigImpl *cfg)")
print("{") print("{")
print(" ConfigString *cs;") print(" ConfigString *cs;")
print(" ConfigEnum *ce;") print(" ConfigEnum *ce;")
......
This diff is collapsed.
This diff is collapsed.
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#ifndef CONFIGOPTIONS #ifndef CONFIGOPTIONS
#define CONFIGOPTIONS #define CONFIGOPTIONS
class Config; class ConfigImpl;
void addConfigOptions(Config *cfg); void addConfigOptions(ConfigImpl *cfg);
#endif #endif
This diff is collapsed.
This diff is collapsed.
...@@ -346,7 +346,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" ...@@ -346,7 +346,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
int bi=g_curArgTypeName.find('('); int bi=g_curArgTypeName.find('(');
int fi=bi-1; int fi=bi-1;
//printf("func arg fi=%d\n",fi); //printf("func arg fi=%d\n",fi);
while (fi>=0 && isId(g_curArgTypeName.at(fi))) fi--; while (fi>=0 && (isId(g_curArgTypeName.at(fi)) || g_curArgTypeName.at(fi)==':')) fi--;
if (fi>=0) if (fi>=0)
{ {
a->type = g_curArgTypeName.left(fi+1); a->type = g_curArgTypeName.left(fi+1);
......
...@@ -557,7 +557,7 @@ void generateDEFForFile(FileDef *fd,FTextStream &t) ...@@ -557,7 +557,7 @@ void generateDEFForFile(FileDef *fd,FTextStream &t)
void generateDEF() void generateDEF()
{ {
QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY"); QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY);
if (outputDirectory.isEmpty()) if (outputDirectory.isEmpty())
{ {
outputDirectory=QDir::currentDirPath().utf8(); outputDirectory=QDir::currentDirPath().utf8();
......
...@@ -50,5 +50,5 @@ Define::~Define() ...@@ -50,5 +50,5 @@ Define::~Define()
bool Define::hasDocumentation() bool Define::hasDocumentation()
{ {
return definition && (doc || Config_getBool("EXTRACT_ALL")); return definition && (doc || Config_getBool(EXTRACT_ALL));
} }
This diff is collapsed.
This diff is collapsed.
...@@ -37,7 +37,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir, ...@@ -37,7 +37,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
// go to the html output directory (i.e. path) // go to the html output directory (i.e. path)
QDir::setCurrent(outDir); QDir::setCurrent(outDir);
//printf("Going to dir %s\n",QDir::currentDirPath().data()); //printf("Going to dir %s\n",QDir::currentDirPath().data());
QCString diaExe = Config_getString("DIA_PATH")+"dia"+portable_commandExtension(); QCString diaExe = Config_getString(DIA_PATH)+"dia"+portable_commandExtension();
QCString diaArgs; QCString diaArgs;
QCString extension; QCString extension;
diaArgs+="-n "; diaArgs+="-n ";
...@@ -69,7 +69,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir, ...@@ -69,7 +69,7 @@ void writeDiaGraphFromFile(const char *inFile,const char *outDir,
goto error; goto error;
} }
portable_sysTimerStop(); portable_sysTimerStop();
if ( (format==DIA_EPS) && (Config_getBool("USE_PDFLATEX")) ) if ( (format==DIA_EPS) && (Config_getBool(USE_PDFLATEX)) )
{ {
QCString epstopdfArgs(maxCmdLine); QCString epstopdfArgs(maxCmdLine);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
......
...@@ -274,7 +274,7 @@ static void writeMapArea(FTextStream &t,ClassDef *cd,QCString relPath, ...@@ -274,7 +274,7 @@ static void writeMapArea(FTextStream &t,ClassDef *cd,QCString relPath,
QCString tooltip = cd->briefDescriptionAsTooltip(); QCString tooltip = cd->briefDescriptionAsTooltip();
if (!tooltip.isEmpty()) if (!tooltip.isEmpty())
{ {
t << "title=\"" << tooltip << "\" "; t << "title=\"" << convertToHtml(tooltip) << "\" ";
} }
t << "alt=\"" << convertToXML(cd->displayName()); t << "alt=\"" << convertToXML(cd->displayName());
t << "\" shape=\"rect\" coords=\"" << x << "," << y << ","; t << "\" shape=\"rect\" coords=\"" << x << "," << y << ",";
...@@ -321,7 +321,7 @@ QCString DiagramItem::label() const ...@@ -321,7 +321,7 @@ QCString DiagramItem::label() const
{ {
result=classDef->displayName(); result=classDef->displayName();
} }
if (Config_getBool("HIDE_SCOPE_NAMES")) result=stripScope(result); if (Config_getBool(HIDE_SCOPE_NAMES)) result=stripScope(result);
return result; return result;
} }
...@@ -1332,7 +1332,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path, ...@@ -1332,7 +1332,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
super->drawConnectors(t,0,FALSE,FALSE,baseRows,superRows,0,0); super->drawConnectors(t,0,FALSE,FALSE,baseRows,superRows,0,0);
f1.close(); f1.close();
if (Config_getBool("USE_PDFLATEX")) if (Config_getBool(USE_PDFLATEX))
{ {
QCString epstopdfArgs(4096); QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment