diff trunk/src/docgen/graphutils/writers.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/graphutils/writers.d	Wed Sep 19 23:12:20 2007 +0300
@@ -0,0 +1,27 @@
+/**
+ * Author: Jari-Matti Mäkelä
+ * License: GPL3
+ */
+module docgen.graphutils.writers;
+
+public import docgen.graphutils.writer;
+import docgen.graphutils.dotwriter;
+import docgen.graphutils.modulepathwriter;
+import docgen.graphutils.modulenamewriter;
+
+class DefaultGraphWriterFactory : AbstractGraphWriterFactory {
+  this(GraphOptions options) {
+    m_options = options;
+  }
+
+  GraphWriterDg createGraphWriter(OutputStream[] outputs) {
+    switch (m_options.graphFormat) {
+      case GraphFormat.Dot:
+        return &((new DotWriter(this, outputs)).generateGraph);
+      case GraphFormat.ModuleNames:
+        return &((new ModuleNameWriter(this, outputs)).generateGraph);
+      case GraphFormat.ModulePaths:
+        return &((new ModulePathWriter(this, outputs)).generateGraph);
+    }
+  }
+}
\ No newline at end of file