GRUTinizer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
THashList_ThreadSafe.h
Go to the documentation of this file.
1 #ifndef THASHLIST_THREADSAFE_H
2 #define THASHLIST_THREADSAFE_H
3 
4 #ifndef __CINT__
5 #include <mutex>
6 #endif
7 
8 #include "THashList.h"
9 
10 class THashList_ThreadSafe : public THashList {
11 public:
12  THashList_ThreadSafe(Int_t capacity=TCollection::kInitHashTableCapacity, Int_t rehash=0)
13  : THashList(capacity, rehash) { }
14  THashList_ThreadSafe(TObject *parent, Int_t capacity=TCollection::kInitHashTableCapacity, Int_t rehash=0)
15  : THashList(parent, capacity, rehash) { }
16 
17  // All the virtual functions from THashList.
18  void AddFirst(TObject *obj);
19  void AddFirst(TObject *obj, Option_t *opt);
20  void AddLast(TObject *obj);
21  void AddLast(TObject *obj, Option_t *opt);
22  void AddAt(TObject *obj, Int_t idx);
23  void AddAfter(const TObject *after, TObject *obj);
24  void AddAfter(TObjLink *after, TObject *obj);
25  void AddBefore(const TObject *before, TObject *obj);
26  void AddBefore(TObjLink *before, TObject *obj);
27  void RecursiveRemove(TObject *obj);
28  void Rehash(Int_t newCapacity);
29  TObject* Remove(TObject *obj);
30  TObject* Remove(TObjLink *lnk);
31 
32 private:
33 #ifndef __CINT__
34  std::recursive_mutex mutex;
35 #endif
36 
38 };
39 
40 #endif /* THASHLIST_THREADSAFE_H */