#ifndef ROOT_TStructNode
#define ROOT_TStructNode
#include <TObject.h>
#include <TString.h>
enum ENodeType {
kUnknown = 1,
kClass,
kCollection,
kBasic,
kSTLCollection
};
enum EScalingType {
kSize,
kMembers
};
class TStructNode : public TObject {
private:
static EScalingType fgScalBy;
TString fName;
TString fTypeName;
ULong_t fSize;
ULong_t fTotalSize;
TStructNode *fParent;
UInt_t fLevel;
ULong_t fMembersCount;
ULong_t fAllMembersCount;
void* fPointer;
Bool_t fCollapsed;
Bool_t fVisible;
TList* fMembers;
Float_t fX;
Float_t fY;
Float_t fWidth;
Float_t fHeight;
ENodeType fNodeType;
UInt_t fMaxLevel;
UInt_t fMaxObjects;
public:
TStructNode(TString name, TString typeName, void* pointer, TStructNode* parent, ULong_t size, ENodeType type);
~TStructNode();
virtual Int_t Compare(const TObject* obj) const;
ULong_t GetAllMembersCount() const;
Float_t GetCenter() const;
Float_t GetHeight() const;
UInt_t GetLevel() const;
UInt_t GetMaxLevel() const;
UInt_t GetMaxObjects() const;
TList* GetMembers() const;
ULong_t GetMembersCount() const;
Float_t GetMiddle() const;
const char* GetName() const;
ENodeType GetNodeType() const;
TStructNode *GetParent() const;
void* GetPointer() const;
ULong_t GetRelativeMembersCount() const;
ULong_t GetRelativeSize() const;
ULong_t GetRelativeVolume() const;
Float_t GetRelativeVolumeRatio();
ULong_t GetSize() const;
ULong_t GetTotalSize() const;
TString GetTypeName() const;
ULong_t GetVolume() const;
Float_t GetVolumeRatio();
Float_t GetWidth() const;
Float_t GetX() const;
Float_t GetY() const;
Bool_t IsCollapsed() const;
virtual Bool_t IsSortable() const;
bool IsVisible() const;
void SetAllMembersCount(ULong_t count);
void SetCollapsed(Bool_t collapsed);
void SetHeight(Float_t h);
void SetMaxLevel(UInt_t level);
void SetMaxObjects(UInt_t max);
void SetMembers(TList* list);
void SetMembersCount(ULong_t count);
void SetNodeType(ENodeType type);
void SetPointer(void* pointer);
static void SetScaleBy(EScalingType type);
void SetSize(ULong_t size);
void SetTotalSize(ULong_t size);
void SetVisible(bool visible);
void SetWidth(Float_t w);
void SetX(Float_t x);
void SetY(Float_t y);
ClassDef(TStructNode,0);
};
#endif