22 #ifndef OTAWA_DISPLAY_GENDRAWER_H
23 #define OTAWA_DISPLAY_GENDRAWER_H
27 namespace otawa {
namespace display {
30 template <
class G,
class D>
42 { D::decorate(
_graph,
_, content, shape); }
51 typename G::Edge
edge)
54 { D::decorate(
_graph,
_, label, text, line); }
62 { D::decorate(
_graph, caption, text, fill); }
66 template <
class G,
class D>
68 typename G::template VertexMap<Vertex *> map(graph);
71 for(
typename G::Iterator vertex(graph); vertex; vertex++)
75 for(
typename G::Iterator vertex(graph); vertex; vertex++)
77 new Edge(*
this,
_graph, map.get(vertex), map.get((*edge).sink()), *
edge);
93 const typename G::Vertex vertex,
99 const typename G::Edge
edge,
dtd::RefAttr< BasicBlock * > source("source", dtd::STRICT|dtd::REQUIRED)
An edge in a AbstractDrawer.
Definition: AbstractDrawer.h:55
dtd::Element edge(dtd::make("edge", _EDGE).attr(source).attr(target).attr(called))
TextStyle text
Style of the text publicly accessible for customization.
Definition: AbstractDrawer.h:59
display::Edge * edge
Definition: AbstractDrawer.h:66
LineStyle line
Style of the line publicly accessible for customization.
Definition: AbstractDrawer.h:60
The style of a filled area.
Definition: display.h:83
Definition: GenDrawer.h:37
const G & _graph
Definition: GenDrawer.h:60
Description of the style of text.
Definition: display.h:48
This class represents vertices in the AbstractDrawer.
Definition: AbstractDrawer.h:40
const G & _graph
Definition: GenDrawer.h:45
Shape style.
Definition: display.h:98
static void decorate(const G &graph, const typename G::Edge edge, Output &label, TextStyle &text, LineStyle &line)
Definition: GenDrawer.h:97
ShapeStyle shape
Shape of the vertex publicly accessible for customization.
Definition: AbstractDrawer.h:44
Edge(AbstractDrawer &drawer, const G &graph, Vertex *source, Vertex *sink, typename G::Edge edge)
Definition: GenDrawer.h:50
static void decorate(const G &graph, const typename G::Vertex vertex, Output &content, ShapeStyle &style)
Definition: GenDrawer.h:91
static void decorate(const G &graph, Output &caption, TextStyle &text, FillStyle &fill)
Definition: GenDrawer.h:85
G::Vertex _
Definition: GenDrawer.h:44
virtual void configure(Output &label, TextStyle &text, LineStyle &line)
This method may be overriden to provide a customized displayed text.
Definition: GenDrawer.h:53
A simple engine to draw graphs.
Definition: GenDrawer.h:31
Provides facilities to draw a graph.
Definition: AbstractDrawer.h:35
const G & _graph
Definition: GenDrawer.h:57
Graph * graph
Definition: AbstractDrawer.h:88
virtual void configure(Output &content, ShapeStyle &shape)
This method may be overriden to provide a customized displayed text.
Definition: GenDrawer.h:41
GenDrawer(const G &graph)
Build the drawer.
Definition: GenDrawer.h:67
G::Edge _
Definition: GenDrawer.h:56
virtual void configure(Output &caption, TextStyle &text, FillStyle &fill)
This method may be overriden to provide a customized graph ledend.
Definition: GenDrawer.h:61
Default decorator that just output the given edges and vertices.
Definition: GenDrawer.h:83
Definition: GenDrawer.h:48
Vertex(AbstractDrawer &drawer, const G &graph, typename G::Vertex vertex)
Definition: GenDrawer.h:39