Mercurial > projects > dil
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/docgen/sourcelisting/latexwriter.d Sun Mar 09 00:12:19 2008 +0100 @@ -0,0 +1,32 @@ +/** + * Author: Jari-Matti Mäkelä + * License: GPL3 + */ +module docgen.sourcelisting.latexwriter; + +import docgen.sourcelisting.writer; +//import dil.Parser; +import tango.io.FilePath; + +/** + * Adds a code listing section for the given file. + */ +class LaTeXWriter : AbstractWriter!(ListingWriterFactory), ListingWriter { + PageWriter writer; + + this(ListingWriterFactory factory, PageWriter writer) { + super(factory); + this.writer = writer; + } + + //void generateListing(Parser parser) { /* TODO */ } + + void generateListing(InputStream input, OutputStream output, char[] moduleName) { + output.copy(input); + + writer.addListing( + moduleName, + FilePath((cast(Object)output.conduit).toString()).file + ); + } +}