Otawa
0.10
|
Provides facilities to draw a graph. More...
#include <otawa/display/AbstractDrawer.h>
Classes | |
class | Edge |
An edge in a AbstractDrawer. More... | |
class | Vertex |
This class represents vertices in the AbstractDrawer. More... | |
Public Member Functions | |
AbstractDrawer (void) | |
Build a drawer with the default driver. More... | |
AbstractDrawer (Driver &driver) | |
Build a drawer with the given driver. More... | |
virtual | ~AbstractDrawer (void) |
void | draw (void) |
Launch the draw of the graph. More... | |
virtual void | configure (Output &caption, TextStyle &text, FillStyle &fill) |
This method may be overriden to provide a customized graph ledend. More... | |
Public Attributes | |
kind_t | kind |
String | path |
FillStyle | page_fill |
TextStyle | page_text |
ShapeStyle | default_vertex |
LineStyle | default_edge_line |
TextStyle | default_edge_text |
Private Attributes | |
Graph * | graph |
FragTable< Vertex * > | vertices |
FragTable< Edge * > | edges |
Provides facilities to draw a graph.
The vertices and edges of the graph must be built from the classes AbstractDrawer::Vertex and AbstractDrawer::Edge.
AbstractDrawer is rarely used as is. You may prefer automatic graph drawing facilities based on AbstractDrawer provides by GenDrawer.
The drawing is configured using several publicly accessible member attributes:
otawa::display::AbstractDrawer::AbstractDrawer | ( | void | ) |
Build a drawer with the default driver.
display::Exception | If there is no driver available. |
References otawa::display::Driver::find(), graph, and otawa::display::Driver::newGraph().
otawa::display::AbstractDrawer::AbstractDrawer | ( | Driver & | driver | ) |
Build a drawer with the given driver.
driver | Driver to use. |
References graph, and otawa::display::Driver::newGraph().
|
inlinevirtual |
|
virtual |
This method may be overriden to provide a customized graph ledend.
out | Graph caption. |
text | Graph caption text style to configure. |
fill | Graph background fill style to configure. |
Reimplemented in otawa::display::GenDrawer< G, D >.
Referenced by draw(), otawa::display::AbstractDrawer::Vertex::setup(), and otawa::display::AbstractDrawer::Edge::setup().
void otawa::display::AbstractDrawer::draw | ( | void | ) |
Launch the draw of the graph.
References otawa::display::BODY, buf, configure(), otawa::display::Graph::display(), otawa::cfgio::edge(), edges, graph, kind, otawa::display::OUTPUT_KIND, otawa::display::OUTPUT_PATH, page_fill, page_text, path, elm::StringBuffer::toString(), and vertices.
Referenced by otawa::display::CFGOutput::processCFG().
LineStyle otawa::display::AbstractDrawer::default_edge_line |
Referenced by otawa::display::AbstractDrawer::Edge::Edge().
TextStyle otawa::display::AbstractDrawer::default_edge_text |
Referenced by otawa::display::AbstractDrawer::Edge::Edge(), and otawa::display::CFGOutput::processCFG().
ShapeStyle otawa::display::AbstractDrawer::default_vertex |
Referenced by draw(), and otawa::display::AbstractDrawer::Edge::Edge().
|
private |
kind_t otawa::display::AbstractDrawer::kind |
Referenced by draw(), and otawa::display::CFGOutput::processCFG().
String otawa::display::AbstractDrawer::path |
Referenced by draw(), and otawa::display::CFGOutput::processCFG().
Referenced by draw(), and otawa::display::AbstractDrawer::Vertex::Vertex().