22 #ifndef PRIVATE_GRAPHVIZ_H
23 #define PRIVATE_GRAPHVIZ_H
27 #include <elm/genstruct/FragTable.h>
28 #include <elm/genstruct/HashTable.h>
31 namespace otawa {
namespace display {
virtual int number()
This function returns the number of this node.
Definition: graphviz.h:94
virtual bool printAttribute(elm::io::Output &out, const PropList::Iter &prop)
Process the Property given by the iterator pointing to it.
Definition: graphviz_Node.cpp:111
virtual Edge * newEdge(Node *source, Node *target, const PropList &style=PropList::EMPTY, const PropList &props=PropList::EMPTY)
This function creates a new edge between the two given nodes, in the graph.
Definition: graphviz_Graph.cpp:96
dtd::RefAttr< BasicBlock * > source("source", dtd::STRICT|dtd::REQUIRED)
elm::genstruct::FragTable< GraphVizEdge * > _edges
list of edges in the graph
Definition: graphviz.h:134
bool _hasBody
true if the body have been set, even if it is an empty string
Definition: graphviz.h:84
virtual void printOthersAttributes(elm::io::Output &out)
Prints attributes after all the style PropList have been iterated.
Definition: graphviz_Graph.cpp:64
String _body
node body
Definition: graphviz.h:82
This exception is thrown during the display of a graph if there is an error.
Definition: Graph.h:68
static const PropList EMPTY
This is an empty proplist for convenience.
Definition: PropList.h:66
virtual void setProps(const PropList &props)
Set the object properties that have to be printed.
Definition: graphviz_Edge.cpp:87
virtual void setProps(const PropList &props)
Set the object properties that have to be printed.
Definition: graphviz_Node.cpp:47
virtual void printOthersAttributes(elm::io::Output &out)
Prints attributes after all the style PropList have been iterated.
Definition: graphviz_Edge.cpp:56
virtual void printGraphData(elm::io::Output &out)
Prints to the given output all the data DOT needs to create the graph information.
Definition: graphviz_Graph.cpp:126
virtual void setProps(const PropList &props)
Definition: graphviz_Item.cpp:132
Definition: graphviz.h:75
elm::genstruct::FragTable< GraphVizNode * > _nodes
list of nodes in the graph
Definition: graphviz.h:132
String quoteSpecials(String str)
This function escapes all the special characters, and replaces the newlines by \l (left-align in dot)...
Definition: graphviz_quote.cpp:36
virtual String attributes()
calls attributes(const PropList& style) with the PropList containing the style of the item...
Definition: graphviz_Graph.cpp:72
Definition: graphviz.h:34
GraphVizGraph(const PropList &defaultGraphStyle=PropList::EMPTY, const PropList &defaultNodeStyle=PropList::EMPTY, const PropList &defaultEdgeStyle=PropList::EMPTY)
Constructs a new GraphVizGraph.
Definition: graphviz_Graph.cpp:52
GraphVizDriver(void)
Build the driver.
Definition: display_graphviz.cpp:46
virtual String getPropertiesString()
Makes a string containing the values of all properties in _props separated by newlines.
Definition: graphviz_Item.cpp:34
This iterator is used for reading all properties of a property list.
Definition: PropList.h:92
virtual bool printAttribute(elm::io::Output &out, const PropList::Iter &prop)
Process the Property given by the iterator pointing to it.
Definition: graphviz_Edge.cpp:72
virtual Graph * newGraph(const PropList &defaultGraphStyle=PropList::EMPTY, const PropList &defaultNodeStyle=PropList::EMPTY, const PropList &defaultEdgeStyle=PropList::EMPTY) const
Creates a new graph with default styles given.
Definition: display_graphviz.cpp:53
Definition: graphviz.h:129
String _label
label of the edge
Definition: graphviz.h:109
String _title
node title
Definition: graphviz.h:78
PropList _props
Properties of the attached object.
Definition: graphviz.h:47
GraphVizItem()
Used to set the default behaviour of properties listing to "INCLUDE".
Definition: graphviz_Item.cpp:24
bool _shapeAcceptsBody
true if the shape selected can be cutted into sub-boxes
Definition: graphviz.h:86
GraphVizNode * _src
source of the edge
Definition: graphviz.h:111
virtual void display(void)
This functions displays the graph.
Definition: graphviz_Graph.cpp:151
Definition: graphviz.h:44
virtual void printOthersAttributes(elm::io::Output &out)
Prints attributes after all the style PropList have been iterated.
Definition: graphviz_Item.cpp:55
virtual String attributes()
calls attributes(const PropList& style) with the PropList containing the style of the item...
Definition: graphviz_Edge.cpp:50
int _node_count
node count for giving a different number for each new node
Definition: graphviz.h:140
GraphVizEdge(GraphVizNode *src, GraphVizNode *dest)
Creates a new edge with the first node given as source node, and the second node as target node...
Definition: graphviz_Edge.cpp:27
int _number
number of the node
Definition: graphviz.h:88
A plugin to provide driver to display graphs.
Definition: Plugin.h:38
virtual String attributes()
calls attributes(const PropList& style) with the PropList containing the style of the item...
Definition: graphviz_Node.cpp:41
String quoteNewlines(String str)
This function escapes the newlines in order to avoid giving the newline to DOT input.
Definition: graphviz_quote.cpp:18
Definition: graphviz.h:104
PropList _default_edge_style
default style for the edges
Definition: graphviz.h:138
bool _hasLabel
true if the label have been set, even if it is an empty string
Definition: graphviz.h:107
virtual String attributes()=0
calls attributes(const PropList& style) with the PropList containing the style of the item...
GraphVizNode(int number)
Creates a new node with the given number.
Definition: graphviz_Node.cpp:27
sys::SystemOutStream & out
bool _hasTitle
true if the title have been set, even if it is an empty string
Definition: graphviz.h:80
dtd::RefAttr< BasicBlock * > target("target", dtd::STRICT|dtd::REQUIRED)
elm::genstruct::HashTable< const AbstractIdentifier *, int > _include
List of properties to print.
Definition: graphviz.h:49
PropList _default_node_style
default style for the nodes
Definition: graphviz.h:136
GraphVizNode * _dest
target of the edge
Definition: graphviz.h:113
virtual ~GraphVizItem(void)
Definition: graphviz.h:61
This a list of properties.
Definition: PropList.h:63
virtual bool printAttribute(elm::io::Output &out, const PropList::Iter &prop)
Process the Property given by the iterator pointing to it.
Definition: graphviz_Item.cpp:69
bool _defaultInclude
true if the default is to include all properties
Definition: graphviz.h:53
A graph provides facilities to display a graph.
Definition: Graph.h:76
virtual bool printAttribute(elm::io::Output &out, const PropList::Iter &prop)
Process the Property given by the iterator pointing to it.
Definition: graphviz_GraphElement.cpp:20
virtual Node * newNode(const PropList &style=PropList::EMPTY, const PropList &props=PropList::EMPTY)
This function creates a new node in the graph.
Definition: graphviz_Graph.cpp:83
virtual ~GraphVizGraphElement(void)
Definition: graphviz.h:70
Definition: graphviz.h:68
virtual GraphVizNode * target()
This function returns the target of this edge.
Definition: graphviz.h:119
virtual void setProps(const PropList &props)
Definition: graphviz_Graph.cpp:77
elm::genstruct::HashTable< const AbstractIdentifier *, int > _exclude
List of properties to hide.
Definition: graphviz.h:51
virtual void printOthersAttributes(elm::io::Output &out)
Prints attributes after all the style PropList have been iterated.
Definition: graphviz_Node.cpp:80
virtual GraphVizNode * source()
This function returns the source of this edge.
Definition: graphviz.h:118