12 #ifndef ROOT_TCollection
13 #define ROOT_TCollection
29 #ifndef ROOT_TIterator
88 virtual void Dump()
const ;
93 virtual const char *
GetName()
const;
171 return !(*
this == aIter);
201 #define R__FOR_EACH(type,proc) \
202 SetCurrentCollection(); \
203 TIter _NAME3_(nxt_,type,proc)(TCollection::GetCurrentCollection()); \
204 type *_NAME3_(obj_,type,proc); \
205 while ((_NAME3_(obj_,type,proc) = (type*) _NAME3_(nxt_,type,proc)())) \
206 _NAME3_(obj_,type,proc)->proc
virtual Int_t GetEntries() const
virtual TObject * Remove(TObject *obj)=0
static Int_t fgGarbageStack
virtual void Clear(Option_t *option="")=0
ULong_t Hash() const
Return hash value for this object.
R__EXTERN TVirtualMutex * gCollectionMutex
virtual const char * GetName() const
Return name of this collection.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual void Dump() const
Dump all objects in this collection.
virtual void PrintCollectionHeader(Option_t *option) const
Print the collection header.
TObject * operator()(const char *name) const
Find an object in this collection by name.
TIter & Begin()
Pointing to the first element of the container.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Draw(Option_t *option="")
Draw all objects in this collection.
Bool_t AssertClass(TClass *cl) const
Make sure all objects in this collection inherit from class cl.
This class implements a mutex interface.
static TIterCategory End()
Bool_t IsSortable() const
static TCollection * fgCurrentCollection
Iterator abstract base class.
virtual Option_t * GetOption() const
Bool_t IsArgNull(const char *where, const TObject *obj) const
Returns true if object is a null pointer.
Bool_t operator!=(const TIter &aIter) const
virtual TObject * Clone(const char *newname="") const
Make a clone of an collection using the Streamer facility.
virtual void Delete(Option_t *option="")=0
Delete this object.
#define ClassDef(name, id)
virtual Bool_t IsEmpty() const
void AddVector(TObject *obj1,...)
Add all arguments to the collection.
virtual Int_t GrowBy(Int_t delta) const
Increase the collection's capacity by delta slots.
std::map< std::string, std::string >::const_iterator iter
virtual void AddAll(const TCollection *col)
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
TIterCategory(const TCollection *col, Bool_t dir=kIterForward)
const Bool_t kIterForward
Using a TBrowser one can browse all ROOT objects.
TIter & operator=(const TIter &rhs)
Assigning an TIter to another.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual void PrintCollectionEntry(TObject *entry, Option_t *option, Int_t recurse) const
Print the collection entry.
const TCollection * GetCollection() const
static TCollection * GetCurrentCollection()
Return the globally accessible collection.
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const =0
Bool_t Contains(const TObject *obj) const
Collection abstract base class.
virtual void Paint(Option_t *option="")
Paint all objects in this collection.
Bool_t TestBit(UInt_t f) const
virtual const TCollection * GetCollection() const =0
The ROOT global object gROOT contains a list of all defined classes.
static void StartGarbageCollection()
Set up for garbage collection.
virtual TIterator * MakeReverseIterator() const
This class registers all instances of TObject and its derived classes in a hash table.
virtual const char * GetCollectionEntryName(TObject *entry) const
For given collection entry return the string that is used to identify the object and, potentially, perform wildcard/regexp filtering on.
void SetName(const char *name)
void SetCurrentCollection()
Set this collection to be the globally accesible collection.
TObject * operator*() const
static Bool_t fgEmptyingGarbage
static TIter End()
Pointing to the element after the last - to a nullptr value in our case.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
static void GarbageCollect(TObject *obj)
Add to the list of things to be cleaned up.
Option_t * GetOption() const
virtual Int_t GetSize() const
TIter(const TCollection *col, Bool_t dir=kIterForward)
Int_t Compare(const TObject *obj) const
Compare two TCollection objects.
static TObjectTable * fgGarbageCollection
Bool_t Contains(const char *name) const
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
virtual void Add(TObject *obj)=0
static void EmptyGarbageCollection()
Do the garbage collection.
Mother of all ROOT objects.
void operator=(const TCollection &)
Bool_t operator==(const TIter &aIter) const
virtual TObject * Next()=0
virtual TObject ** GetObjectRef(const TObject *obj) const =0
const Bool_t kIterBackward
TIterCategory(TIterator *it)
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this collection.
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.