Logo ROOT   6.10/09
Reference Guide
TBaseClass.h
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Fons Rademakers 08/02/95
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_TBaseClass
13 #define ROOT_TBaseClass
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TBaseClass //
19 // //
20 // Description of a base class. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #include "TDictionary.h"
26 #include "TClassRef.h"
27 
28 class TBrowser;
29 class TClass;
30 
31 class TBaseClass : public TDictionary {
32 
33 private:
34  TBaseClass(const TBaseClass &); // Not implemented
35  TBaseClass&operator=(const TBaseClass&); // Not implemented
36 
37 private:
38  BaseClassInfo_t *fInfo; //!pointer to CINT base class info
39  TClassRef fClassPtr; // pointer to the base class TClass
40  TClass *fClass; //!pointer to parent class
41  Int_t fDelta; // BaseClassInfo_t offset (INT_MAX if unset)
42  mutable Int_t fProperty; // BaseClassInfo_t's properties
43  Int_t fSTLType; // cache of IsSTLContainer()
44 
45 public:
46  TBaseClass(BaseClassInfo_t *info = 0, TClass *cl = 0);
47  virtual ~TBaseClass();
48  virtual void Browse(TBrowser *b);
49  const char *GetTitle() const;
51  Int_t GetDelta();
52  Bool_t IsFolder() const {return kTRUE;}
53  ROOT::ESTLType IsSTLContainer();
54  Long_t Property() const;
55  void SetClass(TClass* cl) { fClass = cl; }
56 
57  ClassDef(TBaseClass,2) //Description of a base class
58 };
59 
60 #endif
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
Definition: TBaseClass.cxx:63
void SetClass(TClass *cl)
Definition: TBaseClass.h:55
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:297
Int_t GetDelta()
Get offset from "this" to part of base class.
Definition: TBaseClass.cxx:75
TClassRef fClassPtr
pointer to CINT base class info
Definition: TBaseClass.h:39
Int_t fProperty
Definition: TBaseClass.h:42
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
TClass * fClass
Definition: TBaseClass.h:40
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:158
const char * GetTitle() const
Get base class description (comment).
Definition: TBaseClass.cxx:92
TBaseClass & operator=(const TBaseClass &)
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:71
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Definition: TBaseClass.h:52
TBaseClass(const TBaseClass &)
Each class (see TClass) has a linked list of its base class(es).
Definition: TBaseClass.h:31
Int_t fDelta
pointer to parent class
Definition: TBaseClass.h:41
long Long_t
Definition: RtypesCore.h:50
BaseClassInfo_t * fInfo
Definition: TBaseClass.h:38
virtual ~TBaseClass()
TBaseClass dtor deletes adopted CINT BaseClassInfo object.
Definition: TBaseClass.cxx:46
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Definition: TBaseClass.cxx:134
TClassRef is used to implement a permanent reference to a TClass object.
Definition: TClassRef.h:29
ROOT::ESTLType IsSTLContainer()
Return which type (if any) of STL container the data member is.
Definition: TBaseClass.cxx:101
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
const Bool_t kTRUE
Definition: RtypesCore.h:91
virtual void Browse(TBrowser *b)
Called by the browser, to browse a baseclass.
Definition: TBaseClass.cxx:54
Int_t fSTLType
Definition: TBaseClass.h:43