EvtPredStreamAdapter< Point, Iterator, Predicate > Class Template Reference

#include <EvtStreamAdapter.hh>

Inheritance diagram for EvtPredStreamAdapter< Point, Iterator, Predicate >:

EvtStreamAdapter< Point > List of all members.

Public Member Functions

 EvtPredStreamAdapter (Predicate pred, Iterator it, Iterator end)
virtual ~EvtPredStreamAdapter ()
virtual EvtStreamAdapter<
Point > * 
clone () const
virtual Point currentValue ()
virtual bool pastEnd ()
virtual void advance ()

Private Attributes

Predicate _pred
Iterator _it
Iterator _end

Detailed Description

template<class Point, class Iterator, class Predicate>
class EvtPredStreamAdapter< Point, Iterator, Predicate >

Definition at line 61 of file EvtStreamAdapter.hh.


Constructor & Destructor Documentation

template<class Point, class Iterator, class Predicate>
EvtPredStreamAdapter< Point, Iterator, Predicate >::EvtPredStreamAdapter ( Predicate  pred,
Iterator  it,
Iterator  end 
) [inline]

Definition at line 63 of file EvtStreamAdapter.hh.

Referenced by EvtPredStreamAdapter< Point, Iterator, Predicate >::clone().

00064     : _pred(pred), _it(it), _end(end)
00065   {}

template<class Point, class Iterator, class Predicate>
virtual EvtPredStreamAdapter< Point, Iterator, Predicate >::~EvtPredStreamAdapter (  )  [inline, virtual]

Definition at line 66 of file EvtStreamAdapter.hh.

00067   {}


Member Function Documentation

template<class Point, class Iterator, class Predicate>
virtual void EvtPredStreamAdapter< Point, Iterator, Predicate >::advance (  )  [inline, virtual]

Implements EvtStreamAdapter< Point >.

Definition at line 85 of file EvtStreamAdapter.hh.

References EvtPredStreamAdapter< Point, Iterator, Predicate >::_it.

00085 { _it++; }

template<class Point, class Iterator, class Predicate>
virtual EvtStreamAdapter<Point>* EvtPredStreamAdapter< Point, Iterator, Predicate >::clone (  )  const [inline, virtual]

Implements EvtStreamAdapter< Point >.

Definition at line 69 of file EvtStreamAdapter.hh.

References EvtPredStreamAdapter< Point, Iterator, Predicate >::EvtPredStreamAdapter().

00070   { 
00071     return new EvtPredStreamAdapter(*this); 
00072   }

template<class Point, class Iterator, class Predicate>
virtual Point EvtPredStreamAdapter< Point, Iterator, Predicate >::currentValue (  )  [inline, virtual]

Implements EvtStreamAdapter< Point >.

Definition at line 73 of file EvtStreamAdapter.hh.

References EvtPredStreamAdapter< Point, Iterator, Predicate >::_it, EvtPredStreamAdapter< Point, Iterator, Predicate >::_pred, and EvtPredStreamAdapter< Point, Iterator, Predicate >::pastEnd().

00073                                { 
00074     Point value;
00075     while(!pastEnd()) {
00076       
00077       value = *_it;
00078       if(_pred(value)) break;
00079       _it++;
00080     }
00081     return value;
00082   }   

template<class Point, class Iterator, class Predicate>
virtual bool EvtPredStreamAdapter< Point, Iterator, Predicate >::pastEnd (  )  [inline, virtual]

Implements EvtStreamAdapter< Point >.

Definition at line 84 of file EvtStreamAdapter.hh.

References EvtPredStreamAdapter< Point, Iterator, Predicate >::_end, and EvtPredStreamAdapter< Point, Iterator, Predicate >::_it.

Referenced by EvtPredStreamAdapter< Point, Iterator, Predicate >::currentValue().

00084 { return _it == _end; }


Member Data Documentation

template<class Point, class Iterator, class Predicate>
Iterator EvtPredStreamAdapter< Point, Iterator, Predicate >::_end [private]

Definition at line 90 of file EvtStreamAdapter.hh.

Referenced by EvtPredStreamAdapter< Point, Iterator, Predicate >::pastEnd().

template<class Point, class Iterator, class Predicate>
Iterator EvtPredStreamAdapter< Point, Iterator, Predicate >::_it [private]

Definition at line 89 of file EvtStreamAdapter.hh.

Referenced by EvtPredStreamAdapter< Point, Iterator, Predicate >::advance(), EvtPredStreamAdapter< Point, Iterator, Predicate >::currentValue(), and EvtPredStreamAdapter< Point, Iterator, Predicate >::pastEnd().

template<class Point, class Iterator, class Predicate>
Predicate EvtPredStreamAdapter< Point, Iterator, Predicate >::_pred [private]

Definition at line 88 of file EvtStreamAdapter.hh.

Referenced by EvtPredStreamAdapter< Point, Iterator, Predicate >::currentValue().


Generated on Tue Nov 29 23:19:13 2016 for BOSS_7.0.2 by  doxygen 1.4.7