Logo ROOT  
Reference Guide
TClassTree.h
Go to the documentation of this file.
1 // @(#)root/gpad:$Id$
2 // Author: Rene Brun 01/12/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TClassTree
13 #define ROOT_TClassTree
14 
15 
16 #include "TNamed.h"
17 
18 class TClass;
19 class TObjString;
20 
21 class TClassTree : public TNamed {
22 
23 protected:
24  TString fClasses; ///<List of classes to be drawn
25  Float_t fYoffset; ///<offset at top of picture in per cent of pad
26  Float_t fLabelDx; ///<width along x of TPaveLabels in per cent of pad
27  Int_t fNclasses; ///<current number of classes
28  Int_t fShowCod; ///<if 1 show classes referenced by implementation
29  Int_t fShowMul; ///<if 1 show multiple inheritance
30  Int_t fShowHas; ///<if 1 show "has a" relationship
31  Int_t fShowRef; ///<if 1 show classes relationship other than inheritance
32  Int_t *fCstatus; ///<[fNclasses] classes status
33  Int_t *fNdata; ///<[fNclasses] Number of data members per class
34  Int_t *fParents; ///<[fNclasses] parent number of classes (permanent)
35  Int_t *fCparent; ///<!parent number of classes (temporary)
36  char **fDerived; ///<![fNclasses] table to indicate if i derives from j
37  TClass **fCpointer; ///<![fNclasses] pointers to the TClass objects
38  TString **fCnames; ///<![fNclasses] class names
39  TString **fCtitles; ///<![fNclasses] class titles
40  TString **fOptions; ///<![fNclasses] List of options per class
41  TString fSourceDir; ///<Concatenated source directories
42  TList **fLinks; ///<![fNclasses] for each class, the list of referenced(ing) classes
43 
44  virtual void FindClassPosition(const char *classname, Float_t &x, Float_t &y);
45  virtual void FindClassesUsedBy(Int_t iclass);
46  virtual void FindClassesUsing(Int_t iclass);
47  virtual void Init();
48  TObjString *Mark(const char *classname, TList *los, Int_t abit);
49  virtual void PaintClass(Int_t iclass, Float_t xleft, Float_t y);
50  virtual void ScanClasses(Int_t iclass);
51  virtual void ShowCod();
52  virtual void ShowHas();
53  virtual void ShowMul();
54  virtual void ShowRef();
55 
56 public:
57  TClassTree();
58  TClassTree(const char *name, const char *classes="");
59  virtual ~TClassTree();
60  virtual void Draw(const char *classes ="");
61  virtual Int_t FindClass(const char *classname);
62  const char *GetClasses() const {return fClasses.Data();}
63  virtual const char *GetSourceDir() const {return fSourceDir.Data();}
64  virtual void ls(Option_t *option="") const;
65  virtual void Paint(Option_t *option="");
66  virtual void SaveAs(const char *filename="",Option_t *option="") const;
67  virtual void SetClasses(const char *classes, Option_t *option="ID");
68  virtual void SetSourceDir(const char *dir="src") {fSourceDir = dir;}
69  virtual void SetYoffset(Float_t offset=0);
70  virtual void SetLabelDx(Float_t labeldx=0.15);
71  virtual void ShowClassesUsedBy(const char *classes);
72  virtual void ShowClassesUsing(const char *classes);
73  virtual void ShowLinks(Option_t *option="HMR");
74 
75  ClassDef(TClassTree,1) //Manager class to draw classes inheritance tree and relations
76 };
77 
78 #endif
79 
TClassTree::ShowRef
virtual void ShowRef()
Draw the References relationships (other than inheritance or composition)
Definition: TClassTree.cxx:1092
TClassTree::fShowRef
Int_t fShowRef
if 1 show classes relationship other than inheritance
Definition: TClassTree.h:31
TClassTree::FindClassesUsing
virtual void FindClassesUsing(Int_t iclass)
Select all classes using/referencing the class number iclass.
Definition: TClassTree.cxx:314
TString::Data
const char * Data() const
Definition: TString.h:369
TClassTree::fParents
Int_t * fParents
[fNclasses] parent number of classes (permanent)
Definition: TClassTree.h:34
TClassTree::SetLabelDx
virtual void SetLabelDx(Float_t labeldx=0.15)
Set the size along x of the TPaveLabel showing the class name.
Definition: TClassTree.cxx:874
TClassTree::Draw
virtual void Draw(const char *classes="")
Draw the inheritance tree and relations for the list of classes see this class header for the syntax ...
Definition: TClassTree.cxx:262
TNamed.h
TClassTree::ShowHas
virtual void ShowHas()
Draw the "Has a" relationships.
Definition: TClassTree.cxx:994
Float_t
float Float_t
Definition: RtypesCore.h:57
x
Double_t x[n]
Definition: legend1.C:17
TClassTree::fOptions
TString ** fOptions
![fNclasses] List of options per class
Definition: TClassTree.h:40
TClassTree::ShowCod
virtual void ShowCod()
Draw the Code References relationships.
Definition: TClassTree.cxx:956
TClassTree::GetSourceDir
virtual const char * GetSourceDir() const
Definition: TClassTree.h:63
TString
Definition: TString.h:136
TClassTree::fShowHas
Int_t fShowHas
if 1 show "has a" relationship
Definition: TClassTree.h:30
TClassTree::GetClasses
const char * GetClasses() const
Definition: TClassTree.h:62
TClassTree::fCparent
Int_t * fCparent
!parent number of classes (temporary)
Definition: TClassTree.h:35
TObjString
Definition: TObjString.h:28
TClassTree::FindClassesUsedBy
virtual void FindClassesUsedBy(Int_t iclass)
Select all classes used/referenced by the class number iclass.
Definition: TClassTree.cxx:290
TClassTree::fClasses
TString fClasses
List of classes to be drawn.
Definition: TClassTree.h:24
TClassTree::Init
virtual void Init()
Initialize the data structures.
Definition: TClassTree.cxx:361
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TClassTree::~TClassTree
virtual ~TClassTree()
TClassTree default destructor.
Definition: TClassTree.cxx:238
TClassTree
Definition: TClassTree.h:21
TClassTree::fCstatus
Int_t * fCstatus
[fNclasses] classes status
Definition: TClassTree.h:32
TClassTree::fYoffset
Float_t fYoffset
offset at top of picture in per cent of pad
Definition: TClassTree.h:25
TClassTree::SetYoffset
virtual void SetYoffset(Float_t offset=0)
Set the offset at the top of the picture The default offset is computed automatically taking into acc...
Definition: TClassTree.cxx:885
TNamed
Definition: TNamed.h:29
TClassTree::PaintClass
virtual void PaintClass(Int_t iclass, Float_t xleft, Float_t y)
Paint one class level.
Definition: TClassTree.cxx:636
TClassTree::ShowClassesUsing
virtual void ShowClassesUsing(const char *classes)
mark classes using any class in the list of classes in classes
Definition: TClassTree.cxx:925
TClassTree::fLinks
TList ** fLinks
![fNclasses] for each class, the list of referenced(ing) classes
Definition: TClassTree.h:42
TClassTree::ls
virtual void ls(Option_t *option="") const
list classes names and titles
Definition: TClassTree.cxx:426
TClassTree::fCnames
TString ** fCnames
![fNclasses] class names
Definition: TClassTree.h:38
TClassTree::Mark
TObjString * Mark(const char *classname, TList *los, Int_t abit)
set bit abit in class classname in list los
Definition: TClassTree.cxx:440
y
Double_t y[n]
Definition: legend1.C:17
TClassTree::FindClassPosition
virtual void FindClassPosition(const char *classname, Float_t &x, Float_t &y)
Search the TPaveClass object in the pad with label=classname returns the x and y position of the cent...
Definition: TClassTree.cxx:340
TClassTree::SaveAs
virtual void SaveAs(const char *filename="", Option_t *option="") const
save current configuration in a Root file if filename is blank, the name of the file will be the curr...
Definition: TClassTree.cxx:684
TClassTree::fSourceDir
TString fSourceDir
Concatenated source directories.
Definition: TClassTree.h:41
TClassTree::fShowCod
Int_t fShowCod
if 1 show classes referenced by implementation
Definition: TClassTree.h:28
TClassTree::TClassTree
TClassTree()
TClassTree default constructor.
Definition: TClassTree.cxx:181
TClassTree::fNdata
Int_t * fNdata
[fNclasses] Number of data members per class
Definition: TClassTree.h:33
TClassTree::ShowClassesUsedBy
virtual void ShowClassesUsedBy(const char *classes)
mark classes used by the list of classes in classes
Definition: TClassTree.cxx:894
TClassTree::SetClasses
virtual void SetClasses(const char *classes, Option_t *option="ID")
Set the list of classes for which the hierarchy is to be drawn See Paint for the syntax.
Definition: TClassTree.cxx:860
TClassTree::fLabelDx
Float_t fLabelDx
width along x of TPaveLabels in per cent of pad
Definition: TClassTree.h:26
TClassTree::Paint
virtual void Paint(Option_t *option="")
Draw the current class setting in fClasses and fStatus.
Definition: TClassTree.cxx:455
TClassTree::fShowMul
Int_t fShowMul
if 1 show multiple inheritance
Definition: TClassTree.h:29
TClass
Definition: TClass.h:80
TClassTree::ShowLinks
virtual void ShowLinks(Option_t *option="HMR")
Set link options in the ClassTree object.
Definition: TClassTree.cxx:1039
TClassTree::fCpointer
TClass ** fCpointer
![fNclasses] pointers to the TClass objects
Definition: TClassTree.h:37
TClassTree::fCtitles
TString ** fCtitles
![fNclasses] class titles
Definition: TClassTree.h:39
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
TClassTree::ScanClasses
virtual void ScanClasses(Int_t iclass)
Select all classes used by/referenced/referencing the class number iclass and build the list of these...
Definition: TClassTree.cxx:693
TClassTree::ShowMul
virtual void ShowMul()
Draw the Multiple inheritance relationships.
Definition: TClassTree.cxx:1054
TClassTree::fDerived
char ** fDerived
![fNclasses] table to indicate if i derives from j
Definition: TClassTree.h:36
TClassTree::FindClass
virtual Int_t FindClass(const char *classname)
Find class number corresponding to classname in list of local classes.
Definition: TClassTree.cxx:279
TList
Definition: TList.h:44
int
TClassTree::fNclasses
Int_t fNclasses
current number of classes
Definition: TClassTree.h:27
TClassTree::SetSourceDir
virtual void SetSourceDir(const char *dir="src")
Definition: TClassTree.h:68