Mercurial > projects > dil
diff trunk/src/docgen/page/writers.d @ 457:33a4cb255fcc
Cached images, small fixes, reorganizing.
author | Jari-Matti M?kel? <jmjm@iki.fi> |
---|---|
date | Tue, 30 Oct 2007 15:41:30 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trunk/src/docgen/page/writers.d Tue Oct 30 15:41:30 2007 +0200 @@ -0,0 +1,32 @@ +/** + * Author: Jari-Matti Mäkelä + * License: GPL3 + */ +module docgen.page.writers; + +public import docgen.page.writer; +import docgen.page.htmlwriter; +import docgen.page.xmlwriter; +import docgen.page.plaintextwriter; +import docgen.page.latexwriter; + +class DefaultPageWriterFactory : AbstractWriterFactory, PageWriterFactory { + this(DocGenerator generator) { + super(generator); + } + + PageWriter createPageWriter(OutputStream[] outputs, DocFormat outputFormat) { + switch (outputFormat) { + case DocFormat.LaTeX: + return new LaTeXWriter(this, outputs); + case DocFormat.XML: + return new XMLWriter(this, outputs); + case DocFormat.HTML: + return new HTMLWriter(this, outputs); + case DocFormat.PlainText: + return new PlainTextWriter(this, outputs); + default: + throw new Exception("Document writer type does not exist!"); + } + } +}