class TIter

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.

/* */

Function Members (Methods)

TIter(TIterator* it)
TIter(const TIter& iter)
TIter(const TCollection* col, Bool_t dir = kIterForward)
static TClass*Class()
static TIterEnd()
const TCollection*GetCollection() const
Option_t*GetOption() const
virtual TClass*IsA() const
booloperator!=(const TIter& aIter) const
TObject*operator*() const
TIter&operator=(const TIter& rhs)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

TIterator*fIteratorcollection iterator

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TIter(const TIter &iter)
 Copy a TIter. This involves allocating a new TIterator of the right
 sub class and assigning it with the original.
TIter & operator=(const TIter& rhs)
 Assigning an TIter to another. This involves allocatiing a new TIterator
 of the right sub class and assigning it with the original.
TIter & Begin()
 Pointing to the first element of the container.
TIter End()
 Pointing to the element after the last - to a nullptr value in our case.
TObject * operator()(const char *name)
{ }
TIter(const TCollection* col, Bool_t dir = kIterForward)
{ }
TIter(TIterator *it)
{ }
virtual ~TIter()
{ SafeDelete(fIterator); }
TObject * Next()
{ return fIterator ? fIterator->Next() : nullptr; }
const TCollection * GetCollection()
{ return fIterator ? fIterator->GetCollection() : nullptr; }
Option_t * GetOption()
{ return fIterator ? fIterator->GetOption() : ""; }
void Reset()
{ if (fIterator) fIterator->Reset(); }
TIter & operator++()
{ Next(); return *this; }
bool operator!=(const TIter& aIter) const
{ return ((*fIterator) != *(aIter.fIterator)); }
TObject * operator*()
{ return *(*fIterator); }

Author: Fons Rademakers 13/08/95
Last change: root/cont:$Id: TCollection.h 25128 2008-08-12 17:59:19Z pcanal $
Last generated: 2008-08-13 08:19
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

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.