Otawa  0.10
otawa::display::Graph Class Referenceabstract

A graph provides facilities to display a graph. More...

#include <otawa/display/Graph.h>

Inheritance diagram for otawa::display::Graph:
otawa::display::Item otawa::PropList otawa::display::GraphVizGraph

Public Member Functions

virtual NodenewNode (const PropList &style=PropList::EMPTY, const PropList &props=PropList::EMPTY)=0
 This function creates a new node in the graph. More...
 
virtual EdgenewEdge (Node *source, Node *target, const PropList &style=PropList::EMPTY, const PropList &props=PropList::EMPTY)=0
 This function creates a new edge between the two given nodes, in the graph. More...
 
virtual void display (void)=0 throw (DisplayException)
 This functions displays the graph. More...
 
virtual void setProps (const PropList &props)=0
 Set the object properties that have to be printed. More...
 
PropertygetProp (const AbstractIdentifier *id) const
 Find a property by its identifier. More...
 
void setProp (Property *prop)
 Set the property in the property list removing any double. More...
 
void setProp (const AbstractIdentifier *id)
 
void removeProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier. More...
 
void removeProp (const AbstractIdentifier &id)
 
PropertyextractProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier and return it. More...
 
PropertyextractProp (const AbstractIdentifier &id)
 Remove a property matching the given identifier and return it. More...
 
void addProp (Property *prop)
 Add property to the list without checking of duplication. More...
 
void removeAllProp (const AbstractIdentifier *id)
 Remove all the properties matching the given identifier. More...
 
bool hasProp (const AbstractIdentifier &id) const
 Test if the property list contains a property matching the given identifier. More...
 
void clearProps (void)
 Remove all properties from the list. More...
 
void addProps (const PropList &props)
 Add all properties from the given property list, in a reverse order. More...
 
void print (elm::io::Output &out) const
 Display the current property list. More...
 

Static Public Attributes

static const PropList EMPTY
 This is an empty proplist for convenience. More...
 

Detailed Description

A graph provides facilities to display a graph.

newNode() and newEdge() methods builds the graph that is displayed when the display() method is called.

See also
odisplay

Member Function Documentation

void otawa::PropList::clearProps ( void  )
inherited
otawa::display::Graph::display ( void  )
throw (DisplayException
)
pure virtual

This functions displays the graph.

Implemented in otawa::display::GraphVizGraph.

Referenced by otawa::display::CFGDrawer::display(), and otawa::display::AbstractDrawer::draw().

Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inherited

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::script::Script::makeConfig().

Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inlineinherited

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::PropList::extractProp().

Referenced by otawa::PropList::extractProp().

bool otawa::PropList::hasProp ( const AbstractIdentifier id) const
inlineinherited

Test if the property list contains a property matching the given identifier.

Parameters
idProperty identifier to look for.
Returns
True if the list contains the matching property, false else.

References otawa::PropList::getProp().

Referenced by otawa::ipet::BasicConstraintsBuilder::addEntryConstraint(), otawa::Monitor::configure(), otawa::ImmutableRef< T, I >::exists(), and otawa::Manager::setVerbosity().

otawa::display::Graph::newEdge ( Node source,
Node target,
const PropList style = PropList::EMPTY,
const PropList props = PropList::EMPTY 
)
pure virtual

This function creates a new edge between the two given nodes, in the graph.

Parameters
sourceSource node of the edge.
targetTarget node of the edge.
styleStyle of the node.
propsProperties to display.

Implemented in otawa::display::GraphVizGraph.

Referenced by otawa::display::AbstractDrawer::Edge::Edge(), and otawa::display::CFGDrawer::make().

otawa::display::Graph::newNode ( const PropList style = PropList::EMPTY,
const PropList props = PropList::EMPTY 
)
pure virtual

This function creates a new node in the graph.

Parameters
styleStyle of the node.
propsProperties to display.

Implemented in otawa::display::GraphVizGraph.

Referenced by otawa::display::CFGDrawer::make(), and otawa::display::AbstractDrawer::Vertex::Vertex().

void otawa::PropList::print ( elm::io::Output out) const
inherited

Display the current property list.

Parameters
outOutput to use.

Referenced by otawa::operator<<(), and otawa::ContextualProperty::print().

void otawa::PropList::removeAllProp ( const AbstractIdentifier id)
inherited

Remove all the properties matching the given identifier.

Parameters
idIdentifier of properties to remove.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::LoopUnroller::unroll().

void otawa::PropList::removeProp ( const AbstractIdentifier id)
inherited
void otawa::PropList::removeProp ( const AbstractIdentifier id)
inlineinherited
void otawa::PropList::setProp ( Property prop)
inherited

Set the property in the property list removing any double.

Parameters
propProperty to set.

References otawa::Property::_next, otawa::Property::id(), and otawa::Property::next().

void otawa::PropList::setProp ( const AbstractIdentifier id)
inlineinherited
otawa::display::Item::setProps ( const PropList props)
pure virtualinherited

Set the object properties that have to be printed.

Parameters
propsSet the properties to print.

Implemented in otawa::display::GraphVizGraph, otawa::display::GraphVizEdge, and otawa::display::GraphVizNode.

Referenced by otawa::display::CFGDrawer::CFGDrawer(), otawa::display::CFGDrawer::onEdge(), and otawa::display::CFGDrawer::onNode().

Member Data Documentation

const PropList otawa::PropList::EMPTY
staticinherited

This is an empty proplist for convenience.


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