Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

__bit_reference Struct Reference

#include <stl_bvector.h>

List of all members.

Public Methods

 __bit_reference (unsigned int *x, unsigned int y)
 __bit_reference ()
 operator bool () const
__bit_reference & operator= (bool x)
__bit_reference & operator= (const __bit_reference &x)
bool operator== (const __bit_reference &x) const
bool operator< (const __bit_reference &x) const
void flip ()

Public Attributes

unsigned int * p
unsigned int mask


Constructor & Destructor Documentation

__bit_reference::__bit_reference unsigned int *    x,
unsigned int    y
[inline]
 

Definition at line 45 of file stl_bvector.h.

References mask, and p.

00045 : p(x), mask(y) {}

__bit_reference::__bit_reference   [inline]
 

Definition at line 48 of file stl_bvector.h.

References mask, and p.

00048 : p(0), mask(0) {}


Member Function Documentation

void __bit_reference::flip   [inline]
 

Definition at line 64 of file stl_bvector.h.

References mask, and p.

00064 { *p ^= mask; }

__bit_reference::operator bool   const [inline]
 

Definition at line 49 of file stl_bvector.h.

References mask, and p.

00049 { return !(!(*p & mask)); }

bool __bit_reference::operator< const __bit_reference &    x const [inline]
 

Definition at line 61 of file stl_bvector.h.

00061                                                  {
00062     return bool(*this) < bool(x);
00063   }

__bit_reference& __bit_reference::operator= const __bit_reference &    x [inline]
 

Definition at line 57 of file stl_bvector.h.

00057 { return *this = bool(x); }

__bit_reference& __bit_reference::operator= bool    x [inline]
 

Definition at line 50 of file stl_bvector.h.

References mask, and p.

00050                                      {
00051     if (x)      
00052       *p |= mask;
00053     else 
00054       *p &= ~mask;
00055     return *this;
00056   }

bool __bit_reference::operator== const __bit_reference &    x const [inline]
 

Definition at line 58 of file stl_bvector.h.

00058                                                   {
00059     return bool(*this) == bool(x);
00060   }


Member Data Documentation

unsigned int __bit_reference::mask
 

Definition at line 44 of file stl_bvector.h.

Referenced by __bit_reference, flip, operator bool, and operator=.

unsigned int* __bit_reference::p
 

Definition at line 43 of file stl_bvector.h.

Referenced by __bit_reference, flip, operator bool, and operator=.


The documentation for this struct was generated from the following file:
logo OpenMask

Documentation generated on Thu May 2 15:03:14 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001