BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPredStreamAdapter< Point, Iterator, Predicate > Class Template Reference

#include <EvtStreamAdapter.hh>

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

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 ()
Public Member Functions inherited from EvtStreamAdapter< Point >
 EvtStreamAdapter ()
virtual ~EvtStreamAdapter ()

Detailed Description

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

Definition at line 50 of file EvtStreamAdapter.hh.

Constructor & Destructor Documentation

◆ EvtPredStreamAdapter()

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

Definition at line 52 of file EvtStreamAdapter.hh.

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

Referenced by clone().

◆ ~EvtPredStreamAdapter()

template<class Point, class Iterator, class Predicate>
virtual EvtPredStreamAdapter< Point, Iterator, Predicate >::~EvtPredStreamAdapter ( )
inlinevirtual

Definition at line 54 of file EvtStreamAdapter.hh.

54{}

Member Function Documentation

◆ advance()

template<class Point, class Iterator, class Predicate>
virtual void EvtPredStreamAdapter< Point, Iterator, Predicate >::advance ( )
inlinevirtual

Implements EvtStreamAdapter< Point >.

Definition at line 70 of file EvtStreamAdapter.hh.

70{ _it++; }

◆ clone()

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

Implements EvtStreamAdapter< Point >.

Definition at line 56 of file EvtStreamAdapter.hh.

56{ return new EvtPredStreamAdapter( *this ); }
EvtPredStreamAdapter(Predicate pred, Iterator it, Iterator end)

◆ currentValue()

template<class Point, class Iterator, class Predicate>
virtual Point EvtPredStreamAdapter< Point, Iterator, Predicate >::currentValue ( )
inlinevirtual

Implements EvtStreamAdapter< Point >.

Definition at line 57 of file EvtStreamAdapter.hh.

57 {
59 while ( !pastEnd() )
60 {
61
62 value = *_it;
63 if ( _pred( value ) ) break;
64 _it++;
65 }
66 return value;
67 }

◆ pastEnd()

template<class Point, class Iterator, class Predicate>
virtual bool EvtPredStreamAdapter< Point, Iterator, Predicate >::pastEnd ( )
inlinevirtual

Implements EvtStreamAdapter< Point >.

Definition at line 69 of file EvtStreamAdapter.hh.

69{ return _it == _end; }

Referenced by currentValue().


The documentation for this class was generated from the following file: