bm::bvector< Alloc >::reference Class Reference
BitMagic Library » bvector<> container

Class reference implements an object for bit assignment. More...

`#include <bm.h>`

## Public Member Functions

| reference (bvector< Alloc > &bv, size_type position) BMNOEXCEPT
| reference (const reference &ref) BMNOEXCEPT
| operator bool () const BMNOEXCEPT
const reference & | operator= (const reference &ref) const
const reference & | operator= (bool value) const BMNOEXCEPT
bool | operator== (const reference &ref) const BMNOEXCEPT
const reference & | operator&= (bool value) const
const reference & | operator|= (bool value) const
const reference & | operator^= (bool value) const
bool | operator! () const BMNOEXCEPT
bool | operator~ () const BMNOEXCEPT
reference & | flip ()

## Detailed Description

template<class Alloc>
class bm::bvector< Alloc >::reference

Class reference implements an object for bit assignment.

Since C++ does not provide with build-in bit type supporting l-value operations we have to emulate it.

Definition at line 148 of file bm.h.

## Constructor & Destructor Documentation

## reference() [1/2]

template<class Alloc>

bm::bvector< Alloc >::reference::reference | ( | bvector< Alloc > & | bv,
|  | size_type | position )

inline

Definition at line 151 of file bm.h.

References BMNOEXCEPT, and bm::bvector< Alloc >::bvector().

Referenced by flip(), operator&=(), operator=(), operator=(), operator==(), operator^=(), operator|=(), and reference().

## reference() [2/2]

template<class Alloc>

bm::bvector< Alloc >::reference::reference | ( | const reference & | ref | ) |

inline

Definition at line 156 of file bm.h.

References BMNOEXCEPT, and reference().

## Member Function Documentation

## flip()

template<class Alloc>

reference & bm::bvector< Alloc >::reference::flip | ( |  | ) |

inline

Negates the bit value

Definition at line 222 of file bm.h.

References flip(), and reference().

Referenced by flip().

## operator bool()

template<class Alloc>

bm::bvector< Alloc >::reference::operator bool | ( |  | ) | const

inline

Definition at line 163 of file bm.h.

References BMNOEXCEPT.

## operator!()

template<class Alloc>

bool bm::bvector< Alloc >::reference::operator! | ( |  | ) | const

inline

Logical Not operator

Definition at line 210 of file bm.h.

References BMNOEXCEPT.

## operator&=()

template<class Alloc>

const reference & bm::bvector< Alloc >::reference::operator&= | ( | bool | value | ) | const

inline

Bitwise AND. Performs operation: bit = bit AND value

Definition at line 186 of file bm.h.

References reference().

## operator=() [1/2]

template<class Alloc>

const reference & bm::bvector< Alloc >::reference::operator= | ( | bool | value | ) | const

inline

Definition at line 174 of file bm.h.

References BMNOEXCEPT, and reference().

## operator=() [2/2]

template<class Alloc>

const reference & bm::bvector< Alloc >::reference::operator= | ( | const reference & | ref | ) | const

inline

Definition at line 168 of file bm.h.

References reference().

## operator==()

template<class Alloc>

bool bm::bvector< Alloc >::reference::operator== | ( | const reference & | ref | ) | const

inline

Definition at line 180 of file bm.h.

References BMNOEXCEPT, and reference().

## operator^=()

template<class Alloc>

const reference & bm::bvector< Alloc >::reference::operator^= | ( | bool | value | ) | const

inline

Bitwise exclusive-OR (XOR). Performs operation: bit = bit XOR value

Definition at line 203 of file bm.h.

References reference().

## operator|=()

template<class Alloc>

const reference & bm::bvector< Alloc >::reference::operator|= | ( | bool | value | ) | const

inline

Bitwise OR. Performs operation: bit = bit OR value

Definition at line 193 of file bm.h.

References reference().

## operator~()

template<class Alloc>

bool bm::bvector< Alloc >::reference::operator~ | ( |  | ) | const

inline

Bit Not operator

Definition at line 216 of file bm.h.

References BMNOEXCEPT.

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

- bm.h