comparison 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
comparison
equal deleted inserted replaced
456:de2675bc9afa 457:33a4cb255fcc
1 /**
2 * Author: Jari-Matti Mäkelä
3 * License: GPL3
4 */
5 module docgen.page.writers;
6
7 public import docgen.page.writer;
8 import docgen.page.htmlwriter;
9 import docgen.page.xmlwriter;
10 import docgen.page.plaintextwriter;
11 import docgen.page.latexwriter;
12
13 class DefaultPageWriterFactory : AbstractWriterFactory, PageWriterFactory {
14 this(DocGenerator generator) {
15 super(generator);
16 }
17
18 PageWriter createPageWriter(OutputStream[] outputs, DocFormat outputFormat) {
19 switch (outputFormat) {
20 case DocFormat.LaTeX:
21 return new LaTeXWriter(this, outputs);
22 case DocFormat.XML:
23 return new XMLWriter(this, outputs);
24 case DocFormat.HTML:
25 return new HTMLWriter(this, outputs);
26 case DocFormat.PlainText:
27 return new PlainTextWriter(this, outputs);
28 default:
29 throw new Exception("Document writer type does not exist!");
30 }
31 }
32 }