Mercurial > projects > dil
comparison src/docgen/sourcelisting/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/sourcelisting/writers.d@381044a3feac |
children |
comparison
equal
deleted
inserted
replaced
805:a3fab8b74a7d | 806:bcb74c9b895c |
---|---|
1 /** | |
2 * Author: Jari-Matti Mäkelä | |
3 * License: GPL3 | |
4 */ | |
5 module docgen.sourcelisting.writers; | |
6 | |
7 public import docgen.sourcelisting.writer; | |
8 import docgen.sourcelisting.latexwriter; | |
9 import docgen.sourcelisting.htmlwriter; | |
10 import docgen.sourcelisting.xmlwriter; | |
11 | |
12 class DefaultListingWriterFactory : AbstractWriterFactory, ListingWriterFactory { | |
13 this(DocGenerator generator) { | |
14 super(generator); | |
15 } | |
16 | |
17 ListingWriter createListingWriter(PageWriter writer, DocFormat outputFormat) { | |
18 switch (outputFormat) { | |
19 case DocFormat.LaTeX: | |
20 return new LaTeXWriter(this, writer); | |
21 case DocFormat.XML: | |
22 return new XMLWriter(this, writer); | |
23 case DocFormat.HTML: | |
24 return new HTMLWriter(this, writer); | |
25 default: | |
26 throw new Exception("Listing writer type does not exist!"); | |
27 } | |
28 } | |
29 } |