473
|
1 /**
|
|
2 * Author: Jari-Matti Mäkelä
|
|
3 * License: GPL3
|
|
4 */
|
|
5 module docgen.misc.options;
|
|
6
|
|
7 /** Supported document output formats. */
|
|
8 enum DocFormat {
|
|
9 LaTeX,
|
|
10 XML,
|
|
11 HTML,
|
|
12 PlainText
|
|
13 }
|
|
14
|
|
15 /**
|
|
16 * Supported comment formats.
|
|
17 *
|
|
18 * http://www.stack.nl/~dimitri/doxygen/docblocks.html
|
|
19 * http://www.digitalmars.com/d/ddoc.html
|
|
20 */
|
|
21 enum CommentFormat {
|
|
22 Ddoc,
|
|
23 Doxygen
|
|
24 }
|
|
25
|
|
26 /** Supported image formats. */
|
|
27 enum ImageFormat {
|
|
28 PNG,
|
|
29 SVG,
|
|
30 GIF,
|
|
31 PDF
|
|
32 }
|
|
33
|
|
34 /** Image format extensions. */
|
|
35 const imageFormatExts = [ "png", "svg", "gif", "pdf" ];
|
|
36
|
|
37 /** Supported graph writers. */
|
|
38 enum GraphFormat {
|
|
39 Dot,
|
|
40 ModuleNames,
|
|
41 ModulePaths
|
|
42 }
|
|
43
|
|
44 struct GraphOptions {
|
|
45 /// image format to use for graphs
|
|
46 ImageFormat imageFormat;
|
|
47 /// maximum depth of dependencies in graphs
|
|
48 uint depth;
|
|
49 /// color of normal modules
|
|
50 char[] nodeColor;
|
|
51 /// color of the modules in cyclic dep relation
|
|
52 char[] cyclicNodeColor;
|
|
53 /// unlocatable module color
|
|
54 char[] unlocatableNodeColor;
|
|
55 /// color of the dependencies
|
|
56 char[] depColor;
|
|
57 /// color of the dependencies in cyclic dep relation
|
|
58 char[] cyclicDepColor;
|
|
59 /// color of the public dependencies
|
|
60 char[] publicDepColor;
|
|
61 /// package color
|
|
62 char[] clusterColor;
|
|
63 /// include unlocatable modules to the dep graph
|
|
64 bool includeUnlocatableModules;
|
|
65 /// highlight imports in cyclic dep relation
|
|
66 bool highlightCyclicEdges;
|
|
67 /// highlight modules in cyclic dep relation
|
|
68 bool highlightCyclicVertices;
|
|
69 /// group modules by package names in dep graph
|
|
70 bool groupByPackageNames;
|
|
71 /// group modules hierarchically or by full package name
|
|
72 bool groupByFullPackageName;
|
|
73 }
|
|
74
|
|
75 struct ListingOptions {
|
|
76 /// use literate programming symbols [LaTeX]
|
|
77 bool literateStyle;
|
|
78 /// enable source code listings
|
|
79 bool enableListings;
|
|
80 }
|
|
81
|
|
82 struct TemplateOptions {
|
|
83 /// project title
|
|
84 char[] title;
|
|
85 /// project version
|
|
86 char[] versionString;
|
|
87 /// copyright notice
|
|
88 char[] copyright;
|
|
89 /// paper size [LaTeX]
|
|
90 char[] paperSize;
|
|
91 /// use short file names [HTML]
|
|
92 bool shortFileNames;
|
|
93 /// page template style to use, customizable via docgen/templates
|
|
94 char[] templateStyle;
|
|
95 }
|
|
96
|
|
97 struct ParserOptions {
|
|
98 /// paths to search for imports
|
|
99 char[][] importPaths;
|
|
100 /// paths to "root files"
|
|
101 char[][] rootPaths;
|
|
102 /// regexps for excluding modules
|
|
103 char[][] strRegexps;
|
|
104 /// comment format [comment parser]
|
|
105 CommentFormat commentFormat;
|
|
106 /// maximum depth of dependencies
|
|
107 uint depth;
|
|
108 }
|
|
109
|
|
110 struct DocGeneratorOptions {
|
|
111 /// location for the generated output
|
|
112 char[] outputDir;
|
|
113
|
|
114 /// list of document formats to be generated
|
|
115 DocFormat[] outputFormats;
|
|
116
|
|
117 GraphOptions graph;
|
|
118 ListingOptions listing;
|
|
119 TemplateOptions templates;
|
|
120 ParserOptions parser;
|
|
121 }
|
|
122
|