Fix dot format
[cl-graph.git] / dev / graphviz-support.lisp
index 65a4f57..b77cfa4 100644 (file)
@@ -57,7 +57,7 @@ ways to specify the same color.
          (funcall vertex-labeler v stream)
          (princ "\", " stream))
        (funcall vertex-formatter v stream)
-       (princ "]" stream))))
+       (princ "];" stream))))
   
   (let ((directed-edge-connector (if (contains-undirected-edge-p g) "--" "->"))
         (directed-edge-tag (when (and (contains-undirected-edge-p g)
@@ -76,7 +76,7 @@ ways to specify the same color.
                (funcall edge-labeler e stream)
                (princ "\"," stream))
              (funcall edge-formatter e stream)
-             (princ "]" stream)))
+             (princ "];" stream)))
       ;; directed edges
       (iterate-vertexes 
        g
@@ -315,22 +315,30 @@ B--D []
     (:layer text)))
 
 (defclass* dot-attributes-mixin ()
-   ((dot-attributes nil ia)))
+  ((dot-attributes nil ia))
+  (:export-p t))
 
-(defclass* dot-graph-mixin (dot-attributes-mixin) ())
-(defclass* dot-vertex-mixin (dot-attributes-mixin) ())
-(defclass* dot-edge-mixin (dot-attributes-mixin) ())
+(defclass* dot-graph-mixin (dot-attributes-mixin) ()
+  (:export-p t))
+(defclass* dot-vertex-mixin (dot-attributes-mixin) ()
+  (:export-p t))
+(defclass* dot-edge-mixin (dot-attributes-mixin) ()
+  (:export-p t))
 
 (defclass* dot-graph (graph-container dot-graph-mixin)
   ()
   (:default-initargs
     :vertex-class 'dot-vertex
-    :directed-edge-class 'dot-edge
-    :undirected-edge-class 'dot-edge))
-
-(defclass* dot-vertex (graph-container-vertex dot-vertex-mixin) ())
-(defclass* dot-edge (graph-container-edge dot-edge-mixin) ())
-(defclass* dot-directed-edge (directed-edge-mixin dot-edge) ())
+    :directed-edge-class 'dot-directed-edge
+    :undirected-edge-class 'dot-edge)
+  (:export-p t))
+
+(defclass* dot-vertex (graph-container-vertex dot-vertex-mixin) ()
+  (:export-p t))
+(defclass* dot-edge (graph-container-edge dot-edge-mixin) ()
+  (:export-p t))
+(defclass* dot-directed-edge (directed-edge-mixin dot-edge) ()
+  (:export-p t))
 
 (defmethod graph->dot-properties ((graph dot-graph) (stream t))
   (loop for (name value) on (dot-attributes graph) by #'cddr