Doxygen
Toggle main menu visibility
Loading...
Searching...
No Matches
dotrunner.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 DOTRUNNER_H
17
#define DOTRUNNER_H
18
19
#include <string>
20
#include <thread>
21
#include <list>
22
#include <queue>
23
#include <mutex>
24
#include <condition_variable>
25
#include <memory>
26
27
#include "
qcstring.h
"
28
29
/** Helper class to run dot from doxygen from multiple threads. */
30
class
DotRunner
31
{
32
struct
DotJob
33
{
34
DotJob
(
const
QCString
&f,
const
QCString
&o,
const
QCString
&a,
35
const
QCString
&s,
int
l)
36
:
format
(f),
output
(o),
args
(a),
srcFile
(s),
srcLine
(l) {}
37
QCString
format
;
38
QCString
output
;
39
QCString
args
;
40
QCString
srcFile
;
41
int
srcLine
;
42
};
43
44
public
:
45
/** Creates a runner for a dot \a file. */
46
DotRunner
(
const
QCString
& absDotName,
const
QCString
& md5Hash =
QCString
());
47
48
/** Adds an additional job to the run.
49
* Performing multiple jobs one file can be faster.
50
*/
51
void
addJob
(
const
QCString
&format,
const
QCString
&output,
const
QCString
&srcFile,
int
srcLine);
52
53
/** Prevent cleanup of the dot file (for user provided dot files) */
54
void
preventCleanUp
() {
m_cleanUp
=
false
; }
55
56
/** Runs dot for all jobs added. */
57
bool
run
();
58
59
QCString
getMd5Hash
() {
return
m_md5Hash
; }
60
61
static
bool
readBoundingBox
(
const
QCString
&fileName,
int
* width,
int
* height,
bool
isEps);
62
63
private
:
64
QCString
m_file
;
65
QCString
m_md5Hash
;
66
QCString
m_dotExe
;
67
bool
m_cleanUp
;
68
std::vector<DotJob>
m_jobs
;
69
};
70
71
#endif
DotRunner::m_file
QCString m_file
Definition
dotrunner.h:64
DotRunner::m_cleanUp
bool m_cleanUp
Definition
dotrunner.h:67
DotRunner::m_md5Hash
QCString m_md5Hash
Definition
dotrunner.h:65
DotRunner::preventCleanUp
void preventCleanUp()
Prevent cleanup of the dot file (for user provided dot files).
Definition
dotrunner.h:54
DotRunner::DotRunner
DotRunner(const QCString &absDotName, const QCString &md5Hash=QCString())
Creates a runner for a dot file.
Definition
dotrunner.cpp:259
DotRunner::addJob
void addJob(const QCString &format, const QCString &output, const QCString &srcFile, int srcLine)
Adds an additional job to the run.
Definition
dotrunner.cpp:268
DotRunner::run
bool run()
Runs dot for all jobs added.
Definition
dotrunner.cpp:290
DotRunner::getMd5Hash
QCString getMd5Hash()
Definition
dotrunner.h:59
DotRunner::m_jobs
std::vector< DotJob > m_jobs
Definition
dotrunner.h:68
DotRunner::readBoundingBox
static bool readBoundingBox(const QCString &fileName, int *width, int *height, bool isEps)
Definition
dotrunner.cpp:139
DotRunner::m_dotExe
QCString m_dotExe
Definition
dotrunner.h:66
QCString
This is an alternative implementation of QCString.
Definition
qcstring.h:101
qcstring.h
DotRunner::DotJob::args
QCString args
Definition
dotrunner.h:39
DotRunner::DotJob::srcFile
QCString srcFile
Definition
dotrunner.h:40
DotRunner::DotJob::format
QCString format
Definition
dotrunner.h:37
DotRunner::DotJob::output
QCString output
Definition
dotrunner.h:38
DotRunner::DotJob::srcLine
int srcLine
Definition
dotrunner.h:41
DotRunner::DotJob::DotJob
DotJob(const QCString &f, const QCString &o, const QCString &a, const QCString &s, int l)
Definition
dotrunner.h:34
src
dotrunner.h
Generated by
1.17.0