Classes | Typedefs | Functions | Variables
doxygen.h File Reference
#include <qdatetime.h>
#include <qcache.h>
#include <qstrlist.h>
#include <qdict.h>
#include <qintdict.h>
#include "ftextstream.h"
#include "sortdict.h"
#include "membergroup.h"
#include "dirdef.h"
#include "memberlist.h"

Go to the source code of this file.

Classes

class  StringDict
 
struct  LookupInfo
 
class  Doxygen
 This class serves as a namespace for global variables used by doxygen. More...
 

Typedefs

typedef QList< QCStringStringList
 
typedef QListIterator< QCStringStringListIterator
 

Functions

void initDoxygen ()
 
void readConfiguration (int argc, char **argv)
 
void checkConfiguration ()
 
void adjustConfiguration ()
 
void searchInputFiles (StringList &inputFiles)
 
void parseInput ()
 
void generateOutput ()
 
void readAliases ()
 
void readFormulaRepository ()
 
void cleanUpDoxygen ()
 
int readFileOrDirectory (const char *s, FileNameList *fnList, FileNameDict *fnDict, StringDict *exclDict, QStrList *patList, QStrList *exclPatList, StringList *resultList, StringDict *resultDict, bool recursive, bool errorIfNotExist=TRUE, QDict< void > *killDict=0, QDict< void > *paths=0)
 
int readDir (QFileInfo *fi, FileNameList *fnList, FileNameDict *fnDict, StringDict *exclDict, QStrList *patList, QStrList *exclPatList, StringList *resultList, StringDict *resultDict, bool errorIfNotExist, bool recursive, QDict< void > *killDict)
 
void copyAndFilterFile (const char *fileName, BufStr &dest)
 

Variables

QCString g_spaces
 

Typedef Documentation

Definition at line 65 of file doxygen.h.

Definition at line 68 of file doxygen.h.

Function Documentation

void adjustConfiguration ( )

adjust globals that depend on configuration settings.

Definition at line 10504 of file doxygen.cpp.

10505 {
10506  QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
10507  if (!setTranslator(outputLanguage))
10508  {
10509  warn_uncond("Output language %s not supported! Using English instead.\n",
10510  outputLanguage.data());
10511  }
10512  QStrList &includePath = Config_getList("INCLUDE_PATH");
10513  char *s=includePath.first();
10514  while (s)
10515  {
10516  QFileInfo fi(s);
10517  addSearchDir(fi.absFilePath().utf8());
10518  s=includePath.next();
10519  }
10520 
10521  /* Set the global html file extension. */
10522  Doxygen::htmlFileExtension = Config_getString("HTML_FILE_EXTENSION");
10523 
10524 
10525  Doxygen::xrefLists->setAutoDelete(TRUE);
10526 
10527  Doxygen::parseSourcesNeeded = Config_getBool("CALL_GRAPH") ||
10528  Config_getBool("CALLER_GRAPH") ||
10529  Config_getBool("REFERENCES_RELATION") ||
10530  Config_getBool("REFERENCED_BY_RELATION");
10531 
10532  Doxygen::markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
10533 
10534  /**************************************************************************
10535  * Add custom extension mappings
10536  **************************************************************************/
10537 
10538  QStrList &extMaps = Config_getList("EXTENSION_MAPPING");
10539  char *mapping = extMaps.first();
10540  while (mapping)
10541  {
10542  QCString mapStr = mapping;
10543  int i;
10544  if ((i=mapStr.find('='))!=-1)
10545  {
10546  QCString ext=mapStr.left(i).stripWhiteSpace().lower();
10547  QCString language=mapStr.mid(i+1).stripWhiteSpace().lower();
10548  if (!updateLanguageMapping(ext,language))
10549  {
10550  err("Failed to map file extension '%s' to unsupported language '%s'.\n"
10551  "Check the EXTENSION_MAPPING setting in the config file.\n",
10552  ext.data(),language.data());
10553  }
10554  else
10555  {
10556  msg("Adding custom extension mapping: .%s will be treated as language %s\n",
10557  ext.data(),language.data());
10558  }
10559  }
10560  mapping = extMaps.next();
10561  }
10562 
10563 
10564  // add predefined macro name to a dictionary
10565  QStrList &expandAsDefinedList =Config_getList("EXPAND_AS_DEFINED");
10566  s=expandAsDefinedList.first();
10567  while (s)
10568  {
10569  if (Doxygen::expandAsDefinedDict[s]==0)
10570  {
10571  Doxygen::expandAsDefinedDict.insert(s,(void *)666);
10572  }
10573  s=expandAsDefinedList.next();
10574  }
10575 
10576  // read aliases and store them in a dictionary
10577  readAliases();
10578 
10579  // store number of spaces in a tab into Doxygen::spaces
10580  int &tabSize = Config_getInt("TAB_SIZE");
10581  Doxygen::spaces.resize(tabSize+1);
10582  int sp;for (sp=0;sp<tabSize;sp++) Doxygen::spaces.at(sp)=' ';
10583  Doxygen::spaces.at(tabSize)='\0';
10584 }
static QDict< RefList > * xrefLists
Definition: doxygen.h:129
static bool markdownSupport
Definition: doxygen.h:153
bool resize(uint newlen)
Definition: qcstring.h:225
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
void msg(const char *fmt,...)
Definition: message.cpp:107
static QCString htmlFileExtension
Definition: doxygen.h:130
type * first()
Definition: qinternallist.h:87
char & at(uint i) const
Definition: qcstring.h:326
void addSearchDir(const char *dir)
#define Config_getList(val)
Definition: config.cpp:662
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static bool parseSourcesNeeded
Definition: doxygen.h:131
#define Config_getEnum(val)
Definition: config.cpp:663
#define Config_getInt(val)
Definition: config.cpp:661
static SrcLangExt language
Definition: scanner.cpp:10895
bool setTranslator(const char *langName)
Definition: language.cpp:159
bool updateLanguageMapping(const QCString &extension, const QCString &language)
Definition: util.cpp:6964
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
#define Config_getBool(val)
Definition: config.cpp:664
type * next()
Definition: qinternallist.h:89
void err(const char *fmt,...)
Definition: message.cpp:226
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static QDict< void > expandAsDefinedDict
Definition: doxygen.h:127
void readAliases()
Definition: doxygen.cpp:9831
static QCString spaces
Definition: doxygen.h:151
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
QCString lower() const
Definition: qcstring.cpp:263
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
void warn_uncond(const char *fmt,...)
Definition: message.cpp:218
void checkConfiguration ( )

check and resolve config options

Definition at line 10493 of file doxygen.cpp.

10494 {
10495 
10496  Config::instance()->substituteEnvironmentVars();
10497  Config::instance()->convertStrToVal();
10498  Config::instance()->check();
10499 
10501 }
const std::string instance
void initWarningFormat()
Definition: message.cpp:38
void cleanUpDoxygen ( )

Definition at line 10070 of file doxygen.cpp.

10071 {
10072  delete Doxygen::sectionDict;
10073  delete Doxygen::formulaNameDict;
10074  delete Doxygen::formulaDict;
10075  delete Doxygen::formulaList;
10076  delete Doxygen::indexList;
10077  delete Doxygen::genericsDict;
10078  delete Doxygen::inputNameDict;
10079  delete Doxygen::includeNameDict;
10080  delete Doxygen::exampleNameDict;
10081  delete Doxygen::imageNameDict;
10082  delete Doxygen::dotFileNameDict;
10083  delete Doxygen::mscFileNameDict;
10084  delete Doxygen::diaFileNameDict;
10085  delete Doxygen::mainPage;
10086  delete Doxygen::pageSDict;
10087  delete Doxygen::exampleSDict;
10088  delete Doxygen::globalScope;
10089  delete Doxygen::xrefLists;
10090  delete Doxygen::parserManager;
10092  delete theTranslator;
10093  delete g_outputList;
10095  codeFreeScanner();
10096 
10097  if (Doxygen::symbolMap)
10098  {
10099  // iterate through Doxygen::symbolMap and delete all
10100  // DefinitionList objects, since they have no owner
10101  QDictIterator<DefinitionIntf> dli(*Doxygen::symbolMap);
10102  DefinitionIntf *di;
10103  for (dli.toFirst();(di=dli.current());)
10104  {
10106  {
10107  DefinitionIntf *tmp = Doxygen::symbolMap->take(dli.currentKey());
10108  delete (DefinitionList *)tmp;
10109  }
10110  else
10111  {
10112  ++dli;
10113  }
10114  }
10115  }
10116 
10117  delete Doxygen::inputNameList;
10118  delete Doxygen::memberNameSDict;
10120  delete Doxygen::groupSDict;
10121  delete Doxygen::classSDict;
10122  delete Doxygen::hiddenClasses;
10123  delete Doxygen::namespaceSDict;
10124  delete Doxygen::directories;
10125 
10126  //delete Doxygen::symbolMap; <- we cannot do this unless all static lists
10127  // (such as Doxygen::namespaceSDict)
10128  // with objects based on Definition are made
10129  // dynamic first
10130 }
static QDict< RefList > * xrefLists
Definition: doxygen.h:129
static GroupSDict * groupSDict
Definition: doxygen.h:119
static MemberNameSDict * functionNameSDict
Definition: doxygen.h:116
static PageSDict * exampleSDict
Definition: doxygen.h:101
static FileNameDict * includeNameDict
Definition: doxygen.h:105
static ClassSDict * hiddenClasses
Definition: doxygen.h:100
static FormulaDict * formulaDict
Definition: doxygen.h:122
static FileNameList * inputNameList
Definition: doxygen.h:109
static OutputList * g_outputList
Definition: doxygen.cpp:178
static FormulaDict * formulaNameDict
Definition: doxygen.h:123
static FileNameDict * inputNameDict
Definition: doxygen.h:108
static FileNameDict * exampleNameDict
Definition: doxygen.h:106
void cleanUpPreprocessor()
static NamespaceSDict * namespaceSDict
Definition: doxygen.h:120
static NamespaceDef * globalScope
Definition: doxygen.h:128
static ParserManager * parserManager
Definition: doxygen.h:141
virtual DefType definitionType() const =0
static FormulaList * formulaList
Definition: doxygen.h:121
static void freeMappers()
Definition: cmdmapper.cpp:254
static DirSDict * directories
Definition: doxygen.h:139
static QDict< DefinitionIntf > * symbolMap
Definition: doxygen.h:134
static SectionDict * sectionDict
Definition: doxygen.h:117
static PageSDict * pageSDict
Definition: doxygen.h:102
string tmp
Definition: languages.py:63
static FileNameDict * diaFileNameDict
Definition: doxygen.h:113
static FileNameDict * imageNameDict
Definition: doxygen.h:110
static FileNameDict * dotFileNameDict
Definition: doxygen.h:111
static GenericsSDict * genericsDict
Definition: doxygen.h:154
static MemberNameSDict * memberNameSDict
Definition: doxygen.h:115
void codeFreeScanner()
Definition: code.cpp:16505
Translator * theTranslator
Definition: language.cpp:157
static ClassSDict * classSDict
Definition: doxygen.h:99
static PageDef * mainPage
Definition: doxygen.h:103
static IndexList * indexList
Definition: doxygen.h:149
static FileNameDict * mscFileNameDict
Definition: doxygen.h:112
void copyAndFilterFile ( const char *  fileName,
BufStr dest 
)
void generateOutput ( )

