Warning, file /include/root/TProtoClass.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_TProtoClass
0014 #define ROOT_TProtoClass
0015
0016 #include "TNamed.h"
0017
0018 #include <vector>
0019
0020 class TClass;
0021 class TList;
0022 class TRealData;
0023 #ifdef R__LESS_INCLUDES
0024 class TDataMember;
0025 #else
0026 #include "TDataMember.h"
0027 #endif
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 class TProtoClass: public TNamed {
0039 public:
0040 struct TProtoRealData {
0041 Long_t fOffset;
0042 Int_t fDMIndex;
0043 Int_t fLevel;
0044 Int_t fClassIndex;
0045 char fStatusFlag;
0046
0047 enum EStatusFlags {
0048 kIsObject = BIT(0),
0049 kIsTransient = BIT(1),
0050 kIsPointer = BIT(2),
0051 kBitMask = 0x000000ff
0052 };
0053
0054 public:
0055 bool IsAClass() const { return fClassIndex >= 0; }
0056 TProtoRealData() : fOffset(0), fDMIndex(-1), fLevel(0), fClassIndex(-1), fStatusFlag(0) {}
0057 TProtoRealData(const TRealData *rd);
0058 virtual ~TProtoRealData();
0059 TRealData *CreateRealData(TClass *currentClass, TClass *parent, TRealData * parentData, int prevLevel) const;
0060
0061 Bool_t TestFlag(UInt_t f) const { return (Bool_t) ((fStatusFlag & f) != 0); }
0062 void SetFlag(UInt_t f, Bool_t on = kTRUE) {
0063 if (on)
0064 fStatusFlag |= f & kBitMask;
0065 else
0066 fStatusFlag &= ~(f & kBitMask);
0067 }
0068
0069 ClassDef(TProtoRealData, 3);
0070 };
0071
0072 private:
0073 TList *fBase;
0074 TList *fEnums;
0075 std::vector<TProtoRealData> fPRealData;
0076 std::vector<TDataMember *> fData;
0077 std::vector<TString> fDepClasses;
0078 Int_t fSizeof;
0079 UInt_t fCheckSum;
0080 Int_t fCanSplit;
0081 Int_t fStreamerType;
0082 Long_t fProperty;
0083 Long_t fClassProperty;
0084 Long_t fOffsetStreamer;
0085
0086 TProtoClass(const TProtoClass &) = delete;
0087 TProtoClass &operator=(const TProtoClass &) = delete;
0088
0089 const char * GetClassName(Int_t index) const { return (index >= 0) ? fDepClasses[index].Data() : nullptr; }
0090
0091
0092 static Int_t DataMemberIndex(TClass * cl, const char * name);
0093
0094 static TDataMember * FindDataMember(TClass * cl, Int_t index);
0095
0096 public:
0097 TProtoClass():
0098 fBase(nullptr), fEnums(nullptr), fSizeof(0), fCheckSum(0), fCanSplit(0),
0099 fStreamerType(0), fProperty(0), fClassProperty(0),
0100 fOffsetStreamer(0) {
0101 }
0102
0103 TProtoClass(TProtoClass *pc);
0104 TProtoClass(TClass *cl);
0105 virtual ~TProtoClass();
0106
0107 Bool_t FillTClass(TClass *pcl);
0108 const TList *GetListOfEnums() { return fEnums; };
0109 void Delete(Option_t *opt = "") override;
0110
0111 int GetSize() { return fSizeof; }
0112 TList * GetBaseList() { return fBase; }
0113
0114 TList * GetEnumList() { return fEnums; }
0115 std::vector<TProtoRealData> & GetPRDList() { return fPRealData; }
0116 std::vector<TDataMember *> & GetData() { return fData; }
0117 std::vector<TString> & GetDepClasses() { return fDepClasses; }
0118
0119 ClassDefOverride(TProtoClass, 2);
0120 };
0121
0122 #endif