|
Doxygen
|
Helper class to insert a set of map file into an output file. More...
#include <src/dotfilepatcher.h>
Classes | |
| struct | Map |
Public Member Functions | |
| DotFilePatcher (const DString &patchFile) | |
| int | addMap (const DString &mapFile, const DString &relPath, bool urlOnly, const DString &context, const DString &label) |
| int | addFigure (const DString &baseName, const DString &figureName, bool heightCheck) |
| int | addSVGConversion (const DString &relPath, bool urlOnly, const DString &context, bool zoomable, int graphId) |
| int | addSVGObject (const DString &baseName, const DString &figureName, const DString &relPath) |
| bool | run () const |
| bool | isSVGFile () const |
Static Public Member Functions | |
| static bool | convertMapFile (TextStream &t, const DString &mapName, const DString &relPath, bool urlOnly=false, const DString &context=DString()) |
| static bool | writeSVGFigureLink (TextStream &out, const DString &relPath, const DString &baseName, const DString &absImgName) |
| Check if a reference to a SVG figure can be written and do so if possible. | |
| static bool | writeVecGfxFigure (TextStream &out, const DString &baseName, const DString &figureName) |
| static DString | mapLabelToId (const DString &mapLabel) |
Private Attributes | |
| std::vector< Map > | m_maps |
| DString | m_patchFile |
Helper class to insert a set of map file into an output file.
Definition at line 26 of file dotfilepatcher.h.
| DotFilePatcher::DotFilePatcher | ( | const DString & | patchFile | ) |
Definition at line 256 of file dotfilepatcher.cpp.
References m_patchFile.
| int DotFilePatcher::addFigure | ( | const DString & | baseName, |
| const DString & | figureName, | ||
| bool | heightCheck ) |
Definition at line 274 of file dotfilepatcher.cpp.
References m_maps.
| int DotFilePatcher::addMap | ( | const DString & | mapFile, |
| const DString & | relPath, | ||
| bool | urlOnly, | ||
| const DString & | context, | ||
| const DString & | label ) |
Definition at line 266 of file dotfilepatcher.cpp.
References m_maps.
| int DotFilePatcher::addSVGConversion | ( | const DString & | relPath, |
| bool | urlOnly, | ||
| const DString & | context, | ||
| bool | zoomable, | ||
| int | graphId ) |
Definition at line 282 of file dotfilepatcher.cpp.
References m_maps.
Referenced by writeDotImageMapFromFile().
| int DotFilePatcher::addSVGObject | ( | const DString & | baseName, |
| const DString & | figureName, | ||
| const DString & | relPath ) |
Definition at line 291 of file dotfilepatcher.cpp.
References m_maps.
|
static |
converts the rectangles in a client site image map into a stream
| t | the stream to which the result is written. |
| mapName | the name of the map file. |
| relPath | the relative path to the root of the output directory (used in case CREATE_SUBDIRS is enabled). |
| urlOnly | if false the url field in the map contains an external references followed by a $ and then the URL. |
| context | the context (file, class, or namespace) in which the map file was found |
Definition at line 215 of file dotfilepatcher.cpp.
References err, DString::find(), DString::left(), DString::mid(), DString::npos, Portable::openInputStream(), replaceRef(), and DString::startsWith().
Referenced by insertMapFile(), run(), and writeDotImageMapFromFile().
| bool DotFilePatcher::isSVGFile | ( | ) | const |
Definition at line 261 of file dotfilepatcher.cpp.
References DString::endsWith(), and m_patchFile.
Referenced by run().
To adhere to the requirement that an id cannot have a digit at the first position always place an "a" in front
Definition at line 55 of file dotfilepatcher.h.
References DString::empty().
Referenced by DotGraph::generateCode(), and run().
| bool DotFilePatcher::run | ( | ) | const |
Definition at line 300 of file dotfilepatcher.cpp.
References Config_getBool, DotFilePatcher::Map::context, convertMapFile(), DString::data(), TextStream::empty(), DString::endsWith(), err, DString::find(), findIndex(), TextStream::flush(), DotFilePatcher::Map::graphId, isSVGFile(), DotFilePatcher::Map::label, DString::left(), DString::length(), m_maps, m_patchFile, DotFilePatcher::Map::mapFile, mapLabelToId(), DString::mid(), DString::npos, Portable::openInputStream(), Portable::openOutputStream(), DotFilePatcher::Map::relPath, Dir::remove(), Dir::rename(), replaceRef(), TextStream::setStream(), DString::str(), TextStream::str(), stripPath(), substitute(), svgZoomFooter1, svgZoomFooter2, svgZoomHeader0, svgZoomHeader0_noinit, svgZoomHeader1, svgZoomHeader2, DotFilePatcher::Map::urlOnly, writeSVGFigureLink(), writeVecGfxFigure(), and DotFilePatcher::Map::zoomable.
Referenced by writeDotImageMapFromFile().
|
static |
Check if a reference to a SVG figure can be written and do so if possible.
Returns false if not possible (for instance because the SVG file is not yet generated).
Definition at line 583 of file dotfilepatcher.cpp.
References readSVGSize(), and writeSVGNotSupported().
Referenced by DotGraph::generateCode(), run(), and writeDotImageMapFromFile().
|
static |
Definition at line 622 of file dotfilepatcher.cpp.
References Config_getBool, and DotRunner::readBoundingBox().
Referenced by DotGraph::generateCode(), and run().
|
private |
Definition at line 76 of file dotfilepatcher.h.
Referenced by addFigure(), addMap(), addSVGConversion(), addSVGObject(), and run().
|
private |
Definition at line 77 of file dotfilepatcher.h.
Referenced by DotFilePatcher(), isSVGFile(), and run().