annotate src/docgen/sourcelisting/latexwriter.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/sourcelisting/latexwriter.d@cb8edb09108a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
444
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
1 /**
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
2 * Author: Jari-Matti Mäkelä
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
3 * License: GPL3
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
4 */
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
5 module docgen.sourcelisting.latexwriter;
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
6
453
4e5b35df3060 Parsing bugfixes, cleaned up imports.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 451
diff changeset
7 import docgen.sourcelisting.writer;
4e5b35df3060 Parsing bugfixes, cleaned up imports.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 451
diff changeset
8 //import dil.Parser;
449
757bd048482c Depgraph test + minor modifications.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 448
diff changeset
9 import tango.io.FilePath;
444
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
10
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
11 /**
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
12 * Adds a code listing section for the given file.
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
13 */
451
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
14 class LaTeXWriter : AbstractWriter!(ListingWriterFactory), ListingWriter {
457
33a4cb255fcc Cached images, small fixes, reorganizing.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 453
diff changeset
15 PageWriter writer;
451
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
16
457
33a4cb255fcc Cached images, small fixes, reorganizing.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 453
diff changeset
17 this(ListingWriterFactory factory, PageWriter writer) {
451
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
18 super(factory);
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
19 this.writer = writer;
444
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
20 }
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
21
453
4e5b35df3060 Parsing bugfixes, cleaned up imports.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 451
diff changeset
22 //void generateListing(Parser parser) { /* TODO */ }
444
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
23
451
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
24 void generateListing(InputStream input, OutputStream output, char[] moduleName) {
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
25 output.copy(input);
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
26
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
27 writer.addListing(
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
28 moduleName,
717
cb8edb09108a Updated docgen (mostly) to new tango.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 457
diff changeset
29 FilePath((cast(Object)output.conduit).toString()).file
451
3f44c38bf870 Page templates, more flexible writer interfaces, small fixes.
Jari-Matti M?kel? <jmjm@iki.fi>
parents: 449
diff changeset
30 );
444
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
31 }
0bda71dc9c4f More document template and source listing code.
Jari-Matti M?kel? <jmjm@iki.fi>
parents:
diff changeset
32 }