Skip to content

Commit 7506404

Browse files
author
Dimitri van Heesch
committed
Bug 731947 - Support for PlantUML
1 parent 97d12d0 commit 7506404

31 files changed

+544
-62
lines changed

Doxyfile

+28-20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Doxyfile 1.8.3.1
1+
# Doxyfile 1.8.7
22

33
#---------------------------------------------------------------------------
44
# Project related configuration options
@@ -10,6 +10,7 @@ PROJECT_BRIEF =
1010
PROJECT_LOGO =
1111
OUTPUT_DIRECTORY = doxygen_docs
1212
CREATE_SUBDIRS = YES
13+
ALLOW_UNICODE_NAMES = NO
1314
OUTPUT_LANGUAGE = English
1415
BRIEF_MEMBER_DESC = YES
1516
REPEAT_BRIEF = YES
@@ -63,6 +64,7 @@ INTERNAL_DOCS = NO
6364
CASE_SENSE_NAMES = NO
6465
HIDE_SCOPE_NAMES = NO
6566
SHOW_INCLUDE_FILES = YES
67+
SHOW_GROUPED_MEMB_INC = NO
6668
FORCE_LOCAL_INCLUDES = NO
6769
INLINE_INFO = YES
6870
SORT_MEMBER_DOCS = YES
@@ -84,7 +86,7 @@ FILE_VERSION_FILTER =
8486
LAYOUT_FILE =
8587
CITE_BIB_FILES =
8688
#---------------------------------------------------------------------------
87-
# configuration options related to warning and progress messages
89+
# Configuration options related to warning and progress messages
8890
#---------------------------------------------------------------------------
8991
QUIET = NO
9092
WARNINGS = YES
@@ -94,9 +96,10 @@ WARN_NO_PARAMDOC = NO
9496
WARN_FORMAT = "$file:$line: $text "
9597
WARN_LOGFILE =
9698
#---------------------------------------------------------------------------
97-
# configuration options related to the input files
99+
# Configuration options related to the input files
98100
#---------------------------------------------------------------------------
99-
INPUT = src
101+
INPUT = src \
102+
vhdlparser
100103
INPUT_ENCODING = UTF-8
101104
FILE_PATTERNS = *.h \
102105
*.cpp \
@@ -105,6 +108,7 @@ RECURSIVE = NO
105108
EXCLUDE = src/logos.cpp \
106109
src/lodepng.cpp
107110
EXCLUDE_SYMLINKS = NO
111+
EXCLUDE_PATTERNS =
108112
EXCLUDE_SYMBOLS =
109113
EXAMPLE_PATH =
110114
EXAMPLE_PATTERNS =
@@ -116,26 +120,25 @@ FILTER_SOURCE_FILES = NO
116120
FILTER_SOURCE_PATTERNS =
117121
USE_MDFILE_AS_MAINPAGE =
118122
#---------------------------------------------------------------------------
119-
# configuration options related to source browsing
123+
# Configuration options related to source browsing
120124
#---------------------------------------------------------------------------
121125
SOURCE_BROWSER = YES
122126
INLINE_SOURCES = NO
123127
STRIP_CODE_COMMENTS = YES
124128
REFERENCED_BY_RELATION = YES
125129
REFERENCES_RELATION = YES
126130
REFERENCES_LINK_SOURCE = YES
131+
SOURCE_TOOLTIPS = YES
127132
USE_HTAGS = NO
128133
VERBATIM_HEADERS = YES
129-
CLANG_ASSISTED_PARSING = YES
130-
CLANG_OPTIONS =
131134
#---------------------------------------------------------------------------
132-
# configuration options related to the alphabetical class index
135+
# Configuration options related to the alphabetical class index
133136
#---------------------------------------------------------------------------
134137
ALPHABETICAL_INDEX = YES
135138
COLS_IN_ALPHA_INDEX = 5
136139
IGNORE_PREFIX =
137140
#---------------------------------------------------------------------------
138-
# configuration options related to the HTML output
141+
# Configuration options related to the HTML output
139142
#---------------------------------------------------------------------------
140143
GENERATE_HTML = YES
141144
HTML_OUTPUT =
@@ -184,6 +187,7 @@ USE_MATHJAX = NO
184187
MATHJAX_FORMAT = HTML-CSS
185188
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
186189
MATHJAX_EXTENSIONS =
190+
MATHJAX_CODEFILE =
187191
SEARCHENGINE = YES
188192
SERVER_BASED_SEARCH = YES
189193
EXTERNAL_SEARCH = NO
@@ -192,7 +196,7 @@ SEARCHDATA_FILE = searchdata.xml
192196
EXTERNAL_SEARCH_ID =
193197
EXTRA_SEARCH_MAPPINGS =
194198
#---------------------------------------------------------------------------
195-
# configuration options related to the LaTeX output
199+
# Configuration options related to the LaTeX output
196200
#---------------------------------------------------------------------------
197201
GENERATE_LATEX = NO
198202
LATEX_OUTPUT =
@@ -211,7 +215,7 @@ LATEX_HIDE_INDICES = NO
211215
LATEX_SOURCE_CODE = NO
212216
LATEX_BIB_STYLE = plain
213217
#---------------------------------------------------------------------------
214-
# configuration options related to the RTF output
218+
# Configuration options related to the RTF output
215219
#---------------------------------------------------------------------------
216220
GENERATE_RTF = NO
217221
RTF_OUTPUT =
@@ -220,31 +224,31 @@ RTF_HYPERLINKS = NO
220224
RTF_STYLESHEET_FILE =
221225
RTF_EXTENSIONS_FILE =
222226
#---------------------------------------------------------------------------
223-
# configuration options related to the man page output
227+
# Configuration options related to the man page output
224228
#---------------------------------------------------------------------------
225229
GENERATE_MAN = NO
226230
MAN_OUTPUT =
227231
MAN_EXTENSION = .3
232+
MAN_SUBDIR =
228233
MAN_LINKS = NO
229234
#---------------------------------------------------------------------------
230-
# configuration options related to the XML output
235+
# Configuration options related to the XML output
231236
#---------------------------------------------------------------------------
232237
GENERATE_XML = NO
233238
XML_OUTPUT = xml
234-
XML_SCHEMA =
235-
XML_DTD =
236239
XML_PROGRAMLISTING = YES
237240
#---------------------------------------------------------------------------
238-
# configuration options related to the DOCBOOK output
241+
# Configuration options related to the DOCBOOK output
239242
#---------------------------------------------------------------------------
240243
GENERATE_DOCBOOK = NO
241244
DOCBOOK_OUTPUT = docbook
245+
DOCBOOK_PROGRAMLISTING = NO
242246
#---------------------------------------------------------------------------
243-
# configuration options for the AutoGen Definitions output
247+
# Configuration options for the AutoGen Definitions output
244248
#---------------------------------------------------------------------------
245249
GENERATE_AUTOGEN_DEF = NO
246250
#---------------------------------------------------------------------------
247-
# configuration options related to the Perl module output
251+
# Configuration options related to the Perl module output
248252
#---------------------------------------------------------------------------
249253
GENERATE_PERLMOD = NO
250254
PERLMOD_LATEX = NO
@@ -257,13 +261,14 @@ ENABLE_PREPROCESSING = YES
257261
MACRO_EXPANSION = YES
258262
EXPAND_ONLY_PREDEF = YES
259263
SEARCH_INCLUDES = YES
260-
INCLUDE_PATH = qtools libmd5
264+
INCLUDE_PATH = qtools \
265+
libmd5
261266
INCLUDE_FILE_PATTERNS =
262267
PREDEFINED =
263268
EXPAND_AS_DEFINED =
264269
SKIP_FUNCTION_MACROS = YES
265270
#---------------------------------------------------------------------------
266-
# Configuration::additions related to external references
271+
# Configuration options related to external references
267272
#---------------------------------------------------------------------------
268273
TAGFILES = qtools_docs/qtools.tag=../../qtools_docs/html
269274
GENERATE_TAGFILE = doxygen.tag
@@ -276,6 +281,7 @@ PERL_PATH = /usr/bin/perl
276281
#---------------------------------------------------------------------------
277282
CLASS_DIAGRAMS = NO
278283
MSCGEN_PATH =
284+
DIA_PATH =
279285
HIDE_UNDOC_RELATIONS = YES
280286
HAVE_DOT = YES
281287
DOT_NUM_THREADS = 0
@@ -299,6 +305,8 @@ INTERACTIVE_SVG = YES
299305
DOT_PATH =
300306
DOTFILE_DIRS =
301307
MSCFILE_DIRS =
308+
DIAFILE_DIRS =
309+
PLANTUML_JAR_PATH =
302310
DOT_GRAPH_MAX_NODES = 50
303311
MAX_DOT_GRAPH_DEPTH = 0
304312
DOT_TRANSPARENT = NO