add extra languages for which we can only produce syntax highlighted code

Definition at line 11379 of file doxygen.cpp.

11380 {
11381  /**************************************************************************
11382  * Initialize output generators *
11383  **************************************************************************/
11384 
11385  /// add extra languages for which we can only produce syntax highlighted code
11387 
11388  //// dump all symbols
11389  if (g_dumpSymbolMap)
11390  {
11391  dumpSymbolMap();
11392  exit(0);
11393  }
11394 
11396 
11397  bool generateHtml = Config_getBool("GENERATE_HTML");
11398  bool generateLatex = Config_getBool("GENERATE_LATEX");
11399  bool generateMan = Config_getBool("GENERATE_MAN");
11400  bool generateRtf = Config_getBool("GENERATE_RTF");
11401 
11402 
11403  g_outputList = new OutputList(TRUE);
11404  if (generateHtml)
11405  {
11408 
11409  // add HTML indexers that are enabled
11410  bool generateHtmlHelp = Config_getBool("GENERATE_HTMLHELP");
11411  bool generateEclipseHelp = Config_getBool("GENERATE_ECLIPSEHELP");
11412  bool generateQhp = Config_getBool("GENERATE_QHP");
11413  bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
11414  bool generateDocSet = Config_getBool("GENERATE_DOCSET");
11415  if (generateEclipseHelp) Doxygen::indexList->addIndex(new EclipseHelp);
11416  if (generateHtmlHelp) Doxygen::indexList->addIndex(new HtmlHelp);
11417  if (generateQhp) Doxygen::indexList->addIndex(new Qhp);
11418  if (generateTreeView) Doxygen::indexList->addIndex(new FTVHelp(TRUE));
11419  if (generateDocSet) Doxygen::indexList->addIndex(new DocSets);
11422  }
11423  if (generateLatex)
11424  {
11427  }
11428  if (generateMan)
11429  {
11432  }
11433  if (generateRtf)
11434  {
11437  }
11438  if (Config_getBool("USE_HTAGS"))
11439  {
11441  QCString htmldir = Config_getString("HTML_OUTPUT");
11442  if (!Htags::execute(htmldir))
11443  err("USE_HTAGS is YES but htags(1) failed. \n");
11444  if (!Htags::loadFilemap(htmldir))
11445  err("htags(1) ended normally but failed to load the filemap. \n");
11446  }
11447 
11448  /**************************************************************************
11449  * Generate documentation *
11450  **************************************************************************/
11451 
11452  if (generateHtml) writeDoxFont(Config_getString("HTML_OUTPUT"));
11453  if (generateLatex) writeDoxFont(Config_getString("LATEX_OUTPUT"));
11454  if (generateRtf) writeDoxFont(Config_getString("RTF_OUTPUT"));
11455 
11456  g_s.begin("Generating style sheet...\n");
11457  //printf("writing style info\n");
11458  g_outputList->writeStyleInfo(0); // write first part
11459  g_s.end();
11460 
11461  static bool searchEngine = Config_getBool("SEARCHENGINE");
11462  static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
11463 
11464  g_s.begin("Generating search indices...\n");
11465  if (searchEngine && !serverBasedSearch && (generateHtml || g_useOutputTemplate))
11466  {
11468  }
11469 
11470  // generate search indices (need to do this before writing other HTML
11471  // pages as these contain a drop down menu with options depending on
11472  // what categories we find in this function.
11473  if (generateHtml && searchEngine)
11474  {
11475  QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search";
11476  QDir searchDir(searchDirName);
11477  if (!searchDir.exists() && !searchDir.mkdir(searchDirName))
11478  {
11479  err("Could not create search results directory '%s' $PWD='%s'\n",
11480  searchDirName.data(),QDir::currentDirPath().data());
11481  exit(1);
11482  }
11483  HtmlGenerator::writeSearchData(searchDirName);
11484  if (!serverBasedSearch) // client side search index
11485  {
11487  }
11488  }
11489  g_s.end();
11490 
11491  g_s.begin("Generating example documentation...\n");
11493  g_s.end();
11494 
11495  if (!Htags::useHtags)
11496  {
11497  g_s.begin("Generating file sources...\n");
11499  g_s.end();
11500  }
11501 
11502  g_s.begin("Generating file documentation...\n");
11503  generateFileDocs();
11504  g_s.end();
11505 
11506  g_s.begin("Generating page documentation...\n");
11507  generatePageDocs();
11508  g_s.end();
11509 
11510  g_s.begin("Generating group documentation...\n");
11512  g_s.end();
11513 
11514  g_s.begin("Generating class documentation...\n");
11516  g_s.end();
11517 
11518  g_s.begin("Generating namespace index...\n");
11520  g_s.end();
11521 
11522  if (Config_getBool("GENERATE_LEGEND"))
11523  {
11524  g_s.begin("Generating graph info page...\n");
11526  g_s.end();
11527  }
11528 
11529  g_s.begin("Generating directory documentation...\n");
11531  g_s.end();
11532 
11533  if (Doxygen::formulaList->count()>0 && generateHtml
11534  && !Config_getBool("USE_MATHJAX"))
11535  {
11536  g_s.begin("Generating bitmaps for formulas in HTML...\n");
11538  g_s.end();
11539  }
11540 
11541  if (Config_getBool("SORT_GROUP_NAMES"))
11542  {
11545  GroupDef *gd;
11546  for (gli.toFirst();(gd=gli.current());++gli)
11547  {
11548  gd->sortSubGroups();
11549  }
11550  }
11551 
11552  if (g_outputList->count()>0)
11553  {
11555  }
11556 
11557  g_s.begin("finalizing index lists...\n");
11559  g_s.end();
11560 
11561  g_s.begin("writing tag file...\n");
11562  writeTagFile();
11563  g_s.end();
11564 
11565  if (Config_getBool("DOT_CLEANUP"))
11566  {
11567  if (generateHtml)
11568  removeDoxFont(Config_getString("HTML_OUTPUT"));
11569  if (generateRtf)
11570  removeDoxFont(Config_getString("RTF_OUTPUT"));
11571  if (generateLatex)
11572  removeDoxFont(Config_getString("LATEX_OUTPUT"));
11573  }
11574 
11575  if (Config_getBool("GENERATE_XML"))
11576  {
11577  g_s.begin("Generating XML output...\n");
11579  generateXML();
11581  g_s.end();
11582  }
11583  if (USE_SQLITE3)
11584  {
11585  g_s.begin("Generating SQLITE3 output...\n");
11586  generateSqlite3();
11587  g_s.end();
11588  }
11589 
11590  if (Config_getBool("GENERATE_DOCBOOK"))
11591  {
11592  g_s.begin("Generating Docbook output...\n");
11593  generateDocbook();
11594  g_s.end();
11595  }
11596 
11597  if (Config_getBool("GENERATE_AUTOGEN_DEF"))
11598  {
11599  g_s.begin("Generating AutoGen DEF output...\n");
11600  generateDEF();
11601  g_s.end();
11602  }
11603  if (Config_getBool("GENERATE_PERLMOD"))
11604  {
11605  g_s.begin("Generating Perl module output...\n");
11606  generatePerlMod();
11607  g_s.end();
11608  }
11609  if (generateHtml && searchEngine && serverBasedSearch)
11610  {
11611  g_s.begin("Generating search index\n");
11612  if (Doxygen::searchIndex->kind()==SearchIndexIntf::Internal) // write own search index
11613  {
11615  Doxygen::searchIndex->write(Config_getString("HTML_OUTPUT")+"/search/search.idx");
11616  }
11617  else // write data for external search index
11618  {
11620  QCString searchDataFile = Config_getString("SEARCHDATA_FILE");
11621  if (searchDataFile.isEmpty())
11622  {
11623  searchDataFile="searchdata.xml";
11624  }
11625  if (!portable_isAbsolutePath(searchDataFile))
11626  {
11627  searchDataFile.prepend(Config_getString("OUTPUT_DIRECTORY")+"/");
11628  }
11629  Doxygen::searchIndex->write(searchDataFile);
11630  }
11631  g_s.end();
11632  }
11633 
11635 
11636  if (generateRtf)
11637  {
11638  g_s.begin("Combining RTF output...\n");
11639  if (!RTFGenerator::preProcessFileInplace(Config_getString("RTF_OUTPUT"),"refman.rtf"))
11640  {
11641  err("An error occurred during post-processing the RTF files!\n");
11642  }
11643  g_s.end();
11644  }
11645 
11646  if (Config_getBool("HAVE_DOT"))
11647  {
11648  g_s.begin("Running dot...\n");
11650  g_s.end();
11651  }
11652 
11653  // copy static stuff
11654  if (generateHtml)
11655  {
11657  copyStyleSheet();
11658  copyLogo();
11659  copyExtraFiles("HTML_EXTRA_FILES","HTML_OUTPUT");
11660  }
11661  if (generateLatex)
11662  {
11664  copyExtraFiles("LATEX_EXTRA_FILES","LATEX_OUTPUT");
11665  }
11666 
11667  if (generateHtml &&
11668  Config_getBool("GENERATE_HTMLHELP") &&
11669  !Config_getString("HHC_LOCATION").isEmpty())
11670  {
11671  g_s.begin("Running html help compiler...\n");
11672  QString oldDir = QDir::currentDirPath();
11673  QDir::setCurrent(Config_getString("HTML_OUTPUT"));
11675  if (portable_system(Config_getString("HHC_LOCATION"), "index.hhp", Debug::isFlagSet(Debug::ExtCmd)))
11676  {
11677  err("failed to run html help compiler on index.hhp\n");
11678  }
11680  QDir::setCurrent(oldDir);
11681  g_s.end();
11682  }
11683  if ( generateHtml &&
11684  Config_getBool("GENERATE_QHP") &&
11685  !Config_getString("QHG_LOCATION").isEmpty())
11686  {
11687  g_s.begin("Running qhelpgenerator...\n");
11688  QCString const qhpFileName = Qhp::getQhpFileName();
11689  QCString const qchFileName = getQchFileName();
11690 
11691  QCString const args = QCString().sprintf("%s -o \"%s\"", qhpFileName.data(), qchFileName.data());
11692  QString const oldDir = QDir::currentDirPath();
11693  QDir::setCurrent(Config_getString("HTML_OUTPUT"));
11695  if (portable_system(Config_getString("QHG_LOCATION"), args.data(), FALSE))
11696  {
11697  err("failed to run qhelpgenerator on index.qhp\n");
11698  }
11700  QDir::setCurrent(oldDir);
11701  g_s.end();
11702  }
11703 
11704  int cacheParam;
11705  msg("lookup cache used %d/%d hits=%d misses=%d\n",
11708  Doxygen::lookupCache->hits(),
11709  Doxygen::lookupCache->misses());
11710  cacheParam = computeIdealCacheParam(Doxygen::lookupCache->misses()*2/3); // part of the cache is flushed, hence the 2/3 correction factor
11711  if (cacheParam>Config_getInt("LOOKUP_CACHE_SIZE"))
11712  {
11713  msg("Note: based on cache misses the ideal setting for LOOKUP_CACHE_SIZE is %d at the cost of higher memory usage.\n",cacheParam);
11714  }
11715 
11717  {
11718  msg("Total elapsed time: %.3f seconds\n(of which %.3f seconds waiting for external tools to finish)\n",
11719  ((double)Doxygen::runningTime.elapsed())/1000.0,
11721  );
11722  g_s.print();
11723  }
11724  else
11725  {
11726  msg("finished...\n");
11727  }
11728 
11729 
11730  /**************************************************************************
11731  * Start cleaning up *
11732  **************************************************************************/
11733 
11734  cleanUpDoxygen();
11735 
11738  QDir thisDir;
11739  thisDir.remove(Doxygen::objDBFileName);
11742  delete Doxygen::symbolMap;
11743  delete Doxygen::clangUsrMap;
11744  delete Doxygen::symbolStorage;
11746 }
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
static GroupSDict * groupSDict
Definition: doxygen.h:119
bool portable_isAbsolutePath(const char *fileName)
Definition: portable.cpp:434
void portable_sysTimerStop()
Definition: portable.cpp:415
uint count() const
Definition: outputlist.h:61
void begin(const char *name)
Definition: doxygen.cpp:216
void generateOutputViaTemplate()
Definition: context.cpp:10068
static void init()
Definition: mangen.cpp:108
static void generateGroupDocs()
Definition: doxygen.cpp:9007
bool isEmpty() const
Definition: qcstring.h:189
virtual bool remove(const QString &fileName, bool acceptAbsPath=TRUE)
Definition: qdir.cpp:915
void msg(const char *fmt,...)
Definition: message.cpp:107
static bool loadFilemap(const QCString &htmldir)
Definition: htags.cpp:105
static void writeExternalSearchPage()
Definition: htmlgen.cpp:2281
class Statistics g_s
static void init()
Definition: latexgen.cpp:437
static void writeTabData()
Additional initialization after indices have been created.
Definition: htmlgen.cpp:752
static Store * symbolStorage
Definition: doxygen.h:143
double portable_getSysElapsedTime()
Definition: portable.cpp:420
static bool execute(const QCString &htmldir)
Definition: htags.cpp:37
static DotManager * instance()
Definition: dot.cpp:1221
const bool FALSE
Definition: qglobal.h:370
static OutputList * g_outputList
Definition: doxygen.cpp:178
static bool preProcessFileInplace(const char *path, const char *name)
Definition: rtfgen.cpp:2587
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
Definition: qhp.h:23
void generateDEF()
Definition: defgen.cpp:558
static QCString args
Definition: declinfo.cpp:674
static void copyLatexStyleSheet()
Definition: doxygen.cpp:9190
void removeDoxFont(const char *dir)
Definition: logos.cpp:1981
static void generateExampleDocs()
Definition: doxygen.cpp:8975
static int computeIdealCacheParam(uint v)
Definition: doxygen.cpp:10132
void writeDoxFont(const char *dir)
Definition: logos.cpp:1968
void sortSubGroups()
Definition: groupdef.cpp:1635
void portable_sysTimerStart()
Definition: portable.cpp:410
#define Config_getInt(val)
Definition: config.cpp:661
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
static void copyExtraFiles(const QCString &filesOption, const QCString &outputOption)
Definition: doxygen.cpp:9278
static void deleteAllCodecs()
Definition: qtextcodec.cpp:81
const char * data() const
Definition: qstring.h:542
static void copyLogo()
Definition: doxygen.cpp:9258
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
static FormulaList * formulaList
Definition: doxygen.h:121
static QCString getQhpFileName()
Definition: qhp.cpp:280
void end()
Definition: doxygen.cpp:223
void createJavascriptSearchIndex()
static void writeSearchData(const char *dir)
Definition: htmlgen.cpp:781
void generateDirDocs(OutputList &ol)
Definition: dirdef.cpp:942
void generatePerlMod()
void finializeSearchIndexer()
static QCString objDBFileName
Definition: doxygen.h:144
void generateDocbook()
static QString currentDirPath()
Definition: qdir_unix.cpp:141
virtual void write(const char *file)=0
void writeStyleInfo(int part)
Definition: outputlist.h:95
static QDict< DefinitionIntf > * symbolMap
Definition: doxygen.h:134
static void generateFileDocs()
Definition: doxygen.cpp:7959
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
static void generateFileSources()
Definition: doxygen.cpp:7817
static bool generatingXmlOutput
Definition: doxygen.h:152
const char * data() const
Definition: qcstring.h:207
static void copyStyleSheet()
Definition: doxygen.cpp:9217
#define Config_getString(val)
Definition: config.cpp:660
void initialize()
Definition: index.h:129
#define Config_getBool(val)
Definition: config.cpp:664
static void writeSearchPage()
Definition: htmlgen.cpp:2193
static void writeTagFile()
Definition: doxygen.cpp:10604
static void deleteInstance()
Definition: config.h:305
void initSearchIndexer()
static void init()
Definition: rtfgen.cpp:166
static QCString getQchFileName()
Definition: doxygen.cpp:10726
void err(const char *fmt,...)
Definition: message.cpp:226
void print()
Definition: doxygen.cpp:227
static QDict< Definition > * clangUsrMap
Definition: doxygen.h:135
static bool g_dumpSymbolMap
Definition: doxygen.cpp:182
void finalize()
Definition: index.h:131
static void generateTreeViewImages()
Definition: ftvhelp.cpp:690
static bool g_successfulRun
Definition: doxygen.cpp:181
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
bool run()
Definition: dot.cpp:1317
static void generateClassDocs()
Definition: doxygen.cpp:8138
static void init()
Definition: htmlgen.cpp:683
void writeGraphInfo(OutputList &ol)
Definition: index.cpp:3245
void sort()
Definition: sortdict.h:188
static bool useHtags
Definition: htags.h:23
void cleanUpDoxygen()
Definition: doxygen.cpp:10070
void addCodeOnlyMappings()
Definition: util.cpp:7056
void generateXML()
Definition: xmlgen.cpp:1839
void add(const OutputGenerator *)
Definition: outputlist.cpp:44
static bool g_useOutputTemplate
Definition: doxygen.cpp:183
void generateBitmaps(const char *path)
Definition: formula.cpp:49
#define USE_SQLITE3
Definition: settings.h:3
static void generatePageDocs()
Definition: doxygen.cpp:8897
void writeIndexHierarchy(OutputList &ol)
Definition: index.cpp:4279
friend class Iterator
Definition: sortdict.h:289
void writeJavascriptSearchIndex()
static QCache< LookupInfo > * lookupCache
Definition: doxygen.h:138
void generateSqlite3()
static bool isFlagSet(DebugMask mask)
Definition: debug.cpp:119
static void generateNamespaceDocs()
Definition: doxygen.cpp:9040
void addIndex(IndexIntf *intf)
Definition: index.h:119
static void dumpSymbolMap()
Definition: doxygen.cpp:9892
const bool TRUE
Definition: qglobal.h:371
static QTime runningTime
Definition: doxygen.h:132
static IndexList * indexList
Definition: doxygen.h:149
static bool setCurrent(const QString &path)
Definition: qdir_unix.cpp:134
void close()
Definition: store.cpp:101
int portable_system(const char *command, const char *args, bool commandHasConsole)
Definition: portable.cpp:33
void initDoxygen ( )

