22extern gvplugin_library_t gvplugin_dot_layout_LTX_library;
27lt_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;
326void TGraphStruct::Streamer(
TBuffer &)
char * Form(const char *fmt,...)
Buffer base class used for serializing objects.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
An edge object connecting two nodes which can be added in a TGraphStruct.
void CreateGVEdge(GVizAgraph_t *gv)
Create the GraphViz edge into the GraphViz data structure gv.
void Layout()
Layout this edge in the GraphViz space.
void SaveAttributes(std::ostream &, const char *)
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.
void SaveAttributes(std::ostream &)
Save attributes as a C++ statement(s) on output stream out called by TGraphStruct::SavePrimitive.
void CreateGVNode(GVizAgraph_t *gv)
Create the GraphViz node into the GraphViz data structure gv.
void Layout()
Layout this node in the GraphViz space.
The Graph Structure is an interface to the graphviz package.
TList * fEdges
List of edges in this TGraphStruct.
void AddNode(TGraphNode *node)
Add the node "node" in this TGraphStruct.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual ~TGraphStruct()
Graph Structure default destructor.
GVC_s * fGVC
Graphviz context.
void Draw(Option_t *option="")
Draw the graph.
TList * fNodes
List of nodes in this TGraphStruct.
Double_t fMargin
Margin around the graph (in dots)
Int_t Layout()
Layout the graph into a GraphViz data structure.
void SetMargin(Double_t m=10)
GVizAgraph_t * fGVGraph
Graphviz graph.
void AddEdge(TGraphEdge *edge)
Add the edge "edge" in this TGraphStruct.
void DumpAsDotFile(const char *filename)
Dump this graph structure as a "dot" file.
TGraphStruct()
Graph Structure default constructor.
virtual void Add(TObject *obj)
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.