File indexing completed on 2025-01-18 10:12:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TStructNode
0013 #define ROOT_TStructNode
0014
0015 #include <TObject.h>
0016 #include <TString.h>
0017
0018 enum ENodeType {
0019 kUnknown = 1,
0020 kClass,
0021 kCollection,
0022 kBasic,
0023 kSTLCollection
0024 };
0025 enum EScalingType {
0026 kSize,
0027 kMembers
0028 };
0029
0030
0031
0032
0033
0034 class TStructNode : public TObject {
0035
0036 private:
0037 static EScalingType fgScalBy;
0038 TString fName;
0039 TString fTypeName;
0040 ULong_t fSize;
0041 ULong_t fTotalSize;
0042 TStructNode *fParent;
0043 UInt_t fLevel;
0044 ULong_t fMembersCount;
0045 ULong_t fAllMembersCount;
0046 void* fPointer;
0047 Bool_t fCollapsed;
0048 Bool_t fVisible;
0049 TList* fMembers;
0050 Float_t fX;
0051 Float_t fY;
0052 Float_t fWidth;
0053 Float_t fHeight;
0054 ENodeType fNodeType;
0055 UInt_t fMaxLevel;
0056 UInt_t fMaxObjects;
0057
0058 public:
0059 TStructNode(TString name, TString typeName, void* pointer, TStructNode* parent, ULong_t size, ENodeType type);
0060 ~TStructNode() override;
0061
0062 Int_t Compare(const TObject* obj) const override;
0063 ULong_t GetAllMembersCount() const;
0064 Float_t GetCenter() const;
0065 Float_t GetHeight() const;
0066 UInt_t GetLevel() const;
0067 UInt_t GetMaxLevel() const;
0068 UInt_t GetMaxObjects() const;
0069 TList* GetMembers() const;
0070 ULong_t GetMembersCount() const;
0071 Float_t GetMiddle() const;
0072 const char* GetName() const override;
0073 ENodeType GetNodeType() const;
0074 TStructNode *GetParent() const;
0075 void* GetPointer() const;
0076 ULong_t GetRelativeMembersCount() const;
0077 ULong_t GetRelativeSize() const;
0078 ULong_t GetRelativeVolume() const;
0079 Float_t GetRelativeVolumeRatio();
0080 ULong_t GetSize() const;
0081 ULong_t GetTotalSize() const;
0082 TString GetTypeName() const;
0083 ULong_t GetVolume() const;
0084 Float_t GetVolumeRatio();
0085 Float_t GetWidth() const;
0086 Float_t GetX() const;
0087 Float_t GetY() const;
0088 Bool_t IsCollapsed() const;
0089 Bool_t IsSortable() const override;
0090 bool IsVisible() const;
0091 void SetAllMembersCount(ULong_t count);
0092 void SetCollapsed(Bool_t collapsed);
0093 void SetHeight(Float_t h);
0094 void SetMaxLevel(UInt_t level);
0095 void SetMaxObjects(UInt_t max);
0096 void SetMembers(TList* list);
0097 void SetMembersCount(ULong_t count);
0098 void SetNodeType(ENodeType type);
0099 void SetPointer(void* pointer);
0100 static void SetScaleBy(EScalingType type);
0101 void SetSize(ULong_t size);
0102 void SetTotalSize(ULong_t size);
0103 void SetVisible(bool visible);
0104 void SetWidth(Float_t w);
0105 void SetX(Float_t x);
0106 void SetY(Float_t y);
0107
0108 ClassDefOverride(TStructNode,0);
0109 };
0110
0111 #endif