Warning, file /include/root/TListOfDataMembers.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 #ifndef ROOT_TListOfDataMembers
0013 #define ROOT_TListOfDataMembers
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "THashList.h"
0026
0027 #include "TDictionary.h"
0028
0029 class TExMap;
0030 class TDataMember;
0031
0032 class TListOfDataMembers : public THashList
0033 {
0034 private:
0035 TClass *fClass = nullptr;
0036
0037 TExMap *fIds = nullptr;
0038 THashList *fUnloaded = nullptr;
0039 ULong64_t fLastLoadMarker = 0;
0040 std::atomic<bool> fIsLoaded{kFALSE};
0041
0042 TDictionary::EMemberSelection fSelection = TDictionary::EMemberSelection::kNoUsingDecls;
0043
0044 TListOfDataMembers(const TListOfDataMembers&) = delete;
0045 TListOfDataMembers& operator=(const TListOfDataMembers&) = delete;
0046
0047 void MapObject(TObject *obj);
0048 void UnmapObject(TObject *obj);
0049
0050 public:
0051 typedef TDictionary::DeclId_t DeclId_t;
0052
0053
0054
0055 TListOfDataMembers(TClass *cl, TDictionary::EMemberSelection selection):
0056 fClass(cl), fSelection(selection) {}
0057
0058
0059 template<class DataMemberList>
0060 TListOfDataMembers(DataMemberList & dmlist) :
0061 fIsLoaded(kTRUE)
0062 {
0063 for (auto * dataMember : dmlist)
0064 Add(dataMember);
0065 }
0066
0067 ~TListOfDataMembers();
0068
0069 void Clear(Option_t *option = "") override;
0070 void Delete(Option_t *option="") override;
0071
0072 using THashList::FindObject;
0073 TObject *FindObject(const char *name) const override;
0074
0075 TDictionary *Find(DeclId_t id) const;
0076 TDictionary *Get(DeclId_t id);
0077 TDictionary *Get(DataMemberInfo_t *info, bool skipChecks=kFALSE);
0078
0079 Bool_t IsLoaded() const { return fIsLoaded; }
0080 void AddFirst(TObject *obj) override;
0081 void AddFirst(TObject *obj, Option_t *opt) override;
0082 void AddLast(TObject *obj) override;
0083 void AddLast(TObject *obj, Option_t *opt) override;
0084 void AddAt(TObject *obj, Int_t idx) override;
0085 void AddAfter(const TObject *after, TObject *obj) override;
0086 void AddAfter(TObjLink *after, TObject *obj) override;
0087 void AddBefore(const TObject *before, TObject *obj) override;
0088 void AddBefore(TObjLink *before, TObject *obj) override;
0089
0090 TClass *GetClass() const { return fClass; }
0091 void SetClass(TClass* cl) { fClass = cl; }
0092 void Update(TDictionary *member);
0093
0094 void RecursiveRemove(TObject *obj) override;
0095 TObject *Remove(TObject *obj) override;
0096 TObject *Remove(TObjLink *lnk) override;
0097
0098 void Load();
0099 void Unload();
0100 void Unload(TDictionary *member);
0101
0102 ClassDefOverride(TListOfDataMembers,2);
0103 };
0104
0105 #endif