Definition at line 9979 of file doxygen.cpp.

9980 {
9981  initResources();
9982  const char *lang = portable_getenv("LC_ALL");
9983  if (lang) portable_setenv("LANG",lang);
9984  setlocale(LC_ALL,"");
9985  setlocale(LC_CTYPE,"C"); // to get isspace(0xA0)==0, needed for UTF-8
9986  setlocale(LC_NUMERIC,"C");
9987 
9989  initPreprocessor();
9990 
10002 
10003  // register any additional parsers here...
10004 
10009 
10010  Doxygen::symbolMap = new QDict<DefinitionIntf>(50177);
10011 #ifdef USE_LIBCLANG
10012  Doxygen::clangUsrMap = new QDict<Definition>(50177);
10013 #endif
10015  Doxygen::inputNameList->setAutoDelete(TRUE);
10020  Doxygen::groupSDict = new GroupSDict(17);
10022  Doxygen::globalScope = new NamespaceDef("<globalScope>",1,1,"<globalScope>");
10025  Doxygen::classSDict = new ClassSDict(1009);
10029  Doxygen::directories = new DirSDict(17);
10031  Doxygen::pageSDict = new PageSDict(1009); // all doc pages
10033  Doxygen::exampleSDict = new PageSDict(1009); // all examples
10035  Doxygen::inputNameDict = new FileNameDict(10007);
10038  Doxygen::exampleNameDict->setAutoDelete(TRUE);
10040  Doxygen::imageNameDict->setAutoDelete(TRUE);
10045  Doxygen::tagDestinationDict.setAutoDelete(TRUE);
10047  Doxygen::citeDict = new CiteDict(257);
10051  Doxygen::formulaDict = new FormulaDict(1009);
10053  Doxygen::sectionDict = new SectionDict(257);
10055 
10056  /**************************************************************************
10057  * Initialize some global constants
10058  **************************************************************************/
10059 
10060  g_compoundKeywordDict.insert("template class",(void *)8);
10061  g_compoundKeywordDict.insert("template struct",(void *)8);
10062  g_compoundKeywordDict.insert("class",(void *)8);
10063  g_compoundKeywordDict.insert("struct",(void *)8);
10064  g_compoundKeywordDict.insert("union",(void *)8);
10065  g_compoundKeywordDict.insert("interface",(void *)8);
10066  g_compoundKeywordDict.insert("exception",(void *)8);
10067 
10068 }
static CiteDict * citeDict
Definition: doxygen.h:146
static GroupSDict * groupSDict
Definition: doxygen.h:119
static MemberNameSDict * functionNameSDict
Definition: doxygen.h:116
static SDict< DirRelation > dirRelations
Definition: doxygen.h:140
static PageSDict * exampleSDict
Definition: doxygen.h:101
void initFileMemberIndices()
Definition: index.cpp:2396
static FileNameDict * includeNameDict
Definition: doxygen.h:105
static ClassSDict * hiddenClasses
Definition: doxygen.h:100
void start()
Definition: qdatetime.cpp:949
const char * portable_getenv(const char *variable)
Definition: portable.cpp:317
Python Language parser using state-based lexical scanning.
Definition: pyscanner.h:34
static FormulaDict * formulaDict
Definition: doxygen.h:122
Tcl language parser using state-based lexical scanning.
Definition: tclscanner.h:28
C-like language parser using state-based lexical scanning.
Definition: scanner.h:29
static FileNameList * inputNameList
Definition: doxygen.h:109
void registerDefaultParser(ParserInterface *parser)
Definition: parserintf.h:155
static FormulaDict * formulaNameDict
Definition: doxygen.h:123
static FileNameDict * inputNameDict
Definition: doxygen.h:108
void registerParser(const char *name, ParserInterface *parser)
Definition: parserintf.h:166
Fortran language parser using state-based lexical scanning.
static FileNameDict * exampleNameDict
Definition: doxygen.h:106
void initDefaultExtensionMapping()
Definition: util.cpp:6999
void setAutoDelete(bool val)
Definition: sortdict.h:222
static NamespaceSDict * namespaceSDict
Definition: doxygen.h:120
static NamespaceDef * globalScope
Definition: doxygen.h:128
static ParserManager * parserManager
Definition: doxygen.h:141
static StringDict tagDestinationDict
Definition: doxygen.h:124
static FormulaList * formulaList
Definition: doxygen.h:121
void initResources()
General file parser.
Definition: fileparser.h:22
static DirSDict * directories
Definition: doxygen.h:139
static QDict< DefinitionIntf > * symbolMap
Definition: doxygen.h:134
static SectionDict * sectionDict
Definition: doxygen.h:117
Manages programming language parsers.
Definition: parserintf.h:143
static PageSDict * pageSDict
Definition: doxygen.h:102
static QIntDict< MemberGroupInfo > memGrpInfoDict
Definition: doxygen.h:126
void initPreprocessor()
static FileNameDict * diaFileNameDict
Definition: doxygen.h:113
static QDict< Definition > * clangUsrMap
Definition: doxygen.h:135
static FileNameDict * imageNameDict
Definition: doxygen.h:110
void setAutoDelete(bool enable)
Definition: qcollection.h:55
void initNamespaceMemberIndices()
Definition: index.cpp:2339
void portable_setenv(const char *name, const char *value)
Definition: portable.cpp:202
static FileNameDict * dotFileNameDict
Definition: doxygen.h:111
static GenericsSDict * genericsDict
Definition: doxygen.h:154
static MemberNameSDict * memberNameSDict
Definition: doxygen.h:115
Cite database access class.
Definition: cite.h:56
void initClassMemberIndices()
Definition: index.cpp:2254
VHDL parser using state-based lexical scanning.
Definition: vhdljjparser.h:41
void setAutoDelete(bool enable)
Definition: qlist.h:99
static ClassSDict * classSDict
Definition: doxygen.h:99
A list of index interfaces.
Definition: index.h:53
const bool TRUE
Definition: qglobal.h:371
static QTime runningTime
Definition: doxygen.h:132
static IndexList * indexList
Definition: doxygen.h:149
static FileNameDict * mscFileNameDict
Definition: doxygen.h:112
static QDict< void > g_compoundKeywordDict(7)
void parseInput ( )

