LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
proxy::TrackPointIterator< TrackProxy > Class Template Reference

#include "Track.h"

Public Types

Iterator traits
using difference_type = std::ptrdiff_t
 
using value_type = TrackPoint
 
using pointer = TrackPoint const *
 
using reference = TrackPoint
 
using iterator_category = std::input_iterator_tag
 

Public Member Functions

 TrackPointIterator ()=default
 
 TrackPointIterator (track_proxy_t const &track, std::size_t index)
 
TrackPointIteratoroperator++ ()
 
TrackPointIterator operator++ (int)
 
value_type operator* () const
 
bool operator== (TrackPointIterator const &other) const
 
bool operator!= (TrackPointIterator const &other) const
 

Private Types

using track_proxy_t = TrackProxy
 

Private Attributes

track_proxy_t const * track = nullptr
 
std::size_t index = std::numeric_limits<std::size_t>::max()
 

Detailed Description

template<typename TrackProxy>
class proxy::TrackPointIterator< TrackProxy >

Iterator for points of a track proxy. Only supports range-for loops.

Definition at line 252 of file Track.h.

Member Typedef Documentation

template<typename TrackProxy >
using proxy::TrackPointIterator< TrackProxy >::difference_type = std::ptrdiff_t

Definition at line 1315 of file Track.h.

template<typename TrackProxy >
using proxy::TrackPointIterator< TrackProxy >::iterator_category = std::input_iterator_tag

Definition at line 1320 of file Track.h.

template<typename TrackProxy >
using proxy::TrackPointIterator< TrackProxy >::pointer = TrackPoint const*

Definition at line 1317 of file Track.h.

template<typename TrackProxy >
using proxy::TrackPointIterator< TrackProxy >::reference = TrackPoint

Definition at line 1318 of file Track.h.

template<typename TrackProxy >
using proxy::TrackPointIterator< TrackProxy >::track_proxy_t = TrackProxy
private

Definition at line 1306 of file Track.h.

template<typename TrackProxy >
using proxy::TrackPointIterator< TrackProxy >::value_type = TrackPoint

Definition at line 1316 of file Track.h.

Constructor & Destructor Documentation

template<typename TrackProxy >
proxy::TrackPointIterator< TrackProxy >::TrackPointIterator ( )
default
template<typename TrackProxy >
proxy::TrackPointIterator< TrackProxy >::TrackPointIterator ( track_proxy_t const &  track,
std::size_t  index 
)
inline

Definition at line 1325 of file Track.h.

1326  : track(&track), index(index)
1327  {}
track_proxy_t const * track
Definition: Track.h:1308

Member Function Documentation

template<typename TrackProxy >
bool proxy::TrackPointIterator< TrackProxy >::operator!= ( TrackPointIterator< TrackProxy > const &  other) const
inline

Definition at line 1341 of file Track.h.

References proxy::TrackPointIterator< TrackProxy >::index, and proxy::TrackPointIterator< TrackProxy >::track.

1342  { return (index != other.index) || (track != other.track); }
track_proxy_t const * track
Definition: Track.h:1308
template<typename TrackProxy >
value_type proxy::TrackPointIterator< TrackProxy >::operator* ( ) const
inline

Definition at line 1335 of file Track.h.

References proxy::makeTrackPointData().

1336  { return static_cast<value_type>(makeTrackPointData(*track, index)); }
TrackPointData makeTrackPointData(TrackProxy const &track, std::size_t index)
Returns an object with information about the specified track point.
Definition: Track.h:708
TrackPoint value_type
Definition: Track.h:1316
track_proxy_t const * track
Definition: Track.h:1308
template<typename TrackProxy >
TrackPointIterator& proxy::TrackPointIterator< TrackProxy >::operator++ ( )
inline

Definition at line 1329 of file Track.h.

1329 { ++index; return *this; }
template<typename TrackProxy >
TrackPointIterator proxy::TrackPointIterator< TrackProxy >::operator++ ( int  )
inline

Definition at line 1331 of file Track.h.

1332  { auto it = *this; this->operator++(); return it; }
TrackPointIterator & operator++()
Definition: Track.h:1329
template<typename TrackProxy >
bool proxy::TrackPointIterator< TrackProxy >::operator== ( TrackPointIterator< TrackProxy > const &  other) const
inline

Definition at line 1338 of file Track.h.

References proxy::TrackPointIterator< TrackProxy >::index, and proxy::TrackPointIterator< TrackProxy >::track.

1339  { return (index == other.index) && (track == other.track); }
track_proxy_t const * track
Definition: Track.h:1308

Member Data Documentation

template<typename TrackProxy >
std::size_t proxy::TrackPointIterator< TrackProxy >::index = std::numeric_limits<std::size_t>::max()
private
template<typename TrackProxy >
track_proxy_t const* proxy::TrackPointIterator< TrackProxy >::track = nullptr
private

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