Public Member Functions | Private Types | Private Attributes | List of all members
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 253 of file Track.h.

Member Typedef Documentation

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

Definition at line 1316 of file Track.h.

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

Definition at line 1321 of file Track.h.

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

Definition at line 1318 of file Track.h.

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

Definition at line 1319 of file Track.h.

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

Definition at line 1307 of file Track.h.

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

Definition at line 1317 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 1326 of file Track.h.

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

Member Function Documentation

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

Definition at line 1342 of file Track.h.

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

Definition at line 1336 of file Track.h.

1337  { 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:709
TrackPoint value_type
Definition: Track.h:1317
track_proxy_t const * track
Definition: Track.h:1309
template<typename TrackProxy >
TrackPointIterator& proxy::TrackPointIterator< TrackProxy >::operator++ ( )
inline

Definition at line 1330 of file Track.h.

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

Definition at line 1332 of file Track.h.

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

Definition at line 1339 of file Track.h.

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

Member Data Documentation

template<typename TrackProxy >
std::size_t proxy::TrackPointIterator< TrackProxy >::index = std::numeric_limits<std::size_t>::max()
private

Definition at line 1310 of file Track.h.

template<typename TrackProxy >
track_proxy_t const* proxy::TrackPointIterator< TrackProxy >::track = nullptr
private

Definition at line 1309 of file Track.h.


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