34#define MAP_CMD "cmapx"
95 for (
const auto &job :
m_jobs)
97 if (job.absPath == newJob.
absPath && job.relDotName == newJob.
relDotName && job.format == newJob.
format)
return;
100 err(
"md5 hash does not match for two different runs of {}{} !\n", newJob.
absPath, newJob.
relDotName);
116 return &(rv.first->second);
122 if (
m_jobs.size()+numFilePatchers > 0)
126 msg(
"Generating {:d} dot graphs in single threaded mode with batch size {:d}...\n",
131 msg(
"Generating {:d} dot graphs using {:d} parallel threads with batch size {:d}...\n",
165 if (!ok)
return FALSE;
175 if (fp.second.isSVGFile())
177 msg(
"Patching output file {}/{}\n",i,numFilePatchers);
178 if (!fp.second.run())
return FALSE;
184 if (!fp.second.isSVGFile())
186 msg(
"Patching output file {}/{}\n",i,numFilePatchers);
187 if (!fp.second.run())
return FALSE;
198 const QCString &srcFile,
int srcLine,
bool toIndex)
203 term(
"Output dir {} does not exist!\n",outDir);
207 QCString imgName = outFile+
"."+imgExt;
220 dotArgs =
QCString(
"-Tpdf -o \"") + absOutFile +
".pdf\" \"" + inFile +
"\"";
224 dotArgs =
QCString(
"-Teps -o \"") + absOutFile +
".eps\" \"" + inFile +
"\"";
252 const QCString &context,
int graphId,
253 const QCString &srcFile,
int srcLine,
bool newFile)
259 term(
"Output dir {} does not exist!\n",outDir);
262 QCString mapName = baseName+
".cmapx";
264 QCString imgName = baseName+
"."+imgExt;
275 QCString svgName = outDir+
"/"+baseName+
".svg";
287 t <<
"<img src=\"" << relPath << imgName <<
"\" alt=\""
288 << imgName <<
"\" border=\"0\" usemap=\"#" << mapName <<
"\"/>\n";
292 t <<
"<map name=\"" << mapName <<
"\" id=\"" << mapName <<
"\">";
Class representing a directory in the file system.
std::string absPath() const
bool remove(const std::string &path, bool acceptsAbsPath=true) const
Helper class to insert a set of map file into an output file.
static bool convertMapFile(TextStream &t, const QCString &mapName, const QCString &relPath, bool urlOnly=FALSE, const QCString &context=QCString())
int addSVGConversion(const QCString &relPath, bool urlOnly, const QCString &context, bool zoomable, int graphId)
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.
std::map< std::string, DotFilePatcher > m_filePatchers
DotFilePatcher * createFilePatcher(const QCString &fileName)
void addJob(const DotJob &newJob)
static DotManager * instance()
static QCString verifiedDotPath
static IndexList * indexList
This is an alternative implementation of QCString.
QCString & prepend(const char *s)
bool isEmpty() const
Returns TRUE iff the string is empty.
const std::string & str() const
Text streaming class that buffers data.
bool empty() const
Returns true iff the buffer is empty.
std::string str() const
Return the contents of the buffer as a std::string object.
#define Config_getInt(name)
#define Config_getEnumAsString(name)
#define Config_getBool(name)
#define Config_getString(name)
static void setDotFontPath(const QCString &path)
static QCString g_dotFontPath
static void unsetDotFontPath()
void writeDotGraphFromFile(const QCString &inFile, const QCString &outDir, const QCString &outFile, GraphOutputFormat format, const QCString &srcFile, int srcLine, bool toIndex)
static std::mutex g_dotManagerMutex
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, bool newFile)
QCString pathListSeparator()
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
void setenv(const QCString &variable, const QCString &value)
void unsetenv(const QCString &variable)
QCString getenv(const QCString &variable)
Portable versions of functions that are platform dependent.
QCString getDotImageExtension()
A bunch of utility functions.