|
Doxygen
|
Singleton that manages Mermaid diagram rendering via the mmdc CLI tool. More...
#include <src/mermaid.h>
Public Types | |
| enum | OutputFormat { MERM_BITMAP , MERM_SVG } |
| Mermaid output image formats. More... | |
| using | ContentList = std::vector<MermaidContent> |
Public Member Functions | |
| void | run () |
| Run mmdc tool for all collected diagrams. | |
| QCString | writeMermaidSource (const QCString &outDirArg, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &srcFile, int srcLine) |
| Write a Mermaid source file and register it for CLI rendering. | |
| void | generateMermaidOutput (const QCString &baseName, const QCString &outDir, OutputFormat format) |
| Register a generated Mermaid image with the index. | |
Static Public Member Functions | |
| static MermaidManager & | instance () |
Private Member Functions | |
| MermaidManager () | |
Static Private Member Functions | |
| static QCString | imageExtension (OutputFormat format) |
Private Attributes | |
| ContentList | m_pngContent |
| ContentList | m_svgContent |
Singleton that manages Mermaid diagram rendering via the mmdc CLI tool.
| using MermaidManager::ContentList = std::vector<MermaidContent> |
|
private |
| void MermaidManager::generateMermaidOutput | ( | const QCString & | baseName, |
| const QCString & | outDir, | ||
| OutputFormat | format ) |
Register a generated Mermaid image with the index.
| [in] | baseName | the name of the generated file (as returned by writeMermaidSource()) |
| [in] | outDir | the directory containing the resulting image. |
| [in] | format | the image format that was generated. |
Definition at line 104 of file mermaid.cpp.
References QCString::findRev(), imageExtension(), Doxygen::indexList, and QCString::mid().
Referenced by DocbookDocVisitor::startMermaidFile(), LatexDocVisitor::startMermaidFile(), DocbookDocVisitor::writeMermaidFile(), HtmlDocVisitor::writeMermaidFile(), LatexDocVisitor::writeMermaidFile(), and RTFDocVisitor::writeMermaidFile().
|
staticprivate |
Definition at line 42 of file mermaid.cpp.
References MERM_BITMAP, and MERM_SVG.
Referenced by generateMermaidOutput().
|
static |
Definition at line 32 of file mermaid.cpp.
References MermaidManager().
Referenced by generateOutput(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), DocbookDocVisitor::startMermaidFile(), LatexDocVisitor::startMermaidFile(), DocbookDocVisitor::writeMermaidFile(), HtmlDocVisitor::writeMermaidFile(), LatexDocVisitor::writeMermaidFile(), and RTFDocVisitor::writeMermaidFile().
| void MermaidManager::run | ( | ) |
Run mmdc tool for all collected diagrams.
Definition at line 179 of file mermaid.cpp.
References m_pngContent, m_svgContent, MERM_BITMAP, MERM_SVG, Debug::Mermaid, Debug::print(), and runMermaidContent().
Referenced by generateOutput().
| QCString MermaidManager::writeMermaidSource | ( | const QCString & | outDirArg, |
| const QCString & | fileName, | ||
| const QCString & | content, | ||
| OutputFormat | format, | ||
| const QCString & | srcFile, | ||
| int | srcLine ) |
Write a Mermaid source file and register it for CLI rendering.
| [in] | outDirArg | the output directory to write the file to. |
| [in] | fileName | the name of the file. If empty a name will be chosen automatically. |
| [in] | content | the Mermaid diagram source. |
| [in] | format | the image format to generate. |
| [in] | srcFile | the source file resulting in the write command. |
| [in] | srcLine | the line number resulting in the write command. |
Definition at line 52 of file mermaid.cpp.
References QCString::at(), QCString::data(), err_full, QCString::findRev(), g_mermaidIndex, g_mermaidMutex, QCString::isEmpty(), QCString::left(), QCString::length(), m_pngContent, m_svgContent, MERM_BITMAP, MERM_SVG, Debug::Mermaid, Portable::openOutputStream(), QCString::prepend(), Debug::print(), and QCString::setNum().
Referenced by DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), DocbookDocVisitor::startMermaidFile(), and LatexDocVisitor::startMermaidFile().
|
private |
Definition at line 78 of file mermaid.h.
Referenced by run(), and writeMermaidSource().
|
private |
Definition at line 79 of file mermaid.h.
Referenced by run(), and writeMermaidSource().