Package ghidra.program.model.graph
Interface GraphData
-
public interface GraphDataCollection of edges and vertices that make up a graph.GraphDatais intended to be displayed on aGraphDisplay.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GraphEdgecreateEdge(java.lang.String vertexID, GraphVertex start, GraphVertex end)Create an edge on the graph connecting two vertices.GraphVertexcreateVertex(java.lang.String name, java.lang.String vertexID)Create a Vertex with a given name and vertex ID.java.util.Iterator<? extends GraphEdge>getEdges()Get an iterator over all defined edges.GraphVertexgetVertex(java.lang.String vertexID)Get a vertex with a given address string.java.util.Iterator<? extends GraphVertex>getVertices()Get an iterator over all defined vertices.
-
-
-
Method Detail
-
createVertex
GraphVertex createVertex(java.lang.String name, java.lang.String vertexID)
Create a Vertex with a given name and vertex ID. The vertexID string is used to uniquely identify a vertex. It is used for selection and location mapping from/to Ghidra and the graph display. It should be mappable back to an location/selection that represents the vertex in ghidra terms.- Parameters:
name- name of the vertex, its labelvertexID- identifier to uniquely identify this vertex.- Returns:
- a graph vertex
-
getVertex
GraphVertex getVertex(java.lang.String vertexID)
Get a vertex with a given address string.- Parameters:
vertexID- identifier to uniquely identify this vertex. The key is useful for mapping location/selection from/to Ghidra and Renoir- Returns:
- a vertex tagged with the given address.
-
createEdge
GraphEdge createEdge(java.lang.String vertexID, GraphVertex start, GraphVertex end)
Create an edge on the graph connecting two vertices. NOTE: These MUST be two vertices created from the above createVertex function. The address string is used to uniquely identify a vertex. It is used for selection and location mapping from/to Ghidra and the graph display. It should be mappable back to an actual address in ghidra terms.- Parameters:
vertexID- identifier to uniquely identify this vertexstart- start vertexend- end vertex- Returns:
- a graph edge
-
getVertices
java.util.Iterator<? extends GraphVertex> getVertices()
Get an iterator over all defined vertices. Every object in the iterator will be a GraphVertex.- Returns:
- a vertex iterator
-
getEdges
java.util.Iterator<? extends GraphEdge> getEdges()
Get an iterator over all defined edges. Every object in the iterator will be a GraphEdge.
-
-