81 SetPointer(ptr, clname);
107 fLevelMembersCount(node->
GetLevel())++;
109 fLevelSize(node->
GetLevel()) += size;
145 if(dm->IsaPointer()) {
146 TString trueTypeName = dm->GetTrueTypeName();
157 void** pptr = (
void**)((
ULong_t)pointer + dm->GetOffset());
164 if(fPointers.GetValue((
ULong_t)ptr)) {
176 size = dm->GetUnitSize();
180 if(dm->GetDataType()) {
193 parent->SetTotalSize(parent->GetTotalSize() + node->
GetTotalSize() - size);
195 parent->SetAllMembersCount(parent->GetAllMembersCount() + node->
GetAllMembersCount() - 1);
197 ptr = (
void*)((
ULong_t)pointer + dm->GetOffset());
208 if (dm->IsSTLContainer()) {
238 size = clProxy->
Size();
250 std::vector<std::string> parts;
253 std::vector<std::string>::const_iterator iPart = parts.begin();
254 while (iPart != parts.end() && *iPart ==
"")
256 if (iPart != parts.end() && *iPart != dm->GetTypeName()) {
257 for (std::vector<std::string>::const_iterator iP = iPart,
258 iPE = parts.end(); iP != iPE; ++iP) {
271 for (
UInt_t i = 0; i < count ; i++) {
272 element = *(
void**)proxy->
At(i);
278 name = ((
TObject*) element)->GetName();
288 CountMembers(clProxy, node, element);
312 while((item = it2())) {
315 if (
TClass* cl3 = item->IsA()){
329 parent->SetMembersCount(parent->GetMembersCount() + 1);
331 CountMembers(item->IsA(), node, item);
333 parent->SetTotalSize(parent->GetTotalSize() + node->
GetTotalSize());
334 parent->SetAllMembersCount(parent->GetAllMembersCount() + node->
GetAllMembersCount());
347 }
else if (opt ==
"size") {
353 fGUI->SetNodePtr(fTopNode);
387 return fLevelMembersCount;
403 return fGUI->GetLinksVisibility();
415 ULong_t size = fPointerClass->Size();
418 if (fPointerClass->IsTObject()) {
419 name = ((
TObject*) fPointer)->GetName();
422 AddNode(fTopNode, size);
423 CountMembers(fPointerClass, fTopNode, fPointer);
432 TIter it(&fLevelArray);
433 while ((lst = (
TList*) it() )) {
439 fLevelMembersCount.Clear();
474 fGUI->SetLinksVisibility(val);
490 if (!fPointerClass) {
496 fGUI->SetNodePtr(fTopNode);
508 if (!strcmp(prop->
GetName(), typeName)) {
virtual const char * GetName() const
Returns name of object.
TStructViewer(void *ptr=NULL, const char *clname=NULL)
Default constructor. An argument "ptr" is a main pointer of type "clname", which should be shown in t...
void Prepare()
Create top node and find all member nodes.
void SetNodeType(ENodeType type)
Sets type of node to "type".
virtual TClass * GetValueClass() const =0
All ROOT classes may have RTTI (run time type identification) support added.
int GetSplit(const char *type, std::vector< std::string > &output, int &nestedLoc, EModType mode=TClassEdit::kNone)
Stores in output (after emptying it) the split type.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
TColor GetColor() const
Returns color of class.
TExMap GetLevelSize() const
Returns TExMap with pairs <level number, size of level in bytes>
void Draw(Option_t *option="")
Draw object if there is valid pointer.
Bool_t GetLinksVisibility() const
Get visibility of links between objects.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TGMainFrame * GetFrame()
Returns pointer to main window.
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
void SetMembersCount(ULong_t count)
Sets number of members to "number".
virtual EDataType GetType() const =0
void SetLinksVisibility(Bool_t val)
ISets links visibility.
void SetAllMembersCount(ULong_t count)
Sets numbers of all members to "number".
void * GetPointer() const
Returns main pointer.
void * GetPointer() const
Return main pointer.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
void AddNode(TStructNode *node, ULong_t size)
Find list with nodes on specified level and add node to this list and increment list of sizes and lis...
void SetColor(TString name, Int_t color)
Sets color for the class "name" to color "color".
void Reset()
Deleting nodes, maps and array.
~TStructViewer()
Destructor. Clean all object after closing the viewer.
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
virtual Bool_t HasPointers() const =0
Collection abstract base class.
UInt_t GetLevel() const
Returns actual level of node.
Int_t Size() const
Return size of object of this class.
ULong_t GetTotalSize() const
Returns total size of allocated memory in bytes.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
The ROOT global object gROOT contains a list of all defined classes.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual TCanvas * GetCanvas() const
void Reset(Detail::TBranchProxy *x)
virtual UInt_t Sizeof() const =0
TExMap GetLevelMembersCount() const
Returns TExMap with pairs <level number, number of objects>
void SetTotalSize(ULong_t size)
Sets total size of allocated memory in bytes to value "size".
virtual void * At(UInt_t idx)=0
The color creation and management class.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
void SetColor(const TColor &color)
Sets the color to "color".
Mother of all ROOT objects.
virtual UInt_t Size() const =0
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
virtual void Add(TObject *obj)
void CountMembers(TClass *cl, TStructNode *parent, void *pointer)
Count allocated memory, increase member counters, find child nodes.
ULong_t GetAllMembersCount() const
Returns number of all members in node.
void SetPointer(void *ptr, const char *clname=NULL)
Set main pointer of class "clname".
TCanvas * GetCanvas()
Returns canvas used to keep TGeoVolumes.
virtual const char * GetName() const
Returns name of object.
ULong_t GetMembersCount() const
Returns numbers of members of node.
TColor GetColor(const char *typeName)
Returns color associated with type "typeName".
This class stores a (key,value) pair using an external hash.
const char * Data() const