Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TClassTree.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/gpad:$Id$
0002 // Author: Rene Brun   01/12/98
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TClassTree
0013 #define ROOT_TClassTree
0014 
0015 
0016 #include "TNamed.h"
0017 #include <vector>
0018 
0019 class TClass;
0020 class TObjString;
0021 
0022 class TClassTree : public TNamed {
0023 
0024 protected:
0025    TString   fClasses;             ///<List of classes to be drawn
0026    Float_t   fYoffset{0};          ///<offset at top of picture in per cent of pad
0027    Float_t   fLabelDx{0};          ///<width along x of TPaveLabels in per cent of pad
0028    Int_t     fNclasses{0};         ///<current number of classes
0029    Int_t     fShowCod{0};          ///<if 1 show classes referenced by implementation
0030    Int_t     fShowMul{0};          ///<if 1 show multiple inheritance
0031    Int_t     fShowHas{0};          ///<if 1 show "has a" relationship
0032    Int_t     fShowRef{0};          ///<if 1 show classes relationship other than inheritance
0033    Int_t    *fCstatus{nullptr};    ///<[fNclasses] classes status
0034    Int_t    *fNdata{nullptr};      ///<[fNclasses] Number of data members per class
0035    Int_t    *fParents{nullptr};    ///<[fNclasses] parent number of classes (permanent)
0036    Int_t    *fCparent{nullptr};    ///<!parent number of classes (temporary)
0037    char    **fDerived{nullptr};    ///<![fNclasses] table to indicate if i derives from j
0038    TClass  **fCpointer{nullptr};   ///<![fNclasses] pointers to the TClass objects
0039    TString **fCnames{nullptr};     ///<![fNclasses] class names
0040    TString **fCtitles{nullptr};    ///<![fNclasses] class titles
0041    TString **fOptions{nullptr};    ///<![fNclasses] List of options per class
0042    TString   fSourceDir;           ///<Concatenated source directories
0043    TList   **fLinks{nullptr};      ///<![fNclasses] for each class, the list of referenced(ing) classes
0044    std::vector<Int_t> fNsons;      ///<! internal variable, used during painting
0045    std::vector<Int_t> fNtsons;     ///<! internal variable, used during painting
0046 
0047    virtual  void FindClassPosition(const char *classname, Float_t &x, Float_t &y);
0048    virtual  void FindClassesUsedBy(Int_t iclass);
0049    virtual  void FindClassesUsing(Int_t iclass);
0050    virtual  void Init();
0051    TObjString   *Mark(const char *classname, TList *los, Int_t abit);
0052    virtual  void PaintClass(Int_t iclass, Float_t xleft, Float_t y);
0053    virtual  void ScanClasses(Int_t iclass);
0054    virtual  void ShowCod();
0055    virtual  void ShowHas();
0056    virtual  void ShowMul();
0057    virtual  void ShowRef();
0058 
0059 public:
0060    TClassTree();
0061    TClassTree(const char *name, const char *classes="");
0062         ~TClassTree() override;
0063             void Draw(const char *classes ="") override;
0064    virtual Int_t FindClass(const char *classname);
0065    const char   *GetClasses() const {return fClasses.Data();}
0066    virtual const char  *GetSourceDir() const {return fSourceDir.Data();}
0067             void ls(Option_t *option="") const override;
0068             void Paint(Option_t *option="") override;
0069             void SaveAs(const char *filename="",Option_t *option="") const override;
0070    virtual  void SetClasses(const char *classes, Option_t *option="ID");
0071    virtual  void SetSourceDir(const char *dir="src") {fSourceDir = dir;}
0072    virtual  void SetYoffset(Float_t offset=0);
0073    virtual  void SetLabelDx(Float_t labeldx=0.15);
0074    virtual  void ShowClassesUsedBy(const char *classes);
0075    virtual  void ShowClassesUsing(const char *classes);
0076    virtual  void ShowLinks(Option_t *option="HMR");
0077 
0078    ClassDefOverride(TClassTree,1)  //Manager class to draw classes inheritance tree and relations
0079 };
0080 
0081 #endif
0082