ROOT  6.06/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 #ifndef ROOT_TDictionary
26 #include "TDictionary.h"
27 #endif
28 #ifndef ROOT_TClassRef
29 #include "TClassRef.h"
30 #endif
31 
32 class TBrowser;
33 class TClass;
34 
35 class TBaseClass : public TDictionary {
36 
37 private:
38  TBaseClass(const TBaseClass &); // Not implemented
39  TBaseClass&operator=(const TBaseClass&); // Not implemented
40 
41 private:
42  BaseClassInfo_t *fInfo; //!pointer to CINT base class info
43  TClassRef fClassPtr; // pointer to the base class TClass
44  TClass *fClass; //!pointer to parent class
45  Int_t fDelta; // BaseClassInfo_t offset (INT_MAX if unset)
46  mutable Int_t fProperty; // BaseClassInfo_t's properties
47  Int_t fSTLType; // cache of IsSTLContainer()
48 
49 public:
50  TBaseClass(BaseClassInfo_t *info = 0, TClass *cl = 0);
51  virtual ~TBaseClass();
52  virtual void Browse(TBrowser *b);
53  const char *GetTitle() const;
55  Int_t GetDelta();
56  Bool_t IsFolder() const {return kTRUE;}
58  Long_t Property() const;
59  void SetClass(TClass* cl) { fClass = cl; }
60 
61  ClassDef(TBaseClass,2) //Description of a base class
62 };
63 
64 #endif
ESTLType
Definition: ESTLType.h:28
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
Definition: TBaseClass.cxx:62
void SetClass(TClass *cl)
Definition: TBaseClass.h:59
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const char * GetTitle() const
Get base class description (comment).
Definition: TBaseClass.cxx:91
#define ClassDef(name, id)
Definition: Rtypes.h:254
Int_t GetDelta()
Get offset from "this" to part of base class.
Definition: TBaseClass.cxx:74
TClassRef fClassPtr
pointer to CINT base class info
Definition: TBaseClass.h:43
Int_t fProperty
Definition: TBaseClass.h:46
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
TClass * fClass
Definition: TBaseClass.h:44
This class defines an abstract interface that must be implemented by all classes that contain diction...
Definition: TDictionary.h:162
TBaseClass & operator=(const TBaseClass &)
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
TBaseClass(const TBaseClass &)
Each class (see TClass) has a linked list of its base class(es).
Definition: TBaseClass.h:35
Int_t fDelta
pointer to parent class
Definition: TBaseClass.h:45
long Long_t
Definition: RtypesCore.h:50
BaseClassInfo_t * fInfo
Definition: TBaseClass.h:42
virtual ~TBaseClass()
TBaseClass dtor deletes adopted CINT BaseClassInfo object.
Definition: TBaseClass.cxx:45
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Definition: TBaseClass.cxx:133
TClassRef is used to implement a permanent reference to a TClass object.
Definition: TClassRef.h:33
ROOT::ESTLType IsSTLContainer()
Return which type (if any) of STL container the data member is.
Definition: TBaseClass.cxx:100
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Definition: TBaseClass.h:56
const Bool_t kTRUE
Definition: Rtypes.h:91
virtual void Browse(TBrowser *b)
Called by the browser, to browse a baseclass.
Definition: TBaseClass.cxx:53
Int_t fSTLType
Definition: TBaseClass.h:47