edu.uci.eecs.doc.cascade.graph
Class DOTWriter

java.lang.Object
  extended by edu.uci.eecs.doc.cascade.graph.AbstractGraphWriter
      extended by edu.uci.eecs.doc.cascade.graph.DOTWriter
All Implemented Interfaces:
GraphWriter

public class DOTWriter
extends AbstractGraphWriter

Exports a control flow graph to DOT format.

Author:
Trevor Harmon

Field Summary
 
Fields inherited from class edu.uci.eecs.doc.cascade.graph.AbstractGraphWriter
edgeIDProvider, edgeLabelProvider, graph, vertexIDProvider, vertexLabelProvider
 
Constructor Summary
DOTWriter(Graph graph)
          Creates a new DOTWriter object.
DOTWriter(Graph graph, VertexIDProvider vertexIDProvider, VertexLabelProvider vertexLabelProvider, EdgeIDProvider edgeIDProvider, EdgeLabelProvider edgeLabelProvider)
          Creates a new DOTWriter object.
 
Method Summary
 void write(Writer writer)
          Exports the control flow graph to the specified output stream.
 
Methods inherited from class edu.uci.eecs.doc.cascade.graph.AbstractGraphWriter
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOTWriter

public DOTWriter(Graph graph)
Creates a new DOTWriter object. Default IDs and labels will be provided for the vertices and edges of the graph.

Parameters:
graph - the control flow graph to be exported

DOTWriter

public DOTWriter(Graph graph,
                 VertexIDProvider vertexIDProvider,
                 VertexLabelProvider vertexLabelProvider,
                 EdgeIDProvider edgeIDProvider,
                 EdgeLabelProvider edgeLabelProvider)
Creates a new DOTWriter object.

Parameters:
graph - the control flow graph to be exported
vertexIDProvider - for generating vertex IDs
vertexLabelProvider - for generating vertex labels
edgeIDProvider - for generating edge IDs
edgeLabelProvider - for generating edge labels
Method Detail

write

public void write(Writer writer)
           throws IOException
Exports the control flow graph to the specified output stream.

Specified by:
write in interface GraphWriter
Specified by:
write in class AbstractGraphWriter
Parameters:
writer - an output stream in which to save the graph
Throws:
IOException - if the graph cannot be written to the stream