annotate src/docgen/moduledoc/htmlwriter.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/moduledoc/htmlwriter.d@381044a3feac
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.moduledoc.htmlwriter;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
6
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
7 import docgen.moduledoc.writer;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
8 import docgen.misc.textutils;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
9
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
10
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
11 /**
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
12 * TODO
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
13 */
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
14 class HTMLWriter : AbstractWriter!(ModuleDocWriterFactory), ModuleDocWriter {
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
15 PageWriter writer;
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 this(ModuleDocWriterFactory factory, PageWriter writer) {
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
18 super(factory);
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
19 this.writer = writer;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
20 }
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
21
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
22 void generateModuleDoc(Module mod, OutputStream output) {
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
23
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 auto inputStream = cast(FileInput)input;
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
26 auto content = new char[inputStream.length];
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
27 auto bytesRead = inputStream.read (content);
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
28
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
29 assert(bytesRead == inputStream.length, "Error reading source file");
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
30 assert(output == null);
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
31
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
32 writer.addListing(
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
33 moduleName,
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
34 xml_escape(content)
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
35 );*/
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
36 }
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
37 }
381044a3feac Misc fixes & updates.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
38