Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Fons Rademakers 15/07/96
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 *************************************************************************/
12#ifndef ROOT_TMemberInspector
13#define ROOT_TMemberInspector
16// //
17// TMemberInspector //
18// //
19// Abstract base class for accessing the datamembers of a class. //
20// Classes derived from this class can be given as argument to the //
21// ShowMembers() methods of ROOT classes. This feature facilitates //
22// the writing of class browsers and inspectors. //
23// //
26#include "Rtypes.h"
28class TObject;
29class TClass;
34 kUnset, // No Inspect() call has been seen yet.
35 kNoObjectGiven, // No object was given to the initial Inspect() call.
36 kValidObjectGiven // The address points to an actual object.
37 };
39 class TParentBuf;
40 TParentBuf* fParent; // current inspection "path"
41 EObjectPointerState fObjectPointerState; // whether the address is valid or only an offset
48 virtual ~TMemberInspector();
52 virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr);
53 virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr, Bool_t /* isTransient */) { Inspect(cl,parent,name,addr); }
55 const char* GetParent() const;
56 Ssiz_t GetParentLen() const;
57 void AddToParent(const char* name);
58 void RemoveFromParent(Ssiz_t startingAt);
62 template <class T>
63 void InspectMember(const T& obj, const char* name, Bool_t isTransient) {
66 obj.IsA()->CallShowMembers(&obj, *this, isTransient);
68 }
70 void InspectMember(const TObject& obj, const char* name, Bool_t isTransient);
71 void InspectMember(const char* topclassname, const void* pobj, const char* name,
73 void InspectMember(TClass* cl, const void* pobj, const char* name,
74 Bool_t isTransient);
76 void GenericShowMembers(const char *topClassName, const void *obj,
77 Bool_t transientMember);
79 ClassDef(TMemberInspector,0) //ABC for inspecting class data members
bool Bool_t
Definition: RtypesCore.h:63
int Ssiz_t
Definition: RtypesCore.h:67
const Bool_t kTRUE
Definition: RtypesCore.h:100
#define ClassDef(name, id)
Definition: Rtypes.h:335
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
char name[80]
Definition: TGX11.cxx:110
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
Abstract base class for accessing the data-members of a class.
const char * GetParent() const
void GenericShowMembers(const char *topClassName, const void *obj, Bool_t transientMember)
TMemberInspector(const TMemberInspector &)=delete
void RemoveFromParent(Ssiz_t startingAt)
virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr, Bool_t)
virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr)
virtual ~TMemberInspector()
TMemberInspector & operator=(const TMemberInspector &)=delete
EObjectPointerState GetObjectValidity() const
void AddToParent(const char *name)
Ssiz_t GetParentLen() const
virtual Bool_t IsTreatingNonAccessibleTypes()
TParentBuf * fParent
EObjectPointerState fObjectPointerState
void SetObjectValidity(EObjectPointerState val)
void InspectMember(const T &obj, const char *name, Bool_t isTransient)
Mother of all ROOT objects.
Definition: TObject.h:37
double T(double x)
Definition: ChebyshevPol.h:34
static const std::string transient("transient")