Doxygen
Loading...
Searching...
No Matches
plantuml.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2015 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 PLANTUML_H
17#define PLANTUML_H
18
19#include <map>
20#include <string>
21
22#include "containers.h"
23#include "qcstring.h"
24
25#define DIVIDE_COUNT 4
26#define MIN_PLANTUML_COUNT 8
27
28class QCString;
30{
31 PlantumlContent(const QCString &content_, const QCString &outDir_, const QCString &srcFile_, int srcLine_)
32 : content(content_), outDir(outDir_), srcFile(srcFile_), srcLine(srcLine_) {}
37};
38
39/** Singleton that manages plantuml relation actions */
41{
42 public:
43 /** Plant UML output image formats */
45
46 static PlantumlManager &instance();
47
48 /** Run plant UML tool for all images */
49 void run();
50
51 /** Write a PlantUML compatible file.
52 * @param[in] outDirArg the output directory to write the file to.
53 * @param[in] fileName the name of the file. If empty a name will be chosen automatically.
54 * @param[in] content the contents of the PlantUML file.
55 * @param[in] format the image format to generate.
56 * @param[in] engine the plantuml engine to use.
57 * @param[in] srcFile the source file resulting in the write command.
58 * @param[in] srcLine the line number resulting in the write command.
59 * @param[in] inlineCode the code is coming from the `\statuml ... \enduml` (`true`) command or
60 * from the `\planumlfile` command (`false`)
61 * @returns The name of the generated file.
62 */
63 QCString writePlantUMLSource(const QCString &outDirArg,const QCString &fileName,
64 const QCString &content, OutputFormat format,
65 const QCString &engine,const QCString &srcFile,
66 int srcLine,bool inlineCode);
67
68 /** Convert a PlantUML file to an image.
69 * @param[in] baseName the name of the generated file (as returned by writePlantUMLSource())
70 * @param[in] outDir the directory to write the resulting image into.
71 * @param[in] format the image format to generate.
72 */
73 void generatePlantUMLOutput(const QCString &baseName,const QCString &outDir,OutputFormat format);
74
75 using FilesMap = std::map< std::string, StringVector >;
76 using ContentMap = std::map< std::string, PlantumlContent >;
77 private:
79 void insert(const std::string &key,
80 const std::string &value,
81 const QCString &outDir,
82 OutputFormat format,
83 const QCString &puContent,
84 const QCString &srcFile,
85 int srcLine);
86
90 ContentMap m_pngPlantumlContent; // use circular queue for using multi-processor (multi threading)
93};
94
95#endif
96
Singleton that manages plantuml relation actions.
Definition plantuml.h:41
ContentMap m_pngPlantumlContent
Definition plantuml.h:90
std::map< std::string, PlantumlContent > ContentMap
Definition plantuml.h:76
QCString writePlantUMLSource(const QCString &outDirArg, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &engine, const QCString &srcFile, int srcLine, bool inlineCode)
Write a PlantUML compatible file.
Definition plantuml.cpp:27
OutputFormat
Plant UML output image formats.
Definition plantuml.h:44
ContentMap m_epsPlantumlContent
Definition plantuml.h:92
std::map< std::string, StringVector > FilesMap
Definition plantuml.h:75
void insert(const std::string &key, const std::string &value, const QCString &outDir, OutputFormat format, const QCString &puContent, const QCString &srcFile, int srcLine)
Definition plantuml.cpp:372
ContentMap m_svgPlantumlContent
Definition plantuml.h:91
FilesMap m_pngPlantumlFiles
Definition plantuml.h:87
static PlantumlManager & instance()
Definition plantuml.cpp:156
FilesMap m_svgPlantumlFiles
Definition plantuml.h:88
void run()
Run plant UML tool for all images.
Definition plantuml.cpp:314
void generatePlantUMLOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Convert a PlantUML file to an image.
Definition plantuml.cpp:127
FilesMap m_epsPlantumlFiles
Definition plantuml.h:89
This is an alternative implementation of QCString.
Definition qcstring.h:101
QCString srcFile
Definition plantuml.h:35
QCString outDir
Definition plantuml.h:34
QCString content
Definition plantuml.h:33
PlantumlContent(const QCString &content_, const QCString &outDir_, const QCString &srcFile_, int srcLine_)
Definition plantuml.h:31