ROSE
0.11.109.0
|
Base class for generating GraphViz output.
The G
template parameter is the type of graph for which output is being generated. G
must be a Sawyer::Container::Graph
type.
Definition at line 140 of file GraphViz.h.
#include <Rose/BinaryAnalysis/Partitioner2/GraphViz.h>
Classes | |
struct | PseudoEdge |
Public Types | |
typedef G | Graph |
typedef std::vector< Organization > | VertexOrganization |
Organizational information for vertices. More... | |
typedef std::vector< Organization > | EdgeOrganization |
Organizational information for edges. More... | |
typedef Sawyer::Container::Map< std::string, Organization > | SubgraphOrganization |
Organizational information for subgraphs. More... | |
Public Member Functions | |
BaseEmitter () | |
Default constructor. More... | |
BaseEmitter (const Graph &g) | |
Constructor. More... | |
void | graph (const Graph &g) |
Reset the graph. More... | |
void | selectAll (bool b=true) |
Causes all vertices and edges to be selected. More... | |
void | selectNone () |
Deselects all vertices and edges. More... | |
void | selectAllVertices (bool b=true) |
Causes all vertices to be selected. More... | |
void | selectAllEdges (bool b=true) |
Causes all edges to be selected. More... | |
void | deselectParallelEdges () |
Deselect all but one parallel edge. More... | |
virtual void | emit (std::ostream &) const |
Dump selected vertices, edges, and subgraphs. More... | |
Attributes & | defaultGraphAttributes () |
Property: default graph attributes. More... | |
const Attributes & | defaultGraphAttributes () const |
Property: default graph attributes. More... | |
Attributes & | defaultNodeAttributes () |
Property: default graph node attributes. More... | |
const Attributes & | defaultNodeAttributes () const |
Property: default graph node attributes. More... | |
Attributes & | defaultEdgeAttributes () |
Property: default graph edge attributes. More... | |
const Attributes & | defaultEdgeAttributes () const |
Property: default graph edge attributes. More... | |
const Color::HSV & | subgraphColor () const |
Property: color to use for function subgraph background. | |
void | subgraphColor (const Color::HSV &bg) |
Property: color to use for function subgraph background. | |
const VertexOrganization & | vertexOrganization () const |
Property: Controls which vertices are to appear in the output, and how. More... | |
VertexOrganization & | vertexOrganization () |
Property: Controls which vertices are to appear in the output, and how. More... | |
const Organization & | vertexOrganization (size_t vertexId) const |
Property: Controls which vertices are to appear in the output, and how. More... | |
Organization & | vertexOrganization (size_t vertexId) |
Property: Controls which vertices are to appear in the output, and how. More... | |
const Organization & | vertexOrganization (const typename G::ConstVertexIterator &vertex) const |
Property: Controls which vertices are to appear in the output, and how. More... | |
const Organization & | vertexOrganization (const typename G::Vertex &vertex) const |
Property: Controls which vertices are to appear in the output, and how. More... | |
Organization & | vertexOrganization (const typename G::ConstVertexIterator &vertex) |
Property: Controls which vertices are to appear in the output, and how. More... | |
Organization & | vertexOrganization (const typename G::Vertex &vertex) |
Property: Controls which vertices are to appear in the output, and how. More... | |
const EdgeOrganization & | edgeOrganization () const |
Property: Controls which edges are to appear in the output, and how. More... | |
EdgeOrganization & | edgeOrganization () |
Property: Controls which edges are to appear in the output, and how. More... | |
const Organization & | edgeOrganization (size_t edgeId) const |
Property: Controls which edges are to appear in the output, and how. More... | |
Organization & | edgeOrganization (size_t edgeId) |
Property: Controls which edges are to appear in the output, and how. More... | |
const Organization & | edgeOrganization (const typename G::ConstEdgeIterator &edge) const |
Property: Controls which edges are to appear in the output, and how. More... | |
const Organization & | edgeOrganization (const typename G::Edge &edge) const |
Property: Controls which edges are to appear in the output, and how. More... | |
Organization & | edgeOrganization (const typename G::ConstEdgeIterator &edge) |
Property: Controls which edges are to appear in the output, and how. More... | |
Organization & | edgeOrganization (const typename G::Edge &edge) |
Property: Controls which edges are to appear in the output, and how. More... | |
const SubgraphOrganization & | subgraphOrganization () const |
Property: Controls which subgraphs appear in the output, and how. More... | |
SubgraphOrganization & | subgraphOrganization () |
Property: Controls which subgraphs appear in the output, and how. More... | |
const Organization & | subgraphOrganization (const std::string &name) const |
Property: Controls which subgraphs appear in the output, and how. More... | |
Organization & | subgraphOrganization (const std::string &name) |
Property: Controls which subgraphs appear in the output, and how. More... | |
Protected Types | |
typedef Sawyer::Container::Map< size_t, size_t > | VMap |
Protected Member Functions | |
size_t | emitVertex (std::ostream &, const typename G::ConstVertexIterator &, const Organization &, const VMap &) const |
Emit a single vertex if it hasn't been emitted already. More... | |
void | emitEdge (std::ostream &, const typename G::ConstEdgeIterator &, const Organization &, const VMap &) const |
Emit a single edge. More... | |
Protected Attributes | |
Graph | graph_ |
VertexOrganization | vertexOrganization_ |
EdgeOrganization | edgeOrganization_ |
SubgraphOrganization | subgraphOrganization_ |
Attributes | defaultGraphAttributes_ |
Attributes | defaultNodeAttributes_ |
Attributes | defaultEdgeAttributes_ |
std::list< PseudoEdge > | pseudoEdges_ |
Color::HSV | subgraphColor_ |
typedef std::vector<Organization> Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::VertexOrganization |
Organizational information for vertices.
Definition at line 145 of file GraphViz.h.
typedef std::vector<Organization> Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::EdgeOrganization |
Organizational information for edges.
Definition at line 148 of file GraphViz.h.
typedef Sawyer::Container::Map<std::string, Organization> Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::SubgraphOrganization |
Organizational information for subgraphs.
Definition at line 151 of file GraphViz.h.
|
inline |
Default constructor.
Construct a GraphViz emitter having an empty graph. The graph method can be called to give the emitter a new graph later.
Definition at line 181 of file GraphViz.h.
|
inlineexplicit |
Constructor.
Construct a generator for the specified graph. The graph is copied into this generator.
Definition at line 186 of file GraphViz.h.
|
inline |
Reset the graph.
Definition at line 192 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >::BaseEmitter().
|
inline |
Property: default graph attributes.
Attributes that should apply to the graph as a whole.
Definition at line 207 of file GraphViz.h.
|
inline |
Property: default graph attributes.
Attributes that should apply to the graph as a whole.
Definition at line 210 of file GraphViz.h.
|
inline |
Property: default graph node attributes.
Attributes that should apply to all graph nodes.
Definition at line 220 of file GraphViz.h.
|
inline |
Property: default graph node attributes.
Attributes that should apply to all graph nodes.
Definition at line 223 of file GraphViz.h.
|
inline |
Property: default graph edge attributes.
Attributes that should apply to all graph edges.
Definition at line 233 of file GraphViz.h.
|
inline |
Property: default graph edge attributes.
Attributes that should apply to all graph edges.
Definition at line 236 of file GraphViz.h.
|
inline |
Property: Controls which vertices are to appear in the output, and how.
Each vertex of the graph has an entry in this table, and the entry describes such things as whether the vertex will be present in the GraphViz file, which subgraph (if any) it will belong to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 258 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >::vertexOrganization().
|
inline |
Property: Controls which vertices are to appear in the output, and how.
Each vertex of the graph has an entry in this table, and the entry describes such things as whether the vertex will be present in the GraphViz file, which subgraph (if any) it will belong to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 261 of file GraphViz.h.
|
inline |
Property: Controls which vertices are to appear in the output, and how.
Each vertex of the graph has an entry in this table, and the entry describes such things as whether the vertex will be present in the GraphViz file, which subgraph (if any) it will belong to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 264 of file GraphViz.h.
|
inline |
Property: Controls which vertices are to appear in the output, and how.
Each vertex of the graph has an entry in this table, and the entry describes such things as whether the vertex will be present in the GraphViz file, which subgraph (if any) it will belong to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 268 of file GraphViz.h.
|
inline |
Property: Controls which vertices are to appear in the output, and how.
Each vertex of the graph has an entry in this table, and the entry describes such things as whether the vertex will be present in the GraphViz file, which subgraph (if any) it will belong to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 272 of file GraphViz.h.
|
inline |
Property: Controls which vertices are to appear in the output, and how.
Each vertex of the graph has an entry in this table, and the entry describes such things as whether the vertex will be present in the GraphViz file, which subgraph (if any) it will belong to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 275 of file GraphViz.h.
|
inline |
Property: Controls which vertices are to appear in the output, and how.
Each vertex of the graph has an entry in this table, and the entry describes such things as whether the vertex will be present in the GraphViz file, which subgraph (if any) it will belong to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 278 of file GraphViz.h.
|
inline |
Property: Controls which vertices are to appear in the output, and how.
Each vertex of the graph has an entry in this table, and the entry describes such things as whether the vertex will be present in the GraphViz file, which subgraph (if any) it will belong to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 281 of file GraphViz.h.
|
inline |
Property: Controls which edges are to appear in the output, and how.
Each edge of the CFG has an entry in this table, and the entry describes such things as whether the edge will be present in the GraphViz file, which subgraph (if any) it belongs to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 296 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >::edgeOrganization().
|
inline |
Property: Controls which edges are to appear in the output, and how.
Each edge of the CFG has an entry in this table, and the entry describes such things as whether the edge will be present in the GraphViz file, which subgraph (if any) it belongs to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 299 of file GraphViz.h.
|
inline |
Property: Controls which edges are to appear in the output, and how.
Each edge of the CFG has an entry in this table, and the entry describes such things as whether the edge will be present in the GraphViz file, which subgraph (if any) it belongs to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 302 of file GraphViz.h.
|
inline |
Property: Controls which edges are to appear in the output, and how.
Each edge of the CFG has an entry in this table, and the entry describes such things as whether the edge will be present in the GraphViz file, which subgraph (if any) it belongs to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 306 of file GraphViz.h.
|
inline |
Property: Controls which edges are to appear in the output, and how.
Each edge of the CFG has an entry in this table, and the entry describes such things as whether the edge will be present in the GraphViz file, which subgraph (if any) it belongs to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 310 of file GraphViz.h.
|
inline |
Property: Controls which edges are to appear in the output, and how.
Each edge of the CFG has an entry in this table, and the entry describes such things as whether the edge will be present in the GraphViz file, which subgraph (if any) it belongs to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 313 of file GraphViz.h.
|
inline |
Property: Controls which edges are to appear in the output, and how.
Each edge of the CFG has an entry in this table, and the entry describes such things as whether the edge will be present in the GraphViz file, which subgraph (if any) it belongs to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 316 of file GraphViz.h.
|
inline |
Property: Controls which edges are to appear in the output, and how.
Each edge of the CFG has an entry in this table, and the entry describes such things as whether the edge will be present in the GraphViz file, which subgraph (if any) it belongs to, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 319 of file GraphViz.h.
|
inline |
Property: Controls which subgraphs appear in the output, and how.
Each subgraph has a distinct name consisting of only letters, numbers, and underscores. The table contains information about whether the subgraph is selected for output, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 334 of file GraphViz.h.
|
inline |
Property: Controls which subgraphs appear in the output, and how.
Each subgraph has a distinct name consisting of only letters, numbers, and underscores. The table contains information about whether the subgraph is selected for output, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 337 of file GraphViz.h.
|
inline |
Property: Controls which subgraphs appear in the output, and how.
Each subgraph has a distinct name consisting of only letters, numbers, and underscores. The table contains information about whether the subgraph is selected for output, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 340 of file GraphViz.h.
|
inline |
Property: Controls which subgraphs appear in the output, and how.
Each subgraph has a distinct name consisting of only letters, numbers, and underscores. The table contains information about whether the subgraph is selected for output, its label, and other attributes.
Most GraphViz-emitting methods modify this information and then call the basic emit method. In general, if the user supplies a label or attribute prior to such calls then that information is used instead of calculating new information.
Definition at line 343 of file GraphViz.h.
|
inline |
Causes all vertices and edges to be selected.
Causes all vertices and edges to be selected as the core part of the graph. If b
is false then all vertices and edges are deselected instead.
Definition at line 352 of file GraphViz.h.
|
inline |
Deselects all vertices and edges.
Definition at line 358 of file GraphViz.h.
|
inline |
Causes all vertices to be selected.
Causes all vertices to be selected as the core part of the graph. If b
is false then all vertices are deselected instead.
Definition at line 368 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >::selectAll(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >::selectNone().
|
inline |
Causes all edges to be selected.
Causes all edges to be selected as the core part of the graph. If b
is false then all edges are deselected instead.
Definition at line 377 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >::selectAll(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< ControlFlowGraph >::selectNone().
void Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::deselectParallelEdges | ( | ) |
Deselect all but one parallel edge.
For parallel edges between a pair of vertices, all but one is deselected. Which one remains selected is arbitrary.
Definition at line 1001 of file GraphViz.h.
|
virtual |
Dump selected vertices, edges, and subgraphs.
This is the most basic emitter that produces an entire GraphViz file. The graph will contain the selected vertices and edges organized into subgraphs according to the vertex, edge, and subgraph organization information.
Definition at line 933 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::escape(), Sawyer::Container::Map< K, T, Cmp, Alloc >::exists(), Sawyer::Container::Map< K, T, Cmp, Alloc >::insert(), Rose::BinaryAnalysis::Partitioner2::GraphViz::Organization::isSelected(), Rose::StringUtility::numberToString(), Rose::BinaryAnalysis::Partitioner2::GraphViz::Organization::subgraph(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::toString().
|
protected |
Emit a single vertex if it hasn't been emitted already.
In any case, returns the GraphViz ID number for the vertex.
Definition at line 897 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::Organization::attributes(), Sawyer::Container::Map< K, T, Cmp, Alloc >::getOptional(), Rose::BinaryAnalysis::Partitioner2::GraphViz::Organization::isSelected(), Rose::BinaryAnalysis::Partitioner2::GraphViz::Organization::label(), Rose::BinaryAnalysis::Partitioner2::GraphViz::Organization::name(), Rose::BinaryAnalysis::Partitioner2::GraphViz::NO_ID, Rose::StringUtility::numberToString(), Sawyer::Container::Map< K, T, Cmp, Alloc >::size(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::toString().
|
protected |
Emit a single edge.
The vertices must have been emitted already.
Definition at line 913 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::Organization::attributes(), Sawyer::Container::Map< K, T, Cmp, Alloc >::exists(), Rose::BinaryAnalysis::Partitioner2::GraphViz::Organization::label(), Rose::StringUtility::numberToString(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::toString().