BOSS 7.1.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 ()
 
virtual EvtStreamAdapterclone () const =0
 
virtual Point currentValue ()=0
 
virtual void advance ()=0
 
virtual bool pastEnd ()=0
 

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

◆ EvtPredStreamAdapter()

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.

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

◆ ~EvtPredStreamAdapter()

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

Definition at line 66 of file EvtStreamAdapter.hh.

67 {}

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 85 of file EvtStreamAdapter.hh.

85{ _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 69 of file EvtStreamAdapter.hh.

70 {
71 return new EvtPredStreamAdapter(*this);
72 }

◆ currentValue()

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

Implements EvtStreamAdapter< Point >.

Definition at line 73 of file EvtStreamAdapter.hh.

73 {
74 Point value;
75 while(!pastEnd()) {
76
77 value = *_it;
78 if(_pred(value)) break;
79 _it++;
80 }
81 return value;
82 }
virtual bool pastEnd()

◆ pastEnd()

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

Implements EvtStreamAdapter< Point >.

Definition at line 84 of file EvtStreamAdapter.hh.

84{ return _it == _end; }

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


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