EvtStreamInputIterator< Point > Class Template Reference

#include <EvtStreamInputIterator.hh>

List of all members.

Public Types

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

Protected Member Functions

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


Member Typedef Documentation

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

Definition at line 24 of file EvtStreamInputIterator.hh.

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

Definition at line 27 of file EvtStreamInputIterator.hh.

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

Definition at line 28 of file EvtStreamInputIterator.hh.

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

Definition at line 25 of file EvtStreamInputIterator.hh.


Constructor & Destructor Documentation

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

Definition at line 30 of file EvtStreamInputIterator.hh.

00031     : _counter(0)
00032   {}

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

Definition at line 34 of file EvtStreamInputIterator.hh.

00035     : _counter(other._counter ? other._counter->clone() : 0),
00036       _currentValue(other._currentValue)
00037   {} 

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

Definition at line 39 of file EvtStreamInputIterator.hh.

References EvtStreamInputIterator< Point >::_counter, and EvtStreamInputIterator< Point >::_currentValue.

00040     : _counter(counter.clone())
00041   {
00042     _currentValue = _counter->currentValue(); 
00043   }

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

Definition at line 45 of file EvtStreamInputIterator.hh.

References EvtStreamInputIterator< Point >::_counter.

00046   {
00047     if(_counter) delete _counter;
00048   }


Member Function Documentation

template<class Point>
void EvtStreamInputIterator< Point >::_read (  )  [inline, protected]

Definition at line 88 of file EvtStreamInputIterator.hh.

References EvtStreamInputIterator< Point >::_counter, and EvtStreamInputIterator< Point >::_currentValue.

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

00088                {
00089     
00090     _counter->advance();
00091     _currentValue = _counter->currentValue();
00092   }

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

Definition at line 50 of file EvtStreamInputIterator.hh.

References EvtStreamInputIterator< Point >::_currentValue.

00051   {
00052     return _currentValue; 
00053   }

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

Definition at line 61 of file EvtStreamInputIterator.hh.

References EvtStreamInputIterator< Point >::_read().

00062   {
00063     EvtStreamInputIterator tmp = *this;
00064     _read();
00065     return tmp;
00066   }

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

Definition at line 55 of file EvtStreamInputIterator.hh.

References EvtStreamInputIterator< Point >::_read().

00056   {
00057     _read();
00058     return *this;
00059   }

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

Definition at line 68 of file EvtStreamInputIterator.hh.

References EvtCyclic3::other(), and EvtStreamInputIterator< Point >::pastEnd().

00069   {
00070     // Equality is only defined for two past the end iterators
00071     return (pastEnd() && other.pastEnd());
00072   }

template<class Point>
bool EvtStreamInputIterator< Point >::pastEnd (  )  const [inline, protected]

Definition at line 79 of file EvtStreamInputIterator.hh.

References EvtStreamInputIterator< Point >::_counter.

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

00080   {
00081     bool ret = true;
00082     if(_counter) ret = _counter->pastEnd();
00083     return ret;
00084   }


Member Data Documentation

template<class Point>
EvtStreamAdapter<Point>* EvtStreamInputIterator< Point >::_counter [protected]

Definition at line 76 of file EvtStreamInputIterator.hh.

Referenced by EvtStreamInputIterator< Point >::_read(), EvtStreamInputIterator< Point >::EvtStreamInputIterator(), EvtStreamInputIterator< Point >::pastEnd(), and EvtStreamInputIterator< Point >::~EvtStreamInputIterator().

template<class Point>
value_type EvtStreamInputIterator< Point >::_currentValue [protected]

Definition at line 77 of file EvtStreamInputIterator.hh.

Referenced by EvtStreamInputIterator< Point >::_read(), EvtStreamInputIterator< Point >::EvtStreamInputIterator(), and EvtStreamInputIterator< Point >::operator *().


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