ROOT
6.30.04
Reference Guide
All
Namespaces
Files
Pages
TIterator.h
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
#ifndef ROOT_TIterator
13
#define ROOT_TIterator
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TIterator //
19
// //
20
// Iterator abstract base class. This base class provides the interface //
21
// for collection iterators. //
22
// //
23
//////////////////////////////////////////////////////////////////////////
24
25
#include "
Rtypes.h
"
26
27
class
TCollection;
28
class
TObject;
29
30
class
TIterator {
31
32
protected
:
33
TIterator() { }
34
TIterator(
const
TIterator &) { }
35
36
public
:
37
virtual
TIterator &operator=(
const
TIterator &) {
return
*
this
; }
38
virtual
~TIterator() { }
39
virtual
const
TCollection *GetCollection()
const
= 0;
40
virtual
Option_t *GetOption()
const
{
return
""
; }
41
virtual
TObject *Next() = 0;
42
virtual
void
Reset() = 0;
43
TObject *operator()() {
return
Next(); }
44
virtual
Bool_t operator!=(
const
TIterator &)
const
;
45
Bool_t operator==(
const
TIterator & other)
const
{
return
!(*
this
!= other); }
46
virtual
TObject *operator*()
const
;
47
48
ClassDef(TIterator,0)
//Iterator abstract base class
49
};
50
51
#endif
Rtypes.h
core
cont
inc
TIterator.h
Generated on Tue May 5 2020 14:02:22 for ROOT by
1.8.5