52 #ifndef __PCL_Iterator_h
53 #define __PCL_Iterator_h
103 template <
class C,
class T>
116 template <
class C,
class T>
inline
126 template <
typename T>
inline
138 template <
class C,
class T>
inline
148 template <
typename T>
inline
160 template <
class FI>
inline
166 template <
class FI>
inline
167 distance_type __pcl_distance__( FI i, FI j, ForwardIterator )
170 for ( ; i != j; ++i, ++d ) {}
174 template <
class RI>
inline
175 distance_type __pcl_distance__( RI i, RI j, RandomAccessIterator )
185 template <
class FI>
inline
191 template <
class FI>
inline
192 void __pcl_advance__( FI& i,
distance_type d, ForwardIterator )
194 PCL_PRECONDITION( d >= 0 )
195 for ( ; d > 0; --d, ++i ) {}
198 template <
class BI>
inline
199 void __pcl_advance__( BI& i,
distance_type d, BidirectionalIterator )
202 for ( ; ++i, --d > 0; ) {}
204 for ( ; d < 0; ++d, --i ) {}
207 template <
class RI>
inline
208 void __pcl_advance__( RI& i,
distance_type d, RandomAccessIterator )
218 template <
class FI>
inline
224 template <
class FI>
inline
225 void __pcl_move_forward__( FI& i,
size_type n, ForwardIterator )
227 for ( ; n > 0; --n, ++i ) {}
230 template <
class RI>
inline
231 void __pcl_move_forward__( RI& i,
size_type n, RandomAccessIterator )
241 template <
class BI>
inline
247 template <
class BI>
inline
248 void __pcl_move_backward__( BI& i,
size_type n, BidirectionalIterator )
250 for ( ; n > 0; --n, --i ) {}
253 template <
class RI>
inline
254 void __pcl_move_backward__( RI& i,
size_type n, RandomAccessIterator )
265 template <
class BI,
class C,
class T>
280 , iterator( i.iterator )
299 return (T&)*iterator;
306 BI operator ->()
const
361 template <
class BI,
class C,
class T>
inline
369 #define IMPLEMENT_INCDEC_OPERATORS \
370 __I__& operator ++() { __R__::PreIncrement(); return *this; } \
371 __I__ operator ++( int ) { return __I__( __R__::PostIncrement() ); } \
372 __I__& operator --() { __R__::PreDecrement(); return *this; } \
373 __I__ operator --( int ) { return __I__( __R__::PostDecrement() ); }
379 template <
class BI,
class T>
409 IMPLEMENT_INCDEC_OPERATORS
418 template <
class RI,
class T>
454 return (T&)*(__R__::iterator - d);
463 __R__::iterator -= d;
473 __R__::iterator += d;
477 IMPLEMENT_INCDEC_OPERATORS
480 #undef IMPLEMENT_INCDEC_OPERATORS
484 template <
class RI,
class T>
inline
492 template <
class RI,
class T>
inline
501 template <
class RI,
class T>
inline
509 template <
class RI,
class T>
inline
518 template <
class RI,
class T>
inline
574 return m_container.ReverseBegin();
585 return m_container.ReverseBegin();
596 return m_container.ConstReverseBegin();
608 return m_container.ReverseEnd();
620 return m_container.ReverseEnd();
632 return m_container.ConstReverseEnd();
641 return m_container.Begin();
650 return m_container.Begin();
659 return m_container.ConstBegin();
667 return m_container.End();
676 return m_container.End();
685 return m_container.ConstEnd();
688 #ifndef __PCL_NO_STL_COMPATIBLE_ITERATORS
724 container& m_container;
Bidirectional iterator class.
Random access iterator class.
Reverse bidirectional iterator.
ReverseBidirectionalIterator()=default
ReverseBidirectionalIterator(const BI &i)
ReverseBidirectionalIterator(const ReverseBidirectionalIterator &i)
Reverse container adaptor.
auto ReverseBegin() const
auto ConstReverseEnd() const
auto ConstReverseBegin() const
Base class of reverse iterators.
ReverseIteratorBase(const BI &i)
ReverseIteratorBase(const ReverseIteratorBase &i)
ReverseIteratorBase()=default
Reverse random access iterator.
ReverseRandomAccessIterator()=default
ReverseRandomAccessIterator(const ReverseRandomAccessIterator &i)
ReverseRandomAccessIterator(const RI &i)
bool operator==(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
bool operator<(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
Complex< T1 > operator-(const Complex< T1 > &c1, const Complex< T2 > &c2) noexcept
Complex< T1 > operator*(const Complex< T1 > &c1, const Complex< T2 > &c2) noexcept
Complex< T1 > operator+(const Complex< T1 > &c1, const Complex< T2 > &c2) noexcept
void MoveBackward(BI &i, size_type n)
void MoveForward(FI &i, size_type n)
void Advance(FI &i, distance_type d)
distance_type Distance(FI i, FI j)
C IteratorClass(const Iterator< C, T > &)
T * ItemType(const Iterator< C, T > &)
Generic container iterator.
C iterator_class
Represents the iterator class.
T item_type
Represents the item type.