BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtStreamInputIterator< Point > Class Template Reference

#include <EvtStreamInputIterator.hh>

Public Types

typedef input_iterator_tag iterator_category
 
typedef Point value_type
 
typedef const Point * pointer
 
typedef const Point & reference
 
typedef input_iterator_tag iterator_category
 
typedef Point value_type
 
typedef const Point * pointer
 
typedef const Point & reference
 

Public Member Functions

 EvtStreamInputIterator ()
 
 EvtStreamInputIterator (const EvtStreamInputIterator &other)
 
 EvtStreamInputIterator (EvtStreamAdapter< Point > &counter)
 
 ~EvtStreamInputIterator ()
 
reference operator* () const
 
EvtStreamInputIteratoroperator++ ()
 
EvtStreamInputIterator operator++ (int)
 
bool operator== (const EvtStreamInputIterator &other) const
 
 EvtStreamInputIterator ()
 
 EvtStreamInputIterator (const EvtStreamInputIterator &other)
 
 EvtStreamInputIterator (EvtStreamAdapter< Point > &counter)
 
 ~EvtStreamInputIterator ()
 
reference operator* () const
 
EvtStreamInputIteratoroperator++ ()
 
EvtStreamInputIterator operator++ (int)
 
bool operator== (const EvtStreamInputIterator &other) const
 

Protected Member Functions

bool pastEnd () const
 
void _read ()
 
bool pastEnd () const
 
void _read ()
 

Protected Attributes

EvtStreamAdapter< Point > * _counter
 
value_type _currentValue
 

Detailed Description

template<class Point>
class EvtStreamInputIterator< Point >

Definition at line 21 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

Member Typedef Documentation

◆ iterator_category [1/2]

template<class Point >
typedef input_iterator_tag EvtStreamInputIterator< Point >::iterator_category

◆ iterator_category [2/2]

template<class Point >
typedef input_iterator_tag EvtStreamInputIterator< Point >::iterator_category

◆ pointer [1/2]

template<class Point >
typedef const Point* EvtStreamInputIterator< Point >::pointer

◆ pointer [2/2]

template<class Point >
typedef const Point* EvtStreamInputIterator< Point >::pointer

◆ reference [1/2]

template<class Point >
typedef const Point& EvtStreamInputIterator< Point >::reference

◆ reference [2/2]

template<class Point >
typedef const Point& EvtStreamInputIterator< Point >::reference

◆ value_type [1/2]

template<class Point >
typedef Point EvtStreamInputIterator< Point >::value_type

◆ value_type [2/2]

template<class Point >
typedef Point EvtStreamInputIterator< Point >::value_type

Constructor & Destructor Documentation

◆ EvtStreamInputIterator() [1/6]

◆ EvtStreamInputIterator() [2/6]

template<class Point >
EvtStreamInputIterator< Point >::EvtStreamInputIterator ( const EvtStreamInputIterator< Point > &  other)
inline

◆ EvtStreamInputIterator() [3/6]

template<class Point >
EvtStreamInputIterator< Point >::EvtStreamInputIterator ( EvtStreamAdapter< Point > &  counter)
inline

Definition at line 39 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

40 : _counter(counter.clone())
41 {
42 _currentValue = _counter->currentValue();
43 }
virtual EvtStreamAdapter * clone() const =0

◆ ~EvtStreamInputIterator() [1/2]

template<class Point >
EvtStreamInputIterator< Point >::~EvtStreamInputIterator ( )
inline

◆ EvtStreamInputIterator() [4/6]

template<class Point >
EvtStreamInputIterator< Point >::EvtStreamInputIterator ( )
inline

◆ EvtStreamInputIterator() [5/6]

template<class Point >
EvtStreamInputIterator< Point >::EvtStreamInputIterator ( const EvtStreamInputIterator< Point > &  other)
inline

Definition at line 34 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

35 : _counter(other._counter ? other._counter->clone() : 0),
36 _currentValue(other._currentValue)
37 {}

◆ EvtStreamInputIterator() [6/6]

template<class Point >
EvtStreamInputIterator< Point >::EvtStreamInputIterator ( EvtStreamAdapter< Point > &  counter)
inline

Definition at line 39 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

40 : _counter(counter.clone())
41 {
42 _currentValue = _counter->currentValue();
43 }

◆ ~EvtStreamInputIterator() [2/2]

template<class Point >
EvtStreamInputIterator< Point >::~EvtStreamInputIterator ( )
inline

Definition at line 45 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

46 {
47 if(_counter) delete _counter;
48 }

Member Function Documentation

◆ _read() [1/2]

template<class Point >
void EvtStreamInputIterator< Point >::_read ( )
inlineprotected

Definition at line 88 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

88 {
89
90 _counter->advance();
91 _currentValue = _counter->currentValue();
92 }

Referenced by EvtStreamInputIterator< Point >::operator++().

◆ _read() [2/2]

template<class Point >
void EvtStreamInputIterator< Point >::_read ( )
inlineprotected

Definition at line 88 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

88 {
89
90 _counter->advance();
91 _currentValue = _counter->currentValue();
92 }

◆ operator*() [1/2]

template<class Point >
reference EvtStreamInputIterator< Point >::operator* ( ) const
inline

◆ operator*() [2/2]

template<class Point >
reference EvtStreamInputIterator< Point >::operator* ( ) const
inline

◆ operator++() [1/4]

template<class Point >
EvtStreamInputIterator & EvtStreamInputIterator< Point >::operator++ ( )
inline

◆ operator++() [2/4]

template<class Point >
EvtStreamInputIterator & EvtStreamInputIterator< Point >::operator++ ( )
inline

Definition at line 55 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

56 {
57 _read();
58 return *this;
59 }

◆ operator++() [3/4]

◆ operator++() [4/4]

template<class Point >
EvtStreamInputIterator EvtStreamInputIterator< Point >::operator++ ( int  )
inline

Definition at line 61 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

62 {
63 EvtStreamInputIterator tmp = *this;
64 _read();
65 return tmp;
66 }

◆ operator==() [1/2]

template<class Point >
bool EvtStreamInputIterator< Point >::operator== ( const EvtStreamInputIterator< Point > &  other) const
inline

Definition at line 68 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

69 {
70 // Equality is only defined for two past the end iterators
71 return (pastEnd() && other.pastEnd());
72 }

◆ operator==() [2/2]

template<class Point >
bool EvtStreamInputIterator< Point >::operator== ( const EvtStreamInputIterator< Point > &  other) const
inline

Definition at line 68 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

69 {
70 // Equality is only defined for two past the end iterators
71 return (pastEnd() && other.pastEnd());
72 }

◆ pastEnd() [1/2]

template<class Point >
bool EvtStreamInputIterator< Point >::pastEnd ( ) const
inlineprotected

Definition at line 79 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

80 {
81 bool ret = true;
82 if(_counter) ret = _counter->pastEnd();
83 return ret;
84 }

Referenced by EvtStreamInputIterator< Point >::operator==().

◆ pastEnd() [2/2]

template<class Point >
bool EvtStreamInputIterator< Point >::pastEnd ( ) const
inlineprotected

Definition at line 79 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtStreamInputIterator.hh.

80 {
81 bool ret = true;
82 if(_counter) ret = _counter->pastEnd();
83 return ret;
84 }

Member Data Documentation

◆ _counter

◆ _currentValue


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