Doxygen
dot.h 文件参考
#include <map>
#include "qcstring.h"
#include "dotgraph.h"
#include "dotfilepatcher.h"
#include "dotrunner.h"
+ dot.h 的引用(Include)关系图:
+ 此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

class  DotManager
 Singleton that manages parallel dot invocations and patching files for embedding image maps 更多...
 

函数

void writeDotGraphFromFile (const QCString &inFile, const QCString &outDir, const QCString &outFile, GraphOutputFormat format, const QCString &srcFile, int srcLine)
 
void writeDotImageMapFromFile (TextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, int graphId, const QCString &srcFile, int srcLine)
 

函数说明

◆ writeDotGraphFromFile()

void writeDotGraphFromFile ( const QCString inFile,
const QCString outDir,
const QCString outFile,
GraphOutputFormat  format,
const QCString srcFile,
int  srcLine 
)

在文件 dot.cpp272 行定义.

275 {
276  Dir d(outDir.str());
277  if (!d.exists())
278  {
279  term("Output dir %s does not exist!\n",qPrint(outDir));
280  }
281 
282  QCString imgExt = getDotImageExtension();
283  QCString imgName = (QCString)outFile+"."+imgExt;
284  QCString absImgName = QCString(d.absPath())+"/"+imgName;
285  QCString absOutFile = QCString(d.absPath())+"/"+outFile;
286 
287  DotRunner dotRun(inFile);
288  if (format==GOF_BITMAP)
289  {
290  dotRun.addJob(Config_getEnumAsString(DOT_IMAGE_FORMAT),absImgName,srcFile,srcLine);
291  }
292  else // format==GOF_EPS
293  {
294  if (Config_getBool(USE_PDFLATEX))
295  {
296  dotRun.addJob("pdf",absOutFile+".pdf",srcFile,srcLine);
297  }
298  else
299  {
300  dotRun.addJob("ps",absOutFile+".eps",srcFile,srcLine);
301  }
302  }
303 
304  dotRun.preventCleanUp();
305  if (!dotRun.run())
306  {
307  return;
308  }
309 
311 
312 }

引用了 Dir::absPath(), IndexList::addImageFile(), DotRunner::addJob(), Config_getBool, Config_getEnumAsString, Dir::exists(), getDotImageExtension(), GOF_BITMAP, Doxygen::indexList, DotRunner::preventCleanUp(), qPrint(), DotRunner::run(), QCString::str() , 以及 term().

被这些函数引用 DocbookDocVisitor::startDotFile(), LatexDocVisitor::startDotFile(), HtmlDocVisitor::writeDotFile(), RTFDocVisitor::writeDotFile() , 以及 DocbookDocVisitor::writeDotFile().

◆ writeDotImageMapFromFile()

void writeDotImageMapFromFile ( TextStream t,
const QCString inFile,
const QCString outDir,
const QCString relPath,
const QCString baseName,
const QCString context,
int  graphId,
const QCString srcFile,
int  srcLine 
)

Writes user defined image map to the output.

参数
ttext stream to write to
inFilejust the basename part of the filename
outDiroutput directory
relPathrelative path the to root of the output dir
baseNamethe base name of the output files
contextthe scope in which this graph is found (for resolving links)
graphIda unique id for this graph, use for dynamic sections
srcFilethe source file
srcLinethe line number in the source file

在文件 dot.cpp325 行定义.

330 {
331 
332  Dir d(outDir.str());
333  if (!d.exists())
334  {
335  term("Output dir %s does not exist!\n",qPrint(outDir));
336  }
337 
338  QCString mapName = baseName+".map";
339  QCString imgExt = getDotImageExtension();
340  QCString imgName = baseName+"."+imgExt;
341  QCString absOutFile = QCString(d.absPath())+"/"+mapName;
342 
343  DotRunner dotRun(inFile);
344  dotRun.addJob(MAP_CMD,absOutFile,srcFile,srcLine);
345  dotRun.preventCleanUp();
346  if (!dotRun.run())
347  {
348  return;
349  }
350 
351  if (imgExt=="svg") // vector graphics
352  {
353  QCString svgName = outDir+"/"+baseName+".svg";
354  DotFilePatcher::writeSVGFigureLink(t,relPath,baseName,svgName);
355  DotFilePatcher patcher(svgName);
356  patcher.addSVGConversion("",TRUE,context,TRUE,graphId);
357  patcher.run();
358  }
359  else // bitmap graphics
360  {
361  TextStream tt;
362  t << "<img src=\"" << relPath << imgName << "\" alt=\""
363  << imgName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>\n";
364  DotFilePatcher::convertMapFile(tt, absOutFile, relPath ,TRUE, context);
365  if (!tt.empty())
366  {
367  t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">";
368  t << tt.str();
369  t << "</map>\n";
370  }
371  }
372  d.remove(absOutFile.str());
373 }

引用了 Dir::absPath(), DotRunner::addJob(), DotFilePatcher::addSVGConversion(), DotFilePatcher::convertMapFile(), TextStream::empty(), Dir::exists(), getDotImageExtension(), MAP_CMD, DotRunner::preventCleanUp(), qPrint(), Dir::remove(), DotFilePatcher::run(), DotRunner::run(), TextStream::str(), QCString::str(), term(), TRUE , 以及 DotFilePatcher::writeSVGFigureLink().

被这些函数引用 HtmlDocVisitor::writeDotFile().

getDotImageExtension
QCString getDotImageExtension()
Definition: util.cpp:7032
Dir
Class representing a directory in the file system
Definition: dir.h:68
DotRunner
Helper class to run dot from doxygen from multiple threads.
Definition: dotrunner.h:30
Doxygen::indexList
static IndexList * indexList
Definition: doxygen.h:114
QCString::str
std::string str() const
Definition: qcstring.h:442
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
TextStream::empty
bool empty() const
Returns true iff the buffer is empty
Definition: textstream.h:232
DotFilePatcher
Helper class to insert a set of map file into an output file
Definition: dotfilepatcher.h:26
IndexList::addImageFile
void addImageFile(const QCString &name)
Definition: index.h:105
Config_getEnumAsString
#define Config_getEnumAsString(name)
Definition: config.h:36
DotFilePatcher::writeSVGFigureLink
static bool writeSVGFigureLink(TextStream &out, const QCString &relPath, const QCString &baseName, const QCString &absImgName)
Check if a reference to a SVG figure can be written and do so if possible.
Definition: dotfilepatcher.cpp:539
TRUE
#define TRUE
Definition: qcstring.h:36
TextStream::str
std::string str() const
Return the contents of the buffer as a std::string object
Definition: textstream.h:208
MAP_CMD
#define MAP_CMD
Definition: dot.cpp:33
GOF_BITMAP
@ GOF_BITMAP
Definition: dotgraph.h:27
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
term
void term(const char *fmt,...)
Definition: message.cpp:220
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
DotFilePatcher::convertMapFile
static bool convertMapFile(TextStream &t, const QCString &mapName, const QCString &relPath, bool urlOnly=FALSE, const QCString &context=QCString())
Definition: dotfilepatcher.cpp:214
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108