Mercurial > projects > dil
annotate src/docgen/misc/options.d @ 806:bcb74c9b895c
Moved out files in the trunk folder to the root.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sun, 09 Mar 2008 00:12:19 +0100 |
parents | trunk/src/docgen/misc/options.d@cb8edb09108a |
children |
rev | line source |
---|---|
473 | 1 /** |
2 * Author: Jari-Matti Mäkelä | |
3 * License: GPL3 | |
4 */ | |
5 module docgen.misc.options; | |
6 | |
717
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
7 import docgen.misc.meta; |
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
8 |
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
9 /** creates reflective enums, syntax: enum name + list of elements */ |
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
10 template optionEnum(char[] name, T...) { |
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
11 const optionEnum = createEnum!("_" ~ name, name, "__" ~ name, "___" ~ name, T); |
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
12 } |
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
13 |
473 | 14 /** Supported document output formats. */ |
717
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
15 mixin(optionEnum!("DocFormat", "LaTeX", "XML", "HTML", "PlainText")); |
473 | 16 |
17 /** | |
18 * Supported comment formats. | |
19 * | |
20 * http://www.stack.nl/~dimitri/doxygen/docblocks.html | |
21 * http://www.digitalmars.com/d/ddoc.html | |
22 */ | |
717
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
23 mixin(optionEnum!("CommentFormat", "Ddoc", "Doxygen")); |
473 | 24 |
25 /** Supported image formats. */ | |
717
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
26 mixin(optionEnum!("ImageFormat", "PNG", "SVG", "GIF", "PDF")); |
473 | 27 |
28 /** Image format extensions. */ | |
29 const imageFormatExts = [ "png", "svg", "gif", "pdf" ]; | |
30 | |
31 /** Supported graph writers. */ | |
717
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
32 mixin(optionEnum!("GraphFormat", "Dot", "ModuleNames", "ModulePaths")); |
473 | 33 |
34 struct GraphOptions { | |
35 /// image format to use for graphs | |
36 ImageFormat imageFormat; | |
37 /// maximum depth of dependencies in graphs | |
38 uint depth; | |
39 /// color of normal modules | |
40 char[] nodeColor; | |
41 /// color of the modules in cyclic dep relation | |
42 char[] cyclicNodeColor; | |
43 /// unlocatable module color | |
44 char[] unlocatableNodeColor; | |
45 /// color of the dependencies | |
46 char[] depColor; | |
47 /// color of the dependencies in cyclic dep relation | |
48 char[] cyclicDepColor; | |
49 /// color of the public dependencies | |
50 char[] publicDepColor; | |
51 /// package color | |
52 char[] clusterColor; | |
53 /// include unlocatable modules to the dep graph | |
54 bool includeUnlocatableModules; | |
55 /// highlight imports in cyclic dep relation | |
56 bool highlightCyclicEdges; | |
57 /// highlight modules in cyclic dep relation | |
58 bool highlightCyclicVertices; | |
59 /// group modules by package names in dep graph | |
60 bool groupByPackageNames; | |
61 /// group modules hierarchically or by full package name | |
62 bool groupByFullPackageName; | |
63 } | |
64 | |
65 struct ListingOptions { | |
66 /// use literate programming symbols [LaTeX] | |
67 bool literateStyle; | |
68 /// enable source code listings | |
69 bool enableListings; | |
70 } | |
71 | |
72 struct TemplateOptions { | |
73 /// project title | |
74 char[] title; | |
75 /// project version | |
76 char[] versionString; | |
77 /// copyright notice | |
78 char[] copyright; | |
79 /// paper size [LaTeX] | |
80 char[] paperSize; | |
81 /// use short file names [HTML] | |
82 bool shortFileNames; | |
83 /// page template style to use, customizable via docgen/templates | |
84 char[] templateStyle; | |
85 } | |
86 | |
87 struct ParserOptions { | |
88 /// paths to search for imports | |
89 char[][] importPaths; | |
90 /// paths to "root files" | |
91 char[][] rootPaths; | |
92 /// regexps for excluding modules | |
93 char[][] strRegexps; | |
94 /// comment format [comment parser] | |
95 CommentFormat commentFormat; | |
96 /// maximum depth of dependencies | |
97 uint depth; | |
98 } | |
99 | |
100 struct DocGeneratorOptions { | |
101 /// location for the generated output | |
102 char[] outputDir; | |
103 | |
104 /// list of document formats to be generated | |
105 DocFormat[] outputFormats; | |
717
cb8edb09108a
Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
473
diff
changeset
|
106 |
473 | 107 GraphOptions graph; |
108 ListingOptions listing; | |
109 TemplateOptions templates; | |
110 ParserOptions parser; | |
111 } | |
112 |