doc/commands.doc

+61
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ documentation:
9090
\refitem cmdendrtfonly \\endrtfonly
9191
\refitem cmdendsecreflist \\endsecreflist
9292
\refitem cmdendverbatim \\endverbatim
93+
\refitem cmdenduml \\enduml
9394
\refitem cmdendxmlonly \\endxmlonly
9495
\refitem cmdenum \\enum
9596
\refitem cmdexample \\example
@@ -174,6 +175,7 @@ documentation:
174175
\refitem cmdskip \\skip
175176
\refitem cmdskipline \\skipline
176177
\refitem cmdsnippet \\snippet
178+
\refitem cmdstartuml \\startuml
177179
\refitem cmdstruct \\struct
178180
\refitem cmdsubpage \\subpage
179181
\refitem cmdsubsection \\subsection
@@ -2530,6 +2532,59 @@ class Receiver
25302532

25312533
\sa section \ref cmdmscfile "\\mscfile".
25322534

2535+
<hr>
2536+
\section cmdstartuml \\startuml
2537+
2538+
\addindex \\startuml
2539+
Starts a text fragment which should contain a valid description of a
2540+
PlantUML diagram. See http://plantuml.sourceforge.net/ for examples.
2541+
The text fragment ends with \ref cmdenduml "\\enduml".
2542+
\note You need to install Java and the PlantUML's jar file,
2543+
if you want to use this command. The location of the jar file should be specified
2544+
using \ref cfg_plantuml_jar_path "PLANTUML_JAR_PATH".
2545+
2546+
Here is an example of the use of the \c \\startuml command.
2547+
\code
2548+
/** Sender class. Can be used to send a command to the server.
2549+
* The receiver will acknowledge the command by calling Ack().
2550+
* \startuml
2551+
* Sender->Receiver : Command()
2552+
* Sender<--Receiver : Ack()
2553+
* \enduml
2554+
*/
2555+
class Sender
2556+
{
2557+
public:
2558+
/** Acknowledgment from server */
2559+
void Ack(bool ok);
2560+
};
2561+
2562+
/** Receiver class. Can be used to receive and execute commands.
2563+
* After execution of a command, the receiver will send an acknowledgment
2564+
* \startuml
2565+
* Receiver<-Sender : Command()
2566+
* Receiver-->Sender : Ack()
2567+
* \enduml
2568+
*/
2569+
class Receiver
2570+
{
2571+
public:
2572+
/** Executable a command on the server */
2573+
void Command(int commandId);
2574+
};
2575+
\endcode
2576+
2577+
\note For compatibility with running PlantUML as a preprocessing step before
2578+
running doxygen, you can also add the name of the image file after \c \\startuml
2579+
and inside curly brackets, i.e.
2580+
\verbatim
2581+
@startuml{myimage.png}
2582+
Alice -> Bob : Hello
2583+
@enduml
2584+
\endverbatim
2585+
When the name of the image is specified, doxygen will generate an image with that name.
2586+
Without the name doxygen will choose a name automatically.
2587+
25332588
<hr>
25342589
\section cmddotfile \\dotfile <file> ["caption"]
25352590

