Doxygen
formula.cpp 文件参考
#include "formula.h"
#include "message.h"
#include "config.h"
#include "util.h"
#include "portable.h"
#include "image.h"
#include "fileinfo.h"
#include "dir.h"
#include <map>
#include <vector>
#include <string>
#include <utility>
#include <fstream>
#include "doxygen.h"
#include "index.h"
+ formula.cpp 的引用(Include)关系图:

浏览源代码.

struct  FormulaManager::Private
 

宏定义

#define RM_TMP_FILES   (true)
 

函数

static int determineInkscapeVersion (Dir &thisDir)
 

宏定义说明

◆ RM_TMP_FILES

#define RM_TMP_FILES   (true)

在文件 formula.cpp38 行定义.

函数说明

◆ determineInkscapeVersion()

static int determineInkscapeVersion ( Dir thisDir)
static

在文件 formula.cpp502 行定义.

503 {
504  // The command line interface (CLI) of Inkscape 1.0 has changed in comparison to
505  // previous versions. In order to invokine Inkscape, the used version is detected
506  // and based on the version the right syntax of the CLI is chosen.
507  static int inkscapeVersion = -2;
508  if (inkscapeVersion == -2) // initial one time version check
509  {
510  QCString inkscapeVersionFile = "inkscape_version" ;
511  inkscapeVersion = -1;
512  QCString args = "-z --version >"+inkscapeVersionFile+" 2>"+Portable::devNull();
514  if (Portable::system("inkscape",args)!=0)
515  {
516  // looks like the old syntax gave problems, lets try the new syntax
517  args = " --version >"+inkscapeVersionFile+" 2>"+Portable::devNull();
518  if (Portable::system("inkscape",args)!=0)
519  {
521  return -1;
522  }
523  }
524  // read version file and determine major version
525  std::ifstream inkscapeVersionIn(inkscapeVersionFile.str(),std::ifstream::in);
526  if (inkscapeVersionIn.is_open())
527  {
528  std::string line;
529  while (getline(inkscapeVersionIn,line))
530  {
531  size_t dotPos = line.find('.');
532  if (line.rfind("Inkscape ",0)==0 && dotPos>0)
533  {
534  // get major version
535  inkscapeVersion = std::stoi(line.substr(9,dotPos-9));
536  break;
537  }
538  }
539  inkscapeVersionIn.close();
540  }
541  else // failed to open version file
542  {
544  return -1;
545  }
546  if (RM_TMP_FILES)
547  {
548  thisDir.remove(inkscapeVersionFile.str());
549  }
551  }
552  return inkscapeVersion;
553 }

引用了 Portable::devNull(), Dir::remove(), RM_TMP_FILES, QCString::str(), Portable::system(), Portable::sysTimerStart() , 以及 Portable::sysTimerStop().

被这些函数引用 FormulaManager::generateImages().

Dir::remove
bool remove(const std::string &path, bool acceptsAbsPath=true) const
Definition: dir.cpp:256
Portable::devNull
const char * devNull()
Definition: portable.cpp:595
QCString::str
std::string str() const
Definition: qcstring.h:442
Portable::sysTimerStart
void sysTimerStart()
Definition: portable.cpp:470
Portable::system
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
Definition: portable.cpp:42
RM_TMP_FILES
#define RM_TMP_FILES
Definition: formula.cpp:38
Portable::sysTimerStop
void sysTimerStop()
Definition: portable.cpp:475
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108