Class bitvector_iterator

Synopsis

#include <include/EASTL/bitvector.h>

template <typename Element>
class bitvector_iterator : public bitvector_const_iterator<Element>

Description

No description yet.

Inheritance

Ancestors: bitvector_const_iterator

Methods

bitvector_iterator overloadbitvector_iterator
operator*
operator+
operator++ overload
operator+=
operator- overloadWe need this here because we are overloading operator-, so for some reason the other overload of the function can't be found unless it's explicitly specified.
operator-- overload
operator-=
operator[]

Source

Lines 149-184 in include/EASTL/bitvector.h.

template <typename Element>
class bitvector_iterator : public bitvector_const_iterator<Element>
{
public:
    typedef EASTL_ITC_NS::random_access_iterator_tag iterator_category;
    typedef bitvector_iterator                       this_type;
    typedef bitvector_const_iterator<Element>        base_type;
    typedef bool                                     value_type;
    typedef bitvector_reference<Element>             reference_type;
    typedef ptrdiff_t                                difference_type;
    typedef Element                                  element_type;
    typedef element_type*                            pointer;           // This is wrong. It needs to be someting that acts as a pointer to a bit.
    typedef element_type&                            reference;         // This is not right. It needs to be someting that acts as a pointer to a bit.
public:
    reference_type operator*() const;
    reference_type operator[](difference_type n) const;
    bitvector_iterator();
    bitvector_iterator(element_type* p, eastl_size_t i);
    bitvector_iterator(reference_type& referenceType);
    bitvector_iterator& operator++()    { base_type::operator++(); return *this; }
    bitvector_iterator& operator--()    { base_type::operator--(); return *this; }
    bitvector_iterator  operator++(int);
    bitvector_iterator  operator--(int);
    bitvector_iterator& operator+=(difference_type dist) { base_type::operator+=(dist); return *this; }
    bitvector_iterator& operator-=(difference_type dist) { base_type::operator-=(dist); return *this; }
    bitvector_iterator  operator+ (difference_type dist) const;
    bitvector_iterator  operator- (difference_type dist) const;
    // We need this here because we are overloading operator-, so for some reason the
    // other overload of the function can't be found unless it's explicitly specified.
    difference_type operator-(const base_type& rhs) const { return base_type::operator-(rhs); }
};





Add Discussion as Guest

Log in