edu.uci.eecs.doc.cascade.graph
Class GMLWriter
java.lang.Object
edu.uci.eecs.doc.cascade.graph.AbstractGraphWriter
edu.uci.eecs.doc.cascade.graph.GMLWriter
- All Implemented Interfaces:
- GraphWriter
public class GMLWriter
- extends AbstractGraphWriter
Exports a control flow graph to GML format.
- Author:
- Trevor Harmon
Method Summary |
void |
write(Writer out)
Exports the control flow graph to the specified output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GMLWriter
public GMLWriter(Graph graph)
- Creates a new GMLWriter 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
GMLWriter
public GMLWriter(Graph graph,
VertexIDProvider vertexIDProvider,
VertexLabelProvider vertexLabelProvider,
EdgeIDProvider edgeIDProvider,
EdgeLabelProvider edgeLabelProvider)
- Creates a new GMLWriter object.
- Parameters:
graph
- the control flow graph to be exportedvertexIDProvider
- for generating vertex IDsvertexLabelProvider
- for generating vertex labelsedgeIDProvider
- for generating edge IDsedgeLabelProvider
- for generating edge labels
write
public void write(Writer out)
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:
out
- an output stream in which to save the graph
- Throws:
IOException
- if the graph cannot be written to the stream