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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
473
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
1 /**
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
2 * Author: Jari-Matti Mäkelä
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
3 * License: GPL3
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
4 */
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
5 module docgen.misc.options;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
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
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
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
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
16
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
17 /**
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
18 * Supported comment formats.
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
19 *
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
20 * http://www.stack.nl/~dimitri/doxygen/docblocks.html
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
21 * http://www.digitalmars.com/d/ddoc.html
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
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
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
24
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
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
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
27
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
28 /** Image format extensions. */
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
29 const imageFormatExts = [ "png", "svg", "gif", "pdf" ];
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
30
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
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
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
33
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
34 struct GraphOptions {
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
35 /// image format to use for graphs
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
36 ImageFormat imageFormat;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
37 /// maximum depth of dependencies in graphs
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
38 uint depth;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
39 /// color of normal modules
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
40 char[] nodeColor;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
41 /// color of the modules in cyclic dep relation
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
42 char[] cyclicNodeColor;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
43 /// unlocatable module color
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
44 char[] unlocatableNodeColor;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
45 /// color of the dependencies
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
46 char[] depColor;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
47 /// color of the dependencies in cyclic dep relation
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
48 char[] cyclicDepColor;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
49 /// color of the public dependencies
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
50 char[] publicDepColor;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
51 /// package color
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
52 char[] clusterColor;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
53 /// include unlocatable modules to the dep graph
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
54 bool includeUnlocatableModules;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
55 /// highlight imports in cyclic dep relation
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
56 bool highlightCyclicEdges;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
57 /// highlight modules in cyclic dep relation
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
58 bool highlightCyclicVertices;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
59 /// group modules by package names in dep graph
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
60 bool groupByPackageNames;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
61 /// group modules hierarchically or by full package name
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
62 bool groupByFullPackageName;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
63 }
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
64
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
65 struct ListingOptions {
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
66 /// use literate programming symbols [LaTeX]
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
67 bool literateStyle;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
68 /// enable source code listings
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
69 bool enableListings;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
70 }
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
71
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
72 struct TemplateOptions {
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
73 /// project title
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
74 char[] title;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
75 /// project version
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
76 char[] versionString;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
77 /// copyright notice
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
78 char[] copyright;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
79 /// paper size [LaTeX]
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
80 char[] paperSize;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
81 /// use short file names [HTML]
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
82 bool shortFileNames;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
83 /// page template style to use, customizable via docgen/templates
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
84 char[] templateStyle;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
85 }
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
86
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
87 struct ParserOptions {
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
88 /// paths to search for imports
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
89 char[][] importPaths;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
90 /// paths to "root files"
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
91 char[][] rootPaths;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
92 /// regexps for excluding modules
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
93 char[][] strRegexps;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
94 /// comment format [comment parser]
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
95 CommentFormat commentFormat;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
96 /// maximum depth of dependencies
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
97 uint depth;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
98 }
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
99
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
100 struct DocGeneratorOptions {
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
101 /// location for the generated output
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
102 char[] outputDir;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
103
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
104 /// list of document formats to be generated
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
105 DocFormat[] outputFormats;
717
cb8edb09108a Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 473
diff changeset
106
473
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
107 GraphOptions graph;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
108 ListingOptions listing;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
109 TemplateOptions templates;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
110 ParserOptions parser;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
111 }
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
112