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) },
148 file=fopen(filename,
"wt");
180 if (node) node->
Draw();
191 if (edge) edge->
Draw();
207 fGVC = gvContextPlugins(lt_preloaded_symbols, 0);
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 * GetTitle() const
Returns title 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.
static const char * filename()
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
The Graph Structure is an interface to the graphviz package.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
An edge object connecting two nodes which can be added in a TGraphStruct.
void AddNode(TGraphNode *node)
Add the node "node" in this TGraphStruct.
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
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 AddEdge(TGraphEdge *edge)
Add the edge "edge" in this TGraphStruct.
void Draw(Option_t *option="")
Draw the graph.
char * Form(const char *fmt,...)
virtual const char * GetName() const
Returns name of object.
void SaveAttributes(std::ostream &)
Save attributes as a C++ statement(s) on output stream out called by TGraphStruct::SavePrimitive.
virtual Int_t GetSize() const
A graph node object which can be added in a TGraphStruct.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
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 void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.