Class bitvector_reference

Synopsis

#include <include/EASTL/bitvector.h>

template <typename Element>
class bitvector_reference

Description

No description yet.

Methods

bitvector_reference overloadbitvector_reference
CopyFrom
operator bool
operator= overload

Source

Lines 61-82 in include/EASTL/bitvector.h.

template <typename Element>
class bitvector_reference
{
public:
    typedef eastl_size_t size_type;
    bitvector_reference(Element* ptr, eastl_size_t i);
    bitvector_reference& operator=(bool value);
    bitvector_reference& operator=(const bitvector_reference& rhs);
    operator bool() const // Defined here because some compilers fail otherwise.
        { return (*mpBitWord & (Element(1) << mnBitIndex)) != 0; }
protected:
    friend class bitvector_const_iterator<Element>;
    Element*  mpBitWord;
    size_type mnBitIndex;
    bitvector_reference() {}
    void CopyFrom(const bitvector_reference& rhs);
};





Add Discussion as Guest

Log in