Mercurial > projects > dil
diff trunk/src/docgen/sourcelisting/writer.d @ 395:ac9cd48151b6
Added couple of docgen modules.
author | Jari-Matti M?kel? <jmjm@iki.fi> |
---|---|
date | Wed, 19 Sep 2007 23:12:20 +0300 |
parents | |
children | 0bda71dc9c4f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/src/docgen/sourcelisting/writer.d Wed Sep 19 23:12:20 2007 +0300 @@ -0,0 +1,41 @@ +/** + * Author: Jari-Matti Mäkelä + * License: GPL3 + */ +module docgen.sourcelisting.writer; + +public import docgen.misc.misc; +import dil.Parser; +import tango.io.model.IConduit : OutputStream, InputStream; + +struct ListingOptions { + DocFormat docFormat; +} + +interface ListingWriter { + void generateListing(Parser parser); + void generateListing(InputStream input); +} + +abstract class AbstractListingWriter : ListingWriter { + protected ListingWriterFactory factory; + protected OutputStream[] outputs; + + this(ListingWriterFactory factory, OutputStream[] outputs) { + this.factory = factory; + this.outputs = outputs; + } +} + +interface ListingWriterFactory { + ListingOptions *options(); + ListingWriter createListingWriter(OutputStream[] outputs); +} + +abstract class AbstractListingWriterFactory : ListingWriterFactory { + protected ListingOptions m_options; + + public ListingOptions *options() { + return &m_options; + } +} \ No newline at end of file