Otawa
0.10
|
#include </home/casse/otawa/otawa/src/odisplay/graphviz.h>
Public Member Functions | |
GraphVizNode (int number) | |
Creates a new node with the given number. More... | |
virtual int | number () |
This function returns the number of this node. More... | |
virtual String | attributes () |
calls attributes(const PropList& style) with the PropList containing the style of the item. More... | |
virtual void | setProps (const PropList &props) |
Set the object properties that have to be printed. More... | |
Property * | getProp (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) |
Property * | extractProp (const AbstractIdentifier *id) |
Remove a property matching the given identifier and return it. More... | |
Property * | extractProp (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... | |
Protected Member Functions | |
virtual void | printOthersAttributes (elm::io::Output &out) |
Prints attributes after all the style PropList have been iterated. More... | |
virtual bool | printAttribute (elm::io::Output &out, const PropList::Iter &prop) |
Process the Property given by the iterator pointing to it. More... | |
virtual String | getPropertiesString () |
Makes a string containing the values of all properties in _props separated by newlines. More... | |
virtual String | attributes (const PropList &props) |
Prints all attributes (styles) in a string, between brackets. More... | |
Protected Attributes | |
PropList | _props |
Properties of the attached object. More... | |
elm::genstruct::HashTable < const AbstractIdentifier *, int > | _include |
List of properties to print. More... | |
elm::genstruct::HashTable < const AbstractIdentifier *, int > | _exclude |
List of properties to hide. More... | |
bool | _defaultInclude |
true if the default is to include all properties More... | |
Private Attributes | |
String | _title |
node title More... | |
bool | _hasTitle |
true if the title have been set, even if it is an empty string More... | |
String | _body |
node body More... | |
bool | _hasBody |
true if the body have been set, even if it is an empty string More... | |
bool | _shapeAcceptsBody |
true if the shape selected can be cutted into sub-boxes More... | |
int | _number |
number of the node More... | |
This class represents the nodes in the graphviz graph
otawa::display::GraphVizNode::GraphVizNode | ( | int | number | ) |
Creates a new node with the given number.
One must give a different number each time, or the nodes could be confused in the graph
number | node number |
|
inherited |
Add property to the list without checking of duplication.
prop | Property to add. |
References otawa::Property::_next.
Referenced by otawa::Identifier< T >::add(), otawa::ast::ASTInfo::ASTInfo(), otawa::Identifier< otawa::arm::Info * >::copy(), otawa::AbstractIdentifier::initProps(), otawa::ContextualProperty::make(), otawa::script::Script::makeConfig(), otawa::ccg::Builder::processLBlockSet(), otawa::ipet::ILPSystemGetter::processWorkSpace(), otawa::Identifier< T >::ref(), otawa::ContextualProperty::ref(), and otawa::ContextualProperty::refProps().
|
inherited |
Add all properties from the given property list, in a reverse order.
props | Property list to clone. |
References copy(), otawa::PropList::head, and otawa::Property::next().
Referenced by otawa::display::CFGDrawer::CFGDrawer(), otawa::display::GraphVizGraph::GraphVizGraph(), otawa::ParamFeature::instantiate(), otawa::Manager::loadXML(), otawa::display::GraphVizGraph::newEdge(), otawa::display::GraphVizGraph::newNode(), otawa::PropList::operator=(), otawa::Process::Process(), otawa::PropList::PropList(), otawa::display::GraphVizItem::setProps(), otawa::VirtualBasicBlock::VirtualBasicBlock(), and otawa::VirtualCFG::VirtualCFG().
Prints all attributes (styles) in a string, between brackets.
First iterates on the style PropList, calling printAttribute() for each property, and then, calls printOthersAttributes() to finish. This functions escapes all the newlines that have been appened in the functions printAttribute() and printOthersAttributes()
style | styles to be printed |
References buf, otawa::PropList::Iter::ended(), elm::StringBuffer::length(), otawa::display::GraphVizItem::printAttribute(), otawa::display::GraphVizItem::printOthersAttributes(), otawa::display::quoteNewlines(), and elm::StringBuffer::toString().
|
virtual |
calls attributes(const PropList& style) with the PropList containing the style of the item.
Generally, the proplist is the object itself, because it inherits from PropList
Implements otawa::display::GraphVizItem.
References otawa::display::GraphVizItem::attributes().
Referenced by otawa::display::GraphVizGraph::printGraphData().
|
inherited |
Remove all properties from the list.
References otawa::Property::next().
Referenced by otawa::PSTBuilder::getVCFG(), otawa::PropList::operator=(), otawa::display::GraphVizItem::setProps(), otawa::PropList::~PropList(), and otawa::WorkSpace::~WorkSpace().
|
inherited |
Remove a property matching the given identifier and return it.
Caller is responsible of the management of the obtained property.
id | Identifier of the property to extract. |
References otawa::Property::_next, and otawa::Property::next().
Referenced by otawa::script::Script::makeConfig().
|
inlineinherited |
Remove a property matching the given identifier and return it.
Caller is responsible of the management of the obtained property.
id | Identifier of the property to extract. |
References otawa::PropList::extractProp().
Referenced by otawa::PropList::extractProp().
|
inherited |
Find a property by its identifier.
id | Identifier of the property to find. |
References otawa::Property::_next, and otawa::Property::next().
Referenced by otawa::Identifier< otawa::arm::Info * >::exists(), otawa::ContextualProperty::exists(), otawa::ContextualProperty::find(), otawa::Identifier< T >::get(), otawa::PropList::hasProp(), otawa::ContextualProperty::make(), otawa::ParamFeature::matches(), otawa::ImmutableRef< T, I >::print(), otawa::ContextualProperty::print(), otawa::Identifier< T >::ref(), otawa::ContextualProperty::ref(), otawa::ContextualProperty::refProps(), otawa::Identifier< T >::set(), otawa::Identifier< T >::use(), and otawa::Identifier< T >::value().
|
protectedvirtualinherited |
Makes a string containing the values of all properties in _props separated by newlines.
References otawa::display::GraphVizItem::_defaultInclude, otawa::display::GraphVizItem::_exclude, otawa::display::GraphVizItem::_include, otawa::display::GraphVizItem::_props, buf, otawa::PropList::Iter::ended(), elm::StringBuffer::length(), elm::StringBuffer::print(), and elm::StringBuffer::toString().
Referenced by printOthersAttributes(), and otawa::display::GraphVizEdge::printOthersAttributes().
|
inlineinherited |
Test if the property list contains a property matching the given identifier.
id | Property identifier to look for. |
References otawa::PropList::getProp().
Referenced by otawa::ipet::BasicConstraintsBuilder::addEntryConstraint(), otawa::Monitor::configure(), otawa::ImmutableRef< T, I >::exists(), and otawa::Manager::setVerbosity().
|
inlinevirtual |
This function returns the number of this node.
References _number.
Referenced by otawa::display::GraphVizGraph::printGraphData().
|
inherited |
Display the current property list.
out | Output to use. |
Referenced by otawa::operator<<(), and otawa::ContextualProperty::print().
|
protectedvirtual |
Process the Property given by the iterator pointing to it.
Prints the value to the given output, or store the property for example (the property can be printed furthermore by printOthersAttributes())
out | output where to print when something have to be printed iterator on properties. Used to compare the identifier and to get the property value |
Reimplemented from otawa::display::GraphVizGraphElement.
References _body, _hasBody, _hasTitle, _shapeAcceptsBody, _title, otawa::display::BODY, otawa::display::GraphVizGraphElement::printAttribute(), otawa::display::SHAPE, otawa::display::ShapeStyle::SHAPE_BOX, otawa::display::ShapeStyle::SHAPE_CIRCLE, otawa::display::ShapeStyle::SHAPE_DIAMOND, otawa::display::ShapeStyle::SHAPE_EGG, otawa::display::ShapeStyle::SHAPE_ELLIPSE, otawa::display::ShapeStyle::SHAPE_HEXAGON, otawa::display::ShapeStyle::SHAPE_MRECORD, otawa::display::ShapeStyle::SHAPE_OCTAGON, otawa::display::ShapeStyle::SHAPE_PARALLELOGRAM, otawa::display::ShapeStyle::SHAPE_RECORD, otawa::display::ShapeStyle::SHAPE_TRAPEZIUM, otawa::display::ShapeStyle::SHAPE_TRIANGLE, and otawa::display::TITLE.
|
protectedvirtual |
Prints attributes after all the style PropList have been iterated.
One can append endlines to the output
out | output where to print others attributes |
Reimplemented from otawa::display::GraphVizItem.
References _body, _hasBody, _hasTitle, _shapeAcceptsBody, _title, otawa::display::GraphVizItem::getPropertiesString(), elm::String::length(), and otawa::display::quoteSpecials().
|
inherited |
Remove all the properties matching the given identifier.
id | Identifier of properties to remove. |
References otawa::Property::_next, and otawa::Property::next().
Referenced by otawa::LoopUnroller::unroll().
|
inherited |
Remove a property matching the given identifier.
id | Identifier of the property to remove. |
References otawa::Property::_next, and otawa::Property::next().
Referenced by otawa::PSTBuilder::buildTree(), otawa::BBRemover< T >::clean(), otawa::display::CFGOutput::processCFG(), otawa::SubCFGBuilder::processWorkSpace(), otawa::Ref< T, I >::remove(), and otawa::ContextualPath::Ref< T >::remove().
|
inlineinherited |
References otawa::PropList::removeProp().
Referenced by otawa::PropList::removeProp().
|
inherited |
Set the property in the property list removing any double.
prop | Property to set. |
References otawa::Property::_next, otawa::Property::id(), and otawa::Property::next().
|
inlineinherited |
References otawa::PropList::setProp().
Referenced by otawa::PropList::setProp().
|
virtual |
Set the object properties that have to be printed.
props | Set the properties to print. |
Implements otawa::display::Item.
References otawa::display::GraphVizItem::setProps().
Referenced by otawa::display::GraphVizGraph::newNode().
|
private |
node body
Referenced by printAttribute(), and printOthersAttributes().
|
protectedinherited |
true if the default is to include all properties
Referenced by otawa::display::GraphVizItem::getPropertiesString(), and otawa::display::GraphVizItem::printAttribute().
|
protectedinherited |
List of properties to hide.
If the key exists, exclude the property
Referenced by otawa::display::GraphVizItem::getPropertiesString(), and otawa::display::GraphVizItem::printAttribute().
|
private |
true if the body have been set, even if it is an empty string
Referenced by printAttribute(), and printOthersAttributes().
|
private |
true if the title have been set, even if it is an empty string
Referenced by printAttribute(), and printOthersAttributes().
|
protectedinherited |
List of properties to print.
If the key exists, include the property
Referenced by otawa::display::GraphVizItem::getPropertiesString(), and otawa::display::GraphVizItem::printAttribute().
|
private |
number of the node
Referenced by number().
|
protectedinherited |
Properties of the attached object.
Referenced by otawa::display::GraphVizItem::getPropertiesString(), and otawa::display::GraphVizItem::setProps().
|
private |
true if the shape selected can be cutted into sub-boxes
Referenced by printAttribute(), and printOthersAttributes().
|
private |
node title
Referenced by printAttribute(), and printOthersAttributes().
|
staticinherited |
This is an empty proplist for convenience.