Definition at line 10880 of file doxygen.cpp.

10881 {
10882  atexit(exitDoxygen);
10883 
10884 
10885  /**************************************************************************
10886  * Make sure the output directory exists
10887  **************************************************************************/
10888  QCString &outputDirectory = Config_getString("OUTPUT_DIRECTORY");
10889  if (outputDirectory.isEmpty())
10890  {
10891  outputDirectory=QDir::currentDirPath().utf8();
10892  }
10893  else
10894  {
10895  QDir dir(outputDirectory);
10896  if (!dir.exists())
10897  {
10898  dir.setPath(QDir::currentDirPath());
10899  if (!dir.mkdir(outputDirectory))
10900  {
10901  err("tag OUTPUT_DIRECTORY: Output directory `%s' does not "
10902  "exist and cannot be created\n",outputDirectory.data());
10903  cleanUpDoxygen();
10904  exit(1);
10905  }
10906  else
10907  {
10908  msg("Notice: Output directory `%s' does not exist. "
10909  "I have created it for you.\n", outputDirectory.data());
10910  }
10911  dir.cd(outputDirectory);
10912  }
10913  outputDirectory=dir.absPath().utf8();
10914  }
10915 
10916  /**************************************************************************
10917  * Initialize global lists and dictionaries
10918  **************************************************************************/
10919 
10921 
10922  // also scale lookup cache with SYMBOL_CACHE_SIZE
10923  int cacheSize = Config_getInt("LOOKUP_CACHE_SIZE");
10924  if (cacheSize<0) cacheSize=0;
10925  if (cacheSize>9) cacheSize=9;
10926  uint lookupSize = 65536 << cacheSize;
10927  Doxygen::lookupCache = new QCache<LookupInfo>(lookupSize,lookupSize);
10929 
10930 #ifdef HAS_SIGNALS
10931  signal(SIGINT, stopDoxygen);
10932 #endif
10933 
10934  uint pid = portable_pid();
10935  Doxygen::objDBFileName.sprintf("doxygen_objdb_%d.tmp",pid);
10936  Doxygen::objDBFileName.prepend(outputDirectory+"/");
10937  Doxygen::entryDBFileName.sprintf("doxygen_entrydb_%d.tmp",pid);
10938  Doxygen::entryDBFileName.prepend(outputDirectory+"/");
10939 
10941  {
10942  err("Failed to open temporary file %s\n",Doxygen::objDBFileName.data());
10943  exit(1);
10944  }
10945 
10946 
10947 
10948  /**************************************************************************
10949  * Check/create output directorties *
10950  **************************************************************************/
10951 
10952  QCString htmlOutput;
10953  bool &generateHtml = Config_getBool("GENERATE_HTML");
10954  if (generateHtml || g_useOutputTemplate /* TODO: temp hack */)
10955  htmlOutput = createOutputDirectory(outputDirectory,"HTML_OUTPUT","/html");
10956 
10957  QCString docbookOutput;
10958  bool &generateDocbook = Config_getBool("GENERATE_DOCBOOK");
10959  if (generateDocbook)
10960  docbookOutput = createOutputDirectory(outputDirectory,"DOCBOOK_OUTPUT","/docbook");
10961 
10962  QCString xmlOutput;
10963  bool &generateXml = Config_getBool("GENERATE_XML");
10964  if (generateXml)
10965  xmlOutput = createOutputDirectory(outputDirectory,"XML_OUTPUT","/xml");
10966 
10967  QCString latexOutput;
10968  bool &generateLatex = Config_getBool("GENERATE_LATEX");
10969  if (generateLatex)
10970  latexOutput = createOutputDirectory(outputDirectory,"LATEX_OUTPUT","/latex");
10971 
10972  QCString rtfOutput;
10973  bool &generateRtf = Config_getBool("GENERATE_RTF");
10974  if (generateRtf)
10975  rtfOutput = createOutputDirectory(outputDirectory,"RTF_OUTPUT","/rtf");
10976 
10977  QCString manOutput;
10978  bool &generateMan = Config_getBool("GENERATE_MAN");
10979  if (generateMan)
10980  manOutput = createOutputDirectory(outputDirectory,"MAN_OUTPUT","/man");
10981 
10982  //QCString sqlOutput;
10983  //bool &generateSql = Config_getBool("GENERATE_SQLITE3");
10984  //if (generateSql)
10985  // sqlOutput = createOutputDirectory(outputDirectory,"SQLITE3_OUTPUT","/sqlite3");
10986 
10987  if (Config_getBool("HAVE_DOT"))
10988  {
10989  QCString curFontPath = Config_getString("DOT_FONTPATH");
10990  if (curFontPath.isEmpty())
10991  {
10992  portable_getenv("DOTFONTPATH");
10993  QCString newFontPath = ".";
10994  if (!curFontPath.isEmpty())
10995  {
10996  newFontPath+=portable_pathListSeparator();
10997  newFontPath+=curFontPath;
10998  }
10999  portable_setenv("DOTFONTPATH",newFontPath);
11000  }
11001  else
11002  {
11003  portable_setenv("DOTFONTPATH",curFontPath);
11004  }
11005  }
11006 
11007 
11008 
11009  /**************************************************************************
11010  * Handle layout file *
11011  **************************************************************************/
11012 
11014  QCString &layoutFileName = Config_getString("LAYOUT_FILE");
11015  bool defaultLayoutUsed = FALSE;
11016  if (layoutFileName.isEmpty())
11017  {
11018  layoutFileName = "DoxygenLayout.xml";
11019  defaultLayoutUsed = TRUE;
11020  }
11021 
11022  QFile layoutFile(layoutFileName);
11023  if (layoutFile.open(IO_ReadOnly))
11024  {
11025  msg("Parsing layout file %s...\n",layoutFileName.data());
11026  QTextStream t(&layoutFile);
11027  t.setEncoding(QTextStream::Latin1);
11028  LayoutDocManager::instance().parse(t,layoutFileName);
11029  }
11030  else if (!defaultLayoutUsed)
11031  {
11032  warn_uncond("failed to open layout file '%s' for reading!\n",layoutFileName.data());
11033  }
11034 
11035  /**************************************************************************
11036  * Read and preprocess input *
11037  **************************************************************************/
11038 
11039  // prevent search in the output directories
11040  QStrList &exclPatterns = Config_getList("EXCLUDE_PATTERNS");
11041  if (generateHtml) exclPatterns.append(htmlOutput);
11042  if (generateDocbook) exclPatterns.append(docbookOutput);
11043  if (generateXml) exclPatterns.append(xmlOutput);
11044  if (generateLatex) exclPatterns.append(latexOutput);
11045  if (generateRtf) exclPatterns.append(rtfOutput);
11046  if (generateMan) exclPatterns.append(manOutput);
11047 
11048  searchInputFiles();
11049 
11050  // Notice: the order of the function calls below is very important!
11051 
11052  if (Config_getBool("GENERATE_HTML"))
11053  {
11055  }
11056 
11057  /**************************************************************************
11058  * Handle Tag Files *
11059  **************************************************************************/
11060 
11061  g_storage = new FileStorage;
11063  if (!g_storage->open(IO_WriteOnly))
11064  {
11065  err("Failed to create temporary storage file %s\n",
11067  exit(1);
11068  }
11069  Entry *root=new Entry;
11070  EntryNav *rootNav = new EntryNav(0,root);
11071  rootNav->setEntry(root);
11072  msg("Reading and parsing tag files\n");
11073 
11074  QStrList &tagFileList = Config_getList("TAGFILES");
11075  char *s=tagFileList.first();
11076  while (s)
11077  {
11078  readTagFile(root,s);
11079  root->createNavigationIndex(rootNav,g_storage,0);
11080  s=tagFileList.next();
11081  }
11082 
11083  /**************************************************************************
11084  * Parse source files *
11085  **************************************************************************/
11086 
11087  if (Config_getBool("BUILTIN_STL_SUPPORT"))
11088  {
11089  addSTLClasses(rootNav);
11090  }
11091 
11092  g_s.begin("Parsing files\n");
11093  parseFiles(root,rootNav);
11094  g_storage->close();
11095  g_s.end();
11096 
11097  // we are done with input scanning now, so free up the buffers used by flex
11098  // (can be around 4MB)
11099  preFreeScanner();
11100  scanFreeScanner();
11102 
11103  if (!g_storage->open(IO_ReadOnly))
11104  {
11105  err("Failed to open temporary storage file %s for reading",
11107  exit(1);
11108  }
11109 
11110  /**************************************************************************
11111  * Gather information *
11112  **************************************************************************/
11113 
11114  g_s.begin("Building group list...\n");
11115  buildGroupList(rootNav);
11116  organizeSubGroups(rootNav);
11117  g_s.end();
11118 
11119  g_s.begin("Building directory list...\n");
11120  buildDirectories();
11121  findDirDocumentation(rootNav);
11122  g_s.end();
11123 
11124  g_s.begin("Building namespace list...\n");
11125  buildNamespaceList(rootNav);
11126  findUsingDirectives(rootNav);
11127  g_s.end();
11128 
11129  g_s.begin("Building file list...\n");
11130  buildFileList(rootNav);
11131  g_s.end();
11132  //generateFileTree();
11133 
11134  g_s.begin("Building class list...\n");
11135  buildClassList(rootNav);
11136  g_s.end();
11137 
11138  g_s.begin("Associating documentation with classes...\n");
11139  buildClassDocList(rootNav);
11140 
11141  // build list of using declarations here (global list)
11142  buildListOfUsingDecls(rootNav);
11143  g_s.end();
11144 
11145  g_s.begin("Computing nesting relations for classes...\n");
11147  g_s.end();
11148  // 1.8.2-20121111: no longer add nested classes to the group as well
11149  //distributeClassGroupRelations();
11150 
11151  // calling buildClassList may result in cached relations that
11152  // become invalid after resolveClassNestingRelations(), that's why
11153  // we need to clear the cache here
11155  // we don't need the list of using declaration anymore
11156  g_usingDeclarations.clear();
11157 
11158  g_s.begin("Building example list...\n");
11159  buildExampleList(rootNav);
11160  g_s.end();
11161 
11162  g_s.begin("Searching for enumerations...\n");
11163  findEnums(rootNav);
11164  g_s.end();
11165 
11166  // Since buildVarList calls isVarWithConstructor
11167  // and this calls getResolvedClass we need to process
11168  // typedefs first so the relations between classes via typedefs
11169  // are properly resolved. See bug 536385 for an example.
11170  g_s.begin("Searching for documented typedefs...\n");
11171  buildTypedefList(rootNav);
11172  g_s.end();
11173 
11174  g_s.begin("Searching for members imported via using declarations...\n");
11175  findUsingDeclImports(rootNav);
11176  // this should be after buildTypedefList in order to properly import
11177  // used typedefs
11178  findUsingDeclarations(rootNav);
11179  g_s.end();
11180 
11181  g_s.begin("Searching for included using directives...\n");
11183  g_s.end();
11184 
11185  g_s.begin("Searching for documented variables...\n");
11186  buildVarList(rootNav);
11187  g_s.end();
11188 
11189  g_s.begin("Building interface member list...\n");
11190  buildInterfaceAndServiceList(rootNav); // UNO IDL
11191 
11192  g_s.begin("Building member list...\n"); // using class info only !
11193  buildFunctionList(rootNav);
11194  g_s.end();
11195 
11196  g_s.begin("Searching for friends...\n");
11197  findFriends();
11198  g_s.end();
11199 
11200  g_s.begin("Searching for documented defines...\n");
11201  findDefineDocumentation(rootNav);
11202  g_s.end();
11203 
11204  g_s.begin("Computing class inheritance relations...\n");
11205  findClassEntries(rootNav);
11207  g_s.end();
11208 
11209  g_s.begin("Computing class usage relations...\n");
11211  g_s.end();
11212 
11213  if (Config_getBool("INLINE_SIMPLE_STRUCTS"))
11214  {
11215  g_s.begin("Searching for tag less structs...\n");
11217  g_s.end();
11218  }
11219 
11220  g_s.begin("Flushing cached template relations that have become invalid...\n");
11222  g_s.end();
11223 
11224  g_s.begin("Creating members for template instances...\n");
11226  g_s.end();
11227 
11228  g_s.begin("Computing class relations...\n");
11231  if (Config_getBool("OPTIMIZE_OUTPUT_VHDL"))
11232  {
11234  }
11236  g_classEntries.clear();
11237  g_s.end();
11238 
11239  g_s.begin("Add enum values to enums...\n");
11240  addEnumValuesToEnums(rootNav);
11241  findEnumDocumentation(rootNav);
11242  g_s.end();
11243 
11244  g_s.begin("Searching for member function documentation...\n");
11245  findObjCMethodDefinitions(rootNav);
11246  findMemberDocumentation(rootNav); // may introduce new members !
11247 
11250  g_s.end();
11251 
11252  g_s.begin("Building page list...\n");
11253  buildPageList(rootNav);
11254  g_s.end();
11255 
11256  g_s.begin("Search for main page...\n");
11257  findMainPage(rootNav);
11258  findMainPageTagFiles(rootNav);
11259  g_s.end();
11260 
11261  g_s.begin("Computing page relations...\n");
11262  computePageRelations(rootNav);
11264  g_s.end();
11265 
11266  g_s.begin("Determining the scope of groups...\n");
11267  findGroupScope(rootNav);
11268  g_s.end();
11269 
11270  g_s.begin("Sorting lists...\n");
11275  g_s.end();
11276 
11277  msg("Freeing entry tree\n");
11278  delete rootNav;
11279  g_storage->close();
11280  delete g_storage;
11281  g_storage=0;
11282 
11283  QDir thisDir;
11285 
11286  g_s.begin("Determining which enums are documented\n");
11288  g_s.end();
11289 
11290  g_s.begin("Computing member relations...\n");
11291  mergeCategories();
11293  g_s.end();
11294 
11295  g_s.begin("Building full member lists recursively...\n");
11297  g_s.end();
11298 
11299  g_s.begin("Adding members to member groups.\n");
11301  g_s.end();
11302 
11303  if (Config_getBool("DISTRIBUTE_GROUP_DOC"))
11304  {
11305  g_s.begin("Distributing member group documentation.\n");
11307  g_s.end();
11308  }
11309 
11310  g_s.begin("Computing member references...\n");
11312  g_s.end();
11313 
11314  if (Config_getBool("INHERIT_DOCS"))
11315  {
11316  g_s.begin("Inheriting documentation...\n");
11318  g_s.end();
11319  }
11320 
11321  // compute the shortest possible names of all files
11322  // without losing the uniqueness of the file names.
11323  g_s.begin("Generating disk names...\n");
11325  g_s.end();
11326 
11327  g_s.begin("Adding source references...\n");
11329  g_s.end();
11330 
11331  g_s.begin("Adding xrefitems...\n");
11334  g_s.end();
11335 
11336  g_s.begin("Sorting member lists...\n");
11337  sortMemberLists();
11338  g_s.end();
11339 
11340  if (Config_getBool("DIRECTORY_GRAPH"))
11341  {
11342  g_s.begin("Computing dependencies between directories...\n");
11344  g_s.end();
11345  }
11346 
11347  //g_s.begin("Resolving citations...\n");
11348  //Doxygen::citeDict->resolve();
11349 
11350  g_s.begin("Generating citations page...\n");
11352  g_s.end();
11353 
11354  g_s.begin("Counting data structures...\n");
11356  g_s.end();
11357 
11358  g_s.begin("Resolving user defined references...\n");
11360  g_s.end();
11361 
11362  g_s.begin("Finding anchors and sections in the documentation...\n");
11364  g_s.end();
11365 
11366  g_s.begin("Transferring function references...\n");
11368  g_s.end();
11369 
11370  g_s.begin("Combining using relations...\n");
11372  g_s.end();
11373 
11374  g_s.begin("Adding members to index pages...\n");
11376  g_s.end();
11377 }
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
static void findGroupScope(EntryNav *rootNav)
Definition: doxygen.cpp:698
static CiteDict * citeDict
Definition: doxygen.h:146
static MemberNameSDict * functionNameSDict
Definition: doxygen.h:116
static void transferFunctionReferences()
Definition: doxygen.cpp:3958
void begin(const char *name)
Definition: doxygen.cpp:216
static void addSourceReferences()
Definition: doxygen.cpp:7986
static void createTemplateInstanceMembers()
Definition: doxygen.cpp:7745
void setName(const char *name)
Definition: filestorage.h:40
bool isEmpty() const
Definition: qcstring.h:189
virtual bool remove(const QString &fileName, bool acceptAbsPath=TRUE)
Definition: qdir.cpp:915
static void mergeCategories()
Definition: doxygen.cpp:7769
static void computeMemberReferences()
Definition: doxygen.cpp:5157
static void buildExampleList(EntryNav *rootNav)
Definition: doxygen.cpp:8918
void msg(const char *fmt,...)
Definition: message.cpp:107
class Statistics g_s
static void sortMemberLists()
Definition: doxygen.cpp:8066
void clear()
Definition: qcache.h:100
static ClassSDict * hiddenClasses
Definition: doxygen.h:100
void buildDirectories()
Definition: dirdef.cpp:872
static void parseFiles(Entry *root, EntryNav *rootNav)
parse the list of input files
Definition: doxygen.cpp:9387
const char * portable_getenv(const char *variable)
Definition: portable.cpp:317
#define IO_WriteOnly
Definition: qiodevice.h:62
Definition: entry.h:63
static void buildFileList(EntryNav *rootNav)
Definition: doxygen.cpp:766
static Store * symbolStorage
Definition: doxygen.h:143
type * first()
Definition: qinternallist.h:87
static void buildClassList(EntryNav *rootNav)
Definition: doxygen.cpp:1405
void generateDiskNames()
Definition: filename.cpp:121
int open(const char *, int)
Opens a file descriptor.
void readFormulaRepository()
Definition: doxygen.cpp:9751
static void resolveUserReferences()
Definition: doxygen.cpp:8825
const bool FALSE
Definition: qglobal.h:370
static FileNameList * inputNameList
Definition: doxygen.h:109
static void transferFunctionDocumentation()
Definition: doxygen.cpp:3927
static LayoutDocManager & instance()
Definition: layout.cpp:1359
static void buildVarList(EntryNav *rootNav)
Definition: doxygen.cpp:3051
static void flushCachedTemplateRelations()
Definition: doxygen.cpp:8346
Store implementation based on a file. Writing is linear, after that the file is re-opened for reading...
Definition: filestorage.h:28
#define Config_getList(val)
Definition: config.cpp:662
static void findDirDocumentation(EntryNav *rootNav)
Definition: doxygen.cpp:8588
static void resolveClassNestingRelations()
Definition: doxygen.cpp:1428
string dir
static void stopDoxygen(int)
Definition: doxygen.cpp:10587
static void combineUsingRelations()
Definition: doxygen.cpp:8184
void setEntry(Entry *e)
Definition: entry.cpp:425
void parse(QTextStream &t, const char *fileName)
Definition: layout.cpp:1385
static QDict< EntryNav > g_classEntries(1009)
static void inheritDocumentation()
Definition: doxygen.cpp:8146
static void buildTypedefList(EntryNav *rootNav)
Definition: doxygen.cpp:3023
#define IO_ReadOnly
Definition: qiodevice.h:61
static void transferRelatedFunctionDocumentation()
Definition: doxygen.cpp:4050
#define Config_getInt(val)
Definition: config.cpp:661
static void buildNamespaceList(EntryNav *rootNav)
Definition: doxygen.cpp:1711
void computeDirDependencies()
Definition: dirdef.cpp:924
static void readTagFile(Entry *root, const char *tl)
Definition: doxygen.cpp:9154
static void findMainPage(EntryNav *rootNav)
Definition: doxygen.cpp:8692
static void addSTLClasses(EntryNav *rootNav)
Definition: doxygen.cpp:451
static void findDefineDocumentation(EntryNav *rootNav)
Definition: doxygen.cpp:8444
static void findInheritedTemplateInstances()
Definition: doxygen.cpp:4994
static void addMembersToMemberGroup()
Definition: doxygen.cpp:8223
static void findIncludedUsingDirectives()
Definition: doxygen.cpp:2205
static void computeClassRelations()
Definition: doxygen.cpp:5036
void end()
Definition: doxygen.cpp:223
static void findEnumDocumentation(EntryNav *rootNav)
Definition: doxygen.cpp:7440
static void findSectionsInDocumentation()
Definition: doxygen.cpp:8301
static void findDocumentedEnumValues()
Definition: doxygen.cpp:7618
The Store is a file based memory manager.
Definition: store.h:52
static QCString objDBFileName
Definition: doxygen.h:144
static void addListReferences()
Definition: doxygen.cpp:5192
void generateDocbook()
static QString currentDirPath()
Definition: qdir_unix.cpp:141
static void findClassEntries(EntryNav *rootNav)
Definition: doxygen.cpp:4964
static void distributeMemberGroupDocumentation()
Definition: doxygen.cpp:8262
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
const char * data() const
Definition: qcstring.h:207
static void generateXRefPages()
Definition: doxygen.cpp:5286
char portable_pathListSeparator()
Definition: portable.cpp:364
static void buildClassDocList(EntryNav *rootNav)
Definition: doxygen.cpp:1417
#define Config_getString(val)
Definition: config.cpp:660
void searchInputFiles()
Definition: doxygen.cpp:10743
#define Config_getBool(val)
Definition: config.cpp:664
void preFreeScanner()
void generatePage() const
Definition: cite.cpp:114
void countDataStructures()
Definition: index.cpp:77
type * next()
Definition: qinternallist.h:89
void pyscanFreeScanner()
Definition: pyscanner.cpp:5007
void err(const char *fmt,...)
Definition: message.cpp:226
static void buildPageList(EntryNav *rootNav)
Definition: doxygen.cpp:8655
static void computeMemberRelations()
Definition: doxygen.cpp:7667
static void computeTemplateClassRelations()
Definition: doxygen.cpp:5075
static FileStorage * g_storage
Definition: doxygen.cpp:180
static void exitDoxygen()
Definition: doxygen.cpp:10685
static void buildGroupList(EntryNav *rootNav)
Definition: doxygen.cpp:683
static void organizeSubGroups(EntryNav *rootNav)
Definition: doxygen.cpp:754
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
void setAutoDelete(bool enable)
Definition: qcollection.h:55
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
static void findMemberDocumentation(EntryNav *rootNav)
Definition: doxygen.cpp:6964
static void buildInterfaceAndServiceList(EntryNav *const rootNav)
Definition: doxygen.cpp:3167
static void findFriends()
Definition: doxygen.cpp:3840
static void buildListOfUsingDecls(EntryNav *rootNav)
Definition: doxygen.cpp:1992
The QTextStream class provides basic functions for reading and writing text using a QIODevice...
Definition: qtextstream.h:53
void portable_setenv(const char *name, const char *value)
Definition: portable.cpp:202
void sort()
Definition: sortdict.h:188
static void findMainPageTagFiles(EntryNav *rootNav)
Definition: doxygen.cpp:8752
void cleanUpDoxygen()
Definition: doxygen.cpp:10070
static void findUsingDeclarations(EntryNav *rootNav)
Definition: doxygen.cpp:2018
static void findTagLessClasses(ClassDef *cd)
Definition: doxygen.cpp:1675
static void findUsingDirectives(EntryNav *rootNav)
Definition: doxygen.cpp:1848
static QCString entryDBFileName
Definition: doxygen.h:145
static MemberNameSDict * memberNameSDict
Definition: doxygen.h:115
static void findUsedTemplateInstances()
Definition: doxygen.cpp:5015
static void addMembersToIndex()
Definition: doxygen.cpp:7626
static void buildCompleteMemberLists()
Definition: doxygen.cpp:7793
static bool g_useOutputTemplate
Definition: doxygen.cpp:183
static QCString createOutputDirectory(const QCString &baseDirName, const char *formatDirOption, const char *defaultDirName)
Definition: doxygen.cpp:10702
static QDict< FileDef > g_usingDeclarations(1009)
static void computeVhdlComponentRelations()
bool open(int m)
Definition: filestorage.h:36
static QCache< LookupInfo > * lookupCache
Definition: doxygen.h:138
static void findObjCMethodDefinitions(EntryNav *rootNav)
Definition: doxygen.cpp:6995
void close()
Definition: filestorage.h:39
void createNavigationIndex(EntryNav *rootNav, FileStorage *storage, FileDef *fd)
Definition: entry.cpp:304
static void findUsingDeclImports(EntryNav *rootNav)
Definition: doxygen.cpp:2102
QCString utf8() const
Definition: qstring.cpp:14507
static void checkPageRelations()
Definition: doxygen.cpp:8802
static void findEnums(EntryNav *rootNav)
Definition: doxygen.cpp:7030
unsigned uint
Definition: qglobal.h:351
static ClassSDict * classSDict
Definition: doxygen.h:99
static void addEnumValuesToEnums(EntryNav *rootNav)
Definition: doxygen.cpp:7211
static void buildFunctionList(EntryNav *rootNav)
Definition: doxygen.cpp:3417
uint portable_pid()
Definition: portable.cpp:186
static QCString * s
Definition: config.cpp:1042
void scanFreeScanner()
Definition: scanner.cpp:22510
const bool TRUE
Definition: qglobal.h:371
static void flushUnresolvedRelations()
Definition: doxygen.cpp:8396
static void computePageRelations(EntryNav *rootNav)
Definition: doxygen.cpp:8767
void warn_uncond(const char *fmt,...)
Definition: message.cpp:218
void readAliases ( )

Definition at line 9831 of file doxygen.cpp.

9832 {
9833  // add aliases to a dictionary
9834  Doxygen::aliasDict.setAutoDelete(TRUE);
9835  QStrList &aliasList = Config_getList("ALIASES");
9836  const char *s=aliasList.first();
9837  while (s)
9838  {
9839  if (Doxygen::aliasDict[s]==0)
9840  {
9841  QCString alias=s;
9842  int i=alias.find('=');
9843  if (i>0)
9844  {
9845  QCString name=alias.left(i).stripWhiteSpace();
9846  QCString value=alias.right(alias.length()-i-1);
9847  //printf("Alias: found name=`%s' value=`%s'\n",name.data(),value.data());
9848  if (!name.isEmpty())
9849  {
9851  if (dn==0) // insert new alias
9852  {
9853  Doxygen::aliasDict.insert(name,new QCString(value));
9854  }
9855  else // overwrite previous alias
9856  {
9857  *dn=value;
9858  }
9859  }
9860  }
9861  }
9862  s=aliasList.next();
9863  }
9864  expandAliases();
9865  escapeAliases();
9866 }
static QCString name
Definition: declinfo.cpp:673
static void expandAliases()
Definition: doxygen.cpp:9784
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
type * first()
Definition: qinternallist.h:87
#define Config_getList(val)
Definition: config.cpp:662
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static StringDict aliasDict
Definition: doxygen.h:125
static void escapeAliases()
Definition: doxygen.cpp:9796
QCString right(uint len) const
Definition: qcstring.cpp:231
type * next()
Definition: qinternallist.h:89
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
void readConfiguration ( int  argc,
char **  argv 
)

Definition at line 10144 of file doxygen.cpp.

10145 {
10146  /**************************************************************************
10147  * Handle arguments *
10148  **************************************************************************/
10149 
10150  int optind=1;
10151  const char *configName=0;
10152  const char *layoutName=0;
10153  const char *debugLabel;
10154  const char *formatName;
10155  bool genConfig=FALSE;
10156  bool shortList=FALSE;
10157  bool updateConfig=FALSE;
10158  bool genLayout=FALSE;
10159  int retVal;
10160  while (optind<argc && argv[optind][0]=='-' &&
10161  (isalpha(argv[optind][1]) || argv[optind][1]=='?' ||
10162  argv[optind][1]=='-')
10163  )
10164  {
10165  switch(argv[optind][1])
10166  {
10167  case 'g':
10168  genConfig=TRUE;
10169  configName=getArg(argc,argv,optind);
10170  if (optind+1<argc && qstrcmp(argv[optind+1],"-")==0)
10171  { configName="-"; optind++; }
10172  if (!configName)
10173  { configName="Doxyfile"; }
10174  break;
10175  case 'l':
10176  genLayout=TRUE;
10177  layoutName=getArg(argc,argv,optind);
10178  if (!layoutName)
10179  { layoutName="DoxygenLayout.xml"; }
10180  break;
10181  case 'd':
10182  debugLabel=getArg(argc,argv,optind);
10183  if (!debugLabel)
10184  {
10185  err("option \"-d\" is missing debug specifier.\n");
10186  devUsage();
10187  cleanUpDoxygen();
10188  exit(1);
10189  }
10190  retVal = Debug::setFlag(debugLabel);
10191  if (!retVal)
10192  {
10193  err("option \"-d\" has unknown debug specifier: \"%s\".\n",debugLabel);
10194  cleanUpDoxygen();
10195  exit(1);
10196  }
10197  break;
10198  case 's':
10199  shortList=TRUE;
10200  break;
10201  case 'u':
10202  updateConfig=TRUE;
10203  break;
10204  case 'e':
10205  formatName=getArg(argc,argv,optind);
10206  if (!formatName)
10207  {
10208  err("option \"-e\" is missing format specifier rtf.\n");
10209  cleanUpDoxygen();
10210  exit(1);
10211  }
10212  if (qstricmp(formatName,"rtf")==0)
10213  {
10214  if (optind+1>=argc)
10215  {
10216  err("option \"-e rtf\" is missing an extensions file name\n");
10217  cleanUpDoxygen();
10218  exit(1);
10219  }
10220  QFile f;
10221  if (openOutputFile(argv[optind+1],f))
10222  {
10224  }
10225  cleanUpDoxygen();
10226  exit(0);
10227  }
10228  err("option \"-e\" has invalid format specifier.\n");
10229  cleanUpDoxygen();
10230  exit(1);
10231  break;
10232  case 'w':
10233  formatName=getArg(argc,argv,optind);
10234  if (!formatName)
10235  {
10236  err("option \"-w\" is missing format specifier rtf, html or latex\n");
10237  cleanUpDoxygen();
10238  exit(1);
10239  }
10240  if (qstricmp(formatName,"rtf")==0)
10241  {
10242  if (optind+1>=argc)
10243  {
10244  err("option \"-w rtf\" is missing a style sheet file name\n");
10245  cleanUpDoxygen();
10246  exit(1);
10247  }
10248  QFile f;
10249  if (openOutputFile(argv[optind+1],f))
10250  {
10252  }
10253  cleanUpDoxygen();
10254  exit(1);
10255  }
10256  else if (qstricmp(formatName,"html")==0)
10257  {
10258  if (optind+4<argc || QFileInfo("Doxyfile").exists())
10259  {
10260  QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
10261  if (!Config::instance()->parse(df))
10262  {
10263  err("error opening or reading configuration file %s!\n",argv[optind+4]);
10264  cleanUpDoxygen();
10265  exit(1);
10266  }
10267  Config::instance()->substituteEnvironmentVars();
10268  Config::instance()->convertStrToVal();
10269  // avoid bootstrapping issues when the config file already
10270  // refers to the files that we are supposed to parse.
10271  Config_getString("HTML_HEADER")="";
10272  Config_getString("HTML_FOOTER")="";
10273  Config::instance()->check();
10274  }
10275  else
10276  {
10277  Config::instance()->init();
10278  }
10279  if (optind+3>=argc)
10280  {
10281  err("option \"-w html\" does not have enough arguments\n");
10282  cleanUpDoxygen();
10283  exit(1);
10284  }
10285 
10286  QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
10287  if (!setTranslator(outputLanguage))
10288  {
10289  warn_uncond("Output language %s not supported! Using English instead.\n", outputLanguage.data());
10290  }
10291 
10292  QFile f;
10293  if (openOutputFile(argv[optind+1],f))
10294  {
10295  HtmlGenerator::writeHeaderFile(f, argv[optind+3]);
10296  }
10297  f.close();
10298  if (openOutputFile(argv[optind+2],f))
10299  {
10301  }
10302  f.close();
10303  if (openOutputFile(argv[optind+3],f))
10304  {
10306  }
10307  cleanUpDoxygen();
10308  exit(0);
10309  }
10310  else if (qstricmp(formatName,"latex")==0)
10311  {
10312  if (optind+4<argc || QFileInfo("Doxyfile").exists())
10313  {
10314  QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
10315  if (!Config::instance()->parse(df))
10316  {
10317  err("error opening or reading configuration file %s!\n",argv[optind+4]);
10318  cleanUpDoxygen();
10319  exit(1);
10320  }
10321  Config::instance()->substituteEnvironmentVars();
10322  Config::instance()->convertStrToVal();
10323  Config_getString("LATEX_HEADER")="";
10324  Config_getString("LATEX_FOOTER")="";
10325  Config::instance()->check();
10326  }
10327  else // use default config
10328  {
10329  Config::instance()->init();
10330  }
10331  if (optind+3>=argc)
10332  {
10333  err("option \"-w latex\" does not have enough arguments\n");
10334  cleanUpDoxygen();
10335  exit(1);
10336  }
10337 
10338  QCString outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
10339  if (!setTranslator(outputLanguage))
10340  {
10341  warn_uncond("Output language %s not supported! Using English instead.\n", outputLanguage.data());
10342  }
10343 
10344  QFile f;
10345  if (openOutputFile(argv[optind+1],f))
10346  {
10348  }
10349  f.close();
10350  if (openOutputFile(argv[optind+2],f))
10351  {
10353  }
10354  f.close();
10355  if (openOutputFile(argv[optind+3],f))
10356  {
10358  }
10359  cleanUpDoxygen();
10360  exit(0);
10361  }
10362  else
10363  {
10364  err("Illegal format specifier \"%s\": should be one of rtf, html or latex\n",formatName);
10365  cleanUpDoxygen();
10366  exit(1);
10367  }
10368  break;
10369  case 'm':
10371  break;
10372  case 'v':
10373  msg("%s\n",versionString);
10374  cleanUpDoxygen();
10375  exit(0);
10376  break;
10377  case '-':
10378  if (qstrcmp(&argv[optind][2],"help")==0)
10379  {
10380  usage(argv[0]);
10381  exit(0);
10382  }
10383  else if (qstrcmp(&argv[optind][2],"version")==0)
10384  {
10385  msg("%s\n",versionString);
10386  cleanUpDoxygen();
10387  exit(0);
10388  }
10389  else
10390  {
10391  err("Unknown option \"-%s\"\n",&argv[optind][1]);
10392  usage(argv[0]);
10393  exit(1);
10394  }
10395  break;
10396  case 'b':
10397  setvbuf(stdout,NULL,_IONBF,0);
10399  break;
10400  case 'T':
10401  msg("Warning: this option activates output generation via Django like template files. "
10402  "This option is scheduled for doxygen 2.0, is currently incomplete and highly experimental! "
10403  "Only use if you are a doxygen developer\n");
10405  break;
10406  case 'h':
10407  case '?':
10408  usage(argv[0]);
10409  exit(0);
10410  break;
10411  default:
10412  err("Unknown option \"-%c\"\n",argv[optind][1]);
10413  usage(argv[0]);
10414  exit(1);
10415  }
10416  optind++;
10417  }
10418 
10419  /**************************************************************************
10420  * Parse or generate the config file *
10421  **************************************************************************/
10422 
10423  Config::instance()->init();
10424 
10425  if (genConfig)
10426  {
10427  generateConfigFile(configName,shortList);
10428  cleanUpDoxygen();
10429  exit(0);
10430  }
10431  if (genLayout)
10432  {
10433  writeDefaultLayoutFile(layoutName);
10434  cleanUpDoxygen();
10435  exit(0);
10436  }
10437 
10438  QFileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile");
10439  if (optind>=argc)
10440  {
10441  if (configFileInfo1.exists())
10442  {
10443  configName="Doxyfile";
10444  }
10445  else if (configFileInfo2.exists())
10446  {
10447  configName="doxyfile";
10448  }
10449  else
10450  {
10451  err("Doxyfile not found and no input file specified!\n");
10452  usage(argv[0]);
10453  exit(1);
10454  }
10455  }
10456  else
10457  {
10458  QFileInfo fi(argv[optind]);
10459  if (fi.exists() || qstrcmp(argv[optind],"-")==0)
10460  {
10461  configName=argv[optind];
10462  }
10463  else
10464  {
10465  err("configuration file %s not found!\n",argv[optind]);
10466  usage(argv[0]);
10467  exit(1);
10468  }
10469  }
10470 
10471 
10472  if (!Config::instance()->parse(configName,updateConfig))
10473  {
10474  err("could not open or read configuration file %s!\n",configName);
10475  cleanUpDoxygen();
10476  exit(1);
10477  }
10478 
10479  if (updateConfig)
10480  {
10481  generateConfigFile(configName,shortList,TRUE);
10482  cleanUpDoxygen();
10483  exit(0);
10484  }
10485 
10486  /* Perlmod wants to know the path to the config file.*/
10487  QFileInfo configFileInfo(configName);
10488  setPerlModDoxyfile(configFileInfo.absFilePath().data());
10489 
10490 }
static void writeStyleSheetFile(QFile &f)
Definition: latexgen.cpp:788
bool openOutputFile(const char *outFile, QFile &f)
Definition: util.cpp:8588
static void writeFooterFile(QFile &f)
Definition: htmlgen.cpp:836
void msg(const char *fmt,...)
Definition: message.cpp:107
static void writeExtensionsFile(QFile &file)
Definition: rtfgen.cpp:113
static void writeHeaderFile(QFile &f, const char *cssname)
Definition: htmlgen.cpp:829
static void writeStyleSheetFile(QFile &f)
Definition: htmlgen.cpp:823
const bool FALSE
Definition: qglobal.h:370
const std::string instance
static const char * getArg(int argc, char **argv, int &optind)
Definition: doxygen.cpp:9967
static void devUsage()
Definition: doxygen.cpp:9922
#define Config_getEnum(val)
Definition: config.cpp:663
bool exists(std::string path)
static void writeHeaderFile(QFile &f)
Definition: latexgen.cpp:770
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
static int setFlag(const char *label)
Definition: debug.cpp:102
char versionString[]
Definition: version.cpp:1
bool setTranslator(const char *langName)
Definition: language.cpp:159
static void writeFooterFile(QFile &f)
Definition: latexgen.cpp:781
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
static void usage(const char *name)
Definition: doxygen.cpp:9936
void err(const char *fmt,...)
Definition: message.cpp:226
static bool g_dumpSymbolMap
Definition: doxygen.cpp:182
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
void writeDefaultLayoutFile(const char *fileName)
Definition: layout.cpp:1397
void cleanUpDoxygen()
Definition: doxygen.cpp:10070
static bool g_useOutputTemplate
Definition: doxygen.cpp:183
static void writeStyleSheetFile(QFile &f)
Definition: rtfgen.cpp:96
static void generateConfigFile(const char *configFile, bool shortList, bool updateOnly=FALSE)
Definition: doxygen.cpp:9106
static bool outputToWizard
Definition: doxygen.h:136
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
Q_EXPORT int qstrcmp(const char *str1, const char *str2)
Definition: qcstring.h:95
const bool TRUE
Definition: qglobal.h:371
void setPerlModDoxyfile(const QCString &qs)
void warn_uncond(const char *fmt,...)
Definition: message.cpp:218
int readDir ( QFileInfo fi,
FileNameList fnList,
FileNameDict fnDict,
StringDict exclDict,
QStrList patList,
QStrList exclPatList,
StringList resultList,
StringDict resultDict,
bool  errorIfNotExist,
bool  recursive,
QDict< void > *  killDict 
)
int readFileOrDirectory ( const char *  s,
FileNameList fnList,
FileNameDict fnDict,
StringDict exclDict,
QStrList patList,
QStrList exclPatList,
StringList resultList,
StringDict resultDict,
bool  recursive,
bool  errorIfNotExist = TRUE,
QDict< void > *  killDict = 0,
QDict< void > *  paths = 0 
)

Definition at line 9659 of file doxygen.cpp.

9672 {
9673  //printf("killDict=%p count=%d\n",killDict,killDict->count());
9674  // strip trailing slashes
9675  if (s==0) return 0;
9676  QCString fs = s;
9677  char lc = fs.at(fs.length()-1);
9678  if (lc=='/' || lc=='\\') fs = fs.left(fs.length()-1);
9679 
9680  QFileInfo fi(fs);
9681  //printf("readFileOrDirectory(%s)\n",s);
9682  int totalSize=0;
9683  {
9684  if (exclDict==0 || exclDict->find(fi.absFilePath().utf8())==0)
9685  {
9686  if (!fi.exists() || !fi.isReadable())
9687  {
9688  if (errorIfNotExist)
9689  {
9690  warn_uncond("source %s is not a readable file or directory... skipping.\n",s);
9691  }
9692  }
9693  else if (!Config_getBool("EXCLUDE_SYMLINKS") || !fi.isSymLink())
9694  {
9695  if (fi.isFile())
9696  {
9697  QCString dirPath = fi.dirPath(TRUE).utf8();
9698  QCString filePath = fi.absFilePath().utf8();
9699  if (paths && paths->find(dirPath))
9700  {
9701  paths->insert(dirPath,(void*)0x8);
9702  }
9703  //printf("killDict->find(%s)\n",fi.absFilePath().data());
9704  if (killDict==0 || killDict->find(filePath)==0)
9705  {
9706  totalSize+=fi.size()+fi.absFilePath().length()+4; //readFile(&fi,fiList,input);
9707  //fiList->inSort(new FileInfo(fi));
9708  QCString name=fi.fileName().utf8();
9709  //printf("New file %s\n",name.data());
9710  if (fnDict)
9711  {
9712  FileDef *fd=new FileDef(dirPath+"/",name);
9713  FileName *fn=0;
9714  if (!name.isEmpty() && (fn=(*fnDict)[name]))
9715  {
9716  fn->append(fd);
9717  }
9718  else
9719  {
9720  fn = new FileName(filePath,name);
9721  fn->append(fd);
9722  if (fnList) fnList->inSort(fn);
9723  fnDict->insert(name,fn);
9724  }
9725  }
9726  QCString *rs=0;
9727  if (resultList || resultDict)
9728  {
9729  rs=new QCString(filePath);
9730  if (resultList) resultList->append(rs);
9731  if (resultDict) resultDict->insert(filePath,rs);
9732  }
9733 
9734  if (killDict) killDict->insert(fi.absFilePath().utf8(),(void *)0x8);
9735  }
9736  }
9737  else if (fi.isDir()) // readable dir
9738  {
9739  totalSize+=readDir(&fi,fnList,fnDict,exclDict,patList,
9740  exclPatList,resultList,resultDict,errorIfNotExist,
9741  recursive,killDict,paths);
9742  }
9743  }
9744  }
9745  }
9746  return totalSize;
9747 }
static QCString name
Definition: declinfo.cpp:673
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
void append(const type *d)
Definition: qlist.h:73
char & at(uint i) const
Definition: qcstring.h:326
static constexpr double fs
Definition: Units.h:100
QCString left(uint len) const
Definition: qcstring.cpp:213
uint size() const
Definition: qcstring.h:201
QAsciiDict< Entry > fn
void inSort(const type *d)
Definition: qlist.h:71
#define Config_getBool(val)
Definition: config.cpp:664
QCString & insert(uint index, const char *s)
Definition: qcstring.cpp:355
int readDir(QFileInfo *fi, FileNameList *fnList, FileNameDict *fnDict, StringDict *exclDict, QStrList *patList, QStrList *exclPatList, StringList *resultList, StringDict *resultDict, bool errorIfNotExist, bool recursive, QDict< void > *killDict, QDict< void > *paths)
Definition: doxygen.cpp:9551
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
void warn_uncond(const char *fmt,...)
Definition: message.cpp:218
void readFormulaRepository ( )

Definition at line 9751 of file doxygen.cpp.

9752 {
9753  QFile f(Config_getString("HTML_OUTPUT")+"/formula.repository");
9754  if (f.open(IO_ReadOnly)) // open repository
9755  {
9756  msg("Reading formula repository...\n");
9757  QTextStream t(&f);
9758  QCString line;
9759  while (!t.eof())
9760  {
9761  line=t.readLine().utf8();
9762  int se=line.find(':'); // find name and text separator.
9763  if (se==-1)
9764  {
9765  warn_uncond("formula.repository is corrupted!\n");
9766  break;
9767  }
9768  else
9769  {
9770  QCString formName = line.left(se);
9771  QCString formText = line.right(line.length()-se-1);
9772  Formula *f=new Formula(formText);
9775  Doxygen::formulaDict->insert(formText,f);
9776  Doxygen::formulaNameDict->insert(formName,f);
9777  }
9778  }
9779  }
9780 }
void msg(const char *fmt,...)
Definition: message.cpp:107
uint length() const
Definition: qcstring.h:195
void append(const type *d)
Definition: qlist.h:73
static FormulaDict * formulaDict
Definition: doxygen.h:122
static FormulaDict * formulaNameDict
Definition: doxygen.h:123
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
#define IO_ReadOnly
Definition: qiodevice.h:61
static FormulaList * formulaList
Definition: doxygen.h:121
QCString right(uint len) const
Definition: qcstring.cpp:231
#define Config_getString(val)
Definition: config.cpp:660
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
The QTextStream class provides basic functions for reading and writing text using a QIODevice...
Definition: qtextstream.h:53
void line(double t, double *p, double &x, double &y, double &z)
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
Definition: se.py:1
void warn_uncond(const char *fmt,...)
Definition: message.cpp:218
void searchInputFiles ( StringList inputFiles)

Variable Documentation

QCString g_spaces