Doxygen
dotfilepatcher.h
浏览该文件的文档.
1 /******************************************************************************
2 *
3 * Copyright (C) 1997-2019 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15 
16 #ifndef DOTFILEPATCHER_H
17 #define DOTFILEPATCHER_H
18 
19 #include <vector>
20 
21 #include "qcstring.h"
22 
23 class TextStream;
24 
25 /** Helper class to insert a set of map file into an output file */
27 {
28  public:
29  DotFilePatcher(const QCString &patchFile);
30  int addMap(const QCString &mapFile,const QCString &relPath,
31  bool urlOnly,const QCString &context,const QCString &label);
32 
33  int addFigure(const QCString &baseName,
34  const QCString &figureName,bool heightCheck);
35 
36  int addSVGConversion(const QCString &relPath,bool urlOnly,
37  const QCString &context,bool zoomable,int graphId);
38 
39  int addSVGObject(const QCString &baseName, const QCString &figureName,
40  const QCString &relPath);
41  bool run() const;
42  bool isSVGFile() const;
43 
44  static bool convertMapFile(TextStream &t,const QCString &mapName,
45  const QCString &relPath, bool urlOnly=FALSE,
46  const QCString &context=QCString());
47 
48  static bool writeSVGFigureLink(TextStream &out,const QCString &relPath,
49  const QCString &baseName,const QCString &absImgName);
50 
51  static bool writeVecGfxFigure(TextStream& out, const QCString& baseName,
52  const QCString& figureName);
53 
54  private:
55  struct Map
56  {
57  Map(const QCString &mf,const QCString &rp,bool uo,const QCString &ctx,
58  const QCString &lab,bool zoom=false,int gId=-1) :
59  mapFile(mf), relPath(rp), urlOnly(uo), context(ctx),
60  label(lab), zoomable(zoom), graphId(gId) {}
63  bool urlOnly;
66  bool zoomable;
67  int graphId;
68  };
69  std::vector<Map> m_maps;
71 };
72 
73 
74 #endif
DotFilePatcher::Map::zoomable
bool zoomable
Definition: dotfilepatcher.h:66
DotFilePatcher::Map::urlOnly
bool urlOnly
Definition: dotfilepatcher.h:63
DotFilePatcher::writeVecGfxFigure
static bool writeVecGfxFigure(TextStream &out, const QCString &baseName, const QCString &figureName)
Definition: dotfilepatcher.cpp:578
DotFilePatcher::addMap
int addMap(const QCString &mapFile, const QCString &relPath, bool urlOnly, const QCString &context, const QCString &label)
Definition: dotfilepatcher.cpp:258
DotFilePatcher::Map::relPath
QCString relPath
Definition: dotfilepatcher.h:62
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
DotFilePatcher::m_maps
std::vector< Map > m_maps
Definition: dotfilepatcher.h:69
qcstring.h
DotFilePatcher
Helper class to insert a set of map file into an output file
Definition: dotfilepatcher.h:26
DotFilePatcher::Map::graphId
int graphId
Definition: dotfilepatcher.h:67
DotFilePatcher::addSVGObject
int addSVGObject(const QCString &baseName, const QCString &figureName, const QCString &relPath)
Definition: dotfilepatcher.cpp:283
DotFilePatcher::addFigure
int addFigure(const QCString &baseName, const QCString &figureName, bool heightCheck)
Definition: dotfilepatcher.cpp:266
DotFilePatcher::Map::context
QCString context
Definition: dotfilepatcher.h:64
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
DotFilePatcher::run
bool run() const
Definition: dotfilepatcher.cpp:292
DotFilePatcher::m_patchFile
QCString m_patchFile
Definition: dotfilepatcher.h:70
DotFilePatcher::isSVGFile
bool isSVGFile() const
Definition: dotfilepatcher.cpp:253
DotFilePatcher::DotFilePatcher
DotFilePatcher(const QCString &patchFile)
Definition: dotfilepatcher.cpp:248
DotFilePatcher::Map::label
QCString label
Definition: dotfilepatcher.h:65
DotFilePatcher::addSVGConversion
int addSVGConversion(const QCString &relPath, bool urlOnly, const QCString &context, bool zoomable, int graphId)
Definition: dotfilepatcher.cpp:274
DotFilePatcher::convertMapFile
static bool convertMapFile(TextStream &t, const QCString &mapName, const QCString &relPath, bool urlOnly=FALSE, const QCString &context=QCString())
Definition: dotfilepatcher.cpp:214
DotFilePatcher::Map
Definition: dotfilepatcher.h:55
DotFilePatcher::Map::mapFile
QCString mapFile
Definition: dotfilepatcher.h:61
DotFilePatcher::Map::Map
Map(const QCString &mf, const QCString &rp, bool uo, const QCString &ctx, const QCString &lab, bool zoom=false, int gId=-1)
Definition: dotfilepatcher.h:57
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108