TCollection
class description - source file - inheritance tree
private:
void operator=(TCollection&)
public:
virtual void ~TCollection()
virtual void Add(TObject* obj)
virtual void AddAll(TCollection* col)
void AddVector(TObject* obj1, int)
Bool_t AssertClass(TClass* cl)
virtual void Browse(TBrowser* b)
Int_t Capacity()
TClass* Class()
virtual void Clear(Option_t* option)
Bool_t Contains(Text_t* name)
Bool_t Contains(TObject* obj)
virtual void Delete(Option_t* option)
virtual void Draw(Option_t* option)
virtual void Dump()
void EmptyGarbageCollection()
virtual TObject* FindObject(Text_t* name)
virtual TObject* FindObject(TObject* obj)
void GarbageCollect(TObject* obj)
TCollection* GetCurrentCollection()
TObject* GetParent()
virtual Int_t GetSize()
virtual Int_t GrowBy(Int_t delta)
virtual TClass* IsA()
Bool_t IsArgNull(char* where, TObject* obj)
Bool_t IsEmpty()
virtual Bool_t IsFolder()
virtual void ls(Option_t* option)
virtual TIterator* MakeIterator(Bool_t dir = kIterForward)
virtual TIterator* MakeReverseIterator()
TObject* operator()(Text_t* name)
virtual void Paint(Option_t* option)
virtual void Print(Option_t* option)
virtual void RecursiveRemove(TObject* obj)
virtual TObject* Remove(TObject* obj)
virtual void RemoveAll(TCollection* col)
void RemoveAll()
void SetCurrentCollection()
void SetParent(TObject* parent)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
void StartGarbageCollection()
virtual void Streamer(TBuffer& b)
virtual void Write(Text_t* name = 0, Int_t option = 0, Int_t bufsize = 0)
private:
static TCollection* fgCurrentCollection used by macro ForEach
static TObjectTable* fgGarbageCollection used by garbage collector
static Bool_t fgEmptyingGarbage used by garbage collector
static Int_t fgGarbageStack used by garbage collector
protected:
TObject* fParent parent object of collection
Int_t fSize number of elements in collection
public:
static const enum TObject:: kInitCapacity
static const enum TObject:: kInitHashTableCapacity
See also
-
THashTable, TMap, TSeqCollection
Collection abstract base class. This class describes the base
protocol all collection classes have to implement. The ROOT
collection classes always store pointers to objects that inherit
from TObject. They never adopt the objects. Therefore, it is the
user's responsability to take care of deleting the actual objects
once they are not needed anymore. In exceptional cases, when the
user is 100% sure nothing else is referencing the objects in the
collection, one can delete all objects and the collection at the
same time using the Delete() function.
Collections can be iterated using an iterator object (see
TIterator). Depending on the concrete collection class there may be
some additional methods of iterating. See the repective classes.
TCollection inherits from TObject since we want to be able to have
collections of collections.
In a later release the collections may become templatized.
/*
*/
void AddAll(TCollection *col)
Add all objects from collection col to this collection.
void AddVector(TObject *va_(obj1), ...)
Add all arguments to this collection.
Bool_t AssertClass(TClass *cl) const
Make sure all objects in this collection inherit from class cl.
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
If b=0, there is no Browse call TObject::Browse(0) instead.
This means TObject::Inspect() will be invoked indirectly
void Draw(Option_t *option)
Draw all objects in this collection.
void Dump()
Dump all objects in this collection.
TObject* FindObject(const Text_t *name) const
Find an object in this collection using its name. Requires a sequential
scan till the object has been found. Returns 0 if object with specified
name is not found.
TObject* FindObject(TObject *obj) const
Find an object in this collection using the object's IsEqual()
member function. Requires a sequential scan till the object has
been found. Returns 0 if object is not found.
Typically this function is overridden by a more efficient version
in concrete collection classes (e.g. THashTable).
Int_t GrowBy(Int_t delta) const
Increase the collection's capacity by delta slots.
Bool_t IsArgNull(const char *where, TObject *obj) const
Returns true if object is a null pointer.
void ls(Option_t *option)
List (ls) all objects in this collection.
void Paint(Option_t *)
Paint all objects in this collection.
void Print(Option_t *option)
Print all objects in this collection.
void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object
from all other objects (and collections).
void RemoveAll(TCollection *col)
Remove all objects in collection col from this collection.
void Streamer(TBuffer &b)
Stream all objects in the collection to or from the I/O buffer.
void Write(const Text_t *name, Int_t option, Int_t bsize)
Write all objects in this collection. By default all objects in
the collection are written individually (each object gets its
own key). To write all objects using one key specify a name and
set option to kSingleKey (i.e. 1).
TCollection* GetCurrentCollection()
void SetCurrentCollection()
void StartGarbageCollection()
void EmptyGarbageCollection()
void GarbageCollect(TObject *obj)
Inline Functions
void operator=(TCollection&)
void Add(TObject* obj)
Int_t Capacity()
void Clear(Option_t* option)
Bool_t Contains(Text_t* name)
Bool_t Contains(TObject* obj)
void Delete(Option_t* option)
TObject* operator()(Text_t* name)
TObject* GetParent()
Int_t GetSize()
Bool_t IsEmpty()
Bool_t IsFolder()
TIterator* MakeIterator(Bool_t dir = kIterForward)
TIterator* MakeReverseIterator()
TObject* Remove(TObject* obj)
void RemoveAll()
void SetParent(TObject* parent)
TClass* Class()
TClass* IsA()
void ShowMembers(TMemberInspector& insp, char* parent)
void ~TCollection()
Author: Fons Rademakers 13/08/95
Last update: 2.22/07 05/07/99 15.38.10 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.