#include <sstream>
#include "msc.h"
#include "portable.h"
#include "config.h"
#include "message.h"
#include "docparser.h"
#include "doxygen.h"
#include "index.h"
#include "util.h"
#include "mscgen_api.h"
#include "dir.h"
#include "textstream.h"
浏览源代码.
|
static bool | convertMapFile (TextStream &t, const QCString &mapName, const QCString &relPath, const QCString &context) |
|
void | writeMscGraphFromFile (const QCString &inFile, const QCString &outDir, const QCString &outFile, MscOutputFormat format, const QCString &srcFile, int srcLine) |
|
static QCString | getMscImageMapFromFile (const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &context, bool writeSVGMap, const QCString &srcFile, int srcLine) |
|
void | writeMscImageMapFromFile (TextStream &t, const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &baseName, const QCString &context, MscOutputFormat format, const QCString &srcFile, int srcLine) |
|
◆ convertMapFile()
在文件 msc.cpp 第 32 行定义.
35 std::ifstream f(mapName.
str(),std::ifstream::in);
38 err(
"failed to open map file %s for inclusion in the docs!\n"
39 "If you installed Graphviz/dot after a previous failing run, \n"
40 "try deleting the output directory and rerun doxygen.\n",
qPrint(mapName));
43 const int maxLineLen=1024;
48 while (getline(f,line))
52 if (
qstrncmp(line.c_str(),
"rect",4)==0)
55 sscanf(line.c_str(),
"rect %s %d,%d %d,%d",url,&x1,&y1,&x2,&y2);
60 sscanf(line.c_str(),
"rect %s %s %d,%d %d,%d",ref,url,&x1,&y1,&x2,&y2);
64 if (y2<y1) {
int temp=y2; y2=y1; y1=temp; }
65 if (x2<x1) {
int temp=x2; x2=x1; x1=temp; }
74 std::unique_ptr<DocRef> df {
createRef( *parser.get(), url, context ) };
77 if (!df->anchor().isEmpty()) t <<
"#" << df->anchor();
83 t <<
"\" shape=\"rect\" coords=\""
84 << x1 <<
"," << y1 <<
"," << x2 <<
"," << y2 <<
"\""
引用了 addHtmlExtensionIfMissing(), createDocParser(), createRef(), err(), externalRef(), qPrint(), qstrcmp(), qstrncmp(), QCString::str() , 以及 TRUE.
被这些函数引用 getMscImageMapFromFile().
◆ getMscImageMapFromFile()
在文件 msc.cpp 第 146 行定义.
153 if ((code=mscgen_generate(inFile.
data(),outFile.
data(),
154 writeSVGMap ? mscgen_format_svgmap : mscgen_format_pngmap))!=0)
156 err_full(srcFile,srcLine,
"Problems generating msc output (error=%s). Look for typos in you msc file %s\n",
157 mscgen_error2str(code),
qPrint(inFile));
引用了 convertMapFile(), QCString::data(), err_full(), qPrint(), Dir::remove(), TextStream::str() , 以及 QCString::str().
被这些函数引用 writeMscImageMapFromFile().
◆ writeMscGraphFromFile()
在文件 msc.cpp 第 92 行定义.
101 mscgen_format_t msc_format;
106 msc_format = mscgen_format_png;
110 msc_format = mscgen_format_eps;
114 msc_format = mscgen_format_svg;
121 if ((code=mscgen_generate(inFile.
data(),imgName.
data(),msc_format))!=0)
123 err_full(srcFile,srcLine,
"Problems generating msc output (error=%s). Look for typos in you msc file %s\n",
124 mscgen_error2str(code),
qPrint(inFile));
131 epstopdfArgs.sprintf(
"\"%s.eps\" --outfile=\"%s.pdf\"",
136 err_full(srcFile,srcLine,
"Problems running epstopdf when processing '%s.eps'. Check your TeX installation!\n",
引用了 IndexList::addImageFile(), Config_getBool, QCString::data(), err_full(), Doxygen::indexList, maxCmdLine, MSC_BITMAP, MSC_EPS, MSC_SVG, Portable::pathSeparator(), qPrint(), QCString::sprintf(), Portable::system(), Portable::sysTimerStart() , 以及 Portable::sysTimerStop().
被这些函数引用 DocbookDocVisitor::startMscFile(), LatexDocVisitor::startMscFile(), DocbookDocVisitor::writeMscFile(), HtmlDocVisitor::writeMscFile(), RTFDocVisitor::writeMscFile() , 以及 LatexDocVisitor::writeMscFile().
◆ writeMscImageMapFromFile()
◆ maxCmdLine
const int maxCmdLine = 40960 |
|
static |
bool remove(const std::string &path, bool acceptsAbsPath=true) const
Class representing a directory in the file system
bool isEmpty() const
Returns TRUE iff the string is empty
static IndexList * indexList
static QCString getMscImageMapFromFile(const QCString &inFile, const QCString &outDir, const QCString &relPath, const QCString &context, bool writeSVGMap, const QCString &srcFile, int srcLine)
static const int maxCmdLine
void err(const char *fmt,...)
Text streaming class that buffers data.
static bool convertMapFile(TextStream &t, const QCString &mapName, const QCString &relPath, const QCString &context)
int qstrncmp(const char *str1, const char *str2, size_t len)
QCString addHtmlExtensionIfMissing(const QCString &fName)
void addImageFile(const QCString &name)
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
std::string str() const
Return the contents of the buffer as a std::string object
DocRef * createRef(IDocParser &parserIntf, const QCString &target, const QCString &context)
#define Config_getBool(name)
const char * qPrint(const char *s)
void err_full(const QCString &file, int line, const char *fmt,...)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
int qstrcmp(const char *str1, const char *str2)
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
std::unique_ptr< IDocParser > createDocParser()
This is an alternative implementation of QCString.