Mercurial > projects > dil
diff src/docgen/page/writers.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/page/writers.d@33a4cb255fcc |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/docgen/page/writers.d Sun Mar 09 00:12:19 2008 +0100 @@ -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!"); + } + } +}