22 extern gvplugin_library_t gvplugin_dot_layout_LTX_library;
27 lt_symlist_t lt_preloaded_symbols[] = {
28 {
"gvplugin_dot_layout_LTX_library", (
void*)(&gvplugin_dot_layout_LTX_library) },
77 agclose((Agraph_t*)fGVGraph);
148 file=fopen(filename,
"wt");
168 GD_bb((Agraph_t*)fGVGraph).UR.x+
fMargin, GD_bb((Agraph_t*)fGVGraph).UR.y+
fMargin);
180 if (node) node->
Draw();
191 if (edge) edge->
Draw();
207 fGVC = gvContextPlugins(lt_preloaded_symbols, 0);
215 agclose((Agraph_t*)fGVGraph);
218 fGVGraph = (GVizAgraph_t*)agopen((
char*)
"GVGraph", Agdirected, 0);
220 fGVGraph = (GVizAgraph_t*)agopen((
char*)
"GVGraph", AGDIGRAPH);
244 int ierr = gvLayout(
fGVC, (Agraph_t*)
fGVGraph, (
char*)
"dot");
245 if (ierr)
return ierr;
275 out<<
" TGraphStruct *graphstruct = new TGraphStruct();"<<std::endl;
281 out<<
" TGraphNode *"<<node->
GetName()<<
" = graphstruct->AddNode(\""<<
283 node->
GetTitle()<<
"\");"<<std::endl;
288 out<<
" TGraphNode *"<<node->
GetName()<<
" = graphstruct->AddNode(\""<<
290 node->
GetTitle()<<
"\");"<<std::endl;
301 out<<
" TGraphEdge *"<<
"e"<<en<<
302 " = new TGraphEdge("<<
305 out<<
" graphstruct->AddEdge("<<
"e"<<en<<
");"<<std::endl;
311 out<<
" TGraphEdge *"<<
"e"<<en<<
312 " = new TGraphEdge("<<
315 out<<
" graphstruct->AddEdge("<<
"e"<<en<<
");"<<std::endl;
321 out<<
" graphstruct->Draw();"<<std::endl;
326 void TGraphStruct::Streamer(
TBuffer &)
virtual const char * GetName() const
Returns name of object.
void CreateGVNode(GVizAgraph_t *gv)
Create the GraphViz node into the GraphViz data structure gv.
void DumpAsDotFile(const char *filename)
Dump this graph structure as a "dot" file.
Buffer base class used for serializing objects.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Double_t fMargin
Margin around the graph (in dots)
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
The Graph Structure is an interface to the graphviz package.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
TList * fNodes
List of nodes in this TGraphStruct.
An edge object connecting two nodes which can be added in a TGraphStruct.
void AddNode(TGraphNode *node)
Add the node "node" in this TGraphStruct.
void Layout()
Layout this node in the GraphViz space.
void Layout()
Layout this edge in the GraphViz space.
virtual ~TGraphStruct()
Graph Structure default destructor.
Int_t Layout()
Layout the graph into a GraphViz data structure.
void SetMargin(Double_t m=10)
TList * fEdges
List of edges in this TGraphStruct.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
void AddEdge(TGraphEdge *edge)
Add the edge "edge" in this TGraphStruct.
void Draw(Option_t *option="")
Draw the graph.
char * Form(const char *fmt,...)
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
void SaveAttributes(std::ostream &)
Save attributes as a C++ statement(s) on output stream out called by TGraphStruct::SavePrimitive.
A graph node object which can be added in a TGraphStruct.
GVizAgraph_t * fGVGraph
Graphviz graph.
TGraphStruct()
Graph Structure default constructor.
void CreateGVEdge(GVizAgraph_t *gv)
Create the GraphViz edge into the GraphViz data structure gv.
virtual void Add(TObject *obj)
void SaveAttributes(std::ostream &, const char *)
Save attributes as a C++ statement(s) on output stream out called by TGraphStruct::SavePrimitive.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
GVC_s * fGVC
Graphviz context.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual const char * GetTitle() const
Returns title of object.