TClass


class description - source file - inheritance tree

class TClass : public TDictionary

    private:
TMethod* GetClassMethod(Long_t faddr) public:
TClass TClass() TClass TClass(Text_t* name, Version_t cversion, Text_t* dfil = 0, Text_t* ifil = 0, Int_t dl = 0, Int_t il = 0) TClass TClass(TClass&) virtual void ~TClass() void AddInstance(Bool_t heap = kFALSE) virtual void Browse(TBrowser* b) void BuildRealData() TClass* Class() virtual Int_t Compare(TObject* obj) void Destructor(void* obj, Bool_t dtorOnly = kFALSE) virtual void Draw(Option_t* option) Text_t* EscapeChars(Text_t* text) TClass* GetBaseClass(Text_t* classname) TClass* GetBaseClass(TClass* cl) TClass* GetBaseDataMember(Text_t* datamember) G__ClassInfo* GetClassInfo() Version_t GetClassVersion() TDataMember* GetDataMember(Text_t* datamember) Short_t GetDeclFileLine() const char* GetDeclFileName() UInt_t GetHeapInstanceCount() Short_t GetImplFileLine() const char* GetImplFileName() UInt_t GetInstanceCount() TList* GetListOfAllPublicDataMembers() TList* GetListOfAllPublicMethods() TList* GetListOfBases() TList* GetListOfDataMembers() TList* GetListOfMethods() TList* GetListOfRealData() void GetMenuItems(TList* listitems) TMethod* GetMethod(Text_t* method, Text_t* params) TMethod* GetMethodAny(Text_t* method) TMethod* GetMethodWithPrototype(Text_t* method, Text_t* proto) virtual const char* GetName() Int_t GetNdata() Int_t GetNmethods() virtual const char* GetTitle() virtual ULong_t Hash() virtual Bool_t InheritsFrom(Text_t* cl) virtual Bool_t InheritsFrom(TClass* cl) virtual TClass* IsA() virtual Bool_t IsFolder() TClass* Load(TBuffer& b) void* New() virtual Long_t Property() void ResetInstanceCount() virtual void ShowMembers(TMemberInspector& insp, char* parent) Int_t Size() void Store(TBuffer& b) virtual void Streamer(TBuffer& b)

Data Members

private:
TString fName name of class TList* fRealData linked list for persistent members including base classes TList* fBase linked list for base classes TList* fData linked list for data members TList* fMethod linked list for methods TList* fAllPubData all public data members (including from base classes) TList* fAllPubMethod all public methods (including from base classes) static const char* fDeclFileName name of class declaration file static const char* fImplFileName name of class implementation file Short_t fDeclFileLine line of class declaration Short_t fImplFileLine line of class implementation UInt_t fInstanceCount number of instances of this class UInt_t fOnHeap number of instances on heap Version_t fClassVersion Class version Identifier G__ClassInfo* fClassInfo pointer to CINT class info class

Class Description

                                                                      
  The ROOT global object gROOT contains a list of all defined         
  classes. This list is build when a reference to a class dictionary  
  is made. When this happens, the static "class"::Dictionary()        
  function is called to create a TClass object describing the         
  class. The Dictionary() function is defined in the ClassDef         
  macro and stored (at program startup or library load time) together 
  with the class name in the TClassTable singleton object.            
  For a description of all dictionary classes see TDictionary.        
                                                                      


TClass() : TDictionary()
 Default ctor.

TClass(const Text_t *name, Version_t cversion, const Text_t *dfil, const Text_t *ifil, Int_t dl, Int_t il) : TDictionary()
 Create a TClass object. This object contains the full dictionary
 of a class. It has list to baseclasses, datamembers and methods.

~TClass()
 TClass dtor. Deletes all list that might have been created.

void Browse(TBrowser *b)
 This method is called by a browser to get the class information.

void BuildRealData()
 Build a full list of persistent data members.
 Scans the list of all data members in the class itself and also
 in all base classes. For each persistent data member, inserts a
 TRealData object in the list fRealData.

Int_t Compare(TObject *obj)
 Compare to other object. Returns 0<, 0 or >0 depending on
 whether "this" is lexicographically less than, equal to, or
 greater than obj.

void Draw(Option_t *option)
 Draw detailed class inheritance structure.
 If a class B inherits from a class A, the description of B is drawn
 on the right side of the description of A.
 Member functions overridden by B are shown in class A with a blue line
 erasing the corresponding member function

