#ifndef ROOT_TMemberInspector
#define ROOT_TMemberInspector
#include "Rtypes.h"
class TObject;
class TClass;
class TMemberInspector {
public:
enum EObjectPointerState {
kUnset,
kNoObjectGiven,
kValidObjectGiven
};
private:
class TParentBuf;
TParentBuf* fParent;
EObjectPointerState fObjectPointerState;
TMemberInspector(const TMemberInspector&);
TMemberInspector &operator=(const TMemberInspector&);
public:
TMemberInspector();
virtual ~TMemberInspector();
EObjectPointerState GetObjectValidity() const { return fObjectPointerState; }
void SetObjectValidity(EObjectPointerState val) { fObjectPointerState = val; }
virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr);
virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr, Bool_t ) { Inspect(cl,parent,name,addr); }
const char* GetParent() const;
Ssiz_t GetParentLen() const;
void AddToParent(const char* name);
void RemoveFromParent(Ssiz_t startingAt);
template <class T>
void InspectMember(const T& obj, const char* name, Bool_t isTransient) {
Ssiz_t len = GetParentLen();
AddToParent(name);
obj.IsA()->CallShowMembers(&obj, *this, isTransient);
RemoveFromParent(len);
}
void InspectMember(const TObject& obj, const char* name, Bool_t isTransient);
void InspectMember(const char* topclassname, const void* pobj, const char* name,
Bool_t transient);
void InspectMember(TClass* cl, const void* pobj, const char* name,
Bool_t isTransient);
void GenericShowMembers(const char *topClassName, const void *obj,
Bool_t transientMember);
ClassDef(TMemberInspector,0)
};
#endif