@@ -2650,6 +2705,12 @@ class Receiver
26502705
\addindex \\endmsc
26512706
Ends a block that was started with \ref cmdmsc "\\msc".
26522707

2708+
<hr>
2709+
\section cmdenduml \\enduml
2710+
2711+
\addindex \\enduml
2712+
Ends a block that was started with \ref cmdstartuml "\\startuml".
2713+
26532714
<hr>
26542715
\section cmdendhtmlonly \\endhtmlonly
26552716

src/cmdmapper.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ CommandMap cmdMap[] =
120120
{ "_internalref", CMD_INTERNALREF },
121121
{ "dot", CMD_DOT },
122122
{ "msc", CMD_MSC },
123+
{ "startuml", CMD_STARTUML },
123124
{ "enddot", CMD_ENDDOT },
124125
{ "endmsc", CMD_ENDMSC },
126+
{ "enduml", CMD_ENDUML },
125127
{ "manonly", CMD_MANONLY },
126128
{ "endmanonly", CMD_ENDMANONLY },
127129
{ "includelineno", CMD_INCWITHLINES },

src/cmdmapper.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ enum CommandType
127127
CMD_DIAFILE = 97,
128128
CMD_LATEXINCLUDE = 98,
129129
CMD_NDASH = 99,
130-
CMD_MDASH = 100
130+
CMD_MDASH = 100,
131+
CMD_STARTUML = 101,
132+
CMD_ENDUML = 102
131133
};
132134

