Logo ROOT   6.08/07
Reference Guide
TListOfEnumsWithLock.h
Go to the documentation of this file.
1 // @(#)root/cont
2 // Author: Bianca-Cristina Cristescu February 2014
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TListOfEnumsWithLock
13 #define ROOT_TListOfEnumsWithLock
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TListOfEnumsWithLock //
18 // //
19 // A collection of TEnum objects designed for fast access given a //
20 // DeclId_t and for keep track of TEnum that were described //
21 // unloaded enum. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #ifndef ROOT_TListOfEnums
26 #include "TListOfEnums.h"
27 #endif
28 
29 class TExMap;
30 class TEnum;
31 
33 {
34 private:
36 
39 
40 public:
41 
43  ~TListOfEnumsWithLock() override;
44 
45  TEnum *GetObject(const char*) const override;
46 
47  void Clear(Option_t *option) override;
48  void Delete(Option_t *option="") override;
49 
50  TObject *FindObject(const TObject* obj) const override;
51  TObject *FindObject(const char *name) const override;
52  TIterator *MakeIterator(Bool_t dir = kIterForward) const override;
53 
54  TObject *At(Int_t idx) const override;
55  TObject *After(const TObject *obj) const override;
56  TObject *Before(const TObject *obj) const override;
57  TObject *First() const override;
58  TObjLink *FirstLink() const override;
59  TObject **GetObjectRef(const TObject *obj) const override;
60  TObject *Last() const override;
61  TObjLink *LastLink() const override;
62 
63  Int_t GetLast() const override;
64  Int_t IndexOf(const TObject *obj) const override;
65 
66  Int_t GetSize() const override;
67 
68  void AddFirst(TObject *obj) override;
69  void AddFirst(TObject *obj, Option_t *opt) override;
70  void AddLast(TObject *obj) override;
71  void AddLast(TObject *obj, Option_t *opt) override;
72  void AddAt(TObject *obj, Int_t idx) override;
73  void AddAfter(const TObject *after, TObject *obj) override;
74  void AddAfter(TObjLink *after, TObject *obj) override;
75  void AddBefore(const TObject *before, TObject *obj) override;
76  void AddBefore(TObjLink *before, TObject *obj) override;
77 
78  void RecursiveRemove(TObject *obj) override;
79  TObject *Remove(TObject *obj) override;
80  TObject *Remove(TObjLink *lnk) override;
81 
82  ClassDefOverride(TListOfEnumsWithLock,2); // List of TDataMembers for a class
83 };
84 
85 
86 //////////////////////////////////////////////////////////////////////////
87 // //
88 // TListOfEnumsWithLockIter //
89 // //
90 // Iterator of TListOfEnumsWithLock. //
91 // //
92 //////////////////////////////////////////////////////////////////////////
94 {
95  public:
97 
98  using TListIter::operator=;
99 
100  TObject *Next();
101 
103 };
104 
105 #endif // ROOT_TListOfEnumsWithLock
The TEnum class implements the enum type.
Definition: TEnum.h:42
TDictionary::DeclId_t DeclId_t
const char Option_t
Definition: RtypesCore.h:62
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
TObject * FindObject(const TObject *obj) const override
Find object using its hash value (returned by its Hash() member).
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
Int_t IndexOf(const TObject *obj) const override
Return index of object in collection.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TObject * Before(const TObject *obj) const override
Returns the object before object obj.
const void * DeclId_t
Definition: TDictionary.h:209
void Clear(Option_t *option) override
Remove all objects from the list.
~TListOfEnumsWithLock() override
Destructor.
Iterator abstract base class.
Definition: TIterator.h:32
Iterator of linked list.
Definition: TList.h:187
TListOfEnumsWithLock(const TListOfEnumsWithLock &)=delete
#define ClassDef(name, id)
Definition: Rtypes.h:254
ClassDefOverride(TListOfEnumsWithLock, 2)
TEnum * GetObject(const char *) const override
Return an object from the list of enums if and only if is has already been loaded in the list...
const Bool_t kIterForward
Definition: TCollection.h:43
TListOfEnumsWithLock & operator=(const TListOfEnumsWithLock &)=delete
TObjLink * LastLink() const override
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
void AddLast(TObject *obj) override
Add object at the end of the list.
Iterator for TListOfEnumsWithLock.
Int_t GetLast() const override
Returns index of last object in collection.
TObjLink * FirstLink() const override
TObject * After(const TObject *obj) const override
Returns the object after object obj.
TLine * l
Definition: textangle.C:4
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
Mother of all ROOT objects.
Definition: TObject.h:37
Int_t GetSize() const override
TObject ** GetObjectRef(const TObject *obj) const override
Return address of pointer to obj.
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnums.h:36
void AddAt(TObject *obj, Int_t idx) override
Insert object at location idx in the list.
TIterator * MakeIterator(Bool_t dir=kIterForward) const override
Return a list iterator.
TObject * Remove(TObject *obj) override
Remove object from the list.
void Delete(Option_t *option="") override
Delete all TDataMember object files.
char name[80]
Definition: TGX11.cxx:109
This class stores a (key,value) pair using an external hash.
Definition: TExMap.h:35
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.