ReactOS 0.4.15-dev-7942-gd23573b
_Bit_reference Struct Reference

#include <_bvector.h>

Public Member Functions

 _Bit_reference (unsigned int *__x, unsigned int __y)
 
 _Bit_reference ()
 
 operator bool () const
 
_Bit_referenceoperator= (bool __x)
 
_Bit_referenceoperator= (const _Bit_reference &__x)
 
bool operator== (const _Bit_reference &__x) const
 
bool operator< (const _Bit_reference &__x) const
 
_Bit_referenceoperator|= (bool __x)
 
_Bit_referenceoperator&= (bool __x)
 
void flip ()
 

Public Attributes

unsigned int_M_p
 
unsigned int _M_mask
 

Detailed Description

Definition at line 42 of file _bvector.h.

Constructor & Destructor Documentation

◆ _Bit_reference() [1/2]

_Bit_reference::_Bit_reference ( unsigned int __x,
unsigned int  __y 
)
inline

Definition at line 45 of file _bvector.h.

46 : _M_p(__x), _M_mask(__y) {}
unsigned int * _M_p
Definition: _bvector.h:43
unsigned int _M_mask
Definition: _bvector.h:44

◆ _Bit_reference() [2/2]

_Bit_reference::_Bit_reference ( )
inline

Definition at line 49 of file _bvector.h.

49: _M_p(0), _M_mask(0) {}

Member Function Documentation

◆ flip()

void _Bit_reference::flip ( )
inline

Definition at line 79 of file _bvector.h.

79{ *_M_p ^= _M_mask; }

◆ operator bool()

_Bit_reference::operator bool ( ) const
inline

Definition at line 51 of file _bvector.h.

51 {
52 return !(!(*_M_p & _M_mask));
53 }

◆ operator&=()

_Bit_reference & _Bit_reference::operator&= ( bool  __x)
inline

Definition at line 74 of file _bvector.h.

74 {
75 if (!__x)
76 *_M_p &= ~_M_mask;
77 return *this;
78 }

◆ operator<()

bool _Bit_reference::operator< ( const _Bit_reference __x) const
inline

Definition at line 65 of file _bvector.h.

65 {
66 return !bool(*this) && bool(__x);
67 }
#define bool
Definition: nsiface.idl:72

◆ operator=() [1/2]

_Bit_reference & _Bit_reference::operator= ( bool  __x)
inline

Definition at line 54 of file _bvector.h.

54 {
55 if (__x) *_M_p |= _M_mask;
56 else *_M_p &= ~_M_mask;
57 return *this;
58 }

◆ operator=() [2/2]

_Bit_reference & _Bit_reference::operator= ( const _Bit_reference __x)
inline

Definition at line 59 of file _bvector.h.

59 {
60 return *this = bool(__x);
61 }

◆ operator==()

bool _Bit_reference::operator== ( const _Bit_reference __x) const
inline

Definition at line 62 of file _bvector.h.

62 {
63 return bool(*this) == bool(__x);
64 }

◆ operator|=()

_Bit_reference & _Bit_reference::operator|= ( bool  __x)
inline

Definition at line 69 of file _bvector.h.

69 {
70 if (__x)
71 *_M_p |= _M_mask;
72 return *this;
73 }

Member Data Documentation

◆ _M_mask

unsigned int _Bit_reference::_M_mask

Definition at line 44 of file _bvector.h.

Referenced by flip(), operator bool(), operator=(), and operator|=().

◆ _M_p

unsigned int* _Bit_reference::_M_p

Definition at line 43 of file _bvector.h.

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


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