Otawa  0.10
otawa::display::AbstractDrawer Class Reference

Provides facilities to draw a graph. More...

#include <otawa/display/AbstractDrawer.h>

Inheritance diagram for otawa::display::AbstractDrawer:
otawa::display::GenDrawer< G, D >

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

Graphgraph
 
FragTable< Vertex * > vertices
 
FragTable< Edge * > edges
 

Detailed Description

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:

  • kind Kind of drawing
  • path path of the file to create
  • page_fill page backrgound fill style
  • page_text page text style
  • default_vertex default vertex shape style
  • default_edge_line default edge line style
  • default_edge_text default edge label text style

Constructor & Destructor Documentation

otawa::display::AbstractDrawer::AbstractDrawer ( void  )

Build a drawer with the default driver.

Exceptions
display::ExceptionIf 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.

Parameters
driverDriver to use.

References graph, and otawa::display::Driver::newGraph().

virtual otawa::display::AbstractDrawer::~AbstractDrawer ( void  )
inlinevirtual

Member Function Documentation

void otawa::display::AbstractDrawer::configure ( Output caption,
TextStyle text,
FillStyle fill 
)
virtual

This method may be overriden to provide a customized graph ledend.

Parameters
outGraph caption.
textGraph caption text style to configure.
fillGraph 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().

Member Data Documentation

LineStyle otawa::display::AbstractDrawer::default_edge_line
TextStyle otawa::display::AbstractDrawer::default_edge_text
ShapeStyle otawa::display::AbstractDrawer::default_vertex
FragTable<Edge *> otawa::display::AbstractDrawer::edges
private
kind_t otawa::display::AbstractDrawer::kind
FillStyle otawa::display::AbstractDrawer::page_fill

Referenced by draw().

TextStyle otawa::display::AbstractDrawer::page_text

Referenced by draw().

String otawa::display::AbstractDrawer::path
FragTable<Vertex *> otawa::display::AbstractDrawer::vertices
private

The documentation for this class was generated from the following files: