Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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

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

Private Attributes

Iterator _end
Iterator _it
Predicate _pred

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


Constructor & Destructor Documentation

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

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

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

00067   {}


Member Function Documentation

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

Implements EvtStreamAdapter< Point >.

00085 { _it++; }

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

Implements EvtStreamAdapter< Point >.

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 >.

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 >.

00084 { return _it == _end; }


Member Data Documentation

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

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

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


The documentation for this class was generated from the following file:
Generated on Wed Feb 2 16:08:38 2011 for BOSS6.5.5 by  doxygen 1.3.9.1