corelib/include/ebcl/bits/ArrayConstIteratorDecl.hh

36 lines
941 B
C++

#ifndef M_TGT_
# define M_TGT_ T_Self
#endif
template< ptrdiff_t Direction >
class T_ConstIterator_ : public std::iterator<
std::random_access_iterator_tag , Type >
{
private:
M_TGT_ const* array_;
ptrdiff_t pos_;
public:
T_ConstIterator_( M_TGT_ const& array ,
const ptrdiff_t pos ) noexcept;
T_ConstIterator_( typename M_TGT_::T_Iterator const& iterator ) noexcept;
T_ConstIterator_& operator =(
typename M_TGT_::T_Iterator const& iterator ) noexcept;
M_ITER_CONS_DEF( T_ConstIterator_ );
M_ITER_CONS_COPY( T_ConstIterator_ );
M_ITER_SWAP( T_ConstIterator_ );
M_ITER_CMP_ALL( T_ConstIterator_ );
M_ITER_DEREF_RANDOM( Type const& , Type const* );
M_ITER_OPS_RANDOM( T_ConstIterator_ );
bool valid( ) const noexcept;
M_TGT_* target( ) const noexcept;
ptrdiff_t pos( ) const noexcept;
};
using T_ConstIterator = T_ConstIterator_< 1 >;
using T_ConstReverseIterator = T_ConstIterator_< -1 >;
#undef M_TGT_