Text_t* EscapeChars(Text_t *text)
 Introduce an escape character (@) in front of a special chars.
 You need to use the result immediately before it is being overwritten.

TClass* GetBaseClass(const Text_t *classname)
 Return pointer to the base class "classname". Returns 0 in case
 "classname" is not a base class. Takes care of multiple inheritance.

TClass* GetBaseClass(const TClass *cl)
 Return pointer to the base class "cl". Returns 0 in case "cl"
 is not a base class. Takes care of multiple inheritance.

TClass* GetBaseDataMember(const Text_t *datamember)
 Return pointer to (base) class that contains datamember.

TDataMember* GetDataMember(Text_t *datamember)
 Return pointer to datamember object with name "datamember".

TList* GetListOfBases()
 Return list containing the TBaseClass(es) of a class.

TList* GetListOfDataMembers()
 Return list containing the TDataMembers of a class.

TList* GetListOfMethods()
 Return list containing the TMethods of a class.

TList* GetListOfAllPublicMethods()
 Returns a list of all public methods of this class and its base classes.
 Refers to a subset of the methods in GetListOfMethods() so don't do
 GetListOfAllPublicMethods()->Delete().
 Algorithm used to get the list is:
 - put all methods of the class in the list (also protected and private
   ones).
 - loop over all base classes and add only those methods not already in the
   list (also protected and private ones).
 - once finished, loop over resulting list and remove all private and
   protected methods.

TList* GetListOfAllPublicDataMembers()
 Returns a list of all public data members of this class and its base
 classes. Refers to a subset of the data members in GetListOfDatamembers()
 so don't do GetListOfAllPublicDataMembers()->Delete().

void GetMenuItems(TList *list)
 Returns list of methods accessible by context menu.

TMethod* GetMethodAny(const Text_t *method)
 Return pointer to method without looking at parameters.
 Does not look in (possible) base classes.

TMethod* GetMethod(const Text_t *method, const Text_t *params)
 Find the best method (if there is one) matching the parameters.
 The params string must contain argument values, like "3189, "aap", 1.3".
 The function invokes GetClassMethod to search for a possible method
 in the class itself or in its base classes. Returns 0 in case method
 is not found.

TMethod* GetMethodWithPrototype(const Text_t *method, const Text_t *proto)
 Find the method with a given prototype. The proto string must be of the
 form: "char*,int,double". Returns 0 in case method is not found.

TMethod* GetClassMethod(Long_t faddr)
 Look for a method in this class that has the interface function
 address faddr.

const char* GetTitle() const
 Return the description of the class.

Int_t GetNdata()
 Return the number of data members of this class
 Note that in case the list of data members is not yet created, it will be done
 by GetListOfDataMembers().

Int_t GetNmethods()
 Return the number of methods of this class
 Note that in case the list of methods is not yet created, it will be done
 by GetListOfMethods().

Bool_t InheritsFrom(const Text_t *classname)
 Return kTRUE if this class inherits from a class with name "classname".

Bool_t InheritsFrom(const TClass *cl)
 Return kTRUE if this class inherits from class cl.

void* New()
 Return a pointer to a newly allocated object of this class.
 The class must have a default constructor.

void Destructor(void *obj, Bool_t dtorOnly)
 Explicitely call destructor for object.

Int_t Size() const
 Return size of object of this class.

Long_t Property() const
 Get property description word. For meaning of bits see EProperty.

TClass* Load(TBuffer &b)
 Load class description from I/O buffer and return class object.

void Store(TBuffer &b) const
 Store class description on I/O buffer.



Inline Functions


                 void AddInstance(Bool_t heap = kFALSE)
            Version_t GetClassVersion()
          const char* GetDeclFileName()
              Short_t GetDeclFileLine()
        G__ClassInfo* GetClassInfo()
               TList* GetListOfRealData()
          const char* GetName()
          const char* GetImplFileName()
              Short_t GetImplFileLine()
               UInt_t GetInstanceCount()
               UInt_t GetHeapInstanceCount()
              ULong_t Hash()
               Bool_t IsFolder()
                 void ResetInstanceCount()
              TClass* Class()
              TClass* IsA()
                 void ShowMembers(TMemberInspector& insp, char* parent)
                 void Streamer(TBuffer& b)
               TClass TClass(TClass&)


Author: Rene Brun 07/01/95
Last update: 2.22/10 22/07/99 13.46.06 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.