Logo ROOT  
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 #include "TListOfEnums.h"
26 
27 class TExMap;
28 class TEnum;
29 
31 {
32 private:
34 
37 
38 public:
39 
41  ~TListOfEnumsWithLock() override;
42 
43  TEnum *GetObject(const char*) const override;
44 
45  void Clear(Option_t *option) override;
46  void Delete(Option_t *option="") override;
47 
48  TObject *FindObject(const TObject* obj) const override;
49  TObject *FindObject(const char *name) const override;
50  TIterator *MakeIterator(Bool_t dir = kIterForward) const override;
51 
52  TObject *At(Int_t idx) const override;
53  TObject *After(const TObject *obj) const override;
54  TObject *Before(const TObject *obj) const override;
55  TObject *First() const override;
56  TObjLink *FirstLink() const override;
57  TObject **GetObjectRef(const TObject *obj) const override;
58  TObject *Last() const override;
59  TObjLink *LastLink() const override;
60 
61  Int_t GetLast() const override;
62  Int_t IndexOf(const TObject *obj) const override;
63 
64  Int_t GetSize() const override;
65 
66  void AddFirst(TObject *obj) override;
67  void AddFirst(TObject *obj, Option_t *opt) override;
68  void AddLast(TObject *obj) override;
69  void AddLast(TObject *obj, Option_t *opt) override;
70  void AddAt(TObject *obj, Int_t idx) override;
71  void AddAfter(const TObject *after, TObject *obj) override;
72  void AddAfter(TObjLink *after, TObject *obj) override;
73  void AddBefore(const TObject *before, TObject *obj) override;
74  void AddBefore(TObjLink *before, TObject *obj) override;
75 
76  void RecursiveRemove(TObject *obj) override;
77  TObject *Remove(TObject *obj) override;
78  TObject *Remove(TObjLink *lnk) override;
79 
80  ClassDefOverride(TListOfEnumsWithLock,2); // List of TDataMembers for a class
81 };
82 
83 
84 //////////////////////////////////////////////////////////////////////////
85 // //
86 // TListOfEnumsWithLockIter //
87 // //
88 // Iterator of TListOfEnumsWithLock. //
89 // //
90 //////////////////////////////////////////////////////////////////////////
92 {
93  public:
95 
96  using TListIter::operator=;
97 
98  TObject *Next();
99 
101 };
102 
103 #endif // ROOT_TListOfEnumsWithLock
l
auto * l
Definition: textangle.C:4
TListOfEnumsWithLock::FindObject
TObject * FindObject(const TObject *obj) const override
Find object using its hash value (returned by its Hash() member).
Definition: TListOfEnumsWithLock.cxx:174
TListOfEnumsWithLock::After
TObject * After(const TObject *obj) const override
Returns the object after object obj.
Definition: TListOfEnumsWithLock.cxx:245
TListOfEnumsWithLock::RecursiveRemove
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
Definition: TListOfEnumsWithLock.cxx:199
Option_t
const char Option_t
Definition: RtypesCore.h:66
TListOfEnumsWithLockIter::TListOfEnumsWithLockIter
TListOfEnumsWithLockIter(const TListOfEnumsWithLock *l, Bool_t dir=kIterForward)
Definition: TListOfEnumsWithLock.cxx:333
TListOfEnumsWithLockIter::Next
TObject * Next()
Return next object in the list. Returns 0 when no more objects in list.
Definition: TListOfEnumsWithLock.cxx:338
TListOfEnumsWithLock::FirstLink
TObjLink * FirstLink() const override
Definition: TListOfEnumsWithLock.cxx:269
TListOfEnumsWithLock::First
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
Definition: TListOfEnumsWithLock.cxx:261
TListOfEnumsWithLock::TListOfEnumsWithLock
TListOfEnumsWithLock(const TListOfEnumsWithLock &)=delete
TListOfEnumsWithLock::GetSize
Int_t GetSize() const override
Return the capacity of the collection, i.e.
Definition: TListOfEnumsWithLock.cxx:319
TListOfEnumsWithLock
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnumsWithLock.h:31
TListOfEnumsWithLock::DeclId_t
TDictionary::DeclId_t DeclId_t
Definition: TListOfEnumsWithLock.h:33
TListOfEnumsWithLock::Last
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
Definition: TListOfEnumsWithLock.cxx:285
TListOfEnumsWithLock::IndexOf
Int_t IndexOf(const TObject *obj) const override
Return index of object in collection.
Definition: TListOfEnumsWithLock.cxx:310
TListOfEnumsWithLock::GetObject
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.
Definition: TListOfEnumsWithLock.cxx:184
bool
TIterator
Iterator abstract base class.
Definition: TIterator.h:30
TListIter
Iterator of linked list.
Definition: TList.h:200
kIterForward
const Bool_t kIterForward
Definition: TCollection.h:40
TListOfEnumsWithLock::LastLink
TObjLink * LastLink() const override
Definition: TListOfEnumsWithLock.cxx:293
TListOfEnumsWithLock::ClassDefOverride
ClassDefOverride(TListOfEnumsWithLock, 2)
TListOfEnumsWithLock::GetLast
Int_t GetLast() const override
Returns index of last object in collection.
Definition: TListOfEnumsWithLock.cxx:302
TListOfEnumsWithLock::~TListOfEnumsWithLock
~TListOfEnumsWithLock() override
Destructor.
Definition: TListOfEnumsWithLock.cxx:40
TListOfEnumsWithLock::Remove
TObject * Remove(TObject *obj) override
Remove object from the list.
Definition: TListOfEnumsWithLock.cxx:210
TListOfEnumsWithLockIter
Iterator for TListOfEnumsWithLock.
Definition: TListOfEnumsWithLock.h:92
TEnum
The TEnum class implements the enum type.
Definition: TEnum.h:33
TDictionary::DeclId_t
const void * DeclId_t
Definition: TDictionary.h:223
TListOfEnums.h
TListOfEnumsWithLock::AddBefore
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
Definition: TListOfEnumsWithLock.cxx:118
TListOfEnumsWithLock::AddLast
void AddLast(TObject *obj) override
Add object at the end of the list.
Definition: TListOfEnumsWithLock.cxx:69
TListOfEnumsWithLock::GetObjectRef
TObject ** GetObjectRef(const TObject *obj) const override
Return address of pointer to obj.
Definition: TListOfEnumsWithLock.cxx:277
TListOfEnumsWithLock::AddAfter
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
Definition: TListOfEnumsWithLock.cxx:100
TListOfEnums
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
Definition: TListOfEnums.h:33
TListOfEnumsWithLock::Clear
void Clear(Option_t *option) override
Remove all objects from the list.
Definition: TListOfEnumsWithLock.cxx:137
TListOfEnumsWithLock::AddFirst
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
Definition: TListOfEnumsWithLock.cxx:47
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
TListOfEnumsWithLock::Before
TObject * Before(const TObject *obj) const override
Returns the object before object obj.
Definition: TListOfEnumsWithLock.cxx:253
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TListOfEnumsWithLock::AddAt
void AddAt(TObject *obj, Int_t idx) override
Insert object at location idx in the list.
Definition: TListOfEnumsWithLock.cxx:91
name
char name[80]
Definition: TGX11.cxx:110
TListOfEnumsWithLock::MakeIterator
TIterator * MakeIterator(Bool_t dir=kIterForward) const override
Return a list iterator.
Definition: TListOfEnumsWithLock.cxx:229
TExMap
This class stores a (key,value) pair using an external hash.
Definition: TExMap.h:33
TListOfEnumsWithLock::At
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
Definition: TListOfEnumsWithLock.cxx:237
TListOfEnumsWithLock::Delete
void Delete(Option_t *option="") override
Delete all TDataMember object files.
Definition: TListOfEnumsWithLock.cxx:146
TListOfEnumsWithLock::operator=
TListOfEnumsWithLock & operator=(const TListOfEnumsWithLock &)=delete
int