ROSE 0.11.145.192
|
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 141 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. | |
typedef std::vector< Organization > | EdgeOrganization |
Organizational information for edges. | |
typedef Sawyer::Container::Map< std::string, Organization > | SubgraphOrganization |
Organizational information for subgraphs. | |
Public Member Functions | |
BaseEmitter () | |
Default constructor. | |
BaseEmitter (const Graph &g) | |
Constructor. | |
void | graph (const Graph &g) |
Reset the graph. | |
void | selectAll (bool b=true) |
Causes all vertices and edges to be selected. | |
void | selectNone () |
Deselects all vertices and edges. | |
void | selectAllVertices (bool b=true) |
Causes all vertices to be selected. | |
void | selectAllEdges (bool b=true) |
Causes all edges to be selected. | |
void | deselectParallelEdges () |
Deselect all but one parallel edge. | |
virtual void | emit (std::ostream &) const |
Dump selected vertices, edges, and subgraphs. | |
Attributes & | defaultGraphAttributes () |
Property: default graph attributes. | |
const Attributes & | defaultGraphAttributes () const |
Property: default graph attributes. | |
Attributes & | defaultNodeAttributes () |
Property: default graph node attributes. | |
const Attributes & | defaultNodeAttributes () const |
Property: default graph node attributes. | |
Attributes & | defaultEdgeAttributes () |
Property: default graph edge attributes. | |
const Attributes & | defaultEdgeAttributes () const |
Property: default graph edge attributes. | |
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. | |
VertexOrganization & | vertexOrganization () |
Property: Controls which vertices are to appear in the output, and how. | |
const Organization & | vertexOrganization (size_t vertexId) const |
Property: Controls which vertices are to appear in the output, and how. | |
Organization & | vertexOrganization (size_t vertexId) |
Property: Controls which vertices are to appear in the output, and how. | |
const Organization & | vertexOrganization (const typename G::ConstVertexIterator &vertex) const |
Property: Controls which vertices are to appear in the output, and how. | |
const Organization & | vertexOrganization (const typename G::Vertex &vertex) const |
Property: Controls which vertices are to appear in the output, and how. | |
Organization & | vertexOrganization (const typename G::ConstVertexIterator &vertex) |
Property: Controls which vertices are to appear in the output, and how. | |
Organization & | vertexOrganization (const typename G::Vertex &vertex) |
Property: Controls which vertices are to appear in the output, and how. | |
const EdgeOrganization & | edgeOrganization () const |
Property: Controls which edges are to appear in the output, and how. | |
EdgeOrganization & | edgeOrganization () |
Property: Controls which edges are to appear in the output, and how. | |
const Organization & | edgeOrganization (size_t edgeId) const |
Property: Controls which edges are to appear in the output, and how. | |
Organization & | edgeOrganization (size_t edgeId) |
Property: Controls which edges are to appear in the output, and how. | |
const Organization & | edgeOrganization (const typename G::ConstEdgeIterator &edge) const |
Property: Controls which edges are to appear in the output, and how. | |
const Organization & | edgeOrganization (const typename G::Edge &edge) const |
Property: Controls which edges are to appear in the output, and how. | |
Organization & | edgeOrganization (const typename G::ConstEdgeIterator &edge) |
Property: Controls which edges are to appear in the output, and how. | |
Organization & | edgeOrganization (const typename G::Edge &edge) |
Property: Controls which edges are to appear in the output, and how. | |
const SubgraphOrganization & | subgraphOrganization () const |
Property: Controls which subgraphs appear in the output, and how. | |
SubgraphOrganization & | subgraphOrganization () |
Property: Controls which subgraphs appear in the output, and how. | |
const Organization & | subgraphOrganization (const std::string &name) const |
Property: Controls which subgraphs appear in the output, and how. | |
Organization & | subgraphOrganization (const std::string &name) |
Property: Controls which subgraphs appear in the output, and how. | |
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. | |
void | emitEdge (std::ostream &, const typename G::ConstEdgeIterator &, const Organization &, const VMap &) const |
Emit a single edge. | |
typedef G Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::Graph |
Definition at line 143 of file GraphViz.h.
typedef std::vector<Organization> Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::VertexOrganization |
Organizational information for vertices.
Definition at line 146 of file GraphViz.h.
typedef std::vector<Organization> Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::EdgeOrganization |
Organizational information for edges.
Definition at line 149 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 152 of file GraphViz.h.
|
protected |
Definition at line 164 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 182 of file GraphViz.h.
|
inlineexplicit |
Constructor.
Construct a generator for the specified graph. The graph is copied into this generator.
Definition at line 187 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::graph().
|
inline |
Reset the graph.
Definition at line 193 of file GraphViz.h.
References Sawyer::Container::Map< K, T, Cmp, Alloc >::clear().
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::BaseEmitter().
|
inline |
Property: default graph attributes.
Attributes that should apply to the graph as a whole.
Definition at line 208 of file GraphViz.h.
|
inline |
Property: default graph attributes.
Attributes that should apply to the graph as a whole.
Definition at line 211 of file GraphViz.h.
|
inline |
Property: default graph node attributes.
Attributes that should apply to all graph nodes.
Definition at line 221 of file GraphViz.h.
|
inline |
Property: default graph node attributes.
Attributes that should apply to all graph nodes.
Definition at line 224 of file GraphViz.h.
|
inline |
Property: default graph edge attributes.
Attributes that should apply to all graph edges.
Definition at line 234 of file GraphViz.h.
|
inline |
Property: default graph edge attributes.
Attributes that should apply to all graph edges.
Definition at line 237 of file GraphViz.h.
|
inline |
Property: color to use for function subgraph background.
Definition at line 245 of file GraphViz.h.
|
inline |
Property: color to use for function subgraph background.
Definition at line 246 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 259 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::vertexOrganization(), Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::vertexOrganization(), Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::vertexOrganization(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 262 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 265 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 269 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 273 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 276 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 279 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 282 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::vertexOrganization().
|
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 297 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::edgeOrganization(), Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::edgeOrganization(), Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::edgeOrganization(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 300 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 303 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 307 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 311 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 314 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 317 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 320 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::edgeOrganization().
|
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 335 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 338 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 341 of file GraphViz.h.
References Sawyer::Container::Map< K, T, Cmp, Alloc >::getOrDefault().
|
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 344 of file GraphViz.h.
References Sawyer::Container::Map< K, T, Cmp, Alloc >::insertMaybeDefault().
|
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 353 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::selectAllEdges(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::selectAllVertices().
|
inline |
Deselects all vertices and edges.
Definition at line 359 of file GraphViz.h.
References Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::selectAllEdges(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::selectAllVertices().
|
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 369 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::selectAll(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 378 of file GraphViz.h.
Referenced by Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::selectAll(), and Rose::BinaryAnalysis::Partitioner2::GraphViz::BaseEmitter< G >::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 982 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 914 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 878 of file GraphViz.h.
References Sawyer::Optional< T >::assignTo(), 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 894 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().
|
protected |
Definition at line 167 of file GraphViz.h.
|
protected |
Definition at line 168 of file GraphViz.h.
|
protected |
Definition at line 169 of file GraphViz.h.
|
protected |
Definition at line 170 of file GraphViz.h.
|
protected |
Definition at line 171 of file GraphViz.h.
|
protected |
Definition at line 172 of file GraphViz.h.
|
protected |
Definition at line 173 of file GraphViz.h.
|
protected |
Definition at line 174 of file GraphViz.h.
|
protected |
Definition at line 175 of file GraphViz.h.