Doxygen
Loading...
Searching...
No Matches
dotfilepatcher.h
Go to the documentation of this file.
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
23class 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;
68 };
69 std::vector<Map> m_maps;
71};
72
73
74#endif
static bool writeVecGfxFigure(TextStream &out, const QCString &baseName, const QCString &figureName)
static bool convertMapFile(TextStream &t, const QCString &mapName, const QCString &relPath, bool urlOnly=FALSE, const QCString &context=QCString())
bool isSVGFile() const
DotFilePatcher(const QCString &patchFile)
std::vector< Map > m_maps
int addSVGObject(const QCString &baseName, const QCString &figureName, const QCString &relPath)
int addMap(const QCString &mapFile, const QCString &relPath, bool urlOnly, const QCString &context, const QCString &label)
int addSVGConversion(const QCString &relPath, bool urlOnly, const QCString &context, bool zoomable, int graphId)
QCString m_patchFile
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.
int addFigure(const QCString &baseName, const QCString &figureName, bool heightCheck)
This is an alternative implementation of QCString.
Definition qcstring.h:101
Text streaming class that buffers data.
Definition textstream.h:36
#define FALSE
Definition qcstring.h:34
Map(const QCString &mf, const QCString &rp, bool uo, const QCString &ctx, const QCString &lab, bool zoom=false, int gId=-1)