133135
enum HtmlTagType

src/commentcnv.l

+3-3
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ void replaceComment(int offset);
446446
g_blockName=&yytext[1];
447447
BEGIN(VerbatimCode);
448448
}
449-
<CComment,ReadLine>[\\@]("dot"|"code"|"msc")/[^a-z_A-Z0-9] { /* start of a verbatim block */
449+
<CComment,ReadLine>[\\@]("dot"|"code"|"msc"|"startuml")/[^a-z_A-Z0-9] { /* start of a verbatim block */
450450
copyToOutput(yytext,(int)yyleng);
451451
g_lastCommentContext = YY_START;
452452
g_javaBlock=0;
@@ -517,7 +517,7 @@ void replaceComment(int offset);
517517
}
518518
}
519519
}
520-
<VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc") { /* end of verbatim block */
520+
<VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc"|"enduml") { /* end of verbatim block */
521521
copyToOutput(yytext,(int)yyleng);
522522
if (&yytext[4]==g_blockName)
523523
{
@@ -554,7 +554,7 @@ void replaceComment(int offset);
554554
copyToOutput(yytext,(int)yyleng);
555555
}
556556
<Verbatim>^[ \t]*"///" {
557-
if (g_blockName=="dot" || g_blockName=="msc" || g_blockName.at(0)=='f')
557+
if (g_blockName=="dot" || g_blockName=="msc" || g_blockName=="startuml" || g_blockName.at(0)=='f')
558558
{
559559
// see bug 487871, strip /// from dot images and formulas.
560560
int l=0;

src/commentscan.l

+13-3
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ static DocCmdMap docCmdMap[] =
191191
{ "manonly", &handleFormatBlock, FALSE },
192192
{ "dot", &handleFormatBlock, TRUE },
193193
{ "msc", &handleFormatBlock, TRUE },
194+
{ "startuml", &handleFormatBlock, TRUE },
194195
{ "code", &handleFormatBlock, TRUE },
195196
{ "addindex", &handleAddIndex, FALSE },
196197
{ "if", &handleIf, FALSE },
@@ -877,7 +878,7 @@ static int yyread(char *buf,int max_size)
877878
/* start command character */
878879
CMD ("\\"|"@")
879880
DCMD1 ("arg"|"attention"|"author"|"cite"|"code")
880-
DCMD2 ("date"|"dot"|"msc"|"dotfile"|"example")
881+
DCMD2 ("date"|"dot"|"msc"|"dotfile"|"example"|"startuml")
881882
DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include")
882883
DCMD4 ("includelineno"|"internal"|"invariant")
883884
DCMD5 ("latexinclude"|"latexonly"|"li"|"line"|"manonly"|"name")
@@ -1785,6 +1786,13 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
17851786
BEGIN(Comment);
17861787
}
17871788
}
1789+
<FormatBlock>{CMD}"enduml" {
1790+
addOutput(yytext);
1791+
if (blockName=="startuml") // found end of the block
1792+
{
1793+
BEGIN(Comment);
1794+
}
1795+
}
17881796
<FormatBlock>[^ \@\*\/\\\n]* { // some word
17891797
addOutput(yytext);
17901798
}
@@ -1809,9 +1817,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
18091817
addOutput(*yytext);
18101818
}
18111819
<FormatBlock><<EOF>> {
1820+
QCString endTag = "@end"+blockName;
1821+
if (blockName=="startuml") endTag="enduml";
18121822
warn(yyFileName,yyLineNr,
1813-
"reached end of comment while inside a @%s block; check for missing @end%s tag!",
1814-
blockName.data(),blockName.data()
1823+
"reached end of comment while inside a @%s block; check for missing @%s tag!",
1824+
blockName.data(),endTag.data()
18151825
);
18161826
yyterminate();
18171827
}

src/compound.xsd

+1-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@
386386
<xsd:element name="rtfonly" type="xsd:string" />
387387
<xsd:element name="latexonly" type="xsd:string" />
388388
<xsd:element name="dot" type="xsd:string" />
389-
<xsd:element name="msc" type="xsd:string" />
389+
<xsd:element name="plantuml" type="xsd:string" />
390390
<xsd:element name="anchor" type="docAnchorType" />
391391
<xsd:element name="formula" type="docFormulaType" />
392392
<xsd:element name="ref" type="docRefTextType" />

0 commit comments

Comments
 (0)