Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TIterator.cxx
Go to the documentation of this file.
1// @(#)root/cont:$Id$
2// Author: Fons Rademakers 13/08/95
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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/** \class TIterator
13\ingroup Containers
14Iterator abstract base class. This base class provides the interface
15for collection iterators.
16\note See TList documentation for examples of derived classes and on how
17to loop with these iterators, and TCollection documentation for more
18modern alternatives that dynamically cast the derived class.
19*/
20
21#include "TIterator.h"
22#include "TError.h"
23
25
26////////////////////////////////////////////////////////////////////////////////
27/// Compare two iterator objects.
28/// For backward compatibility reasons we have to provide this
29/// default implementation.
30
32{
33 ::Warning("TIterator::operator!=", "this method must be overridden!");
34 return false;
35}
36
37////////////////////////////////////////////////////////////////////////////////
38/// Return current object or nullptr.
39/// For backward compatibility reasons we have to provide this
40/// default implementation.
41
43{
44 ::Warning("TIterator::operator*", "this method must be overridden!");
45 return nullptr;
46}
#define ClassImp(name)
Definition Rtypes.h:374
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition TError.cxx:229
Iterator abstract base class.
Definition TIterator.h:30
virtual Bool_t operator!=(const TIterator &) const
Compare two iterator objects.
Definition TIterator.cxx:31
virtual TObject * operator*() const
Return current object or nullptr.
Definition TIterator.cxx:42
Mother of all ROOT objects.
Definition TObject.h:41