dlvhex  2.5.0
bm::bvector< Alloc >::reference Class Reference

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

#include <vs10/bm/bm.h>

Public Member Functions

 reference (bvector< Alloc > &bv, bm::id_t position)
 reference (const reference &ref)
 operator bool () const
const referenceoperator= (const reference &ref) const
const referenceoperator= (bool value) const
bool operator== (const reference &ref) const
const referenceoperator&= (bool value) const
const referenceoperator|= (bool value) const
const referenceoperator^= (bool value) const
bool operator! () const
bool operator~ () const
referenceflip ()
 reference (bvector< Alloc > &bv, bm::id_t position)
 reference (const reference &ref)
 operator bool () const
const referenceoperator= (const reference &ref) const
const referenceoperator= (bool value) const
bool operator== (const reference &ref) const
const referenceoperator&= (bool value) const
const referenceoperator|= (bool value) const
const referenceoperator^= (bool value) const
bool operator! () const
bool operator~ () const
referenceflip ()

Private Attributes

bvector< Alloc > & bv_
 Reference variable on the parent.
bm::id_t position_
 Position in the parent bitvector.

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 140 of file bm.h.


Constructor & Destructor Documentation

template<class Alloc>
bm::bvector< Alloc >::reference::reference ( bvector< Alloc > &  bv,
bm::id_t  position 
) [inline]

Definition at line 143 of file bm.h.

template<class Alloc>
bm::bvector< Alloc >::reference::reference ( const reference ref) [inline]
template<class Alloc>
bm::bvector< Alloc >::reference::reference ( bvector< Alloc > &  bv,
bm::id_t  position 
) [inline]

Definition at line 143 of file bm.h.

template<class Alloc>
bm::bvector< Alloc >::reference::reference ( const reference ref) [inline]

Member Function Documentation

template<class Alloc>
reference& bm::bvector< Alloc >::reference::flip ( ) [inline]

Negates the bit value

Definition at line 214 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

template<class Alloc>
reference& bm::bvector< Alloc >::reference::flip ( ) [inline]

Negates the bit value

Definition at line 214 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

template<class Alloc>
bm::bvector< Alloc >::reference::operator bool ( ) const [inline]
template<class Alloc>
bm::bvector< Alloc >::reference::operator bool ( ) const [inline]
template<class Alloc>
bool bm::bvector< Alloc >::reference::operator! ( ) const [inline]

Logical Not operator

Definition at line 202 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

template<class Alloc>
bool bm::bvector< Alloc >::reference::operator! ( ) const [inline]

Logical Not operator

Definition at line 202 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

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 178 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

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 178 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

template<class Alloc>
const reference& bm::bvector< Alloc >::reference::operator= ( const reference ref) const [inline]
template<class Alloc>
const reference& bm::bvector< Alloc >::reference::operator= ( const reference ref) const [inline]
template<class Alloc>
const reference& bm::bvector< Alloc >::reference::operator= ( bool  value) const [inline]
template<class Alloc>
const reference& bm::bvector< Alloc >::reference::operator= ( bool  value) const [inline]
template<class Alloc>
bool bm::bvector< Alloc >::reference::operator== ( const reference ref) const [inline]

Definition at line 172 of file bm.h.

template<class Alloc>
bool bm::bvector< Alloc >::reference::operator== ( const reference ref) const [inline]

Definition at line 172 of file bm.h.

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 195 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

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 195 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

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 185 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

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 185 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

template<class Alloc>
bool bm::bvector< Alloc >::reference::operator~ ( ) const [inline]

Bit Not operator

Definition at line 208 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.

template<class Alloc>
bool bm::bvector< Alloc >::reference::operator~ ( ) const [inline]

Bit Not operator

Definition at line 208 of file bm.h.

References bm::bvector< Alloc >::reference::bv_, and bm::bvector< Alloc >::reference::position_.


Field Documentation


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